Skip to content
This repository
  • 16 commits
  • 19 files changed
  • 0 comments
  • 2 contributors
45  CHANGELOG.rdoc
Source Rendered
... ...
@@ -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
 
21  README.rdoc
Source Rendered
@@ -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
1  Rakefile
@@ -52,6 +52,7 @@ spec = Gem::Specification.new do |s|
52 52
 
53 53
   # Add any extra files to include in the gem (like your README)
54 54
   s.files             = %w() + Dir.glob("*.{rdoc,gemspec}") + Dir.glob("{bin,lib}/**/*")
  55
+  s.executables       = ["ruby-whois"]
55 56
   s.require_paths     = ["lib"]
56 57
 
57 58
   # If you want to depend on other gems, add them here, along with any
2  data/c/tld_serv_list
@@ -291,7 +291,7 @@
291 291
 .tw	whois.twnic.net.tw
292 292
 .tz	whois.tznic.or.tz
293 293
 .ua	whois.net.ua
294  
-.ug	www.registry.co.ug	# this is a whois server too
  294
+.ug	whois.co.ug
295 295
 .ac.uk	whois.ja.net
296 296
 .bl.uk	NONE
297 297
 .british-library.uk NONE
23  lib/whois/answer.rb
@@ -96,6 +96,15 @@ def content
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 @@ def contacts
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) }
76  lib/whois/answer/parser/whois.co.ug.rb
... ...
@@ -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
8  lib/whois/answer/parser/whois.denic.de.rb
@@ -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 @@
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
 
2  lib/whois/answer/parser/whois.dk-hostmaster.dk.rb
@@ -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
 #--
2  lib/whois/answer/parser/whois.nic-se.se.rb
@@ -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
 #--
2  lib/whois/answer/parser/whois.nic.hu.rb
@@ -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
 #--
2  lib/whois/answer/parser/whois.nic.nu.rb
@@ -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
 #--
16  lib/whois/client.rb
@@ -27,13 +27,11 @@ class Client
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 @@ def initialize(options = {}, &block)
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
     #
4  lib/whois/definitions/tlds.rb
@@ -253,7 +253,7 @@
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 @@
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}
2  lib/whois/version.rb
@@ -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(".")
7  test/testcases/responses/whois.co.ug/available.txt
... ...
@@ -0,0 +1,7 @@
  1
+
  2
+**********************************************************
  3
+*            The UG ccTLD Registry Database              *
  4
+**********************************************************
  5
+
  6
+% No entries found for the selected source(s).
  7
+
35  test/testcases/responses/whois.co.ug/registered.txt
... ...
@@ -0,0 +1,35 @@
  1
+
  2
+**********************************************************
  3
+*            The UG ccTLD Registry Database              *
  4
+**********************************************************
  5
+
  6
+Domain:             whois.co.ug
  7
+Description:        UG CCTLD Database (IT solutions, Domain Names, helpdesk and call center)
  8
+Registered:         2nd April, 2001
  9
+Expiry:             7th April, 2018
  10
+Status:             ACTIVE
  11
+Admin Contact:      Charles Musisi
  12
+Tech Contact:       Mpeirwe Johnson
  13
+Nameserver:         ns1.cfi.co.ug
  14
+Nameserver:         ns2.cfi.co.ug
  15
+Nameserver:         ns3.cfi.co.ug
  16
+MNT-BY:             MAINT-UG
  17
+Source:             UG
  18
+Updated:            10/11/2009 14:06:58 EAT
  19
+
  20
+Admin Contact:      Charles Musisi
  21
+NIC:                CM260
  22
+Address:            Computer Frontiers International, Plot 6B Windsor Loop, P.O. Box 12
  23
+City:               Kampala
  24
+Country:            Uganda
  25
+Phone:              +256 31 230 1800
  26
+Updated:            13/02/2008 09:35:15 EAT hostmaster@cfi.co.ug
  27
+
  28
+Tech Contact:       Mpeirwe Johnson
  29
+NIC:                MJ5-UG
  30
+Address:            Plot 6B, Windor Loop Kitante
  31
+City:               Kampala
  32
+Country:            Uganda
  33
+Phone:              +256782694615
  34
+Updated:            11/12/2008 11:55:01 EAT hostmaster@cfi.co.ug
  35
+
4  test/tlds
@@ -254,7 +254,7 @@ sj;;;
254 254
 #Whois::Server.define :tld, ".sl", "whois.nic.sl"
