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
@@ -57,6 +57,7 @@ class Devise::RegistrationsController < DeviseController
57
57
  respond_with resource, location: after_update_path_for(resource)
58
58
  else
59
59
  clean_up_passwords resource
60
+ set_minimum_password_length
60
61
  respond_with resource
61
62
  end
62
63
  end
@@ -17,6 +17,10 @@ if defined?(ActionMailer)
17
17
  devise_mail(record, :unlock_instructions, opts)
18
18
  end
19
19
 
20
+ def email_changed(record, opts={})
21
+ devise_mail(record, :email_changed, opts)
22
+ end
23
+
20
24
  def password_change(record, opts={})
21
25
  devise_mail(record, :password_change, opts)
22
26
  end
@@ -0,0 +1,7 @@
1
+ <p>Hello <%= @email %>!</p>
2
+
3
+ <% if @resource.try(:unconfirmed_email?) %>
4
+ <p>We're contacting you to notify you that your email is being changed to <%= @resource.unconfirmed_email %>.</p>
5
+ <% else %>
6
+ <p>We're contacting you to notify you that your email has been changed to <%= @resource.email %>.</p>
7
+ <% end %>
@@ -23,6 +23,8 @@ en:
23
23
  subject: "Reset password instructions"
24
24
  unlock_instructions:
25
25
  subject: "Unlock instructions"
26
+ email_changed:
27
+ subject: "Email Changed"
26
28
  password_change:
27
29
  subject: "Password Changed"
28
30
  omniauth_callbacks:
@@ -1,54 +1,27 @@
1
1
  GIT
2
2
  remote: git://github.com/rails/rails.git
3
- revision: 9f5cbe613c8a80282970c73b0f00095788d54e34
3
+ revision: 0cad778c2605a5204a05a9f1dbd3344e39f248d8
4
4
  branch: 4-1-stable
5
5
  specs:
6
- actionmailer (4.1.15)
7
- actionpack (= 4.1.15)
8
- actionview (= 4.1.15)
6
+ actionmailer (4.1.16)
7
+ actionpack (= 4.1.16)
8
+ actionview (= 4.1.16)
9
9
  mail (~> 2.5, >= 2.5.4)
10
- actionpack (4.1.15)
11
- actionview (= 4.1.15)
12
- activesupport (= 4.1.15)
13
- rack (~> 1.5.2)
14
- rack-test (~> 0.6.2)
15
- actionview (4.1.15)
16
- activesupport (= 4.1.15)
17
- builder (~> 3.1)
18
- erubis (~> 2.7.0)
19
- activemodel (4.1.15)
20
- activesupport (= 4.1.15)
21
- builder (~> 3.1)
22
- activerecord (4.1.15)
23
- activemodel (= 4.1.15)
24
- activesupport (= 4.1.15)
25
- arel (~> 5.0.0)
26
- activesupport (4.1.15)
27
- i18n (~> 0.6, >= 0.6.9)
28
- json (~> 1.7, >= 1.7.7)
29
- minitest (~> 5.1)
30
- thread_safe (~> 0.1)
31
- tzinfo (~> 1.1)
32
- rails (4.1.15)
33
- actionmailer (= 4.1.15)
34
- actionpack (= 4.1.15)
35
- actionview (= 4.1.15)
36
- activemodel (= 4.1.15)
37
- activerecord (= 4.1.15)
38
- activesupport (= 4.1.15)
10
+ rails (4.1.16)
11
+ actionmailer (= 4.1.16)
12
+ actionpack (= 4.1.16)
13
+ actionview (= 4.1.16)
14
+ activemodel (= 4.1.16)
15
+ activerecord (= 4.1.16)
16
+ activesupport (= 4.1.16)
39
17
  bundler (>= 1.3.0, < 2.0)
40
- railties (= 4.1.15)
18
+ railties (= 4.1.16)
41
19
  sprockets-rails (~> 2.0)
42
- railties (4.1.15)
43
- actionpack (= 4.1.15)
44
- activesupport (= 4.1.15)
45
- rake (>= 0.8.7)
46
- thor (>= 0.18.1, < 2.0)
47
20
 
48
21
  PATH
49
22
  remote: ..
50
23
  specs:
51
- devise (4.2.0)
24
+ devise (4.2.1)
52
25
  bcrypt (~> 3.0)
