whois 0.9.0 → 1.0.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (262) hide show
  1. data/CHANGELOG.rdoc +161 -21
  2. data/LICENSE.rdoc +1 -1
  3. data/Manifest +184 -13
  4. data/README.rdoc +24 -31
  5. data/Rakefile +7 -7
  6. data/bin/ruby-whois +9 -3
  7. data/data/ip_del_list +2 -0
  8. data/data/make_servers_charset.pl +21 -0
  9. data/data/make_tld_serv.pl +8 -7
  10. data/data/servers_charset_list +37 -0
  11. data/data/tld_serv_list +32 -30
  12. data/lib/whois.rb +0 -1
  13. data/lib/whois/answer.rb +24 -13
  14. data/lib/whois/answer/parser.rb +27 -16
  15. data/lib/whois/answer/parser/NOTES.txt +3 -0
  16. data/lib/whois/answer/parser/base.rb +140 -101
  17. data/lib/whois/answer/parser/jobswhois.verisign-grs.com.rb +99 -0
  18. data/lib/whois/answer/parser/whois.adamsnames.tc.rb +64 -0
  19. data/lib/whois/answer/parser/whois.aeda.net.ae.rb +65 -0
  20. data/lib/whois/answer/parser/whois.aero.rb +6 -6
  21. data/lib/whois/answer/parser/whois.afilias-grs.info.rb +6 -6
  22. data/lib/whois/answer/parser/whois.afilias.info.rb +12 -12
  23. data/lib/whois/answer/parser/whois.biz.rb +72 -0
  24. data/lib/whois/answer/parser/whois.cat.rb +74 -0
  25. data/lib/whois/answer/parser/whois.cira.ca.rb +77 -0
  26. data/lib/whois/answer/parser/whois.crsnic.net.rb +16 -13
  27. data/lib/whois/answer/parser/whois.denic.de.rb +14 -18
  28. data/lib/whois/answer/parser/whois.dk-hostmaster.dk.rb +75 -0
  29. data/lib/whois/answer/parser/whois.domain-registry.nl.rb +72 -0
  30. data/lib/whois/answer/parser/whois.domainregistry.ie.rb +7 -13
  31. data/lib/whois/answer/parser/whois.dotmobiregistry.net.rb +72 -0
  32. data/lib/whois/answer/parser/whois.educause.edu.rb +8 -8
  33. data/lib/whois/answer/parser/whois.eu.org.rb +8 -17
  34. data/lib/whois/answer/parser/whois.eu.rb +64 -0
  35. data/lib/whois/answer/parser/whois.iana.org.rb +6 -9
  36. data/lib/whois/answer/parser/whois.isnic.is.rb +72 -0
  37. data/lib/whois/answer/parser/whois.meregistry.net.rb +72 -0
  38. data/lib/whois/answer/parser/whois.museum.rb +76 -0
  39. data/lib/whois/answer/parser/whois.nic-se.se.rb +77 -0
  40. data/lib/whois/answer/parser/whois.nic.ac.rb +92 -0
  41. data/lib/whois/answer/parser/whois.nic.asia.rb +12 -12
  42. data/lib/whois/answer/parser/whois.nic.cc.rb +99 -0
  43. data/lib/whois/answer/parser/whois.nic.cd.rb +68 -0
  44. data/lib/whois/answer/parser/whois.nic.ch.rb +64 -0
  45. data/lib/whois/answer/parser/whois.nic.coop.rb +74 -0
  46. data/lib/whois/answer/parser/whois.nic.fr.rb +8 -11
  47. data/lib/whois/answer/parser/whois.nic.gl.rb +77 -0
  48. data/lib/whois/answer/parser/whois.nic.gov.rb +8 -17
  49. data/lib/whois/answer/parser/whois.nic.hu.rb +21 -19
  50. data/lib/whois/answer/parser/whois.nic.im.rb +68 -0
  51. data/lib/whois/answer/parser/whois.nic.io.rb +64 -0
  52. data/lib/whois/answer/parser/whois.nic.it.rb +16 -16
  53. data/lib/whois/answer/parser/whois.nic.ly.rb +76 -0
  54. data/lib/whois/answer/parser/whois.nic.mu.rb +77 -0
  55. data/lib/whois/answer/parser/whois.nic.name.rb +8 -17
  56. data/lib/whois/answer/parser/whois.nic.nu.rb +84 -0
  57. data/lib/whois/answer/parser/whois.nic.tel.rb +76 -0
  58. data/lib/whois/answer/parser/whois.nic.tl.rb +76 -0
  59. data/lib/whois/answer/parser/whois.nic.travel.rb +72 -0
  60. data/lib/whois/answer/parser/whois.nic.tv.rb +16 -13
  61. data/lib/whois/answer/parser/whois.nic.uk.rb +82 -0
  62. data/lib/whois/answer/parser/whois.nic.us.rb +72 -0
  63. data/lib/whois/answer/parser/whois.norid.no.rb +72 -0
  64. data/lib/whois/answer/parser/whois.publicinterestregistry.net.rb +16 -16
  65. data/lib/whois/answer/parser/whois.register.bg.rb +74 -0
  66. data/lib/whois/answer/parser/whois.registro.br.rb +64 -0
  67. data/lib/whois/answer/parser/whois.registrypro.pro.rb +77 -0
  68. data/lib/whois/answer/parser/whois.ripe.net.rb +64 -0
  69. data/lib/whois/answer/parser/whois.ripn.net.rb +72 -0
  70. data/lib/whois/answer/parser/whois.rotld.ro.rb +64 -0
  71. data/lib/whois/answer/parser/whois.samoanic.ws.rb +76 -0
  72. data/lib/whois/answer/parser/whois.za.net.rb +8 -11
  73. data/lib/whois/answer/parser/whois.za.org.rb +7 -10
  74. data/lib/whois/answer/super_struct.rb +1 -1
  75. data/lib/whois/client.rb +4 -4
  76. data/lib/whois/definitions/NOTES.txt +12 -0
  77. data/lib/whois/definitions/ipv4.rb +2 -0
  78. data/lib/whois/definitions/tlds.rb +27 -27
  79. data/lib/whois/errors.rb +11 -1
  80. data/lib/whois/server.rb +1 -0
  81. data/lib/whois/server/adapters/web.rb +1 -2
  82. data/lib/whois/version.rb +4 -4
  83. data/test/answer/parser/base_test.rb +16 -29
  84. data/test/answer/parser/jobswhois.verisign-grs.com_test.rb +122 -0
  85. data/test/answer/parser/whois.adamsnames.tc_test.rb +122 -0
  86. data/test/answer/parser/whois.aeda.net.ae_test.rb +63 -0
  87. data/test/answer/parser/whois.afilias-grs.info_test.rb +274 -13
  88. data/test/answer/parser/whois.afilias.info_test.rb +1 -1
  89. data/test/answer/parser/whois.biz_test.rb +51 -0
  90. data/test/answer/parser/whois.cat_test.rb +51 -0
  91. data/test/answer/parser/whois.cira.ca_test.rb +51 -0
  92. data/test/answer/parser/whois.crsnic.net_test.rb +8 -3
  93. data/test/answer/parser/whois.denic.de_test.rb +11 -18
  94. data/test/answer/parser/whois.dk-hostmaster.dk_test.rb +57 -0
  95. data/test/answer/parser/whois.domain-registry.nl_test.rb +49 -0
  96. data/test/answer/parser/whois.domainregistry.ie_test.rb +7 -11
  97. data/test/answer/parser/whois.dotmobiregistry.net_test.rb +51 -0
  98. data/test/answer/parser/whois.educause.edu_test.rb +3 -3
  99. data/test/answer/parser/whois.eu.org_test.rb +6 -12
  100. data/test/answer/parser/whois.eu_test.rb +45 -0
  101. data/test/answer/parser/whois.iana.org_test.rb +2 -4
  102. data/test/answer/parser/whois.isnic.is_test.rb +49 -0
  103. data/test/answer/parser/whois.meregistry.net_test.rb +51 -0
  104. data/test/answer/parser/whois.museum_test.rb +51 -0
  105. data/test/answer/parser/whois.nic-se.se_test.rb +58 -0
  106. data/test/answer/parser/whois.nic.ac_test.rb +126 -0
  107. data/test/answer/parser/whois.nic.asia_test.rb +1 -1
  108. data/test/answer/parser/whois.nic.cc_test.rb +122 -0
  109. data/test/answer/parser/whois.nic.cd_test.rb +49 -0
  110. data/test/answer/parser/whois.nic.ch_test.rb +45 -0
  111. data/test/answer/parser/whois.nic.coop_test.rb +51 -0
  112. data/test/answer/parser/whois.nic.fr_test.rb +178 -13
  113. data/test/answer/parser/whois.nic.gl_test.rb +51 -0
  114. data/test/answer/parser/whois.nic.gov_test.rb +6 -12
  115. data/test/answer/parser/whois.nic.hu_test.rb +9 -7
  116. data/test/answer/parser/whois.nic.im_test.rb +47 -0
  117. data/test/answer/parser/whois.nic.io_test.rb +45 -0
  118. data/test/answer/parser/whois.nic.it_test.rb +6 -3
  119. data/test/answer/parser/whois.nic.ly_test.rb +51 -0
  120. data/test/answer/parser/whois.nic.mu_test.rb +97 -0
  121. data/test/answer/parser/whois.nic.name_test.rb +6 -12
  122. data/test/answer/parser/whois.nic.nu_test.rb +59 -0
  123. data/test/answer/parser/whois.nic.tel_test.rb +51 -0
  124. data/test/answer/parser/whois.nic.tl_test.rb +51 -0
  125. data/test/answer/parser/whois.nic.travel_test.rb +51 -0
  126. data/test/answer/parser/whois.nic.tv_test.rb +9 -5
  127. data/test/answer/parser/whois.nic.uk_test.rb +63 -0
  128. data/test/answer/parser/whois.nic.us_test.rb +51 -0
  129. data/test/answer/parser/whois.norid.no_test.rb +49 -0
  130. data/test/answer/parser/whois.register.bg_test.rb +49 -0
  131. data/test/answer/parser/whois.registro.br_test.rb +45 -0
  132. data/test/answer/parser/whois.registrypro.pro_test.rb +84 -0
  133. data/test/answer/parser/whois.ripe.net_test.rb +203 -0
  134. data/test/answer/parser/whois.ripn.net_test.rb +94 -0
  135. data/test/answer/parser/whois.rotld.ro_test.rb +45 -0
  136. data/test/answer/parser/whois.samoanic.ws_test.rb +51 -0
  137. data/test/answer/parser/whois.za.net_test.rb +2 -4
  138. data/test/answer/parser/whois.za.org_test.rb +2 -4
  139. data/test/answer/parser_test.rb +71 -48
  140. data/test/answer_test.rb +57 -21
  141. data/test/client_test.rb +5 -2
  142. data/test/errors_test.rb +23 -0
  143. data/test/list_tld +74 -76
  144. data/test/testcases/responses/jobswhois.verisign-grs.com/available.txt +44 -0
  145. data/test/testcases/responses/jobswhois.verisign-grs.com/registered.txt +54 -0
  146. data/test/testcases/responses/super_struct_test.rb +3 -4
  147. data/test/testcases/responses/whois.adamsnames.tc/gd/available.txt +2 -0
  148. data/test/testcases/responses/whois.adamsnames.tc/gd/registered.txt +26 -0
  149. data/test/testcases/responses/whois.adamsnames.tc/tc/available.txt +2 -0
  150. data/test/testcases/responses/whois.adamsnames.tc/tc/registered.txt +28 -0
  151. data/test/testcases/responses/whois.adamsnames.tc/vg/available.txt +2 -0
  152. data/test/testcases/responses/whois.adamsnames.tc/vg/registered.txt +28 -0
  153. data/test/testcases/responses/whois.aeda.net.ae/available.txt +1 -0
  154. data/test/testcases/responses/whois.aeda.net.ae/registered.txt +15 -0
  155. data/test/testcases/responses/whois.biz/available.txt +25 -0
  156. data/test/testcases/responses/whois.biz/registered.txt +89 -0
  157. data/test/testcases/responses/whois.cat/available.txt +18 -0
  158. data/test/testcases/responses/whois.cat/registered.txt +83 -0
  159. data/test/testcases/responses/whois.cira.ca/available.txt +9 -0
  160. data/test/testcases/responses/whois.cira.ca/registered.txt +47 -0
  161. data/test/testcases/responses/whois.dk-hostmaster.dk/available.txt +15 -0
  162. data/test/testcases/responses/whois.dk-hostmaster.dk/registered.txt +47 -0
  163. data/test/testcases/responses/whois.domain-registry.nl/available.txt +21 -0
  164. data/test/testcases/responses/whois.domain-registry.nl/registered.txt +67 -0
  165. data/test/testcases/responses/whois.dotmobiregistry.net/available.txt +25 -0
  166. data/test/testcases/responses/whois.dotmobiregistry.net/registered.txt +81 -0
  167. data/test/testcases/responses/whois.eu/available.txt +47 -0
  168. data/test/testcases/responses/whois.eu/registered.txt +63 -0
  169. data/test/testcases/responses/whois.isnic.is/available.txt +7 -0
  170. data/test/testcases/responses/whois.isnic.is/registered.txt +57 -0
  171. data/test/testcases/responses/{whois.afilias-grs.info → whois.meregistry.net}/available.txt +0 -0
  172. data/test/testcases/responses/whois.meregistry.net/registered.txt +94 -0
  173. data/test/testcases/responses/whois.museum/available.txt +18 -0
  174. data/test/testcases/responses/whois.museum/registered.txt +92 -0
  175. data/test/testcases/responses/whois.nic-se.se/available.txt +21 -0
  176. data/test/testcases/responses/whois.nic-se.se/registered.txt +37 -0
  177. data/test/testcases/responses/whois.nic.ac/available.txt +2 -0
  178. data/test/testcases/responses/whois.nic.ac/registered.txt +2 -0
  179. data/test/testcases/responses/whois.nic.cc/available.txt +44 -0
  180. data/test/testcases/responses/whois.nic.cc/registered.txt +58 -0
  181. data/test/testcases/responses/whois.nic.cd/available.txt +1 -0
  182. data/test/testcases/responses/whois.nic.cd/registered.txt +85 -0
  183. data/test/testcases/responses/whois.nic.ch/available.txt +2 -0
  184. data/test/testcases/responses/whois.nic.ch/registered.txt +28 -0
  185. data/test/testcases/responses/whois.nic.coop/available.txt +33 -0
  186. data/test/testcases/responses/whois.nic.coop/registered.txt +123 -0
  187. data/test/testcases/responses/whois.nic.fr/{available.txt → fr/available.txt} +0 -0
  188. data/test/testcases/responses/whois.nic.fr/{registered.txt → fr/registered.txt} +0 -0
  189. data/test/testcases/responses/whois.nic.fr/pm/available.txt +19 -0
  190. data/test/testcases/responses/whois.nic.fr/pm/registered.txt +88 -0
  191. data/test/testcases/responses/whois.nic.fr/re/available.txt +19 -0
  192. data/test/testcases/responses/whois.nic.fr/re/registered.txt +83 -0
  193. data/test/testcases/responses/whois.nic.fr/wf/available.txt +19 -0
  194. data/test/testcases/responses/whois.nic.fr/wf/registered.txt +88 -0
  195. data/test/testcases/responses/whois.nic.fr/yt/available.txt +19 -0
  196. data/test/testcases/responses/whois.nic.fr/yt/registered.txt +88 -0
  197. data/test/testcases/responses/whois.nic.gl/available.txt +23 -0
  198. data/test/testcases/responses/whois.nic.gl/registered.txt +40 -0
  199. data/test/testcases/responses/whois.nic.hu/available.txt +5 -5
  200. data/test/testcases/responses/whois.nic.hu/in_progress.txt +5 -5
  201. data/test/testcases/responses/whois.nic.hu/registered.txt +6 -6
  202. data/test/testcases/responses/whois.nic.im/available.txt +2 -0
  203. data/test/testcases/responses/whois.nic.im/registered.txt +45 -0
  204. data/test/testcases/responses/whois.nic.io/available.txt +2 -0
  205. data/test/testcases/responses/whois.nic.io/registered.txt +2 -0
  206. data/test/testcases/responses/whois.nic.ly/available.txt +1 -0
  207. data/test/testcases/responses/whois.nic.ly/registered.txt +65 -0
  208. data/test/testcases/responses/whois.nic.mu/ki/available.txt +20 -0
  209. data/test/testcases/responses/whois.nic.mu/ki/registered.txt +30 -0
  210. data/test/testcases/responses/whois.nic.mu/mu/available.txt +9 -0
  211. data/test/testcases/responses/whois.nic.mu/mu/registered.txt +22 -0
  212. data/test/testcases/responses/whois.nic.nu/available.txt +19 -0
  213. data/test/testcases/responses/whois.nic.nu/registered.txt +35 -0
  214. data/test/testcases/responses/whois.nic.tel/available.txt +59 -0
  215. data/test/testcases/responses/whois.nic.tel/registered.txt +111 -0
  216. data/test/testcases/responses/whois.nic.tl/available.txt +21 -0
  217. data/test/testcases/responses/whois.nic.tl/registered.txt +29 -0
  218. data/test/testcases/responses/whois.nic.travel/available.txt +25 -0
  219. data/test/testcases/responses/whois.nic.travel/registered.txt +75 -0
  220. data/test/testcases/responses/whois.nic.uk/available.txt +20 -0
  221. data/test/testcases/responses/whois.nic.uk/invalid.txt +22 -0
  222. data/test/testcases/responses/whois.nic.uk/registered.txt +50 -0
  223. data/test/testcases/responses/whois.nic.us/available.txt +29 -0
  224. data/test/testcases/responses/whois.nic.us/registered.txt +99 -0
  225. data/test/testcases/responses/whois.norid.no/available.txt +5 -0
  226. data/test/testcases/responses/whois.norid.no/registered.txt +34 -0
  227. data/test/testcases/responses/whois.register.bg/available.txt +1 -0
  228. data/test/testcases/responses/whois.register.bg/registered.txt +44 -0
  229. data/test/testcases/responses/whois.registro.br/available.txt +22 -0
  230. data/test/testcases/responses/whois.registro.br/registered.txt +23 -0
  231. data/test/testcases/responses/whois.registrypro.pro/available.txt +20 -0
  232. data/test/testcases/responses/whois.registrypro.pro/registered.txt +62 -0
  233. data/test/testcases/responses/whois.ripe.net/fo/available.txt +11 -0
  234. data/test/testcases/responses/whois.ripe.net/fo/registered.txt +45 -0
  235. data/test/testcases/responses/whois.ripe.net/gm/available.txt +11 -0
  236. data/test/testcases/responses/whois.ripe.net/gm/registered.txt +37 -0
  237. data/test/testcases/responses/whois.ripe.net/mc/available.txt +11 -0
  238. data/test/testcases/responses/whois.ripe.net/mc/registered.txt +36 -0
  239. data/test/testcases/responses/whois.ripe.net/sm/available.txt +11 -0
  240. data/test/testcases/responses/whois.ripe.net/sm/registered.txt +60 -0
  241. data/test/testcases/responses/whois.ripe.net/va/available.txt +11 -0
  242. data/test/testcases/responses/whois.ripe.net/va/registered.txt +48 -0
  243. data/test/testcases/responses/whois.ripn.net/ru/available.txt +9 -0
  244. data/test/testcases/responses/whois.ripn.net/ru/registered.txt +24 -0
  245. data/test/testcases/responses/whois.ripn.net/su/available.txt +9 -0
  246. data/test/testcases/responses/whois.ripn.net/su/registered.txt +20 -0
  247. data/test/testcases/responses/whois.rotld.ro/available.txt +16 -0
  248. data/test/testcases/responses/whois.rotld.ro/registered.txt +27 -0
  249. data/test/testcases/responses/whois.samoanic.ws/available.txt +12 -0
  250. data/test/testcases/responses/whois.samoanic.ws/registered.txt +34 -0
  251. data/whois.gemspec +19 -19
  252. metadata +274 -31
  253. data/lib/whois/answer/parser/README.rdoc +0 -21
  254. data/lib/whois/definitions/ipv4.txt +0 -214
  255. data/lib/whois/definitions/ipv6.txt +0 -32
  256. data/lib/whois/definitions/tld.notes.txt +0 -1
  257. data/lib/whois/definitions/tlds.txt +0 -354
  258. data/lib/whois/whois.rb +0 -185
  259. data/test/testcases/responses/whois.afilias-grs.info/registered.txt +0 -122
  260. data/test/testcases/responses/whois.nic.fr/MULTIPLE.txt +0 -4
  261. data/test/whois_test.rb +0 -32
  262. data/utils/tlds.txt +0 -318
@@ -42,10 +42,8 @@ class AnswerParserWhoisZaNetTest < Whois::Answer::Parser::TestCase
42
42
  end
43
43
 
44
44
  def test_expires_on
45
- assert_equal nil,
46
- @klass.new(load_part('/registered.txt')).expires_on
47
- assert_equal nil,
48
- @klass.new(load_part('/available.txt')).expires_on
45
+ assert_raise(Whois::PropertyNotSupported) { @klass.new(load_part('/registered.txt')).expires_on }
46
+ assert_raise(Whois::PropertyNotSupported) { @klass.new(load_part('/available.txt')).expires_on }
49
47
  end
50
48
 
51
49
  end
@@ -42,10 +42,8 @@ class AnswerParserWhoisZaOrgTest < Whois::Answer::Parser::TestCase
42
42
  end
43
43
 
44
44
  def test_expires_on
45
- assert_equal nil,
46
- @klass.new(load_part('/registered.txt')).expires_on
47
- assert_equal nil,
48
- @klass.new(load_part('/available.txt')).expires_on
45
+ assert_raise(Whois::PropertyNotSupported) { @klass.new(load_part('/registered.txt')).expires_on }
46
+ assert_raise(Whois::PropertyNotSupported) { @klass.new(load_part('/available.txt')).expires_on }
49
47
  end
