devise_oauth 2.0.0 → 2.0.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (67) hide show
  1. data/.gitignore +7 -0
  2. data/.rspec +2 -0
  3. data/Gemfile +17 -0
  4. data/Gemfile.lock +136 -0
  5. data/README.md +77 -0
  6. data/app/controllers/{oauth → devise/oauth}/access_tokens_controller.rb +0 -0
  7. data/app/controllers/{oauth → devise/oauth}/accesses_controller.rb +0 -0
  8. data/app/controllers/{oauth → devise/oauth}/authorizations_controller.rb +0 -0
  9. data/app/controllers/{oauth → devise/oauth}/clients_controller.rb +0 -0
  10. data/app/models/{oauth → devise/oauth}/access.rb +0 -0
  11. data/app/models/{oauth → devise/oauth}/access_token.rb +0 -0
  12. data/app/models/{oauth → devise/oauth}/authorization.rb +0 -0
  13. data/app/models/{oauth → devise/oauth}/client.rb +0 -0
  14. data/devise_oauth.gemspec +27 -0
  15. data/lib/devise/oauth/engine.rb +7 -2
  16. data/lib/devise/oauth/version.rb +1 -1
  17. data/script/rails +8 -0
  18. data/spec/controllers/access_tokens_controller_spec.rb +208 -0
  19. data/spec/controllers/authorizations_controller_spec.rb +53 -0
  20. data/spec/controllers/protected_resources_controller_spec.rb +79 -0
  21. data/spec/dummy/README.rdoc +261 -0
  22. data/spec/dummy/Rakefile +7 -0
  23. data/spec/dummy/app/assets/javascripts/application.js +15 -0
  24. data/spec/dummy/app/assets/stylesheets/application.css +13 -0
  25. data/spec/dummy/app/controllers/application_controller.rb +7 -0
  26. data/spec/dummy/app/controllers/protected_resources_controller.rb +14 -0
  27. data/spec/dummy/app/helpers/application_helper.rb +2 -0
  28. data/spec/dummy/app/mailers/.gitkeep +0 -0
  29. data/spec/dummy/app/models/.gitkeep +0 -0
  30. data/spec/dummy/app/models/ability.rb +15 -0
  31. data/spec/dummy/app/models/user.rb +13 -0
  32. data/spec/dummy/app/views/layouts/application.html.erb +14 -0
  33. data/spec/dummy/config.ru +4 -0
  34. data/spec/dummy/config/application.rb +67 -0
  35. data/spec/dummy/config/boot.rb +10 -0
  36. data/spec/dummy/config/database.yml +25 -0
  37. data/spec/dummy/config/environment.rb +5 -0
  38. data/spec/dummy/config/environments/development.rb +37 -0
  39. data/spec/dummy/config/environments/production.rb +67 -0
  40. data/spec/dummy/config/environments/test.rb +37 -0
  41. data/spec/dummy/config/initializers/backtrace_silencers.rb +7 -0
  42. data/spec/dummy/config/initializers/devise.rb +216 -0
  43. data/spec/dummy/config/initializers/inflections.rb +15 -0
  44. data/spec/dummy/config/initializers/mime_types.rb +5 -0
  45. data/spec/dummy/config/initializers/secret_token.rb +7 -0
  46. data/spec/dummy/config/initializers/session_store.rb +8 -0
  47. data/spec/dummy/config/initializers/wrap_parameters.rb +14 -0
  48. data/spec/dummy/config/locales/devise.en.yml +57 -0
  49. data/spec/dummy/config/locales/en.yml +5 -0
  50. data/spec/dummy/config/routes.rb +7 -0
  51. data/spec/dummy/db/migrate/20120622183848_devise_create_users.rb +46 -0
  52. data/spec/dummy/db/schema.rb +34 -0
  53. data/spec/dummy/lib/assets/.gitkeep +0 -0
  54. data/spec/dummy/log/.gitkeep +0 -0
  55. data/spec/dummy/public/404.html +26 -0
  56. data/spec/dummy/public/422.html +26 -0
  57. data/spec/dummy/public/500.html +25 -0
  58. data/spec/dummy/public/favicon.ico +0 -0
  59. data/spec/dummy/script/rails +6 -0
  60. data/spec/factories.rb +34 -0
  61. data/spec/models/oauth/access_token_spec.rb +25 -0
  62. data/spec/models/oauth/authorization_spec.rb +19 -0
  63. data/spec/models/oauth/client_spec.rb +31 -0
  64. data/spec/models/user_spec.rb +10 -0
  65. data/spec/spec_helper.rb +39 -0
  66. data/spec/support/match_json.rb +6 -0
  67. metadata +134 -30
