valid_email2 3.0.4 → 3.0.5

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: a5372045f2e11f56359241a01d13777a03d6c169dc1108c9234adc06182beac0
4
- data.tar.gz: f1b317a4bf3fd29b4816b77e1f2d0f6d881b8c7068a41768decf7757cc6a9fb7
3
+ metadata.gz: 3579df33c2e2b6f61deb537f9b53429419c8e3eeee9c2f7983c73587b7831d4e
4
+ data.tar.gz: a8438e557f74f5ca789e1d45de65a2e7202232f9b69b34d4639946f55eb504bc
5
5
  SHA512:
6
- metadata.gz: 70accd0a30f611110682030b024888db8c0bc50041c5eb419c708eda0731f1724ab48db6fd6cb11c477895d8b97f878facf74b625bf4266938fdc106c428075b
7
- data.tar.gz: afcdc93b12cad86fab49924e8983d69f7884329b8cd61d39beab6d844dbf0371b859edf12bd8450febd7cf85db6cd2b44830c40457650a0534d28cce11ea9632
6
+ metadata.gz: f1a23d4278a946a56bb105839a3b4b6e4cc87830d160d7ca7ed6c82e3ae28638be3d6eb0868af73862cd0819099f36163eb42c5496ffd066c16cd547271fd907
7
+ data.tar.gz: 9c513901af108ac87275cb162eb832be8205c095b2da12486c67f479e08fdc5c113129c7dc2432058c2a4e88c487ad70fee44af87f2fa27f1cb33ff3fbb4abf8
@@ -1,3 +1,6 @@
1
+ ## Version 3.0.5
2
+ * Addresses with a dot before the @ is not valid https://github.com/micke/valid_email2/pull/136
3
+
1
4
  ## Version 3.0.4
2
5
  * https://github.com/micke/valid_email2/pull/133
3
6
 
data/README.md CHANGED
@@ -4,7 +4,7 @@
4
4
 
5
5
  Validate emails with the help of the `mail` gem instead of some clunky regexp.
6
6
  Aditionally validate that the domain has a MX record.
7
- Optionally validate against a static [list of disposable email services](vendor/disposable_emails.yml).
7
+ Optionally validate against a static [list of disposable email services](config/disposable_email_domains.yml).
8
8
  Optionally validate that the email is not subaddressed ([RFC5233](https://tools.ietf.org/html/rfc5233)).
9
9
 
10
10
  ### Why?
@@ -34,7 +34,9 @@ module ValidEmail2
34
34
  # Domain may not have two consecutive dots
35
35
  domain !~ /\.{2,}/ &&
36
36
  # Domain may not start with a dot
37
- domain !~ /^\./
37
+ domain !~ /^\./ &&
38
+ # Address may not contain a dot directly before @
39
+ address.address !~ /\.@/
38
40
  else
39
41
  false
40
42
  end
@@ -1,3 +1,3 @@
1
1
  module ValidEmail2
2
- VERSION = "3.0.4"
2
+ VERSION = "3.0.5"
3
3
  end
@@ -75,6 +75,11 @@ describe ValidEmail2 do
75
75
  user = TestUser.new(email: "foo🙈@gmail.com")
76
76
  expect(user.valid?).to be_falsy
77
77
  end
78
+
79
+ it "is invalid if the domain contains .@ consecutively" do
80
+ user = TestUser.new(email: "foo.@gmail.com")
81
+ expect(user.valid?).to be_falsy
82
+ end
78
83
  end
79
84
 
80
85
  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.0.4
4
+ version: 3.0.5
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-08-18 00:00:00.000000000 Z
11
+ date: 2019-09-26 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler