whois 1.3.11 → 1.5.0
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.
- data/CHANGELOG.rdoc +17 -1
- data/README.rdoc +4 -8
- data/lib/core_ext.rb +0 -23
- data/lib/whois/answer.rb +1 -1
- data/lib/whois/answer/parser/base.rb +0 -25
- data/lib/whois/answer/parser/whois.denic.de.rb +0 -7
- data/lib/whois/answer/parser/whois.nic.ac.rb +0 -7
- data/lib/whois/answer/parser/whois.nic.hu.rb +0 -7
- data/lib/whois/answer/parser/whois.nic.it.rb +0 -7
- data/lib/whois/answer/parser/whois.publicinterestregistry.net.rb +0 -7
- data/lib/whois/answer/parser/whois.registry.in.rb +1 -7
- data/lib/whois/answer/part.rb +0 -15
- data/lib/whois/version.rb +2 -2
- data/whois.gemspec +4 -3
- metadata +10 -8
data/CHANGELOG.rdoc
CHANGED
|
@@ -1,6 +1,22 @@
|
|
|
1
1
|
= Changelog
|
|
2
2
|
|
|
3
|
-
== Release 1.
|
|
3
|
+
== Release 1.5.0
|
|
4
|
+
|
|
5
|
+
WARNING: Whois >= 1.5.0 requires Ruby 1.8.7 or newer.
|
|
6
|
+
|
|
7
|
+
* CHANGED: Ruby 1.8.7 or newer is required.
|
|
8
|
+
|
|
9
|
+
* FIXED: Fixed Unknown status `CLIENT DELETE PROHIBITED' for whois.registry.in.
|
|
10
|
+
|
|
11
|
+
* REMOVED: Remove deprecated Whois::Answer::Parser::Base methods:
|
|
12
|
+
* #registrant
|
|
13
|
+
* #admin
|
|
14
|
+
* #technical
|
|
15
|
+
|
|
16
|
+
* REMOVED: Remove deprecated Whois::Answer::Part#response property.
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
== Release 1.3.10
|
|
4
20
|
|
|
5
21
|
* CHANGED: Standardized #status property for the following parsers (#5)
|
|
6
22
|
* whois.aero
|
data/README.rdoc
CHANGED
|
@@ -22,7 +22,10 @@ An extensive test suite is available to verify the library correctness but you m
|
|
|
22
22
|
|
|
23
23
|
== Requirements
|
|
24
24
|
|
|
25
|
-
* Ruby >= 1.8.
|
|
25
|
+
* Ruby >= 1.8.7
|
|
26
|
+
|
|
27
|
+
Whois >= 1.5 requires Ruby 1.8.7 or newer.
|
|
28
|
+
For older versions of Ruby, see the CHANGELOG.rdoc file.
|
|
26
29
|
|
|
27
30
|
In addition to the standard Ruby interpreter (MRI),
|
|
28
31
|
Whois has been successfully tested against several
|
|
@@ -153,13 +156,6 @@ The parser architecture has been inspired by the PHPWhois[http://phpwhois.source
|
|
|
153
156
|
Despite I spent weeks reading source code from the available whois libraries, Ruby Whois has been built from scratch trying to focus on long-term maintainability and flexibility and cannot be considered a Ruby port of any of other existing Whois libraries.
|
|
154
157
|
|
|
155
158
|
|
|
156
|
-
== Note for Whois 0.4 users
|
|
157
|
-
|
|
158
|
-
As of release 0.5.0, the Whois GEM has been completely rewritten. As I explained in the Acknowledgment section, Cyril Mougel (the author of the original Whois package) yield me the privilege to use the Whois RubyForge project for my new Whois client.
|
|
159
|
-
|
|
160
|
-
All versions between Whois 0.5.0 and 0.9.x include a compatibility adapter and the corresponding deprecation warnings to help you migrate to the new API. Starting from Whois 1.0.0, the library is no longer backward compatible with Cyril's Whois.
|
|
161
|
-
|
|
162
|
-
|
|
163
159
|
== Author
|
|
164
160
|
|
|
165
161
|
Author:: {Simone Carletti}[http://www.simonecarletti.com/] <weppos@weppos.net>
|
data/lib/core_ext.rb
CHANGED
|
@@ -1,26 +1,3 @@
|
|
|
1
|
-
unless :to_proc.respond_to?(:to_proc)
|
|
2
|
-
class Symbol
|
|
3
|
-
# Turns the symbol into a simple proc,
|
|
4
|
-
# which is especially useful for enumerations.
|
|
5
|
-
#
|
|
6
|
-
# Examples
|
|
7
|
-
#
|
|
8
|
-
# # The same as people.collect { |p| p.name }
|
|
9
|
-
# people.collect(&:name)
|
|
10
|
-
#
|
|
11
|
-
# # The same as people.select { |p| p.manager? }.collect { |p| p.salary }
|
|
12
|
-
# people.select(&:manager?).collect(&:salary)
|
|
13
|
-
#
|
|
14
|
-
# Extracted from ActiveSupport.
|
|
15
|
-
#
|
|
16
|
-
# Returns a Proc which incapsulates the method business logic.
|
|
17
|
-
def to_proc
|
|
18
|
-
Proc.new { |*args| args.shift.__send__(self, *args) }
|
|
19
|
-
end
|
|
20
|
-
end
|
|
21
|
-
end
|
|
22
|
-
|
|
23
|
-
|
|
24
1
|
require 'date'
|
|
25
2
|
|
|
26
3
|
class DateTime
|
data/lib/whois/answer.rb
CHANGED
|
@@ -55,7 +55,7 @@ module Whois
|
|
|
55
55
|
# or is a string and has the same content.
|
|
56
56
|
def ==(other)
|
|
57
57
|
(other.equal?(self)) ||
|
|
58
|
-
# This option should be deprecated
|
|
58
|
+
# TODO: This option should be deprecated
|
|
59
59
|
(other.is_a?(String) && other == self.to_s) ||
|
|
60
60
|
(other.is_a?(Answer) && other.to_s == self.to_s)
|
|
61
61
|
end
|
|
@@ -246,31 +246,6 @@ module Whois
|
|
|
246
246
|
end
|
|
247
247
|
|
|
248
248
|
|
|
249
|
-
# @deprecated {#registrant} is deprecated
|
|
250
|
-
# and will be removed in a future version.
|
|
251
|
-
# Use {#registrant_contact}.
|
|
252
|
-
def registrant
|
|
253
|
-
Whois.deprecate "Whois::Answer::Parser::Base#registrant is deprecated and will be removed in a future version. Use Whois::Answer::Parser::Base#registrant_contact."
|
|
254
|
-
registrant_contact
|
|
255
|
-
end
|
|
256
|
-
|
|
257
|
-
# @deprecated {#admin} is deprecated
|
|
258
|
-
# and will be removed in a future version.
|
|
259
|
-
# Use {#admin_contact}.
|
|
260
|
-
def admin
|
|
261
|
-
Whois.deprecate "Whois::Answer::Parser::Base#admin is deprecated and will be removed in a future version. Use Whois::Answer::Parser::Base#admin_contact."
|
|
262
|
-
admin_contact
|
|
263
|
-
end
|
|
264
|
-
|
|
265
|
-
# @deprecated {#technical} is deprecated
|
|
266
|
-
# and will be removed in a future version.
|
|
267
|
-
# Use {#technical_contact}.
|
|
268
|
-
def technical
|
|
269
|
-
Whois.deprecate "Whois::Answer::Parser::Base#technical is deprecated and will be removed in a future version. Use Whois::Answer::Parser::Base#technical_contact."
|
|
270
|
-
technical_contact
|
|
271
|
-
end
|
|
272
|
-
|
|
273
|
-
|
|
274
249
|
protected
|
|
275
250
|
|
|
276
251
|
def content_for_scanner
|
|
@@ -100,13 +100,6 @@ module Whois
|
|
|
100
100
|
@technical_contact ||= contact("Tech-C", Whois::Answer::Contact::TYPE_TECHNICAL)
|
|
101
101
|
end
|
|
102
102
|
|
|
103
|
-
# @deprecated
|
|
104
|
-
register_property :registrant, :supported
|
|
105
|
-
# @deprecated
|
|
106
|
-
register_property :admin, :supported
|
|
107
|
-
# @deprecated
|
|
108
|
-
register_property :technical, :supported
|
|
109
|
-
|
|
110
103
|
|
|
111
104
|
# Nameservers are listed in the following formats:
|
|
112
105
|
#
|
|
@@ -72,13 +72,6 @@ module Whois
|
|
|
72
72
|
|
|
73
73
|
property_not_supported :technical_contact
|
|
74
74
|
|
|
75
|
-
# @deprecated
|
|
76
|
-
register_property :registrant, :not_supported
|
|
77
|
-
# @deprecated
|
|
78
|
-
register_property :admin, :not_supported
|
|
79
|
-
# @deprecated
|
|
80
|
-
register_property :technical, :not_supported
|
|
81
|
-
|
|
82
75
|
|
|
83
76
|
property_not_supported :nameservers
|
|
84
77
|
|
|
@@ -110,13 +110,6 @@ module Whois
|
|
|
110
110
|
@tecnical_contact ||= contact("tech-c", Whois::Answer::Contact::TYPE_TECHNICAL)
|
|
111
111
|
end
|
|
112
112
|
|
|
113
|
-
# @deprecated
|
|
114
|
-
register_property :registrant, :supported
|
|
115
|
-
# @deprecated
|
|
116
|
-
register_property :admin, :supported
|
|
117
|
-
# @deprecated
|
|
118
|
-
register_property :technical, :supported
|
|
119
|
-
|
|
120
113
|
|
|
121
114
|
property_supported :nameservers do
|
|
122
115
|
@nameservers ||= node("nameserver") || []
|
|
@@ -96,13 +96,6 @@ module Whois
|
|
|
96
96
|
@technical_contact ||= contact("Technical Contacts", Whois::Answer::Contact::TYPE_TECHNICAL)
|
|
97
97
|
end
|
|
98
98
|
|
|
99
|
-
# @deprecated
|
|
100
|
-
register_property :registrant, :supported
|
|
101
|
-
# @deprecated
|
|
102
|
-
register_property :admin, :supported
|
|
103
|
-
# @deprecated
|
|
104
|
-
register_property :technical, :supported
|
|
105
|
-
|
|
106
99
|
|
|
107
100
|
property_supported :nameservers do
|
|
108
101
|
@nameservers ||= node("Nameservers") || []
|
|
@@ -95,13 +95,6 @@ module Whois
|
|
|
95
95
|
@technical_contact ||= contact("Tech", Whois::Answer::Contact::TYPE_TECHNICAL)
|
|
96
96
|
end
|
|
97
97
|
|
|
98
|
-
# @deprecated
|
|
99
|
-
register_property :registrant, :supported
|
|
100
|
-
# @deprecated
|
|
101
|
-
register_property :admin, :supported
|
|
102
|
-
# @deprecated
|
|
103
|
-
register_property :technical, :supported
|
|
104
|
-
|
|
105
98
|
|
|
106
99
|
property_supported :nameservers do
|
|
107
100
|
@nameservers ||= node("Name Server") { |server| server.reject(&:empty?).map(&:downcase) }
|
|
@@ -36,13 +36,7 @@ module Whois
|
|
|
36
36
|
|
|
37
37
|
property_supported :status do
|
|
38
38
|
@status ||= if content_for_scanner =~ /Status:(.+?)\n/
|
|
39
|
-
|
|
40
|
-
when "ok" then :registered
|
|
41
|
-
else
|
|
42
|
-
Whois.bug!(ParserError, "Unknown status `#{$1}'.")
|
|
43
|
-
end
|
|
44
|
-
else
|
|
45
|
-
:available
|
|
39
|
+
content_for_scanner.scan(/Status:(.+?)\n/).flatten.map(&:downcase)
|
|
46
40
|
end
|
|
47
41
|
end
|
|
48
42
|
|
data/lib/whois/answer/part.rb
CHANGED
|
@@ -34,21 +34,6 @@ module Whois
|
|
|
34
34
|
# * host - The host which returned the body.
|
|
35
35
|
#
|
|
36
36
|
class Part < SuperStruct.new(:body, :host)
|
|
37
|
-
|
|
38
|
-
def response=(value) # :nodoc:
|
|
39
|
-
Whois.deprecate \
|
|
40
|
-
"Whois::Answer::Part#response= is deprecated " \
|
|
41
|
-
"and will be removed in Whois 1.5. Use Whois::Answer::Part#body=."
|
|
42
|
-
self.body = value
|
|
43
|
-
end
|
|
44
|
-
|
|
45
|
-
def response # :nodoc:
|
|
46
|
-
Whois.deprecate \
|
|
47
|
-
"Whois::Answer::Part#response is deprecated " \
|
|
48
|
-
"and will be removed in Whois 1.5. Use Whois::Answer::Part#body."
|
|
49
|
-
self.body
|
|
50
|
-
end
|
|
51
|
-
|
|
52
37
|
end
|
|
53
38
|
|
|
54
39
|
end
|
data/lib/whois/version.rb
CHANGED
data/whois.gemspec
CHANGED
|
@@ -2,11 +2,11 @@
|
|
|
2
2
|
|
|
3
3
|
Gem::Specification.new do |s|
|
|
4
4
|
s.name = %q{whois}
|
|
5
|
-
s.version = "1.
|
|
5
|
+
s.version = "1.5.dev"
|
|
6
6
|
|
|
7
|
-
s.required_rubygems_version = Gem::Requirement.new("
|
|
7
|
+
s.required_rubygems_version = Gem::Requirement.new("> 1.3.1") if s.respond_to? :required_rubygems_version=
|
|
8
8
|
s.authors = ["Simone Carletti"]
|
|
9
|
-
s.date = %q{2010-10-
|
|
9
|
+
s.date = %q{2010-10-22}
|
|
10
10
|
s.default_executable = %q{ruby-whois}
|
|
11
11
|
s.description = %q{ Whois is an intelligent WHOIS client and parser written in pure Ruby. It can query registry data for IPv4, IPv6 and top level domains, parse and convert responses into easy-to-use Ruby objects.
|
|
12
12
|
}
|
|
@@ -17,6 +17,7 @@ Gem::Specification.new do |s|
|
|
|
17
17
|
s.homepage = %q{http://www.ruby-whois.org}
|
|
18
18
|
s.rdoc_options = ["--main", "README.rdoc"]
|
|
19
19
|
s.require_paths = ["lib"]
|
|
20
|
+
s.required_ruby_version = Gem::Requirement.new(">= 1.8.7")
|
|
20
21
|
s.rubyforge_project = %q{whois}
|
|
21
22
|
s.rubygems_version = %q{1.3.7}
|
|
22
23
|
s.summary = %q{An intelligent pure Ruby WHOIS client and parser.}
|
metadata
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: whois
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
hash:
|
|
4
|
+
hash: 3
|
|
5
5
|
prerelease: false
|
|
6
6
|
segments:
|
|
7
7
|
- 1
|
|
8
|
-
-
|
|
9
|
-
-
|
|
10
|
-
version: 1.
|
|
8
|
+
- 5
|
|
9
|
+
- 0
|
|
10
|
+
version: 1.5.0
|
|
11
11
|
platform: ruby
|
|
12
12
|
authors:
|
|
13
13
|
- Simone Carletti
|
|
@@ -15,7 +15,7 @@ autorequire:
|
|
|
15
15
|
bindir: bin
|
|
16
16
|
cert_chain: []
|
|
17
17
|
|
|
18
|
-
date: 2010-10-
|
|
18
|
+
date: 2010-10-22 00:00:00 +02:00
|
|
19
19
|
default_executable:
|
|
20
20
|
dependencies:
|
|
21
21
|
- !ruby/object:Gem::Dependency
|
|
@@ -215,10 +215,12 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
|
215
215
|
requirements:
|
|
216
216
|
- - ">="
|
|
217
217
|
- !ruby/object:Gem::Version
|
|
218
|
-
hash:
|
|
218
|
+
hash: 57
|
|
219
219
|
segments:
|
|
220
|
-
-
|
|
221
|
-
|
|
220
|
+
- 1
|
|
221
|
+
- 8
|
|
222
|
+
- 7
|
|
223
|
+
version: 1.8.7
|
|
222
224
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
|
223
225
|
none: false
|
|
224
226
|
requirements:
|