@@ -0,0 +1,6 @@
1
+ # "{'foo': 'bar'}".should match_json {:foo => :bar}
2
+ RSpec::Matchers.define :match_json do |expected|
3
+ match do |actual|
4
+ ActiveSupport::JSON.backend.load(actual) == ActiveSupport::JSON.backend.load(expected.to_json)
5
+ end
6
+ end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: devise_oauth
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.0.0
4
+ version: 2.0.1
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,11 +9,11 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2012-06-29 00:00:00.000000000 Z
12
+ date: 2012-07-02 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rails
16
- requirement: &70245897777140 !ruby/object:Gem::Requirement
16
+ requirement: &70160998060320 !ruby/object:Gem::Requirement
17
17
  none: false
18
18
  requirements:
19
19
  - - ! '>='
@@ -21,10 +21,10 @@ dependencies:
21
21
  version: 3.2.0
22
22
  type: :runtime
23
23
  prerelease: false
24
- version_requirements: *70245897777140
24
+ version_requirements: *70160998060320
25
25
  - !ruby/object:Gem::Dependency
26
26
  name: devise
27
- requirement: &70245897776200 !ruby/object:Gem::Requirement
27
+ requirement: &70160998059800 !ruby/object:Gem::Requirement
28
28
  none: false
29
29
  requirements:
30
30
  - - ! '>='
@@ -32,10 +32,10 @@ dependencies:
32
32
  version: '2.1'
33
33
  type: :runtime
34
34
  prerelease: false
35
- version_requirements: *70245897776200
35
+ version_requirements: *70160998059800
36
36
  - !ruby/object:Gem::Dependency
37
37
  name: sqlite3
38
- requirement: &70245897775620 !ruby/object:Gem::Requirement
38
+ requirement: &70160998059280 !ruby/object:Gem::Requirement
39
39
  none: false
40
40
  requirements:
41
41
  - - ! '>='
@@ -43,10 +43,10 @@ dependencies:
43
43
  version: '0'
44
44
  type: :development
45
45
  prerelease: false
46
- version_requirements: *70245897775620
46
+ version_requirements: *70160998059280
47
47
  - !ruby/object:Gem::Dependency
48
48
  name: factory_girl_rails
49
- requirement: &70245897774900 !ruby/object:Gem::Requirement
49
+ requirement: &70160998058820 !ruby/object:Gem::Requirement
50
50
  none: false
51
51
  requirements:
52
52
  - - ! '>='
@@ -54,10 +54,10 @@ dependencies:
54
54
  version: '0'
55
55
  type: :development
56
56
  prerelease: false
57
- version_requirements: *70245897774900
57
+ version_requirements: *70160998058820
58
58
  - !ruby/object:Gem::Dependency
59
59
  name: rspec-rails
60
- requirement: &70245897773960 !ruby/object:Gem::Requirement
60
+ requirement: &70160998058300 !ruby/object:Gem::Requirement
61
61
  none: false
62
62
  requirements:
63
63
  - - ! '>='
@@ -65,10 +65,10 @@ dependencies:
65
65
  version: '2.0'
66
66
  type: :development
67
67
  prerelease: false
68
- version_requirements: *70245897773960
68
+ version_requirements: *70160998058300
69
69
  - !ruby/object:Gem::Dependency
70
70
  name: database_cleaner
71
- requirement: &70245897773500 !ruby/object:Gem::Requirement
71
+ requirement: &70160998057740 !ruby/object:Gem::Requirement
72
72
  none: false
73
73
  requirements:
74
74
  - - ! '>='
@@ -76,10 +76,10 @@ dependencies:
76
76
  version: '0'
77
77
  type: :development
78
78
  prerelease: false
79
- version_requirements: *70245897773500
79
+ version_requirements: *70160998057740
80
80
  - !ruby/object:Gem::Dependency
81
81
  name: shoulda-matchers
82
- requirement: &70245897772840 !ruby/object:Gem::Requirement
82
+ requirement: &70160998057280 !ruby/object:Gem::Requirement
83
83
  none: false
84
84
  requirements:
85
85
  - - ! '>='
@@ -87,7 +87,7 @@ dependencies:
87
87
  version: '0'
88
88
  type: :development
89
89
  prerelease: false
