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
@@ -2,6 +2,6 @@
2
2
 
3
3
  source "http://rubygems.org"
4
4
 
5
- gem "rails", "3.2.8"
5
+ gem "rails", "3.1.11"
6
6
 
7
7
  gemspec :path=>"../"
@@ -1,19 +1,20 @@
1
1
  PATH
2
- remote: /Users/harlow/Sites/clearance
2
+ remote: ../
3
3
  specs:
4
- clearance (1.0.0.rc3)
4
+ clearance (1.0.0.rc5)
5
5
  bcrypt-ruby
6
+ email_validator
6
7
  rails (>= 3.0)
7
8
 
8
9
  GEM
9
10
  remote: http://rubygems.org/
10
11
  specs:
11
- actionmailer (3.1.8)
12
- actionpack (= 3.1.8)
12
+ actionmailer (3.1.11)
13
+ actionpack (= 3.1.11)
13
14
  mail (~> 2.3.3)
14
- actionpack (3.1.8)
15
- activemodel (= 3.1.8)
16
- activesupport (= 3.1.8)
15
+ actionpack (3.1.11)
16
+ activemodel (= 3.1.11)
17
+ activesupport (= 3.1.11)
17
18
  builder (~> 3.0.0)
18
19
  erubis (~> 2.7.0)
19
20
  i18n (~> 0.6)
@@ -22,21 +23,20 @@ GEM
22
23
  rack-mount (~> 0.8.2)
23
24
  rack-test (~> 0.6.1)
24
25
  sprockets (~> 2.0.4)
25
- activemodel (3.1.8)
26
- activesupport (= 3.1.8)
26
+ activemodel (3.1.11)
27
+ activesupport (= 3.1.11)
27
28
  builder (~> 3.0.0)
28
29
  i18n (~> 0.6)
29
- activerecord (3.1.8)
30
- activemodel (= 3.1.8)
31
- activesupport (= 3.1.8)
30
+ activerecord (3.1.11)
31
+ activemodel (= 3.1.11)
32
+ activesupport (= 3.1.11)
32
33
  arel (~> 2.2.3)
33
34
  tzinfo (~> 0.3.29)
34
- activeresource (3.1.8)
35
- activemodel (= 3.1.8)
36
- activesupport (= 3.1.8)
37
- activesupport (3.1.8)
38
- multi_json (>= 1.0, < 1.3)
39
- addressable (2.3.2)
35
+ activeresource (3.1.11)
36
+ activemodel (= 3.1.11)
37
+ activesupport (= 3.1.11)
38
+ activesupport (3.1.11)
39
+ multi_json (~> 1.0)
40
40
  appraisal (0.4.1)
41
41
  bundler
42
42
  rake
@@ -47,9 +47,9 @@ GEM
47
47
  ffi (>= 1.0.11)
48
48
  rspec (>= 2.7.0)
49
49
  bcrypt-ruby (3.0.1)
50
- bourne (1.1.2)
51
- mocha (= 0.10.5)
52
- builder (3.0.3)
50
+ bourne (1.3.0)
51
+ mocha (= 0.13.0)
52
+ builder (3.0.4)
53
53
  capybara (1.1.2)
54
54
  mime-types (>= 1.16)
55
55
  nokogiri (>= 1.3.3)
@@ -57,8 +57,8 @@ GEM
57
57
  rack-test (>= 0.5.4)
58
58
  selenium-webdriver (~> 2.0)
59
59
  xpath (~> 0.1.4)
60
- childprocess (0.3.5)
61
- ffi (~> 1.0, >= 1.0.6)
60
+ childprocess (0.3.8)
61
+ ffi (~> 1.0, >= 1.0.11)
62
62
  cucumber (1.2.1)
63
63
  builder (>= 2.1.2)
64
64
  diff-lcs (>= 1.1.3)
@@ -70,77 +70,80 @@ GEM
70
70
  nokogiri (>= 1.5.0)
71
71
  database_cleaner (0.8.0)
72
72
  diff-lcs (1.1.3)
73
+ email_validator (1.3.0)
74
+ activemodel
73
75
  erubis (2.7.0)
74
76
  factory_girl (3.5.0)
