Forums | Admin

Discussion Forums: open-discussion

Start New Thread Start New Thread

 

By: Tom Copeland
RE: Some reorganization [ reply ]  
2009-08-28 01:27
REST API deployed, new gem posted here:

http://rubyforge.org/tracker/index.php?func=detail&aid=26496&group_id=8458&atid=32748

Need to do some more testing... after that, I say, let's merge it in and get rubyforge-1.0.6 out there. I'll ask Ryan about it once I've tested a bit more...

Yours,

Tom

By: Tom Copeland
Some reorganization [ reply ]  
2009-08-27 23:59
I've been talking with Ryan Owens and Rich Kilmer about REST stuff and those discussions convinced me to move a bunch of stuff around. Basically we're going from something like this:

/groups/1/packages/2/releases/3/files.js

to

/releases/3/files.js

In other words, things are getting a lot flatter. Here's the latest routes file:

=======
ActionController::Routing::Routes.draw do |map|
parent_actions = [:create, :new, :index]

map.resources :groups do |group|
group.resource :news_bytes, :only => parent_actions
group.resources :packages, :only => parent_actions
end

map.resources :packages, :except => parent_actions do |package|
package.resources :releases, :only => parent_actions
end

map.resources :releases, :except => parent_actions do |release|
release.resources :files
end

map.resources :news_bytes, :except => parent_actions

map.resources :users, :collection => [:groups]

map.resources :processors
end
=======

I'll post a new version of the rubyforge gem that talks to this new API layout shortly...

Tom