disposable_mail 0.1.2 → 0.1.4

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: cef80fc41d84bd7f6208b8bca008a2e824cf1316
4
- data.tar.gz: ce58d451126b0888ffc6af982d7b2c4240d5a7e0
3
+ metadata.gz: b2cb610ff241cd9127ac7a13dc8a436dd53129fd
4
+ data.tar.gz: 9a97acecceac3cd1a2562e617db2f4b37f7de112
5
5
  SHA512:
6
- metadata.gz: 0354f414b5e30aa58cf6964fbe19e60108b355006f676fbe560d990b8bcd7fb97bf3f462d4300a40e4a72d3e5d6cbe25c582c584ebee49be2a6374062abd4d48
7
- data.tar.gz: 2f8403a24b9e333c21b42753a7591b57f7d7602e290f29174656a0b8465c80c12b3bb465e7445044463092b01a43d2cca640ff94b12086865646d33c5c41470b
6
+ metadata.gz: d212d3346c8a91e4de257c58425023b15f6fd9e30f104b60af929121ba67266aa7c7a3854320e561825974dc482e359537860044c05f1a922a4f4887e560b505
7
+ data.tar.gz: 89e78baa868d377332fd50380de8349cecbae86c36b8ecedf6a6d8bc99c80200fafc8ad74e2b194548fd327d10bdedccc0a5a8a96fcf561f7953e7d1b0069a73
data/.travis.yml CHANGED
@@ -3,7 +3,6 @@ os:
3
3
  - linux
4
4
  - osx
5
5
  rvm:
6
+ - 2.3.0
6
7
  - 2.2.2
7
8
  - 2.1.6
8
- - 2.0.0
9
- - 1.9.3
data/LICENSE.txt CHANGED
@@ -1,4 +1,4 @@
1
- Copyright (c) 2015 Oscar Esgalha
1
+ Copyright (c) 2015-2016 Oscar Esgalha
2
2
 
3
3
  MIT License
4
4
 
data/README.md CHANGED
@@ -14,11 +14,9 @@ And this gem syncs with it through a git submodule (see the data folder).
14
14
  Add this line to your application's Gemfile:
15
15
 
16
16
  ```ruby
17
- gem 'disposable_mail', '~> 0.1.0'
17
+ gem 'disposable_mail', '~> 0.1.4'
18
18
  ```
19
19
 
