The projects controller gets more RESTy. It now supports XML, RSS, ATOM, HTML and plain text views of the projects list.

Changes include:

 * Add assert_xml_select method for testing RSS and ATOM results (Thanks, Jamis! http://weblog.jamisbuck.org/2007/1/4/assert_xml_select)
 * Add resource_feeder plugin for generating RSS and ATOM feeds
 * Update the URL on the Feeds page to use /projects.rss or /projects.txt instead of FeedController link
 * Add created_at and updated_at timestamps to project table to support ATOM feeds
 * Added new filter to login_system "login_or_feed_token_required" to allow RSS, ATOM or text requests with token-based authentication 
 
Notes:
 * This will break previous project listing feed subscriptions.
 * RSS, ATOM & text feeds are available via session or HTTP_BASIC authentication, or by passing the user's token on the url; HTML and XML results are only available via session or HTTP_BASIC authentication
 


git-svn-id: http://www.rousette.org.uk/svn/tracks-repos/trunk@415 a4c988fc-2ded-0310-b66e-134b36920a42
This commit is contained in:
lukemelia 2007-02-01 05:32:05 +00:00
parent fda7788237
commit d9d5ff4d06
35 changed files with 735 additions and 94 deletions

View file

@ -0,0 +1,12 @@
class AddProjectTimestamps < ActiveRecord::Migration
def self.up
add_column :projects, :created_at, :timestamp
add_column :projects, :updated_at, :timestamp
end
def self.down
remove_column :projects, :created_at
remove_column :projects, :updated_at
end
end

View file

@ -2,7 +2,7 @@
# migrations feature of ActiveRecord to incrementally modify your database, and
# then regenerate this schema definition.
ActiveRecord::Schema.define(:version => 25) do
ActiveRecord::Schema.define(:version => 26) do
create_table "contexts", :force => true do |t|
t.column "name", :string, :default => "", :null => false
@ -60,11 +60,13 @@ ActiveRecord::Schema.define(:version => 25) do
add_index "preferences", ["user_id"], :name => "index_preferences_on_user_id"
create_table "projects", :force => true do |t|
t.column "name", :string, :default => "", :null => false
t.column "position", :integer, :default => 0, :null => false
t.column "user_id", :integer, :default => 0, :null => false
t.column "name", :string, :default => "", :null => false
t.column "position", :integer, :default => 0, :null => false
t.column "user_id", :integer, :default => 0, :null => false
t.column "description", :text
t.column "state", :string, :limit => 20, :default => "active", :null => false
t.column "state", :string, :limit => 20, :default => "active", :null => false
t.column "created_at", :datetime
t.column "updated_at", :datetime
end
add_index "projects", ["user_id"], :name => "index_projects_on_user_id"