freemail 0.2.2 → 0.2.3

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: 1e87b19c6fe8862448fb84c03eb66ba18fe6f5f9
4
- data.tar.gz: 7b565ffca751df622d1096e44a1a41e50cea7fac
3
+ metadata.gz: 5916314e00999c480f811d3732b1478f874c020b
4
+ data.tar.gz: 12f52bc37860a7f26127832f1acf29a7a91f96eb
5
5
  SHA512:
6
- metadata.gz: f4489e77bc48d470140ac23b0ae1a330980c637269c03a103bd37d46481e726b0ac68b9b9d0bdc0d928f8a6f57e9f93fb8a61459218a09a8d1bd466cf99efb06
7
- data.tar.gz: cb3c95a9a6167f0759e30012c0673215b6b9b519efed831119b1bd6434cb037c7972b3b70dbfd2b3e38be91ef59609830fa9636053115fa62c6ee56e27c9b86e
6
+ metadata.gz: d947429630df2428e9a33e21b30f6b0d56e44b1c8707e6de72671eff0aa480f76bc21e538c1094e607a35c1345ac8506cb95862f84e8ff4fa9db2f34eb6da845
7
+ data.tar.gz: be7bc90744ccd2287505db082c538c9b74201ced97bf7aa8716d66d4d6f938d19cb0689490791571a802de55e607c7609828a2530d7c5b26378c97fef7541013
@@ -3,3 +3,6 @@ rvm:
3
3
  - 2.2.4
4
4
  - 2.1.8
5
5
  - 2.0.0-p648
6
+ script:
7
+ - bundle exec rake
8
+ - bundle exec codeclimate-test-reporter
data/README.md CHANGED
@@ -21,6 +21,8 @@ And then execute:
21
21
 
22
22
  ## Usage
23
23
 
24
+ ### Basic usage
25
+
24
26
  ```ruby
25
27
  require 'freemail'
26
28
 
@@ -34,6 +36,25 @@ Freemail.disposable?('george@mailinater.com')
34
36
  # true
35
37
  ```
36
38
 
39
+ ### API for custom domains
40
+
41
+ ```ruby
42
+ require 'freemail'
43
+
44
+ email = 'example@superlocalfreeemail.com'
45
+
46
+ Freemail.free?(email)
47
+ # false
48
+
49
+ Freemail.add_free_domains('superlocalfreeemail.com')
50
+ # or by Array
51
+ Freemail.add_free_domains(['superlocalfreeemail.com'])
52
+
53
+ Freemail.free?(email)
54
+ # true
55
+ ```
56
+
57
+
37
58
  ## Development
38
59
 
39
60
  After checking out the repo, run `bin/setup` to install dependencies. Then, run `rake spec` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
@@ -32,7 +32,6 @@ bugmenot.com
32
32
  casualdx.com
33
33
  centermail.com
34
34
  centermail.net
35
- chammy.info
36
35
  chogmail.com
37
36
  choicemail1.com
38
37
  cool.fr.nf
@@ -83,6 +82,8 @@ extremail.ru
83
82
  fakeinbox.com
84
83
  fakeinformation.com
85
84
  fantasymail.de
85
+ fificorp.com
86
+ fificorp.net
86
87
  filzmail.com
87
88
  frapmail.com
88
89
  fuckingduh.com
@@ -94,7 +95,6 @@ girlsundertheinfluence.com
94
95
  gishpuppy.com
95
96
  great-host.in
96
97
  greensloth.com
97
- grr.la
98
98
  gsrv.co.uk
99
99
  guerillamail.biz
100
100
  guerillamail.com
@@ -131,7 +131,6 @@ koszmail.pl
131
131
  kurzepost.de
132
132
  lackmail.ru
133
133
  leeching.net
134
- letthemeatspam.com
135
134
  lhsdv.com
136
135
  lifebyfood.com
137
136
  link2mail.net
@@ -177,6 +176,7 @@ moncourrier.fr.nf
177
176
  monemail.fr.nf
178
177
  monmail.fr.nf
179
178
  mt2009.com
179
+ mvrht.com
180
180
  mycleaninbox.net
181
181
  mymail-in.net
182
182
  mypartyclip.de
@@ -222,9 +222,7 @@ prtnx.com
222
222
  putthisinyourspamdatabase.com
223
223
  quickinbox.com
224
224
  rcpt.at
225
- reallymymail.com
226
225
  recode.me
227
- reconmail.com
228
226
  recursor.net
229
227
  rtrtr.com
230
228
  s0ny.net
@@ -232,7 +230,6 @@ safe-mail.net
232
230
  safersignup.de
233
231
  safetymail.info
234
232
  safetypost.de
235
- sendspamhere.com
236
233
  senseless-entertainment.com
237
234
  sharklasers.com
238
235
  shiftmail.com
@@ -251,7 +248,6 @@ spambob.net
251
248
  spambog.com
252
249
  spambog.de
253
250
  spambog.ru
254
- spambooger.com
255
251
  spambox.info
256
252
  spambox.us
257
253
  spamcannon.com
@@ -270,7 +266,6 @@ spamfree24.org
270
266
  spamgourmet.com
271
267
  spamgourmet.net
272
268
  spamgourmet.org
273
- spamherelots.com
274
269
  spamhereplease.com
275
270
  spamhole.com
276
271
  spamify.com
