clearance 1.0.0.rc4 → 1.0.0.rc6

Sign up to get free protection for your applications and to get access to all the features.

Potentially problematic release.


This version of clearance might be problematic. Click here for more details.

Files changed (58) hide show
  1. checksums.yaml +15 -0
  2. data/.travis.yml +14 -3
  3. data/Appraisals +7 -1
  4. data/Gemfile.lock +33 -26
  5. data/LICENSE +1 -1
  6. data/NEWS.md +13 -10
  7. data/README.md +44 -37
  8. data/Rakefile +3 -0
  9. data/app/controllers/clearance/passwords_controller.rb +6 -2
  10. data/app/views/clearance_mailer/change_password.html.erb +2 -2
  11. data/app/views/passwords/create.html.erb +3 -1
  12. data/app/views/passwords/edit.html.erb +15 -13
  13. data/app/views/passwords/new.html.erb +13 -11
  14. data/app/views/sessions/_form.html.erb +8 -3
  15. data/app/views/sessions/new.html.erb +4 -11
  16. data/app/views/users/_form.html.erb +2 -2
  17. data/app/views/users/new.html.erb +14 -5
  18. data/clearance.gemspec +5 -3
  19. data/config/locales/clearance.en.yml +53 -23
  20. data/config/routes.rb +3 -3
  21. data/gemfiles/{3.0.17.gemfile → 3.0.20.gemfile} +1 -1
  22. data/gemfiles/{3.0.17.gemfile.lock → 3.0.20.gemfile.lock} +62 -57
  23. data/gemfiles/{3.2.8.gemfile → 3.1.11.gemfile} +1 -1
  24. data/gemfiles/{3.1.8.gemfile.lock → 3.1.11.gemfile.lock} +70 -65
  25. data/gemfiles/{3.1.8.gemfile → 3.2.12.gemfile} +1 -1
  26. data/gemfiles/{3.2.8.gemfile.lock → 3.2.12.gemfile.lock} +74 -68
  27. data/gemfiles/3.2.13.rc2.gemfile +7 -0
  28. data/gemfiles/3.2.13.rc2.gemfile.lock +182 -0
  29. data/lib/clearance.rb +2 -1
  30. data/lib/clearance/authentication.rb +8 -53
  31. data/lib/clearance/authorization.rb +62 -0
  32. data/lib/clearance/back_door.rb +42 -0
  33. data/lib/clearance/controller.rb +11 -0
  34. data/lib/clearance/password_strategies/bcrypt.rb +13 -1
  35. data/lib/clearance/password_strategies/bcrypt_migration_from_sha1.rb +1 -0
  36. data/lib/clearance/password_strategies/blowfish.rb +5 -1
  37. data/lib/clearance/password_strategies/sha1.rb +5 -1
  38. data/lib/clearance/testing.rb +1 -1
  39. data/lib/clearance/testing/app/controllers/application_controller.rb +1 -1
  40. data/lib/clearance/user.rb +23 -10
  41. data/lib/clearance/version.rb +1 -1
  42. data/lib/generators/clearance/install/install_generator.rb +1 -1
  43. data/lib/generators/clearance/specs/templates/support/integration.rb +2 -0
  44. data/spec/clearance/back_door_spec.rb +39 -0
  45. data/spec/controllers/denies_controller_spec.rb +3 -2
  46. data/spec/controllers/flashes_controller_spec.rb +3 -3
  47. data/spec/controllers/forgeries_controller_spec.rb +3 -2
  48. data/spec/controllers/passwords_controller_spec.rb +14 -0
  49. data/spec/mailers/clearance_mailer_spec.rb +9 -1
  50. data/spec/models/bcrypt_migration_from_sha1_spec.rb +10 -9
  51. data/spec/models/bcrypt_spec.rb +21 -7
  52. data/spec/models/blowfish_spec.rb +1 -6
  53. data/spec/models/password_strategies_spec.rb +9 -3
  54. data/spec/models/sha1_spec.rb +1 -6
  55. data/spec/models/user_spec.rb +19 -9
  56. data/spec/support/clearance.rb +1 -1
  57. data/spec/support/fake_model_with_password_strategy.rb +14 -0
  58. metadata +54 -47