75
77
  activesupport (>= 3.0.0)
76
78
  factory_girl_rails (3.5.0)
77
79
  factory_girl (~> 3.5.0)
78
80
  railties (>= 3.0.0)
79
- ffi (1.1.5)
80
- gherkin (2.11.2)
81
- json (>= 1.4.6)
81
+ ffi (1.3.1)
82
+ gherkin (2.11.6)
83
+ json (>= 1.7.6)
82
84
  hike (1.2.1)
83
85
  i18n (0.6.1)
84
- json (1.7.5)
85
- libwebsocket (0.1.5)
86
- addressable
86
+ json (1.7.7)
87
87
  mail (2.3.3)
88
88
  i18n (>= 0.4.0)
89
89
  mime-types (~> 1.16)
90
90
  treetop (~> 1.4.8)
91
91
  metaclass (0.0.1)
92
- mime-types (1.19)
93
- mocha (0.10.5)
92
+ mime-types (1.21)
93
+ mocha (0.13.0)
94
94
  metaclass (~> 0.0.1)
95
- multi_json (1.2.0)
96
- nokogiri (1.5.5)
95
+ multi_json (1.6.0)
96
+ nokogiri (1.5.6)
97
97
  polyglot (0.3.3)
98
- rack (1.3.6)
98
+ psych (1.3.4)
99
+ rack (1.3.10)
99
100
  rack-cache (1.2)
100
101
  rack (>= 0.4)
101
102
  rack-mount (0.8.3)
102
103
  rack (>= 1.0.0)
103
- rack-ssl (1.3.2)
104
+ rack-ssl (1.3.3)
104
105
  rack
105
- rack-test (0.6.1)
106
+ rack-test (0.6.2)
106
107
  rack (>= 1.0)
107
- rails (3.1.8)
108
- actionmailer (= 3.1.8)
109
- actionpack (= 3.1.8)
110
- activerecord (= 3.1.8)
111
- activeresource (= 3.1.8)
112
- activesupport (= 3.1.8)
108
+ rails (3.1.11)
109
+ actionmailer (= 3.1.11)
110
+ actionpack (= 3.1.11)
111
+ activerecord (= 3.1.11)
112
+ activeresource (= 3.1.11)
113
+ activesupport (= 3.1.11)
113
114
  bundler (~> 1.0)
114
- railties (= 3.1.8)
115
- railties (3.1.8)
116
- actionpack (= 3.1.8)
117
- activesupport (= 3.1.8)
115
+ railties (= 3.1.11)
116
+ railties (3.1.11)
117
+ actionpack (= 3.1.11)
118
+ activesupport (= 3.1.11)
118
119
  rack-ssl (~> 1.3.2)
119
120
  rake (>= 0.8.7)
120
121
  rdoc (~> 3.4)
121
122
  thor (~> 0.14.6)
122
- rake (0.9.2.2)
123
- rdoc (3.12)
123
+ rake (10.0.3)
124
+ rdoc (3.12.1)
124
125
  json (~> 1.4)
125
- rspec (2.11.0)
126
- rspec-core (~> 2.11.0)
127
- rspec-expectations (~> 2.11.0)
128
- rspec-mocks (~> 2.11.0)
129
- rspec-core (2.11.1)
130
- rspec-expectations (2.11.3)
126
+ rspec (2.12.0)
127
+ rspec-core (~> 2.12.0)
128
+ rspec-expectations (~> 2.12.0)
129
+ rspec-mocks (~> 2.12.0)
130
+ rspec-core (2.12.2)
131
+ rspec-expectations (2.12.1)
131
132
  diff-lcs (~> 1.1.3)
132
- rspec-mocks (2.11.2)
133
- rspec-rails (2.11.0)
133
+ rspec-mocks (2.12.2)
134
+ rspec-rails (2.12.2)
134
135
  actionpack (>= 3.0)
135
136
  activesupport (>= 3.0)
136
137
  railties (>= 3.0)
137
- rspec (~> 2.11.0)
138
+ rspec-core (~> 2.12.0)
139
+ rspec-expectations (~> 2.12.0)
140
+ rspec-mocks (~> 2.12.0)
138
141
  rubyzip (0.9.9)
