socialcast / devise_oauth2_providable

Rails3 engine integrating OAuth2 authentication with Devise
MIT License
219 stars 102 forks source link

Use latest Rails 3 router syntax #3

Closed jcf closed 13 years ago

jcf commented 13 years ago

I've had a few deprecation warnings regarding the router syntax used. The use of :to => path is going to be removed in 3.1 I believe. The preferred syntax is simpler:

post '/oauth/authorize` => 'oauth/authorizations#create'

I'm assuming TokenEndpoint.new responds to #call and returns something like [status, headers, body]. If it's effectively a Rack app then Rails 3 will call it just fine. If not the lambda may still be required, or of course TokenEndpoint could be refactored to respond in a way that Rails/Rack can understand.

No tests for this. Perhaps you'd be interested in getting some cucumber features in here? I'd be happy to write a few.

wireframe commented 13 years ago

awesome.

i just added a skeleton embedded rails app to test out the engine routes/models/etc. i'll double check that everything looks good and pull this in tonight!