255 255
 sm;whois.ripe.net;google.sm;u34jedzcq.sm
256 256
 sn;whois.nic.sn;google.sn;u34jedzcq.sn
257  
-so;;;
  257
+#Whois::Server.define :tld, ".so", "whois.nic.so"
258 258
 sr;;;
259 259
 st;whois.nic.st;google.st;u34jedzcq.st
260 260
 su;whois.ripn.net;google.su;u34jedzcq.su
@@ -280,7 +280,7 @@ tv;whois.nic.tv;thinkcode.tv;u34jedzcq.tv
280 280
 #Whois::Server.define :tld, ".tz", "whois.tznic.or.tz"
281 281
 in.ua;whois.in.ua;google.in.ua;u34jedzcq.in.ua
282 282
 ua;whois.net.ua;google.com.ua;u34jedzcq.com.ua
283  
-#Whois::Server.define :tld, ".ug", "www.registry.co.ug"
  283
+ug;whois.co.ug;google.co.ug;u34jedzcq.co.ug
284 284
 #Whois::Server.define :tld, ".ac.uk", "whois.ja.net"
285 285
 bl.uk;;;
286 286
 british-library.uk;;;
82  test/whois/answer/parser/whois.co.ug_test.rb
... ...
@@ -0,0 +1,82 @@
  1
+require 'test_helper'
  2
+require 'whois/answer/parser/whois.co.ug'
  3
+
  4
+class AnswerParserWhoisCoUgTest < Whois::Answer::Parser::TestCase
  5
+
  6
+  def setup
  7
+    @klass  = Whois::Answer::Parser::WhoisCoUg
  8
+    @host   = "whois.co.ug"
  9
+  end
  10
+
  11
+
  12
+  def test_status
  13
+    parser    = @klass.new(load_part('/registered.txt'))
  14
+    expected  = "ACTIVE"
  15
+    assert_equal  expected, parser.status
  16
+    assert_equal  expected, parser.instance_eval { @status }
  17
+
  18
+    parser    = @klass.new(load_part('/available.txt'))
  19
+    expected  = nil
  20
+    assert_equal  expected, parser.status
  21
+    assert_equal  expected, parser.instance_eval { @status }
  22
+  end
  23
+
  24
+  def test_available?
  25
+    assert !@klass.new(load_part('/registered.txt')).available?
  26
+    assert  @klass.new(load_part('/available.txt')).available?
  27
+  end
  28
+
  29
+  def test_registered?
  30
+    assert  @klass.new(load_part('/registered.txt')).registered?
  31
+    assert !@klass.new(load_part('/available.txt')).registered?
  32
+  end
  33
+
  34
+  def test_created_on
  35
+    parser    = @klass.new(load_part('/registered.txt'))
  36
+    expected  = Time.mktime(2001, 4, 2, 0, 0, 0)
  37
+    assert_equal  expected, parser.created_on
  38
+    assert_equal  expected, parser.instance_eval { @created_on }
  39
+
  40
+    parser    = @klass.new(load_part('/available.txt'))
  41
+    expected  = nil
  42
+    assert_equal  expected, parser.created_on
  43
+    assert_equal  expected, parser.instance_eval { @created_on }
  44
+  end
  45
+
  46
+  def test_updated_on
  47
+    parser    = @klass.new(load_part('/registered.txt'))
  48
+    expected  = Time.gm(2009, 11, 10, 14, 6, 58)
  49
+    assert_equal  expected, parser.updated_on
  50
+    assert_equal  expected, parser.instance_eval { @updated_on }
  51
+
  52
+    parser    = @klass.new(load_part('/available.txt'))
  53
+    expected  = nil
  54
+    assert_equal  expected, parser.updated_on
  55
+    assert_equal  expected, parser.instance_eval { @updated_on }
  56
+  end
  57
+
  58
+  def test_expires_on
  59
+    parser    = @klass.new(load_part('/registered.txt'))
  60
+    expected  = Time.mktime(2018, 4, 7)
  61
+    assert_equal  expected, parser.expires_on
  62
+    assert_equal  expected, parser.instance_eval { @expires_on }
  63
+
  64
+    parser    = @klass.new(load_part('/available.txt'))
  65
+    expected  = nil
  66
+    assert_equal  expected, parser.expires_on
  67
+    assert_equal  expected, parser.instance_eval { @expires_on }
  68
