email_data 1605432951 → 1605433987

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
  SHA256:
3
- metadata.gz: 734f136126885e51650ab710b1c90a136471db1800766bbdd18e1b5ae2eb6cdf
4
- data.tar.gz: 9f8467609814a4c2fc2d83b487ad7444688cec418581f3de9b898ec7147d749a
3
+ metadata.gz: 391be04e81ca2b32cfc69037783220e22f1b032a8f89d564ab7cf92113bb018d
4
+ data.tar.gz: 18eddc910a8496c3700c54d37779afebd393d41963cdce3a921525657180f684
5
5
  SHA512:
6
- metadata.gz: b5d09925f23a885b5b9f3d7a215f876302cd5523ada6ebaa9e7af34d3cebaea7328906ec61d46bfd0d5e264cab34085e74f5bf5f6236387d7b85291f6caea26a
7
- data.tar.gz: '0610508d01be2a2affde40bbc128bb238c1c0204e68d1e59c81fbb3a3575106d6a9e3d2e14241be3f1b27f2699f0232557b89cd5a77e102f158fff5ec2a080cf'
6
+ metadata.gz: 3c89b25b91cf0a350ef529cdf8a425ecdedca7166bf9dc4c0f751c463ab11b821f94a5699f81f45d8fd4c5280fa001c6c406633e98b43725813bccc71eba6f6c
7
+ data.tar.gz: adf9cde0a5e8588a82a179e3b8f84d5d42e9476158bf5db8d85413c2c095b27e6a50632f859c760c23a55452280db6187405847985891ae32a8926e42a731c2a
data/README.md CHANGED
@@ -58,6 +58,18 @@ EmailData.free_email_domains
58
58
 
59
59
  # List of roles. Can be used to filter out emails like info@ or all@.
60
60
  EmailData.roles
61
+
62
+ # List of private relays like Apple's Hide My Email.
63
+ EmailData.private_relays
64
+
65
+ # List of country tlds.
66
+ EmailData.country_tlds
67
+
68
+ # List of official tlds.
69
+ EmailData.tlds
70
+
71
+ # List of second-level domains.
72
+ EmailData.slds
61
73
  ```
62
74
 
63
75
  #### Data sources
@@ -155,11 +167,13 @@ The you can load each dataset using `COPY`:
155
167
 
156
168
  ```sql
157
169
  COPY tlds (name) FROM '/usr/local/ruby/2.7.1/lib/ruby/gems/2.7.0/gems/email_data-1601479967/data/tlds.txt';
170
+ COPY slds (name) FROM '/usr/local/ruby/2.7.1/lib/ruby/gems/2.7.0/gems/email_data-1601479967/data/slds.txt';
158
171
  COPY country_tlds (name) FROM '/usr/local/ruby/2.7.1/lib/ruby/gems/2.7.0/gems/email_data-1601479967/data/country_tlds.txt';
159
172
  COPY disposable_emails (name) FROM '/usr/local/ruby/2.7.1/lib/ruby/gems/2.7.0/gems/email_data-1601479967/data/disposable_emails.txt';
160
173
  COPY disposable_domains (name) FROM '/usr/local/ruby/2.7.1/lib/ruby/gems/2.7.0/gems/email_data-1601479967/data/disposable_domains.txt';
161
174
  COPY free_email_domains (name) FROM '/usr/local/ruby/2.7.1/lib/ruby/gems/2.7.0/gems/email_data-1601479967/data/free_email_domains.txt';
162
175
  COPY roles (name) FROM '/usr/local/ruby/2.7.1/lib/ruby/gems/2.7.0/gems/email_data-1601479967/data/roles.txt';
176
+ COPY private_relays (name) FROM '/usr/local/ruby/2.7.1/lib/ruby/gems/2.7.0/gems/email_data-1601479967/data/private_relays.txt';
163
177
  ```
164
178
 
165
179
  Alternatively, you could create a migrate that executes that same command; given
@@ -181,11 +195,13 @@ class LoadEmailData < ActiveRecord::Migration[6.1]
181
195
  end
182
196
 
183
197
  copy.call(:tlds)
198
+ copy.call(:slds)
184
199
  copy.call(:country_tlds)
185
200
  copy.call(:disposable_emails)
186
201
  copy.call(:disposable_domains)
187
202
  copy.call(:free_email_domains)
188
203
  copy.call(:roles)
204
+ copy.call(:private_relays)
189
205
  end
190
206
  end
191
207
  ```
@@ -209,6 +225,10 @@ const disposableEmails = require("@fnando/email_data/data/json/disposable_emails
209
225
  const disposableDomains = require("@fnando/email_data/data/json/disposable_domains.json");
210
226
  const freeEmailDomains = require("@fnando/email_data/data/json/free_email_domains.json");
211
227
  const roles = require("@fnando/email_data/data/json/roles.json");
228
+ const privateRelays = require("@fnando/email_data/data/json/private_relays.json");
229
+ const tlds = require("@fnando/email_data/data/json/tlds.json");
230
+ const slds = require("@fnando/email_data/data/json/slds.json");
231
+ const cctlds = require("@fnando/email_data/data/json/country_tlds.json");
212
232
  ```
213
233
 
214
234
  ## Dataset
@@ -224,6 +244,8 @@ like to add, please make a pull request against the files `data/manual/*.txt`.
224
244
  - `data/manual/free_email_domains.txt`: only free email services must go here.
225
245
  - `data/manual/roles.txt`: list of role-based user names like `info` or
226
246
  `no-reply`.
247
+ - `data/manual/private_relays`: list of private relay services, like Apple's
248
+ Hide My Email.
227
249
 
228
250
  ## Development
229
251
 
data/VERSION CHANGED
@@ -1 +1 @@
1
- 1605432951
1
+ 1605433987
@@ -15,6 +15,7 @@ module EmailData
15
15
  :disposable_emails,
16
16
  :country_tlds,
17
17
  :free_email_domains,
18
+ :private_relays,
18
19
  :tlds,
19
20
  :slds,
20
21
  :roles
@@ -43,6 +43,10 @@ module EmailData
43
43
  self.table_name = "roles"
44
44
  end
45
45
 
46
+ class PrivateRelay < ApplicationRecord
47
+ self.table_name = "private_relays"
48
+ end
49
+
46
50
  class Collection
47
51
  def initialize(model)
48
52
  @model = model
@@ -84,6 +88,10 @@ module EmailData
84
88
  def self.roles
85
89
  @roles ||= Collection.new(Role)
86
90
  end
91
+
92
+ def self.private_relays
93
+ @private_relays ||= Collection.new(PrivateRelay)
94
+ end
87
95
  end
88
96
  end
89
97
  end
@@ -31,6 +31,10 @@ module EmailData
31
31
  @roles ||= load_file("roles.txt")
32
32
  end
33
33
 
34
+ def self.private_relays
35
+ @private_relays ||= load_file("private_relays.txt")
36
+ end
37
+
34
38
  def self.load_file(filename)
35
39
  EmailData
36
40
  .data_dir
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: email_data
3
3
  version: !ruby/object:Gem::Version
4
- version: '1605432951'
4
+ version: '1605433987'
5
5
  platform: ruby
6
6
  authors:
7
7
  - Nando Vieira