root_domain 0.1.1 → 0.1.2
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 +4 -4
- data/.github/CODEOWNERS +4 -0
- data/.github/FUNDING.yml +4 -0
- data/.github/ISSUE_TEMPLATE/bug_report.md +41 -0
- data/.github/ISSUE_TEMPLATE/feature_request.md +23 -0
- data/.github/PULL_REQUEST_TEMPLATE.md +38 -0
- data/.github/dependabot.yml +15 -0
- data/.github/workflows/ruby-tests.yml +55 -0
- data/.rubocop.yml +1 -1
- data/CHANGELOG.md +17 -1
- data/CONTRIBUTING.md +79 -0
- data/Gemfile +0 -1
- data/LICENSE.md +20 -0
- data/README.md +28 -20
- data/Rakefile +4 -1
- data/bin/console +8 -6
- data/bin/setup +2 -0
- data/lib/root_domain/version.rb +1 -1
- data/root_domain.gemspec +24 -17
- metadata +27 -16
- data/.travis.yml +0 -6
- data/LICENSE.txt +0 -21
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 5b8a3653678834e09c777c4204d842284477da83f2d6bcefc05a52e42677c016
|
4
|
+
data.tar.gz: 0c97823d67934fe171bf9108b21bf3144753e85488492cc25146462598f0e394
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 80054c03853c9ac4b2d7faff617be48c5fa38137ad17fd14d26f009abc96c6280c287fc940faa420a14b32a97f3f1e07f8fe88c9f7f82bda848d7fa510180d53
|
7
|
+
data.tar.gz: e77a10f8547a5c8e99c166ada00da5c77a85aa86cbda40332b6f3e2f8174dbf9d4fa901c99943ba3f8109f57ad9997b1ed1771b977d59f08fe558a4db28694a4
|
data/.github/CODEOWNERS
ADDED
data/.github/FUNDING.yml
ADDED
@@ -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 root_domain
|
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"
|
@@ -0,0 +1,55 @@
|
|
1
|
+
name: ruby-tests
|
2
|
+
|
3
|
+
on:
|
4
|
+
pull_request:
|
5
|
+
branches:
|
6
|
+
- main
|
7
|
+
push:
|
8
|
+
branches:
|
9
|
+
- main
|
10
|
+
|
11
|
+
schedule:
|
12
|
+
- cron: "0 10 * * *"
|
13
|
+
|
14
|
+
jobs:
|
15
|
+
build:
|
16
|
+
name: Tests with Ruby ${{ matrix.ruby }} and ${{ matrix.gemfile }}
|
17
|
+
runs-on: "ubuntu-latest"
|
18
|
+
strategy:
|
19
|
+
fail-fast: false
|
20
|
+
matrix:
|
21
|
+
ruby: [2.6.x, 2.7.x]
|
22
|
+
gemfile:
|
23
|
+
- Gemfile
|
24
|
+
|
25
|
+
steps:
|
26
|
+
- uses: actions/checkout@v2.3.4
|
27
|
+
|
28
|
+
- uses: actions/cache@v2
|
29
|
+
with:
|
30
|
+
path: vendor/bundle
|
31
|
+
key: >
|
32
|
+
${{ runner.os }}-${{ matrix.ruby }}-gems-${{ hashFiles(matrix.gemfile) }}
|
33
|
+
restore-keys: >
|
34
|
+
${{ runner.os }}-${{ matrix.ruby }}-gems-${{ hashFiles(matrix.gemfile) }}
|
35
|
+
|
36
|
+
- name: Set up Ruby
|
37
|
+
uses: actions/setup-ruby@v1
|
38
|
+
with:
|
39
|
+
ruby-version: ${{ matrix.ruby }}
|
40
|
+
|
41
|
+
- name: Install gem dependencies
|
42
|
+
env:
|
43
|
+
BUNDLE_GEMFILE: ${{ matrix.gemfile }}
|
44
|
+
run: |
|
45
|
+
gem install bundler
|
46
|
+
bundle config path vendor/bundle
|
47
|
+
bundle update --jobs 4 --retry 3
|
48
|
+
|
49
|
+
- name: Run Tests
|
50
|
+
env:
|
51
|
+
PGHOST: localhost
|
52
|
+
PGUSER: postgres
|
53
|
+
BUNDLE_GEMFILE: ${{ matrix.gemfile }}
|
54
|
+
run: |
|
55
|
+
bundle exec rake
|
data/.rubocop.yml
CHANGED
data/CHANGELOG.md
CHANGED
@@ -1,8 +1,24 @@
|
|
1
1
|
# Changelog
|
2
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
|
+
## v0.1.2 - 2020-11-17
|
15
|
+
|
16
|
+
- [Changed] Require ruby-2.6 or newer.
|
17
|
+
|
3
18
|
## v0.1.1 - 2020-11-15
|
4
19
|
|
5
|
-
- [Changed] Data now comes from
|
20
|
+
- [Changed] Data now comes from
|
21
|
+
[email_data](https://github.com/fnando/email_data).
|
6
22
|
|
7
23
|
## v0.1.0 - 2020-09-21
|
8
24
|
|
data/CONTRIBUTING.md
ADDED
@@ -0,0 +1,79 @@
|
|
1
|
+
# Contributing to root_domain
|
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 [code of conduct](https://github.com/fnando/root_domain/blob/main/CODE_OF_CONDUCT.md).
|
13
|
+
|
14
|
+
## Reporting bugs
|
15
|
+
|
16
|
+
This section guides you through submitting a bug report. Following these
|
17
|
+
guidelines helps maintainers and the community understand your report, reproduce
|
18
|
+
the behavior, and find related reports.
|
19
|
+
|
20
|
+
- Before creating bug reports, please check the open issues; somebody may
|
21
|
+
already have submitted something similar, and you may not need to create a new
|
22
|
+
one.
|
23
|
+
- When you are creating a bug report, please include as many details as
|
24
|
+
possible, with an example reproducing the issue.
|
25
|
+
|
26
|
+
## Contributing with code
|
27
|
+
|
28
|
+
Before making any radicals changes, please make sure you discuss your intention
|
29
|
+
by [opening an issue on Github](https://github.com/fnando/root_domain/issues).
|
30
|
+
|
31
|
+
When you're ready to make your pull request, follow checklist below to make sure
|
32
|
+
your contribution is according to how this project works.
|
33
|
+
|
34
|
+
1. [Fork](https://help.github.com/forking/) root_domain
|
35
|
+
2. Create a topic branch - `git checkout -b my_branch`
|
36
|
+
3. Make your changes using [descriptive commit messages](#commit-messages)
|
37
|
+
4. Update CHANGELOG.md describing your changes by adding an entry to the
|
38
|
+
"Unreleased" section. If this section is not available, create one right
|
39
|
+
before the last version.
|
40
|
+
5. Push to your branch - `git push origin my_branch`
|
41
|
+
6. [Create a pull request](https://help.github.com/articles/creating-a-pull-request)
|
42
|
+
7. That's it!
|
43
|
+
|
44
|
+
## Styleguides
|
45
|
+
|
46
|
+
### Commit messages
|
47
|
+
|
48
|
+
- Use the present tense ("Add feature" not "Added feature")
|
49
|
+
- Use the imperative mood ("Move cursor to..." not "Moves cursor to...")
|
50
|
+
- Limit the first line to 72 characters or less
|
51
|
+
- Reference issues and pull requests liberally after the first line
|
52
|
+
|
53
|
+
### Changelog
|
54
|
+
|
55
|
+
- Add a message describing your changes to the "Unreleased" section. The
|
56
|
+
changelog message should follow the same style as the commit message.
|
57
|
+
- Prefix your message with one of the following:
|
58
|
+
- `[Added]` for new features.
|
59
|
+
- `[Changed]` for changes in existing functionality.
|
60
|
+
- `[Deprecated]` for soon-to-be removed features.
|
61
|
+
- `[Removed]` for now removed features.
|
62
|
+
- `[Fixed]` for any bug fixes.
|
63
|
+
- `[Security]` in case of vulnerabilities.
|
64
|
+
|
65
|
+
### Ruby code
|
66
|
+
|
67
|
+
- This project uses [Rubocop](https://rubocop.org) to enforce code style. Before
|
68
|
+
submitting your changes, make sure your tests are passing and code conforms to
|
69
|
+
the expected style by running `rake`.
|
70
|
+
- Do not change the library version. This will be done by the maintainer
|
71
|
+
whenever a new version is about to be released.
|
72
|
+
|
73
|
+
### JavaScript code
|
74
|
+
|
75
|
+
- This project uses [ESLint](https://eslint.org) to enforce code style. Before
|
76
|
+
submitting your changes, make sure your tests are passing and code conforms to
|
77
|
+
the expected style by running `yarn test:ci`.
|
78
|
+
- Do not change the library version. This will be done by the maintainer
|
79
|
+
whenever a new version is about to be released.
|
data/Gemfile
CHANGED
data/LICENSE.md
ADDED
@@ -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,26 +1,31 @@
|
|
1
1
|
# root_domain
|
2
2
|
|
3
|
+
[](https://github.com/fnando/root_domain)
|
4
|
+
[](https://codeclimate.com/github/fnando/root_domain)
|
5
|
+
[](https://rubygems.org/gems/root_domain)
|
6
|
+
[](https://rubygems.org/gems/root_domain)
|
7
|
+
|
3
8
|
If you ever worked with domain validation, you probably needed to extract the
|
4
|
-
root domain. This means that, given some hostname, you must remove subdomains
|
9
|
+
root domain. This means that, given some hostname, you must remove subdomains
|
10
|
+
from the original input, taking into account not only official Internet
|
11
|
+
[TLDs](https://en.wikipedia.org/wiki/Top-level_domain), but
|
12
|
+
[SLDs](https://en.wikipedia.org/wiki/Second-level_domain) too.
|
5
13
|
|
6
|
-
With root_domain, you can easily extract the root domain, expanding any input
|
14
|
+
With root_domain, you can easily extract the root domain, expanding any input
|
15
|
+
from punycode into ASCII entries.
|
7
16
|
|
8
17
|
## Installation
|
9
18
|
|
10
|
-
|
19
|
+
```bash
|
20
|
+
gem install root_domain
|
21
|
+
```
|
22
|
+
|
23
|
+
Or add the following line to your project's Gemfile:
|
11
24
|
|
12
25
|
```ruby
|
13
26
|
gem "root_domain"
|
14
27
|
```
|
15
28
|
|
16
|
-
And then execute:
|
17
|
-
|
18
|
-
$ bundle install
|
19
|
-
|
20
|
-
Or install it yourself as:
|
21
|
-
|
22
|
-
$ gem install root_domain
|
23
|
-
|
24
29
|
## Usage
|
25
30
|
|
26
31
|
```ruby
|
@@ -36,24 +41,27 @@ RootDomain.call("myapp.apps.🤯.com")
|
|
36
41
|
#=> xn--oq9h.com
|
37
42
|
```
|
38
43
|
|
39
|
-
##
|
40
|
-
|
41
|
-
The changelog file is available at [CHANGELOG.md](https://github.com/fnando/root_domain/tree/main/CHANGELOG.md)
|
44
|
+
## Maintainer
|
42
45
|
|
43
|
-
|
46
|
+
- [Nando Vieira](https://github.com/fnando)
|
44
47
|
|
45
|
-
|
48
|
+
## Contributors
|
46
49
|
|
47
|
-
|
50
|
+
- https://github.com/fnando/root_domain/contributors
|
48
51
|
|
49
52
|
## Contributing
|
50
53
|
|
51
|
-
|
54
|
+
For more details about how to contribute, please read
|
55
|
+
https://github.com/fnando/root_domain/blob/main/CONTRIBUTING.md.
|
52
56
|
|
53
57
|
## License
|
54
58
|
|
55
|
-
The gem is available as open source under the terms of the
|
59
|
+
The gem is available as open source under the terms of the
|
60
|
+
[MIT License](https://opensource.org/licenses/MIT). A copy of the license can be
|
61
|
+
found at https://github.com/fnando/root_domain/blob/main/LICENSE.md.
|
56
62
|
|
57
63
|
## Code of Conduct
|
58
64
|
|
59
|
-
Everyone interacting in the
|
65
|
+
Everyone interacting in the root_domain project's codebases, issue trackers,
|
66
|
+
chat rooms and mailing lists is expected to follow the
|
67
|
+
[code of conduct](https://github.com/fnando/root_domain/blob/main/CODE_OF_CONDUCT.md).
|
data/Rakefile
CHANGED
@@ -2,6 +2,7 @@
|
|
2
2
|
|
3
3
|
require "bundler/gem_tasks"
|
4
4
|
require "rake/testtask"
|
5
|
+
require "rubocop/rake_task"
|
5
6
|
|
6
7
|
Rake::TestTask.new(:test) do |t|
|
7
8
|
t.libs << "test"
|
@@ -9,4 +10,6 @@ Rake::TestTask.new(:test) do |t|
|
|
9
10
|
t.test_files = FileList["test/**/*_test.rb"]
|
10
11
|
end
|
11
12
|
|
12
|
-
|
13
|
+
RuboCop::RakeTask.new
|
14
|
+
|
15
|
+
task default: %i[test rubocop]
|
data/bin/console
CHANGED
@@ -1,4 +1,5 @@
|
|
1
1
|
#!/usr/bin/env ruby
|
2
|
+
# frozen_string_literal: true
|
2
3
|
|
3
4
|
require "bundler/setup"
|
4
5
|
require "root_domain"
|
@@ -6,9 +7,10 @@ require "root_domain"
|
|
6
7
|
# You can add fixtures and/or initialization code here to make experimenting
|
7
8
|
# with your gem easier. You can also use a different console, if you like.
|
8
9
|
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
require "irb"
|
14
|
-
IRB.start(__FILE__)
|
10
|
+
begin
|
11
|
+
require "pry"
|
12
|
+
Pry.start
|
13
|
+
rescue LoadError
|
14
|
+
require "irb"
|
15
|
+
IRB.start(__FILE__)
|
16
|
+
end
|
data/bin/setup
CHANGED
data/lib/root_domain/version.rb
CHANGED
data/root_domain.gemspec
CHANGED
@@ -1,41 +1,48 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
-
require_relative "lib/root_domain/version"
|
3
|
+
require_relative "./lib/root_domain/version"
|
4
4
|
|
5
5
|
Gem::Specification.new do |spec|
|
6
|
-
spec.name
|
7
|
-
spec.version
|
8
|
-
spec.authors
|
9
|
-
spec.email
|
10
|
-
|
11
|
-
spec.summary = "Extract root domain from hosts (e.g. www.example " \
|
12
|
-
"will be extracted as example.com"
|
13
|
-
spec.description = spec.summary
|
14
|
-
spec.homepage = "https://github.com/fnando/root_domain"
|
15
|
-
spec.license = "MIT"
|
16
|
-
spec.required_ruby_version = Gem::Requirement.new(">= 2.7.0")
|
6
|
+
spec.name = "root_domain"
|
7
|
+
spec.version = RootDomain::VERSION
|
8
|
+
spec.authors = ["Nando Vieira"]
|
9
|
+
spec.email = ["me@fnando.com"]
|
17
10
|
|
11
|
+
spec.summary = "Extract root domain from hosts (e.g. www.example " \
|
12
|
+
"will be extracted as example.com). It normalizes " \
|
13
|
+
"punycode domains and considers second-level domain names."
|
14
|
+
spec.description = spec.summary
|
15
|
+
spec.license = "MIT"
|
16
|
+
spec.required_ruby_version = Gem::Requirement.new(">= 2.6.0")
|
17
|
+
|
18
|
+
github_url = "https://github.com/fnando/root_domain"
|
19
|
+
github_tree_url = "#{github_url}/tree/v#{spec.version}"
|
20
|
+
|
21
|
+
spec.homepage = github_url
|
18
22
|
spec.metadata["homepage_uri"] = spec.homepage
|
19
|
-
spec.metadata["
|
20
|
-
spec.metadata["
|
23
|
+
spec.metadata["bug_tracker_uri"] = "#{github_url}/issues"
|
24
|
+
spec.metadata["source_code_uri"] = github_tree_url
|
25
|
+
spec.metadata["changelog_uri"] = "#{github_tree_url}/CHANGELOG.md"
|
26
|
+
spec.metadata["documentation_uri"] = "#{github_tree_url}/README.md"
|
27
|
+
spec.metadata["license_uri"] = "#{github_tree_url}/LICENSE.md"
|
21
28
|
|
22
29
|
spec.files = Dir.chdir(File.expand_path(__dir__)) do
|
23
30
|
`git ls-files -z`
|
24
31
|
.split("\x0")
|
25
32
|
.reject {|f| f.match(%r{^(test|spec|features)/}) }
|
26
33
|
end
|
34
|
+
|
27
35
|
spec.bindir = "exe"
|
28
36
|
spec.executables = spec.files.grep(%r{^exe/}) {|f| File.basename(f) }
|
29
37
|
spec.require_paths = ["lib"]
|
30
38
|
|
31
39
|
spec.add_dependency "email_data"
|
32
40
|
spec.add_dependency "simpleidn"
|
33
|
-
|
34
|
-
spec.add_development_dependency "aitch"
|
35
|
-
spec.add_development_dependency "bundler"
|
36
41
|
spec.add_development_dependency "minitest"
|
37
42
|
spec.add_development_dependency "minitest-utils"
|
43
|
+
spec.add_development_dependency "pry-meta"
|
38
44
|
spec.add_development_dependency "rake"
|
39
45
|
spec.add_development_dependency "rubocop"
|
40
46
|
spec.add_development_dependency "rubocop-fnando"
|
47
|
+
spec.add_development_dependency "simplecov"
|
41
48
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: root_domain
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Nando Vieira
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2020-11-
|
11
|
+
date: 2020-11-17 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: email_data
|
@@ -39,7 +39,7 @@ dependencies:
|
|
39
39
|
- !ruby/object:Gem::Version
|
40
40
|
version: '0'
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
|
-
name:
|
42
|
+
name: minitest
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
44
44
|
requirements:
|
45
45
|
- - ">="
|
@@ -53,7 +53,7 @@ dependencies:
|
|
53
53
|
- !ruby/object:Gem::Version
|
54
54
|
version: '0'
|
55
55
|
- !ruby/object:Gem::Dependency
|
56
|
-
name:
|
56
|
+
name: minitest-utils
|
57
57
|
requirement: !ruby/object:Gem::Requirement
|
58
58
|
requirements:
|
59
59
|
- - ">="
|
@@ -67,7 +67,7 @@ dependencies:
|
|
67
67
|
- !ruby/object:Gem::Version
|
68
68
|
version: '0'
|
69
69
|
- !ruby/object:Gem::Dependency
|
70
|
-
name:
|
70
|
+
name: pry-meta
|
71
71
|
requirement: !ruby/object:Gem::Requirement
|
72
72
|
requirements:
|
73
73
|
- - ">="
|
@@ -81,7 +81,7 @@ dependencies:
|
|
81
81
|
- !ruby/object:Gem::Version
|
82
82
|
version: '0'
|
83
83
|
- !ruby/object:Gem::Dependency
|
84
|
-
name:
|
84
|
+
name: rake
|
85
85
|
requirement: !ruby/object:Gem::Requirement
|
86
86
|
requirements:
|
87
87
|
- - ">="
|
@@ -95,7 +95,7 @@ dependencies:
|
|
95
95
|
- !ruby/object:Gem::Version
|
96
96
|
version: '0'
|
97
97
|
- !ruby/object:Gem::Dependency
|
98
|
-
name:
|
98
|
+
name: rubocop
|
99
99
|
requirement: !ruby/object:Gem::Requirement
|
100
100
|
requirements:
|
101
101
|
- - ">="
|
@@ -109,7 +109,7 @@ dependencies:
|
|
109
109
|
- !ruby/object:Gem::Version
|
110
110
|
version: '0'
|
111
111
|
- !ruby/object:Gem::Dependency
|
112
|
-
name: rubocop
|
112
|
+
name: rubocop-fnando
|
113
113
|
requirement: !ruby/object:Gem::Requirement
|
114
114
|
requirements:
|
115
115
|
- - ">="
|
@@ -123,7 +123,7 @@ dependencies:
|
|
123
123
|
- !ruby/object:Gem::Version
|
124
124
|
version: '0'
|
125
125
|
- !ruby/object:Gem::Dependency
|
126
|
-
name:
|
126
|
+
name: simplecov
|
127
127
|
requirement: !ruby/object:Gem::Requirement
|
128
128
|
requirements:
|
129
129
|
- - ">="
|
@@ -137,21 +137,28 @@ dependencies:
|
|
137
137
|
- !ruby/object:Gem::Version
|
138
138
|
version: '0'
|
139
139
|
description: Extract root domain from hosts (e.g. www.example will be extracted as
|
140
|
-
example.com
|
140
|
+
example.com). It normalizes punycode domains and considers second-level domain names.
|
141
141
|
email:
|
142
142
|
- me@fnando.com
|
143
143
|
executables: []
|
144
144
|
extensions: []
|
145
145
|
extra_rdoc_files: []
|
146
146
|
files:
|
147
|
+
- ".github/CODEOWNERS"
|
148
|
+
- ".github/FUNDING.yml"
|
149
|
+
- ".github/ISSUE_TEMPLATE/bug_report.md"
|
150
|
+
- ".github/ISSUE_TEMPLATE/feature_request.md"
|
151
|
+
- ".github/PULL_REQUEST_TEMPLATE.md"
|
152
|
+
- ".github/dependabot.yml"
|
153
|
+
- ".github/workflows/ruby-tests.yml"
|
147
154
|
- ".gitignore"
|
148
155
|
- ".rubocop.yml"
|
149
|
-
- ".travis.yml"
|
150
156
|
- CHANGELOG.md
|
151
157
|
- CODE_OF_CONDUCT.md
|
158
|
+
- CONTRIBUTING.md
|
152
159
|
- FUNDING.yml
|
153
160
|
- Gemfile
|
154
|
-
- LICENSE.
|
161
|
+
- LICENSE.md
|
155
162
|
- README.md
|
156
163
|
- Rakefile
|
157
164
|
- bin/console
|
@@ -164,8 +171,11 @@ licenses:
|
|
164
171
|
- MIT
|
165
172
|
metadata:
|
166
173
|
homepage_uri: https://github.com/fnando/root_domain
|
167
|
-
|
168
|
-
|
174
|
+
bug_tracker_uri: https://github.com/fnando/root_domain/issues
|
175
|
+
source_code_uri: https://github.com/fnando/root_domain/tree/v0.1.2
|
176
|
+
changelog_uri: https://github.com/fnando/root_domain/tree/v0.1.2/CHANGELOG.md
|
177
|
+
documentation_uri: https://github.com/fnando/root_domain/tree/v0.1.2/README.md
|
178
|
+
license_uri: https://github.com/fnando/root_domain/tree/v0.1.2/LICENSE.md
|
169
179
|
post_install_message:
|
170
180
|
rdoc_options: []
|
171
181
|
require_paths:
|
@@ -174,7 +184,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
174
184
|
requirements:
|
175
185
|
- - ">="
|
176
186
|
- !ruby/object:Gem::Version
|
177
|
-
version: 2.
|
187
|
+
version: 2.6.0
|
178
188
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
179
189
|
requirements:
|
180
190
|
- - ">="
|
@@ -184,5 +194,6 @@ requirements: []
|
|
184
194
|
rubygems_version: 3.1.4
|
185
195
|
signing_key:
|
186
196
|
specification_version: 4
|
187
|
-
summary: Extract root domain from hosts (e.g. www.example will be extracted as example.com
|
197
|
+
summary: Extract root domain from hosts (e.g. www.example will be extracted as example.com).
|
198
|
+
It normalizes punycode domains and considers second-level domain names.
|
188
199
|
test_files: []
|
data/.travis.yml
DELETED
data/LICENSE.txt
DELETED
@@ -1,21 +0,0 @@
|
|
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
|
6
|
-
of this software and associated documentation files (the "Software"), to deal
|
7
|
-
in the Software without restriction, including without limitation the rights
|
8
|
-
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
9
|
-
copies of the Software, and to permit persons to whom the Software is
|
10
|
-
furnished to do so, subject to the following conditions:
|
11
|
-
|
12
|
-
The above copyright notice and this permission notice shall be included in
|
13
|
-
all 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,
|
17
|
-
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
18
|
-
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
19
|
-
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
20
|
-
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
21
|
-
THE SOFTWARE.
|