139
- selenium-webdriver (2.25.0)
142
+ selenium-webdriver (2.29.0)
140
143
  childprocess (>= 0.2.5)
141
- libwebsocket (~> 0.1.3)
142
144
  multi_json (~> 1.0)
143
145
  rubyzip
146
+ websocket (~> 1.0.4)
144
147
  shoulda-matchers (1.2.0)
145
148
  activesupport (>= 3.0.0)
146
149
  sprockets (2.0.4)
@@ -151,10 +154,11 @@ GEM
151
154
  thor (0.14.6)
152
155
  tilt (1.3.3)
153
156
  timecop (0.3.5)
154
- treetop (1.4.10)
157
+ treetop (1.4.12)
155
158
  polyglot
156
159
  polyglot (>= 0.3.1)
157
- tzinfo (0.3.33)
160
+ tzinfo (0.3.35)
161
+ websocket (1.0.7)
158
162
  xpath (0.1.4)
159
163
  nokogiri (~> 1.3)
160
164
 
@@ -164,15 +168,16 @@ PLATFORMS
164
168
  DEPENDENCIES
165
169
  appraisal (= 0.4.1)
166
170
  aruba (= 0.4.11)
167
- bourne (= 1.1.2)
168
- bundler (~> 1.2.0)
171
+ bourne (= 1.3.0)
172
+ bundler (~> 1.1)
169
173
  capybara (= 1.1.2)
170
174
  clearance!
171
175
  cucumber-rails (= 1.1.1)
172
176
  database_cleaner (= 0.8.0)
173
177
  factory_girl_rails (= 3.5.0)
174
- rails (= 3.1.8)
175
- rspec-rails (= 2.11.0)
178
+ psych (~> 1.3.4)
179
+ rails (= 3.1.11)
180
+ rspec-rails (= 2.12.2)
176
181
  shoulda-matchers (= 1.2.0)
177
182
  sqlite3 (= 1.3.6)
178
183
  timecop (= 0.3.5)
@@ -2,6 +2,6 @@
2
2
 
3
3
  source "http://rubygems.org"
4
4
 
5
- gem "rails", "3.1.8"
5
+ gem "rails", "3.2.12"
6
6
 
7
7
  gemspec :path=>"../"
@@ -1,41 +1,41 @@
1
1
  PATH
2
- remote: /Users/harlow/Sites/clearance
2
+ remote: ../
3
3
  specs:
4
- clearance (1.0.0.rc3)
4
+ clearance (1.0.0.rc5)
5
5
  bcrypt-ruby
6
+ email_validator
6
7
  rails (>= 3.0)
7
8
 
8
9
  GEM
9
10
  remote: http://rubygems.org/
10
11
  specs:
11
- actionmailer (3.2.8)
12
- actionpack (= 3.2.8)
12
+ actionmailer (3.2.12)
13
+ actionpack (= 3.2.12)
13
14
  mail (~> 2.4.4)
14
- actionpack (3.2.8)
15
- activemodel (= 3.2.8)
16
- activesupport (= 3.2.8)
15
+ actionpack (3.2.12)
16
+ activemodel (= 3.2.12)
17
+ activesupport (= 3.2.12)
17
18
  builder (~> 3.0.0)
18
19
  erubis (~> 2.7.0)
19
20
  journey (~> 1.0.4)
20
- rack (~> 1.4.0)
21
+ rack (~> 1.4.5)
21
22
  rack-cache (~> 1.2)
22
23
  rack-test (~> 0.6.1)
23
- sprockets (~> 2.1.3)
24
- activemodel (3.2.8)
25
- activesupport (= 3.2.8)
24
+ sprockets (~> 2.2.1)
25
+ activemodel (3.2.12)
26
+ activesupport (= 3.2.12)
26
27
  builder (~> 3.0.0)
27
- activerecord (3.2.8)
28
- activemodel (= 3.2.8)
29
- activesupport (= 3.2.8)
28
+ activerecord (3.2.12)
29
+ activemodel (= 3.2.12)
30
+ activesupport (= 3.2.12)
30
31
  arel (~> 3.0.2)
31
32
  tzinfo (~> 0.3.29)