53
26
  orm_adapter (~> 0.1)
54
27
  railties (>= 4.1.0, < 5.1)
@@ -58,19 +31,41 @@ PATH
58
31
  GEM
59
32
  remote: https://rubygems.org/
60
33
  specs:
34
+ actionpack (4.1.16)
35
+ actionview (= 4.1.16)
36
+ activesupport (= 4.1.16)
37
+ rack (~> 1.5.2)
38
+ rack-test (~> 0.6.2)
39
+ actionview (4.1.16)
40
+ activesupport (= 4.1.16)
41
+ builder (~> 3.1)
42
+ erubis (~> 2.7.0)
43
+ activemodel (4.1.16)
44
+ activesupport (= 4.1.16)
45
+ builder (~> 3.1)
46
+ activerecord (4.1.16)
47
+ activemodel (= 4.1.16)
48
+ activesupport (= 4.1.16)
49
+ arel (~> 5.0.0)
50
+ activesupport (4.1.16)
51
+ i18n (~> 0.6, >= 0.6.9)
52
+ json (~> 1.7, >= 1.7.7)
53
+ minitest (~> 5.1)
54
+ thread_safe (~> 0.1)
55
+ tzinfo (~> 1.1)
61
56
  arel (5.0.1.20140414130214)
62
57
  bcrypt (3.1.11)
63
58
  bson (3.2.6)
64
- builder (3.2.2)
65
- concurrent-ruby (1.0.2)
66
- connection_pool (2.2.0)
59
+ builder (3.2.3)
60
+ concurrent-ruby (1.0.5)
61
+ connection_pool (2.2.1)
67
62
  erubis (2.7.0)
68
- faraday (0.9.2)
63
+ faraday (0.11.0)
69
64
  multipart-post (>= 1.2, < 3)
70
- hashie (3.4.4)
71
- i18n (0.7.0)
72
- json (1.8.3)
73
- jwt (1.5.4)
65
+ hashie (3.5.5)
66
+ i18n (0.8.1)
67
+ json (1.8.6)
68
+ jwt (1.5.6)
74
69
  mail (2.6.4)
75
70
  mime-types (>= 1.16, < 4)
76
71
  metaclass (0.0.4)
@@ -78,8 +73,8 @@ GEM
78
73
  mime-types-data (~> 3.2015)
79
74
  mime-types-data (3.2016.0521)
80
75
  mini_portile2 (2.1.0)
81
- minitest (5.9.0)
82
- mocha (1.1.0)
76
+ minitest (5.10.1)
77
+ mocha (1.2.1)
83
78
  metaclass (~> 0.0.1)
84
79
  mongoid (4.0.2)
85
80
  activemodel (~> 4.0)
@@ -91,21 +86,20 @@ GEM
91
86
  connection_pool (~> 2.0)
92
87
  optionable (~> 0.2.0)
93
88
  multi_json (1.12.1)
94
- multi_xml (0.5.5)
89
+ multi_xml (0.6.0)
95
90
  multipart-post (2.0.0)
96
- nokogiri (1.6.8)
91
+ nokogiri (1.7.0.1)
97
92
  mini_portile2 (~> 2.1.0)
98
- pkg-config (~> 1.1.7)
99
- oauth2 (1.2.0)
100
- faraday (>= 0.8, < 0.10)
93
+ oauth2 (1.3.1)
94
+ faraday (>= 0.8, < 0.12)
101
95
  jwt (~> 1.0)
102
96
  multi_json (~> 1.3)
103
97
  multi_xml (~> 0.5)
104
98
  rack (>= 1.2, < 3)
105
- omniauth (1.3.1)
99
+ omniauth (1.4.2)
106
100
  hashie (>= 1.2, < 4)
107
101
  rack (>= 1.0, < 3)
108
- omniauth-facebook (3.0.0)
102
+ omniauth-facebook (4.0.0)
109
103
  omniauth-oauth2 (~> 1.2)
110
104
  omniauth-oauth2 (1.4.0)
111
105
  oauth2 (~> 1.0)
@@ -114,36 +108,39 @@ GEM
114
108
  omniauth (~> 1.0)
115
109
  rack-openid (~> 1.3.1)
116
110
  optionable (0.2.0)
