valid_email2 1.2.0 → 1.2.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
  SHA1:
3
- metadata.gz: ad0c71983288e289ae897d665b6af62678b5dea1
4
- data.tar.gz: 7f4880e6a954b5461cb5825d65ddb7dbe8efbc7a
3
+ metadata.gz: 5505b7325ba2c9dcbcf5d39a8c921442c875d932
4
+ data.tar.gz: 720c196407659691c98332dba80361a1961ea0b4
5
5
  SHA512:
6
- metadata.gz: 19a8bba074ad965b3a6de3b313d5ce0830a4e2d7c1628190752c4e3115b604645fc18b44962cec160f22219a7eb55e031b1ef7ae513dd725f1a2974b020e1997
7
- data.tar.gz: ae0ee7f7f8c9e08724f10f0893b2df22a411a4b0e817f9d7d84b484d52deeab6159ed7ab47ed96b489d88b1ba351e86ffc7336873d2fa201817c8eb7800a8e7a
6
+ metadata.gz: 4997fa3f60dbac39b22ca7c89dc2523146e4299c2b29ea551329176d6474e47f8ca20095602edd51fe8389a576e9283c05acfbd21339a12453389b12221dbbe1
7
+ data.tar.gz: 6fd6ed2a30ce493e2ff77c24e668a9fb9da2385c5581df0b395050cf4afccc81127aa6e7679fa11849f71a1f5e0869490576fe24369624e01e8c8cdfa821aae3
@@ -1,3 +1,5 @@
1
+ ## Version 1.2.1
2
+ Added more sisposable email domains (https://github.com/lisinge/valid_email2/pull/41, https://github.com/lisinge/valid_email2/pull/42 and https://github.com/lisinge/valid_email2/commit/8b99a799dc126229d9bc4d79d473a0344e788d34)
1
3
  ## Version 1.2.0
2
4
  Disposable email providers have started to use random subdomains so valid_email2
3
5
  will now correctly match against subdomains https://github.com/lisinge/valid_email2/issues/40
@@ -30,17 +30,11 @@ module ValidEmail2
30
30
  end
31
31
 
32
32
  def disposable?
33
- valid? &&
34
- ValidEmail2.disposable_emails.select { |domain|
35
- address.domain =~ (/^(.*\.)*#{domain}$/i)
36
- }.any?
33
+ valid? && domain_is_in?(ValidEmail2.disposable_emails)
37
34
  end
38
35
 
39
36
  def blacklisted?
40
- valid? &&
41
- ValidEmail2.blacklist.select { |domain|
42
- address.domain =~ (/^(.*\.)*#{domain}$/i)
43
- }.any?
37
+ valid? && domain_is_in?(ValidEmail2.blacklist)
44
38
  end
45
39
 
46
40
  def valid_mx?
@@ -54,5 +48,13 @@ module ValidEmail2
54
48
 
55
49
  mx.any?
56
50
  end
51
+
52
+ private
53
+
54
+ def domain_is_in?(domain_list)
55
+ domain_list.select { |domain|
56
+ address.domain =~ (/^(.*\.)*#{domain}$/i)
57
+ }.any?
58
+ end
57
59
  end
58
60
  end
@@ -1,3 +1,3 @@
1
1
  module ValidEmail2
2
- VERSION = "1.2.0"
2
+ VERSION = "1.2.1"
3
3
  end
@@ -805,6 +805,7 @@
805
805
  - imgv.de
806
806
  - imstations.com
807
807
  - inbax.tk
808
+ - inbound.plus
808
809
  - inbox.si
809
810
  - inbox2.info
810
811
  - inboxalias.com
@@ -1294,6 +1295,7 @@
1294
1295
  - poutineyourface.com
1295
1296
  - powered.name
1296
1297
  - powlearn.com
1298
+ - pp.ua
1297
1299
  - primabananen.net
1298
1300
  - privacy.net
1299
1301
  - privatdemail.net
@@ -1703,6 +1705,7 @@
1703
1705
  - trashymail.net
1704
1706
  - trasz.com
1705
1707
  - trbvm.com
1708
+ - trbvn.com
1706
1709
  - trialmail.de
1707
1710
  - trickmail.net
1708
1711
  - trillianpro.com
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.0
4
+ version: 1.2.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: 2016-03-01 00:00:00.000000000 Z
11
+ date: 2016-03-24 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler