devise 3.5.7 → 3.5.8
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.
- checksums.yaml +4 -4
- data/CHANGELOG.md +5 -0
- data/Gemfile.lock +1 -1
- data/lib/devise/models/confirmable.rb +3 -2
- data/lib/devise/version.rb +1 -1
- data/test/models/confirmable_test.rb +13 -5
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: cc84cc1ced722c875939d859ae9be0a34284acd0
|
4
|
+
data.tar.gz: 6dc021393b11cb9d8dae09d25169183c2595df5c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 0ecba37571b438f72d64c7141b08d6b0153c8e05ac955b290ea429f9f303010bf237d0efca9fd87fc8b4db930134118df016c3c4aac3471c0dc7196095f57627
|
7
|
+
data.tar.gz: 179a79cf22534e1f0bbedb3eef1a49e3c7e9fbeaed6c4464726234f8ef095ca347d0700f9b3deea7a7256c2ae55146824ccb0f78d36f30284a2e9eaad02d918b
|
data/CHANGELOG.md
CHANGED
data/Gemfile.lock
CHANGED
@@ -170,6 +170,7 @@ module Devise
|
|
170
170
|
# in models to map to a nice sign up e-mail.
|
171
171
|
def send_on_create_confirmation_instructions
|
172
172
|
send_confirmation_instructions
|
173
|
+
skip_reconfirmation!
|
173
174
|
end
|
174
175
|
|
175
176
|
# Callback to overwrite if confirmation is required or not.
|
@@ -254,13 +255,13 @@ module Devise
|
|
254
255
|
end
|
255
256
|
|
256
257
|
def postpone_email_change?
|
257
|
-
postpone = self.class.reconfirmable && email_changed? &&
|
258
|
+
postpone = self.class.reconfirmable && email_changed? && !@bypass_confirmation_postpone && self.email.present?
|
258
259
|
@bypass_confirmation_postpone = false
|
259
260
|
postpone
|
260
261
|
end
|
261
262
|
|
262
263
|
def reconfirmation_required?
|
263
|
-
self.class.reconfirmable && @reconfirmation_required && self.email.present?
|
264
|
+
self.class.reconfirmable && @reconfirmation_required && (self.email.present? || self.unconfirmed_email.present?)
|
264
265
|
end
|
265
266
|
|
266
267
|
def send_confirmation_notification?
|
data/lib/devise/version.rb
CHANGED
@@ -114,7 +114,7 @@ class ConfirmableTest < ActiveSupport::TestCase
|
|
114
114
|
|
115
115
|
assert_email_not_sent do
|
116
116
|
user.save!
|
117
|
-
|
117
|
+
assert_not user.confirmed?
|
118
118
|
end
|
119
119
|
end
|
120
120
|
|
@@ -401,6 +401,14 @@ class ReconfirmableTest < ActiveSupport::TestCase
|
|
401
401
|
assert_match "new_test@example.com", ActionMailer::Base.deliveries.last.body.encoded
|
402
402
|
end
|
403
403
|
|
404
|
+
test 'should send confirmation instructions by email after changing email from nil' do
|
405
|
+
admin = create_admin(email: nil)
|
406
|
+
assert_email_sent "new_test@example.com" do
|
407
|
+
assert admin.update_attributes(email: 'new_test@example.com')
|
408
|
+
end
|
409
|
+
assert_match "new_test@example.com", ActionMailer::Base.deliveries.last.body.encoded
|
410
|
+
end
|
411
|
+
|
404
412
|
test 'should not send confirmation by email after changing password' do
|
405
413
|
admin = create_admin
|
406
414
|
assert admin.confirm
|
@@ -488,8 +496,8 @@ class ReconfirmableTest < ActiveSupport::TestCase
|
|
488
496
|
end
|
489
497
|
|
490
498
|
test 'should not require reconfirmation after creating a record' do
|
491
|
-
|
492
|
-
assert !
|
499
|
+
admin = create_admin
|
500
|
+
assert !admin.pending_reconfirmation?
|
493
501
|
end
|
494
502
|
|
495
503
|
test 'should not require reconfirmation after creating a record with #save called in callback' do
|
@@ -497,7 +505,7 @@ class ReconfirmableTest < ActiveSupport::TestCase
|
|
497
505
|
after_create :save
|
498
506
|
end
|
499
507
|
|
500
|
-
|
501
|
-
assert !
|
508
|
+
admin = Admin::WithSaveInCallback.create(valid_attributes.except(:username))
|
509
|
+
assert !admin.pending_reconfirmation?
|
502
510
|
end
|
503
511
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: devise
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 3.5.
|
4
|
+
version: 3.5.8
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- José Valim
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2016-04-
|
12
|
+
date: 2016-04-25 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: warden
|