@@ -4,7 +4,7 @@ Clearance.configure do |config|
4
4
  end
5
5
 
6
6
  class ApplicationController < ActionController::Base
7
- include Clearance::Authentication
7
+ include Clearance::Controller
8
8
  end
9
9
 
10
10
  class User < ActiveRecord::Base
@@ -0,0 +1,14 @@
1
+ module FakeModelWithPasswordStrategy
2
+ def fake_model_with_password_strategy(password_strategy)
3
+ Class.new do
4
+ attr_reader :password
5
+ attr_accessor :encrypted_password, :salt
6
+
7
+ include password_strategy
8
+ end.new
9
+ end
10
+ end
11
+
12
+ RSpec.configure do |config|
13
+ config.include FakeModelWithPasswordStrategy
14
+ end
metadata CHANGED
@@ -1,8 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: clearance
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.0.rc4
5
- prerelease: 6
4
+ version: 1.0.0.rc6
6
5
  platform: ruby
7
6
  authors:
8
7
  - Dan Croak
@@ -18,12 +17,11 @@ authors:
18
17
  autorequire:
19
18
  bindir: bin
20
19
  cert_chain: []
21
- date: 2012-10-30 00:00:00.000000000 Z
20
+ date: 2013-03-17 00:00:00.000000000 Z
22
21
  dependencies:
23
22
  - !ruby/object:Gem::Dependency
24
23
  name: bcrypt-ruby
25
24
  requirement: !ruby/object:Gem::Requirement
26
- none: false
27
25
  requirements:
28
26
  - - ! '>='
29
27
  - !ruby/object:Gem::Version
@@ -31,7 +29,20 @@ dependencies:
31
29
  type: :runtime
32
30
  prerelease: false
33
31
  version_requirements: !ruby/object:Gem::Requirement
34
- none: false
32
+ requirements:
33
+ - - ! '>='
34
+ - !ruby/object:Gem::Version
35
+ version: '0'
36
+ - !ruby/object:Gem::Dependency
37
+ name: email_validator
38
+ requirement: !ruby/object:Gem::Requirement
39
+ requirements:
40
+ - - ! '>='
41
+ - !ruby/object:Gem::Version
42
+ version: '0'
43
+ type: :runtime
44
+ prerelease: false
45
+ version_requirements: !ruby/object:Gem::Requirement
35
46
  requirements:
36
47
  - - ! '>='
37
48
  - !ruby/object:Gem::Version
@@ -39,7 +50,6 @@ dependencies:
39
50
  - !ruby/object:Gem::Dependency
40
51
  name: rails
41
52
  requirement: !ruby/object:Gem::Requirement
42
- none: false
43
53
  requirements:
44
54
  - - ! '>='
45
55
  - !ruby/object:Gem::Version
@@ -47,7 +57,6 @@ dependencies:
47
57
  type: :runtime
48
58
  prerelease: false
49
59
  version_requirements: !ruby/object:Gem::Requirement
50
- none: false
51
60
  requirements:
52
61
  - - ! '>='
53
62
  - !ruby/object:Gem::Version
@@ -55,7 +64,6 @@ dependencies:
55
64
  - !ruby/object:Gem::Dependency
56
65
  name: appraisal
57
66
  requirement: !ruby/object:Gem::Requirement
58
- none: false
59
67
  requirements:
60
68
  - - '='
61
69
  - !ruby/object:Gem::Version
@@ -63,7 +71,6 @@ dependencies:
63
71
  type: :development
64
72
  prerelease: false
65
73
  version_requirements: !ruby/object:Gem::Requirement
66
- none: false
67
74
  requirements:
68
75
  - - '='
