whois 5.1.0 → 5.1.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 57e93e3592c7474005c2c875c60b9631830d522ef138ffee62a65125fb0cf2f6
4
- data.tar.gz: 2138fc21071a0fec27d38d46d193f422c41b4b424c5abea7e0c85e72a76180c6
3
+ metadata.gz: 8ff6872ad8615b4343c701a4db1eedc42eaa11adbb8e208c57a27925529a1cc2
4
+ data.tar.gz: fb06f748a5f3c51552ac2554dd09afd5dede8a1827c55a3c4466e9718a81ff20
5
5
  SHA512:
6
- metadata.gz: 4296a63ef5057958e53dc08c654857956a7b46733d75264036fe29c621e484d04ef9555569a8add7f0a50db713a4d9a4a0b1b10b32ad87189068f871ca8c22b4
7
- data.tar.gz: fc9f0066f3040855a0886acfa826cf4b76ecf83450b051b817c8d3b9925b29bef5aecc74ae10f4003f1e2b1bbd0ee4cabc15fabcadcd3ee6a8199eb5ae6f8f3c
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: # Replace with up to 4 GitHub Sponsors-enabled usernames e.g., [user1, user2]
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: weppos # Replace with a single Ko-fi username
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
@@ -6,3 +6,14 @@ updates:
6
6
  interval: daily
7
7
  time: "04:00"
8
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
@@ -32,11 +32,11 @@ jobs:
32
32
 
33
33
  steps:
34
34
  - name: Checkout repository
35
- uses: actions/checkout@v2
35
+ uses: actions/checkout@v4
36
36
 
37
37
  # Initializes the CodeQL tools for scanning.
38
38
  - name: Initialize CodeQL
39
- uses: github/codeql-action/init@v1
39
+ uses: github/codeql-action/init@v2
40
40
  with:
41
41
  languages: ${{ matrix.language }}
42
42
  # If you wish to specify custom queries, you can do so here or in a config file.
@@ -47,7 +47,7 @@ jobs:
47
47
  # Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
48
48
  # If this step fails, then you should remove it and run the build manually (see below)
49
49
  - name: Autobuild
50
- uses: github/codeql-action/autobuild@v1
50
+ uses: github/codeql-action/autobuild@v2
51
51
 
52
52
  # ℹ️ Command-line programs to run using the OS shell.
53
53
  # 📚 https://git.io/JvXDl
@@ -61,4 +61,4 @@ jobs:
61
61
  # make release
62
62
 
63
63
  - name: Perform CodeQL Analysis
64
- uses: github/codeql-action/analyze@v1
64
+ uses: github/codeql-action/analyze@v2
@@ -8,9 +8,9 @@ jobs:
8
8
  release:
9
9
  runs-on: ubuntu-latest
10
10
  steps:
11
- - uses: actions/checkout@v2
11
+ - uses: actions/checkout@v4
12
12
  - name: Release Gem
13
- uses: cadwallion/publish-rubygems-action@8f9e0538302643309e4e43bf48cd34173ca48cfc
13
+ uses: cadwallion/publish-rubygems-action@d9474d9633f4674e59afb0c343f2dafe25181328
14
14
  env:
15
15
  RUBYGEMS_API_KEY: ${{ secrets.RUBYGEMS_API_KEY }}
16
16
  RELEASE_COMMAND: rake release
@@ -14,10 +14,11 @@ jobs:
14
14
  - "2.7"
15
15
  - "3.0"
16
16
  - "3.1"
17
+ - "3.2"
17
18
  platform: [ubuntu-latest]
18
19
  runs-on: ${{ matrix.platform }}
19
20
  steps:
20
- - uses: actions/checkout@v2
21
+ - uses: actions/checkout@v4
21
22
  - name: Set up Ruby
22
23
  uses: ruby/setup-ruby@v1
23
24
  with:
data/.tool-versions CHANGED
@@ -1 +1 @@
1
- ruby 3.0.3
1
+ ruby 3.2.2
data/CHANGELOG.md CHANGED
@@ -3,6 +3,15 @@
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
+
6
15
  ## Release 5.1.0
7
16
 
8
17
  ### Changed
@@ -112,7 +121,7 @@ The `whois` library is now simply a WHOIS client. If you want to use the parsing
112
121
  - SERVER: Updated .CASA, .MEET, .WORK, .SURF, .XN--54B7FTA0CC, .CO.ZA [thanks @ranaldobowker], .MOBI
113
122
 
114
123
  - CHANGED: Definitions are now private and you cannot access/modify the internal representation directly. Instead, use the accessor methods.
115
- - 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.
116
125
 
117
126
  **beta-2**
118
127
 
data/Gemfile CHANGED
@@ -1,8 +1,8 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- source 'https://rubygems.org'
3
+ source "https://rubygems.org"
4
4
 
5
5
  gemspec
6
6
 