20
- (Notice: The `submodules: true` option is important! The data from this gem comes from a git submodule and without it, it won't work properly)
21
-
22
20
  And then execute:
23
21
 
24
22
  $ bundle
@@ -103,3 +101,27 @@ This gem comes with default messages for the following locales:
103
101
  3. Commit your changes (`git commit -am 'Add some feature'`)
104
102
  4. Push to the branch (`git push origin my-new-feature`)
105
103
  5. Create a new Pull Request
104
+
105
+ ## Changelog
106
+
107
+ ### 0.1.3 - 2016-03-11
108
+
109
+ * Slightly faster `#include?`
110
+ * Update blacklist
111
+
112
+ ### 0.1.2 - 2015-11-03
113
+
114
+ * Update blacklist
115
+
116
+ ### 0.1.1 - 2015-08-13
117
+
118
+ * Update blacklist
119
+
120
+ ### 0.1.0 - 2015-08-03
121
+
122
+ * Remove IO to load the blacklist
123
+ * Update blacklist
124
+
125
+ ### 0.0.1 - 2015-07-21
126
+
127
+ * Initial version
data/Rakefile CHANGED
@@ -2,7 +2,7 @@ require 'bundler/gem_tasks'
2
2
 
3
3
  task :test do
4
4
  $LOAD_PATH.unshift('lib', 'test')
5
- Dir.glob('./test/**/test_*.rb') { |f| require f }
5
+ require './test/disposable_mail_tests.rb'
6
6
  end
7
7
 
8
8
  task default: :test
@@ -11,7 +11,12 @@ namespace :disposable_mail do
11
11
  desc "outputs the current disposable domains"
12
12
  task :puts_domains do
13
13
  blacklist_path = 'data/disposable-email-domains/disposable_email_blacklist.conf'
14
- blacklist = File.expand_path(File.join(File.dirname(__FILE__), blacklist_path))
15
- puts File.new(blacklist).readlines.map(&:strip).to_s.gsub(/,/, ",\n")
14
+ new_list = File.open(File.expand_path(File.join(File.dirname(__FILE__), blacklist_path))).readlines.map(&:strip).to_s.gsub(/,/, ",\n")
15
+ new_list = new_list.sub(/\]/, "\n]")
16
+ new_list = new_list.sub(/\[/, "[\n")
17
+
18
+ File.open(File.expand_path(File.join(File.dirname(__FILE__), 'tmp/new_list.txt')), 'w') do |f|
19
+ f.write(new_list)
20
+ end
16
21
  end
17
22
  end
@@ -28,6 +28,7 @@ module DisposableMail
28
28
  "12houremail.com",
29
29
  "12minutemail.com",
30
30
  "12minutemail.net",
31
+ "1ce.us",
31
32
  "1chuan.com",
32
33
  "1fsdfdsfsdf.tk",
33
34
  "1mail.ml",
@@ -36,6 +37,7 @@ module DisposableMail
36
37
  "20mail.it",
37
38
  "20minutemail.com",
38
39
  "21cn.com",
40
+ "24hourmail.net",
39
41
  "2fdgdfgdfgdf.tk",
40
42
  "2prong.com",
41
43
  "30minutemail.com",
@@ -115,6 +117,7 @@ module DisposableMail
115
117
  "baxomale.ht.cx",
116
118
  "beddly.com",
117
119
  "beefmilk.com",
120
+ "big1.us",
118
121
  "bigprofessor.so",
119
122
  "bigstring.com",
120
123
  "binkmail.com",
@@ -196,6 +199,7 @@ module DisposableMail
196
199
  "dbunker.com",
197
200
  "dcemail.com",
198
201
  "deadaddress.com",
202
+ "deadchildren.org",
199
203
  "deadfake.cf",
200
204
  "deadfake.ga",
201
205
  "deadfake.ml",
@@ -207,6 +211,7 @@ module DisposableMail
207
211
  "despam.it",
208
212
  "despammed.com",
209
213
  "devnullmail.com",
214
+ "dharmatel.net",
210
215
  "dicksinhisan.us",
211
216
  "dicksinmyan.us",
212
217
  "digitalsanctuary.com",
@@ -225,13 +230,13 @@ module DisposableMail
225
230
  "disposable.ml",
226
231
  "disposableaddress.com",
227
232
  "disposableemailaddresses.com",
228
- "disposableemailaddresses:emailmiser.com",
229
233
  "disposableinbox.com",
230
234
  "dispose.it",
231
235
  "disposeamail.com",
232
236
  "disposemail.com",
233
237
  "dispostable.com",
234
238
  "divermail.com",
239
+ "dlemail.ru",
235
240
  "dm.w3internet.co.uk",
236
241
  "dm.w3internet.co.ukexample.com",
237
242
  "dodgeit.com",
@@ -283,8 +288,10 @@ module DisposableMail
283
288
  "emailias.com",
284
289
  "emailigo.de",
285
290
  "emailinfive.com",
291
+ "emailisvalid.com",
286
292
  "emaillime.com",
287
293
  "emailmiser.com",
294
+ "emailmiser.com",
288
295
  "emails.ga",
289
296
  "emailsensei.com",
290
297
  "emailspam.cf",
@@ -366,11 +373,13 @@ module DisposableMail
366
373
  "fixmail.tk",
367
374
  "fizmail.com",
368
375
  "fleckens.hu",
376
+ "flemail.ru",
369
377
  "flurred.com",
370
378
  "fly-ts.de",
371
379
  "flyspam.com",
372
380
  "footard.com",
373
381
  "forgetmail.com",
382
+ "fornow.eu",
374
383
  "fr33mail.info",
375
384
  "frapmail.com",
376
385
  "free-email.cf",
@@ -506,10 +515,12 @@ module DisposableMail
506
515
  "infocom.zp.ua",
507
516
  "insorg-mail.info",
508
517
  "instant-mail.de",
518
+ "instantemailaddress.com",
509
519
  "iozak.com",
510
520
  "ip6.li",
511
521
  "ipoo.org",
512
522
  "irish2me.com",
523
+ "iroid.com",
513
524
  "is.af",
514
525
  "iwi.net",
515
526
  "jetable.com",
@@ -543,6 +554,7 @@ module DisposableMail
543
554
  "lastmail.co",
544
555
  "lavabit.com",
545
556
  "lawlita.com",
557
+ "leeching.net",
546
558
  "letthemeatspam.com",
547
559
  "lhsdv.com",
548
560
  "lifebyfood.com",
@@ -555,6 +567,7 @@ module DisposableMail
555
567
  "login-email.ga",
556
568
  "login-email.ml",
557
569
  "login-email.tk",
570
+ "lol.meepsheep.eu",
558
571
  "lol.ovpn.to",
559
572
  "lolfreak.net",
560
573
  "lookugly.com",
@@ -564,10 +577,12 @@ module DisposableMail
564
577
  "lovemeleaveme.com",
565
578
  "loves.dicksinhisan.us",
566
579
  "loves.dicksinmyan.us",
580
+ "lr7.us",
567
581
  "lr78.com",
568
582
  "lroid.com",
569
583
  "luckymail.org",
570
584
  "lukop.dk",
585
+ "luv2.us",
571
586
  "m21.cc",
572
587
  "m4ilweb.info",
573
588
  "maboard.com",
@@ -584,6 +599,7 @@ module DisposableMail
584
599
  "mail2world.com",
585
600
  "mail333.com",
586
601
  "mail4trash.com",
602
+ "mail666.ru",
587
603
  "mailbidon.com",
588
604
  "mailbiz.biz",
589
605
  "mailblocks.com",
@@ -651,6 +667,7 @@ module DisposableMail
651
667
  "mailtrash.net",
652
668
  "mailtv.net",
653
669
  "mailtv.tv",
670
+ "mailzi.ru",
654
671
  "mailzilla.com",
655
672
  "mailzilla.org",
656
673
  "makemetheking.com",
@@ -678,6 +695,7 @@ module DisposableMail
678
695
  "monemail.fr.nf",
679
696
  "monmail.fr.nf",
680
697
  "monumentmail.com",
698
+ "ms9.mailslite.com",
681
699
  "msa.minsmail.com",
682
700
  "msb.minsmail.com",
683
701
  "mt2009.com",
@@ -732,6 +750,7 @@ module DisposableMail
732
750
  "nonspam.eu",
733
751
  "nonspammer.de",
734
752
  "noref.in",
753
+ "nospam.wins.com.br",
735
754
  "nospam.ze.tc",
736
755
  "nospam4.us",
737
756
  "nospamfor.us",
@@ -740,6 +759,7 @@ module DisposableMail
740
759
  "notsharingmy.info",
741
760
  "nowhere.org",
742
761
  "nowmymail.com",
762
+ "ntlhelp.net",
743
763
  "nurfuerspam.de",
744
764
  "nus.edu.sg",
745
765
  "nwldx.com",
@@ -748,6 +768,7 @@ module DisposableMail
748
768
  "odaymail.com",
749
769
  "odnorazovoe.ru",
750
770
  "ohaaa.de",
771
+ "olypmall.ru",
751
772
  "omail.pro",
752
773
  "oneoffemail.com",
753
774
  "oneoffmail.com",
@@ -774,6 +795,7 @@ module DisposableMail
774
795
  "politikerclub.de",
775
796
  "poofy.org",
776
797
  "pookmail.com",
798
+ "postacin.com",
777
799
  "postonline.me",
778
800
  "powered.name",
779
801
  "privacy.net",
@@ -799,6 +821,7 @@ module DisposableMail
799
821
  "realtyalerts.ca",
800
822
  "receiveee.com",
801
823
  "recode.me",
824
+ "reconmail.com",
802
825
  "recyclemail.dk",
803
826
  "redchan.it",
804
827
  "regbypass.com",
@@ -820,6 +843,7 @@ module DisposableMail
820
843
  "safetypost.de",
821
844
  "sandelf.de",
822
845
  "saynotospams.com",
846
+ "scatmail.com",
823
847
  "schafmail.de",
824
848
  "schmeissweg.tk",
825
849
  "schrott-email.de",
@@ -842,6 +866,7 @@ module DisposableMail
842
866
  "shitware.nl",
843
867
  "shmeriously.com",
844
868
  "shortmail.net",
869
+ "shotmail.ru",
845
870
  "shut.name",
846
871
  "shut.ws",
847
872
  "sibmail.com",
@@ -851,6 +876,7 @@ module DisposableMail
851
876
  "sky-ts.de",
852
877
  "slapsfromlastnight.com",
853
878
  "slaskpost.se",
879
+ "slave-auctions.net",
854
880
  "slopsbox.com",
855
881
  "slushmail.com",
856
882
  "smashmail.de",
@@ -865,7 +891,9 @@ module DisposableMail
865
891
  "sogetthis.com",
866
892
  "sohu.com",
867
893
  "solvemail.info",
894
+ "soodmail.com",
868
895
  "soodonims.com",
896
+ "spam-be-gone.com",
869
897
  "spam.la",
870
898
  "spam.su",
871
899
  "spam4.me",
@@ -890,6 +918,7 @@ module DisposableMail
890
918
  "spamcowboy.net",
891
919
  "spamcowboy.org",
892
920
  "spamday.com",
921
+ "spamdecoy.net",
893
922
  "spamex.com",
894
923
  "spamfighter.cf",
895
924
  "spamfighter.ga",
@@ -935,6 +964,7 @@ module DisposableMail
935
964
  "stop-my-spam.ga",
936
965
  "stop-my-spam.ml",
937
966
  "stop-my-spam.tk",
967
+ "streetwisemail.com",
938
968
  "stuffmail.de",
939
969
  "suioe.com",
940
970
  "super-auswahl.de",
@@ -993,6 +1023,7 @@ module DisposableMail
993
1023
  "thrma.com",
994
1024
  "throam.com",
995
1025
  "throwawayemailaddress.com",
1026
+ "throwawaymail.com",
996
1027
  "tilien.com",
997
1028
  "tittbit.in",
998
1029
  "tizi.com",
@@ -1030,13 +1061,16 @@ module DisposableMail
1030
1061
  "trashmailer.com",
1031
1062
  "trashymail.com",
1032
1063
  "trashymail.net",
1064
+ "trayna.com",
1033
1065
  "trbvm.com",
1066
+ "trbvn.com",
1034
1067
  "trialmail.de",
1035
1068
  "trickmail.net",
1036
1069
  "trillianpro.com",
1037
1070
  "tryalert.com",
1038
1071
  "turual.com",
1039
1072
  "twinmail.de",
1073
+ "ty.ceed.se",
1040
1074
  "tyldd.com",
1041
1075
  "ubismail.net",
1042
1076
  "uggsrock.com",
@@ -1057,6 +1091,7 @@ module DisposableMail
1057
1091
  "vipmail.name",
1058
1092
  "vipmail.pw",
1059
1093
  "viralplays.com",
1094
+ "vkcode.ru",
1060
1095
  "vomoto.com",
1061
1096
  "vpn.st",
1062
1097
  "vsimcard.com",
@@ -1064,6 +1099,7 @@ module DisposableMail
1064
1099
  "vztc.com",
1065
1100
  "walala.org",
1066
1101
  "walkmail.net",
1102
+ "walkmail.ru",
1067
1103
  "wants.dicksinhisan.us",
1068
1104
  "wants.dicksinmyan.us",
1069
1105
  "wasteland.rfc822.org",
@@ -1119,10 +1155,12 @@ module DisposableMail
1119
1155
  "xemaps.com",
1120
1156
  "xents.com",
1121
1157
  "xmaily.com",
1158
+ "xoxox.cc",
1122
1159
  "xyzfree.net",
1123
1160
  "yanet.me",
1124
1161
  "yapped.net",
1125
1162
  "yep.it",
1163
+ "yhg.biz",
1126
1164
  "yogamaven.com",
1127
1165
  "yomail.info",
1128
1166
  "yopmail.com",
@@ -1152,7 +1190,8 @@ module DisposableMail
1152
1190
 
1153
1191
  # Check if a mail is disposable (if it's domain is in the list)
1154
1192
  def include?(mail)
1155
- list.include?(mail[/@(.+)/, 1])
1193
+ domain = mail[/@(.+)/, 1]
1194
+ list.bsearch { |d| domain <=> d }
1156
1195
  end
1157
1196
  end
1158
1197
  end
@@ -1,3 +1,3 @@
1
1
  module DisposableMail
2
- VERSION = '0.1.2'
2
+ VERSION = '0.1.4'
3
3
  end
@@ -1,4 +1,7 @@
1
- require 'test_helper'
1
+ require 'minitest/autorun'
2
+ require 'minitest/benchmark'
3
+ require 'minitest/pride'
4
+ require 'disposable_mail'
2
5
 
3
6
  class TestDisposableMail < MiniTest::Test
4
7
  def test_list
@@ -12,9 +15,9 @@ class TestDisposableMail < MiniTest::Test
12
15
  end
13
16
 
14
17
  def test_include
15
- assert DisposableMail.include? "bot@mailinator.com"
16
- assert DisposableMail.include? "fake@guerillamail.com"
17
- assert DisposableMail.include? "johndoe@trashmail.com"
18
+ DisposableMail.list.each do |domain|
19
+ assert DisposableMail.include? "bot@#{domain}"
20
+ end
18
21
 
19
22
  refute DisposableMail.include? "legit-person@yahoo.com"
20
23
  refute DisposableMail.include? "someone@gmail.com"
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: disposable_mail
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.2
4
+ version: 0.1.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Oscar Esgalha
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-11-03 00:00:00.000000000 Z
11
+ date: 2016-04-04 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -77,8 +77,7 @@ files:
77
77
  - lib/disposable_mail/rails/railtie.rb
78
78
  - lib/disposable_mail/rails/validator.rb
79
79
  - lib/disposable_mail/version.rb
80
- - test/test_disposable_mail.rb
81
- - test/test_helper.rb
80
+ - test/disposable_mail_tests.rb
82
81
  homepage: https://github.com/oesgalha/disposable_mail
83
82
  licenses:
84
83
  - MIT
@@ -99,10 +98,9 @@ required_rubygems_version: !ruby/object:Gem::Requirement
99
98
  version: '0'
100
99
  requirements: []
101
100
  rubyforge_project:
102
- rubygems_version: 2.4.5
101
+ rubygems_version: 2.5.1
103
102
  signing_key:
104
103
  specification_version: 4
105
104
  summary: A ruby gem with a list of disposable mail domains.
106
105
  test_files:
107
- - test/test_disposable_mail.rb
108
- - test/test_helper.rb
106
+ - test/disposable_mail_tests.rb
data/test/test_helper.rb DELETED
@@ -1,3 +0,0 @@
1
- require 'minitest/autorun'
2
- require 'minitest/pride'
3
- require 'disposable_mail'