69
76
  - !ruby/object:Gem::Version
@@ -71,7 +78,6 @@ dependencies:
71
78
  - !ruby/object:Gem::Dependency
72
79
  name: aruba
73
80
  requirement: !ruby/object:Gem::Requirement
74
- none: false
75
81
  requirements:
76
82
  - - '='
77
83
  - !ruby/object:Gem::Version
@@ -79,7 +85,6 @@ dependencies:
79
85
  type: :development
80
86
  prerelease: false
81
87
  version_requirements: !ruby/object:Gem::Requirement
82
- none: false
83
88
  requirements:
84
89
  - - '='
85
90
  - !ruby/object:Gem::Version
@@ -87,39 +92,34 @@ dependencies:
87
92
  - !ruby/object:Gem::Dependency
88
93
  name: bourne
89
94
  requirement: !ruby/object:Gem::Requirement
90
- none: false
91
95
  requirements:
92
96
  - - '='
93
97
  - !ruby/object:Gem::Version
94
- version: 1.1.2
98
+ version: 1.3.0
95
99
  type: :development
96
100
  prerelease: false
97
101
  version_requirements: !ruby/object:Gem::Requirement
98
- none: false
99
102
  requirements:
100
103
  - - '='
101
104
  - !ruby/object:Gem::Version
102
- version: 1.1.2
105
+ version: 1.3.0
103
106
  - !ruby/object:Gem::Dependency
104
107
  name: bundler
105
108
  requirement: !ruby/object:Gem::Requirement
106
- none: false
107
109
  requirements:
108
110
  - - ~>
109
111
  - !ruby/object:Gem::Version
110
- version: 1.2.0
112
+ version: '1.1'
111
113
  type: :development
112
114
  prerelease: false
113
115
  version_requirements: !ruby/object:Gem::Requirement
114
- none: false
115
116
  requirements:
116
117
  - - ~>
117
118
  - !ruby/object:Gem::Version
118
- version: 1.2.0
119
+ version: '1.1'
119
120
  - !ruby/object:Gem::Dependency
120
121
  name: capybara
121
122
  requirement: !ruby/object:Gem::Requirement
122
- none: false
123
123
  requirements:
124
124
  - - '='
125
125
  - !ruby/object:Gem::Version
@@ -127,7 +127,6 @@ dependencies:
127
127
  type: :development
128
128
  prerelease: false
129
129
  version_requirements: !ruby/object:Gem::Requirement
130
- none: false
131
130
  requirements:
132
131
  - - '='
133
132
  - !ruby/object:Gem::Version
@@ -135,7 +134,6 @@ dependencies:
135
134
  - !ruby/object:Gem::Dependency
136
135
  name: cucumber-rails
137
136
  requirement: !ruby/object:Gem::Requirement
138
- none: false
139
137
  requirements:
140
138
  - - '='
141
139
  - !ruby/object:Gem::Version
@@ -143,7 +141,6 @@ dependencies:
143
141
  type: :development
144
142
  prerelease: false
145
143
  version_requirements: !ruby/object:Gem::Requirement
146
- none: false
147
144
  requirements:
148
145
  - - '='
149
146
  - !ruby/object:Gem::Version
@@ -151,7 +148,6 @@ dependencies:
151
148
  - !ruby/object:Gem::Dependency
152
149
  name: database_cleaner
153
150
  requirement: !ruby/object:Gem::Requirement
154
- none: false
155
151
  requirements:
156
152
  - - '='
157
153
  - !ruby/object:Gem::Version
@@ -159,7 +155,6 @@ dependencies:
159
155
  type: :development
160
156
  prerelease: false
161
157
  version_requirements: !ruby/object:Gem::Requirement
162
- none: false
163
158
  requirements:
164
159
  - - '='
165
160
  - !ruby/object:Gem::Version
@@ -167,7 +162,6 @@ dependencies:
167
162
  - !ruby/object:Gem::Dependency
168
163
  name: factory_girl_rails