50
48
 
51
49
  end
@@ -50,85 +50,98 @@ class AnswerParserTest < Test::Unit::TestCase
50
50
  end
51
51
 
52
52
 
53
- # DEPRECATED
54
- def test_supported_with_zero_parts
53
+ def test_property_supported_with_zero_parts
55
54
  answer = Whois::Answer.new(nil, [])
56
55
  parser = @klass.new(answer)
57
- assert !parser.supported?(:disclaimer)
56
+ assert !parser.property_supported?(:disclaimer)
58
57
  end
59
58
 
60
- # DEPRECATED
61
- def test_supported_with_one_part_supported
59
+ def test_property_supported_with_one_part_supported
62
60
  answer = Whois::Answer.new(nil, [Whois::Answer::Part.new(nil, "whois.nic.it")])
63
61
  parser = @klass.new(answer)
64
- assert parser.supported?(:disclaimer)
62
+ assert parser.property_supported?(:disclaimer)
65
63
  end
66
64
 
67
- # DEPRECATED
68
- def test_supported_with_one_part_unsupported
65
+ def test_property_supported_with_one_part_unsupported
69
66
  answer = Whois::Answer.new(nil, [Whois::Answer::Part.new(nil, "invalid.nic.it")])
70
67
  parser = @klass.new(answer)
