devise 4.2.0 → 4.2.1

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

Potentially problematic release.


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

Files changed (40) hide show
  1. checksums.yaml +4 -4
  2. data/.travis.yml +9 -4
  3. data/CHANGELOG.md +14 -1
  4. data/CONTRIBUTING.md +68 -28
  5. data/Gemfile.lock +69 -74
  6. data/README.md +10 -6
  7. data/app/controllers/devise/registrations_controller.rb +1 -0
  8. data/app/mailers/devise/mailer.rb +4 -0
  9. data/app/views/devise/mailer/email_changed.html.erb +7 -0
  10. data/config/locales/en.yml +2 -0
  11. data/gemfiles/Gemfile.rails-4.1-stable.lock +65 -68
  12. data/gemfiles/Gemfile.rails-4.2-stable.lock +65 -70
  13. data/lib/devise.rb +5 -1
  14. data/lib/devise/controllers/store_location.rb +1 -1
  15. data/lib/devise/failure_app.rb +12 -12
  16. data/lib/devise/hooks/lockable.rb +4 -1
  17. data/lib/devise/mailers/helpers.rb +4 -3
  18. data/lib/devise/models.rb +1 -1
  19. data/lib/devise/models/confirmable.rb +14 -2
  20. data/lib/devise/models/database_authenticatable.rb +16 -1
  21. data/lib/devise/models/recoverable.rb +8 -4
  22. data/lib/devise/models/rememberable.rb +1 -1
  23. data/lib/devise/rails/routes.rb +1 -1
  24. data/lib/devise/test/controller_helpers.rb +1 -1
  25. data/lib/devise/test_helpers.rb +1 -1
  26. data/lib/devise/version.rb +1 -1
  27. data/lib/generators/templates/controllers/registrations_controller.rb +2 -2
  28. data/lib/generators/templates/controllers/sessions_controller.rb +1 -1
  29. data/lib/generators/templates/devise.rb +4 -1
  30. data/lib/generators/templates/markerb/email_changed.markerb +7 -0
  31. data/lib/generators/templates/markerb/password_change.markerb +2 -2
  32. data/test/controllers/helpers_test.rb +3 -3
  33. data/test/integration/authenticatable_test.rb +1 -1
  34. data/test/mailers/email_changed_test.rb +130 -0
  35. data/test/mailers/mailer_test.rb +18 -0
  36. data/test/models/confirmable_test.rb +17 -0
  37. data/test/models/database_authenticatable_test.rb +13 -1
  38. data/test/models/recoverable_test.rb +11 -1
  39. data/test/omniauth/config_test.rb +9 -7
  40. metadata +9 -3
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 5e29ea6d513d978b0fd04f14b67dd51e2122784d
4
- data.tar.gz: 05cc9f23bc3d9a990a174b0c9355e675fd0e4b7a
3
+ metadata.gz: 31b9e91e121e0472aed16556abc90783d1dfd3ab
4
+ data.tar.gz: c61f779584d280b27d3d4cd225fe2e864094ccd1
5
5
  SHA512:
6
- metadata.gz: 75169de4446c19bcd4da1faa1659f8481f807ea6de193a182d38dd681380c60d46cdd07dcfcaad80eaea07d8792878abf29a6572d630e982b6bba239d1b6434e
7
- data.tar.gz: 0a45b86723a424e2e9633c32fd3b8775e1f1d20d8316be3af54522112511e3da95d0446abf10c70f9ebf7c57e83adfb883ac2ccb905df3957912a6b9f624d424
6
+ metadata.gz: df6824c5a07e25ff330be9a4644425f1d46003cbed0e81f218675da644d62ad92733f07d348ed59766d3074596b71399297ea9c04fd09162d429479d098e9185
7
+ data.tar.gz: 527664a0632252df4b7027335f7a96d8bb564330071ab909aac1ece52071f2494b2def5770544b252dce189af1c3a2ce27c51dc7d6cc89716f813d650e3d1108
@@ -1,9 +1,10 @@
1
1
  language: ruby
2
2
 
3
3
  rvm:
4
- - 2.1.9
5
- - 2.2.5
6
- - 2.3.1
4
+ - 2.1.10
5
+ - 2.2.6
6
+ - 2.3.3
7
+ - 2.4.0
7
8
  - ruby-head
8
9
 
9
10
  gemfile:
@@ -13,8 +14,12 @@ gemfile:
13
14
 