169
164
  requirement: !ruby/object:Gem::Requirement
170
- none: false
171
165
  requirements:
172
166
  - - '='
173
167
  - !ruby/object:Gem::Version
@@ -175,31 +169,41 @@ dependencies:
175
169
  type: :development
176
170
  prerelease: false
177
171
  version_requirements: !ruby/object:Gem::Requirement
178
- none: false
179
172
  requirements:
180
173
  - - '='
181
174
  - !ruby/object:Gem::Version
182
175
  version: 3.5.0
176
+ - !ruby/object:Gem::Dependency
177
+ name: psych
178
+ requirement: !ruby/object:Gem::Requirement
179
+ requirements:
180
+ - - ~>
181
+ - !ruby/object:Gem::Version
182
+ version: 1.3.4
183
+ type: :development
184
+ prerelease: false
185
+ version_requirements: !ruby/object:Gem::Requirement
186
+ requirements:
187
+ - - ~>
188
+ - !ruby/object:Gem::Version
189
+ version: 1.3.4
183
190
  - !ruby/object:Gem::Dependency
184
191
  name: rspec-rails
185
192
  requirement: !ruby/object:Gem::Requirement
186
- none: false
187
193
  requirements:
188
194
  - - '='
189
195
  - !ruby/object:Gem::Version
190
- version: 2.11.0
196
+ version: 2.12.2
191
197
  type: :development
192
198
  prerelease: false
193
199
  version_requirements: !ruby/object:Gem::Requirement
194
- none: false
195
200
  requirements:
196
201
  - - '='
197
202
  - !ruby/object:Gem::Version
198
- version: 2.11.0
203
+ version: 2.12.2
199
204
  - !ruby/object:Gem::Dependency
200
205
  name: shoulda-matchers
201
206
  requirement: !ruby/object:Gem::Requirement
202
- none: false
203
207
  requirements:
204
208
  - - '='
205
209
  - !ruby/object:Gem::Version
@@ -207,7 +211,6 @@ dependencies:
207
211
  type: :development
208
212
  prerelease: false
209
213
  version_requirements: !ruby/object:Gem::Requirement
210
- none: false
211
214
  requirements:
212
215
  - - '='
213
216
  - !ruby/object:Gem::Version
@@ -215,7 +218,6 @@ dependencies:
215
218
  - !ruby/object:Gem::Dependency
216
219
  name: sqlite3
217
220
  requirement: !ruby/object:Gem::Requirement
218
- none: false
219
221
  requirements:
220
222
  - - '='
221
223
  - !ruby/object:Gem::Version
@@ -223,7 +225,6 @@ dependencies:
223
225
  type: :development
224
226
  prerelease: false
225
227
  version_requirements: !ruby/object:Gem::Requirement
226
- none: false
227
228
  requirements:
228
229
  - - '='
229
230
  - !ruby/object:Gem::Version
@@ -231,7 +232,6 @@ dependencies:
231
232
  - !ruby/object:Gem::Dependency
232
233
  name: timecop
233
234
  requirement: !ruby/object:Gem::Requirement
234
- none: false
235
235
  requirements:
236
236
  - - '='
237
237
  - !ruby/object:Gem::Version
@@ -239,7 +239,6 @@ dependencies:
239
239
  type: :development
240
240
  prerelease: false
241
241
  version_requirements: !ruby/object:Gem::Requirement
242
- none: false
243
242
  requirements:
244
243
  - - '='
245
244
  - !ruby/object:Gem::Version
@@ -289,18 +288,23 @@ files:
289
288
  - features/step_definitions/gem_file_steps.rb
290
289
  - features/support/aruba.rb
291
290
  - features/support/env.rb