71
- assert !parser.supported?(:disclaimer)
68
+ assert !parser.property_supported?(:disclaimer)
72
69
  end
73
70
 
74
- # DEPRECATED
75
- def test_supported_with_two_parts
71
+ def test_property_supported_with_two_parts
76
72
  answer = Whois::Answer.new(nil, [Whois::Answer::Part.new(nil, "whois.crsnic.net"), Whois::Answer::Part.new(nil, "whois.nic.it")])
77
73
  parser = @klass.new(answer)
78
74
  assert parser.property_supported?(:disclaimer)
79
75
  end
80
76
 
81
- def test_property_supported_with_zero_parts
82
- answer = Whois::Answer.new(nil, [])
83
- parser = @klass.new(answer)
84
- assert !parser.property_supported?(:disclaimer)
77
+
78
+ class Whois::Answer::Parser::TestParserSupported < Whois::Answer::Parser::Base
79
+ property_supported :status do
80
+ :status_supported
81
+ end
82
+ property_supported :created_on do
83
+ :created_on_supported
84
+ end
85
+ property_supported :updated_on do
86
+ :updated_on_supported
87
+ end
88
+ property_supported :expires_on do
89
+ :expires_on_supported
90
+ end
91
+ end
92
+ class Whois::Answer::Parser::TestParserUndefined < Whois::Answer::Parser::Base
93
+ property_supported :status do
94
+ :status_undefined
95
+ end
96
+ # not defined :created_on
97
+ # not defined :updated_on
98
+ # not defined :expires_on
99
+ end
100
+ class Whois::Answer::Parser::TestParserUnsupported < Whois::Answer::Parser::Base
101
+ property_not_supported :status
102
+ property_not_supported :created_on
103
+ property_not_supported :updated_on
104
+ property_not_supported :expires_on
85
105
  end
86
106
 
87
- def test_property_supported_with_one_part_supported
88
- answer = Whois::Answer.new(nil, [Whois::Answer::Part.new(nil, "whois.nic.it")])
107
+ def test_delegate_property_to_parsers_should_delegate_to_first_with_all_supported
108
+ answer = Whois::Answer.new(nil, [Whois::Answer::Part.new("", "test.parser.supported"), Whois::Answer::Part.new("", "test.parser.undefined")])
89
109
  parser = @klass.new(answer)
90
- assert parser.property_supported?(:disclaimer)
91
- end
110
+ assert_equal :status_undefined, parser.status
92
111
 
93
- def test_property_supported_with_one_part_unsupported
94
- answer = Whois::Answer.new(nil, [Whois::Answer::Part.new(nil, "invalid.nic.it")])
112
+ answer = Whois::Answer.new(nil, [Whois::Answer::Part.new("", "test.parser.undefined"), Whois::Answer::Part.new("", "test.parser.supported")])
95
113
  parser = @klass.new(answer)
96
- assert !parser.property_supported?(:disclaimer)
114
+ assert_equal :status_supported, parser.status
97
115
  end
98
116
 
99
- def test_property_supported_with_two_parts
100
- answer = Whois::Answer.new(nil, [Whois::Answer::Part.new(nil, "whois.crsnic.net"), Whois::Answer::Part.new(nil, "whois.nic.it")])
117
+ def test_delegate_property_to_parsers_should_delegate_to_first_with_one_supported
118
+ answer = Whois::Answer.new(nil, [Whois::Answer::Part.new("", "test.parser.supported"), Whois::Answer::Part.new("", "test.parser.undefined")])
101
119
  parser = @klass.new(answer)
102
- assert parser.property_supported?(:disclaimer)
120
+ assert_equal :created_on_supported, parser.created_on
121
+ answer = Whois::Answer.new(nil, [Whois::Answer::Part.new("", "test.parser.supported"), Whois::Answer::Part.new("", "test.parser.unsupported")])
122
+ parser = @klass.new(answer)
123
+ assert_equal :created_on_supported, parser.created_on
103
124
  end
104
125
 
105
-
106
- (Whois::Answer::Parser.properties - [:referral_url, :referral_whois]).each do |method|
107
- define_method "test_should_delegate_#{method}_to_parsers_first_parser_if_supported" do
108
- answer = Whois::Answer.new(nil, [Whois::Answer::Part.new("", "whois.nic.it")])
109
- parser = @klass.new(answer)
110
- parser.parsers.first.expects(method).returns(:value)
111
- assert_equal :value, parser.send(method)
112
- end
126
+ def test_delegate_property_to_parsers_should_raise_unless_supported
127
+ answer = Whois::Answer.new(nil, [Whois::Answer::Part.new("", "test.parser.unsupported"), Whois::Answer::Part.new("", "test.parser.unsupported")])
128
+ parser = @klass.new(answer)
129
+ assert_raise(Whois::PropertyNotSupported) { parser.created_on }
113
130
  end
114
131
 
115
- [:referral_url, :referral_whois].each do |method|
116
- define_method "test_should_delegate_#{method}_to_parsers_raise_unless_supported" do
117
- answer = Whois::Answer.new(nil, [Whois::Answer::Part.new("", "whois.nic.it")])
118
- parser = @klass.new(answer)
119
- assert_raise(Whois::PropertyNotSupported) { parser.send(method) }
120
- end
132
+ def test_delegate_property_to_parsers_should_raise_unless_available
133
+ answer = Whois::Answer.new(nil, [Whois::Answer::Part.new("", "test.parser.undefined"), Whois::Answer::Part.new("", "test.parser.undefined")])
134
+ parser = @klass.new(answer)
135
+ assert_raise(Whois::PropertyNotAvailable) { parser.created_on }
121
136
  end
122
137
 
123
- Whois::Answer::Parser.properties.each do |method|
124
- define_method "test_should_delegate_#{method}_to_parser_raise_with_no_zero_parts" do
125
- answer = Whois::Answer.new(nil, [])
126
- parser = @klass.new(answer)
127
- assert_raise(Whois::ParserError) { parser.send(method) }
128
- end
138
+ def test_delegate_property_to_parsers_should_raise_with_zero_parts
139
+ answer = Whois::Answer.new(nil, [])
140
+ parser = @klass.new(answer)
141
+ assert_raise(Whois::ParserError) { parser.created_on }
129
142
  end
