whois 6.0.2 → 6.0.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: e64d874205f6eca344d3975f0875549c7d5f2a002e3380544cf869bc1a13eb66
4
- data.tar.gz: 76d7a2839d49787c470b1e555752916a7b6fae580816b97190f1b0edfcbbd656
3
+ metadata.gz: 323b84ddf445360ef0ca8b34255c4c0e757e093686977527e48daa8a075bde0f
4
+ data.tar.gz: 8623b98ca2197553455cbe492985998e57da97c33365764ddca3db4d88654048
5
5
  SHA512:
6
- metadata.gz: 7cbd42e91809e62fc7f67ae51dff76392c8d706cff0443c7f26adb26b5590653c777f4e91158de1a75e6d43a96106fcb7d29aa1130dc14c293a0024f43bc010a
7
- data.tar.gz: 81a76fb294b075cd2bb77e21fd337e9895694d01bd117abe8d694a26b32b8d1ab9df7af9375d21d51bc18d731637c50647df2ee5aa288b46391bcc1686c9fce0
6
+ metadata.gz: '02905cd1c4afad69252755c353d40b593e58dd4f30faf7bbdaedb6327eae492581c4de907a68ba2dd26fb6f2a0b2c1e1b9d988ba0dd2b7bc14a7667364f80154'
7
+ data.tar.gz: dea62077b39e017f2924e213f9125159d1d54dc95bbe93862f56cad2263a511249d280ec87ea329fad9690653ab103a6a0658a111630d32d22403fda028f0046
@@ -79,21 +79,11 @@ Style/Documentation:
79
79
  Layout/EmptyLines:
80
80
  Enabled: false
81
81
 
82
- # In most cases, a space is nice. Sometimes, it's not.
83
- # Just be consistent with the rest of the surrounding code.
84
- Layout/EmptyLinesAroundClassBody:
85
- Enabled: false
86
-
87
- # In most cases, a space is nice. Sometimes, it's not.
88
- # Just be consistent with the rest of the surrounding code.
89
- Layout/EmptyLinesAroundModuleBody:
90
- Enabled: false
91
-
92
82
  # This is quite buggy, as it doesn't recognize double lines.
93
83
  # Double empty lines are useful to separate conceptually different methods
94
84
  # in the same class or module.
95
85
  Layout/EmptyLineBetweenDefs:
96
- Enabled: false
86
+ NumberOfEmptyLines: [1, 2]
97
87
 
98
88
  # Annotated tokens (like %<foo>s) are a good thing, but in most cases we don't need them.
99
89
  # %s is a simpler and straightforward version that works in almost all cases. So don't complain.
@@ -123,13 +113,3 @@ Style/TrailingCommaInArrayLiteral:
123
113
  EnforcedStyleForMultiline: consistent_comma
124
114
  Style/TrailingCommaInHashLiteral:
125
115
  EnforcedStyleForMultiline: consistent_comma
