valid_email2 1.1.5 → 1.1.6
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +4 -0
- data/lib/valid_email2/address.rb +2 -1
- data/lib/valid_email2/version.rb +1 -1
- data/spec/valid_email2_spec.rb +5 -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: dd308777bd64592b2de0a1af1308fd80b197d1b7
|
4
|
+
data.tar.gz: 11545bb3afeb1885a8513121d59a55955408392f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 04d4aefcd05f9e893203c686ce9ac0c87a0cc81ec711ebae25b10b2f4f59d738d5dc9001d852524fd9e297a4d8796bebff199217d7e083942aca79141117f101
|
7
|
+
data.tar.gz: d035191846afc8fc0327d7429adfa228d1bfef8b71ba51c96d3ccca05743216fd47f10809944f6e590de77e5ec6458437ce83cc5a075b79b2bf58b9afc3e579c
|
data/CHANGELOG.md
CHANGED
@@ -1,3 +1,7 @@
|
|
1
|
+
## Version 1.1.6
|
2
|
+
Fix a regression which changed validation on domains that caused domains with
|
3
|
+
multiple consecutive dots to be valid.
|
4
|
+
|
1
5
|
## Version 1.1.5
|
2
6
|
Be more lenient on the mail gem version dependency to allow people to use v2.6.
|
3
7
|
Added more disposable email domains (https://github.com/lisinge/valid_email2/pull/14 and https://github.com/lisinge/valid_email2/pull/15)
|
data/lib/valid_email2/address.rb
CHANGED
@@ -21,8 +21,9 @@ module ValidEmail2
|
|
21
21
|
return false if @parse_error
|
22
22
|
|
23
23
|
if address.domain && address.address == @raw_address
|
24
|
+
domain = address.domain
|
24
25
|
# Valid address needs to have a dot in the domain
|
25
|
-
!!
|
26
|
+
!!domain.match(/\./) && !domain.match(/\.{2,}/)
|
26
27
|
else
|
27
28
|
false
|
28
29
|
end
|
data/lib/valid_email2/version.rb
CHANGED
data/spec/valid_email2_spec.rb
CHANGED
@@ -39,6 +39,11 @@ describe ValidEmail2 do
|
|
39
39
|
Mail::Address.stub(:new).and_raise(Mail::Field::ParseError.new(nil, nil, nil))
|
40
40
|
user.valid?.should be_false
|
41
41
|
end
|
42
|
+
|
43
|
+
it "shouldn't be valid if the domain constains consecutives dots" do
|
44
|
+
user = TestUser.new(email: "foo@bar..com")
|
45
|
+
user.valid?.should be_false
|
46
|
+
end
|
42
47
|
end
|
43
48
|
|
44
49
|
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: 1.1.
|
4
|
+
version: 1.1.6
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Micke Lisinge
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-02-
|
11
|
+
date: 2015-02-06 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|