clearance 0.16.3 → 1.0.0.rc1
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.
- data/.gitignore +1 -0
- data/.travis.yml +0 -2
- data/Appraisals +2 -2
- data/CONTRIBUTING.md +10 -19
- data/Gemfile +1 -1
- data/Gemfile.lock +81 -82
- data/NEWS.md +17 -4
- data/README.md +176 -113
- data/app/controllers/clearance/passwords_controller.rb +44 -31
- data/app/controllers/clearance/sessions_controller.rb +11 -10
- data/app/controllers/clearance/users_controller.rb +8 -12
- data/app/mailers/clearance_mailer.rb +4 -5
- data/app/views/clearance_mailer/change_password.html.erb +2 -4
- data/app/views/layouts/application.html.erb +7 -5
- data/app/views/passwords/edit.html.erb +8 -7
- data/app/views/passwords/new.html.erb +6 -5
- data/app/views/sessions/_form.html.erb +7 -5
- data/app/views/sessions/new.html.erb +3 -2
- data/app/views/users/_form.html.erb +4 -3
- data/clearance.gemspec +29 -27
- data/config/routes.rb +10 -13
- data/db/migrate/20110111224543_create_clearance_users.rb +18 -0
- data/db/schema.rb +4 -5
- data/features/engine/visitor_resets_password.feature +0 -7
- data/features/engine/visitor_signs_in.feature +7 -0
- data/features/engine/visitor_signs_up.feature +2 -2
- data/features/integration.feature +0 -1
- data/features/integration_with_test_unit.feature +43 -0
- data/features/step_definitions/configuration_steps.rb +8 -15
- data/features/step_definitions/engine/clearance_steps.rb +38 -38
- data/features/support/clearance.rb +1 -1
- data/features/support/env.rb +4 -21
- data/gemfiles/{3.0.12.gemfile → 3.0.15.gemfile} +1 -1
- data/gemfiles/{3.0.12.gemfile.lock → 3.0.15.gemfile.lock} +75 -76
- data/gemfiles/{3.2.3.gemfile → 3.1.6.gemfile} +1 -1
- data/gemfiles/{3.1.4.gemfile.lock → 3.1.6.gemfile.lock} +79 -80
- data/gemfiles/{3.1.4.gemfile → 3.2.6.gemfile} +1 -1
- data/gemfiles/{3.2.3.gemfile.lock → 3.2.6.gemfile.lock} +80 -81
- data/lib/clearance.rb +1 -0
- data/lib/clearance/authentication.rb +37 -69
- data/lib/clearance/configuration.rb +3 -18
- data/lib/clearance/constraints.rb +2 -0
- data/lib/clearance/constraints/signed_in.rb +28 -0
- data/lib/clearance/constraints/signed_out.rb +9 -0
- data/lib/clearance/engine.rb +4 -4
- data/lib/clearance/password_strategies.rb +5 -1
- data/lib/clearance/password_strategies/bcrypt.rb +27 -0
- data/lib/clearance/password_strategies/bcrypt_migration_from_sha1.rb +52 -0
- data/lib/clearance/password_strategies/blowfish.rb +11 -15
- data/lib/clearance/password_strategies/fake.rb +23 -0
- data/lib/clearance/password_strategies/sha1.rb +15 -21
- data/lib/clearance/session.rb +28 -20
- data/lib/clearance/testing.rb +8 -3
- data/lib/clearance/testing/assertion_error.rb +2 -7
- data/lib/clearance/testing/deny_access_matcher.rb +27 -32
- data/lib/clearance/testing/helpers.rb +7 -8
- data/lib/clearance/user.rb +26 -92
- data/lib/clearance/version.rb +1 -1
- data/lib/generators/clearance/install/templates/db/migrate/upgrade_clearance_to_diesel.rb +24 -26
- data/spec/clearance/constraints/signed_in_spec.rb +51 -0
- data/spec/clearance/constraints/signed_out_spec.rb +15 -0
- data/spec/clearance/rack_session_spec.rb +8 -7
- data/spec/clearance/session_spec.rb +28 -27
- data/spec/configuration_spec.rb +7 -6
- data/spec/controllers/denies_controller_spec.rb +11 -10
- data/spec/controllers/flashes_controller_spec.rb +5 -5
- data/spec/controllers/forgeries_controller_spec.rb +9 -9
- data/spec/controllers/passwords_controller_spec.rb +42 -55
- data/spec/controllers/sessions_controller_spec.rb +26 -33
- data/spec/controllers/users_controller_spec.rb +16 -14
- data/spec/factories.rb +1 -3
- data/spec/mailers/clearance_mailer_spec.rb +4 -4
- data/spec/models/bcrypt_migration_from_sha1_spec.rb +71 -0
- data/spec/models/bcrypt_spec.rb +40 -0
- data/spec/models/blowfish_spec.rb +14 -13
- data/spec/models/{clearance_user_spec.rb → password_strategies_spec.rb} +5 -5
- data/spec/models/sha1_spec.rb +18 -13
- data/spec/models/user_spec.rb +58 -73
- data/spec/spec_helper.rb +5 -6
- data/spec/support/clearance.rb +0 -4
- data/spec/support/cookies.rb +25 -27
- data/spec/support/request_with_remember_token.rb +19 -0
- metadata +95 -90
- data/db/migrate/20110111224543_create_diesel_clearance_users.rb +0 -19
- data/init.rb +0 -1
metadata
CHANGED
@@ -1,8 +1,8 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: clearance
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
5
|
-
prerelease:
|
4
|
+
version: 1.0.0.rc1
|
5
|
+
prerelease: 6
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
8
8
|
- Dan Croak
|
@@ -18,173 +18,173 @@ authors:
|
|
18
18
|
autorequire:
|
19
19
|
bindir: bin
|
20
20
|
cert_chain: []
|
21
|
-
date: 2012-
|
21
|
+
date: 2012-07-23 00:00:00.000000000Z
|
22
22
|
dependencies:
|
23
23
|
- !ruby/object:Gem::Dependency
|
24
|
-
name:
|
25
|
-
requirement: &
|
24
|
+
name: bcrypt-ruby
|
25
|
+
requirement: &17307160 !ruby/object:Gem::Requirement
|
26
26
|
none: false
|
27
27
|
requirements:
|
28
28
|
- - ! '>='
|
29
29
|
- !ruby/object:Gem::Version
|
30
|
-
version: '
|
30
|
+
version: '0'
|
31
31
|
type: :runtime
|
32
32
|
prerelease: false
|
33
|
-
version_requirements: *
|
33
|
+
version_requirements: *17307160
|
34
34
|
- !ruby/object:Gem::Dependency
|
35
35
|
name: diesel
|
36
|
-
requirement: &
|
36
|
+
requirement: &17306160 !ruby/object:Gem::Requirement
|
37
37
|
none: false
|
38
38
|
requirements:
|
39
|
-
- -
|
39
|
+
- - =
|
40
40
|
- !ruby/object:Gem::Version
|
41
41
|
version: 0.1.5
|
42
42
|
type: :runtime
|
43
43
|
prerelease: false
|
44
|
-
version_requirements: *
|
44
|
+
version_requirements: *17306160
|
45
45
|
- !ruby/object:Gem::Dependency
|
46
|
-
name:
|
47
|
-
requirement: &
|
46
|
+
name: rails
|
47
|
+
requirement: &17299600 !ruby/object:Gem::Requirement
|
48
48
|
none: false
|
49
49
|
requirements:
|
50
|
-
- -
|
50
|
+
- - ! '>='
|
51
51
|
- !ruby/object:Gem::Version
|
52
|
-
version:
|
53
|
-
type: :
|
52
|
+
version: '3.0'
|
53
|
+
type: :runtime
|
54
54
|
prerelease: false
|
55
|
-
version_requirements: *
|
55
|
+
version_requirements: *17299600
|
56
56
|
- !ruby/object:Gem::Dependency
|
57
57
|
name: appraisal
|
58
|
-
requirement: &
|
58
|
+
requirement: &17296840 !ruby/object:Gem::Requirement
|
59
59
|
none: false
|
60
60
|
requirements:
|
61
|
-
- -
|
61
|
+
- - =
|
62
62
|
- !ruby/object:Gem::Version
|
63
63
|
version: 0.4.1
|
64
64
|
type: :development
|
65
65
|
prerelease: false
|
66
|
-
version_requirements: *
|
66
|
+
version_requirements: *17296840
|
67
67
|
- !ruby/object:Gem::Dependency
|
68
|
-
name:
|
69
|
-
requirement: &
|
68
|
+
name: aruba
|
69
|
+
requirement: &17295840 !ruby/object:Gem::Requirement
|
70
70
|
none: false
|
71
71
|
requirements:
|
72
|
-
- -
|
72
|
+
- - =
|
73
73
|
- !ruby/object:Gem::Version
|
74
|
-
version:
|
74
|
+
version: 0.4.11
|
75
75
|
type: :development
|
76
76
|
prerelease: false
|
77
|
-
version_requirements: *
|
77
|
+
version_requirements: *17295840
|
78
78
|
- !ruby/object:Gem::Dependency
|
79
|
-
name:
|
80
|
-
requirement: &
|
79
|
+
name: bourne
|
80
|
+
requirement: &17294500 !ruby/object:Gem::Requirement
|
81
81
|
none: false
|
82
82
|
requirements:
|
83
|
-
- -
|
83
|
+
- - =
|
84
84
|
- !ruby/object:Gem::Version
|
85
|
-
version:
|
85
|
+
version: 1.1.2
|
86
86
|
type: :development
|
87
87
|
prerelease: false
|
88
|
-
version_requirements: *
|
88
|
+
version_requirements: *17294500
|
89
89
|
- !ruby/object:Gem::Dependency
|
90
|
-
name:
|
91
|
-
requirement: &
|
90
|
+
name: bundler
|
91
|
+
requirement: &17293220 !ruby/object:Gem::Requirement
|
92
92
|
none: false
|
93
93
|
requirements:
|
94
|
-
- -
|
94
|
+
- - =
|
95
95
|
- !ruby/object:Gem::Version
|
96
|
-
version:
|
96
|
+
version: 1.1.3
|
97
97
|
type: :development
|
98
98
|
prerelease: false
|
99
|
-
version_requirements: *
|
99
|
+
version_requirements: *17293220
|
100
100
|
- !ruby/object:Gem::Dependency
|
101
|
-
name:
|
102
|
-
requirement: &
|
101
|
+
name: capybara
|
102
|
+
requirement: &17292640 !ruby/object:Gem::Requirement
|
103
103
|
none: false
|
104
104
|
requirements:
|
105
|
-
- -
|
105
|
+
- - =
|
106
106
|
- !ruby/object:Gem::Version
|
107
107
|
version: 1.1.2
|
108
108
|
type: :development
|
109
109
|
prerelease: false
|
110
|
-
version_requirements: *
|
110
|
+
version_requirements: *17292640
|
111
111
|
- !ruby/object:Gem::Dependency
|
112
|
-
name:
|
113
|
-
requirement: &
|
112
|
+
name: cucumber-rails
|
113
|
+
requirement: &17291720 !ruby/object:Gem::Requirement
|
114
114
|
none: false
|
115
115
|
requirements:
|
116
|
-
- -
|
116
|
+
- - =
|
117
117
|
- !ruby/object:Gem::Version
|
118
|
-
version:
|
118
|
+
version: 1.1.1
|
119
119
|
type: :development
|
120
120
|
prerelease: false
|
121
|
-
version_requirements: *
|
121
|
+
version_requirements: *17291720
|
122
122
|
- !ruby/object:Gem::Dependency
|
123
|
-
name:
|
124
|
-
requirement: &
|
123
|
+
name: database_cleaner
|
124
|
+
requirement: &17291020 !ruby/object:Gem::Requirement
|
125
125
|
none: false
|
126
126
|
requirements:
|
127
|
-
- -
|
127
|
+
- - =
|
128
128
|
- !ruby/object:Gem::Version
|
129
|
-
version:
|
129
|
+
version: 0.8.0
|
130
130
|
type: :development
|
131
131
|
prerelease: false
|
132
|
-
version_requirements: *
|
132
|
+
version_requirements: *17291020
|
133
133
|
- !ruby/object:Gem::Dependency
|
134
134
|
name: factory_girl_rails
|
135
|
-
requirement: &
|
135
|
+
requirement: &17290420 !ruby/object:Gem::Requirement
|
136
136
|
none: false
|
137
137
|
requirements:
|
138
|
-
- -
|
138
|
+
- - =
|
139
139
|
- !ruby/object:Gem::Version
|
140
|
-
version: 3.
|
140
|
+
version: 3.5.0
|
141
141
|
type: :development
|
142
142
|
prerelease: false
|
143
|
-
version_requirements: *
|
143
|
+
version_requirements: *17290420
|
144
144
|
- !ruby/object:Gem::Dependency
|
145
|
-
name:
|
146
|
-
requirement: &
|
145
|
+
name: rspec-rails
|
146
|
+
requirement: &17289660 !ruby/object:Gem::Requirement
|
147
147
|
none: false
|
148
148
|
requirements:
|
149
|
-
- -
|
149
|
+
- - =
|
150
150
|
- !ruby/object:Gem::Version
|
151
|
-
version:
|
151
|
+
version: 2.11.0
|
152
152
|
type: :development
|
153
153
|
prerelease: false
|
154
|
-
version_requirements: *
|
154
|
+
version_requirements: *17289660
|
155
155
|
- !ruby/object:Gem::Dependency
|
156
|
-
name:
|
157
|
-
requirement: &
|
156
|
+
name: shoulda-matchers
|
157
|
+
requirement: &17289100 !ruby/object:Gem::Requirement
|
158
158
|
none: false
|
159
159
|
requirements:
|
160
|
-
- -
|
160
|
+
- - =
|
161
161
|
- !ruby/object:Gem::Version
|
162
|
-
version:
|
162
|
+
version: 1.2.0
|
163
163
|
type: :development
|
164
164
|
prerelease: false
|
165
|
-
version_requirements: *
|
165
|
+
version_requirements: *17289100
|
166
166
|
- !ruby/object:Gem::Dependency
|
167
|
-
name:
|
168
|
-
requirement: &
|
167
|
+
name: sqlite3
|
168
|
+
requirement: &17288340 !ruby/object:Gem::Requirement
|
169
169
|
none: false
|
170
170
|
requirements:
|
171
|
-
- -
|
171
|
+
- - =
|
172
172
|
- !ruby/object:Gem::Version
|
173
|
-
version:
|
173
|
+
version: 1.3.6
|
174
174
|
type: :development
|
175
175
|
prerelease: false
|
176
|
-
version_requirements: *
|
176
|
+
version_requirements: *17288340
|
177
177
|
- !ruby/object:Gem::Dependency
|
178
|
-
name:
|
179
|
-
requirement: &
|
178
|
+
name: timecop
|
179
|
+
requirement: &17286940 !ruby/object:Gem::Requirement
|
180
180
|
none: false
|
181
181
|
requirements:
|
182
|
-
- -
|
182
|
+
- - =
|
183
183
|
- !ruby/object:Gem::Version
|
184
|
-
version: 0.
|
184
|
+
version: 0.3.5
|
185
185
|
type: :development
|
186
186
|
prerelease: false
|
187
|
-
version_requirements: *
|
187
|
+
version_requirements: *17286940
|
188
188
|
description: Rails authentication & authorization with email & password.
|
189
189
|
email: support@thoughtbot.com
|
190
190
|
executables: []
|
@@ -220,31 +220,37 @@ files:
|
|
220
220
|
- clearance.gemspec
|
221
221
|
- config/routes.rb
|
222
222
|
- cucumber.yml
|
223
|
-
- db/migrate/
|
223
|
+
- db/migrate/20110111224543_create_clearance_users.rb
|
224
224
|
- db/schema.rb
|
225
225
|
- features/engine/visitor_resets_password.feature
|
226
226
|
- features/engine/visitor_signs_in.feature
|
227
227
|
- features/engine/visitor_signs_out.feature
|
228
228
|
- features/engine/visitor_signs_up.feature
|
229
229
|
- features/integration.feature
|
230
|
+
- features/integration_with_test_unit.feature
|
230
231
|
- features/step_definitions/configuration_steps.rb
|
231
232
|
- features/step_definitions/engine/clearance_steps.rb
|
232
233
|
- features/support/aruba.rb
|
233
234
|
- features/support/clearance.rb
|
234
235
|
- features/support/env.rb
|
235
|
-
- gemfiles/3.0.
|
236
|
-
- gemfiles/3.0.
|
237
|
-
- gemfiles/3.1.
|
238
|
-
- gemfiles/3.1.
|
239
|
-
- gemfiles/3.2.
|
240
|
-
- gemfiles/3.2.
|
241
|
-
- init.rb
|
236
|
+
- gemfiles/3.0.15.gemfile
|
237
|
+
- gemfiles/3.0.15.gemfile.lock
|
238
|
+
- gemfiles/3.1.6.gemfile
|
239
|
+
- gemfiles/3.1.6.gemfile.lock
|
240
|
+
- gemfiles/3.2.6.gemfile
|
241
|
+
- gemfiles/3.2.6.gemfile.lock
|
242
242
|
- lib/clearance.rb
|
243
243
|
- lib/clearance/authentication.rb
|
244
244
|
- lib/clearance/configuration.rb
|
245
|
+
- lib/clearance/constraints.rb
|
246
|
+
- lib/clearance/constraints/signed_in.rb
|
247
|
+
- lib/clearance/constraints/signed_out.rb
|
245
248
|
- lib/clearance/engine.rb
|
246
249
|
- lib/clearance/password_strategies.rb
|
250
|
+
- lib/clearance/password_strategies/bcrypt.rb
|
251
|
+
- lib/clearance/password_strategies/bcrypt_migration_from_sha1.rb
|
247
252
|
- lib/clearance/password_strategies/blowfish.rb
|
253
|
+
- lib/clearance/password_strategies/fake.rb
|
248
254
|
- lib/clearance/password_strategies/sha1.rb
|
249
255
|
- lib/clearance/rack_session.rb
|
250
256
|
- lib/clearance/session.rb
|
@@ -261,6 +267,8 @@ files:
|
|
261
267
|
- lib/generators/clearance/install/templates/db/migrate/upgrade_clearance_to_diesel.rb
|
262
268
|
- lib/generators/clearance/install/templates/user.rb
|
263
269
|
- lib/generators/clearance/views/views_generator.rb
|
270
|
+
- spec/clearance/constraints/signed_in_spec.rb
|
271
|
+
- spec/clearance/constraints/signed_out_spec.rb
|
264
272
|
- spec/clearance/rack_session_spec.rb
|
265
273
|
- spec/clearance/session_spec.rb
|
266
274
|
- spec/configuration_spec.rb
|
@@ -272,13 +280,16 @@ files:
|
|
272
280
|
- spec/controllers/users_controller_spec.rb
|
273
281
|
- spec/factories.rb
|
274
282
|
- spec/mailers/clearance_mailer_spec.rb
|
283
|
+
- spec/models/bcrypt_migration_from_sha1_spec.rb
|
284
|
+
- spec/models/bcrypt_spec.rb
|
275
285
|
- spec/models/blowfish_spec.rb
|
276
|
-
- spec/models/
|
286
|
+
- spec/models/password_strategies_spec.rb
|
277
287
|
- spec/models/sha1_spec.rb
|
278
288
|
- spec/models/user_spec.rb
|
279
289
|
- spec/spec_helper.rb
|
280
290
|
- spec/support/clearance.rb
|
281
291
|
- spec/support/cookies.rb
|
292
|
+
- spec/support/request_with_remember_token.rb
|
282
293
|
homepage: http://github.com/thoughtbot/clearance
|
283
294
|
licenses: []
|
284
295
|
post_install_message:
|
@@ -291,19 +302,13 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
291
302
|
requirements:
|
292
303
|
- - ! '>='
|
293
304
|
- !ruby/object:Gem::Version
|
294
|
-
version:
|
295
|
-
segments:
|
296
|
-
- 0
|
297
|
-
hash: 1832581337987577676
|
305
|
+
version: 1.9.2
|
298
306
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
299
307
|
none: false
|
300
308
|
requirements:
|
301
|
-
- - ! '
|
309
|
+
- - ! '>'
|
302
310
|
- !ruby/object:Gem::Version
|
303
|
-
version:
|
304
|
-
segments:
|
305
|
-
- 0
|
306
|
-
hash: 1832581337987577676
|
311
|
+
version: 1.3.1
|
307
312
|
requirements: []
|
308
313
|
rubyforge_project:
|
309
314
|
rubygems_version: 1.8.10
|
@@ -1,19 +0,0 @@
|
|
1
|
-
class CreateDieselClearanceUsers < ActiveRecord::Migration
|
2
|
-
def self.up
|
3
|
-
create_table(:users) do |t|
|
4
|
-
t.string :email
|
5
|
-
t.string :encrypted_password, :limit => 128
|
6
|
-
t.string :salt, :limit => 128
|
7
|
-
t.string :confirmation_token, :limit => 128
|
8
|
-
t.string :remember_token, :limit => 128
|
9
|
-
t.timestamps
|
10
|
-
end
|
11
|
-
|
12
|
-
add_index :users, :email
|
13
|
-
add_index :users, :remember_token
|
14
|
-
end
|
15
|
-
|
16
|
-
def self.down
|
17
|
-
drop_table :users
|
18
|
-
end
|
19
|
-
end
|
data/init.rb
DELETED
@@ -1 +0,0 @@
|
|
1
|
-
require 'clearance'
|