126
-
127
- Style/TrivialAccessors:
128
- # IgnoreClassMethods because I want to be able to define class-level accessors
129
- # that sets an instance variable on the metaclass, such as:
130
- #
131
- # def self.default=(value)
132
- # @default = value
133
- # end
134
- #
135
- IgnoreClassMethods: true
data/CHANGELOG.md CHANGED
@@ -3,6 +3,14 @@
3
3
  This project uses [Semantic Versioning 2.0.0](http://semver.org/).
4
4
 
5
5
 
6
+ ## Release 6.0.3
7
+
8
+ ### Changed
9
+
10
+ - SERVER: Updated .CO (GH-669).
11
+ - SERVER: Updated .TR (GH-667).
12
+
13
+
6
14
  ## Release 6.0.2
7
15
 
8
16
  ### Changed
data/Gemfile CHANGED
@@ -4,5 +4,5 @@ source "https://rubygems.org"
4
4
 
5
5
  gemspec
6
6
 
7
- gem "rubocop", "~> 1.79.2", require: false
8
- gem "rubocop-rspec", "~> 3.6.0", require: false
7
+ gem "rubocop", "~> 1.81.1", require: false
8
+ gem "rubocop-rspec", "~> 3.7.0", require: false
data/data/tld.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "_": {
3
3
  "schema": "2",
4
- "updated": "2025-08-19 13:40:00 UTC"
4
+ "updated": "2025-10-15 09:25:00 UTC"
5
5
  },
6
6
  "aaa": {
7
7
  "_type": "newgtld",
@@ -1040,7 +1040,7 @@
1040
1040
  "adapter": "none"
1041
1041
  },
1042
1042
  "co": {
1043
- "host": "whois.nic.co"
1043
+ "host": "whois.registry.co"
1044
1044
  },
1045
1045
  "coach": {
1046
1046
  "_type": "newgtld",
@@ -4952,7 +4952,7 @@
4952
4952
  "host": "whois.nic.toys"
4953
4953
  },
4954
4954
  "tr": {
4955
- "host": "whois.nic.tr"
4955
+ "host": "whois.trabis.gov.tr"
4956
4956
  },
4957
4957
  "trade": {
4958
4958
  "_type": "newgtld",
data/lib/whois/client.rb CHANGED
@@ -13,9 +13,7 @@ require "timeout"
13
13
 
14
14
 
15
15
  module Whois
16
-
17
16
  class Client
18
-
19
17
  # The maximum time to run a WHOIS query, expressed in seconds.
20
18
  #
21
19
  # @return [Fixnum] Timeout value in seconds.
@@ -96,7 +94,5 @@ module Whois
96
94
  @server.lookup(string)
97
95
  end
98
96
  end
99
-
100
97
  end
101
-
102
98
  end
data/lib/whois/errors.rb CHANGED
@@ -10,7 +10,6 @@
10
10
 
11
11
 
12
12
  module Whois
13
-
14
13
  # The base error class for all <tt>Whois</tt> error classes.
15
14
  class Error < StandardError
16
15
  end
@@ -73,7 +72,6 @@ module Whois
73
72
  # standard WHOIS interface via port 43. This is the case of some
74
73
  # specific domains that only provide a web-based WHOIS interface. (\x01)
75
74
  class WebInterfaceError < InterfaceNotSupported
76
-
77
75
  # @return [String] The URL of the web-based WHOIS interface.
78
76
  attr_reader :url
79
77
 
@@ -84,9 +82,7 @@ module Whois
84
82
  @url = url
85
83
  super("This TLD has no WHOIS server, but you can access the WHOIS database at `#{@url}'")
86
84
  end
87
-
88
85
  end
89
86
 
90
87
  # @!endgroup
91
-
92
88
  end
@@ -11,7 +11,6 @@
11
11
 
12
12
  module Whois
13
13
  class Record
14
-
15
14
  # A single {Whois::Record} fragment. For instance,
16
15
  # in case of *thin server*, a {Whois::Record} can be composed by
17
16
  # one or more parts corresponding to all responses
@@ -42,6 +41,5 @@ module Whois
42
41
  end
43
42
  end
44
43
  end
45
-
46
44
  end
47
45
  end
data/lib/whois/record.rb CHANGED
@@ -13,10 +13,7 @@ require "whois/record/part"
13
13
 
14
14
 
15
15
  module Whois
16
-
17
16
  class Record
18
-
19
-
20
17
  # @return [Whois::Server] The server that originated this record.
21
18
  attr_reader :server
22
19
 
@@ -113,7 +110,5 @@ module Whois
113
110
  def content
114
111
  @content ||= parts.map(&:body).join("\n")
115
112
  end
116
-
117
113
  end
118
-
119
114
  end
@@ -12,14 +12,12 @@
12
12
  module Whois
13
13
  class Server
14
14
  module Adapters
15
-
16
15
  #
17
16
  # = Afilias Adapter
18
17
  #
19
18
  # Provides ability to query Afilias WHOIS interfaces.
20
19
  #
21
20
  class Afilias < Base
22
-
23
21
  # Executes a WHOIS query to the Afilias WHOIS interface,
24
22
  # resolving any intermediate referral,
25
23
  # and appends the response to the client buffer.
@@ -46,9 +44,7 @@ module Whois
46
44
  server = match[match.size - 1].strip
47
45
  server.empty? ? nil : server
48
46
  end
49
-
50
47
  end
51
-
52
48
  end
53
49
  end
54
50
  end
@@ -12,14 +12,12 @@
12
12
  module Whois
13
13
  class Server
14
14
  module Adapters
15
-
16
15
  #
17
16
  # = Arin Adapter
18
17
  #
19
18
  # Provides ability to query Arin WHOIS interfaces.
20
19
  #
21
20
  class Arin < Base
22
-
23
21
  # Executes a WHOIS query to the Arin WHOIS interface,
24
22
  # resolving any intermediate referral,
25
23
  # and appends the response to the client buffer.
@@ -47,9 +45,7 @@ module Whois
47
45
  port: Regexp.last_match(2)&.to_i,
48
46
  }
49
47
  end
50
-
51
48
  end
52
-
53
49
  end
54
50
  end
55
51
  end
@@ -12,9 +12,7 @@
12
12
  module Whois
13
13
  class Server
14
14
  module Adapters
15
-
16
15
  class Arpa < Base
17
-
18
16
  def request(string)
19
17
  record = Server.guess(inaddr_to_ip(string)).lookup(string)
20
18
  part = record.parts.first
@@ -40,9 +38,7 @@ module Whois
40
38
  token
41
39
  end.join(".")
42
40
  end
43
-
44
41
  end
45
-
46
42
  end
47
43
  end
48
44
  end
@@ -17,7 +17,6 @@ require "whois/server/socket_handler"
17
17
  module Whois
18
18
  class Server
19
19
  module Adapters
20
-
21
20
  class Base
22
21
  class << self
23
22
  def query_handler
@@ -170,9 +169,7 @@ module Whois
170
169
  end
171
170
 
172
171
  alias query_the_socket query
173
-
174
172
  end
175
-
176
173
  end
177
174
  end
178
175
  end
@@ -12,7 +12,6 @@
12
12
  module Whois
13
13
  class Server
14
14
  module Adapters
15
-
16
15
  #
17
16
  # = Formatted Adapter
18
17
  #
@@ -34,7 +33,6 @@ module Whois
34
33
  # @see Whois::Server::Adapters::Standard
35
34
  #
36
35
  class Formatted < Base
37
-
38
36
  # Executes a WHOIS query to the WHOIS interface
39
37
  # listening at +host+ and appends the response
40
38
  # to the client buffer.
@@ -52,9 +50,7 @@ module Whois
52
50
  response = query_the_socket(format(options[:format], string), host)
53
51
  buffer_append response, host
54
52
  end
55
-
56
53
  end
57
-
58
54
  end
59
55
  end
60
56
  end
@@ -12,7 +12,6 @@
12
12
  module Whois
13
13
  class Server
14
14
  module Adapters
15
-
16
15
  #
17
16
  # = None Adapter
18
17
  #
@@ -28,7 +27,6 @@ module Whois
28
27
  # adapter raises a {Whois::NoInterfaceError} exception.
29
28
  #
30
29
  class None < Base
31
-
32
30
  # Always raises a {Whois::NoInterfaceError} exception.
33
31
  #
34
32
  # @param [String] string
@@ -39,9 +37,7 @@ module Whois
39
37
  def request(_string)
40
38
  raise NoInterfaceError, "This `#{type}' has no whois server"
41
39
  end
42
-
43
40
  end
44
-
45
41
  end
46
42
  end
47
43
  end
@@ -12,9 +12,7 @@
12
12
  module Whois
13
13
  class Server
14
14
  module Adapters
15
-
16
15
  class NotImplemented < Base
17
-
18
16
  # Always raises a {Whois::ServerNotImplemented} exception.
19
17
  #
20
18
  # @param [String] string
@@ -25,9 +23,7 @@ module Whois
25
23
  def request(_string)
26
24
  raise ServerNotImplemented, "The `#{host}' feature has not been implemented yet."
27
25
  end
28
-
29
26
  end
30
-
31
27
  end
32
28
  end
33
29
  end
@@ -12,7 +12,6 @@
12
12
  module Whois
13
13
  class Server
14
14
  module Adapters
15
-
16
15
  #
17
16
  # = Standard Adapter
18
17
  #
@@ -38,7 +37,6 @@ module Whois
38
37
  # * +:port+ - Specifies a port number different than 43
39
38
  #
40
39
  class Standard < Base
41
-
42
40
  # Executes a WHOIS query to the WHOIS interface
43
41
  # listening at +host+ and appends the response
44
42
  # to the client buffer.
@@ -53,9 +51,7 @@ module Whois
53
51
  response = query_the_socket(string, host)
54
52
  buffer_append response, host
55
53
  end
56
-
57
54
  end
58
-
59
55
  end
60
56
  end
61
57
  end
@@ -12,14 +12,12 @@
12
12
  module Whois
13
13
  class Server
14
14
  module Adapters
15
-
16
15
  #
17
16
  # = Verisign Adapter
18
17
  #
19
18
  # Provides ability to query Verisign WHOIS interfaces.
20
19
  #
21
20
  class Verisign < Base
22
-
23
21
  # Executes a WHOIS query to the Verisign WHOIS interface,
24
22
  # resolving any intermediate referral,
25
23
  # and appends the response to the client buffer.
@@ -46,9 +44,7 @@ module Whois
46
44
  server = match[match.size - 1].strip
47
45
  server.empty? ? nil : server
48
46
  end
49
-
50
47
  end
51
-
52
48
  end
53
49
  end
54
50
  end
@@ -12,7 +12,6 @@
12
12
  module Whois
13
13
  class Server
14
14
  module Adapters
15
-
16
15
  #
17
16
  # = Web Adapter
18
17
  #
@@ -23,7 +22,6 @@ module Whois
23
22
  # adapter, just a little bit more specific.
24
23
  #
25
24
  class Web < Base
26
-
27
25
  # Always raises a {Whois::WebInterfaceError} exception
28
26
  # including the web address for the WHOIS inteface.
29
27
  #
@@ -35,9 +33,7 @@ module Whois
35
33
  def request(_string)
36
34
  raise WebInterfaceError, options[:url]
37
35
  end
38
-
39
36
  end
40
-
41
37
  end
42
38
  end
43
39
  end
@@ -15,12 +15,10 @@ require "whois/errors"
15
15
 
16
16
  module Whois
17
17
  class Server
18
-
19
18
  # The SocketHandler is the default query handler provided with the
20
19
  # Whois library. It performs the WHOIS query using a synchronous
21
20
  # socket connection.
22
21
  class SocketHandler
23
-
24
22
  # Array of connection errors to rescue
25
23
  # and wrap into a {Whois::ConnectionError}
26
24
  RESCUABLE_CONNECTION_ERRORS = [
@@ -61,6 +59,5 @@ module Whois
61
59
  client&.close # If != client something went wrong.
62
60
  end
63
61
  end
64
-
65
62
  end
66
63
  end
data/lib/whois/server.rb CHANGED
@@ -24,14 +24,12 @@ require "whois/server/adapters/web"
24
24
 
25
25
 
26
26
  module Whois
27
-
28
27
  # The {Whois::Server} class has two important roles:
29
28
  #
30
29
  # 1. it acts as a database for the WHOIS server definitions
31
30
  # 2. it is responsible for selecting the right adapter used to handle the query to the WHOIS server(s).
32
31
  #
33
32
  class Server
34
-
35
33
  # The {Whois::Server::Adapters} module is a namespace for all
36
34
  # WHOIS server adapters. Each adapter is a subclass of {Whois::Server::Adapters::Base},
37
35
  # customized to handle WHOIS queries for a type or a group of servers.
@@ -52,7 +50,6 @@ module Whois
52
50
  private_constant :EMPTY_HASH
53
51
 
54
52
  class << self
55
-
56
53
  # Clears the definition and reset them to an empty list.
57
54
  #
58
55
  # @return [void]
@@ -390,10 +387,8 @@ module Whois
390
387
 
391
388
  false
392
389
  end
393
-
394
390
  end
395
391
  end
396
-
397
392
  end
398
393
 
399
394
  Whois::Server.load_definitions
data/lib/whois/version.rb CHANGED
@@ -11,5 +11,5 @@
11
11
 
12
12
  module Whois
13
13
  # The current library version.
14
- VERSION = "6.0.2"
14
+ VERSION = "6.0.3"
15
15
  end
data/lib/whois.rb CHANGED
@@ -17,9 +17,7 @@ require "whois/record"
17
17
 
18
18
 
19
19
  module Whois
20
-
21
20
  class << self
22
-
23
21
  # Queries the WHOIS server for <tt>object</tt> and returns
24
22
  # the response from the server.
25
23
  #
@@ -120,5 +118,4 @@ module Whois
120
118
  end
121
119
  end
122
120
  end
123
-
124
121
  end
@@ -1,7 +1,6 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module RSpecSupportSpecHelpers
4
-
5
4
  def fixture(*names)
6
5
  File.join(SPEC_ROOT, "fixtures", *names)
7
6
  end
@@ -25,7 +24,6 @@ module RSpecSupportSpecHelpers
25
24
  def definitions_teardown
26
25
  Whois::Server.send :instance_variable_set, :@definitions, @_definitions
27
26
  end
28
-
29
27
  end
30
28
 
31
29
  RSpec.configure do |config|
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: whois
3
3
  version: !ruby/object:Gem::Version
4
- version: 6.0.2
4
+ version: 6.0.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Simone Carletti