email_data 1605432951 → 1605433987
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +22 -0
- data/VERSION +1 -1
- data/lib/email_data.rb +1 -0
- data/lib/email_data/source/active_record.rb +8 -0
- data/lib/email_data/source/file_system.rb +4 -0
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 391be04e81ca2b32cfc69037783220e22f1b032a8f89d564ab7cf92113bb018d
|
4
|
+
data.tar.gz: 18eddc910a8496c3700c54d37779afebd393d41963cdce3a921525657180f684
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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
|
-
|
1
|
+
1605433987
|
data/lib/email_data.rb
CHANGED
@@ -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
|