117
- origin (2.2.0)
111
+ origin (2.3.0)
118
112
  orm_adapter (0.5.0)
119
- pkg-config (1.1.7)
120
113
  rack (1.5.5)
121
114
  rack-openid (1.3.1)
122
115
  rack (>= 1.1.0)
123
116
  ruby-openid (>= 2.1.8)
124
117
  rack-test (0.6.3)
125
118
  rack (>= 1.0)
126
- rake (11.2.2)
127
- rdoc (4.2.2)
128
- json (~> 1.4)
119
+ railties (4.1.16)
120
+ actionpack (= 4.1.16)
121
+ activesupport (= 4.1.16)
122
+ rake (>= 0.8.7)
123
+ thor (>= 0.18.1, < 2.0)
124
+ rake (12.0.0)
125
+ rdoc (5.1.0)
129
126
  responders (1.1.2)
130
127
  railties (>= 3.2, < 4.2)
131
128
  ruby-openid (2.7.0)
132
- sprockets (3.6.2)
129
+ sprockets (3.7.1)
133
130
  concurrent-ruby (~> 1.0)
134
131
  rack (> 1, < 3)
135
132
  sprockets-rails (2.3.3)
136
133
  actionpack (>= 3.0)
137
134
  activesupport (>= 3.0)
138
135
  sprockets (>= 2.8, < 4.0)
139
- sqlite3 (1.3.11)
136
+ sqlite3 (1.3.13)
140
137
  test_after_commit (1.1.0)
141
138
  activerecord (>= 3.2)
142
- thor (0.19.1)
143
- thread_safe (0.3.5)
139
+ thor (0.19.4)
140
+ thread_safe (0.3.6)
144
141
  tzinfo (1.2.2)
145
142
  thread_safe (~> 0.1)
146
- warden (1.2.6)
143
+ warden (1.2.7)
147
144
  rack (>= 1.0)
148
145
  webrat (0.7.3)
149
146
  nokogiri (>= 1.2.0)
@@ -171,4 +168,4 @@ DEPENDENCIES
171
168
  webrat (= 0.7.3)
172
169
 
173
170
  BUNDLED WITH
174
- 1.12.5
171
+ 1.12.6
@@ -1,64 +1,63 @@
1
1
  GIT
2
2
  remote: git://github.com/rails/rails.git
3
- revision: 5a85938418285ab81e3db52ea102d19f95ed7a94
3
+ revision: dc3ae21802c316e1639239d28202db7aa7fb7cac
4
4
  branch: 4-2-stable
5
5
  specs:
6
- actionmailer (4.2.7.rc1)
7
- actionpack (= 4.2.7.rc1)
8
- actionview (= 4.2.7.rc1)
9
- activejob (= 4.2.7.rc1)
6
+ actionmailer (4.2.8)
7
+ actionpack (= 4.2.8)
8
+ actionview (= 4.2.8)
9
+ activejob (= 4.2.8)
10
10
  mail (~> 2.5, >= 2.5.4)
11
11
  rails-dom-testing (~> 1.0, >= 1.0.5)
12
- actionpack (4.2.7.rc1)
13
- actionview (= 4.2.7.rc1)
14
- activesupport (= 4.2.7.rc1)
12
+ actionpack (4.2.8)
13
+ actionview (= 4.2.8)
14
+ activesupport (= 4.2.8)
15
15
  rack (~> 1.6)
16
16
  rack-test (~> 0.6.2)
17
17
  rails-dom-testing (~> 1.0, >= 1.0.5)
18
18
  rails-html-sanitizer (~> 1.0, >= 1.0.2)
19
- actionview (4.2.7.rc1)
20
- activesupport (= 4.2.7.rc1)
19
+ actionview (4.2.8)
20
+ activesupport (= 4.2.8)
21
21
  builder (~> 3.1)
22
22
  erubis (~> 2.7.0)
23
23
  rails-dom-testing (~> 1.0, >= 1.0.5)
24
- rails-html-sanitizer (~> 1.0, >= 1.0.2)
25
- activejob (4.2.7.rc1)
26
- activesupport (= 4.2.7.rc1)
24
+ rails-html-sanitizer (~> 1.0, >= 1.0.3)
25
+ activejob (4.2.8)
26
+ activesupport (= 4.2.8)
27
27
  globalid (>= 0.3.0)