14
15
  matrix:
15
16
  exclude:
16
- - rvm: 2.1.9
17
+ - rvm: 2.1.10
17
18
  gemfile: Gemfile
19
+ - rvm: 2.4.0
20
+ gemfile: gemfiles/Gemfile.rails-4.1-stable
21
+ - rvm: ruby-head
22
+ gemfile: gemfiles/Gemfile.rails-4.1-stable
18
23
  - env: DEVISE_ORM=mongoid
19
24
  gemfile: Gemfile
20
25
  allow_failures:
@@ -1,4 +1,17 @@
1
- ### Unreleased
1
+ ### 4.2.1 - 2017-03-15
2
+
3
+ * removals
4
+ * `Devise::Mailer#scope_name` and `Devise::Mailer#resource` are now protected
5
+ methods instead of public.
6
+ * bug fixes
7
+ * Attempt to reset password without the password field in the request now results in a `:blank` validation error.
8
+ Before this change, Devise would accept the reset password request and log the user in, without validating/changing
9
+ the password. (by @victor-am)
10
+ * Confirmation links now expire based on UTC time, working properly when using different timezones. (by @jjuliano)
11
+ * enhancements
12
+ * Notify the original email when it is changed with a new `Devise.send_email_changed_notification` setting.
13
+ When using `reconfirmable`, the notification will be sent right away instead of when the unconfirmed email is confirmed.
14
+ (original change by @ethirajsrinivasan)
2
15
 
3
16
  ### 4.2.0 - 2016-07-01
4
17
 
@@ -1,39 +1,79 @@
1
- ### Please read before contributing
1
+ # How to contribute to Devise
2
2
 