90
- version_requirements: *70245897772840
90
+ version_requirements: *70160998057280
91
91
  description: The OAuth 2.0 Authorization Framework draft-ietf-oauth-v2-28 implementation
92
92
  on top of devise.
93
93
  email:
@@ -96,18 +96,26 @@ executables: []
96
96
  extensions: []
97
97
  extra_rdoc_files: []
98
98
  files:
99
- - app/controllers/oauth/access_tokens_controller.rb
100
- - app/controllers/oauth/accesses_controller.rb
101
- - app/controllers/oauth/authorizations_controller.rb
102
- - app/controllers/oauth/clients_controller.rb
99
+ - .gitignore
100
+ - .rspec
101
+ - Gemfile
102
+ - Gemfile.lock
103
+ - MIT-LICENSE
104
+ - README.md
105
+ - Rakefile
106
+ - app/controllers/devise/oauth/access_tokens_controller.rb
107
+ - app/controllers/devise/oauth/accesses_controller.rb
108
+ - app/controllers/devise/oauth/authorizations_controller.rb
109
+ - app/controllers/devise/oauth/clients_controller.rb
103
110
  - app/helpers/devise/oauth/helpers.rb
104
- - app/models/oauth/access.rb
105
- - app/models/oauth/access_token.rb
106
- - app/models/oauth/authorization.rb
107
- - app/models/oauth/client.rb
111
+ - app/models/devise/oauth/access.rb
112
+ - app/models/devise/oauth/access_token.rb
113
+ - app/models/devise/oauth/authorization.rb
114
+ - app/models/devise/oauth/client.rb
108
115
  - app/views/devise/oauth/authorizations/show.html.erb
109
116
  - config/routes.rb
110
117
  - db/migrate/20120622164619_devise_create_oauth.rb
118
+ - devise_oauth.gemspec
111
119
  - lib/devise/models/access_token_authenticatable.rb
112
120
  - lib/devise/models/client_ownable.rb
113
121
  - lib/devise/models/resource_ownable.rb
@@ -118,9 +126,56 @@ files:
118
126
  - lib/devise/strategies/access_token_authenticatable.rb
119
127
  - lib/devise_oauth.rb
120
128
  - lib/tasks/devise_oauth_tasks.rake
121
- - MIT-LICENSE
122
- - Rakefile
123
- - README.md
129
+ - script/rails
130
+ - spec/controllers/access_tokens_controller_spec.rb
131
+ - spec/controllers/authorizations_controller_spec.rb
132
+ - spec/controllers/protected_resources_controller_spec.rb
133
+ - spec/dummy/README.rdoc
134
+ - spec/dummy/Rakefile
135
+ - spec/dummy/app/assets/javascripts/application.js
136
+ - spec/dummy/app/assets/stylesheets/application.css
137
+ - spec/dummy/app/controllers/application_controller.rb
138
+ - spec/dummy/app/controllers/protected_resources_controller.rb
139
+ - spec/dummy/app/helpers/application_helper.rb
140
+ - spec/dummy/app/mailers/.gitkeep
141
+ - spec/dummy/app/models/.gitkeep
142
+ - spec/dummy/app/models/ability.rb
143
+ - spec/dummy/app/models/user.rb
144
+ - spec/dummy/app/views/layouts/application.html.erb
145
+ - spec/dummy/config.ru
146
+ - spec/dummy/config/application.rb
147
+ - spec/dummy/config/boot.rb
148
+ - spec/dummy/config/database.yml
149
+ - spec/dummy/config/environment.rb
150
+ - spec/dummy/config/environments/development.rb
151
+ - spec/dummy/config/environments/production.rb
152
+ - spec/dummy/config/environments/test.rb
153
+ - spec/dummy/config/initializers/backtrace_silencers.rb
154
+ - spec/dummy/config/initializers/devise.rb
155
+ - spec/dummy/config/initializers/inflections.rb
156
+ - spec/dummy/config/initializers/mime_types.rb
157
+ - spec/dummy/config/initializers/secret_token.rb
158
+ - spec/dummy/config/initializers/session_store.rb
159
+ - spec/dummy/config/initializers/wrap_parameters.rb
160
+ - spec/dummy/config/locales/devise.en.yml
161
+ - spec/dummy/config/locales/en.yml
162
+ - spec/dummy/config/routes.rb
163
+ - spec/dummy/db/migrate/20120622183848_devise_create_users.rb
164
+ - spec/dummy/db/schema.rb
165
+ - spec/dummy/lib/assets/.gitkeep
166
+ - spec/dummy/log/.gitkeep
167
+ - spec/dummy/public/404.html
168
+ - spec/dummy/public/422.html
169
+ - spec/dummy/public/500.html
170
+ - spec/dummy/public/favicon.ico
171
+ - spec/dummy/script/rails
172
+ - spec/factories.rb
173
+ - spec/models/oauth/access_token_spec.rb
174
+ - spec/models/oauth/authorization_spec.rb
175
+ - spec/models/oauth/client_spec.rb
176
+ - spec/models/user_spec.rb
177
+ - spec/spec_helper.rb
178
+ - spec/support/match_json.rb
124
179
  homepage: https://github.com/anjlab/devise_oauth