@@ -280,9 +275,7 @@ spamobox.com
280
275
  spamslicer.com
281
276
  spamspot.com
282
277
  spamthis.co.uk
283
- spamthisplease.com
284
278
  speed.1s.fr
285
- streetwisemail.com
286
279
  super-auswahl.de
287
280
  supergreatmail.com
288
281
  supermailer.jp
@@ -328,7 +321,6 @@ tyldd.com
328
321
  uggsrock.com
329
322
  upliftnow.com
330
323
  venompen.com
331
- veryrealemail.com
332
324
  wegwerfadresse.de
333
325
  wegwerfemail.com
334
326
  wegwerfemail.de
@@ -1069,6 +1069,8 @@ glendale.net
1069
1069
  globalfree.it
1070
1070
  globalpagan.com
1071
1071
  gmail.com
1072
+ gmail.com.br
1073
+ gmail.ru
1072
1074
  gmx.at
1073
1075
  gmx.com
1074
1076
  gmx.de
@@ -1180,6 +1182,7 @@ hot.ee
1180
1182
  hotbrev.com
1181
1183
  hotfire.net
1182
1184
  hotletter.com
1185
+ hotmail.be
1183
1186
  hotmail.ca
1184
1187
  hotmail.ch
1185
1188
  hotmail.co.il
@@ -1470,6 +1473,7 @@ listomail.com
1470
1473
  littleapple.com
1471
1474
  littleblueroom.com
1472
1475
  live.at
1476
+ live.be
1473
1477
  live.ca
1474
1478
  live.cl
1475
1479
  live.cn
@@ -3015,6 +3019,7 @@ mox.pp.ua
3015
3019
  mp4.it
3016
3020
  mr-potatohead.com
3017
3021
  msgbox.com
3022
+ msn.be
3018
3023
  msn.cn
3019
3024
  msn.com
3020
3025
  msn.nl
@@ -3793,6 +3798,7 @@ techspot.com
3793
3798
  tele2.nl
3794
3799
  telebot.com
3795
3800
  teleline.es
3801
+ telenet.be
3796
3802
  telerymd.com
3797
3803
  teleworm.us
3798
3804
  telfort.nl
@@ -25,5 +25,6 @@ Gem::Specification.new do |spec|
25
25
  spec.add_development_dependency 'bundler', '~> 1.10'
26
26
  spec.add_development_dependency 'rake', '~> 10.0'
27
27
  spec.add_development_dependency 'rspec'
28
+ spec.add_development_dependency 'simplecov'
28
29
  spec.add_development_dependency 'codeclimate-test-reporter'
29
30
  end
@@ -5,6 +5,16 @@ module Freemail
5
5
  DISPOSABLE = Hash[File.readlines("#{ROOT}/data/disposable.txt").map { |d| [d.strip.downcase] }]
6
6
  FREE = Hash[File.readlines("#{ROOT}/data/free.txt").map { |d| [d.strip.downcase] }]
7
7
 
8
+ def self.add_disposable_domains(custom_domains)
9
+ custom_domains = [custom_domains] unless custom_domains.is_a? Array
10
+ custom_domains.each { |domain| DISPOSABLE[domain] = nil }
11
+ end
12
+
13
+ def self.add_free_domains(custom_domains)
14
+ custom_domains = [custom_domains] unless custom_domains.is_a? Array
15
+ custom_domains.each { |domain| FREE[domain] = nil }
16
+ end
17
+
8
18
  def self.free?(email)
9
19
  FREE.key?(get_domain(email))
10
20
  end
@@ -14,9 +24,9 @@ module Freemail
14
24
  end
15
25
 
16
26
  def self.free_or_disposable?(email)
17
- free?(email) || disposable?(email)
27
+ free?(email) || disposable?(email)
18
28
  end
19
-
29
+
20
30
  def self.get_domain(email)
21
31
  email.split('@').last.downcase.strip
22
32
  end
@@ -1,3 +1,3 @@
1
1
  module Freemail
2
- VERSION = '0.2.2'
2
+ VERSION = '0.2.3'
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: freemail
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.2
4
+ version: 0.2.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - smudge
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2016-11-05 00:00:00.000000000 Z
11
+ date: 2017-10-16 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -52,6 +52,20 @@ dependencies:
52
52
  - - ">="
53
53
  - !ruby/object:Gem::Version
54
54
  version: '0'
55
+ - !ruby/object:Gem::Dependency
56
+ name: simplecov
57
+ requirement: !ruby/object:Gem::Requirement
58
+ requirements:
59
+ - - ">="
60
+ - !ruby/object:Gem::Version
61
+ version: '0'
62
+ type: :development
63
+ prerelease: false
64
+ version_requirements: !ruby/object:Gem::Requirement
65
+ requirements:
66
+ - - ">="
67
+ - !ruby/object:Gem::Version
68
+ version: '0'
55
69
  - !ruby/object:Gem::Dependency
56
70
  name: codeclimate-test-reporter
57
71
  requirement: !ruby/object:Gem::Requirement
@@ -111,7 +125,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
111
125
  version: '0'
112
126
  requirements: []
113
127
  rubyforge_project:
114
- rubygems_version: 2.5.1
128
+ rubygems_version: 2.6.11
115
129
  signing_key:
116
130
  specification_version: 4
117
131
  summary: '["A", "ruby", "implementation", "of", "the", "npm", "''freemail''", "module"]'