whois 5.0.2 → 5.1.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.github/FUNDING.yml +6 -2
- data/.github/dependabot.yml +19 -0
- data/.github/workflows/codeql-analysis.yml +64 -0
- data/.github/workflows/release.yml +16 -0
- data/.github/workflows/tests.yml +30 -0
- data/.rubocop.yml +1 -0
- data/.rubocop_opinionated.yml +0 -22
- data/.rubocop_todo.yml +0 -76
- data/.tool-versions +1 -1
- data/CHANGELOG.md +18 -1
- data/CONTRIBUTING.md +12 -12
- data/Gemfile +3 -3
- data/LICENSE.txt +1 -1
- data/README.md +22 -22
- data/bin/whoisrb +1 -1
- data/data/tld.json +9 -14
- data/lib/whois/client.rb +1 -1
- data/lib/whois/errors.rb +1 -1
- data/lib/whois/record/part.rb +2 -2
- data/lib/whois/record.rb +2 -2
- data/lib/whois/server/adapters/afilias.rb +1 -1
- data/lib/whois/server/adapters/arin.rb +4 -4
- data/lib/whois/server/adapters/arpa.rb +2 -4
- data/lib/whois/server/adapters/base.rb +23 -37
- data/lib/whois/server/adapters/formatted.rb +1 -1
- data/lib/whois/server/adapters/none.rb +1 -1
- data/lib/whois/server/adapters/not_implemented.rb +1 -1
- data/lib/whois/server/adapters/standard.rb +1 -1
- data/lib/whois/server/adapters/verisign.rb +1 -1
- data/lib/whois/server/adapters/web.rb +1 -1
- data/lib/whois/server/socket_handler.rb +1 -1
- data/lib/whois/server.rb +16 -27
- data/lib/whois/version.rb +2 -2
- data/lib/whois.rb +8 -8
- data/spec/integration/whois_spec.rb +1 -1
- data/spec/spec_helper.rb +1 -3
- data/spec/support/helpers/connectivity_helper.rb +1 -3
- data/spec/whois/client_spec.rb +2 -2
- data/spec/whois/record_spec.rb +2 -2
- data/spec/whois/server/adapters/afilias_spec.rb +1 -1
- data/spec/whois/server/adapters/arin_spec.rb +2 -2
- data/spec/whois/server/adapters/formatted_spec.rb +1 -1
- data/spec/whois/server/adapters/not_implemented_spec.rb +1 -1
- data/spec/whois/server/adapters/verisign_spec.rb +2 -2
- data/spec/whois/server/adapters/web_spec.rb +1 -1
- data/whois.gemspec +10 -10
- metadata +7 -5
- data/.travis.yml +0 -18
- data/bin/setup +0 -8
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 8ff6872ad8615b4343c701a4db1eedc42eaa11adbb8e208c57a27925529a1cc2
|
4
|
+
data.tar.gz: fb06f748a5f3c51552ac2554dd09afd5dede8a1827c55a3c4466e9718a81ff20
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a27c9e7c48268fb08698628dc59e89b39182726f76cb882962c4a7fee139afb7bbca24ee1f04852c317221b58598237b036ccbda2d645012816e391e527ec7bf
|
7
|
+
data.tar.gz: 9cbb25f0c7ef46d0a39eb1699fae0d9e64943c8c5f9ae0c919524eb400eb228198046f5527f526d86a342a61746b6053576de9aa7a1967efccf2059ecc7a3e7c
|
data/.github/FUNDING.yml
CHANGED
@@ -1,8 +1,12 @@
|
|
1
1
|
# These are supported funding model platforms
|
2
2
|
|
3
|
-
github:
|
3
|
+
github: [weppos]
|
4
4
|
patreon: # Replace with a single Patreon username
|
5
5
|
open_collective: # Replace with a single Open Collective username
|
6
|
-
ko_fi:
|
6
|
+
ko_fi: # Replace with a single Ko-fi username
|
7
7
|
tidelift: "rubygems/whois"
|
8
|
+
community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry
|
9
|
+
liberapay: # Replace with a single Liberapay username
|
10
|
+
issuehunt: # Replace with a single IssueHunt username
|
11
|
+
otechie: # Replace with a single Otechie username
|
8
12
|
custom: https://whoisrb.org/contribute/#donate
|
@@ -0,0 +1,19 @@
|
|
1
|
+
version: 2
|
2
|
+
updates:
|
3
|
+
- package-ecosystem: bundler
|
4
|
+
directory: /
|
5
|
+
schedule:
|
6
|
+
interval: daily
|
7
|
+
time: "04:00"
|
8
|
+
open-pull-requests-limit: 10
|
9
|
+
labels:
|
10
|
+
- dependencies
|
11
|
+
|
12
|
+
- package-ecosystem: "github-actions"
|
13
|
+
directory: "/"
|
14
|
+
schedule:
|
15
|
+
interval: "daily"
|
16
|
+
time: "04:00"
|
17
|
+
open-pull-requests-limit: 10
|
18
|
+
labels:
|
19
|
+
- dependencies
|
@@ -0,0 +1,64 @@
|
|
1
|
+
# For most projects, this workflow file will not need changing; you simply need
|
2
|
+
# to commit it to your repository.
|
3
|
+
#
|
4
|
+
# You may wish to alter this file to override the set of languages analyzed,
|
5
|
+
# or to provide custom queries or build logic.
|
6
|
+
name: "CodeQL"
|
7
|
+
|
8
|
+
on:
|
9
|
+
push:
|
10
|
+
branches: [ main ]
|
11
|
+
pull_request:
|
12
|
+
# The branches below must be a subset of the branches above
|
13
|
+
branches: [ main ]
|
14
|
+
schedule:
|
15
|
+
- cron: '39 4 * * 0'
|
16
|
+
|
17
|
+
jobs:
|
18
|
+
analyze:
|
19
|
+
name: Analyze
|
20
|
+
runs-on: ubuntu-latest
|
21
|
+
permissions:
|
22
|
+
actions: read
|
23
|
+
contents: read
|
24
|
+
security-events: write
|
25
|
+
|
26
|
+
strategy:
|
27
|
+
fail-fast: false
|
28
|
+
matrix:
|
29
|
+
language: [ 'ruby' ]
|
30
|
+
# CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python', 'ruby' ]
|
31
|
+
# Learn more about CodeQL language support at https://git.io/codeql-language-support
|
32
|
+
|
33
|
+
steps:
|
34
|
+
- name: Checkout repository
|
35
|
+
uses: actions/checkout@v4
|
36
|
+
|
37
|
+
# Initializes the CodeQL tools for scanning.
|
38
|
+
- name: Initialize CodeQL
|
39
|
+
uses: github/codeql-action/init@v2
|
40
|
+
with:
|
41
|
+
languages: ${{ matrix.language }}
|
42
|
+
# If you wish to specify custom queries, you can do so here or in a config file.
|
43
|
+
# By default, queries listed here will override any specified in a config file.
|
44
|
+
# Prefix the list here with "+" to use these queries and those in the config file.
|
45
|
+
# queries: ./path/to/local/query, your-org/your-repo/queries@main
|
46
|
+
|
47
|
+
# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
|
48
|
+
# If this step fails, then you should remove it and run the build manually (see below)
|
49
|
+
- name: Autobuild
|
50
|
+
uses: github/codeql-action/autobuild@v2
|
51
|
+
|
52
|
+
# ℹ️ Command-line programs to run using the OS shell.
|
53
|
+
# 📚 https://git.io/JvXDl
|
54
|
+
|
55
|
+
# ✏️ If the Autobuild fails above, remove it and uncomment the following three lines
|
56
|
+
# and modify them (or add more) to build your code if your project
|
57
|
+
# uses a compiled language
|
58
|
+
|
59
|
+
#- run: |
|
60
|
+
# make bootstrap
|
61
|
+
# make release
|
62
|
+
|
63
|
+
- name: Perform CodeQL Analysis
|
64
|
+
uses: github/codeql-action/analyze@v2
|
@@ -0,0 +1,16 @@
|
|
1
|
+
name: release
|
2
|
+
|
3
|
+
on:
|
4
|
+
push:
|
5
|
+
tags:
|
6
|
+
- v*.*.*
|
7
|
+
jobs:
|
8
|
+
release:
|
9
|
+
runs-on: ubuntu-latest
|
10
|
+
steps:
|
11
|
+
- uses: actions/checkout@v4
|
12
|
+
- name: Release Gem
|
13
|
+
uses: cadwallion/publish-rubygems-action@d9474d9633f4674e59afb0c343f2dafe25181328
|
14
|
+
env:
|
15
|
+
RUBYGEMS_API_KEY: ${{ secrets.RUBYGEMS_API_KEY }}
|
16
|
+
RELEASE_COMMAND: rake release
|
@@ -0,0 +1,30 @@
|
|
1
|
+
name: Tests
|
2
|
+
|
3
|
+
on:
|
4
|
+
push:
|
5
|
+
pull_request:
|
6
|
+
workflow_dispatch:
|
7
|
+
|
8
|
+
jobs:
|
9
|
+
build:
|
10
|
+
strategy:
|
11
|
+
matrix:
|
12
|
+
ruby-version:
|
13
|
+
- "2.6"
|
14
|
+
- "2.7"
|
15
|
+
- "3.0"
|
16
|
+
- "3.1"
|
17
|
+
- "3.2"
|
18
|
+
platform: [ubuntu-latest]
|
19
|
+
runs-on: ${{ matrix.platform }}
|
20
|
+
steps:
|
21
|
+
- uses: actions/checkout@v4
|
22
|
+
- name: Set up Ruby
|
23
|
+
uses: ruby/setup-ruby@v1
|
24
|
+
with:
|
25
|
+
ruby-version: ${{ matrix.ruby-version }}
|
26
|
+
- name: Install dependencies
|
27
|
+
run: bundle install
|
28
|
+
- name: Run tests
|
29
|
+
run: bundle exec rake
|
30
|
+
|
data/.rubocop.yml
CHANGED
data/.rubocop_opinionated.yml
CHANGED
@@ -95,12 +95,6 @@ Layout/EmptyLinesAroundModuleBody:
|
|
95
95
|
Layout/EmptyLineBetweenDefs:
|
96
96
|
Enabled: false
|
97
97
|
|
98
|
-
# I personally don't care about the format style.
|
99
|
-
# In most cases I like to use %, but not at the point I want to enforce it
|
100
|
-
# as a convention in the entire code.
|
101
|
-
Style/FormatString:
|
102
|
-
Enabled: false
|
103
|
-
|
104
98
|
# Annotated tokens (like %<foo>s) are a good thing, but in most cases we don't need them.
|
105
99
|
# %s is a simpler and straightforward version that works in almost all cases. So don't complain.
|
106
100
|
Style/FormatStringToken:
|
@@ -110,11 +104,6 @@ Style/FormatStringToken:
|
|
110
104
|
Style/NegatedIf:
|
111
105
|
Enabled: false
|
112
106
|
|
113
|
-
# For years, %w() has been the de-facto standard. A lot of libraries are using ().
|
114
|
-
# Switching to [] would be a nightmare.
|
115
|
-
Style/PercentLiteralDelimiters:
|
116
|
-
Enabled: false
|
117
|
-
|
118
107
|
# There are cases were the inline rescue is ok. We can either downgrade the severity,
|
119
108
|
# or rely on the developer judgement on a case-by-case basis.
|
120
109
|
Style/RescueModifier:
|
@@ -123,17 +112,6 @@ Style/RescueModifier:
|
|
123
112
|
Style/SymbolArray:
|
124
113
|
EnforcedStyle: brackets
|
125
114
|
|
126
|
-
# Sorry, but using trailing spaces helps readability.
|
127
|
-
#
|
128
|
-
# %w( foo bar )
|
129
|
-
#
|
130
|
-
# looks better to me than
|
131
|
-
#
|
132
|
-
# %w( foo bar )
|
133
|
-
#
|
134
|
-
Layout/SpaceInsidePercentLiteralDelimiters:
|
135
|
-
Enabled: false
|
136
|
-
|
137
115
|
# Hate It or Love It, I prefer double quotes as this is more consistent
|
138
116
|
# with several other programming languages and the output of puts and inspect.
|
139
117
|
Style/StringLiterals:
|
data/.rubocop_todo.yml
CHANGED
@@ -45,13 +45,6 @@ RSpec/ExampleLength:
|
|
45
45
|
- 'spec/whois/server/socket_handler_spec.rb'
|
46
46
|
- 'spec/whois/server_spec.rb'
|
47
47
|
|
48
|
-
# Offense count: 2
|
49
|
-
# Cop supports --auto-correct.
|
50
|
-
# Configuration parameters: .
|
51
|
-
# SupportedStyles: implicit, each, example
|
52
|
-
RSpec/HookArgument:
|
53
|
-
EnforcedStyle: each
|
54
|
-
|
55
48
|
# Offense count: 4
|
56
49
|
# Configuration parameters: AssignmentOnly.
|
57
50
|
RSpec/InstanceVariable:
|
@@ -85,15 +78,6 @@ RSpec/PredicateMatcher:
|
|
85
78
|
- 'spec/whois/record_spec.rb'
|
86
79
|
- 'spec/whois/server/adapters/base_spec.rb'
|
87
80
|
|
88
|
-
# Offense count: 6
|
89
|
-
# Cop supports --auto-correct.
|
90
|
-
RSpec/ReceiveNever:
|
91
|
-
Exclude:
|
92
|
-
- 'spec/whois/server/adapters/afilias_spec.rb'
|
93
|
-
- 'spec/whois/server/adapters/arin_spec.rb'
|
94
|
-
- 'spec/whois/server/adapters/formatted_spec.rb'
|
95
|
-
- 'spec/whois/server/adapters/verisign_spec.rb'
|
96
|
-
|
97
81
|
# Offense count: 40
|
98
82
|
RSpec/StubbedMock:
|
99
83
|
Exclude:
|
@@ -114,16 +98,6 @@ RSpec/SubjectStub:
|
|
114
98
|
Exclude:
|
115
99
|
- 'spec/whois/server/socket_handler_spec.rb'
|
116
100
|
|
117
|
-
# Offense count: 4
|
118
|
-
# Cop supports --auto-correct.
|
119
|
-
# Configuration parameters: EnforcedStyle.
|
120
|
-
# SupportedStyles: prefer_alias, prefer_alias_method
|
121
|
-
Style/Alias:
|
122
|
-
Exclude:
|
123
|
-
- 'lib/whois.rb'
|
124
|
-
- 'lib/whois/record.rb'
|
125
|
-
- 'lib/whois/server/adapters/base.rb'
|
126
|
-
|
127
101
|
# Offense count: 31
|
128
102
|
# Cop supports --auto-correct.
|
129
103
|
# Configuration parameters: EnforcedStyle, ProceduralMethods, FunctionalMethods, IgnoredMethods, AllowBracesOnProceduralOneLiners, BracesRequiredMethods.
|
@@ -169,24 +143,6 @@ Style/GuardClause:
|
|
169
143
|
- 'lib/whois/server/adapters/verisign.rb'
|
170
144
|
- 'spec/support/helpers/connectivity_helper.rb'
|
171
145
|
|
172
|
-
# Offense count: 8
|
173
|
-
# Cop supports --auto-correct.
|
174
|
-
Style/IfUnlessModifier:
|
175
|
-
Exclude:
|
176
|
-
- 'lib/whois/server.rb'
|
177
|
-
- 'lib/whois/server/adapters/arpa.rb'
|
178
|
-
- 'spec/spec_helper.rb'
|
179
|
-
- 'spec/support/helpers/connectivity_helper.rb'
|
180
|
-
|
181
|
-
# Offense count: 1
|
182
|
-
# Cop supports --auto-correct.
|
183
|
-
# Configuration parameters: EnforcedStyle, IgnoredMethods.
|
184
|
-
# SupportedStyles: predicate, comparison
|
185
|
-
Style/NumericPredicate:
|
186
|
-
Exclude:
|
187
|
-
- 'spec/**/*'
|
188
|
-
- 'lib/whois/record/part.rb'
|
189
|
-
|
190
146
|
# Offense count: 13
|
191
147
|
# Cop supports --auto-correct.
|
192
148
|
Style/ParallelAssignment:
|
@@ -194,32 +150,6 @@ Style/ParallelAssignment:
|
|
194
150
|
- 'spec/whois/record_spec.rb'
|
195
151
|
- 'spec/whois/server/adapters/base_spec.rb'
|
196
152
|
|
197
|
-
# Offense count: 3
|
198
|
-
# Cop supports --auto-correct.
|
199
|
-
Style/PerlBackrefs:
|
200
|
-
Exclude:
|
201
|
-
- 'lib/whois/server/adapters/arin.rb'
|
202
|
-
|
203
|
-
# Offense count: 1
|
204
|
-
# Cop supports --auto-correct.
|
205
|
-
Style/RedundantParentheses:
|
206
|
-
Exclude:
|
207
|
-
- 'lib/whois/server/adapters/base.rb'
|
208
|
-
|
209
|
-
# Offense count: 5
|
210
|
-
# Cop supports --auto-correct.
|
211
|
-
Style/RedundantSelf:
|
212
|
-
Exclude:
|
213
|
-
- 'lib/whois/server/adapters/base.rb'
|
214
|
-
|
215
|
-
# Offense count: 1
|
216
|
-
# Cop supports --auto-correct.
|
217
|
-
# Configuration parameters: EnforcedStyle, AllowInnerSlashes.
|
218
|
-
# SupportedStyles: slashes, percent_r, mixed
|
219
|
-
Style/RegexpLiteral:
|
220
|
-
Exclude:
|
221
|
-
- 'lib/whois/server/adapters/arin.rb'
|
222
|
-
|
223
153
|
# Offense count: 1
|
224
154
|
# Cop supports --auto-correct.
|
225
155
|
# Configuration parameters: ConvertCodeThatCanStartToReturnNil, AllowedMethods.
|
@@ -234,9 +164,3 @@ Style/SafeNavigation:
|
|
234
164
|
# SupportedStyles: single_quotes, double_quotes
|
235
165
|
Style/StringLiterals:
|
236
166
|
Enabled: false
|
237
|
-
|
238
|
-
# Offense count: 1
|
239
|
-
# Cop supports --auto-correct.
|
240
|
-
Style/ZeroLengthPredicate:
|
241
|
-
Exclude:
|
242
|
-
- 'lib/whois/record/part.rb'
|
data/.tool-versions
CHANGED
@@ -1 +1 @@
|
|
1
|
-
ruby 2.
|
1
|
+
ruby 3.2.2
|
data/CHANGELOG.md
CHANGED
@@ -3,6 +3,23 @@
|
|
3
3
|
This project uses [Semantic Versioning 2.0.0](http://semver.org/).
|
4
4
|
|
5
5
|
|
6
|
+
## Release 5.1.1
|
7
|
+
|
8
|
+
### Changed
|
9
|
+
|
10
|
+
- SERVER: Updated .UNO (GH-648)
|
11
|
+
- SERVER: Updated .OVH (GH-647)
|
12
|
+
- SERVER: Updated .TV (GH-657)
|
13
|
+
|
14
|
+
|
15
|
+
## Release 5.1.0
|
16
|
+
|
17
|
+
### Changed
|
18
|
+
|
19
|
+
- SERVER: Deleted .VISTAPRINT, .XN--ESTV75G
|
20
|
+
- CHANGED: Eager load all adapters (GH-644). Thanks @casperisfine @byroot
|
21
|
+
|
22
|
+
|
6
23
|
## Release 5.0.2
|
7
24
|
|
8
25
|
### Changed
|
@@ -104,7 +121,7 @@ The `whois` library is now simply a WHOIS client. If you want to use the parsing
|
|
104
121
|
- SERVER: Updated .CASA, .MEET, .WORK, .SURF, .XN--54B7FTA0CC, .CO.ZA [thanks @ranaldobowker], .MOBI
|
105
122
|
|
106
123
|
- CHANGED: Definitions are now private and you cannot access/modify the internal representation directly. Instead, use the accessor methods.
|
107
|
-
- CHANGED: Definitions internal representation changed to be indexed. This change drastically improved the lookup performances for domains, as well fixing the bug GH-536 where the order of the definitions were relevant.
|
124
|
+
- CHANGED: Definitions internal representation changed to be indexed. This change drastically improved the lookup performances for domains, as well fixing the bug GH-536 where the order of the definitions were relevant.
|
108
125
|
|
109
126
|
**beta-2**
|
110
127
|
|
data/CONTRIBUTING.md
CHANGED
@@ -4,39 +4,39 @@
|
|
4
4
|
|
5
5
|
Fork, then clone the repo:
|
6
6
|
|
7
|
-
|
7
|
+
```
|
8
8
|
git clone git@github.com:your-username/whois.git
|
9
|
-
|
9
|
+
```
|
10
10
|
|
11
11
|
Set up your machine:
|
12
12
|
|
13
|
-
|
13
|
+
```
|
14
14
|
bundle
|
15
|
-
|
15
|
+
```
|
16
16
|
|
17
17
|
Make sure the tests pass:
|
18
18
|
|
19
|
-
|
19
|
+
```
|
20
20
|
bundle exec rake
|
21
|
-
|
21
|
+
```
|
22
22
|
|
23
23
|
To propose a change/feature/patch, create your feature branch:
|
24
24
|
|
25
|
-
|
25
|
+
```
|
26
26
|
git checkout -b my-new-feature
|
27
|
-
|
27
|
+
```
|
28
28
|
|
29
29
|
Make your change. Add tests for your change. Make the tests pass:
|
30
30
|
|
31
|
-
|
31
|
+
```
|
32
32
|
bundle exec rake
|
33
|
-
|
33
|
+
```
|
34
34
|
|
35
35
|
Commit your changes:
|
36
36
|
|
37
|
-
|
37
|
+
```
|
38
38
|
git commit -am 'Add some feature'
|
39
|
-
|
39
|
+
```
|
40
40
|
|
41
41
|
Push to your fork and [submit a pull request](https://github.com/weppos/whois/compare/).
|
42
42
|
|
data/Gemfile
CHANGED
data/LICENSE.txt
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
The MIT License (MIT)
|
2
2
|
|
3
|
-
Copyright (c) 2009-
|
3
|
+
Copyright (c) 2009-2022 Simone Carletti
|
4
4
|
|
5
5
|
Permission is hereby granted, free of charge, to any person obtaining a copy
|
6
6
|
of this software and associated documentation files (the "Software"), to deal
|
data/README.md
CHANGED
@@ -4,7 +4,7 @@
|
|
4
4
|
|
5
5
|
This library was extracted from [RoboWhois](https://robowhois.com/) and [RoboDomain](https://robodomain.com/), and it's now in use at [DNSimple](https://dnsimple.com/). It has been performing queries in production since July 2009.
|
6
6
|
|
7
|
-
[![Build Status](https://
|
7
|
+
[![Build Status](https://github.com/weppos/whois/actions/workflows/tests.yml/badge.svg)](https://github.com/weppos/whois/actions/workflows/tests.yml)
|
8
8
|
|
9
9
|
|
10
10
|
## Donate a coffee
|
@@ -42,25 +42,25 @@ For older versions of Ruby, see the [CHANGELOG](CHANGELOG.md).
|
|
42
42
|
|
43
43
|
You can install the gem manually:
|
44
44
|
|
45
|
-
|
45
|
+
```shell
|
46
46
|
gem install whois
|
47
|
-
|
47
|
+
```
|
48
48
|
|
49
49
|
Or use [Bundler](http://bundler.io/) and define it as a dependency in your `Gemfile`:
|
50
50
|
|
51
|
-
|
51
|
+
```ruby
|
52
52
|
gem 'whois'
|
53
|
-
|
53
|
+
```
|
54
54
|
|
55
55
|
To use the WHOIS parser component you need to install the `whois-parser` gem:
|
56
56
|
|
57
|
-
|
57
|
+
```shell
|
58
58
|
gem install whois-parser
|
59
|
-
|
59
|
+
```
|
60
60
|
|
61
|
-
|
61
|
+
```ruby
|
62
62
|
gem 'whois-parser'
|
63
|
-
|
63
|
+
```
|
64
64
|
|
65
65
|
The `whois-parser` gem already depends on the `whois` gem. If you install `whois-parser`, `whois` will be installed as well and it will also be automatically required when you `require 'whois-parser'`.
|
66
66
|
|
@@ -77,7 +77,7 @@ This section covers only the essentials for getting started with the Whois libra
|
|
77
77
|
|
78
78
|
Check out the following examples:
|
79
79
|
|
80
|
-
|
80
|
+
```ruby
|
81
81
|
# Domain WHOIS
|
82
82
|
whois = Whois::Client.new
|
83
83
|
whois.lookup("google.com")
|
@@ -97,29 +97,29 @@ whois.lookup("74.125.67.100")
|
|
97
97
|
whois = Whois::Client.new
|
98
98
|
whois.lookup("2001:db8::1428:57ab")
|
99
99
|
# => #<Whois::Record>
|
100
|
-
|
100
|
+
```
|
101
101
|
|
102
102
|
The query method is stateless. For this reason, you can safely re-use the same client instance for multiple queries.
|
103
103
|
|
104
|
-
|
104
|
+
```ruby
|
105
105
|
whois = Whois::Client.new
|
106
106
|
whois.lookup("google.com")
|
107
107
|
whois.lookup(".com")
|
108
108
|
whois.lookup("74.125.67.100")
|
109
109
|
whois.lookup("2001:db8::1428:57ab")
|
110
110
|
whois.lookup("google.it")
|
111
|
-
|
111
|
+
```
|
112
112
|
|
113
113
|
If you just need a WHOIS response and you don't care about a full control of the WHOIS client, the `Whois` module provides an all-in-one method called `Whois.whois`. This is the simplest way to send a WHOIS request.
|
114
114
|
|
115
|
-
|
115
|
+
```ruby
|
116
116
|
Whois.whois("google.com")
|
117
117
|
# => #<Whois::Record>
|
118
|
-
|
118
|
+
```
|
119
119
|
|
120
120
|
Did I mention you can even use blocks?
|
121
121
|
|
122
|
-
|
122
|
+
```ruby
|
123
123
|
Whois::Client.new do |w|
|
124
124
|
w.lookup("google.com")
|
125
125
|
w.lookup(".com")
|
@@ -127,7 +127,7 @@ Whois::Client.new do |w|
|
|
127
127
|
w.lookup("2001:db8::1428:57ab")
|
128
128
|
w.lookup("google.it")
|
129
129
|
end
|
130
|
-
|
130
|
+
```
|
131
131
|
|
132
132
|
### Consuming the Record
|
133
133
|
|
@@ -135,7 +135,7 @@ Any WHOIS query returns a `Whois::Record`. This object looks like a String, but
|
|
135
135
|
|
136
136
|
`Whois::Record` encapsulates a WHOIS record and provides the ability to parse the WHOIS response programmatically, when the `whois-parser` gem is installed and loaded.
|
137
137
|
|
138
|
-
|
138
|
+
```ruby
|
139
139
|
require 'whois-parser'
|
140
140
|
|
141
141
|
record = Whois.whois("google.it")
|
@@ -162,7 +162,7 @@ tech.name
|
|
162
162
|
parser.nameservers.each do |nameserver|
|
163
163
|
puts nameserver
|
164
164
|
end
|
165
|
-
|
165
|
+
```
|
166
166
|
|
167
167
|
This feature is made possible by the <tt>Whois</tt> record parsers. Unfortunately, due to the lack of a global standard, each WHOIS server requires a specific parser. For this reason, the library doesn't support all existing WHOIS servers.
|
168
168
|
|
@@ -174,14 +174,14 @@ By default, each query run though the client has a timeout value of 5 seconds. I
|
|
174
174
|
|
175
175
|
Of course, you can customize the timeout value setting a different value. If timeout is `nil`, the client will wait until the response is sent back from the server or the process is killed. Don't disable the timeout unless you really know what you are doing!
|
176
176
|
|
177
|
-
|
177
|
+
```ruby
|
178
178
|
whois = Whois::Client.new(:timeout => 10)
|
179
179
|
whois.timeout # => 10
|
180
180
|
whois.timeout = 5
|
181
181
|
whois.timeout # => 5
|
182
182
|
|
183
183
|
whois.lookup("google.com")
|
184
|
-
|
184
|
+
```
|
185
185
|
|
186
186
|
|
187
187
|
## Credits
|
@@ -213,4 +213,4 @@ Report issues or feature requests to [GitHub Issues](https://github.com/weppos/w
|
|
213
213
|
|
214
214
|
## License
|
215
215
|
|
216
|
-
Copyright (c) 2009-
|
216
|
+
Copyright (c) 2009-2022 [Simone Carletti](https://simonecarletti.com/). This is Free Software distributed under the MIT license.
|
data/bin/whoisrb
CHANGED
data/data/tld.json
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
{
|
2
2
|
"_": {
|
3
3
|
"schema": "2",
|
4
|
-
"updated": "
|
4
|
+
"updated": "2023-11-08 10:10:00 UTC"
|
5
5
|
},
|
6
6
|
"aaa": {
|
7
7
|
"_type": "newgtld",
|
@@ -2717,6 +2717,7 @@
|
|
2717
2717
|
"host": "whois.nic.hospital"
|
2718
2718
|
},
|
2719
2719
|
"host": {
|
2720
|
+
"_group": "centralnic",
|
2720
2721
|
"_type": "newgtld",
|
2721
2722
|
"host": "whois.nic.host"
|
2722
2723
|
},
|
@@ -4212,7 +4213,7 @@
|
|
4212
4213
|
"ovh": {
|
4213
4214
|
"_group": "nicfr",
|
4214
4215
|
"_type": "newgtld",
|
4215
|
-
"host": "whois
|
4216
|
+
"host": "whois.ovh.com"
|
4216
4217
|
},
|
4217
4218
|
"pa": {
|
4218
4219
|
"adapter": "web",
|
@@ -5269,6 +5270,7 @@
|
|
5269
5270
|
"host": "whois.nic.storage"
|
5270
5271
|
},
|
5271
5272
|
"store": {
|
5273
|
+
"_group": "centralnic",
|
5272
5274
|
"_type": "newgtld",
|
5273
5275
|
"host": "whois.nic.store"
|
5274
5276
|
},
|
@@ -5667,7 +5669,7 @@
|
|
5667
5669
|
"host": "whois.nic.tushu"
|
5668
5670
|
},
|
5669
5671
|
"tv": {
|
5670
|
-
"host": "
|
5672
|
+
"host": "whois.nic.tv",
|
5671
5673
|
"adapter": "verisign"
|
5672
5674
|
},
|
5673
5675
|
"tvs": {
|
@@ -5744,8 +5746,9 @@
|
|
5744
5746
|
"host": "whois.nic.university"
|
5745
5747
|
},
|
5746
5748
|
"uno": {
|
5749
|
+
"_group": "centralnic",
|
5747
5750
|
"_type": "newgtld",
|
5748
|
-
"
|
5751
|
+
"host": "whois.nic.uno"
|
5749
5752
|
},
|
5750
5753
|
"uol": {
|
5751
5754
|
"_group": "nicbr",
|
@@ -5871,10 +5874,6 @@
|
|
5871
5874
|
"_type": "newgtld",
|
5872
5875
|
"host": "whois.nic.vision"
|
5873
5876
|
},
|
5874
|
-
"vistaprint": {
|
5875
|
-
"_type": "newgtld",
|
5876
|
-
"host": "whois.nic.vistaprint"
|
5877
|
-
},
|
5878
5877
|
"viva": {
|
5879
5878
|
"_group": "centralnic",
|
5880
5879
|
"_type": "newgtld",
|
@@ -5980,6 +5979,7 @@
|
|
5980
5979
|
"host": "whois.nic.weber"
|
5981
5980
|
},
|
5982
5981
|
"website": {
|
5982
|
+
"_group": "centralnic",
|
5983
5983
|
"_type": "newgtld",
|
5984
5984
|
"host": "whois.nic.website"
|
5985
5985
|
},
|
@@ -6314,11 +6314,6 @@
|
|
6314
6314
|
"_type": "newgtld",
|
6315
6315
|
"host": "whois.nic.xn--efvy88h"
|
6316
6316
|
},
|
6317
|
-
"xn--estv75g": {
|
6318
|
-
"_group": "afiliassrs",
|
6319
|
-
"_type": "newgtld",
|
6320
|
-
"host": "whois.nic.xn--estv75g"
|
6321
|
-
},
|
6322
6317
|
"xn--fct429k": {
|
6323
6318
|
"_group": "amazonregistry",
|
6324
6319
|
"_type": "newgtld",
|
@@ -6829,4 +6824,4 @@
|
|
6829
6824
|
"zw": {
|
6830
6825
|
"adapter": "none"
|
6831
6826
|
}
|
6832
|
-
}
|
6827
|
+
}
|