valid_email2 3.1.0 → 3.1.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 +3 -0
- data/config/disposable_email_domains.yml +0 -1
- data/lib/valid_email2/address.rb +4 -0
- data/lib/valid_email2/version.rb +1 -1
- data/spec/valid_email2_spec.rb +10 -0
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 63b864a75746bfe17f788bb3b57052c34f2ac4970d827c66bee6b0d13e300fae
|
4
|
+
data.tar.gz: 40ca941d76160a68fcda81b2313ba2df94d9e979d9e688d7e79e2c732cfabe14
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 0d192c49f1d30c39e94b0d3af97114e75c3c298be5201e62988650fcf90158714cd0595db060138709ebf17cd938e7b930e928ddd03a4c634820a41e12fe26aa
|
7
|
+
data.tar.gz: a19ca613dab66f590075509db6e702d583d714ea4203499d26a0b635a1ac60648a146bca65978c52b5490e81cbf2c2a036f80342ce1ad621c7bac59d42274207
|
data/CHANGELOG.md
CHANGED
@@ -14819,7 +14819,6 @@
|
|
14819
14819
|
- xvcezxodtqzbvvcfw4a.gq
|
14820
14820
|
- xvcezxodtqzbvvcfw4a.ml
|
14821
14821
|
- xvcezxodtqzbvvcfw4a.tk
|
14822
|
-
- xwaretech.com
|
14823
14822
|
- xwaretech.info
|
14824
14823
|
- xwaretech.net
|
14825
14824
|
- xwgpzgajlpw.cf
|
data/lib/valid_email2/address.rb
CHANGED
@@ -35,6 +35,10 @@ module ValidEmail2
|
|
35
35
|
domain !~ /\.{2,}/ &&
|
36
36
|
# Domain may not start with a dot
|
37
37
|
domain !~ /^\./ &&
|
38
|
+
# Domain may not start with a dash
|
39
|
+
domain !~ /^-/ &&
|
40
|
+
# Domain name may not end with a dash
|
41
|
+
domain !~ /-\./ &&
|
38
42
|
# Address may not contain a dot directly before @
|
39
43
|
address.address !~ /\.@/
|
40
44
|
else
|
data/lib/valid_email2/version.rb
CHANGED
data/spec/valid_email2_spec.rb
CHANGED
@@ -83,6 +83,16 @@ describe ValidEmail2 do
|
|
83
83
|
user = TestUser.new(email: "foo.@gmail.com")
|
84
84
|
expect(user.valid?).to be_falsy
|
85
85
|
end
|
86
|
+
|
87
|
+
it "is invalid if the domain begins with a dash" do
|
88
|
+
user = TestUser.new(email: "foo@-gmail.com")
|
89
|
+
expect(user.valid?).to be_falsy
|
90
|
+
end
|
91
|
+
|
92
|
+
it "is invalid if the domain name ends with a dash" do
|
93
|
+
user = TestUser.new(email: "foo@gmail-.com")
|
94
|
+
expect(user.valid?).to be_falsy
|
95
|
+
end
|
86
96
|
end
|
87
97
|
|
88
98
|
describe "with disposable validation" 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: 3.1.
|
4
|
+
version: 3.1.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: 2019-
|
11
|
+
date: 2019-11-26 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|