valid_email2 1.2.10 → 1.2.11

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
  SHA1:
3
- metadata.gz: 62bcd688e250d8f777cde7f86dd504db4a3d9d7c
4
- data.tar.gz: 4f9b4dd2624670e9dd1c41ca961f9a3ea3f2a450
3
+ metadata.gz: 70bf084c11ce6a14ff0a454d28b483e91a0b89d7
4
+ data.tar.gz: a78ee2940eb8ca19871678c14fe428a142e83fc9
5
5
  SHA512:
6
- metadata.gz: 8def84bad60dd1219989ab1885d0a9dbed6cd3ed0e8f3e271cabcdc4094f412e5d350b812a61f6425983d5e8d0cd83b8c50bb6edb05309d6303b00fcbc6197d5
7
- data.tar.gz: c2742f6863b22c76f60643136c342da3414452e09e4d0164ba3fcfa3bda068dd45ec6eece46ae72bddb94b4f2ddfab0abd809678fe762e615382da35717874c8
6
+ metadata.gz: 033c7b6c3736f0aedc6f45bfde3bed3b72bb92921ea0302d7d3246f64cc898a6c4ecd09f0155963a9947669ab54b754c346ed4e4990ed8fa3c7a4c810349dd04
7
+ data.tar.gz: c5b2a4b50611dad919ec1c7f9821a3e19649271c749938996226a2b3cbd9b3a1d08d0626232575a10e40ce063616b44498e2df82aaf653863b9754786c2c877a
data/CHANGELOG.md CHANGED
@@ -1,3 +1,6 @@
1
+ ## Version 1.2.11
2
+ Properly test that domain is a proper domain and not just a TLD (https://github.com/lisinge/valid_email2/issues/63)
3
+
1
4
  ## Version 1.2.10
2
5
  Improve performance in domain matching (https://github.com/lisinge/valid_email2/pull/62)
3
6
  Add clipmail.eu (https://github.com/lisinge/valid_email2/pull/61)
@@ -22,8 +22,8 @@ module ValidEmail2
22
22
 
23
23
  if address.domain && address.address == @raw_address
24
24
  domain = address.domain
25
- # Valid address needs to have a dot in the domain
26
- !!domain.match(/\./) && !domain.match(/\.{2,}/)
25
+ # Valid address needs to have a dot in the domain but not start with a dot
26
+ !!domain.match(/\./) && !domain.match(/\.{2,}/) && !domain.match(/^\./)
27
27
  else
28
28
  false
29
29
  end
@@ -1,3 +1,3 @@
1
1
  module ValidEmail2
2
- VERSION = "1.2.10"
2
+ VERSION = "1.2.11"
3
3
  end
@@ -25,7 +25,7 @@ describe ValidEmail2 do
25
25
  end
26
26
 
27
27
  it "should not be valid when domain is missing" do
28
- user = TestUser.new(email: "foo")
28
+ user = TestUser.new(email: "foo@.com")
29
29
  expect(user.valid?).to be_falsey
30
30
  end
31
31
 
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.2.10
4
+ version: 1.2.11
5
5
  platform: ruby
6
6
  authors:
7
7
  - Micke Lisinge
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-01-18 00:00:00.000000000 Z
11
+ date: 2017-03-17 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -127,7 +127,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
127
127
  version: '0'
128
128
  requirements: []
129
129
  rubyforge_project:
130
- rubygems_version: 2.4.5.1
130
+ rubygems_version: 2.5.1
131
131
  signing_key:
132
132
  specification_version: 4
133
133
  summary: ActiveModel validation for email. Including MX lookup and disposable email