email_data 1605293459 → 1605671224

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
  SHA256:
3
- metadata.gz: 83ffbd05126735ef87e3acb077987454c1d2d261af5f1f8416362e59c47017d5
4
- data.tar.gz: eedd08764a8cf1baba4a9fc4e8382f70f21acafab0f1f4623abda335ad701db8
3
+ metadata.gz: 8f78471393cd5a69fca89d9a6250d8ec333854c6ef4938029851420b4bdf64df
4
+ data.tar.gz: 942973f41973e229441d887bb6ddf7e52f837c2eef35c2521dcc8f62c31718e3
5
5
  SHA512:
6
- metadata.gz: 7161233238b3b00d0ff7dd7bc24f59a76ae1f3fe4a5632ca517c3f01ce657581cf876b319277cebe008fe7330d0f1127346a3afee0961c9582e62dc9ac0d61bb
7
- data.tar.gz: 9ec4d1e0a47c24a5778af797c3765f88a01505c6d17d9d8035a1bfa787f9cff79edc0d918d43c97f788dcc5b69246017796cabfd709752d042e6480246398d60
6
+ metadata.gz: 7c7e94dd8604a643668910b1316b306c2752d54cdb8d1e86f3d22fd500af37b78011edbf9bc7bbd2d711f9edbd15736714c065c07c3baee1ffe2746f40868171
7
+ data.tar.gz: 4c64bf7c3cf4fa882b4ce29f4f8b339e1f58fb685f4901d9e4079327a354470e2a4c3c9a1d06fae9d59dc03540c3eb58b8b4552be5581e142af40f378402b8da
@@ -0,0 +1,4 @@
1
+ # You can read more about CODEOWNERS at
2
+ # https://help.github.com/github/creating-cloning-and-archiving-repositories/about-code-owners
3
+
4
+ * @fnando
@@ -1,3 +1,4 @@
1
- ---
1
+ # These are supported funding model platforms
2
+
2
3
  github: [fnando]
3
- custom: ["https://www.paypal.me/nandovieira/🍕"]
4
+ custom: ["https://paypal.me/nandovieira/🍕"]
@@ -0,0 +1,41 @@
1
+ ---
2
+ name: "🐛 Bug Report"
3
+ about: Report a reproducible bug or regression.
4
+ title: 'Bug: '
5
+ labels: 'Status: Unconfirmed'
6
+
7
+ ---
8
+
9
+ <!--
10
+ - Please provide a clear and concise description of what the bug is.
11
+ - If possible, add an example reproducing your issue.
12
+ - Please test using the latest version of email_data
13
+ to make sure your issue has not already been fixed.
14
+ -->
15
+
16
+ ## Description
17
+
18
+ [Add bug description here]
19
+
20
+ ## How to reproduce
21
+
22
+ [Add steps on how to reproduce this issue]
23
+
24
+ ## What do you expect
25
+
26
+ [Describe what do you expect to happen]
27
+
28
+ ## What happened instead
29
+
30
+ [Describe the actual results]
31
+
32
+ ## Software:
33
+
34
+ - Gem version: [Add gem version here]
35
+ - Ruby version: [Add version here]
36
+
37
+ ## Full backtrace
38
+
39
+ ```text
40
+ [Paste full backtrace here]
41
+ ```
@@ -0,0 +1,23 @@
1
+ ---
2
+ name: "💡 Feature request"
3
+ about: Have an idea that may be useful? Make a suggestion!
4
+ title: 'Feature Request: '
5
+ labels: 'Feature request'
6
+
7
+ ---
8
+
9
+ ## Description
10
+
11
+ _A clear and concise description of what the problem is._
12
+
13
+ ## Describe the solution
14
+
15
+ _A clear and concise description of what you want to happen._
16
+
17
+ ## Alternatives you considered
18
+
19
+ _A clear and concise description of any alternative solutions or features you've considered._
20
+
21
+ ## Additional context
22
+
23
+ _Add any other context, screenshots, links, etc about the feature request here._
@@ -0,0 +1,38 @@
1
+ <!--
2
+ If you're making a doc PR or something tiny where the below is irrelevant,
3
+ delete this template and use a short description, but in your description aim to
4
+ include both what the change is, and why it is being made, with enough context
5
+ for anyone to understand.
6
+ -->
7
+
8
+ <details>
9
+ <summary>PR Checklist</summary>
10
+
11
+ ### PR Structure
12
+
13
+ - [ ] This PR has reasonably narrow scope (if not, break it down into smaller
14
+ PRs).
15
+ - [ ] This PR avoids mixing refactoring changes with feature changes (split into
16
+ two PRs otherwise).
17
+ - [ ] This PR's title starts is concise and descriptive.
18
+
19
+ ### Thoroughness
20
+
21
+ - [ ] This PR adds tests for the most critical parts of the new functionality or
22
+ fixes.
23
+ - [ ] I've updated any docs, `.md` files, etc… affected by this change.
24
+
25
+ </details>
26
+
27
+ ### What
28
+
29
+ [TODO: Short statement about what is changing.]
30
+
31
+ ### Why
32
+
33
+ [TODO: Why this change is being made. Include any context required to understand
34
+ the why.]
35
+
36
+ ### Known limitations
37
+
38
+ [TODO or N/A]
@@ -0,0 +1,15 @@
1
+ ---
2
+ # Documentation:
3
+ # https://help.github.com/github/administering-a-repository/configuration-options-for-dependency-updates
4
+
5
+ version: 2
6
+ updates:
7
+ - package-ecosystem: "github-actions"
8
+ directory: "/"
9
+ schedule:
10
+ interval: "daily"
11
+
12
+ - package-ecosystem: "bundler"
13
+ directory: "/"
14
+ schedule:
15
+ interval: "daily"
@@ -1,4 +1,4 @@
1
- name: Tests
1
+ name: ruby-tests
2
2
 
