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: 27e05473f188650ce1ca066798ea1e9e36de7c02
4
- data.tar.gz: f818364bd7315028a02e6918ce155a716389534e
3
+ metadata.gz: b8bb0278689426c29675ba90ed3418d35563ee51
4
+ data.tar.gz: a67a8a6f945d693da8e1e7808fe4bb2c051e3e4c
5
5
  SHA512:
6
- metadata.gz: 667fa1d6eb19a08e1af744f617750a0cc414c5101b731a7814d7f2c75a2c876fc5eb67a6ff6421177971f6033f9e171e9fa8816ce00cdcb1ee9d699ffec3c459
7
- data.tar.gz: 73df73acc005b46d4d83c877a3125ceb18169ec03d64143f47755d5343dab08a1cff4ba24ac498f118586c20e1fa22e3e29a7c924d720fd5cb85faf4454f6e9e
6
+ metadata.gz: b8d0fbc54d4ea02fd709f40abe7b9174b4c3c746a984c46d9511f2960413315676fe57f0bce78a113ae80230792582ad5435a2474a0a8e00e202407293c18d51
7
+ data.tar.gz: a40ab39d31bad6a9a64f581d09a0ae262e058560a739ffde6a80bc42b2fedabe5e35f126c37e47633b71856188d9cc918dbdbeaa43401133bdd586a3291ade7e
@@ -1,7 +1,7 @@
1
1
  module DeviseZxcvbn
2
2
  class EmailTokeniser
3
3
  def self.split(email_address)
4
- email_address.split(/[[:^word:]_]/)
4
+ email_address.to_s.split(/[[:^word:]_]/)
5
5
  end
6
6
  end
7
7
  end
@@ -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
 
@@ -1,3 +1,3 @@
1
1
  module DeviseZxcvbn
2
- VERSION = "2.1.0"
2
+ VERSION = "2.1.1"
3
3
  end
@@ -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.0
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-02-11 00:00:00.000000000 Z
11
+ date: 2016-03-21 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activemodel