32
- activeresource (3.2.8)
33
- activemodel (= 3.2.8)
34
- activesupport (= 3.2.8)
35
- activesupport (3.2.8)
33
+ activeresource (3.2.12)
34
+ activemodel (= 3.2.12)
35
+ activesupport (= 3.2.12)
36
+ activesupport (3.2.12)
36
37
  i18n (~> 0.6)
37
38
  multi_json (~> 1.0)
38
- addressable (2.3.2)
39
39
  appraisal (0.4.1)
40
40
  bundler
41
41
  rake
@@ -46,9 +46,9 @@ GEM
46
46
  ffi (>= 1.0.11)
47
47
  rspec (>= 2.7.0)
48
48
  bcrypt-ruby (3.0.1)
49
- bourne (1.1.2)
50
- mocha (= 0.10.5)
51
- builder (3.0.3)
49
+ bourne (1.3.0)
50
+ mocha (= 0.13.0)
51
+ builder (3.0.4)
52
52
  capybara (1.1.2)
53
53
  mime-types (>= 1.16)
54
54
  nokogiri (>= 1.3.3)
@@ -56,8 +56,8 @@ GEM
56
56
  rack-test (>= 0.5.4)
57
57
  selenium-webdriver (~> 2.0)
58
58
  xpath (~> 0.1.4)
59
- childprocess (0.3.5)
60
- ffi (~> 1.0, >= 1.0.6)
59
+ childprocess (0.3.8)
60
+ ffi (~> 1.0, >= 1.0.11)
61
61
  cucumber (1.2.1)
62
62
  builder (>= 2.1.2)
63
63
  diff-lcs (>= 1.1.3)
@@ -69,90 +69,95 @@ GEM
69
69
  nokogiri (>= 1.5.0)
70
70
  database_cleaner (0.8.0)
71
71
  diff-lcs (1.1.3)
72
+ email_validator (1.3.0)
73
+ activemodel
72
74
  erubis (2.7.0)
73
75
  factory_girl (3.5.0)
74
76
  activesupport (>= 3.0.0)
75
77
  factory_girl_rails (3.5.0)
76
78
  factory_girl (~> 3.5.0)
77
79
  railties (>= 3.0.0)
78
- ffi (1.1.5)
79
- gherkin (2.11.2)
80
- json (>= 1.4.6)
80
+ ffi (1.3.1)
81
+ gherkin (2.11.6)
82
+ json (>= 1.7.6)
81
83
  hike (1.2.1)
82
84
  i18n (0.6.1)
83
85
  journey (1.0.4)
84
- json (1.7.5)
85
- libwebsocket (0.1.5)
86
- addressable
86
+ json (1.7.7)
87
87
  mail (2.4.4)
88
88
  i18n (>= 0.4.0)
89
89
  mime-types (~> 1.16)
90
90
  treetop (~> 1.4.8)
91
91
  metaclass (0.0.1)
92
- mime-types (1.19)
93
- mocha (0.10.5)
92
+ mime-types (1.21)
93
+ mocha (0.13.0)
94
94
  metaclass (~> 0.0.1)
95
- multi_json (1.3.6)
96
- nokogiri (1.5.5)
95
+ multi_json (1.6.0)
96
+ nokogiri (1.5.6)
97
97
  polyglot (0.3.3)
98
- rack (1.4.1)
98
+ psych (1.3.4)
99
+ rack (1.4.5)
99
100
  rack-cache (1.2)
100
101
  rack (>= 0.4)
101
- rack-ssl (1.3.2)
102
+ rack-ssl (1.3.3)
102
103
  rack
103
- rack-test (0.6.1)
104
+ rack-test (0.6.2)
104
105
  rack (>= 1.0)
105
- rails (3.2.8)
106
- actionmailer (= 3.2.8)
107
- actionpack (= 3.2.8)
108
- activerecord (= 3.2.8)
109
- activeresource (= 3.2.8)
110
- activesupport (= 3.2.8)
106
+ rails (3.2.12)
107
+ actionmailer (= 3.2.12)
108
+ actionpack (= 3.2.12)
109
+ activerecord (= 3.2.12)
110
+ activeresource (= 3.2.12)
111
+ activesupport (= 3.2.12)
111
112
  bundler (~> 1.0)
112
- railties (= 3.2.8)
113
- railties (3.2.8)
114
- actionpack (= 3.2.8)
115
- activesupport (= 3.2.8)
113
+ railties (= 3.2.12)
114
+ railties (3.2.12)
115
+ actionpack (= 3.2.12)
116
+ activesupport (= 3.2.12)
116
117
  rack-ssl (~> 1.3.2)
117
118
  rake (>= 0.8.7)
118
119
  rdoc (~> 3.4)
119
120
  thor (>= 0.14.6, < 2.0)
120
- rake (0.9.2.2)
121
- rdoc (3.12)
121
+ rake (10.0.3)
122
+ rdoc (3.12.1)
122
123
  json (~> 1.4)
123
- rspec (2.11.0)
124
- rspec-core (~> 2.11.0)
125
- rspec-expectations (~> 2.11.0)
126
- rspec-mocks (~> 2.11.0)
127
- rspec-core (2.11.1)
128
- rspec-expectations (2.11.3)
124
+ rspec (2.12.0)
125
+ rspec-core (~> 2.12.0)
126
+ rspec-expectations (~> 2.12.0)
127
+ rspec-mocks (~> 2.12.0)
128
+ rspec-core (2.12.2)
129
+ rspec-expectations (2.12.1)
129
130
  diff-lcs (~> 1.1.3)
130
- rspec-mocks (2.11.2)
131
- rspec-rails (2.11.0)
131
+ rspec-mocks (2.12.2)
132
+ rspec-rails (2.12.2)
132
133
  actionpack (>= 3.0)
133
134
  activesupport (>= 3.0)
134
135
  railties (>= 3.0)
135
- rspec (~> 2.11.0)
136
+ rspec-core (~> 2.12.0)
137
+ rspec-expectations (~> 2.12.0)
138
+ rspec-mocks (~> 2.12.0)
136
139
  rubyzip (0.9.9)
137
- selenium-webdriver (2.25.0)
140
+ selenium-webdriver (2.29.0)
138
141
  childprocess (>= 0.2.5)
139
- libwebsocket (~> 0.1.3)
140
142
  multi_json (~> 1.0)
141
143
  rubyzip
144
+ websocket (~> 1.0.4)
142
145
  shoulda-matchers (1.2.0)
143
146
  activesupport (>= 3.0.0)
144
- sprockets (2.1.3)
147
+ sprockets (2.2.2)
145
148
  hike (~> 1.2)
149
+ multi_json (~> 1.0)
146
150
  rack (~> 1.0)
147
151
  tilt (~> 1.1, != 1.3.0)
148
152
  sqlite3 (1.3.6)
149
- thor (0.16.0)
153
+ thor (0.17.0)
150
154
  tilt (1.3.3)
151
155
  timecop (0.3.5)
152
- treetop (1.4.10)
156
+ treetop (1.4.12)
153
157
  polyglot
154
158
  polyglot (>= 0.3.1)
155
- tzinfo (0.3.33)
159
+ tzinfo (0.3.35)
160
+ websocket (1.0.7)
156
161
  xpath (0.1.4)
157
162
  nokogiri (~> 1.3)
158
163
 
@@ -162,15 +167,16 @@ PLATFORMS
162
167
  DEPENDENCIES
163
168
  appraisal (= 0.4.1)
164
169
  aruba (= 0.4.11)
165
- bourne (= 1.1.2)
166
- bundler (~> 1.2.0)
170
+ bourne (= 1.3.0)
171
+ bundler (~> 1.1)
167
172
  capybara (= 1.1.2)
168
173
  clearance!
169
174
  cucumber-rails (= 1.1.1)
170
175
  database_cleaner (= 0.8.0)
171
176
  factory_girl_rails (= 3.5.0)
172
- rails (= 3.2.8)
173
- rspec-rails (= 2.11.0)
177
+ psych (~> 1.3.4)
178
+ rails (= 3.2.12)
179
+ rspec-rails (= 2.12.2)
174
180
  shoulda-matchers (= 1.2.0)
175
181
  sqlite3 (= 1.3.6)
176
182
  timecop (= 0.3.5)