email-provider-info 0.0.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA256:
3
+ metadata.gz: eae2d9571d123eeb63c6978759e61c4c4dd18ec47f2001b41f3d4cd0c8c0be6c
4
+ data.tar.gz: 91d878141b423b2f63773924104f92dcab2b235071e8ce88c7207946f3780686
5
+ SHA512:
6
+ metadata.gz: '00348a72ce28a035623c9d5b3d2647138da1aa7923c5ec3f3ac2288b59a6d16307f3661cb03461612d4f05f0f1b19b7dcc8ed715879b9b0ebaf2ad1c59990efc'
7
+ data.tar.gz: a7def7709e1546b8ce45b46f204731e7337204de3183de8f5e9671674271741f4fab77abebebb2506faad494786ff55d967baa8a7d207e8d0489ead0d6543fa4
data/.eslintrc.js ADDED
@@ -0,0 +1,4 @@
1
+ module.exports = {
2
+ root: true,
3
+ extends: ["@fnando/codestyle/javascript", "@fnando/codestyle/typescript"]
4
+ };
@@ -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
@@ -0,0 +1,4 @@
1
+ # These are supported funding model platforms
2
+ ---
3
+ github: [fnando]
4
+ custom: ["https://paypal.me/nandovieira/๐Ÿ•"]
@@ -0,0 +1,40 @@
1
+ ---
2
+ name: "๐Ÿ› Bug Report"
3
+ about: Report a reproducible bug or regression.
4
+ title: "Bug: "
5
+ labels: "Status: Unconfirmed"
6
+ ---
7
+
8
+ <!--
9
+ - Please provide a clear and concise description of what the bug is.
10
+ - If possible, add an example reproducing your issue.
11
+ - Please test using the latest version of email-provider-info
12
+ to make sure your issue has not already been fixed.
13
+ -->
14
+
15
+ ## Description
16
+
17
+ [Add bug description here]
18
+
19
+ ## How to reproduce
20
+
21
+ [Add steps on how to reproduce this issue]
22
+
23
+ ## What do you expect
24
+
25
+ [Describe what do you expect to happen]
26
+
27
+ ## What happened instead
28
+
29
+ [Describe the actual results]
30
+
31
+ ## Software:
32
+
33
+ - Gem version: [Add gem version here]
34
+ - Ruby version: [Add version here]
35
+
36
+ ## Full backtrace
37
+
38
+ ```text
39
+ [Paste full backtrace here]
40
+ ```
@@ -0,0 +1,5 @@
1
+ ---
2
+ contact_links:
3
+ - name: "๐Ÿคจ Q&A"
4
+ url: https://github.com/fnando/email-provider-info/discussions/new?category=q-a
5
+ about: Have a question? Ask it away here!
@@ -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,20 @@
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: npm
13
+ directory: "/"
14
+ schedule:
15
+ interval: "daily"
16
+
17
+ - package-ecosystem: bundler
18
+ directory: "/"
19
+ schedule:
20
+ interval: "daily"
@@ -0,0 +1,46 @@
1
+ ---
2
+ name: js-tests
3
+
4
+ on:
5
+ pull_request_target:
6
+ push:
7
+ branches:
8
+ - main
9
+ workflow_dispatch:
10
+ inputs: {}
11
+
12
+ jobs:
13
+ build:
14
+ name: Tests with Node ${{ matrix.node }}
15
+ runs-on: "ubuntu-latest"
16
+ if: |
17
+ github.actor == 'dependabot[bot]' && github.event_name == 'pull_request_target' ||
18
+ github.actor != 'dependabot[bot]'
19
+ strategy:
20
+ fail-fast: false
21
+ matrix:
22
+ node: ["16", "17"]
23
+
24
+ steps:
25
+ - uses: actions/checkout@v2.4.0
26
+
27
+ - uses: actions/cache@v2
28
+ with:
29
+ path: vendor/bundle
30
+ key: >
31
+ ${{ runner.os }}-${{ matrix.node }}-npm-${{
32
+ hashFiles('package.json') }}
33
+
34
+ - name: Set up Node
35
+ uses: actions/setup-node@v2.5.1
36
+ with:
37
+ node-version: ${{ matrix.node }}
38
+
39
+ - name: Install npm dependencies
40
+ run: |
41
+ yarn install
42
+
43
+ - name: Run Tests
44
+ run: |
45
+ yarn test:ci
46
+ yarn lint
@@ -0,0 +1,52 @@
1
+ ---
2
+ name: ruby-tests
3
+
4
+ on:
5
+ pull_request_target:
6
+ push:
7
+ branches:
8
+ - main
9
+ workflow_dispatch:
10
+ inputs: {}
11
+
12
+ jobs:
13
+ build:
14
+ name: Tests with Ruby ${{ matrix.ruby }} and ${{ matrix.gemfile }}
15
+ runs-on: "ubuntu-latest"
16
+ if: |
17
+ github.actor == 'dependabot[bot]' && github.event_name == 'pull_request_target' ||
18
+ github.actor != 'dependabot[bot]'
19
+ strategy:
20
+ fail-fast: false
21
+ matrix:
22
+ ruby: ["2.7", "3.0", "3.1"]
23
+ gemfile:
24
+ - Gemfile
25
+
26
+ steps:
27
+ - uses: actions/checkout@v1
28
+
29
+ - uses: actions/cache@v2
30
+ with:
31
+ path: vendor/bundle
32
+ key: >
33
+ ${{ runner.os }}-${{ matrix.ruby }}-gems-${{ hashFiles(matrix.gemfile) }}
34
+
35
+ - name: Set up Ruby
36
+ uses: ruby/setup-ruby@v1
37
+ with:
38
+ ruby-version: ${{ matrix.ruby }}
39
+
40
+ - name: Install gem dependencies
41
+ env:
42
+ BUNDLE_GEMFILE: ${{ matrix.gemfile }}
43
+ run: |
44
+ gem install bundler
45
+ bundle config path vendor/bundle
46
+ bundle update --jobs 4 --retry 3
47
+
48
+ - name: Run Tests
49
+ env:
50
+ BUNDLE_GEMFILE: ${{ matrix.gemfile }}
51
+ run: |
52
+ bundle exec rake
data/.gitignore ADDED
@@ -0,0 +1,12 @@
1
+ /.bundle/
2
+ /.yardoc
3
+ /_yardoc/
4
+ /coverage/
5
+ /doc/
6
+ /pkg/
7
+ /spec/reports/
8
+ /tmp/
9
+ /vendor/
10
+ *.log
11
+ *.lock
12
+ *.tgz
data/.rubocop.yml ADDED
@@ -0,0 +1,14 @@
1
+ ---
2
+ inherit_gem:
3
+ rubocop-fnando: .rubocop.yml
4
+
5
+ AllCops:
6
+ TargetRubyVersion: 2.7
7
+ NewCops: enable
8
+ Exclude:
9
+ - vendor/**/*
10
+ - gemfiles/**/*
11
+
12
+ Naming/FileName:
13
+ Exclude:
14
+ - lib/email-provider-info.rb
data/CHANGELOG.md ADDED
@@ -0,0 +1,32 @@
1
+ # Changelog
2
+
3
+ <!--
4
+ Prefix your message with one of the following:
5
+
6
+ - [Added] for new features.
7
+ - [Changed] for changes in existing functionality.
8
+ - [Deprecated] for soon-to-be removed features.
9
+ - [Removed] for now removed features.
10
+ - [Fixed] for any bug fixes.
11
+ - [Security] in case of vulnerabilities.
12
+ -->
13
+
14
+ ## NPM
15
+
16
+ ### v0.0.3 - 2022-01-18
17
+
18
+ - [Added] Microsoft Outlook detection.
19
+ - [Added] Hey detection.
20
+ - [Added] Yandex detection.
21
+ - [Added] Tutanota detection.
22
+ - [Added] GMX detection.
23
+
24
+ ### v0.0.1 - 2022-01-15
25
+
26
+ - Initial release.
27
+
28
+ ## Rubygems
29
+
30
+ ### v0.0.1 - 2022-01-23
31
+
32
+ - Initial release.
@@ -0,0 +1,74 @@
1
+ # Contributor Covenant Code of Conduct
2
+
3
+ ## Our Pledge
4
+
5
+ In the interest of fostering an open and welcoming environment, we as
6
+ contributors and maintainers pledge to making participation in our project and
7
+ our community a harassment-free experience for everyone, regardless of age, body
8
+ size, disability, ethnicity, gender identity and expression, level of experience,
9
+ nationality, personal appearance, race, religion, or sexual identity and
10
+ orientation.
11
+
12
+ ## Our Standards
13
+
14
+ Examples of behavior that contributes to creating a positive environment
15
+ include:
16
+
17
+ * Using welcoming and inclusive language
18
+ * Being respectful of differing viewpoints and experiences
19
+ * Gracefully accepting constructive criticism
20
+ * Focusing on what is best for the community
21
+ * Showing empathy towards other community members
22
+
23
+ Examples of unacceptable behavior by participants include:
24
+
25
+ * The use of sexualized language or imagery and unwelcome sexual attention or
26
+ advances
27
+ * Trolling, insulting/derogatory comments, and personal or political attacks
28
+ * Public or private harassment
29
+ * Publishing others' private information, such as a physical or electronic
30
+ address, without explicit permission
31
+ * Other conduct which could reasonably be considered inappropriate in a
32
+ professional setting
33
+
34
+ ## Our Responsibilities
35
+
36
+ Project maintainers are responsible for clarifying the standards of acceptable
37
+ behavior and are expected to take appropriate and fair corrective action in
38
+ response to any instances of unacceptable behavior.
39
+
40
+ Project maintainers have the right and responsibility to remove, edit, or
41
+ reject comments, commits, code, wiki edits, issues, and other contributions
42
+ that are not aligned to this Code of Conduct, or to ban temporarily or
43
+ permanently any contributor for other behaviors that they deem inappropriate,
44
+ threatening, offensive, or harmful.
45
+
46
+ ## Scope
47
+
48
+ This Code of Conduct applies both within project spaces and in public spaces
49
+ when an individual is representing the project or its community. Examples of
50
+ representing a project or community include using an official project e-mail
51
+ address, posting via an official social media account, or acting as an appointed
52
+ representative at an online or offline event. Representation of a project may be
53
+ further defined and clarified by project maintainers.
54
+
55
+ ## Enforcement
56
+
57
+ Instances of abusive, harassing, or otherwise unacceptable behavior may be
58
+ reported by contacting the project team at me@fnando.com. All
59
+ complaints will be reviewed and investigated and will result in a response that
60
+ is deemed necessary and appropriate to the circumstances. The project team is
61
+ obligated to maintain confidentiality with regard to the reporter of an incident.
62
+ Further details of specific enforcement policies may be posted separately.
63
+
64
+ Project maintainers who do not follow or enforce the Code of Conduct in good
65
+ faith may face temporary or permanent repercussions as determined by other
66
+ members of the project's leadership.
67
+
68
+ ## Attribution
69
+
70
+ This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4,
71
+ available at [https://contributor-covenant.org/version/1/4][version]
72
+
73
+ [homepage]: https://contributor-covenant.org
74
+ [version]: https://contributor-covenant.org/version/1/4/
data/CONTRIBUTING.md ADDED
@@ -0,0 +1,81 @@
1
+ # Contributing to email-provider-info
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-provider-info/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
31
+ [opening an issue on Github](https://github.com/fnando/email-provider-info/issues).
32
+
33
+ When you're ready to make your pull request, follow checklist below to make sure
34
+ your contribution is according to how this project works.
35
+
36
+ 1. [Fork](https://help.github.com/forking/) email-provider-info
37
+ 2. Create a topic branch - `git checkout -b my_branch`
38
+ 3. Make your changes using [descriptive commit messages](#commit-messages)
39
+ 4. Update CHANGELOG.md describing your changes by adding an entry to the
40
+ "Unreleased" section. If this section is not available, create one right
41
+ before the last version.
42
+ 5. Push to your branch - `git push origin my_branch`
43
+ 6. [Create a pull request](https://help.github.com/articles/creating-a-pull-request)
44
+ 7. That's it!
45
+
46
+ ## Styleguides
47
+
48
+ ### Commit messages
49
+
50
+ - Use the present tense ("Add feature" not "Added feature")
51
+ - Use the imperative mood ("Move cursor to..." not "Moves cursor to...")
52
+ - Limit the first line to 72 characters or less
53
+ - Reference issues and pull requests liberally after the first line
54
+
55
+ ### Changelog
56
+
57
+ - Add a message describing your changes to the "Unreleased" section. The
58
+ changelog message should follow the same style as the commit message.
59
+ - Prefix your message with one of the following:
60
+ - `[Added]` for new features.
61
+ - `[Changed]` for changes in existing functionality.
62
+ - `[Deprecated]` for soon-to-be removed features.
63
+ - `[Removed]` for now removed features.
64
+ - `[Fixed]` for any bug fixes.
65
+ - `[Security]` in case of vulnerabilities.
66
+
67
+ ### Ruby code
68
+
69
+ - This project uses [Rubocop](https://rubocop.org) to enforce code style. Before
70
+ submitting your changes, make sure your tests are passing and code conforms to
71
+ the expected style by running `rake`.
72
+ - Do not change the library version. This will be done by the maintainer
73
+ whenever a new version is about to be released.
74
+
75
+ ### JavaScript code
76
+
77
+ - This project uses [ESLint](https://eslint.org) to enforce code style. Before
78
+ submitting your changes, make sure your tests are passing and code conforms to
79
+ the expected style by running `yarn test:ci`.
80
+ - Do not change the library version. This will be done by the maintainer
81
+ whenever a new version is about to be released.
data/Gemfile ADDED
@@ -0,0 +1,5 @@
1
+ # frozen_string_literal: true
2
+
3
+ source "https://rubygems.org"
4
+
5
+ gemspec
data/LICENSE.md ADDED
@@ -0,0 +1,20 @@
1
+ # The MIT License (MIT)
2
+
3
+ Copyright (c) 2022 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 ADDED
@@ -0,0 +1,116 @@
1
+ # email-provider-info
2
+
3
+ Find email provider service based on the email address.
4
+
5
+ [![JavaScript Tests](https://github.com/fnando/email-provider-info/workflows/js-tests/badge.svg)](https://github.com/fnando/email-provider-info)
6
+ [![Ruby Tests](https://github.com/fnando/email-provider-info/workflows/ruby-tests/badge.svg)](https://github.com/fnando/email-provider-info)
7
+ [![NPM](https://img.shields.io/npm/v/@fnando/email-provider-info.svg)](https://npmjs.org/package/@fnando/email-provider-info)
8
+ [![NPM](https://img.shields.io/npm/dt/@fnando/email-provider-info.svg)](https://npmjs.org/package/@fnando/email-provider-info)
9
+ [![Gem](https://img.shields.io/gem/v/email-provider-info.svg)](https://rubygems.org/gems/email-provider-info)
10
+ [![Gem](https://img.shields.io/gem/dt/email-provider-info.svg)](https://rubygems.org/gems/email-provider-info)
11
+ [![MIT License](https://img.shields.io/:License-MIT-blue.svg)](https://tldrlegal.com/license/mit-license)
12
+
13
+ Supported services:
14
+
15
+ - AOL
16
+ - Apple iCloud
17
+ - BOL
18
+ - Fastmail
19
+ - Gmail
20
+ - GMX
21
+ - Hey
22
+ - Mail.ru
23
+ - Outlook
24
+ - ProtonMail
25
+ - Tutanota
26
+ - UOL
27
+ - Yahoo!
28
+ - Yandex
29
+ - Zoho
30
+
31
+ ## Installation
32
+
33
+ This package is available as a NPM and Rubygems package. To install it, use the
34
+ following command:
35
+
36
+ ### JavaScript
37
+
38
+ ```bash
39
+ npm install @fnando/email-provider-info --save
40
+ ```
41
+
42
+ If you're using Yarn (and you should):
43
+
44
+ ```bash
45
+ yarn add @fnando/email-provider-info
46
+ ```
47
+
48
+ ### Ruby
49
+
50
+ ```bash
51
+ gem install email_provider_info
52
+ ```
53
+
54
+ Or add the following line to your project's Gemfile:
55
+
56
+ ```ruby
57
+ gem "email-provider-info"
58
+ ```
59
+
60
+ ## Usage
61
+
62
+ ### JavaScript
63
+
64
+ ```js
65
+ import { getEmailProvider } from "@fnando/email-provider-info";
66
+
67
+ const { name, url } = getEmailProvider("example@gmail.com");
68
+
69
+ if (url) {
70
+ // Do something
71
+ }
72
+ ```
73
+
74
+ ### Ruby
75
+
76
+ ```ruby
77
+ require "email_provider_info"
78
+
79
+ provider = EmailProviderInfo.call("email@gmail.com")
80
+
81
+ if provider
82
+ # Do something
83
+ end
84
+ ```
85
+
86
+ ### Motivation
87
+
88
+ The idea behind this package is enabling something like this, where users can go
89
+ to their email service provider with just one click.
90
+
91
+ ![Example: Show button that goes straight to Gmail](https://raw.githubusercontent.com/fnando/email-provider-info/main/sample.png)
92
+
93
+ ## Maintainer
94
+
95
+ - [Nando Vieira](https://github.com/fnando)
96
+
97
+ ## Contributors
98
+
99
+ - https://github.com/fnando/email-provider-info/contributors
100
+
101
+ ## Contributing
102
+
103
+ For more details about how to contribute, please read
104
+ https://github.com/fnando/email-provider-info/blob/main/CONTRIBUTING.md.
105
+
106
+ ## License
107
+
108
+ The gem is available as open source under the terms of the
109
+ [MIT License](https://opensource.org/licenses/MIT). A copy of the license can be
110
+ found at https://github.com/fnando/email-provider-info/blob/main/LICENSE.md.
111
+
112
+ ## Code of Conduct
113
+
114
+ Everyone interacting in the email-provider-info project's codebases, issue
115
+ trackers, chat rooms and mailing lists is expected to follow the
116
+ [code of conduct](https://github.com/fnando/email-provider-info/blob/main/CODE_OF_CONDUCT.md).
data/Rakefile ADDED
@@ -0,0 +1,15 @@
1
+ # frozen_string_literal: true
2
+
3
+ require "bundler/gem_tasks"
4
+ require "rake/testtask"
5
+ require "rubocop/rake_task"
6
+
7
+ Rake::TestTask.new(:test) do |t|
8
+ t.libs << "test"
9
+ t.libs << "lib"
10
+ t.test_files = FileList["test/**/*_test.rb"]
11
+ end
12
+
13
+ RuboCop::RakeTask.new
14
+
15
+ task default: %i[test rubocop]
data/babel.config.json ADDED
@@ -0,0 +1,15 @@
1
+ {
2
+ "presets": ["@babel/preset-env"],
3
+ "plugins": [
4
+ [
5
+ "module-resolver",
6
+ {
7
+ "extensions": [".js", ".ts"],
8
+ "root": ["./src"],
9
+ "alias": {
10
+ "~": "./src"
11
+ }
12
+ }
13
+ ]
14
+ ]
15
+ }
@@ -0,0 +1,220 @@
1
+ [
2
+ {
3
+ "name": "Gmail",
4
+ "url": "https://mail.google.com/",
5
+ "hosts": ["gmail.com", "googlemail.com"]
6
+ },
7
+
8
+ {
9
+ "name": "Yahoo!",
10
+ "url": "https://mail.yahoo.com/",
11
+ "hosts": [
12
+ "yahoo.com",
13
+ "yahoo.es",
14
+ "yahoo.it",
15
+ "yahoo.de",
16
+ "yahoo.fr",
17
+ "yahoo.in",
18
+ "yahoo.ca",
19
+ "yahoo.com.br",
20
+ "yahoo.com.au",
21
+ "yahoo.com.ar",
22
+ "yahoo.com.mx",
23
+ "yahoo.com.sg",
24
+ "yahoo.co.id",
25
+ "yahoo.co.in",
26
+ "yahoo.co.jp",
27
+ "yahoo.co.uk"
28
+ ]
29
+ },
30
+
31
+ {
32
+ "name": "Fastmail",
33
+ "url": "https://www.fastmail.com/mail/",
34
+ "hosts": [
35
+ "123mail.org",
36
+ "150mail.com",
37
+ "150ml.com",
38
+ "16mail.com",
39
+ "2-mail.com",
40
+ "4email.net",
41
+ "50mail.com",
42
+ "airpost.net",
43
+ "allmail.net",
44
+ "bestmail.us",
45
+ "cluemail.com",
46
+ "elitemail.org",
47
+ "emailcorner.net",
48
+ "emailengine.net",
49
+ "emailengine.org",
50
+ "emailgroups.net",
51
+ "emailplus.org",
52
+ "emailuser.net",
53
+ "eml.cc",
54
+ "f-m.fm",
55
+ "fast-email.com",
56
+ "fast-mail.org",
57
+ "fastem.com",
58
+ "fastemail.us",
59
+ "fastemailer.com",
60
+ "fastest.cc",
61
+ "fastimap.com",
62
+ "fastmail.cn",
63
+ "fastmail.co.uk",
64
+ "fastmail.com",
65
+ "fastmail.com.au",
66
+ "fastmail.de",
67
+ "fastmail.es",
68
+ "fastmail.fm",
69
+ "fastmail.fr",
70
+ "fastmail.im",
71
+ "fastmail.in",
72
+ "fastmail.jp",
73
+ "fastmail.mx",
74
+ "fastmail.net",
75
+ "fastmail.nl",
76
+ "fastmail.org",
77
+ "fastmail.se",
78
+ "fastmail.to",
79
+ "fastmail.tw",
80
+ "fastmail.uk",
81
+ "fastmail.us",
82
+ "fastmailbox.net",
83
+ "fastmessaging.com",
84
+ "fea.st",
85
+ "fmail.co.uk",
86
+ "fmailbox.com",
87
+ "fmgirl.com",
88
+ "fmguy.com",
89
+ "ftml.net",
90
+ "h-mail.us",
91
+ "hailmail.net",
92
+ "imap-mail.com",
93
+ "imap.cc",
94
+ "imapmail.org",
95
+ "inoutbox.com",
96
+ "internet-e-mail.com",
97
+ "internet-mail.org",
98
+ "internetemails.net",
99
+ "internetmailing.net",
100
+ "jetemail.net",
101
+ "justemail.net",
102
+ "letterboxes.org",
103
+ "mail-central.com",
104
+ "mail-page.com",
105
+ "mailandftp.com",
106
+ "mailas.com",
107
+ "mailbolt.com",
108
+ "mailc.net",
109
+ "mailcan.com",
110
+ "mailforce.net",
111
+ "mailftp.com",
112
+ "mailhaven.com",
113
+ "mailingaddress.org",
114
+ "mailite.com",
115
+ "mailmight.com",
116
+ "mailnew.com",
117
+ "mailsent.net",
118
+ "mailservice.ms",
119
+ "mailup.net",
120
+ "mailworks.org",
121
+ "ml1.net",
122
+ "mm.st",
123
+ "myfastmail.com",
124
+ "mymacmail.com",
125
+ "nospammail.net",
126
+ "ownmail.net",
127
+ "petml.com",
128
+ "postinbox.com",
129
+ "postpro.net",
130
+ "proinbox.com",
131
+ "promessage.com",
132
+ "realemail.net",
133
+ "reallyfast.biz",
134
+ "reallyfast.info",
135
+ "rushpost.com",
136
+ "sent.as",
137
+ "sent.at",
138
+ "sent.com",
139
+ "speedpost.net",
140
+ "speedymail.org",
141
+ "ssl-mail.com",
142
+ "swift-mail.com",
143
+ "the-fastest.net",
144
+ "the-quickest.com",
145
+ "theinternetemail.com",
146
+ "veryfast.biz",
147
+ "veryspeedy.net",
148
+ "warpmail.net",
149
+ "xsmail.com",
150
+ "yepmail.net",
151
+ "your-mail.com"
152
+ ]
153
+ },
154
+ {
155
+ "name": "ProtonMail",
156
+ "url": "https://mail.protonmail.com/",
157
+ "hosts": ["protonmail.com", "protonmail.ch", "pm.me"]
158
+ },
159
+ {
160
+ "name": "Apple iCloud",
161
+ "url": "https://www.icloud.com/mail/",
162
+ "hosts": ["icloud.com", "me.com", "mac.com"]
163
+ },
164
+ {
165
+ "name": "Mail.ru",
166
+ "url": "https://mail.ru/",
167
+ "hosts": ["mail.ru", "bk.ru", "inbox.ru", "list.ru"]
168
+ },
169
+ {
170
+ "name": "AOL",
171
+ "url": "https://aol.com/",
172
+ "hosts": ["aol.com"]
173
+ },
174
+ {
175
+ "name": "Zoho",
176
+ "url": "https://mail.zoho.com/",
177
+ "hosts": ["zohomail.com", "zoho.com"]
178
+ },
179
+ {
180
+ "name": "BOL",
181
+ "url": "https://email.bol.uol.com.br/",
182
+ "hosts": ["bol.com.br"]
183
+ },
184
+ {
185
+ "name": "UOL",
186
+ "url": "https://email.uol.com.br/",
187
+ "hosts": ["uol.com.br"]
188
+ },
189
+ {
190
+ "name": "Outlook",
191
+ "url": "https://outlook.live.com/mail/",
192
+ "hosts": ["outlook.com", "hotmail.com"]
193
+ },
194
+ {
195
+ "name": "Hey",
196
+ "url": "https://app.hey.com/",
197
+ "hosts": ["hey.com"]
198
+ },
199
+ {
200
+ "name": "Yandex",
201
+ "url": "https://mail.yandex.com/",
202
+ "hosts": ["yandex.com"]
203
+ },
204
+ {
205
+ "name": "Tutanota",
206
+ "url": "https://mail.tutanota.com/",
207
+ "hosts": [
208
+ "tutanota.com",
209
+ "tutanota.de",
210
+ "tutamail.com",
211
+ "tuta.io",
212
+ "keemail.me"
213
+ ]
214
+ },
215
+ {
216
+ "name": "GMX",
217
+ "url": "https://navigator-bs.gmx.com/mail",
218
+ "hosts": ["gmx.com", "gmx.us"]
219
+ }
220
+ ]
@@ -0,0 +1,45 @@
1
+ # frozen_string_literal: true
2
+
3
+ require_relative "./lib/email_provider_info/version"
4
+
5
+ Gem::Specification.new do |spec|
6
+ spec.name = "email-provider-info"
7
+ spec.version = EmailProviderInfo::VERSION
8
+ spec.authors = ["Nando Vieira"]
9
+ spec.email = ["me@fnando.com"]
10
+ spec.metadata = {"rubygems_mfa_required" => "true"}
11
+
12
+ spec.summary = "Find email provider service based on the email address."
13
+ spec.description = spec.summary
14
+ spec.license = "MIT"
15
+ spec.required_ruby_version = Gem::Requirement.new(">= 2.7.0")
16
+
17
+ github_url = "https://github.com/fnando/email-provider-info"
18
+ github_tree_url = "#{github_url}/tree/v#{spec.version}"
19
+
20
+ spec.homepage = github_url
21
+ spec.metadata["homepage_uri"] = spec.homepage
22
+ spec.metadata["bug_tracker_uri"] = "#{github_url}/issues"
23
+ spec.metadata["source_code_uri"] = github_tree_url
24
+ spec.metadata["changelog_uri"] = "#{github_tree_url}/CHANGELOG.md"
25
+ spec.metadata["documentation_uri"] = "#{github_tree_url}/README.md"
26
+ spec.metadata["license_uri"] = "#{github_tree_url}/LICENSE.md"
27
+
28
+ spec.files = Dir.chdir(File.expand_path(__dir__)) do
29
+ `git ls-files -z`
30
+ .split("\x0")
31
+ .reject {|f| f.match(%r{^(test|spec|features|src|dist)/}) }
32
+ end
33
+
34
+ spec.bindir = "exe"
35
+ spec.executables = spec.files.grep(%r{^exe/}) {|f| File.basename(f) }
36
+ spec.require_paths = ["lib"]
37
+
38
+ spec.add_development_dependency "minitest"
39
+ spec.add_development_dependency "minitest-utils"
40
+ spec.add_development_dependency "pry-meta"
41
+ spec.add_development_dependency "rake"
42
+ spec.add_development_dependency "rubocop"
43
+ spec.add_development_dependency "rubocop-fnando"
44
+ spec.add_development_dependency "simplecov"
45
+ end
data/jest.config.js ADDED
@@ -0,0 +1,12 @@
1
+ const config = require("@fnando/codestyle/jest");
2
+
3
+ module.exports = {
4
+ ...config,
5
+ testRegex: ".*?\\.test\\.ts",
6
+ roots: ["<rootDir>/src"],
7
+ modulePaths: ["src"],
8
+ moduleNameMapper: {
9
+ "^~/(.*?)$": "<rootDir>/src/$1",
10
+ },
11
+ testPathIgnorePatterns: ["/vendor/bundle/", "node_modules"],
12
+ };
@@ -0,0 +1,3 @@
1
+ # frozen_string_literal: true
2
+
3
+ require "email_provider_info"
@@ -0,0 +1,5 @@
1
+ # frozen_string_literal: true
2
+
3
+ module EmailProviderInfo
4
+ VERSION = "0.0.1"
5
+ end
@@ -0,0 +1,22 @@
1
+ # frozen_string_literal: true
2
+
3
+ module EmailProviderInfo
4
+ require "email_provider_info/version"
5
+
6
+ Value = Struct.new(:name, :url, :hosts)
7
+
8
+ def self.providers
9
+ @providers ||= JSON.parse(
10
+ File.read(File.join(__dir__, "../data/providers.json")),
11
+ symbolize_names: true
12
+ )
13
+ end
14
+
15
+ def self.call(email)
16
+ host = email.to_s.downcase.split("@").last
17
+
18
+ info = providers.find {|provider| provider[:hosts].include?(host) }
19
+
20
+ Value.new(info[:name], info[:url], info[:hosts]) if info
21
+ end
22
+ end
data/package.json ADDED
@@ -0,0 +1,49 @@
1
+ {
2
+ "name": "@fnando/email-provider-info",
3
+ "version": "0.0.3",
4
+ "description": "Find email provider service based on the email address.",
5
+ "author": {
6
+ "name": "Nando Vieira",
7
+ "email": "me@fnando.com",
8
+ "url": "https://nandovieira.com/"
9
+ },
10
+ "files": [
11
+ "dist/**/*",
12
+ "README.md",
13
+ "CHANGELOG.md",
14
+ "LICENSE.md",
15
+ "data/**/*"
16
+ ],
17
+ "homepage": "https://github.com/fnando/email-provider-info",
18
+ "license": "MIT",
19
+ "bugs": "https://github.com/fnando/email-provider-info/issues",
20
+ "repository": "https://github.com/fnando/email-provider-info.git",
21
+ "scripts": {
22
+ "test": "jest --watch",
23
+ "test:ci": "jest && yarn lint",
24
+ "lint": "yarn lint:ts && yarn lint:eslint",
25
+ "lint:ts": "tsc --noEmit",
26
+ "lint:eslint": "eslint src --max-warnings 0",
27
+ "build": "rm -rf dist && webpack"
28
+ },
29
+ "devDependencies": {
30
+ "@babel/core": "^7.16.7",
31
+ "@babel/preset-env": "^7.16.8",
32
+ "@fnando/codestyle": "^0.0.13",
33
+ "@fnando/eslint-config-codestyle": "^0.0.10",
34
+ "@types/jest": "^27.4.0",
35
+ "@typescript-eslint/eslint-plugin": "^5.9.1",
36
+ "@typescript-eslint/parser": "^5.9.1",
37
+ "babel-loader": "^8.2.3",
38
+ "babel-plugin-module-resolver": "^4.1.0",
39
+ "eslint": "^8.6.0",
40
+ "jest": "^27.4.7",
41
+ "jest-filename-transform": "^0.1.0",
42
+ "prettier": "^2.5.1",
43
+ "ts-jest": "^27.1.3",
44
+ "ts-loader": "^9.2.6",
45
+ "typescript": "^4.5.4",
46
+ "webpack": "^5.66.0",
47
+ "webpack-cli": "^4.9.1"
48
+ }
49
+ }
@@ -0,0 +1 @@
1
+ module.exports = require("@fnando/codestyle/prettier.json");
data/sample.png ADDED
Binary file
data/tsconfig.json ADDED
@@ -0,0 +1,15 @@
1
+ {
2
+ "extends": "@fnando/codestyle",
3
+ "include": ["src"],
4
+ "compilerOptions": {
5
+ "noEmit": false,
6
+ "sourceMap": true,
7
+ "declaration": true,
8
+ "resolveJsonModule": true,
9
+ "outDir": "dist",
10
+ "baseUrl": ".",
11
+ "paths": {
12
+ "~/*": ["src/*"]
13
+ }
14
+ }
15
+ }
data/webpack.config.js ADDED
@@ -0,0 +1,33 @@
1
+ /* eslint-env node */
2
+
3
+ const path = require("path");
4
+
5
+ module.exports = {
6
+ mode: "production",
7
+ entry: {
8
+ index: "./src/index.ts",
9
+ },
10
+ devtool: "source-map",
11
+ output: {
12
+ filename: "[name].js",
13
+ path: path.resolve(__dirname, "dist"),
14
+ },
15
+ module: {
16
+ rules: [
17
+ {
18
+ test: /\.ts$/,
19
+ use: [{ loader: "babel-loader" }, { loader: "ts-loader" }],
20
+ exclude: /node_modules/,
21
+ },
22
+ {
23
+ test: /\.js$/,
24
+ use: [{ loader: "babel-loader" }],
25
+ exclude: /node_modules/,
26
+ },
27
+ ],
28
+ },
29
+ resolve: {
30
+ alias: { "~/": path.resolve(__dirname, "src/") },
31
+ extensions: [".tsx", ".ts", ".js"],
32
+ },
33
+ };
metadata ADDED
@@ -0,0 +1,179 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: email-provider-info
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.0.1
5
+ platform: ruby
6
+ authors:
7
+ - Nando Vieira
8
+ autorequire:
9
+ bindir: exe
10
+ cert_chain: []
11
+ date: 2022-01-24 00:00:00.000000000 Z
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: minitest
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - ">="
18
+ - !ruby/object:Gem::Version
19
+ version: '0'
20
+ type: :development
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - ">="
25
+ - !ruby/object:Gem::Version
26
+ version: '0'
27
+ - !ruby/object:Gem::Dependency
28
+ name: minitest-utils
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - ">="
32
+ - !ruby/object:Gem::Version
33
+ version: '0'
34
+ type: :development
35
+ prerelease: false
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - ">="
39
+ - !ruby/object:Gem::Version
40
+ version: '0'
41
+ - !ruby/object:Gem::Dependency
42
+ name: pry-meta
43
+ requirement: !ruby/object:Gem::Requirement
44
+ requirements:
45
+ - - ">="
46
+ - !ruby/object:Gem::Version
47
+ version: '0'
48
+ type: :development
49
+ prerelease: false
50
+ version_requirements: !ruby/object:Gem::Requirement
51
+ requirements:
52
+ - - ">="
53
+ - !ruby/object:Gem::Version
54
+ version: '0'
55
+ - !ruby/object:Gem::Dependency
56
+ name: rake
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'
69
+ - !ruby/object:Gem::Dependency
70
+ name: rubocop
71
+ requirement: !ruby/object:Gem::Requirement
72
+ requirements:
73
+ - - ">="
74
+ - !ruby/object:Gem::Version
75
+ version: '0'
76
+ type: :development
77
+ prerelease: false
78
+ version_requirements: !ruby/object:Gem::Requirement
79
+ requirements:
80
+ - - ">="
81
+ - !ruby/object:Gem::Version
82
+ version: '0'
83
+ - !ruby/object:Gem::Dependency
84
+ name: rubocop-fnando
85
+ requirement: !ruby/object:Gem::Requirement
86
+ requirements:
87
+ - - ">="
88
+ - !ruby/object:Gem::Version
89
+ version: '0'
90
+ type: :development
91
+ prerelease: false
92
+ version_requirements: !ruby/object:Gem::Requirement
93
+ requirements:
94
+ - - ">="
95
+ - !ruby/object:Gem::Version
96
+ version: '0'
97
+ - !ruby/object:Gem::Dependency
98
+ name: simplecov
99
+ requirement: !ruby/object:Gem::Requirement
100
+ requirements:
101
+ - - ">="
102
+ - !ruby/object:Gem::Version
103
+ version: '0'
104
+ type: :development
105
+ prerelease: false
106
+ version_requirements: !ruby/object:Gem::Requirement
107
+ requirements:
108
+ - - ">="
109
+ - !ruby/object:Gem::Version
110
+ version: '0'
111
+ description: Find email provider service based on the email address.
112
+ email:
113
+ - me@fnando.com
114
+ executables: []
115
+ extensions: []
116
+ extra_rdoc_files: []
117
+ files:
118
+ - ".eslintrc.js"
119
+ - ".github/CODEOWNERS"
120
+ - ".github/FUNDING.yml"
121
+ - ".github/ISSUE_TEMPLATE/bug_report.md"
122
+ - ".github/ISSUE_TEMPLATE/config.yml"
123
+ - ".github/ISSUE_TEMPLATE/feature_request.md"
124
+ - ".github/PULL_REQUEST_TEMPLATE.md"
125
+ - ".github/dependabot.yml"
126
+ - ".github/workflows/js-tests.yml"
127
+ - ".github/workflows/ruby-tests.yml"
128
+ - ".gitignore"
129
+ - ".rubocop.yml"
130
+ - CHANGELOG.md
131
+ - CODE_OF_CONDUCT.md
132
+ - CONTRIBUTING.md
133
+ - Gemfile
134
+ - LICENSE.md
135
+ - README.md
136
+ - Rakefile
137
+ - babel.config.json
138
+ - data/providers.json
139
+ - email-provider-info.gemspec
140
+ - jest.config.js
141
+ - lib/email-provider-info.rb
142
+ - lib/email_provider_info.rb
143
+ - lib/email_provider_info/version.rb
144
+ - package.json
145
+ - prettier.config.js
146
+ - sample.png
147
+ - tsconfig.json
148
+ - webpack.config.js
149
+ homepage: https://github.com/fnando/email-provider-info
150
+ licenses:
151
+ - MIT
152
+ metadata:
153
+ rubygems_mfa_required: 'true'
154
+ homepage_uri: https://github.com/fnando/email-provider-info
155
+ bug_tracker_uri: https://github.com/fnando/email-provider-info/issues
156
+ source_code_uri: https://github.com/fnando/email-provider-info/tree/v0.0.1
157
+ changelog_uri: https://github.com/fnando/email-provider-info/tree/v0.0.1/CHANGELOG.md
158
+ documentation_uri: https://github.com/fnando/email-provider-info/tree/v0.0.1/README.md
159
+ license_uri: https://github.com/fnando/email-provider-info/tree/v0.0.1/LICENSE.md
160
+ post_install_message:
161
+ rdoc_options: []
162
+ require_paths:
163
+ - lib
164
+ required_ruby_version: !ruby/object:Gem::Requirement
165
+ requirements:
166
+ - - ">="
167
+ - !ruby/object:Gem::Version
168
+ version: 2.7.0
169
+ required_rubygems_version: !ruby/object:Gem::Requirement
170
+ requirements:
171
+ - - ">="
172
+ - !ruby/object:Gem::Version
173
+ version: '0'
174
+ requirements: []
175
+ rubygems_version: 3.3.3
176
+ signing_key:
177
+ specification_version: 4
178
+ summary: Find email provider service based on the email address.
179
+ test_files: []