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
data/lib/whois/errors.rb
CHANGED
data/lib/whois/record/part.rb
CHANGED
@@ -5,7 +5,7 @@
|
|
5
5
|
#
|
6
6
|
# An intelligent pure Ruby WHOIS client and parser.
|
7
7
|
#
|
8
|
-
# Copyright (c) 2009-
|
8
|
+
# Copyright (c) 2009-2022 Simone Carletti <weppos@weppos.net>
|
9
9
|
#++
|
10
10
|
|
11
11
|
|
@@ -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.
|
29
|
+
elsif args.empty?
|
30
30
|
super
|
31
31
|
else
|
32
32
|
raise ArgumentError
|
data/lib/whois/record.rb
CHANGED
@@ -5,7 +5,7 @@
|
|
5
5
|
#
|
6
6
|
# An intelligent pure Ruby WHOIS client and parser.
|
7
7
|
#
|
8
|
-
# Copyright (c) 2009-
|
8
|
+
# Copyright (c) 2009-2022 Simone Carletti <weppos@weppos.net>
|
9
9
|
#++
|
10
10
|
|
11
11
|
|
@@ -67,7 +67,7 @@ module Whois
|
|
67
67
|
end
|
68
68
|
end
|
69
69
|
|
70
|
-
|
70
|
+
alias eql? ==
|
71
71
|
|
72
72
|
|
73
73
|
# Invokes {#match} on record {#content}
|
@@ -5,7 +5,7 @@
|
|
5
5
|
#
|
6
6
|
# An intelligent pure Ruby WHOIS client and parser.
|
7
7
|
#
|
8
|
-
# Copyright (c) 2009-
|
8
|
+
# Copyright (c) 2009-2022 Simone Carletti <weppos@weppos.net>
|
9
9
|
#++
|
10
10
|
|
11
11
|
|
@@ -40,11 +40,11 @@ module Whois
|
|
40
40
|
private
|
41
41
|
|
42
42
|
def extract_referral(response)
|
43
|
-
return unless response =~
|
43
|
+
return unless response =~ %r{ReferralServer:\s*r?whois://([\w.-]+)(?::(\d+))?}
|
44
44
|
|
45
45
|
{
|
46
|
-
host:
|
47
|
-
port:
|
46
|
+
host: Regexp.last_match(1),
|
47
|
+
port: Regexp.last_match(2)&.to_i,
|
48
48
|
}
|
49
49
|
end
|
50
50
|
|
@@ -5,7 +5,7 @@
|
|
5
5
|
#
|
6
6
|
# An intelligent pure Ruby WHOIS client and parser.
|
7
7
|
#
|
8
|
-
# Copyright (c) 2009-
|
8
|
+
# Copyright (c) 2009-2022 Simone Carletti <weppos@weppos.net>
|
9
9
|
#++
|
10
10
|
|
11
11
|
|
@@ -30,9 +30,7 @@ module Whois
|
|
30
30
|
# "192.in-addr.arpa" => "192.0.0.0"
|
31
31
|
# "in-addr.arpa" => "0.0.0.0"
|
32
32
|
def inaddr_to_ip(string)
|
33
|
-
unless string.match?(/^([0-9]{1,3}\.?){0,4}in-addr\.arpa$/)
|
34
|
-
raise ServerError, "Invalid .in-addr.arpa address"
|
35
|
-
end
|
33
|
+
raise ServerError, "Invalid .in-addr.arpa address" unless string.match?(/^([0-9]{1,3}\.?){0,4}in-addr\.arpa$/)
|
36
34
|
|
37
35
|
a, b, c, d = string.scan(/[0-9]{1,3}\./).reverse
|
38
36
|
[a, b, c, d].map do |token|
|
@@ -5,7 +5,7 @@
|
|
5
5
|
#
|
6
6
|
# An intelligent pure Ruby WHOIS client and parser.
|
7
7
|
#
|
8
|
-
# Copyright (c) 2009-
|
8
|
+
# Copyright (c) 2009-2022 Simone Carletti <weppos@weppos.net>
|
9
9
|
#++
|
10
10
|
|
11
11
|
|
@@ -48,15 +48,10 @@ module Whois
|
|
48
48
|
attr_reader :buffer
|
49
49
|
|
50
50
|
|
51
|
-
# @param [Symbol] type
|
52
|
-
#
|
53
|
-
#
|
54
|
-
# @param [
|
55
|
-
# The allocation, range or hostname, this server is responsible for.
|
56
|
-
# @param [String, nil] host
|
57
|
-
# The server hostname. Use nil if unknown or not available.
|
58
|
-
# @param [Hash] options Optional adapter properties.
|
59
|
-
#
|
51
|
+
# @param type [Symbol] the type of WHOIS adapter to define. Known values are :tld, :ipv4, :ipv6,
|
52
|
+
# @param allocation [String] the allocation, range or hostname, this server is responsible for.
|
53
|
+
# @param host [String, nil] the server hostname. Use nil if unknown or not available.
|
54
|
+
# @param options [Hash] optional adapter properties
|
60
55
|
def initialize(type, allocation, host, options = {})
|
61
56
|
@type = type
|
62
57
|
@allocation = allocation
|
@@ -66,53 +61,44 @@ module Whois
|
|
66
61
|
|
67
62
|
# Checks self and other for equality.
|
68
63
|
#
|
69
|
-
# @param [The Whois::Server::Adapters::Base]
|
70
|
-
# @return [Boolean]
|
64
|
+
# @param other [The Whois::Server::Adapters::Base]
|
65
|
+
# @return [Boolean] true if the other is the same object,
|
71
66
|
# or <tt>other</tt> attributes matches this object attributes.
|
72
|
-
#
|
73
67
|
def ==(other)
|
74
|
-
(
|
75
|
-
self.equal?(other)
|
76
|
-
) || (
|
68
|
+
equal?(other) || (
|
77
69
|
other.is_a?(self.class) &&
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
|
70
|
+
type == other.type &&
|
71
|
+
allocation == other.allocation &&
|
72
|
+
host == other.host &&
|
73
|
+
options == other.options
|
82
74
|
)
|
83
75
|
end
|
84
76
|
|
85
|
-
|
77
|
+
alias eql? ==
|
86
78
|
|
87
79
|
|
88
80
|
# Merges given +settings+ into current {#options}.
|
89
81
|
#
|
90
|
-
# @param [Hash]
|
91
|
-
# @return [Hash]
|
92
|
-
#
|
82
|
+
# @param settings [Hash]
|
83
|
+
# @return [Hash] the updated options for this object
|
93
84
|
def configure(settings)
|
94
85
|
@host = settings[:host] if settings[:host]
|
95
86
|
options.merge!(settings)
|
96
87
|
end
|
97
88
|
|
98
89
|
|
99
|
-
# Performs a Whois lookup for <tt>string</tt>
|
100
|
-
# using the current server adapter.
|
90
|
+
# Performs a Whois lookup for <tt>string</tt> using the current server adapter.
|
101
91
|
#
|
102
|
-
# Internally, this method calls {#request}
|
103
|
-
# using the Template Method design pattern.
|
92
|
+
# Internally, this method calls {#request} using the Template Method design pattern.
|
104
93
|
#
|
105
94
|
# server.lookup("google.com")
|
106
95
|
# # => Whois::Record
|
107
96
|
#
|
108
|
-
# @param [String]
|
97
|
+
# @param string [String] the string to query
|
109
98
|
# @return [Whois::Record]
|
110
|
-
#
|
111
99
|
def lookup(string)
|
112
|
-
buffer_start
|
113
|
-
|
114
|
-
Whois::Record.new(self, buffer.dup)
|
115
|
-
end
|
100
|
+
parts = buffer_start { request(string) }
|
101
|
+
Whois::Record.new(self, parts)
|
116
102
|
end
|
117
103
|
|
118
104
|
# Performs the real WHOIS request.
|
@@ -121,11 +107,10 @@ module Whois
|
|
121
107
|
# it is intended to be overwritten in the concrete subclasses.
|
122
108
|
# This is the heart of the Template Method design pattern.
|
123
109
|
#
|
124
|
-
# @param [String]
|
110
|
+
# @param string [String] the string to query
|
125
111
|
# @return [void]
|
126
112
|
# @raise [NotImplementedError]
|
127
113
|
# @abstract
|
128
|
-
#
|
129
114
|
def request(string)
|
130
115
|
raise NotImplementedError
|
131
116
|
end
|
@@ -149,6 +134,7 @@ module Whois
|
|
149
134
|
def buffer_start
|
150
135
|
@buffer ||= []
|
151
136
|
yield(@buffer)
|
137
|
+
@buffer.dup
|
152
138
|
ensure
|
153
139
|
@buffer.clear
|
154
140
|
end
|
@@ -183,7 +169,7 @@ module Whois
|
|
183
169
|
self.class.query_handler.call(query, *args)
|
184
170
|
end
|
185
171
|
|
186
|
-
alias
|
172
|
+
alias query_the_socket query
|
187
173
|
|
188
174
|
end
|
189
175
|
|
data/lib/whois/server.rb
CHANGED
@@ -5,13 +5,22 @@
|
|
5
5
|
#
|
6
6
|
# An intelligent pure Ruby WHOIS client and parser.
|
7
7
|
#
|
8
|
-
# Copyright (c) 2009-
|
8
|
+
# Copyright (c) 2009-2022 Simone Carletti <weppos@weppos.net>
|
9
9
|
#++
|
10
10
|
|
11
11
|
|
12
12
|
require 'ipaddr'
|
13
13
|
require 'json'
|
14
|
-
require
|
14
|
+
require "whois/server/adapters/base"
|
15
|
+
require "whois/server/adapters/arin"
|
16
|
+
require "whois/server/adapters/arpa"
|
17
|
+
require "whois/server/adapters/afilias"
|
18
|
+
require "whois/server/adapters/formatted"
|
19
|
+
require "whois/server/adapters/none"
|
20
|
+
require "whois/server/adapters/not_implemented"
|
21
|
+
require "whois/server/adapters/standard"
|
22
|
+
require "whois/server/adapters/verisign"
|
23
|
+
require "whois/server/adapters/web"
|
15
24
|
|
16
25
|
|
17
26
|
module Whois
|
@@ -27,16 +36,6 @@ module Whois
|
|
27
36
|
# WHOIS server adapters. Each adapter is a subclass of {Whois::Server::Adapters::Base},
|
28
37
|
# customized to handle WHOIS queries for a type or a group of servers.
|
29
38
|
module Adapters
|
30
|
-
autoload :Base, "whois/server/adapters/base"
|
31
|
-
autoload :Arin, "whois/server/adapters/arin"
|
32
|
-
autoload :Arpa, "whois/server/adapters/arpa"
|
33
|
-
autoload :Afilias, "whois/server/adapters/afilias"
|
34
|
-
autoload :Formatted, "whois/server/adapters/formatted"
|
35
|
-
autoload :None, "whois/server/adapters/none"
|
36
|
-
autoload :NotImplemented, "whois/server/adapters/not_implemented"
|
37
|
-
autoload :Standard, "whois/server/adapters/standard"
|
38
|
-
autoload :Verisign, "whois/server/adapters/verisign"
|
39
|
-
autoload :Web, "whois/server/adapters/web"
|
40
39
|
end
|
41
40
|
|
42
41
|
# @return [Array<Symbol>] the definition types
|
@@ -236,19 +235,13 @@ module Whois
|
|
236
235
|
# but the object type doesn't have any supported WHOIS adapter associated.
|
237
236
|
def guess(string)
|
238
237
|
# Top Level Domain match
|
239
|
-
if matches_tld?(string)
|
240
|
-
return factory(:tld, ".", "whois.iana.org")
|
241
|
-
end
|
238
|
+
return factory(:tld, ".", "whois.iana.org") if matches_tld?(string)
|
242
239
|
|
243
240
|
# IP address (secure match)
|
244
|
-
if matches_ip?(string)
|
245
|
-
return find_for_ip(string)
|
246
|
-
end
|
241
|
+
return find_for_ip(string) if matches_ip?(string)
|
247
242
|
|
248
243
|
# Email Address (secure match)
|
249
|
-
if matches_email?(string)
|
250
|
-
return find_for_email(string)
|
251
|
-
end
|
244
|
+
return find_for_email(string) if matches_email?(string)
|
252
245
|
|
253
246
|
# Domain Name match
|
254
247
|
if (server = find_for_domain(string))
|
@@ -256,9 +249,7 @@ module Whois
|
|
256
249
|
end
|
257
250
|
|
258
251
|
# ASN match
|
259
|
-
if matches_asn?(string)
|
260
|
-
return find_for_asn(string)
|
261
|
-
end
|
252
|
+
return find_for_asn(string) if matches_asn?(string)
|
262
253
|
|
263
254
|
# Game Over
|
264
255
|
raise ServerNotFound, "Unable to find a WHOIS server for `#{string}'"
|
@@ -278,9 +269,7 @@ module Whois
|
|
278
269
|
ip = IPAddr.new(string)
|
279
270
|
type = ip.ipv4? ? TYPE_IPV4 : TYPE_IPV6
|
280
271
|
_definitions(type).each do |_, definition|
|
281
|
-
if IPAddr.new(definition.first).include?(ip)
|
282
|
-
return factory(type, *definition)
|
283
|
-
end
|
272
|
+
return factory(type, *definition) if IPAddr.new(definition.first).include?(ip)
|
284
273
|
end
|
285
274
|
rescue ArgumentError
|
286
275
|
# continue
|
data/lib/whois/version.rb
CHANGED
@@ -5,11 +5,11 @@
|
|
5
5
|
#
|
6
6
|
# An intelligent pure Ruby WHOIS client and parser.
|
7
7
|
#
|
8
|
-
# Copyright (c) 2009-
|
8
|
+
# Copyright (c) 2009-2022 Simone Carletti <weppos@weppos.net>
|
9
9
|
#++
|
10
10
|
|
11
11
|
|
12
12
|
module Whois
|
13
13
|
# The current library version.
|
14
|
-
VERSION = "5.
|
14
|
+
VERSION = "5.1.1"
|
15
15
|
end
|
data/lib/whois.rb
CHANGED
@@ -5,7 +5,7 @@
|
|
5
5
|
#
|
6
6
|
# An intelligent pure Ruby WHOIS client and parser.
|
7
7
|
#
|
8
|
-
# Copyright (c) 2009-
|
8
|
+
# Copyright (c) 2009-2022 Simone Carletti <weppos@weppos.net>
|
9
9
|
#++
|
10
10
|
|
11
11
|
|
@@ -37,17 +37,17 @@ module Whois
|
|
37
37
|
Client.new.lookup(object)
|
38
38
|
end
|
39
39
|
|
40
|
-
|
40
|
+
alias whois lookup
|
41
41
|
|
42
42
|
|
43
43
|
# @deprecated
|
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
|
-
deprecate(%{Whois.available? is deprecated. Call Whois.whois("#{object}").available?})
|
50
|
+
deprecate(%{Whois.available? is deprecated. Call Whois.whois("#{object}").parser.available?})
|
51
51
|
|
52
52
|
result = lookup(object).parser.available?
|
53
53
|
if result.nil?
|
@@ -61,10 +61,10 @@ 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
|
-
deprecate(%{Whois.registered? is deprecated. Call Whois.whois("#{object}").
|
67
|
+
deprecate(%{Whois.registered? is deprecated. Call Whois.whois("#{object}").parser.registered?})
|
68
68
|
|
69
69
|
result = lookup(object).parser.registered?
|
70
70
|
if result.nil?
|
@@ -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
|
-
"
|
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 "
|
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)
|
data/spec/spec_helper.rb
CHANGED
@@ -3,9 +3,7 @@
|
|
3
3
|
require 'rspec'
|
4
4
|
require 'whois'
|
5
5
|
|
6
|
-
unless defined?(SPEC_ROOT)
|
7
|
-
SPEC_ROOT = File.expand_path(__dir__)
|
8
|
-
end
|
6
|
+
SPEC_ROOT = File.expand_path(__dir__) unless defined?(SPEC_ROOT)
|
9
7
|
|
10
8
|
# The fixtures are UTF-8 encoded.
|
11
9
|
# Make sure Ruby uses the proper encoding.
|
data/spec/whois/client_spec.rb
CHANGED
@@ -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
|
-
|
139
|
-
|
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
|
data/spec/whois/record_spec.rb
CHANGED
@@ -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
|
142
|
-
expect(subject.match?(/nomatch/)).to
|
141
|
+
expect(subject.match?(/record/)).to be(true)
|
142
|
+
expect(subject.match?(/nomatch/)).to be(false)
|
143
143
|
end
|
144
144
|
end
|
145
145
|
|
@@ -39,7 +39,7 @@ describe Whois::Server::Adapters::Afilias do
|
|
39
39
|
referral = File.read(fixture("referrals/afilias.bz.txt"))
|
40
40
|
server.options[:referral] = false
|
41
41
|
expect(server.query_handler).to receive(:call).with("example.test", "whois.afilias-grs.info", 43).and_return(referral)
|
42
|
-
expect(server.query_handler).
|
42
|
+
expect(server.query_handler).not_to receive(:call).with("example.test", "whois.belizenic.bz", 43)
|
43
43
|
|
44
44
|
record = server.lookup("example.test")
|
45
45
|
expect(record.parts.size).to eq(1)
|
@@ -52,7 +52,7 @@ describe Whois::Server::Adapters::Arin do
|
|
52
52
|
referral = File.read(fixture("referrals/arin_referral_whois.txt"))
|
53
53
|
server.options[:referral] = false
|
54
54
|
expect(server.query_handler).to receive(:call).with("n + 0.0.0.0", "whois.arin.net", 43).and_return(referral)
|
55
|
-
expect(server.query_handler).
|
55
|
+
expect(server.query_handler).not_to receive(:call).with("0.0.0.0", "whois.ripe.net", 43)
|
56
56
|
|
57
57
|
record = server.lookup("0.0.0.0")
|
58
58
|
expect(record.parts.size).to eq(1)
|
@@ -61,7 +61,7 @@ describe Whois::Server::Adapters::Arin do
|
|
61
61
|
it "ignores referral (gracefully) if missing" do
|
62
62
|
referral = File.read(fixture("referrals/arin_referral_missing.txt"))
|
63
63
|
expect(server.query_handler).to receive(:call).with("n + 0.0.0.0", "whois.arin.net", 43).and_return(referral)
|
64
|
-
expect(server.query_handler).
|
64
|
+
expect(server.query_handler).not_to receive(:call)
|
65
65
|
|
66
66
|
record = server.lookup("0.0.0.0")
|
67
67
|
expect(record.parts.size).to eq(1)
|
@@ -21,7 +21,7 @@ describe Whois::Server::Adapters::Formatted do
|
|
21
21
|
context "without format option" do
|
22
22
|
it "raises an error" do
|
23
23
|
server = described_class.new(:tld, ".de", "whois.denic.de", {})
|
24
|
-
expect(server.query_handler).
|
24
|
+
expect(server.query_handler).not_to receive(:call)
|
25
25
|
|
26
26
|
expect {
|
27
27
|
server.lookup("domain.de")
|
@@ -39,7 +39,7 @@ describe Whois::Server::Adapters::Verisign do
|
|
39
39
|
referral = File.read(fixture("referrals/crsnic.com.txt"))
|
40
40
|
server.options[:referral] = false
|
41
41
|
expect(server.query_handler).to receive(:call).with("=example.test", "whois.test", 43).and_return(referral)
|
42
|
-
expect(server.query_handler).
|
42
|
+
expect(server.query_handler).not_to receive(:call)
|
43
43
|
|
44
44
|
record = server.lookup("example.test")
|
45
45
|
expect(record.parts.size).to eq(1)
|
@@ -50,7 +50,7 @@ describe Whois::Server::Adapters::Verisign do
|
|
50
50
|
it "ignores referral (gracefully) if missing" do
|
51
51
|
referral = File.read(fixture("referrals/crsnic.com_referral_missing.txt"))
|
52
52
|
expect(server.query_handler).to receive(:call).with("=example.test", "whois.test", 43).and_return(referral)
|
53
|
-
expect(server.query_handler).
|
53
|
+
expect(server.query_handler).not_to receive(:call)
|
54
54
|
|
55
55
|
record = server.lookup("example.test")
|
56
56
|
expect(record.parts.size).to eq(1)
|
data/whois.gemspec
CHANGED
@@ -1,18 +1,18 @@
|
|
1
1
|
# -*- encoding: utf-8 -*-
|
2
|
-
$:.push File.expand_path(
|
3
|
-
require
|
2
|
+
$:.push File.expand_path("../lib", __FILE__)
|
3
|
+
require "whois/version"
|
4
4
|
|
5
5
|
Gem::Specification.new do |s|
|
6
|
-
s.name =
|
6
|
+
s.name = "whois"
|
7
7
|
s.version = Whois::VERSION
|
8
|
-
s.authors = [
|
9
|
-
s.email = [
|
10
|
-
s.homepage =
|
11
|
-
s.summary =
|
12
|
-
s.description =
|
13
|
-
s.license =
|
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 =
|
15
|
+
s.required_ruby_version = ">= 2.4"
|
16
16
|
|
17
17
|
s.require_paths = %w( lib )
|
18
18
|
s.executables =%w( whoisrb )
|