28
- activemodel (4.2.7.rc1)
29
- activesupport (= 4.2.7.rc1)
28
+ activemodel (4.2.8)
29
+ activesupport (= 4.2.8)
30
30
  builder (~> 3.1)
31
- activerecord (4.2.7.rc1)
32
- activemodel (= 4.2.7.rc1)
33
- activesupport (= 4.2.7.rc1)
31
+ activerecord (4.2.8)
32
+ activemodel (= 4.2.8)
33
+ activesupport (= 4.2.8)
34
34
  arel (~> 6.0)
35
- activesupport (4.2.7.rc1)
35
+ activesupport (4.2.8)
36
36
  i18n (~> 0.7)
37
- json (~> 1.7, >= 1.7.7)
38
37
  minitest (~> 5.1)
39
38
  thread_safe (~> 0.3, >= 0.3.4)
40
39
  tzinfo (~> 1.1)
41
- rails (4.2.7.rc1)
42
- actionmailer (= 4.2.7.rc1)
43
- actionpack (= 4.2.7.rc1)
44
- actionview (= 4.2.7.rc1)
45
- activejob (= 4.2.7.rc1)
46
- activemodel (= 4.2.7.rc1)
47
- activerecord (= 4.2.7.rc1)
48
- activesupport (= 4.2.7.rc1)
40
+ rails (4.2.8)
41
+ actionmailer (= 4.2.8)
42
+ actionpack (= 4.2.8)
43
+ actionview (= 4.2.8)
44
+ activejob (= 4.2.8)
45
+ activemodel (= 4.2.8)
46
+ activerecord (= 4.2.8)
47
+ activesupport (= 4.2.8)
49
48
  bundler (>= 1.3.0, < 2.0)
50
- railties (= 4.2.7.rc1)
49
+ railties (= 4.2.8)
51
50
  sprockets-rails
52
- railties (4.2.7.rc1)
53
- actionpack (= 4.2.7.rc1)
54
- activesupport (= 4.2.7.rc1)
51
+ railties (4.2.8)
52
+ actionpack (= 4.2.8)
53
+ activesupport (= 4.2.8)
55
54
  rake (>= 0.8.7)
56
55
  thor (>= 0.18.1, < 2.0)
57
56
 
58
57
  PATH
59
58
  remote: ..
60
59
  specs:
61
- devise (4.2.0)
60
+ devise (4.2.1)
62
61
  bcrypt (~> 3.0)
63
62
  orm_adapter (~> 0.1)
64
63
  railties (>= 4.1.0, < 5.1)
@@ -68,21 +67,20 @@ PATH
68
67
  GEM
69
68
  remote: https://rubygems.org/
70
69
  specs:
71
- arel (6.0.3)
70
+ arel (6.0.4)
72
71
  bcrypt (3.1.11)
73
72
  bson (3.2.6)
74
- builder (3.2.2)
75
- concurrent-ruby (1.0.2)
76
- connection_pool (2.2.0)
73
+ builder (3.2.3)
74
+ concurrent-ruby (1.0.5)
75
+ connection_pool (2.2.1)
77
76
  erubis (2.7.0)
78
- faraday (0.9.2)
77
+ faraday (0.11.0)
79
78
  multipart-post (>= 1.2, < 3)
80
- globalid (0.3.6)
79
+ globalid (0.3.7)
81
80
  activesupport (>= 4.1.0)
82
- hashie (3.4.4)
83
- i18n (0.7.0)
84
- json (1.8.3)
85
- jwt (1.5.4)
81
+ hashie (3.5.5)
82
+ i18n (0.8.1)
83
+ jwt (1.5.6)
86
84
  loofah (2.0.3)
87
85
  nokogiri (>= 1.5.9)
88
86
  mail (2.6.4)
@@ -92,8 +90,8 @@ GEM
92
90
  mime-types-data (~> 3.2015)
93
91
  mime-types-data (3.2016.0521)
94
92
  mini_portile2 (2.1.0)
95
- minitest (5.9.0)
96
- mocha (1.1.0)
93
+ minitest (5.10.1)
94
+ mocha (1.2.1)
97
95
  metaclass (~> 0.0.1)
98
96
  mongoid (4.0.2)
99
97
  activemodel (~> 4.0)