3
3
  on:
4
4
  pull_request:
@@ -15,7 +15,7 @@ jobs:
15
15
  strategy:
16
16
  fail-fast: false
17
17
  matrix:
18
- ruby: ["2.7.x", "2.6.x", "2.5.x"]
18
+ ruby: ["2.7.x", "2.6.x"]
19
19
 
20
20
  services:
21
21
  postgres:
@@ -26,7 +26,7 @@ jobs:
26
26
  --health-retries 5
27
27
 
28
28
  steps:
29
- - uses: actions/checkout@v1
29
+ - uses: actions/checkout@v2.3.4
30
30
 
31
31
  - uses: actions/cache@v2
32
32
  with:
@@ -3,18 +3,14 @@ inherit_gem:
3
3
  rubocop-fnando: .rubocop.yml
4
4
 
5
5
  AllCops:
6
- TargetRubyVersion: 2.5
6
+ TargetRubyVersion: 2.6
7
7
  NewCops: enable
8
8
 
9
+ Metrics/BlockLength:
10
+ Enabled: false
11
+
9
12
  Metrics/AbcSize:
10
- Exclude:
11
- - test/support/**/*
13
+ Enabled: false
12
14
 
13
15
  Metrics/MethodLength:
14
- Exclude:
15
- - test/support/**/*
16
-
17
- Metrics/BlockLength:
18
- Exclude:
19
- - email_data.gemspec
20
- - test/support/**/*
16
+ Enabled: false
@@ -0,0 +1,77 @@
1
+ # Contributing to email_data
2
+
3
+ 👍🎉 First off, thanks for taking the time to contribute! 🎉👍
4
+
5
+ The following is a set of guidelines for contributing to this project. These are
6
+ mostly guidelines, not rules. Use your best judgment, and feel free to propose
7
+ changes to this document in a pull request.
8
+
9
+ ## Code of Conduct
10
+
11
+ Everyone interacting in this project's codebases, issue trackers, chat rooms and
12
+ mailing lists is expected to follow the
13
+ [code of conduct](https://github.com/fnando/email_data/blob/main/CODE_OF_CONDUCT.md).
14
+
15
+ ## Reporting bugs
16
+
17
+ This section guides you through submitting a bug report. Following these
18
+ guidelines helps maintainers and the community understand your report, reproduce
19
+ the behavior, and find related reports.
20
+
21
+ - Before creating bug reports, please check the open issues; somebody may
22
+ already have submitted something similar, and you may not need to create a new
23
+ one.
24
+ - When you are creating a bug report, please include as many details as
25
+ possible, with an example reproducing the issue.
26
+
27
+ ## Contributing with code
28
+
29
+ Before making any radicals changes, please make sure you discuss your intention
30
+ by [opening an issue on Github](https://github.com/fnando/email_data/issues).
31
+
32
+ When you're ready to make your pull request, follow checklist below to make sure
33
+ your contribution is according to how this project works.
34
+
35
+ 1. [Fork](https://help.github.com/forking/) email_data
36
+ 2. Create a topic branch - `git checkout -b my_branch`
37
+ 3. Make your changes using [descriptive commit messages](#commit-messages)
38
+ 4. Push to your branch - `git push origin my_branch`
39
+ 5. [Create a pull request](https://help.github.com/articles/creating-a-pull-request)
40
+ 6. That's it!
41
+
42
+ ## Styleguides
43
+
44
+ ### Commit messages
45
+
46
+ - Use the present tense ("Add feature" not "Added feature")
47
+ - Use the imperative mood ("Move cursor to..." not "Moves cursor to...")
48
+ - Limit the first line to 72 characters or less
49
+ - Reference issues and pull requests liberally after the first line
50
+
51
+ ### Changelog
52
+
53
+ - Add a message describing your changes to the "Unreleased" section. The
54
+ changelog message should follow the same style as the commit message.
55
+ - Prefix your message with one of the following:
56
+ - `[Added]` for new features.
57
+ - `[Changed]` for changes in existing functionality.
58
+ - `[Deprecated]` for soon-to-be removed features.
59
+ - `[Removed]` for now removed features.
60
+ - `[Fixed]` for any bug fixes.
61
+ - `[Security]` in case of vulnerabilities.
62
+
63
+ ### Ruby code
64
+
65
+ - This project uses [Rubocop](https://rubocop.org) to enforce code style. Before
66
+ submitting your changes, make sure your tests are passing and code conforms to
67
+ the expected style by running `rake`.
68
+ - Do not change the library version. This will be done by the maintainer
69
+ whenever a new version is about to be released.
70
+
71
+ ### JavaScript code
72
+
73
+ - This project uses [ESLint](https://eslint.org) to enforce code style. Before
74
+ submitting your changes, make sure your tests are passing and code conforms to
75
+ the expected style by running `yarn test:ci`.
76
+ - Do not change the library version. This will be done by the maintainer
77
+ whenever a new version is about to be released.
data/Gemfile CHANGED
@@ -2,5 +2,4 @@
2
2
 
3
3
  source "https://rubygems.org"
4
4
 
5
- # Specify your gem's dependencies in email_data.gemspec
6
5
  gemspec
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- email_data (1605293459)
4
+ email_data (1605671224)
5
5
 
6
6
  GEM
7
7
  remote: https://rubygems.org/
@@ -38,9 +38,10 @@ GEM
38
38
  rake (13.0.1)
39
39
  regexp_parser (1.8.2)
40
40
  rexml (3.2.4)
41
- root_domain (0.1.0)
41
+ root_domain (0.1.2)
42
+ email_data
42
43
  simpleidn
43
- rubocop (1.3.0)
44
+ rubocop (1.3.1)
44
45
  parallel (~> 1.10)
45
46
  parser (>= 2.7.1.5)
46
47
  rainbow (>= 2.2.2, < 4.0)
@@ -0,0 +1,20 @@
1
+ # The MIT License (MIT)
2
+
3
+ Copyright (c) 2020 Nando Vieira
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy of
6
+ this software and associated documentation files (the "Software"), to deal in
7
+ the Software without restriction, including without limitation the rights to
8
+ use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
9
+ the Software, and to permit persons to whom the Software is furnished to do so,
10
+ subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
17
+ FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
18
+ COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
19
+ IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
20
+ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
data/README.md CHANGED
@@ -1,14 +1,11 @@
1
- # EmailData
2
-
3
- - Ruby:
4
- [![Tests](https://github.com/fnando/email_data/workflows/Tests/badge.svg)](https://github.com/fnando/email_data/actions?query=workflow%3ATests)
5
- [![Gem](https://img.shields.io/gem/v/email_data.svg)](https://rubygems.org/gems/email_data)
6
- [![Gem](https://img.shields.io/gem/dt/email_data.svg?label=gems%20downloads)](https://rubygems.org/gems/email_data)
7
- - NPM:
8
- [![NPM package version](https://img.shields.io/npm/v/@fnando/email_data.svg)](https://www.npmjs.com/package/@fnando/email_data)
9
- [![NPM Downloads](https://img.shields.io/npm/dt/@fnando/email_data?label=npm%20downloads)](https://www.npmjs.com/package/@fnando/email_data)
10
- - License:
11
- ![License](https://img.shields.io/static/v1?label=License&message=MIT&color=4da3dd)
1
+ # email_data
2
+
3
+ [![Tests](https://github.com/fnando/email_data/workflows/ruby-tests/badge.svg)](https://github.com/fnando/email_data)
4
+ [![Code Climate](https://codeclimate.com/github/fnando/email_data/badges/gpa.svg)](https://codeclimate.com/github/fnando/email_data)
5
+ [![Gem version](https://img.shields.io/gem/v/email_data.svg?label=Gem%20version)](https://rubygems.org/gems/email_data)
6
+ [![Gem downloads](https://img.shields.io/gem/dt/email_data.svg?label=Gem%20downloads)](https://rubygems.org/gems/email_data)
7
+ [![NPM version](https://img.shields.io/npm/v/%40fnando%2Femail_data.svg?label=NPM%20version)](https://npmjs.org/package/@fnando/email_data)
8
+ [![NPM downloads](https://img.shields.io/npm/dt/%40fnando%2Femail_data.svg?label=NPM%20downloads)](https://npmjs.org/package/@fnando/email_data)
12
9
 
13
10
  This project is a compilation of datasets related to emails.
14
11
 
@@ -20,25 +17,21 @@ This project is a compilation of datasets related to emails.
20
17
  The data is compiled from several different sources, so thank you all for making
21
18
  this data available.
22
19
 
23
- ## Installation
20
+ ## Ruby
21
+
22
+ ### Installation
24
23
 
25
- ### Ruby
24
+ ```bash
25
+ gem install email_data
26
+ ```
26
27
 
27
- Add this line to your application's Gemfile:
28
+ Or add the following line to your project's Gemfile:
28
29
 
29
30
  ```ruby
30
31
  gem "email_data"
31
32
  ```
32
33
 
33
- And then execute:
34
-
35
- $ bundle install
36
-
37
- Or install it yourself as:
38
-
39
- $ gem install email_data
40
-
41
- #### Usage
34
+ ### Usage
42
35
 
43
36
  ```ruby
44
37
  require "email_data"
@@ -58,6 +51,18 @@ EmailData.free_email_domains
58
51
 
59
52
  # List of roles. Can be used to filter out emails like info@ or all@.
60
53
  EmailData.roles
54
+
55
+ # List of private relays like Apple's Hide My Email.
56
+ EmailData.private_relays
57
+
58
+ # List of country tlds.
59
+ EmailData.country_tlds
60
+
61
+ # List of official tlds.
62
+ EmailData.tlds
63
+
64
+ # List of second-level domains.
65
+ EmailData.slds
61
66
  ```
62
67
 
63
68
  #### Data sources
@@ -98,6 +103,12 @@ class SetupEmailData < ActiveRecord::Migration[6.1]
98
103
 
99
104
  add_index :tlds, :name, unique: true
100
105
 
106
+ create_table :slds do |t|
107
+ t.citext :name, null: false
108
+ end
109
+
110
+ add_index :slds, :name, unique: true
111
+
101
112
  create_table :country_tlds do |t|
102
113
  t.citext :name, null: false
103
114
  end
@@ -127,6 +138,12 @@ class SetupEmailData < ActiveRecord::Migration[6.1]
127
138
  end
128
139
 
129
140
  add_index :roles, :name, unique: true
141
+
142
+ create_table :private_relays do |t|
143
+ t.citext :name, null: false
144
+ end
145
+
146
+ add_index :private_relays, :name, unique: true
130
147
  end
131
148
  end
132
149
  ```
@@ -155,11 +172,13 @@ The you can load each dataset using `COPY`:
155
172
 
156
173
  ```sql
157
174
  COPY tlds (name) FROM '/usr/local/ruby/2.7.1/lib/ruby/gems/2.7.0/gems/email_data-1601479967/data/tlds.txt';
175
+ COPY slds (name) FROM '/usr/local/ruby/2.7.1/lib/ruby/gems/2.7.0/gems/email_data-1601479967/data/slds.txt';
158
176
  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
177
  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
178
  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
179
  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
180
  COPY roles (name) FROM '/usr/local/ruby/2.7.1/lib/ruby/gems/2.7.0/gems/email_data-1601479967/data/roles.txt';
181
+ 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
182
  ```
164
183
 
165
184
  Alternatively, you could create a migrate that executes that same command; given
@@ -181,16 +200,20 @@ class LoadEmailData < ActiveRecord::Migration[6.1]
181
200
  end
182
201
 
183
202
  copy.call(:tlds)
203
+ copy.call(:slds)
184
204
  copy.call(:country_tlds)
185
205
  copy.call(:disposable_emails)
186
206
  copy.call(:disposable_domains)
187
207
  copy.call(:free_email_domains)
188
208
  copy.call(:roles)
209
+ copy.call(:private_relays)
189
210
  end
190
211
  end
191
212
  ```
192
213
 
193
- ### Node.js
214
+ ## Node.js
215
+
216
+ ### Installation
194
217
 
195
218
  ```console
196
219
  $ yarn add @fnando/email_data
@@ -202,13 +225,17 @@ or
202
225
  $ npm install @fnando/email_data
203
226
  ```
204
227
 
205
- #### Usage
228
+ ### Usage
206
229
 
207
230
  ```js
208
231
  const disposableEmails = require("@fnando/email_data/data/json/disposable_emails.json");
209
232
  const disposableDomains = require("@fnando/email_data/data/json/disposable_domains.json");
210
233
  const freeEmailDomains = require("@fnando/email_data/data/json/free_email_domains.json");
211
234
  const roles = require("@fnando/email_data/data/json/roles.json");
235
+ const privateRelays = require("@fnando/email_data/data/json/private_relays.json");
236
+ const tlds = require("@fnando/email_data/data/json/tlds.json");
237
+ const slds = require("@fnando/email_data/data/json/slds.json");
238
+ const cctlds = require("@fnando/email_data/data/json/country_tlds.json");
212
239
  ```
213
240
 
214
241
  ## Dataset
@@ -224,34 +251,30 @@ like to add, please make a pull request against the files `data/manual/*.txt`.
224
251
  - `data/manual/free_email_domains.txt`: only free email services must go here.
225
252
  - `data/manual/roles.txt`: list of role-based user names like `info` or
226
253
  `no-reply`.
254
+ - `data/manual/private_relays.txt`: list of private relay services, like Apple's
255
+ Hide My Email.
227
256
 
228
- ## Development
257
+ ## Maintainer
229
258
 
230
- After checking out the repo, run `bin/setup` to install dependencies. Then, run
231
- `rake test` to run the tests. You can also run `bin/console` for an interactive
232
- prompt that will allow you to experiment.
259
+ - [Nando Vieira](https://github.com/fnando)
233
260
 
234
- To install this gem onto your local machine, run `bundle exec rake install`. To
235
- release a new version, update the version number in `version.rb`, and then run
236
- `bundle exec rake release`, which will create a git tag for the version, push
237
- git commits and tags, and push the `.gem` file to
238
- [rubygems.org](https://rubygems.org).
261
+ ## Contributors
262
+
263
+ - https://github.com/fnando/email_data/contributors
239
264
 
240
265
  ## Contributing
241
266
 
242
- Bug reports and pull requests are welcome on GitHub at
243
- https://github.com/fnando/email_data. This project is intended to be a safe,
244
- welcoming space for collaboration, and contributors are expected to adhere to
245
- the
246
- [code of conduct](https://github.com/fnando/email_data/blob/main/CODE_OF_CONDUCT.md).
267
+ For more details about how to contribute, please read
268
+ https://github.com/fnando/email_data/blob/main/CONTRIBUTING.md.
247
269
 
248
270
  ## License
249
271
 
250
272
  The gem is available as open source under the terms of the
251
- [MIT License](https://opensource.org/licenses/MIT).
273
+ [MIT License](https://opensource.org/licenses/MIT). A copy of the license can be
274
+ found at https://github.com/fnando/email_data/blob/main/LICENSE.md.
252
275
 
253
276
  ## Code of Conduct
254
277
 
255
- Everyone interacting in the EmailData project's codebases, issue trackers, chat
278
+ Everyone interacting in the email_data project's codebases, issue trackers, chat
256
279
  rooms and mailing lists is expected to follow the
257
280
  [code of conduct](https://github.com/fnando/email_data/blob/main/CODE_OF_CONDUCT.md).