3
- 1) Do not post questions in the issues tracker. If you have any questions about
4
- Devise, search the [Wiki](https://github.com/plataformatec/devise/wiki) or use
5
- the [Mailing List](https://groups.google.com/group/plataformatec-devise) or
6
- [Stack Overflow](http://stackoverflow.com/questions/tagged/devise).
3
+ Thanks for your interest on contributing to Devise! Here are a few general
4
+ guidelines on contributing and reporting bugs to Devise that we ask you to
5
+ take a look first. Notice that all of your interactions in the project are
6
+ expected to follow our [Code of Conduct](CODE_OF_CONDUCT.md).
7
7
 
8
- 2) If you find a security bug, **DO NOT** submit an issue here. Please send an
8
+ ## Reporting Issues
9
+
10
+ Before reporting a new issue, please be sure that the issue wasn't already
11
+ reported or fixed by searching on GitHub through our [issues](https://github.com/plataformatec/devise/issues).
12
+
13
+ When creating a new issue, be sure to include a **title and clear description**,
14
+ as much relevant information as possible, and either a test case example or
15
+ even better a **sample Rails app that replicates the issue** - Devise has a lot
16
+ of moving parts and it's functionality can be affected by third party gems, so
17
+ we need as much context and details as possible to identify what might be broken
18
+ for you. We have a [test case template](guides/bug_report_templates/integration_test.rb)
19
+ that can be used to replicate issues with minimal setup.
20
+
21
+ Please do not attempt to translate Devise built in views. The views are meant
22
+ to be a starting point for fresh apps and not production material - eventually
23
+ all applications will require custom views where you can write your own copy and
24
+ translate it if the application requires it . For historical references, please look into closed
25
+ [Issues/Pull Requests](https://github.com/plataformatec/devise/issues?q=i18n) regarding
26
+ internationalization.
27
+
28
+ Avoid opening new issues to ask questions in our issues tracker. Please go through
29
+ the project wiki, documentation and source code first, or try to ask your question
30
+ on [Stack Overflow](http://stackoverflow.com/questions/tagged/devise).
31
+
32
+ **If you find a security bug, do not report it through GitHub. Please send an
9
33
  e-mail to [opensource@plataformatec.com.br](mailto:opensource@plataformatec.com.br)
10
- instead.
34
+ instead.**
35
+
36
+ ## Sending Pull Requests
37
+
38
+ Before sending a new Pull Request, take a look on existing Pull Requests and Issues
39
+ to see if the proposed change or fix has been discussed in the past, or if the
40
+ change was already implemented but not yet released.
41
+
42
+ We expect new Pull Requests to include enough tests for new or changed behavior,
43
+ and we aim to maintain everything as most backwards compatible as possible,
44
+ reserving breaking changes to be ship in major releases when necessary - you
45
+ can wrap the new code path with a setting toggle from the `Devise` module defined
46
+ as `false` by default to require developers to opt-in for the new behavior.
11
47
 
12
- 3) If possible, replicate your issue with our
13
- [guides/bug_report_templates/integration_test.rb](test case example), and attach
14
- it to your issue or Pull Request - this way we have an isolated way to replicate
15
- your issue and investigate it further.
48
+ If your Pull Request includes new or changed behavior, be sure that the changes
49
+ are beneficial to a wide range of use cases or it's an application specific change
50
+ that might not be so valuable to other applications. Some changes can be introduced
51
+ as a new `devise-something` gem instead of belonging to the main codebase.
16
52
 
17
- 4) Otherwise, please provide a fresh new Rails application that replicates your
18
- issue on a public GitHub repository, as some scenarios might not be possible to
19
- replicate using the standalone test case example.
53
+ When adding new settings, you can take advantage of the [`Devise::Models.config`](https://github.com/plataformatec/devise/blob/245b1f9de0b3386b7913e14b60ea24f43b77feb0/lib/devise/models.rb#L13-L50) method to add class and instance level fallbacks
54
+ to the new setting.
20
55
 
21
- 5) Do a small search on the issues tracker before submitting your issue to see
22
- if it was already reported / fixed. Duplicated issues will be closed to avoid
23
- too much noise/duplication in the issue tracker.
56
+ We also welcome Pull Requests that improve our existing documentation (both our
57
+ `README.md` and the RDoc sections in the source code) or improve existing rough
58
+ edges in our API that might be blocking existing integrations or 3rd party gems.
24
59
 
25
- 6) When reporting an issue, include Rails, Devise and Warden versions. If you
26
- are getting exceptions, please include the full backtrace.
60
+ ## Other ways to contribute
27
61
 
28
- 7) Please do not attempt to translate Devise built in views. The views are meant
29
- to be a starting point and not a final version. For historical references,
30
- please look into closed issues/Pull regarding i18n.
62
+ We welcome anyone that wants to contribute to Devise to triage and reply to
63
+ open issues to help troubleshoot and fix existing bugs on Devise. Here is what
64
+ you can do:
31
65
 
32
- 8) Notice that all of your interactions in the project are expected to follow
33
- our [Code of Conduct](CODE_OF_CONDUCT.md)
66
+ * Help ensure that existing issues follows the recommendations from the
67
+ _[Reporting Issues](#reporting-issues)_ section, providing feeback to the issue's
68
+ author on what might be missing.
69
+ * Review and update the existing content of our [Wiki](https://github.com/plataformatec/devise/wiki)
70
+ with up to date instructions and code samples - the wiki was grown with several
71
+ different tutorials and references that we can't keep track of everything, so if
72
+ there is a page that showcases an integration or customization that you are
73
+ familiar with feel free to update it as necessary.
74
+ * Review existing Pull Requests, and testing patches against real existing
75
+ applications that use Devise.
34
76
 
35
- That's it! The more information you give, the easier it becomes for us to track
36
- it down and fix it. Ideally, you should provide an application that reproduces
37
- the error or a test case to Devise's suite.
77
+ Thanks again for your interest on contributing to the project!
38
78
 
39
- Thanks!
79
+ :heart:
@@ -1,17 +1,16 @@
1
1
  GIT
2
2
  remote: git://github.com/rails/activemodel-serializers-xml.git
3
- revision: 570ee7ed33d60e44ca1f3ccbec3d1fbf61d52cbf
3
+ revision: dd9c0acf26aab111ebc647cd8deb99ebc6946531
4
4
  specs:
5
5
  activemodel-serializers-xml (1.0.1)
6
6
  activemodel (> 5.x)
7
- activerecord (> 5.x)
8
7
  activesupport (> 5.x)
9
8
  builder (~> 3.1)
10
9
 
11
10
  PATH
12
11
  remote: .
13
12
  specs:
14
- devise (4.2.0)
13
+ devise (4.2.1)
15
14
  bcrypt (~> 3.0)
16
15
  orm_adapter (~> 0.1)
17
16
  railties (>= 4.1.0, < 5.1)
@@ -21,56 +20,55 @@ PATH
21
20
  GEM
22
21
  remote: https://rubygems.org/
23
22
  specs:
24
- actioncable (5.0.0)
25
- actionpack (= 5.0.0)
26
- nio4r (~> 1.2)
23
+ actioncable (5.0.2)
24
+ actionpack (= 5.0.2)
25
+ nio4r (>= 1.2, < 3.0)
27
26
  websocket-driver (~> 0.6.1)
28
- actionmailer (5.0.0)
29
- actionpack (= 5.0.0)
30
- actionview (= 5.0.0)
31
- activejob (= 5.0.0)
27
+ actionmailer (5.0.2)
28
+ actionpack (= 5.0.2)
29
+ actionview (= 5.0.2)
30
+ activejob (= 5.0.2)
32
31
  mail (~> 2.5, >= 2.5.4)
33
32
  rails-dom-testing (~> 2.0)
34
- actionpack (5.0.0)
35
- actionview (= 5.0.0)
36
- activesupport (= 5.0.0)
33
+ actionpack (5.0.2)
34
+ actionview (= 5.0.2)
35
+ activesupport (= 5.0.2)
37
36
  rack (~> 2.0)
38
37
  rack-test (~> 0.6.3)
39
38
  rails-dom-testing (~> 2.0)
40
39
  rails-html-sanitizer (~> 1.0, >= 1.0.2)
41
- actionview (5.0.0)
42
- activesupport (= 5.0.0)
40
+ actionview (5.0.2)
41
+ activesupport (= 5.0.2)
43
42
  builder (~> 3.1)
44
43
  erubis (~> 2.7.0)
45
44
  rails-dom-testing (~> 2.0)
46
- rails-html-sanitizer (~> 1.0, >= 1.0.2)
47
- activejob (5.0.0)
48
- activesupport (= 5.0.0)
45
+ rails-html-sanitizer (~> 1.0, >= 1.0.3)
46
+ activejob (5.0.2)
47
+ activesupport (= 5.0.2)
49
48
  globalid (>= 0.3.6)
50
- activemodel (5.0.0)
51
- activesupport (= 5.0.0)
52
- activerecord (5.0.0)
53
- activemodel (= 5.0.0)
54
- activesupport (= 5.0.0)
49
+ activemodel (5.0.2)
50
+ activesupport (= 5.0.2)
51
+ activerecord (5.0.2)
52
+ activemodel (= 5.0.2)
53
+ activesupport (= 5.0.2)
55
54
  arel (~> 7.0)
56
- activesupport (5.0.0)
55
+ activesupport (5.0.2)
57
56
  concurrent-ruby (~> 1.0, >= 1.0.2)
58
57
  i18n (~> 0.7)
59
58
  minitest (~> 5.1)
60
59
  tzinfo (~> 1.1)
61
- arel (7.0.0)
60
+ arel (7.1.4)
62
61
  bcrypt (3.1.11)
63
- builder (3.2.2)
64
- concurrent-ruby (1.0.2)
62
+ builder (3.2.3)
63
+ concurrent-ruby (1.0.5)
65
64
  erubis (2.7.0)
66
- faraday (0.9.2)
65
+ faraday (0.11.0)
67
66
  multipart-post (>= 1.2, < 3)
68
- globalid (0.3.6)
67
+ globalid (0.3.7)
69
68
  activesupport (>= 4.1.0)
70
- hashie (3.4.4)
71
- i18n (0.7.0)
72
- json (1.8.3)
73
- jwt (1.5.4)
69
+ hashie (3.5.5)
70
+ i18n (0.8.1)
71
+ jwt (1.5.6)
74
72
  loofah (2.0.3)
75
73
  nokogiri (>= 1.5.9)
76
74
  mail (2.6.4)
@@ -81,26 +79,25 @@ GEM
81
79
  mime-types-data (~> 3.2015)
82
80
  mime-types-data (3.2016.0521)
83
81
  mini_portile2 (2.1.0)
84
- minitest (5.9.0)
85
- mocha (1.1.0)
82
+ minitest (5.10.1)
83
+ mocha (1.2.1)
86
84
  metaclass (~> 0.0.1)
87
85
  multi_json (1.12.1)
88
- multi_xml (0.5.5)
86
+ multi_xml (0.6.0)
89
87
  multipart-post (2.0.0)
90
- nio4r (1.2.1)
91
- nokogiri (1.6.8)
88
+ nio4r (2.0.0)
89
+ nokogiri (1.7.0.1)
92
90
  mini_portile2 (~> 2.1.0)
93
- pkg-config (~> 1.1.7)
94
- oauth2 (1.2.0)
95
- faraday (>= 0.8, < 0.10)
91
+ oauth2 (1.3.1)
92
+ faraday (>= 0.8, < 0.12)
96
93
  jwt (~> 1.0)
97
94
  multi_json (~> 1.3)
98
95
  multi_xml (~> 0.5)
99
96
  rack (>= 1.2, < 3)
100
- omniauth (1.3.1)
101
- hashie (>= 1.2, < 4)
102
- rack (>= 1.0, < 3)
103
- omniauth-facebook (3.0.0)
97
+ omniauth (1.6.1)
98
+ hashie (>= 3.4.6, < 3.6.0)
99
+ rack (>= 1.6.2, < 3)
100
+ omniauth-facebook (4.0.0)
104
101
  omniauth-oauth2 (~> 1.2)
105
102
  omniauth-oauth2 (1.4.0)
106
103
  oauth2 (~> 1.0)
@@ -109,65 +106,63 @@ GEM
109
106
  omniauth (~> 1.0)
110
107
  rack-openid (~> 1.3.1)
111
108
  orm_adapter (0.5.0)
112
- pkg-config (1.1.7)
113
109
  rack (2.0.1)
114
110
  rack-openid (1.3.1)
115
111
  rack (>= 1.1.0)
116
112
  ruby-openid (>= 2.1.8)
117
113
  rack-test (0.6.3)
118
114
  rack (>= 1.0)
119
- rails (5.0.0)
120
- actioncable (= 5.0.0)
121
- actionmailer (= 5.0.0)
122
- actionpack (= 5.0.0)
123
- actionview (= 5.0.0)
124
- activejob (= 5.0.0)
125
- activemodel (= 5.0.0)
126
- activerecord (= 5.0.0)
127
- activesupport (= 5.0.0)
115
+ rails (5.0.2)
116
+ actioncable (= 5.0.2)
117
+ actionmailer (= 5.0.2)
118
+ actionpack (= 5.0.2)
119
+ actionview (= 5.0.2)
120
+ activejob (= 5.0.2)
121
+ activemodel (= 5.0.2)
122
+ activerecord (= 5.0.2)
123
+ activesupport (= 5.0.2)
128
124
  bundler (>= 1.3.0, < 2.0)
129
- railties (= 5.0.0)
125
+ railties (= 5.0.2)
130
126
  sprockets-rails (>= 2.0.0)
131
- rails-controller-testing (0.1.1)
127
+ rails-controller-testing (1.0.1)
132
128
  actionpack (~> 5.x)
133
129
  actionview (~> 5.x)
134
130
  activesupport (~> 5.x)
135
- rails-dom-testing (2.0.1)
131
+ rails-dom-testing (2.0.2)
136
132
  activesupport (>= 4.2.0, < 6.0)
137
- nokogiri (~> 1.6.0)
133
+ nokogiri (~> 1.6)
138
134
  rails-html-sanitizer (1.0.3)
139
135
  loofah (~> 2.0)
140
- railties (5.0.0)
141
- actionpack (= 5.0.0)
142
- activesupport (= 5.0.0)
136
+ railties (5.0.2)
137
+ actionpack (= 5.0.2)
138
+ activesupport (= 5.0.2)
143
139
  method_source
144
140
  rake (>= 0.8.7)
145
141
  thor (>= 0.18.1, < 2.0)
146
- rake (11.2.2)
147
- rdoc (4.2.2)
148
- json (~> 1.4)
149
- responders (2.2.0)
142
+ rake (12.0.0)
143
+ rdoc (5.1.0)
144
+ responders (2.3.0)
150
145
  railties (>= 4.2.0, < 5.1)
151
146
  ruby-openid (2.7.0)
152
- sprockets (3.6.2)
147
+ sprockets (3.7.1)
153
148
  concurrent-ruby (~> 1.0)
154
149
  rack (> 1, < 3)
155
- sprockets-rails (3.1.1)
150
+ sprockets-rails (3.2.0)
156
151
  actionpack (>= 4.0)
157
152
  activesupport (>= 4.0)
158
153
  sprockets (>= 3.0.0)
159
- sqlite3 (1.3.11)
160
- thor (0.19.1)
161
- thread_safe (0.3.5)
154
+ sqlite3 (1.3.13)
155
+ thor (0.19.4)
156
+ thread_safe (0.3.6)
162
157
  tzinfo (1.2.2)
163
158
  thread_safe (~> 0.1)
164
- warden (1.2.6)
159
+ warden (1.2.7)
165
160
  rack (>= 1.0)
166
161
  webrat (0.7.3)
167
162
  nokogiri (>= 1.2.0)
168
163
  rack (>= 1.0)
169
164
  rack-test (>= 0.5.3)
170
- websocket-driver (0.6.4)
165
+ websocket-driver (0.6.5)
171
166
  websocket-extensions (>= 0.1.0)
172
167
  websocket-extensions (0.1.2)
173
168
 
@@ -194,4 +189,4 @@ DEPENDENCIES
194
189
  webrat (= 0.7.3)
195
190
 
196
191
  BUNDLED WITH
197
- 1.12.5
192
+ 1.12.6
data/README.md CHANGED
@@ -17,7 +17,7 @@ Devise is a flexible authentication solution for Rails based on Warden. It:
17
17
  It's composed of 10 modules:
18
18
 
19
19
  * [Database Authenticatable](http://rubydoc.info/github/plataformatec/devise/master/Devise/Models/DatabaseAuthenticatable): hashes and stores a password in the database to validate the authenticity of a user while signing in. The authentication can be done both through POST requests or HTTP Basic Authentication.
20
- * [Omniauthable](http://rubydoc.info/github/plataformatec/devise/master/Devise/Models/Omniauthable): adds OmniAuth (https://github.com/intridea/omniauth) support.
20
+ * [Omniauthable](http://rubydoc.info/github/plataformatec/devise/master/Devise/Models/Omniauthable): adds OmniAuth (https://github.com/omniauth/omniauth) support.
21
21
  * [Confirmable](http://rubydoc.info/github/plataformatec/devise/master/Devise/Models/Confirmable): sends emails with confirmation instructions and verifies whether an account is already confirmed during sign in.
22
22
  * [Recoverable](http://rubydoc.info/github/plataformatec/devise/master/Devise/Models/Recoverable): resets the user password and sends reset instructions.
23
23
  * [Registerable](http://rubydoc.info/github/plataformatec/devise/master/Devise/Models/Registerable): handles signing up users through a registration process, also allowing them to edit and destroy their account.
@@ -43,9 +43,13 @@ https://github.com/plataformatec/devise/wiki/Bug-reports
43
43
 
44
44
  If you have discovered a security related bug, please do *NOT* use the GitHub issue tracker. Send an email to opensource@plataformatec.com.br.
45
45
 
46
- ### Mailing list
46
+ ### StackOverflow and Mailing List
47
47
 
48
- If you have any questions, comments, or concerns, please use the Google Group instead of the GitHub issue tracker:
48
+ If you have any questions, comments, or concerns, please use StackOverflow instead of the GitHub issue tracker:
49
+
50
+ http://stackoverflow.com/questions/tagged/devise
51
+
52
+ The deprecated mailing list can still be read on
49
53
 
50
54
  https://groups.google.com/group/plataformatec-devise
51
55
 
@@ -95,7 +99,7 @@ Devise 4.0 works with Rails 4.1 onwards. You can add it to your Gemfile with:
95
99
  gem 'devise'
96
100
  ```
97
101
 
98
- Run the bundle command to install it.
102
+ Then run `bundle install`
99
103
 
100
104
  Next, you need to run the generator:
101
105
 
@@ -179,7 +183,7 @@ member_session
179
183
  The Devise method in your models also accepts some options to configure its modules. For example, you can choose the cost of the hashing algorithm with:
180
184
 
181
185
  ```ruby
182
- devise :database_authenticatable, :registerable, :confirmable, :recoverable, stretches: 20
186
+ devise :database_authenticatable, :registerable, :confirmable, :recoverable, stretches: 12
183
187
  ```
184
188
 
185
189
  Besides `:stretches`, you can define `:pepper`, `:encryptor`, `:confirm_within`, `:remember_for`, `:timeout_in`, `:unlock_in` among other options. For more details, see the initializer file that was created when you invoked the "devise:install" generator described above. This file is usually located at `/config/initializers/devise.rb`.
@@ -447,7 +451,7 @@ tests:
447
451
 
448
452
  ```ruby
449
453
  sign_in @user
450
- sign_in @user, scope: admin
454
+ sign_in @user, scope: :admin
451
455
  ```
452
456
 
453
457
  If you are testing Devise internal controllers or a controller that inherits