130
143
 
131
- def test_should_not_delegate_unallowed_method_to_parser
144
+ def test_delegate_property_to_parser_should_not_delegate_unallowed_methods
132
145
  answer = Whois::Answer.new(nil, [Whois::Answer::Part.new("", "whois.nic.it")])
133
146
  parser = @klass.new(answer)
134
147
  parser.parsers.expects("unallowed_method").never
@@ -136,11 +149,11 @@ class AnswerParserTest < Test::Unit::TestCase
136
149
  end
137
150
 
138
151
 
139
- def test_parser_klass
152
+ def test_self_parser_klass
140
153
  assert_equal "Whois::Answer::Parser::WhoisNicIt", @klass.parser_klass("whois.nic.it").name
141
154
  end
142
155
 
143
- def test_parser_klass_with_preloaded_class
156
+ def test_self_parser_klass_with_preloaded_class
144
157
  @klass.class_eval <<-RUBY
145
158
  class WhoisFooBar
146
159
  end
@@ -148,4 +161,14 @@ class AnswerParserTest < Test::Unit::TestCase
148
161
  assert_equal "Whois::Answer::Parser::WhoisFooBar", @klass.parser_klass("whois.foo.bar").name
149
162
  end
150
163
 
164
+ def test_self_parser_klass_should_return_blank_class_if_parser_doesnt_exist
165
+ assert_equal "Whois::Answer::Parser::Blank", @klass.parser_klass("whois.missing").name
166
+ end
167
+
168
+ def test_self_host_to_parser
169
+ assert_equal "WhoisIt", @klass.host_to_parser("whois.it")
170
+ assert_equal "WhoisNicIt", @klass.host_to_parser("whois.nic.it")
171
+ assert_equal "WhoisDomainRegistryNl", @klass.host_to_parser("whois.domain-registry.nl")
172
+ end
173
+
151
174
  end
@@ -85,34 +85,70 @@ class AnswerTest < Test::Unit::TestCase
85
85
  assert_instance_of Whois::Answer::Parser, answer.parser
86
86
  end
87
87
 
88
+
89
+ class Whois::Answer::Parser::WhoisParserFake < Whois::Answer::Parser::Base
90
+ property_supported :status do
91
+ nil
92
+ end
93
+ property_supported :created_on do
94
+ Date.parse("2010-10-20")
95
+ end
96
+ property_not_supported :updated_on
97
+ # property_not_defined :expires_on
98
+ end
99
+
100
+ def test_property_supported?
101
+ answer = @klass.new(nil, [Whois::Answer::Part.new("", "whois.parser.fake")])
102
+ assert answer.property_supported?(:status)
103
+ assert answer.property_supported?(:created_on)
104
+ assert !answer.property_supported?(:updated_on)
105
+ assert !answer.property_supported?(:expires_on)
106
+ end
107
+
88
108
  def test_properties
89
- answer = @klass.new(nil, [])
90
- answer.parser.expects(:property_supported?).with(:domain).returns(true)
91
- answer.parser.expects(:property_supported?).with(:domain_id).returns(true)
92
- answer.parser.expects(:property_supported?).with(Not(any_of(:domain, :domain_id))).at_least(1).returns(false)
93
- answer.parser.expects(:domain).returns("foo.com")
94
- answer.parser.expects(:domain_id).returns(27)
95
-
109
+ answer = @klass.new(nil, [Whois::Answer::Part.new("", "whois.parser.fake")])
96
110
  properties = answer.properties
97
- assert_equal 2, properties.keys.length
98
- assert_equal "foo.com", properties[:domain]
99
- assert_equal 27, properties[:domain_id]
111
+
112
+ assert_equal Whois::Answer::Parser.properties.size, properties.keys.size
113
+ assert_equal nil, properties[:status]
114
+ assert_equal Date.parse("2010-10-20"), properties[:created_on]
115
+ assert_equal nil, properties[:updated_on]
116
+ assert_equal nil, properties[:expires_on]
100
117
  end
101
118
 
102
- def test_property_supported?
103
- answer = @klass.new(nil, [])
104
- answer.parser.expects(:property_supported?).with(:disclaimer).returns(:value)
105
- assert_equal :value, answer.property_supported?(:disclaimer)
119
+ def test_should_return_value_with_supported_property_getter
120
+ answer = @klass.new(nil, [Whois::Answer::Part.new("", "whois.parser.fake")])
121
+ assert_equal Date.parse("2010-10-20"), answer.created_on
106
122
  end
107
123
 
124
+ def test_should_return_nil_with_not_supported_property_getter
125
+ answer = @klass.new(nil, [Whois::Answer::Part.new("", "whois.parser.fake")])
126
+ assert_equal nil, answer.updated_on
127
+ end
108
128
 
109
- Whois::Answer::Parser.properties.each do |method|
110
- define_method "test_should_delegate_#{method}_to_parser" do
111
- answer = @klass.new(nil, [Whois::Answer::Part.new("", "whois.nic.it")])
112
- parser = answer.parser
113
- parser.expects(method).returns(:value)
114
- assert_equal :value, answer.send(method)
115
- end
129
+ def test_should_return_nil_with_not_implemented_property
130
+ answer = @klass.new(nil, [Whois::Answer::Part.new("", "whois.parser.fake")])
131
+ assert_equal nil, answer.expires_on
132
+ end
133
+
134
+ def test_should_return_false_with_supported_property_getter_and_not_value
135
+ answer = @klass.new(nil, [Whois::Answer::Part.new("", "whois.parser.fake")])
136
+ assert !answer.status?
137
+ end
138
+
139
+ def test_should_return_true_with_supported_property_getter_and_value
140
+ answer = @klass.new(nil, [Whois::Answer::Part.new("", "whois.parser.fake")])
141
+ assert answer.created_on?
142
+ end
143
+
144
+ def test_should_return_false_with_not_supported_property_exists
145
+ answer = @klass.new(nil, [Whois::Answer::Part.new("", "whois.parser.fake")])
146
+ assert !answer.updated_on?
147
+ end
148
+
149
+ def test_should_return_false_with_not_implemented_property_exists
150
+ answer = @klass.new(nil, [Whois::Answer::Part.new("", "whois.parser.fake")])
151
+ assert !answer.expires_on?
116
152
  end
117
153
 
118
154
  end
@@ -26,8 +26,11 @@ class ClientTest < Test::Unit::TestCase
26
26
 
27
27
  def test_query_should_cast_qstring_to_string
28
28
  server = Object.new
29
- server.expects(:query).with("google.com")
30
- Whois::Server.expects(:guess).with("google.com").returns(server)
29
+ # I can't use the String because Array#to_s behaves differentl
30
+ # on Ruby 1.8.7 and Ruby 1.9.1
31
+ # http://redmine.ruby-lang.org/issues/show/2617
32
+ server.expects(:query).with(instance_of(String))
33
+ Whois::Server.expects(:guess).with(instance_of(String)).returns(server)
31
34
  @client.query(["google", ".", "com"])
32
35
  end
33
36
 
