devise_zxcvbn 2.1.0 → 2.1.1
Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b8bb0278689426c29675ba90ed3418d35563ee51
|
4
|
+
data.tar.gz: a67a8a6f945d693da8e1e7808fe4bb2c051e3e4c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b8d0fbc54d4ea02fd709f40abe7b9174b4c3c746a984c46d9511f2960413315676fe57f0bce78a113ae80230792582ad5435a2474a0a8e00e202407293c18d51
|
7
|
+
data.tar.gz: a40ab39d31bad6a9a64f581d09a0ae262e058560a739ffde6a80bc42b2fedabe5e35f126c37e47633b71856188d9cc918dbdbeaa43401133bdd586a3291ade7e
|
data/lib/devise_zxcvbn/model.rb
CHANGED
@@ -49,7 +49,7 @@ module Devise
|
|
49
49
|
Devise::Models.config(self, :zxcvbn_tester)
|
50
50
|
|
51
51
|
def password_score(user, arg_email=nil)
|
52
|
-
password = user.respond_to?(:password) ? user.password : user
|
52
|
+
password = user.respond_to?(:password) ? user.password.to_s : user
|
53
53
|
|
54
54
|
zxcvbn_weak_words = []
|
55
55
|
|
@@ -10,6 +10,10 @@ describe DeviseZxcvbn::EmailTokeniser do
|
|
10
10
|
expect(split("björn@email.com")).to eq(%w(björn email com))
|
11
11
|
end
|
12
12
|
|
13
|
+
it "should return empty array when email is nil" do
|
14
|
+
expect(split(nil)).to eq([])
|
15
|
+
end
|
16
|
+
|
13
17
|
def split(email)
|
14
18
|
DeviseZxcvbn::EmailTokeniser.split(email)
|
15
19
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: devise_zxcvbn
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.1.
|
4
|
+
version: 2.1.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Bit Zesty
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-
|
11
|
+
date: 2016-03-21 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activemodel
|