valid_email2 3.1.0 → 3.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
  SHA256:
3
- metadata.gz: 6b1b27babaa4cb566d2b63dc25f726f534ad05fb9364d21c52c44c775ce12218
4
- data.tar.gz: 735df3dc625cebce4bda35547a4d3b6e8e558fc2133872c8b678e51a4891c073
3
+ metadata.gz: 63b864a75746bfe17f788bb3b57052c34f2ac4970d827c66bee6b0d13e300fae
4
+ data.tar.gz: 40ca941d76160a68fcda81b2313ba2df94d9e979d9e688d7e79e2c732cfabe14
5
5
  SHA512:
6
- metadata.gz: f4d6da63e2f4f1894605a1b83f0c92300d8fe3d8a558d09f670d890d38ef3efbf3f59dfdd49f1bda9696ddad73c0ee5b9fd33ca742f7293524cb29e83c96b57f
7
- data.tar.gz: e74ea532d0510bdd0c9c8ddcc53e88aebc384d3ea4bafe475c28a754518f90103873c814134acb2cc942720a5f889ff349a142b5164e842d81bc67a08816ce1a
6
+ metadata.gz: 0d192c49f1d30c39e94b0d3af97114e75c3c298be5201e62988650fcf90158714cd0595db060138709ebf17cd938e7b930e928ddd03a4c634820a41e12fe26aa
7
+ data.tar.gz: a19ca613dab66f590075509db6e702d583d714ea4203499d26a0b635a1ac60648a146bca65978c52b5490e81cbf2c2a036f80342ce1ad621c7bac59d42274207
@@ -1,3 +1,6 @@
1
+ ## Version 3.1.1
2
+ * Disallow domains starting or ending with `-` https://github.com/micke/valid_email2/pull/140
3
+
1
4
  ## Version 3.1.0
2
5
  * Performance improvements https://github.com/micke/valid_email2/pull/137
3
6
 
@@ -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
@@ -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
@@ -1,3 +1,3 @@
1
1
  module ValidEmail2
2
- VERSION = "3.1.0"
2
+ VERSION = "3.1.1"
3
3
  end
@@ -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.0
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-10-28 00:00:00.000000000 Z
11
+ date: 2019-11-26 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler