valid_email2 2.2.0 → 2.2.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGELOG.md +4 -0
- data/lib/valid_email2/address.rb +3 -1
- data/lib/valid_email2/version.rb +1 -1
- data/spec/valid_email2_spec.rb +0 -12
- 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: 4846126777b929a2c98071c1a37d123f862f27cb
|
4
|
+
data.tar.gz: 34855d8b778cdf6a2b37d367ad3c0bad450d13e9
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 85bfaea5ddd6e2d71d271f5c4cc6c5fda4b13c1e297d19357e496a6daaccf39d6b95dcf73e7b91177b26cf414ebb7a16a9e141a09fa270fd9d80c50f8d427e58
|
7
|
+
data.tar.gz: 8cbf2ca1cc79031ccdf1c5fa37131993dc2dab391191df74356a65ce8a3c07e13c398a7e0d52ff6bba55abc72688c775cdf0561c33dcffaea99e182af0b1d942
|
data/CHANGELOG.md
CHANGED
@@ -1,3 +1,7 @@
|
|
1
|
+
## Version 2.2.1
|
2
|
+
Fix regression where `ValidEmail2::Address.new` couldn't handle the address
|
3
|
+
being nil (https://github.com/lisinge/valid_email2/issues/102)
|
4
|
+
|
1
5
|
## Version 2.2.0
|
2
6
|
Removed backwards-compatability shim (https://github.com/lisinge/valid_email2/pull/79)
|
3
7
|
Removed protonmail.com from disposable email domains (https://github.com/lisinge/valid_email2/pull/99)
|
data/lib/valid_email2/address.rb
CHANGED
@@ -66,7 +66,9 @@ module ValidEmail2
|
|
66
66
|
end
|
67
67
|
|
68
68
|
def address_contain_emoticons? email_str
|
69
|
-
|
69
|
+
return false if email_str.nil?
|
70
|
+
|
71
|
+
email_str.each_char.any? { |char| char.bytesize > 1 }
|
70
72
|
end
|
71
73
|
end
|
72
74
|
end
|
data/lib/valid_email2/version.rb
CHANGED
data/spec/valid_email2_spec.rb
CHANGED
@@ -16,10 +16,6 @@ class TestUserDisallowBlacklisted < TestModel
|
|
16
16
|
validates :email, 'valid_email_2/email': { blacklist: true }
|
17
17
|
end
|
18
18
|
|
19
|
-
class BackwardsCompatibleUser < TestModel
|
20
|
-
validates :email, 'valid_email_2/email': true
|
21
|
-
end
|
22
|
-
|
23
19
|
describe ValidEmail2 do
|
24
20
|
describe "basic validation" do
|
25
21
|
subject(:user) { TestUser.new(email: "") }
|
@@ -60,14 +56,6 @@ describe ValidEmail2 do
|
|
60
56
|
user = TestUser.new(email: "foo@bar..com")
|
61
57
|
expect(user.valid?).to be_falsey
|
62
58
|
end
|
63
|
-
|
64
|
-
it "still works with the backwards-compatible syntax" do
|
65
|
-
user = BackwardsCompatibleUser.new(email: "foo@bar.com")
|
66
|
-
expect(user.valid?).to be_truthy
|
67
|
-
|
68
|
-
user = BackwardsCompatibleUser.new(email: "foo@bar")
|
69
|
-
expect(user.valid?).to be_falsey
|
70
|
-
end
|
71
59
|
end
|
72
60
|
|
73
61
|
describe "disposable emails" do
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: valid_email2
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.2.
|
4
|
+
version: 2.2.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Micke Lisinge
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2018-01-
|
11
|
+
date: 2018-01-27 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|