@@ -0,0 +1,23 @@
1
+ require 'test_helper'
2
+
3
+ class WebInterfaceErrorTest < Test::Unit::TestCase
4
+
5
+ def setup
6
+ @klass = Whois::WebInterfaceError
7
+ end
8
+
9
+ def test_url
10
+ assert_raise(ArgumentError) { @klass.new }
11
+ end
12
+
13
+ def test_url
14
+ error = @klass.new("http://example.com")
15
+ assert_equal "http://example.com", error.url
16
+ end
17
+
18
+ def test_message
19
+ error = @klass.new("http://example.com")
20
+ assert_match %r{http://example.com}, error.message
21
+ end
22
+
23
+ end
@@ -29,25 +29,25 @@ edu;whois.educause.edu;google.edu;u34jedzcq.edu
29
29
  gov;whois.nic.gov;gsa.gov;u34jedzcq.gov
30
30
  int;whois.iana.org;nato.int;u34jedzcq.int
31
31
  mil;;;
32
- #Whois::Server.define :tld, ".e164.arpa", "whois.ripe.net"
33
- #Whois::Server.define :tld, ".in-addr.arpa", nil
32
+ #.e164.arpa;;;
33
+ #.in-addr.arpa;;;
34
34
  arpa;whois.iana.org;ip6.arpa;u34jedzcq.arpa
35
35
  aero;whois.aero;srilankan.aero;u34jedzcq.aero
36
36
  asia;whois.nic.asia;srilankan.aero;u34jedzcq.asia
37
- #Whois::Server.define :tld, ".biz", "whois.nic.biz"
38
- #Whois::Server.define :tld, ".cat", "whois.cat", {:adapter=>Whois::Server::Adapters::Formatted, :format => "-C US-ASCII ace %s"}
39
- #Whois::Server.define :tld, ".coop", "whois.nic.coop"
37
+ biz;whois.biz;google.biz;u34jedzcq.biz
38
+ cat;whois.cat;gencat.cat;u34jedzcq.cat
39
+ coop;whois.nic.coop;calgary.coop;u34jedzcq.coop
40
40
  info;whois.afilias.info;google.info;u34jedzcq.info
41
- #Whois::Server.define :tld, ".jobs", "jobswhois.verisign-grs.com", {:adapter=>Whois::Server::Adapters::Verisign}
42
- #Whois::Server.define :tld, ".mobi", "whois.dotmobiregistry.net"
43
- #Whois::Server.define :tld, ".museum", "whois.museum"
41
+ jobs;jobswhois.verisign-grs.com;goto.jobs;u34jedzcq.jobs
42
+ mobi;whois.dotmobiregistry.net;google.mobi;u34jedzcq.mobi
43
+ museum;whois.museum;musedoma.museum;u34jedzcq.museum
44
44
  name;whois.nicc.name;carletti.name;u34jedzcq.name
45
- #Whois::Server.define :tld, ".pro", "whois.registrypro.pro"
46
- #Whois::Server.define :tld, ".tel", "whois.nic.tel"
47
- #Whois::Server.define :tld, ".travel", "whois.nic.travel"
48
- #Whois::Server.define :tld, ".ac", "whois.nic.ac"
45
+ pro;whois.registrypro.pro;registry.pro;u34jedzcq.pro
46
+ tel;whois.nic.tel;weppos.tel;u34jedzcq.tel
47
+ travel;whois.nic.travel;travel.travel;u34jedzcq.travel
48
+ ac;whois.nic.ac;google.ac;u34jedzcq.ac
49
49
  ad;;;
50
- #Whois::Server.define :tld, ".ae", "whois.aeda.net.ae"
50
+ ae;whois.aeda.net.ae;google.ae;u34jedzcq.ae
51
51
  #Whois::Server.define :tld, ".af", "whois.nic.af"
52
52
  #Whois::Server.define :tld, ".ag", "whois.nic.ag"
53
53
  #Whois::Server.define :tld, ".ai", "whois.ai"
@@ -58,24 +58,24 @@ ao;;;
58
58
  aq;;;
59
59
  ar;;;
60
60
  #Whois::Server.define :tld, ".as", "whois.nic.as"
61
- #Whois::Server.define :tld, ".at", "whois.nic.at"
61
+ at;whois.nic.at;google.at;u34jedzcq.at
62
62
  #Whois::Server.define :tld, ".au", "whois.ausregistry.net.au"
63
63
  aw;;;
64
64
  ax;;;
65
65
  az;;;
66
66
  ba;;;
67
67
  bb;;;
68
- #Whois::Server.define :tld, ".bd", "www.whois.com.bd"
69
- #Whois::Server.define :tld, ".be", "whois.dns.be"
68
+ bd;;;
69
+ be;whois.dns.be;google.be;u34jedzcq.be
70
70
  bf;;;
71
- #Whois::Server.define :tld, ".bg", "whois.register.bg"
71
+ bg;whois.register.bg;google.bg;u34jedzcq.bg
72
72
  bh;;;
73
73
  bi;;;
74
74
  #Whois::Server.define :tld, ".bj", "whois.nic.bj"
75
75
  bm;;;
76
76
  bn;;;
77
77
  bo;;;
78
- #Whois::Server.define :tld, ".br", "whois.nic.br"
78
+ br;whois.registro.br;registro.br;u34jedzcq.br
79
79
  bs;;;
80
80
  bt;;;
81
81
  bv;;;
@@ -83,12 +83,12 @@ by;;;
83
83
  bw;;;
84
84
  bz;whois.afilias-grs.info;google.bz;u34jedzcq.bz
85
85
  #Whois::Server.define :tld, ".co.ca", "whois.co.ca"
86
- #Whois::Server.define :tld, ".ca", "whois.cira.ca"
87
- #Whois::Server.define :tld, ".cc", "whois.nic.cc", {:adapter=>Whois::Server::Adapters::Verisign}
88
- #Whois::Server.define :tld, ".cd", "whois.nic.cd"
86
+ ca;whois.cira.ca;google.ca;u34jedzcq.ca
87
+ cc;whois.nic.cc;google.cc;u34jedzcq.cc
88
+ cd;whois.nic.cd;google.cd;u34jedzcq.cd
89
89
  cf;;;
90
90
  cg;;;
91
- #Whois::Server.define :tld, ".ch", "whois.nic.ch"
91
+ ch;whois.nic.ch;google.ch;u34jedzcq.ch
92
92
  #Whois::Server.define :tld, ".ci", "www.nic.ci"
93
93
  #Whois::Server.define :tld, ".ck", "whois.nic.ck"
94
94
  #Whois::Server.define :tld, ".cl", "whois.nic.cl"
@@ -105,7 +105,7 @@ cy;;;
105
105
  #Whois::Server.define :tld, ".cz", "whois.nic.cz"
106
106
  de;whois.denic.de;google.de;u34jedzcq.de
107
107
  #Whois::Server.define :tld, ".dj", "whois.domain.dj"
108
- #Whois::Server.define :tld, ".dk", "whois.dk-hostmaster.dk"
108
+ dk;whois.dk-hostmaster.dk;google.dk;u34jedzcq.dk
109
109
  #Whois::Server.define :tld, ".dm", "whois.nic.dm"
110
110
  do;;;
111
111
  dz;;;
@@ -115,23 +115,23 @@ eg;;;
115
115
  er;;;
116
116
  es;;;
117
117
  et;;;
118
- #Whois::Server.define :tld, ".eu", "whois.eu"
118
+ eu;whois.eu;google.eu;u34jedzcq.eu
119
119
  #Whois::Server.define :tld, ".fi", "whois.ficora.fi"
120
120
  #Whois::Server.define :tld, ".fj", "whois.usp.ac.fj"
121
121
  fk;;;
122
122
  fm;;;
123
- #Whois::Server.define :tld, ".fo", "whois.ripe.net"
123
+ fo;whois.ripe.net;nic.fo;u34jedzcq.fo
124
124
  fr;whois.nic.fr;google.fr;u34jedzcq.fr
125
125
  ga;;;
126
126
  gb;;;
127
- #Whois::Server.define :tld, ".gd", "whois.adamsnames.tc"
127
+ gd;whois.adamsnames.tc;google.gd;u34jedzcq.gd
128
128
  ge;;;
129
- #Whois::Server.define :tld, ".gf", "whois.nplus.gf"
129
+ gf;;;
130
130
  #Whois::Server.define :tld, ".gg", "whois.gg"
131
131
  gh;;;
132
132
  gi;whois.afilias-grs.info;sapphire.gi;u34jedzcq.gi
133
- #Whois::Server.define :tld, ".gl", "whois.nic.gl"
134
- #Whois::Server.define :tld, ".gm", "whois.ripe.net"
133
+ gl;whois.nic.gl;google.gl;u34jedzcq.gl
134
+ gm;whois.ripe.net;nic.gm;u34jedzcq.gm
135
135
  gn;;;
136
136
  #Whois::Server.define :tld, ".gp", "whois.nic.gp"
137
137
  gq;;;
@@ -147,15 +147,15 @@ hn;whois.afilias-grs.info;google.hn;u34jedzcq.hn
147
147
  hr;;;
148
148
  #Whois::Server.define :tld, ".ht", "whois.nic.ht"
149
149
  hu;whois.nic.hu;google.hu;u34jedzcq.hu
150
- #Whois::Server.define :tld, ".id", "whois.idnic.net.id"
150
+ #Whois::Server.define :tld, ".id", "whois.pandi.or.id"
151
151
  ie;whois.domainregistry.ie;google.ie;u34jedzcq.ie
152
152
  #Whois::Server.define :tld, ".il", "whois.isoc.org.il"
153
- #Whois::Server.define :tld, ".im", "whois.nic.im"
153
+ im;whois.nic.im;google.im;u34jedzcq.im
154
154
  #Whois::Server.define :tld, ".in", "whois.registry.in"
155
- #Whois::Server.define :tld, ".io", "whois.nic.io"
155
+ io;whois.nic.io;drop.io;u34jedzcq.io
156
156
  iq;;;
157
157
  #Whois::Server.define :tld, ".ir", "whois.nic.ir"
158
- #Whois::Server.define :tld, ".is", "whois.isnet.is"
158
+ is;whois.isnic.is;google.is;u34jedzcq.is
159
159
  it;whois.nic.it;google.it;u34jedzcq.it
160
160
  #Whois::Server.define :tld, ".je", "whois.je"
161
161
  jm;;;
@@ -164,7 +164,7 @@ jo;;;
164
164
  #Whois::Server.define :tld, ".ke", "whois.kenic.or.ke"
165
165
  #Whois::Server.define :tld, ".kg", "whois.domain.kg"
166
166
  kh;;;
167
- #Whois::Server.define :tld, ".ki", nil, {:web=>"http://www.ki/dns/", :adapter=>Whois::Server::Adapters::Web}
167
+ ki;whois.nic.mu;google.ki;u34jedzcq.ki
168
168
  km;;;
169
169
  kn;;;
170
170
  #Whois::Server.define :tld, ".kp", "whois.kcce.kp"
@@ -175,7 +175,6 @@ ky;;;
175
175
  #Whois::Server.define :tld, ".la", "whois.nic.la"
176
176
  lb;;;
177
177
  lc;whois.afilias-grs.info;nic.lc;u34jedzcq.lc
178
- #Whois::Server.define :tld, ".lc", "whois.afilias-grs.info"
179
178
  #Whois::Server.define :tld, ".li", "whois.nic.li"
180
179
  #Whois::Server.define :tld, ".lk", "whois.nic.lk"
181
180
  lr;;;
@@ -183,28 +182,28 @@ ls;;;
183
182
  #Whois::Server.define :tld, ".lt", "whois.domreg.lt"
184
183
  #Whois::Server.define :tld, ".lu", "whois.dns.lu"
185
184
  #Whois::Server.define :tld, ".lv", "whois.nic.lv"
186
- #Whois::Server.define :tld, ".ly", "whois.nic.ly"
185
+ ly;whois.nic.ly;google.ly;u34jedzcq.ly
187
186
  #Whois::Server.define :tld, ".ma", "whois.iam.net.ma"
188
- #Whois::Server.define :tld, ".mc", "whois.ripe.net"
187
+ mc;whois.ripe.net;nic.mc;u34jedzcq.mc
189
188
  #Whois::Server.define :tld, ".md", "whois.nic.md"
190
- #Whois::Server.define :tld, ".me", "whois.meregistry.net"
189
+ me;whois.meregistry.net;google.me;u34jedzcq.me
191
190
  #Whois::Server.define :tld, ".mg", "whois.nic.mg"
192
191
  mh;;;
193
192
  mk;;;
194
193
  ml;;;
195
- #Whois::Server.define :tld, ".mm", "whois.nic.mm"
194
+ mm;;;
196
195
  mn;whois.afilias-grs.info;google.mn;u34jedzcq.mn
197
196
  mo;;;
198
- #Whois::Server.define :tld, ".mp", nil, {:adapter=>Whois::Server::Adapters::None}
199
- #Whois::Server.define :tld, ".mq", "whois.nic.mq"
197
+ mp;;;
198
+ mq;;;
200
199
  mr;;;
201
200
  #Whois::Server.define :tld, ".ms", "whois.nic.ms"
202
201
  mt;;;
203
- #Whois::Server.define :tld, ".mu", "whois.nic.mu"
202
+ mu;whois.nic.mu;google.mu;u34jedzcq.mu
204
203
  mv;;;
205
204
  mw;;;
206
205
  #Whois::Server.define :tld, ".mx", "whois.nic.mx"
207
- #Whois::Server.define :tld, ".my", "whois.mynic.net.my"
206
+ #Whois::Server.define :tld, ".my", "whois.domainregistry.my"
208
207
  mz;;;
209
208
  #Whois::Server.define :tld, ".na", "whois.na-nic.com.na"
210
209
  #Whois::Server.define :tld, ".nc", "whois.cctld.nc"
@@ -212,11 +211,11 @@ ne;;;
212
211
  #Whois::Server.define :tld, ".nf", "whois.nic.nf"
213
212
  #Whois::Server.define :tld, ".ng", "whois.register.net.ng"
214
213
  ni;;;
215
- #Whois::Server.define :tld, ".nl", "whois.domain-registry.nl"
216
- #Whois::Server.define :tld, ".no", "whois.norid.no"
214
+ nl;whois.domain-registry.nl;google.nl;u34jedzcq.nl
215
+ no;whois.norid.no;google.no;u34jedzcq.no
217
216
  np;;;
218
217
  nr;;;
219
- #Whois::Server.define :tld, ".nu", "whois.nic.nu"
218
+ nu;whois.nic.nu;google.nu;u34jedzcq.nu
220
219
  #Whois::Server.define :tld, ".nz", "whois.srs.net.nz"
221
220
  om;;;
222
221
  pa;;;
@@ -232,18 +231,17 @@ pn;;;
232
231
  #Whois::Server.define :tld, ".pr", "whois.nic.pr"
233
232
  ps;;;
234
233
  #Whois::Server.define :tld, ".pt", "whois.dns.pt"
235
- #Whois::Server.define :tld, ".pw", "whois.nic.pw"
234
+ pw;;;
236
235
  py;;;
237
236
  qa;;;
238
237
  re;whois.nic.fr;nic.re;u34jedzcq.re
239
- #Whois::Server.define :tld, ".ro", "whois.rotld.ro"
238
+ ro;whois.rotld.ro;google.ro;u34jedzcq.ro
240
239
  rs;;;
241
240
  #Whois::Server.define :tld, ".edu.ru", "whois.informika.ru"
242
- #Whois::Server.define :tld, ".ru", "whois.ripn.net"
241
+ ru;whois.ripn.net;google.ru;u34jedzcq.ru
243
242
  rw;;;
244
243
  #Whois::Server.define :tld, ".sa", "saudinic.net.sa"
245
- #Whois::Server.define :tld, ".sb", "whois.nic.net.sb"
246
- #Whois::Server.define :tld, ".sc", "whois.afilias-grs.info"
244
+ #Whois::Server.define :tld, ".sb", "whois.coccaregistry.net"
247
245
  sc;whois.afilias-grs.info;google.sc;u34jedzcq.sc
248
246
  sd;;;
249
247
  #Whois::Server.define :tld, ".se", "whois.nic-se.se"
@@ -253,28 +251,28 @@ sd;;;
253
251
  sj;;;
254
252
  #Whois::Server.define :tld, ".sk", "whois.sk-nic.sk"
255
253
  #Whois::Server.define :tld, ".sl", "whois.nic.sl"
256
- #Whois::Server.define :tld, ".sm", "whois.ripe.net"
254
+ sm;whois.ripe.net;google.sm;u34jedzcq.sm
257
255
  #Whois::Server.define :tld, ".sn", "whois.nic.sn"
258
- #Whois::Server.define :tld, ".so", nil, {:adapter=>Whois::Server::Adapters::None}
259
- #Whois::Server.define :tld, ".sr", "whois.register.sr"
256
+ so;;;
257
+ sr;;;
260
258
  #Whois::Server.define :tld, ".st", "whois.nic.st"
261
- #Whois::Server.define :tld, ".su", "whois.ripn.net"
259
+ su;whois.ripn.net;google.su;u34jedzcq.su
262
260
  sv;;;
263
261
  sy;;;
264
262
  sz;;;
265
- #Whois::Server.define :tld, ".tc", "whois.adamsnames.tc"
263
+ tc;whois.adamsnames.tc;google.tc;u34jedzcq.tc
266
264
  td;;;
267
265
  #Whois::Server.define :tld, ".tf", "whois.nic.tf"
268
266
  tg;;;
269
267
  #Whois::Server.define :tld, ".th", "whois.thnic.net"
270
- #Whois::Server.define :tld, ".tj", "whois.nic.tj"
268
+ tj;;;
271
269
  #Whois::Server.define :tld, ".tk", "whois.dot.tk"
272
- #Whois::Server.define :tld, ".tl", "whois.nic.tl"
270
+ tl;whois.nic.tl;thinkcode.tl;u34jedzcq.tl
273
271
  #Whois::Server.define :tld, ".tm", "whois.nic.tm"
274
272
  tn;;;
275
273
  #Whois::Server.define :tld, ".to", "whois.tonic.to"
276
- #Whois::Server.define :tld, ".tp", "whois.nic.tp"
277
- #Whois::Server.define :tld, ".tr", "whois.metu.edu.tr"
274
+ tp;;;
275
+ #Whois::Server.define :tld, ".tr", "whois.nic.tr"
278
276
  tt;;;
279
277
  tv;whois.nic.tv;thinkcode.tv;u34jedzcq.tv
280
278
  #Whois::Server.define :tld, ".tw", "whois.twnic.net"
@@ -282,33 +280,33 @@ tz;;;
282
280
  #Whois::Server.define :tld, ".ua", "whois.net.ua"
283
281
  #Whois::Server.define :tld, ".ug", "www.registry.co.ug"
284
282
  #Whois::Server.define :tld, ".ac.uk", "whois.ja.net"
285
- #Whois::Server.define :tld, ".bl.uk", nil, {:adapter=>Whois::Server::Adapters::None}
286
- #Whois::Server.define :tld, ".british-library.uk", nil, {:adapter=>Whois::Server::Adapters::None}
283
+ .bl.uk;;;
284
+ .british-library.uk;;;
287
285
  #Whois::Server.define :tld, ".gov.uk", "whois.ja.net"
288
- #Whois::Server.define :tld, ".icnet.uk", nil, {:adapter=>Whois::Server::Adapters::None}
289
- #Whois::Server.define :tld, ".jet.uk", nil, {:adapter=>Whois::Server::Adapters::None}
290
- #Whois::Server.define :tld, ".mod.uk", nil, {:adapter=>Whois::Server::Adapters::None}
291
- #Whois::Server.define :tld, ".nhs.uk", nil, {:adapter=>Whois::Server::Adapters::None}
292
- #Whois::Server.define :tld, ".nls.uk", nil, {:adapter=>Whois::Server::Adapters::None}
293
- #Whois::Server.define :tld, ".parliament.uk", nil, {:adapter=>Whois::Server::Adapters::None}
294
- #Whois::Server.define :tld, ".police.uk", nil, {:adapter=>Whois::Server::Adapters::None}
295
- #Whois::Server.define :tld, ".uk", "whois.nic.uk"
286
+ .icnet.uk;;;
287
+ .jet.uk;;;
288
+ .mod.uk;;;
289
+ .nhs.uk;;;
290
+ .nls.uk;;;
291
+ .parliament.uk;;;
292
+ .police.uk;;;
293
+ uk;whois.nic.uk;google.co.uk;u34jedzcq.co.uk
296
294
  #Whois::Server.define :tld, ".fed.us", "whois.nic.gov"
297
- #Whois::Server.define :tld, ".us", "whois.nic.us"
295
+ us;whois.nic.us;google.us;u34jedzcq.us
298
296
  #Whois::Server.define :tld, ".com.uy", nil, {:web=>"https://nic.anteldata.com.uy/dns/", :adapter=>Whois::Server::Adapters::Web}
299
297
  #Whois::Server.define :tld, ".uy", "whois.nic.org.uy"
300
298
  #Whois::Server.define :tld, ".uz", "whois.cctld.uz"
301
- #Whois::Server.define :tld, ".va", "whois.ripe.net"
299
+ va;whois.ripe.net;vatican.va;u34jedzcq.va
302
300
  vc;whois.afilias-grs.info;google.vc;u34jedzcq.vc
303
301
  #Whois::Server.define :tld, ".ve", "whois.nic.ve"
304
- #Whois::Server.define :tld, ".vg", "whois.adamsnames.tc"
302
+ vg;whois.adamsnames.tc;google.vg;u34jedzcq.vg
305
303
  vi;;;
306
304
  vn;;;
307
305
  vu;;;
308
- #Whois::Server.define :tld, ".wf", "whois.nic.wf"
309
- #Whois::Server.define :tld, ".ws", "whois.samoanic.ws"
306
+ wf;whois.nic.fr;nic.wf;u34jedzcq.wf
307
+ ws;whois.samoanic.ws;google.ws;u34jedzcq.ws
310
308
  ye;;;
311
- #Whois::Server.define :tld, ".yt", "whois.nic.yt"
309
+ yt;whois.nic.fr;nic.yt;u34jedzcq.yt
312
310
  yu;;;
313
311
  #Whois::Server.define :tld, ".ac.za", "whois.ac.za"
314
312
  #Whois::Server.define :tld, ".co.za", "whois.coza.net.za"