7
- gem "rubocop", "1.12.1", require: false
8
- gem 'rubocop-rspec', require: false
7
+ gem "rubocop", require: false
8
+ gem "rubocop-rspec", require: false
data/bin/whoisrb CHANGED
@@ -47,7 +47,7 @@ OptionParser.new do |opts|
47
47
  exit 1
48
48
  end
49
49
 
50
- if ARGV.size.zero?
50
+ if ARGV.empty?
51
51
  puts opts
52
52
  exit 1
53
53
  end
data/data/tld.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "_": {
3
3
  "schema": "2",
4
- "updated": "2021-03-02 11:55:00 UTC"
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-ovh.nic.fr"
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": "tvwhois.verisign-grs.com",
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
- "adapter": "none"
5751
+ "host": "whois.nic.uno"
5749
5752
  },
5750
5753
  "uol": {
5751
5754
  "_group": "nicbr",
@@ -5976,6 +5979,7 @@
5976
5979
  "host": "whois.nic.weber"
5977
5980
  },
5978
5981
  "website": {
5982
+ "_group": "centralnic",
5979
5983
  "_type": "newgtld",
5980
5984
  "host": "whois.nic.website"
5981
5985
  },
@@ -6820,4 +6824,4 @@
6820
6824
  "zw": {
6821
6825
  "adapter": "none"
6822
6826
  }
6823
- }
6827
+ }
@@ -26,7 +26,7 @@ module Whois
26
26
  def initialize(*args)
27
27
  if args.first.is_a? Hash
28
28
  initialize_with_hash(args.first)
29
- elsif args.size.zero?
29
+ elsif args.empty?
30
30
  super
31
31
  else
32
32
  raise ArgumentError
@@ -44,7 +44,7 @@ module Whois
44
44
 
45
45
  {
46
46
  host: Regexp.last_match(1),
47
- port: Regexp.last_match(2) ? Regexp.last_match(2).to_i : nil,
47
+ port: Regexp.last_match(2)&.to_i,
48
48
  }
49
49
  end
50
50
 
data/lib/whois/version.rb CHANGED
@@ -11,5 +11,5 @@
11
11
 
12
12
  module Whois
13
13
  # The current library version.
14
- VERSION = "5.1.0"
14
+ VERSION = "5.1.1"
15
15
  end
data/lib/whois.rb CHANGED
@@ -44,7 +44,7 @@ module Whois
44
44
  def available?(object)
45
45
  unless defined? Whois::Parser
46
46
  warn("Whois.available? requires the gem `whois-parser`")
47
- return
47
+ return false
48
48
  end
49
49
 
50
50
  deprecate(%{Whois.available? is deprecated. Call Whois.whois("#{object}").parser.available?})
@@ -61,7 +61,7 @@ module Whois
61
61
  def registered?(object)
62
62
  unless defined? Whois::Parser
63
63
  warn("Whois.registered? requires the gem `whois-parser`")
64
- return
64
+ return false
65
65
  end
66
66
 
67
67
  deprecate(%{Whois.registered? is deprecated. Call Whois.whois("#{object}").parser.registered?})
@@ -90,8 +90,8 @@ module Whois
90
90
  # @private
91
91
  def bug!(error, message)
92
92
  raise error, message.dup <<
93
- " Please report the issue at" \
94
- " http://github.com/weppos/whois/issues"
93
+ " Please report the issue at " \
94
+ "http://github.com/weppos/whois/issues"
95
95
  end
96
96
 
97
97
 
@@ -6,7 +6,7 @@ describe Whois do
6
6
  let(:response) { "Domain: example.it\nStatus: AVAILABLE\n" }
7
7
 
8
8
  describe "Basic WHOIS querying and parsing" do
9
- it "works" do
9
+ it "queries and returns a record" do
10
10
  with_definitions do
11
11
  Whois::Server.define(:tld, "it", "whois.nic.it")
12
12
  expect(Whois::Server::Adapters::Standard.query_handler).to receive(:call)
@@ -135,8 +135,8 @@ describe Whois::Client do
135
135
  describe "#query" do
136
136
  it "sends a query for given domain" do
137
137
  record = described_class.new.lookup("weppos.it")
138
- assert record.match?(/Domain:\s+weppos\.it/)
139
- assert record.match?(/Created:/)
138
+ expect(record.match?(/Domain:\s+weppos\.it/)).to be(true)
139
+ expect(record.match?(/Created:/)).to be(true)
140
140
  end
141
141
  end
142
142
  end
@@ -138,8 +138,8 @@ describe Whois::Record do
138
138
 
139
139
  describe "#match?" do
140
140
  it "calls match and checks for match" do
141
- expect(subject.match?(/record/)).to eq(true)
142
- expect(subject.match?(/nomatch/)).to eq(false)
141
+ expect(subject.match?(/record/)).to be(true)
142
+ expect(subject.match?(/nomatch/)).to be(false)
143
143
  end
