devise_oauth2_providable 0.3.3 → 0.3.4

Sign up to get free protection for your applications and to get access to all the features.
data/config/routes.rb CHANGED
@@ -1,9 +1,8 @@
1
1
  require 'token_endpoint'
2
2
  Rails.application.routes.draw do |map|
3
- namespace 'oauth2' do
4
- resources :authorizations, :only => :create
5
- resource :token, :only => :create
3
+ scope '/oauth2', :name_prefix => 'oauth2' do
4
+ resources :authorizations, :controller => 'oauth2/authorizations', :only => :create
5
+ resource :token, :controller => 'oauth2/tokens', :only => :create
6
+ match 'authorize' => 'oauth2/authorizations#new'
6
7
  end
7
-
8
- match 'oauth2/authorize' => 'oauth2/authorizations#new'
9
8
  end
@@ -1,5 +1,5 @@
1
1
  module Devise
2
2
  module Oauth2Providable
3
- VERSION = "0.3.3"
3
+ VERSION = "0.3.4"
4
4
  end
5
5
  end
@@ -0,0 +1,15 @@
1
+ require 'spec_helper'
2
+
3
+ describe Oauth2::AuthorizationsController do
4
+ describe 'routing' do
5
+ it 'routes POST /oauth2/authorizations' do
6
+ {:post => '/oauth2/authorizations'}.should route_to(:controller => 'oauth2/authorizations', :action => 'create')
7
+ end
8
+ it 'routes GET /oauth2/authorize' do
9
+ {:get => '/oauth2/authorize'}.should route_to(:controller => 'oauth2/authorizations', :action => 'new')
10
+ end
11
+ it 'routes POST /oauth2/authorize' do
12
+ {:post => '/oauth2/authorize'}.should route_to(:controller => 'oauth2/authorizations', :action => 'new')
13
+ end
14
+ end
15
+ end
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: devise_oauth2_providable
3
3
  version: !ruby/object:Gem::Version
4
- hash: 21
4
+ hash: 27
5
5
  prerelease:
6
6
  segments:
7
7
  - 0
8
8
  - 3
9
- - 3
10
- version: 0.3.3
9
+ - 4
10
+ version: 0.3.4
11
11
  platform: ruby
12
12
  authors:
13
13
  - Ryan Sonnek
@@ -15,7 +15,7 @@ autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
17
 
18
- date: 2011-07-14 00:00:00 Z
18
+ date: 2011-07-15 00:00:00 Z
19
19
  dependencies:
20
20
  - !ruby/object:Gem::Dependency
21
21
  name: rails
@@ -170,7 +170,6 @@ files:
170
170
  - spec/rails_app/public/stylesheets/.gitkeep
171
171
  - spec/rails_app/script/rails
172
172
  - spec/rails_app/spec/controllers/protected_controller_spec.rb
173
- - spec/rails_app/spec/controllers/tokens_controller_spec.rb
174
173
  - spec/rails_app/spec/integration/oauth2_authorization_token_grant_type_strategy_spec.rb
175
174
  - spec/rails_app/spec/integration/oauth2_password_grant_type_strategy_spec.rb
176
175
  - spec/rails_app/spec/integration/oauth2_refresh_token_grant_type_strategy_spec.rb
@@ -179,6 +178,8 @@ files:
179
178
  - spec/rails_app/spec/models/client_spec.rb
180
179
  - spec/rails_app/spec/models/refresh_token_spec.rb
181
180
  - spec/rails_app/spec/models/user_spec.rb
181
+ - spec/rails_app/spec/routing/authorizations_routing_spec.rb
182
+ - spec/rails_app/spec/routing/tokens_routing_spec.rb
182
183
  - spec/rails_app/spec/spec_helper.rb
183
184
  - spec/rails_app/vendor/plugins/.gitkeep
184
185
  - spec/setup_database.rb
@@ -263,7 +264,6 @@ test_files:
263
264
  - spec/rails_app/public/stylesheets/.gitkeep
264
265
  - spec/rails_app/script/rails
265
266
  - spec/rails_app/spec/controllers/protected_controller_spec.rb
266
- - spec/rails_app/spec/controllers/tokens_controller_spec.rb
267
267
  - spec/rails_app/spec/integration/oauth2_authorization_token_grant_type_strategy_spec.rb
268
268
  - spec/rails_app/spec/integration/oauth2_password_grant_type_strategy_spec.rb
269
269
  - spec/rails_app/spec/integration/oauth2_refresh_token_grant_type_strategy_spec.rb
@@ -272,6 +272,8 @@ test_files:
272
272
  - spec/rails_app/spec/models/client_spec.rb
273
273
  - spec/rails_app/spec/models/refresh_token_spec.rb
274
274
  - spec/rails_app/spec/models/user_spec.rb
275
+ - spec/rails_app/spec/routing/authorizations_routing_spec.rb
276
+ - spec/rails_app/spec/routing/tokens_routing_spec.rb
275
277
  - spec/rails_app/spec/spec_helper.rb
276
278
  - spec/rails_app/vendor/plugins/.gitkeep
277
279
  - spec/setup_database.rb