125
180
  licenses: []
126
181
  post_install_message:
@@ -135,7 +190,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
135
190
  version: '0'
136
191
  segments:
137
192
  - 0
138
- hash: -2188440318074512588
193
+ hash: 649188277961666722
139
194
  required_rubygems_version: !ruby/object:Gem::Requirement
140
195
  none: false
141
196
  requirements:
@@ -144,11 +199,60 @@ required_rubygems_version: !ruby/object:Gem::Requirement
144
199
  version: '0'
145
200
  segments:
146
201
  - 0
147
- hash: -2188440318074512588
202
+ hash: 649188277961666722
148
203
  requirements: []
149
204
  rubyforge_project:
150
205
  rubygems_version: 1.8.17
151
206
  signing_key:
152
207
  specification_version: 3
153
208
  summary: Oauth 2.0 provider implementation on top of devise.
154
- test_files: []
209
+ test_files:
210
+ - spec/controllers/access_tokens_controller_spec.rb
211
+ - spec/controllers/authorizations_controller_spec.rb
212
+ - spec/controllers/protected_resources_controller_spec.rb
213
+ - spec/dummy/README.rdoc
214
+ - spec/dummy/Rakefile
215
+ - spec/dummy/app/assets/javascripts/application.js
216
+ - spec/dummy/app/assets/stylesheets/application.css
217
+ - spec/dummy/app/controllers/application_controller.rb
218
+ - spec/dummy/app/controllers/protected_resources_controller.rb
219
+ - spec/dummy/app/helpers/application_helper.rb
220
+ - spec/dummy/app/mailers/.gitkeep
221
+ - spec/dummy/app/models/.gitkeep
222
+ - spec/dummy/app/models/ability.rb
223
+ - spec/dummy/app/models/user.rb
224
+ - spec/dummy/app/views/layouts/application.html.erb
225
+ - spec/dummy/config.ru
226
+ - spec/dummy/config/application.rb
227
+ - spec/dummy/config/boot.rb
228
+ - spec/dummy/config/database.yml
229
+ - spec/dummy/config/environment.rb
230
+ - spec/dummy/config/environments/development.rb
231
+ - spec/dummy/config/environments/production.rb
232
+ - spec/dummy/config/environments/test.rb
233
+ - spec/dummy/config/initializers/backtrace_silencers.rb
234
+ - spec/dummy/config/initializers/devise.rb
235
+ - spec/dummy/config/initializers/inflections.rb
236
+ - spec/dummy/config/initializers/mime_types.rb
237
+ - spec/dummy/config/initializers/secret_token.rb
238
+ - spec/dummy/config/initializers/session_store.rb
239
+ - spec/dummy/config/initializers/wrap_parameters.rb
240
+ - spec/dummy/config/locales/devise.en.yml
241
+ - spec/dummy/config/locales/en.yml
242
+ - spec/dummy/config/routes.rb
243
+ - spec/dummy/db/migrate/20120622183848_devise_create_users.rb
244
+ - spec/dummy/db/schema.rb
245
+ - spec/dummy/lib/assets/.gitkeep
246
+ - spec/dummy/log/.gitkeep
247
+ - spec/dummy/public/404.html
248
+ - spec/dummy/public/422.html
249
+ - spec/dummy/public/500.html
250
+ - spec/dummy/public/favicon.ico
251
+ - spec/dummy/script/rails
252
+ - spec/factories.rb
253
+ - spec/models/oauth/access_token_spec.rb
254
+ - spec/models/oauth/authorization_spec.rb
255
+ - spec/models/oauth/client_spec.rb
256
+ - spec/models/user_spec.rb
257
+ - spec/spec_helper.rb
258
+ - spec/support/match_json.rb