whois 1.3.4 → 1.3.5

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 CHANGED
@@ -1,15 +1,25 @@
1
1
  = Changelog
2
2
 
3
+
4
+ == Release 1.3.5
5
+
6
+ * SERVER: Updated the .so TLD definition (#36).
7
+
8
+ * NEW: Added simple .ug TLD parser (whois.co.ug) (#35). [DerGuteMoritz]
9
+
10
+ * FIXED: ruby-whois executable is not installed when the Gem is installed.
11
+
12
+
3
13
  == Release 1.3.4
4
14
 
5
- * FIXED: With some .be domains, whois.dns.be parser returns invalid values for nameservers.
15
+ * FIXED: With some .ie domains, whois.dns.be parser returns invalid values for nameservers.
6
16
 
7
17
  * FIXED: With some .be domains, whois.dmainregistry.ie parser returns invalid values for nameservers.
8
18
 
9
19
 
10
20
  == Release 1.3.3
11
21
 
12
- * ADDED: Ability to parse Registrar for .ca TLD parser [aeden]
22
+ * NEW: Ability to parse Registrar for .ca TLD parser. [aeden]
13
23
 
14
24
  * FIXED: With some .nl domains, whois.domain-registry.nl parser returns invalid values for nameservers.
15
25
 
@@ -20,13 +30,13 @@
20
30
 
21
31
  == Release 1.3.2
22
32
 
23
- * FIXED: .nl TLD parser doesn't understand quarantine status (closes #34)
33
+ * FIXED: .nl TLD parser doesn't understand quarantine status (#34).
24
34
 
25
35
  * CHANGED: Parser aliases are now created aliasing constants instead subclassing.
26
36
 
27
- * CHANGED: Updated .hk parser to whois.hkirc.hk (closes #30)
37
+ * CHANGED: Updated .hk parser to whois.hkirc.hk (#30).
28
38
 
29
- * CHANGED: Updated .tw parser to whois.twnic.net.tw (closes #31)
39
+ * CHANGED: Updated .tw parser to whois.twnic.net.tw (#31).
30
40
 
31
41
 
32
42
  == Release 1.3.1
@@ -52,7 +62,7 @@
52
62
 
53
63
  == Release 1.3.0
54
64
 
55
- * ADDED: Ability to query IANA for TLD WHOIS information. [aadlani]
65
+ * NEW: Ability to query IANA for TLD WHOIS information. [aadlani]
56
66
 
57
67
  Whois.query(".com")
58
68
  # => IANA WHOIS response for .com TLD
@@ -60,8 +70,7 @@
60
70
  Whois.query(".invalid")
61
71
  # => IANA WHOIS response for unassigned TLD
62
72
 
63
-
64
- * ADDED: Ability to compare two Server adapters for equality.
73
+ * NEW: Ability to compare two Server adapters for equality.
65
74
 
66
75
  Whois::Server.factory(:ipv4, "192.168.1.0/10", "whois.foo") == Whois::Server.factory(:ipv4, "192.168.1.0/10", "whois.foo")
67
76
  # => true
@@ -88,13 +97,13 @@
88
97
 
89
98
  * NEW: Added .to TLD parser (whois.tonic.to).
90
99
 
91
- * FIXED: whois.jprs.jp doesn't fully understand answers for .net.jp domains [milk1000cc]
100
+ * FIXED: whois.jprs.jp doesn't fully understand answers for .net.jp domains. [milk1000cc]
92
101
 
93
102
  * CHANGED: The .co TLD now has a WHOIS interface (whois.nic.co). Added simple .co parser.
94
103
 
95
- * CHANGED: Updated .sa TLD parser from saudinic.net.sa to whois.nic.net.sa (closes #29)
104
+ * CHANGED: Updated .sa TLD parser from saudinic.net.sa to whois.nic.net.sa (#29).
96
105
 
97
- * CHANGED: Updated .au TLD parser from whois.ausregistry.net.au to whois.audns.net.au (closes #27)
106
+ * CHANGED: Updated .au TLD parser from whois.ausregistry.net.au to whois.audns.net.au (#27).
98
107
 
99
108
 
100
109
  == Release 1.2.1
@@ -136,7 +145,7 @@
136
145
 
137
146
  == Release 1.1.7
138
147
 
139
- * FIXED: method `to_time' not defined in DateTime (NameError) when the library is used with Ruby 1.9.1 and Rails (closes #24)
148
+ * FIXED: method `to_time' not defined in DateTime (NameError) when the library is used with Ruby 1.9.1 and Rails (#24)
140
149
 
141
150
 
142
151
  == Release 1.1.6
@@ -267,7 +276,7 @@
267
276
 
268
277
  == Release 1.0.7
269
278
 
270
- * FIXED: whois.nic.hu parser raises a NoMethodError when trying to access 'registrant' property for personal domains (closes #19).
279
+ * FIXED: whois.nic.hu parser raises a NoMethodError when trying to access 'registrant' property for personal domains (#19).
271
280
 
272
281
 
273
282
  == Release 1.0.6
@@ -301,11 +310,11 @@
301
310
 
302
311
  * SERVER: Updated the .dj TLD definition (whois 5.0.1).
303
312
 
304
- * NEW: Support for 'nameservers' property for the whois.afilias.info parser. (closes #15)
313
+ * NEW: Support for 'nameservers' property for the whois.afilias.info parser. (#15)
305
314
 
306
- * NEW: Support for 'nameservers' property for the whois.nic.tel parser. (closes #17)
315
+ * NEW: Support for 'nameservers' property for the whois.nic.tel parser. (#17)
307
316
 
308
- * NEW: Support for 'nameservers' property for the whois.eu parser. (closes #16)
317
+ * NEW: Support for 'nameservers' property for the whois.eu parser. (#16)
309
318
 
310
319
  * NEW: Support for 'nameservers' property for the whois.meregistry.net parser.
311
320
 
@@ -329,7 +338,7 @@
329
338
 
330
339
  * SERVER: Updated web address for the .gt TLD [axic]
331
340
 
332
- * SERVER: Updated web address for the .co TLD (closes #13)
341
+ * SERVER: Updated web address for the .co TLD (#13)
333
342
 
334
343
  * NEW: Support for 'Contact#zip' property for the whois.nic.it parser [axic]
335
344
 
@@ -339,7 +348,7 @@
339
348
 
340
349
  * FIXED: The whois.nic.it parser extracts the wrong Contact country_code property [axic]
341
350
 
342
- * FIXED: With some .de domains, whois.denic.de parser returns invalid values for nameservers (closes #14)
351
+ * FIXED: With some .de domains, whois.denic.de parser returns invalid values for nameservers (#14)
343
352
 
344
353
  * FIXED: whois.crsnic.net crashes with reserved IANA domains (ex y.com)
345
354
 
data/README.rdoc CHANGED
@@ -11,27 +11,22 @@ An extensive test suite is available to verify the library correctness but you m
11
11
 
12
12
  == Features
13
13
 
14
- * Ability to query registry data for IPv4, IPv6, TLDs, and domain names
15
- * Ability to parse WHOIS responses
16
- * Flexible and extensible interface (e.g. You can define custom servers on the fly)
14
+ * Ability to query registry data for {IPv4, IPv6, TLDs, and domain names}[http://www.ruby-whois.org/manual/usage.html#usage-objects]
15
+ * Ability to {parse WHOIS responses}[http://www.ruby-whois.org/manual/parser.html]
16
+ * Flexible and extensible interface (e.g. You can define {custom servers}[http://www.ruby-whois.org/manual/server.html] on the fly)
17
17
  * Object oriented design, featuring 10 different design patterns
18
18
  * Pure Ruby library, without any external dependency other than Ruby itself
19
- * Compatible with {Ruby 1.8.6 and greater}[http://www.ruby-whois.org/manual/installation.html#s-requirements], including Ruby 1.9 branch
20
- * Successfully tested against multiple Ruby versions and interpreters, including Ruby, Ruby Enterprise Edition, JRuby, and MacRuby
19
+ * Compatible with {Ruby 1.8.6 and greater}[http://www.ruby-whois.org/manual/installation.html#installation-requirements], including Ruby 1.9 branch
20
+ * Successfully tested against several {Ruby implementations}[http://www.ruby-whois.org/manual/interpreters.html]
21
21
 
22
22
 
23
23
  == Requirements
24
24
 
25
25
  * Ruby >= 1.8.6
26
26
 
27
- Whois has been successfully tested against several Ruby interpreters, including
28
-
29
- * Ruby 1.8.6 / 1.8.7 / 1.9.1 / 1.9.2 (MRI)
30
- * Ruby Enterprise Edition
31
- * MacRuby
32
- * JRuby
33
-
34
- Do you run any other Ruby platform or version? Are you experiencing any problem? Join our {discussion group}[http://groups.google.com/group/ruby-whois].
27
+ In addition to the standard Ruby interpreter (MRI),
28
+ Whois has been successfully tested against several
29
+ {Ruby implementations}[http://www.ruby-whois.org/manual/interpreters.html].
35
30
 
36
31
 
37
32
  == Installation
@@ -0,0 +1,76 @@
1
+ #
2
+ # = Ruby Whois
3
+ #
4
+ # An intelligent pure Ruby WHOIS client and parser.
5
+ #
6
+ #
7
+ # Category:: Net
8
+ # Package:: Whois
9
+ # Author:: Simone Carletti <weppos@weppos.net>, Moritz Heidkamp <moritz.heidkamp@bevuta.com>
10
+ # License:: MIT License
11
+ #
12
+ #--
13
+ #
14
+ #++
15
+
16
+
17
+ require 'whois/answer/parser/base'
18
+
19
+
20
+ module Whois
21
+ class Answer
22
+ class Parser
23
+
24
+ #
25
+ # = whois.co.ug parser
26
+ #
27
+ # Parser for the whois.co.ug server.
28
+ #
29
+ # NOTE: This parser is just a stub and provides only a few basic methods
30
+ # to check for domain availability and get domain status.
31
+ # Please consider to contribute implementing missing methods.
32
+ # See WhoisNicIt parser for an explanation of all available methods
33
+ # and examples.
34
+ #
35
+ class WhoisCoUg < Base
36
+
37
+ property_supported :status do
38
+ @status ||= content_for_scanner[/^Status:\s+(.+)$/, 1]
39
+ end
40
+
41
+ property_supported :available? do
42
+ @available ||= !!(content_for_scanner =~ /No entries found for the selected source/)
43
+ end
44
+
45
+ property_supported :registered? do
46
+ !available?
47
+ end
48
+
49
+ property_supported :created_on do
50
+ @created_on ||= if content_for_scanner =~ /Registered:\s+(.+)$/
51
+ Time.parse($1)
52
+ end
53
+ end
54
+
55
+ property_supported :updated_on do
56
+ @updated_on ||= if content_for_scanner =~ /Updated:\s+(.+)$/
57
+ DateTime.strptime($1, '%d/%m/%Y %H:%M:%S').to_time
58
+ end
59
+ end
60
+
61
+ property_supported :expires_on do
62
+ @expires_on ||= if content_for_scanner =~ /Expiry:\s(.+)$/
63
+ Time.parse($1)
64
+ end
65
+ end
66
+
67
+
68
+ property_supported :nameservers do
69
+ @nameservers ||= content_for_scanner.scan(/Nameserver:\s+(.+)$/).flatten.map(&:downcase)
70
+ end
71
+
72
+ end
73
+
74
+ end
75
+ end
76
+ end
@@ -6,7 +6,7 @@
6
6
  #
7
7
  # Category:: Net
8
8
  # Package:: Whois
9
- # Author:: Aaron Mueller <mail@aaron-mueller.de>, Simone Carletti <weppos@weppos.net>
9
+ # Author:: Simone Carletti <weppos@weppos.net>, Aaron Mueller <mail@aaron-mueller.de>
10
10
  # License:: MIT License
11
11
  #
12
12
  #--
@@ -20,6 +20,12 @@ require 'whois/answer/parser/base'
20
20
  module Whois
21
21
  class Answer
22
22
  class Parser
23
+
24
+ #
25
+ # = whois.denic.de parser
26
+ #
27
+ # Parser for the whois.denic.de server.
28
+ #
23
29
  class WhoisDenicDe < Base
24
30
  include Ast
25
31
 
@@ -6,7 +6,7 @@
6
6
  #
7
7
  # Category:: Net
8
8
  # Package:: Whois
9
- # Author:: Mikkel Kristensen <mikkel@tdx.dk>, Simone Carletti <weppos@weppos.net>
9
+ # Author:: Simone Carletti <weppos@weppos.net>, Mikkel Kristensen <mikkel@tdx.dk>
10
10
  # License:: MIT License
11
11
  #
12
12
  #--
@@ -6,7 +6,7 @@
6
6
  #
7
7
  # Category:: Net
8
8
  # Package:: Whois
9
- # Author:: Mikkel Kristensen <mikkel@tdx.dk>, Simone Carletti <weppos@weppos.net>
9
+ # Author:: Simone Carletti <weppos@weppos.net>, Mikkel Kristensen <mikkel@tdx.dk>
10
10
  # License:: MIT License
11
11
  #
12
12
  #--
@@ -6,7 +6,7 @@
6
6
  #
7
7
  # Category:: Net
8
8
  # Package:: Whois
9
- # Author:: Gábor Vészi <veszig@done.hu>, Simone Carletti <weppos@weppos.net>
9
+ # Author:: Simone Carletti <weppos@weppos.net>, Gábor Vészi <veszig@done.hu>
10
10
  # License:: MIT License
11
11
  #
12
12
  #--
@@ -6,7 +6,7 @@
6
6
  #
7
7
  # Category:: Net
8
8
  # Package:: Whois
9
- # Author:: Mikkel Kristensen <mikkel@tdx.dk>, Simone Carletti <weppos@weppos.net>
9
+ # Author:: Simone Carletti <weppos@weppos.net>, Mikkel Kristensen <mikkel@tdx.dk>
10
10
  # License:: MIT License
11
11
  #
12
12
  #--
data/lib/whois/answer.rb CHANGED
@@ -96,6 +96,15 @@ module Whois
96
96
  #
97
97
  # This method should provide a bulletproof way to detect whether this answer
98
98
  # changed if compared with <tt>other</tt>.
99
+ #
100
+ # ==== Parameters
101
+ #
102
+ # other:: The Whois::Answer to compare.
103
+ #
104
+ # ==== Returns
105
+ #
106
+ # Boolean
107
+ #
99
108
  def changed?(other)
100
109
  !unchanged?(other)
101
110
  end
@@ -111,14 +120,24 @@ module Whois
111
120
  end
112
121
 
113
122
 
114
- # Lazy-loads and returns a <tt>Whois::Answer::Parser</tt> proxy for current answer.
123
+ # Lazy-loads and returns the parser proxy for current answer.
124
+ #
125
+ # ==== Returns
126
+ #
127
+ # Whois::Answer::Parser
128
+ #
115
129
  def parser
116
130
  @parser ||= Parser.new(self)
117
131
  end
118
132
 
119
133
 
120
- # Returns a Hash containing all supported properties for this Answer
134
+ # Returns a Hash containing all supported properties for this answer
121
135
  # along with corresponding values.
136
+ #
137
+ # ==== Returns
138
+ #
139
+ # Hash
140
+ #
122
141
  def properties
123
142
  hash = {}
124
143
  Parser::PROPERTIES.each { |property| hash[property] = send(property) }
data/lib/whois/client.rb CHANGED
@@ -27,13 +27,11 @@ module Whois
27
27
  attr_accessor :timeout
28
28
 
29
29
 
30
+ # Initializes a new <tt>Whois::Client</tt> with <tt>options</tt>.
30
31
  #
31
- # :call-seq:
32
32
  # new { |client| ... } => client
33
33
  # new(options = {}) { |client| ... } => client
34
34
  #
35
- # Initializes a new <tt>Whois::Client</tt> with <tt>options</tt>.
36
- #
37
35
  # ==== Parameters
38
36
  #
39
37
  # options:: Hash of options (default: {}):
@@ -58,18 +56,6 @@ module Whois
58
56
  end
59
57
 
60
58
 
61
- class Query # :nodoc:
62
- # IPv6?
63
- # RPSL?
64
- # email?
65
- # NSIC?
66
- # ASP32?
67
- # IP?
68
- # domain?
69
- # network?
70
- end
71
-
72
-
73
59
  # Queries the right WHOIS server for <tt>qstring</tt> and returns
74
60
  # the response from the server.
75
61
  #
@@ -253,7 +253,7 @@ Whois::Server.define :tld, ".sk", "whois.sk-nic.sk"
253
253
  Whois::Server.define :tld, ".sl", "whois.nic.sl"
254
254
  Whois::Server.define :tld, ".sm", "whois.ripe.net"
255
255
  Whois::Server.define :tld, ".sn", "whois.nic.sn"
256
- Whois::Server.define :tld, ".so", nil, {:adapter=>Whois::Server::Adapters::None}
256
+ Whois::Server.define :tld, ".so", "whois.nic.so"
257
257
  Whois::Server.define :tld, ".sr", nil, {:adapter=>Whois::Server::Adapters::None}
258
258
  Whois::Server.define :tld, ".st", "whois.nic.st"
259
259
  Whois::Server.define :tld, ".su", "whois.ripn.net"
@@ -279,7 +279,7 @@ Whois::Server.define :tld, ".tw", "whois.twnic.net.tw"
279
279
  Whois::Server.define :tld, ".tz", "whois.tznic.or.tz"
280
280
  Whois::Server.define :tld, ".in.ua", "whois.in.ua"
281
281
  Whois::Server.define :tld, ".ua", "whois.net.ua"
282
- Whois::Server.define :tld, ".ug", "www.registry.co.ug"
282
+ Whois::Server.define :tld, ".ug", "whois.co.ug"
283
283
  Whois::Server.define :tld, ".ac.uk", "whois.ja.net"
284
284
  Whois::Server.define :tld, ".bl.uk", nil, {:adapter=>Whois::Server::Adapters::None}
285
285
  Whois::Server.define :tld, ".british-library.uk", nil, {:adapter=>Whois::Server::Adapters::None}
data/lib/whois/version.rb CHANGED
@@ -19,7 +19,7 @@ module Whois
19
19
  module Version
20
20
  MAJOR = 1
21
21
  MINOR = 3
22
- PATCH = 4
22
+ PATCH = 5
23
23
  BUILD = nil
24
24
 
25
25
  STRING = [MAJOR, MINOR, PATCH, BUILD].compact.join(".")
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.3.3"
5
+ s.version = "1.3.4"
6
6
 
7
7
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
8
8
  s.authors = ["Simone Carletti"]
9
- s.date = %q{2010-09-02}
9
+ s.date = %q{2010-09-07}
10
10
  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.
11
11
  }
12
12
  s.email = %q{weppos@weppos.net}
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: 19
4
+ hash: 17
5
5
  prerelease: false
6
6
  segments:
7
7
  - 1
8
8
  - 3
9
- - 4
10
- version: 1.3.4
9
+ - 5
10
+ version: 1.3.5
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-09-07 00:00:00 +02:00
18
+ date: 2010-09-10 00:00:00 +02:00
19
19
  default_executable:
20
20
  dependencies:
21
21
  - !ruby/object:Gem::Dependency
@@ -34,8 +34,8 @@ dependencies:
34
34
  version_requirements: *id001
35
35
  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, parse and convert responses into easy-to-use Ruby objects.\n"
36
36
  email: weppos@weppos.net
37
- executables: []
38
-
37
+ executables:
38
+ - ruby-whois
39
39
  extensions: []
40
40
 
41
41
  extra_rdoc_files:
@@ -75,6 +75,7 @@ files:
75
75
  - lib/whois/answer/parser/whois.cira.ca.rb
76
76
  - lib/whois/answer/parser/whois.cnnic.cn.rb
77
77
  - lib/whois/answer/parser/whois.cnnic.net.cn.rb
78
+ - lib/whois/answer/parser/whois.co.ug.rb
78
79
  - lib/whois/answer/parser/whois.crsnic.net.rb
79
80
  - lib/whois/answer/parser/whois.denic.de.rb
80
81
  - lib/whois/answer/parser/whois.dk-hostmaster.dk.rb