+  end
  69
+
  70
+  def test_nameservers
  71
+    parser    = @klass.new(load_part('/registered.txt'))
  72
+    expected  = %w[ns1.cfi.co.ug ns2.cfi.co.ug ns3.cfi.co.ug]
  73
+    assert_equal  expected, parser.nameservers
  74
+    assert_equal  expected, parser.instance_eval { @nameservers }
  75
+
  76
+    parser    = @klass.new(load_part('/available.txt'))
  77
+    expected  = []
  78
+    assert_equal  expected, parser.nameservers
  79
+    assert_equal  expected, parser.instance_eval { @nameservers }
  80
+  end
  81
+
  82
+end
8  whois.gemspec
@@ -2,16 +2,18 @@
2 2
 
3 3
 Gem::Specification.new do |s|
4 4
   s.name = %q{whois}
5  
-  s.version = "1.3.4"
  5
+  s.version = "1.3.5"
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-07}
  9
+  s.date = %q{2010-09-10}
  10
+  s.default_executable = %q{ruby-whois}
10 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.
11 12
 }
12 13
   s.email = %q{weppos@weppos.net}
  14
+  s.executables = ["ruby-whois"]
13 15
   s.extra_rdoc_files = ["CHANGELOG.rdoc", "LICENSE.rdoc", "README.rdoc"]
14  
-  s.files = ["CHANGELOG.rdoc", "LICENSE.rdoc", "README.rdoc", "whois.gemspec", "bin/ruby-whois", "lib/core_ext.rb", "lib/whois/answer/contact.rb", "lib/whois/answer/nameserver.rb", "lib/whois/answer/parser/ast.rb", "lib/whois/answer/parser/base.rb", "lib/whois/answer/parser/blank.rb", "lib/whois/answer/parser/example.rb", "lib/whois/answer/parser/jobswhois.verisign-grs.com.rb", "lib/whois/answer/parser/NOTES.txt", "lib/whois/answer/parser/saudinic.net.sa.rb", "lib/whois/answer/parser/scanners/iana.rb", "lib/whois/answer/parser/scanners/verisign.rb", "lib/whois/answer/parser/whois.adamsnames.tc.rb", "lib/whois/answer/parser/whois.aeda.net.ae.rb", "lib/whois/answer/parser/whois.aero.rb", "lib/whois/answer/parser/whois.afilias-grs.info.rb", "lib/whois/answer/parser/whois.afilias.info.rb", "lib/whois/answer/parser/whois.ai.rb", "lib/whois/answer/parser/whois.arnes.si.rb", "lib/whois/answer/parser/whois.audns.net.au.rb", "lib/whois/answer/parser/whois.ausregistry.net.au.rb", "lib/whois/answer/parser/whois.biz.rb", "lib/whois/answer/parser/whois.cat.rb", "lib/whois/answer/parser/whois.cctld.uz.rb", "lib/whois/answer/parser/whois.cira.ca.rb", "lib/whois/answer/parser/whois.cnnic.cn.rb", "lib/whois/answer/parser/whois.cnnic.net.cn.rb", "lib/whois/answer/parser/whois.crsnic.net.rb", "lib/whois/answer/parser/whois.denic.de.rb", "lib/whois/answer/parser/whois.dk-hostmaster.dk.rb", "lib/whois/answer/parser/whois.dns.be.rb", "lib/whois/answer/parser/whois.dns.lu.rb", "lib/whois/answer/parser/whois.dns.pt.rb", "lib/whois/answer/parser/whois.domain-registry.nl.rb", "lib/whois/answer/parser/whois.domainregistry.ie.rb", "lib/whois/answer/parser/whois.domreg.lt.rb", "lib/whois/answer/parser/whois.dot.tk.rb", "lib/whois/answer/parser/whois.dotmobiregistry.net.rb", "lib/whois/answer/parser/whois.educause.edu.rb", "lib/whois/answer/parser/whois.eenet.ee.rb", "lib/whois/answer/parser/whois.eu.org.rb", "lib/whois/answer/parser/whois.eu.rb", "lib/whois/answer/parser/whois.hkdnr.net.hk.rb", "lib/whois/answer/parser/whois.hkirc.hk.rb", "lib/whois/answer/parser/whois.iana.org.rb", "lib/whois/answer/parser/whois.in.ua.rb", "lib/whois/answer/parser/whois.isnic.is.rb", "lib/whois/answer/parser/whois.jprs.jp.rb", "lib/whois/answer/parser/whois.meregistry.net.rb", "lib/whois/answer/parser/whois.museum.rb", "lib/whois/answer/parser/whois.net.ua.rb", "lib/whois/answer/parser/whois.nic-se.se.rb", "lib/whois/answer/parser/whois.nic.ac.rb", "lib/whois/answer/parser/whois.nic.af.rb", "lib/whois/answer/parser/whois.nic.ag.rb", "lib/whois/answer/parser/whois.nic.am.rb", "lib/whois/answer/parser/whois.nic.as.rb", "lib/whois/answer/parser/whois.nic.asia.rb", "lib/whois/answer/parser/whois.nic.at.rb", "lib/whois/answer/parser/whois.nic.cc.rb", "lib/whois/answer/parser/whois.nic.cd.rb", "lib/whois/answer/parser/whois.nic.ch.rb", "lib/whois/answer/parser/whois.nic.co.rb", "lib/whois/answer/parser/whois.nic.coop.rb", "lib/whois/answer/parser/whois.nic.ec.rb", "lib/whois/answer/parser/whois.nic.fr.rb", "lib/whois/answer/parser/whois.nic.gl.rb", "lib/whois/answer/parser/whois.nic.gov.rb", "lib/whois/answer/parser/whois.nic.ht.rb", "lib/whois/answer/parser/whois.nic.hu.rb", "lib/whois/answer/parser/whois.nic.im.rb", "lib/whois/answer/parser/whois.nic.io.rb", "lib/whois/answer/parser/whois.nic.it.rb", "lib/whois/answer/parser/whois.nic.kz.rb", "lib/whois/answer/parser/whois.nic.la.rb", "lib/whois/answer/parser/whois.nic.lv.rb", "lib/whois/answer/parser/whois.nic.ly.rb", "lib/whois/answer/parser/whois.nic.mu.rb", "lib/whois/answer/parser/whois.nic.mx.rb", "lib/whois/answer/parser/whois.nic.name.rb", "lib/whois/answer/parser/whois.nic.net.sa.rb", "lib/whois/answer/parser/whois.nic.nu.rb", "lib/whois/answer/parser/whois.nic.or.kr.rb", "lib/whois/answer/parser/whois.nic.org.uy.rb", "lib/whois/answer/parser/whois.nic.sn.rb", "lib/whois/answer/parser/whois.nic.st.rb", "lib/whois/answer/parser/whois.nic.tel.rb", "lib/whois/answer/parser/whois.nic.tl.rb", "lib/whois/answer/parser/whois.nic.tr.rb", "lib/whois/answer/parser/whois.nic.travel.rb", "lib/whois/answer/parser/whois.nic.tv.rb", "lib/whois/answer/parser/whois.nic.uk.rb", "lib/whois/answer/parser/whois.nic.us.rb", "lib/whois/answer/parser/whois.nic.ve.rb", "lib/whois/answer/parser/whois.norid.no.rb", "lib/whois/answer/parser/whois.pandi.or.id.rb", "lib/whois/answer/parser/whois.publicinterestregistry.net.rb", "lib/whois/answer/parser/whois.register.bg.rb", "lib/whois/answer/parser/whois.registro.br.rb", "lib/whois/answer/parser/whois.registry.in.rb", "lib/whois/answer/parser/whois.registrypro.pro.rb", "lib/whois/answer/parser/whois.ripe.net.rb", "lib/whois/answer/parser/whois.ripn.net.rb", "lib/whois/answer/parser/whois.rotld.ro.rb", "lib/whois/answer/parser/whois.samoanic.ws.rb", "lib/whois/answer/parser/whois.srs.net.nz.rb", "lib/whois/answer/parser/whois.tonic.to.rb", "lib/whois/answer/parser/whois.za.net.rb", "lib/whois/answer/parser/whois.za.org.rb", "lib/whois/answer/parser.rb", "lib/whois/answer/part.rb", "lib/whois/answer/registrar.rb", "lib/whois/answer/super_struct.rb", "lib/whois/answer.rb", "lib/whois/client.rb", "lib/whois/definitions/ipv4.rb", "lib/whois/definitions/ipv6.rb", "lib/whois/definitions/NOTES.txt", "lib/whois/definitions/tlds.rb", "lib/whois/errors.rb", "lib/whois/server/adapters/afilias.rb", "lib/whois/server/adapters/arpa.rb", "lib/whois/server/adapters/base.rb", "lib/whois/server/adapters/formatted.rb", "lib/whois/server/adapters/none.rb", "lib/whois/server/adapters/not_implemented.rb", "lib/whois/server/adapters/pir.rb", "lib/whois/server/adapters/standard.rb", "lib/whois/server/adapters/verisign.rb", "lib/whois/server/adapters/web.rb", "lib/whois/server.rb", "lib/whois/version.rb", "lib/whois.rb"]
  16
