valid_email2 1.1.13 → 1.2.0

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: a9c33f192a08b9b01d4a04fd48f7e34479123499
4
- data.tar.gz: 59405ac42bd0fcdea90b297aa8be524d5c5f70a5
3
+ metadata.gz: ad0c71983288e289ae897d665b6af62678b5dea1
4
+ data.tar.gz: 7f4880e6a954b5461cb5825d65ddb7dbe8efbc7a
5
5
  SHA512:
6
- metadata.gz: ead0774e1e1060525779e1e598cd0f9f5c2cf3e7c6f683b0d95036b0a3f452ceb9135895c4957f33ba84cf7faf1fe06f44b1ff49e12f1601c44ac4a64ce0cb4b
7
- data.tar.gz: 91a5645f7a8ef96eb7c965a52ba1dc829da67b5fa8aca3f6abf8117c7a8661e916cbd6b54614aa3039dab29cf54e10860c3b20b243394ff0fbbbe565d290e3dd
6
+ metadata.gz: 19a8bba074ad965b3a6de3b313d5ce0830a4e2d7c1628190752c4e3115b604645fc18b44962cec160f22219a7eb55e031b1ef7ae513dd725f1a2974b020e1997
7
+ data.tar.gz: ae0ee7f7f8c9e08724f10f0893b2df22a411a4b0e817f9d7d84b484d52deeab6159ed7ab47ed96b489d88b1ba351e86ffc7336873d2fa201817c8eb7800a8e7a
data/.travis.yml CHANGED
@@ -1,5 +1,7 @@
1
1
  language: ruby
2
2
 
3
+ sudo: false
4
+
3
5
  rvm:
4
6
  - 2.2.0
5
7
  - 2.1.0
data/CHANGELOG.md CHANGED
@@ -1,3 +1,8 @@
1
+ ## Version 1.2.0
2
+ Disposable email providers have started to use random subdomains so valid_email2
3
+ will now correctly match against subdomains https://github.com/lisinge/valid_email2/issues/40
4
+ Updated list of disposable email providers.
5
+
1
6
  ## Version 1.1.13
2
7
  Removed husmail.com and nevar.com from the disposable email list (https://github.com/lisinge/valid_email2/pull/38)
3
8
 
@@ -1,5 +1,5 @@
1
1
  source "https://rubygems.org"
2
2
 
3
- gem "activemodel", "~> 4.0.0"
3
+ gem "activemodel", "~> 4.2.0"
4
4
 
5
5
  gemspec path: "../"
@@ -30,11 +30,17 @@ module ValidEmail2
30
30
  end
31
31
 
32
32
  def disposable?
33
- valid? && ValidEmail2.disposable_emails.include?(address.domain)
33
+ valid? &&
34
+ ValidEmail2.disposable_emails.select { |domain|
35
+ address.domain =~ (/^(.*\.)*#{domain}$/i)
36
+ }.any?
34
37
  end
35
38
 
36
39
  def blacklisted?
37
- valid? && ValidEmail2.blacklist.include?(address.domain)
40
+ valid? &&
41
+ ValidEmail2.blacklist.select { |domain|
42
+ address.domain =~ (/^(.*\.)*#{domain}$/i)
43
+ }.any?
38
44
  end
39
45
 
40
46
  def valid_mx?
@@ -1,3 +1,3 @@
1
1
  module ValidEmail2
2
- VERSION = "1.1.13"
2
+ VERSION = "1.2.0"
3
3
  end
@@ -47,15 +47,20 @@ describe ValidEmail2 do
47
47
  end
48
48
 
49
49
  describe "disposable emails" do
50
- it "should be valid when email is not in the list of disposable emails" do
50
+ it "should be valid when the domain is not in the list of disposable email providers" do
51
51
  user = TestUserDisallowDisposable.new(email: "foo@gmail.com")
52
52
  user.valid?.should be_true
53
53
  end
54
54
 
55
- it "should be invalid when email is in the list of disposable emails" do
55
+ it "should be invalid when domain is in the list of disposable email providers" do
56
56
  user = TestUserDisallowDisposable.new(email: "foo@#{ValidEmail2.disposable_emails.first}")
57
57
  user.valid?.should be_false
58
58
  end
59
+
60
+ it "should be invalid when domain is a subdomain of a disposable domain" do
61
+ user = TestUserDisallowDisposable.new(email: "foo@bar.#{ValidEmail2.disposable_emails.first}")
62
+ user.valid?.should be_false
63
+ end
59
64
  end
60
65
 
61
66
  describe "blacklisted emails" do
@@ -603,6 +603,7 @@
603
603
  - forecastertests.com
604
604
  - forgetmail.com
605
605
  - forspam.net
606
+ - foxja.com
606
607
  - foxtrotter.info
607
608
  - fr33mail.info
608
609
  - frapmail.com
@@ -885,6 +886,7 @@
885
886
  - kitnastar.com
886
887
  - klassmaster.com
887
888
  - klassmaster.net
889
+ - kloap.com
888
890
  - kludgemush.com
889
891
  - klzlk.com
890
892
  - kmhow.com
@@ -1057,6 +1059,7 @@
1057
1059
  - mailtrash.net
1058
1060
  - mailtv.net
1059
1061
  - mailtv.tv
1062
+ - mailzi.ru
1060
1063
  - mailzilla.com
1061
1064
  - mailzilla.org
1062
1065
  - mailzilla.orgmbx.cc
@@ -1234,6 +1237,7 @@
1234
1237
  - ohaaa.de
1235
1238
  - okclprojects.com
1236
1239
  - okrent.us
1240
+ - olypmall.ru
1237
1241
  - omail.pro
1238
1242
  - omnievents.org
1239
1243
  - one-time.email
@@ -1280,6 +1284,7 @@
1280
1284
  - pojok.ml
1281
1285
  - pokiemobile.com
1282
1286
  - politikerclub.de
1287
+ - pooae.com
1283
1288
  - poofy.org
1284
1289
  - pookmail.com
1285
1290
  - poopiebutt.club
@@ -1752,6 +1757,7 @@
1752
1757
  - vipxm.net
1753
1758
  - viralplays.com
1754
1759
  - vixletdev.com
1760
+ - vkcode.ru
1755
1761
  - vmailing.info
1756
1762
  - vmani.com
1757
1763
  - vmpanda.com
@@ -1855,6 +1861,7 @@
1855
1861
  - yaqp.com
1856
1862
  - yeah.net
1857
1863
  - yep.it
1864
+ - yhg.biz
1858
1865
  - ynmrealty.com
1859
1866
  - yogamaven.com
1860
1867
  - yomail.info
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.1.13
4
+ version: 1.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Micke Lisinge
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-12-11 00:00:00.000000000 Z
11
+ date: 2016-03-01 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
130
+ rubygems_version: 2.4.5.1
131
131
  signing_key:
132
132
  specification_version: 4
133
133
  summary: ActiveModel validation for email. Including MX lookup and disposable email