292
- - gemfiles/3.0.17.gemfile
293
- - gemfiles/3.0.17.gemfile.lock
294
- - gemfiles/3.1.8.gemfile
295
- - gemfiles/3.1.8.gemfile.lock
296
- - gemfiles/3.2.8.gemfile
297
- - gemfiles/3.2.8.gemfile.lock
291
+ - gemfiles/3.0.20.gemfile
292
+ - gemfiles/3.0.20.gemfile.lock
293
+ - gemfiles/3.1.11.gemfile
294
+ - gemfiles/3.1.11.gemfile.lock
295
+ - gemfiles/3.2.12.gemfile
296
+ - gemfiles/3.2.12.gemfile.lock
297
+ - gemfiles/3.2.13.rc2.gemfile
298
+ - gemfiles/3.2.13.rc2.gemfile.lock
298
299
  - lib/clearance.rb
299
300
  - lib/clearance/authentication.rb
301
+ - lib/clearance/authorization.rb
302
+ - lib/clearance/back_door.rb
300
303
  - lib/clearance/configuration.rb
301
304
  - lib/clearance/constraints.rb
302
305
  - lib/clearance/constraints/signed_in.rb
303
306
  - lib/clearance/constraints/signed_out.rb
307
+ - lib/clearance/controller.rb
304
308
  - lib/clearance/engine.rb
305
309
  - lib/clearance/password_strategies.rb
306
310
  - lib/clearance/password_strategies/bcrypt.rb
@@ -342,6 +346,7 @@ files:
342
346
  - lib/generators/clearance/specs/templates/support/integration/clearance_helpers.rb
343
347
  - lib/generators/clearance/views/USAGE
344
348
  - lib/generators/clearance/views/views_generator.rb
349
+ - spec/clearance/back_door_spec.rb
345
350
  - spec/clearance/constraints/signed_in_spec.rb
346
351
  - spec/clearance/constraints/signed_out_spec.rb
347
352
  - spec/clearance/rack_session_spec.rb
@@ -364,31 +369,31 @@ files:
364
369
  - spec/spec_helper.rb
365
370
  - spec/support/clearance.rb
366
371
  - spec/support/cookies.rb
372
+ - spec/support/fake_model_with_password_strategy.rb
367
373
  - spec/support/request_with_remember_token.rb
368
374
  homepage: http://github.com/thoughtbot/clearance
369
375
  licenses: []
376
+ metadata: {}
370
377
  post_install_message:
371
378
  rdoc_options:
372
379
  - --charset=UTF-8
373
380
  require_paths:
374
381
  - lib
375
382
  required_ruby_version: !ruby/object:Gem::Requirement
376
- none: false
377
383
  requirements:
378
384
  - - ! '>='
379
385
  - !ruby/object:Gem::Version
380
386
  version: 1.9.2
381
387
  required_rubygems_version: !ruby/object:Gem::Requirement
382
- none: false
383
388
  requirements:
384
389
  - - ! '>'
385
390
  - !ruby/object:Gem::Version
386
391
  version: 1.3.1
387
392
  requirements: []
388
393
  rubyforge_project:
389
- rubygems_version: 1.8.23
394
+ rubygems_version: 2.0.0
390
395
  signing_key:
391
- specification_version: 3
396
+ specification_version: 4
392
397
  summary: Rails authentication & authorization with email & password.
393
398
  test_files:
394
399
  - features/add_migrations_to_project.feature
@@ -398,6 +403,7 @@ test_files:
398
403
  - features/step_definitions/gem_file_steps.rb
399
404
  - features/support/aruba.rb
400
405
  - features/support/env.rb
406
+ - spec/clearance/back_door_spec.rb
401
407
  - spec/clearance/constraints/signed_in_spec.rb
402
408
  - spec/clearance/constraints/signed_out_spec.rb
403
409
  - spec/clearance/rack_session_spec.rb
@@ -420,4 +426,5 @@ test_files:
420
426
  - spec/spec_helper.rb
421
427
  - spec/support/clearance.rb
422
428
  - spec/support/cookies.rb
429
+ - spec/support/fake_model_with_password_strategy.rb
423
430
  - spec/support/request_with_remember_token.rb