144
144
  end
145
145
 
data/whois.gemspec CHANGED
@@ -1,18 +1,18 @@
1
1
  # -*- encoding: utf-8 -*-
2
- $:.push File.expand_path('../lib', __FILE__)
3
- require 'whois/version'
2
+ $:.push File.expand_path("../lib", __FILE__)
3
+ require "whois/version"
4
4
 
5
5
  Gem::Specification.new do |s|
6
- s.name = 'whois'
6
+ s.name = "whois"
7
7
  s.version = Whois::VERSION
8
- s.authors = ['Simone Carletti']
9
- s.email = ['weppos@weppos.net']
10
- s.homepage = 'https://whoisrb.org/'
11
- s.summary = 'An intelligent pure Ruby WHOIS client and parser.'
12
- s.description = 'Whois is an intelligent WHOIS client and parser written in pure Ruby. It can query registry data for IPv4, IPv6 and top level domains, and parse the responses into easy-to-use Ruby objects via the whois-parser library.'
13
- s.license = 'MIT'
8
+ s.authors = ["Simone Carletti"]
9
+ s.email = ["weppos@weppos.net"]
10
+ s.homepage = "https://whoisrb.org/"
11
+ s.summary = "An intelligent pure Ruby WHOIS client and parser."
12
+ s.description = "Whois is an intelligent WHOIS client and parser written in pure Ruby. It can query registry data for IPv4, IPv6 and top level domains, and parse the responses into easy-to-use Ruby objects via the whois-parser library."
13
+ s.license = "MIT"
14
14
 
15
- s.required_ruby_version = '>= 2.4'
15
+ s.required_ruby_version = ">= 2.4"
16
16
 
17
17
  s.require_paths = %w( lib )
18
18
  s.executables =%w( whoisrb )
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: whois
3
3
  version: !ruby/object:Gem::Version
4
- version: 5.1.0
4
+ version: 5.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Simone Carletti
8
- autorequire:
8
+ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2022-03-15 00:00:00.000000000 Z
11
+ date: 2023-11-08 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rake
@@ -151,7 +151,7 @@ homepage: https://whoisrb.org/
151
151
  licenses:
152
152
  - MIT
153
153
  metadata: {}
154
- post_install_message:
154
+ post_install_message:
155
155
  rdoc_options: []
156
156
  require_paths:
157
157
  - lib
@@ -166,8 +166,39 @@ required_rubygems_version: !ruby/object:Gem::Requirement
166
166
  - !ruby/object:Gem::Version
167
167
  version: '0'
168
168
  requirements: []
169
- rubygems_version: 3.3.7
170
- signing_key:
169
+ rubygems_version: 3.4.21
170
+ signing_key:
171
171
  specification_version: 4
172
172
  summary: An intelligent pure Ruby WHOIS client and parser.
173
- test_files: []
173
+ test_files:
174
+ - spec/fixtures/referrals/afilias.bz.txt
175
+ - spec/fixtures/referrals/arin_referral_apnic.txt
176
+ - spec/fixtures/referrals/arin_referral_missing.txt
177
+ - spec/fixtures/referrals/arin_referral_ripe.txt
178
+ - spec/fixtures/referrals/arin_referral_rwhois.txt
179
+ - spec/fixtures/referrals/arin_referral_servernap.txt
180
+ - spec/fixtures/referrals/arin_referral_whois.txt
181
+ - spec/fixtures/referrals/crsnic.com.txt
182
+ - spec/fixtures/referrals/crsnic.com_referral.txt
183
+ - spec/fixtures/referrals/crsnic.com_referral_missing.txt
184
+ - spec/integration/whois_spec.rb
185
+ - spec/spec_helper.rb
186
+ - spec/support/helpers/connectivity_helper.rb
187
+ - spec/support/helpers/spec_helper.rb
188
+ - spec/whois/client_spec.rb
189
+ - spec/whois/record/part_spec.rb
190
+ - spec/whois/record_spec.rb
191
+ - spec/whois/server/adapters/afilias_spec.rb
192
+ - spec/whois/server/adapters/arin_spec.rb
193
+ - spec/whois/server/adapters/arpa_spec.rb
194
+ - spec/whois/server/adapters/base_spec.rb
195
+ - spec/whois/server/adapters/formatted_spec.rb
196
+ - spec/whois/server/adapters/none_spec.rb
197
+ - spec/whois/server/adapters/not_implemented_spec.rb
198
+ - spec/whois/server/adapters/standard_spec.rb
199
+ - spec/whois/server/adapters/verisign_spec.rb
200
+ - spec/whois/server/adapters/web_spec.rb
201
+ - spec/whois/server/socket_handler_spec.rb
202
+ - spec/whois/server_spec.rb
203
+ - spec/whois/web_interface_error_spec.rb
204
+ - spec/whois/whois_spec.rb