+  s.files = ["CHANGELOG.rdoc", "LICENSE.rdoc", "README.rdoc", "whois.gemspec", "bin/ruby-whois", "lib/core_ext.rb", "lib/whois/answer/contact.rb", "lib/whois/answer/nameserver.rb", "lib/whois/answer/parser/ast.rb", "lib/whois/answer/parser/base.rb", "lib/whois/answer/parser/blank.rb", "lib/whois/answer/parser/example.rb", "lib/whois/answer/parser/jobswhois.verisign-grs.com.rb", "lib/whois/answer/parser/NOTES.txt", "lib/whois/answer/parser/saudinic.net.sa.rb", "lib/whois/answer/parser/scanners/iana.rb", "lib/whois/answer/parser/scanners/verisign.rb", "lib/whois/answer/parser/whois.adamsnames.tc.rb", "lib/whois/answer/parser/whois.aeda.net.ae.rb", "lib/whois/answer/parser/whois.aero.rb", "lib/whois/answer/parser/whois.afilias-grs.info.rb", "lib/whois/answer/parser/whois.afilias.info.rb", "lib/whois/answer/parser/whois.ai.rb", "lib/whois/answer/parser/whois.arnes.si.rb", "lib/whois/answer/parser/whois.audns.net.au.rb", "lib/whois/answer/parser/whois.ausregistry.net.au.rb", "lib/whois/answer/parser/whois.biz.rb", "lib/whois/answer/parser/whois.cat.rb", "lib/whois/answer/parser/whois.cctld.uz.rb", "lib/whois/answer/parser/whois.cira.ca.rb", "lib/whois/answer/parser/whois.cnnic.cn.rb", "lib/whois/answer/parser/whois.cnnic.net.cn.rb", "lib/whois/answer/parser/whois.co.ug.rb", "lib/whois/answer/parser/whois.crsnic.net.rb", "lib/whois/answer/parser/whois.denic.de.rb", "lib/whois/answer/parser/whois.dk-hostmaster.dk.rb", "lib/whois/answer/parser/whois.dns.be.rb", "lib/whois/answer/parser/whois.dns.lu.rb", "lib/whois/answer/parser/whois.dns.pt.rb", "lib/whois/answer/parser/whois.domain-registry.nl.rb", "lib/whois/answer/parser/whois.domainregistry.ie.rb", "lib/whois/answer/parser/whois.domreg.lt.rb", "lib/whois/answer/parser/whois.dot.tk.rb", "lib/whois/answer/parser/whois.dotmobiregistry.net.rb", "lib/whois/answer/parser/whois.educause.edu.rb", "lib/whois/answer/parser/whois.eenet.ee.rb", "lib/whois/answer/parser/whois.eu.org.rb", "lib/whois/answer/parser/whois.eu.rb", "lib/whois/answer/parser/whois.hkdnr.net.hk.rb", "lib/whois/answer/parser/whois.hkirc.hk.rb", "lib/whois/answer/parser/whois.iana.org.rb", "lib/whois/answer/parser/whois.in.ua.rb", "lib/whois/answer/parser/whois.isnic.is.rb", "lib/whois/answer/parser/whois.jprs.jp.rb", "lib/whois/answer/parser/whois.meregistry.net.rb", "lib/whois/answer/parser/whois.museum.rb", "lib/whois/answer/parser/whois.net.ua.rb", "lib/whois/answer/parser/whois.nic-se.se.rb", "lib/whois/answer/parser/whois.nic.ac.rb", "lib/whois/answer/parser/whois.nic.af.rb", "lib/whois/answer/parser/whois.nic.ag.rb", "lib/whois/answer/parser/whois.nic.am.rb", "lib/whois/answer/parser/whois.nic.as.rb", "lib/whois/answer/parser/whois.nic.asia.rb", "lib/whois/answer/parser/whois.nic.at.rb", "lib/whois/answer/parser/whois.nic.cc.rb", "lib/whois/answer/parser/whois.nic.cd.rb", "lib/whois/answer/parser/whois.nic.ch.rb", "lib/whois/answer/parser/whois.nic.co.rb", "lib/whois/answer/parser/whois.nic.coop.rb", "lib/whois/answer/parser/whois.nic.ec.rb", "lib/whois/answer/parser/whois.nic.fr.rb", "lib/whois/answer/parser/whois.nic.gl.rb", "lib/whois/answer/parser/whois.nic.gov.rb", "lib/whois/answer/parser/whois.nic.ht.rb", "lib/whois/answer/parser/whois.nic.hu.rb", "lib/whois/answer/parser/whois.nic.im.rb", "lib/whois/answer/parser/whois.nic.io.rb", "lib/whois/answer/parser/whois.nic.it.rb", "lib/whois/answer/parser/whois.nic.kz.rb", "lib/whois/answer/parser/whois.nic.la.rb", "lib/whois/answer/parser/whois.nic.lv.rb", "lib/whois/answer/parser/whois.nic.ly.rb", "lib/whois/answer/parser/whois.nic.mu.rb", "lib/whois/answer/parser/whois.nic.mx.rb", "lib/whois/answer/parser/whois.nic.name.rb", "lib/whois/answer/parser/whois.nic.net.sa.rb", "lib/whois/answer/parser/whois.nic.nu.rb", "lib/whois/answer/parser/whois.nic.or.kr.rb", "lib/whois/answer/parser/whois.nic.org.uy.rb", "lib/whois/answer/parser/whois.nic.sn.rb", "lib/whois/answer/parser/whois.nic.st.rb", "lib/whois/answer/parser/whois.nic.tel.rb", "lib/whois/answer/parser/whois.nic.tl.rb", "lib/whois/answer/parser/whois.nic.tr.rb", "lib/whois/answer/parser/whois.nic.travel.rb", "lib/whois/answer/parser/whois.nic.tv.rb", "lib/whois/answer/parser/whois.nic.uk.rb", "lib/whois/answer/parser/whois.nic.us.rb", "lib/whois/answer/parser/whois.nic.ve.rb", "lib/whois/answer/parser/whois.norid.no.rb", "lib/whois/answer/parser/whois.pandi.or.id.rb", "lib/whois/answer/parser/whois.publicinterestregistry.net.rb", "lib/whois/answer/parser/whois.register.bg.rb", "lib/whois/answer/parser/whois.registro.br.rb", "lib/whois/answer/parser/whois.registry.in.rb", "lib/whois/answer/parser/whois.registrypro.pro.rb", "lib/whois/answer/parser/whois.ripe.net.rb", "lib/whois/answer/parser/whois.ripn.net.rb", "lib/whois/answer/parser/whois.rotld.ro.rb", "lib/whois/answer/parser/whois.samoanic.ws.rb", "lib/whois/answer/parser/whois.srs.net.nz.rb", "lib/whois/answer/parser/whois.tonic.to.rb", "lib/whois/answer/parser/whois.za.net.rb", "lib/whois/answer/parser/whois.za.org.rb", "lib/whois/answer/parser.rb", "lib/whois/answer/part.rb", "lib/whois/answer/registrar.rb", "lib/whois/answer/super_struct.rb", "lib/whois/answer.rb", "lib/whois/client.rb", "lib/whois/definitions/ipv4.rb", "lib/whois/definitions/ipv6.rb", "lib/whois/definitions/NOTES.txt", "lib/whois/definitions/tlds.rb", "lib/whois/errors.rb", "lib/whois/server/adapters/afilias.rb", "lib/whois/server/adapters/arpa.rb", "lib/whois/server/adapters/base.rb", "lib/whois/server/adapters/formatted.rb", "lib/whois/server/adapters/none.rb", "lib/whois/server/adapters/not_implemented.rb", "lib/whois/server/adapters/pir.rb", "lib/whois/server/adapters/standard.rb", "lib/whois/server/adapters/verisign.rb", "lib/whois/server/adapters/web.rb", "lib/whois/server.rb", "lib/whois/version.rb", "lib/whois.rb"]
15 17
   s.homepage = %q{http://www.ruby-whois.org}
16 18
   s.rdoc_options = ["--main", "README.rdoc"]
17 19
   s.require_paths = ["lib"]

No commit comments for this range

Something went wrong with that request. Please try again.