devise 4.1.0 → 4.1.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.
- checksums.yaml +4 -4
- data/CHANGELOG.md +5 -0
- data/Gemfile.lock +2 -2
- data/lib/devise/models/rememberable.rb +1 -1
- data/lib/devise/version.rb +1 -1
- data/test/models/rememberable_test.rb +12 -0
- 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: ae66c3c22e62e034ece98b6498c993737bd056e9
|
4
|
+
data.tar.gz: a278bfa6812d8470f2e4b732dcad3ad858b9cd02
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: be13b50cfa7a16324637907e62236b1627b997fdf10081bb4513f65494461e24bccdf65410e582f0d4e8a69327e407b893e7a6e9e81367e5685fad316065f18d
|
7
|
+
data.tar.gz: 7697239a9ead6ee62a0d2eb25f4037b889b84a6eaf07079c8b41d98ad91924a3513e5a669e88a33e35544ec986faa14f35a0c30b28871001db4ae798afbef8e6
|
data/CHANGELOG.md
CHANGED
data/Gemfile.lock
CHANGED
@@ -46,7 +46,7 @@ module Devise
|
|
46
46
|
end
|
47
47
|
|
48
48
|
def remember_me!
|
49
|
-
self.remember_token
|
49
|
+
self.remember_token ||= self.class.remember_token if respond_to?(:remember_token)
|
50
50
|
self.remember_created_at ||= Time.now.utc
|
51
51
|
save(validate: false) if self.changed?
|
52
52
|
end
|
data/lib/devise/version.rb
CHANGED
@@ -16,6 +16,18 @@ class RememberableTest < ActiveSupport::TestCase
|
|
16
16
|
assert user.remember_created_at
|
17
17
|
end
|
18
18
|
|
19
|
+
test 'remember_me should not generate a new token if valid token exists' do
|
20
|
+
user = create_user
|
21
|
+
user.singleton_class.send(:attr_accessor, :remember_token)
|
22
|
+
User.to_adapter.expects(:find_first).returns(nil)
|
23
|
+
|
24
|
+
user.remember_me!
|
25
|
+
existing_token = user.remember_token
|
26
|
+
|
27
|
+
user.remember_me!
|
28
|
+
assert_equal existing_token, user.remember_token
|
29
|
+
end
|
30
|
+
|
19
31
|
test 'forget_me should not clear remember token if using salt' do
|
20
32
|
user = create_user
|
21
33
|
user.remember_me!
|
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: 4.1.
|
4
|
+
version: 4.1.1
|
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-05-
|
12
|
+
date: 2016-05-15 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: warden
|