@@ -105,21 +103,20 @@ GEM
105
103
  connection_pool (~> 2.0)
106
104
  optionable (~> 0.2.0)
107
105
  multi_json (1.12.1)
108
- multi_xml (0.5.5)
106
+ multi_xml (0.6.0)
109
107
  multipart-post (2.0.0)
110
- nokogiri (1.6.8)
108
+ nokogiri (1.7.0.1)
111
109
  mini_portile2 (~> 2.1.0)
112
- pkg-config (~> 1.1.7)
113
- oauth2 (1.2.0)
114
- faraday (>= 0.8, < 0.10)
110
+ oauth2 (1.3.1)
111
+ faraday (>= 0.8, < 0.12)
115
112
  jwt (~> 1.0)
116
113
  multi_json (~> 1.3)
117
114
  multi_xml (~> 0.5)
118
115
  rack (>= 1.2, < 3)
119
- omniauth (1.3.1)
120
- hashie (>= 1.2, < 4)
121
- rack (>= 1.0, < 3)
122
- omniauth-facebook (3.0.0)
116
+ omniauth (1.6.1)
117
+ hashie (>= 3.4.6, < 3.6.0)
118
+ rack (>= 1.6.2, < 3)
119
+ omniauth-facebook (4.0.0)
123
120
  omniauth-oauth2 (~> 1.2)
124
121
  omniauth-oauth2 (1.4.0)
125
122
  oauth2 (~> 1.0)
@@ -128,10 +125,9 @@ GEM
128
125
  omniauth (~> 1.0)
129
126
  rack-openid (~> 1.3.1)
130
127
  optionable (0.2.0)
131
- origin (2.2.0)
128
+ origin (2.3.0)
132
129
  orm_adapter (0.5.0)
133
- pkg-config (1.1.7)
134
- rack (1.6.4)
130
+ rack (1.6.5)
135
131
  rack-openid (1.3.1)
136
132
  rack (>= 1.1.0)
137
133
  ruby-openid (>= 2.1.8)
@@ -139,33 +135,32 @@ GEM
139
135
  rack (>= 1.0)
140
136
  rails-deprecated_sanitizer (1.0.3)
141
137
  activesupport (>= 4.2.0.alpha)
142
- rails-dom-testing (1.0.7)
138
+ rails-dom-testing (1.0.8)
143
139
  activesupport (>= 4.2.0.beta, < 5.0)
144
- nokogiri (~> 1.6.0)
140
+ nokogiri (~> 1.6)
145
141
  rails-deprecated_sanitizer (>= 1.0.1)
146
142
  rails-html-sanitizer (1.0.3)
147
143
  loofah (~> 2.0)
148
- rake (11.2.2)
149
- rdoc (4.2.2)
150
- json (~> 1.4)
151
- responders (2.2.0)
144
+ rake (12.0.0)
145
+ rdoc (5.1.0)
146
+ responders (2.3.0)
152
147
  railties (>= 4.2.0, < 5.1)
153
148
  ruby-openid (2.7.0)
154
- sprockets (3.6.2)
149
+ sprockets (3.7.1)
155
150
  concurrent-ruby (~> 1.0)
156
151
  rack (> 1, < 3)
157
- sprockets-rails (3.1.1)
152
+ sprockets-rails (3.2.0)
158
153
  actionpack (>= 4.0)
159
154
  activesupport (>= 4.0)
160
155
  sprockets (>= 3.0.0)
161
- sqlite3 (1.3.11)
156
+ sqlite3 (1.3.13)
162
157
  test_after_commit (1.1.0)
163
158
  activerecord (>= 3.2)
164
- thor (0.19.1)
165
- thread_safe (0.3.5)
159
+ thor (0.19.4)
160
+ thread_safe (0.3.6)
166
161
  tzinfo (1.2.2)
167
162
  thread_safe (~> 0.1)
168
- warden (1.2.6)
163
+ warden (1.2.7)
169
164
  rack (>= 1.0)
170
165
  webrat (0.7.3)
171
166
  nokogiri (>= 1.2.0)
@@ -193,4 +188,4 @@ DEPENDENCIES
193
188
  webrat (= 0.7.3)
194
189
 
195
190
  BUNDLED WITH
196
- 1.12.5
191
+ 1.12.6