whois 1.2.2 → 1.3.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (429) hide show
  1. data/CHANGELOG.rdoc +23 -0
  2. data/README.rdoc +24 -7
  3. data/lib/core_ext.rb +4 -3
  4. data/lib/whois/answer/contact.rb +1 -1
  5. data/lib/whois/answer/nameserver.rb +41 -0
  6. data/lib/whois/answer/parser/base.rb +1 -0
  7. data/lib/whois/answer/parser/jobswhois.verisign-grs.com.rb +2 -2
  8. data/lib/whois/answer/parser/scanners/iana.rb +145 -0
  9. data/lib/whois/answer/parser/scanners/verisign.rb +15 -15
  10. data/lib/whois/answer/parser/whois.crsnic.net.rb +2 -2
  11. data/lib/whois/answer/parser/whois.denic.de.rb +27 -22
  12. data/lib/whois/answer/parser/whois.iana.org.rb +56 -16
  13. data/lib/whois/answer/parser/whois.nic.cc.rb +1 -1
  14. data/lib/whois/answer/parser/whois.nic.hu.rb +12 -8
  15. data/lib/whois/answer/parser/whois.nic.it.rb +1 -1
  16. data/lib/whois/answer/parser/whois.nic.tv.rb +1 -1
  17. data/lib/whois/answer/parser/whois.publicinterestregistry.net.rb +11 -9
  18. data/lib/whois/answer/registrar.rb +5 -5
  19. data/lib/whois/client.rb +0 -1
  20. data/lib/whois/errors.rb +19 -19
  21. data/lib/whois/server.rb +119 -47
  22. data/lib/whois/server/adapters/base.rb +44 -2
  23. data/lib/whois/version.rb +4 -3
  24. data/whois.gemspec +9 -18
  25. metadata +26 -713
  26. data/Manifest +0 -541
  27. data/Rakefile +0 -82
  28. data/data/ip6_del_list +0 -47
  29. data/data/ip_del_list +0 -245
  30. data/data/make_ip6_del.pl +0 -38
  31. data/data/make_ip_del.pl +0 -25
  32. data/data/make_servers_charset.pl +0 -21
  33. data/data/make_tld_serv.pl +0 -23
  34. data/data/servers_charset_list +0 -38
  35. data/data/tld_serv_list +0 -377
  36. data/tasks/server.rake +0 -109
  37. data/test/list_tld +0 -324
  38. data/test/test_helper.rb +0 -56
  39. data/test/testcases/referrals/afilias.bz.txt +0 -40
  40. data/test/testcases/referrals/crsnic.com.txt +0 -210
  41. data/test/testcases/referrals/crsnic.com_more_servers.txt +0 -210
  42. data/test/testcases/referrals/crsnic.com_one_server.txt +0 -57
  43. data/test/testcases/referrals/niccc.cc.txt +0 -59
  44. data/test/testcases/referrals/pir.org.txt +0 -84
  45. data/test/testcases/responses/UTF8.txt +0 -10
  46. data/test/testcases/responses/jobswhois.verisign-grs.com/available.txt +0 -44
  47. data/test/testcases/responses/jobswhois.verisign-grs.com/property_registrar.txt +0 -54
  48. data/test/testcases/responses/jobswhois.verisign-grs.com/registered.txt +0 -54
  49. data/test/testcases/responses/whois.adamsnames.tc/gd/available.txt +0 -2
  50. data/test/testcases/responses/whois.adamsnames.tc/gd/registered.txt +0 -26
  51. data/test/testcases/responses/whois.adamsnames.tc/tc/available.txt +0 -2
  52. data/test/testcases/responses/whois.adamsnames.tc/tc/registered.txt +0 -28
  53. data/test/testcases/responses/whois.adamsnames.tc/vg/available.txt +0 -2
  54. data/test/testcases/responses/whois.adamsnames.tc/vg/registered.txt +0 -28
  55. data/test/testcases/responses/whois.aeda.net.ae/available.txt +0 -1
  56. data/test/testcases/responses/whois.aeda.net.ae/registered.txt +0 -15
  57. data/test/testcases/responses/whois.aero/available.txt +0 -1
  58. data/test/testcases/responses/whois.aero/registered.txt +0 -102
  59. data/test/testcases/responses/whois.afilias-grs.info/bz/available.txt +0 -1
  60. data/test/testcases/responses/whois.afilias-grs.info/bz/registered.txt +0 -122
  61. data/test/testcases/responses/whois.afilias-grs.info/gi/available.txt +0 -1
  62. data/test/testcases/responses/whois.afilias-grs.info/gi/registered.txt +0 -98
  63. data/test/testcases/responses/whois.afilias-grs.info/hn/available.txt +0 -1
  64. data/test/testcases/responses/whois.afilias-grs.info/hn/registered.txt +0 -85
  65. data/test/testcases/responses/whois.afilias-grs.info/lc/available.txt +0 -1
  66. data/test/testcases/responses/whois.afilias-grs.info/lc/registered.txt +0 -83
  67. data/test/testcases/responses/whois.afilias-grs.info/mn/available.txt +0 -1
  68. data/test/testcases/responses/whois.afilias-grs.info/mn/registered.txt +0 -100
  69. data/test/testcases/responses/whois.afilias-grs.info/sc/available.txt +0 -1
  70. data/test/testcases/responses/whois.afilias-grs.info/sc/registered.txt +0 -85
  71. data/test/testcases/responses/whois.afilias-grs.info/vc/available.txt +0 -1
  72. data/test/testcases/responses/whois.afilias-grs.info/vc/registered.txt +0 -100
  73. data/test/testcases/responses/whois.afilias.info/available.txt +0 -1
  74. data/test/testcases/responses/whois.afilias.info/registered.txt +0 -104
  75. data/test/testcases/responses/whois.ai/available.txt +0 -2
  76. data/test/testcases/responses/whois.ai/registered.txt +0 -59
  77. data/test/testcases/responses/whois.arnes.si/available.txt +0 -29
  78. data/test/testcases/responses/whois.arnes.si/registered.txt +0 -55
  79. data/test/testcases/responses/whois.audns.net.au/available.txt +0 -1
  80. data/test/testcases/responses/whois.audns.net.au/registered.txt +0 -23
  81. data/test/testcases/responses/whois.biz/available.txt +0 -25
  82. data/test/testcases/responses/whois.biz/registered.txt +0 -89
  83. data/test/testcases/responses/whois.cat/available.txt +0 -18
  84. data/test/testcases/responses/whois.cat/registered.txt +0 -83
  85. data/test/testcases/responses/whois.cctld.uz/available.txt +0 -12
  86. data/test/testcases/responses/whois.cctld.uz/registered.txt +0 -123
  87. data/test/testcases/responses/whois.cira.ca/available.txt +0 -9
  88. data/test/testcases/responses/whois.cira.ca/registered.txt +0 -47
  89. data/test/testcases/responses/whois.cnnic.cn/available.txt +0 -1
  90. data/test/testcases/responses/whois.cnnic.cn/registered.txt +0 -19
  91. data/test/testcases/responses/whois.crsnic.net/MULTIPLE.txt +0 -3
  92. data/test/testcases/responses/whois.crsnic.net/available.txt +0 -43
  93. data/test/testcases/responses/whois.crsnic.net/nameservers_with_no_nameserver.txt +0 -67
  94. data/test/testcases/responses/whois.crsnic.net/registered.txt +0 -57
  95. data/test/testcases/responses/whois.crsnic.net/registered_with_multiple_entries.txt +0 -235
  96. data/test/testcases/responses/whois.denic.de/1-10-0_available.txt +0 -30
  97. data/test/testcases/responses/whois.denic.de/1-10-0_registered.txt +0 -77
  98. data/test/testcases/responses/whois.denic.de/available.txt +0 -42
  99. data/test/testcases/responses/whois.denic.de/error_invalid_domain_name.txt +0 -37
  100. data/test/testcases/responses/whois.denic.de/property_nameservers_with_ip.txt +0 -67
  101. data/test/testcases/responses/whois.denic.de/property_technical_contact.txt +0 -70
  102. data/test/testcases/responses/whois.denic.de/registered.txt +0 -70
  103. data/test/testcases/responses/whois.dk-hostmaster.dk/available.txt +0 -15
  104. data/test/testcases/responses/whois.dk-hostmaster.dk/registered.txt +0 -47
  105. data/test/testcases/responses/whois.dns.be/available.txt +0 -41
  106. data/test/testcases/responses/whois.dns.be/registered.txt +0 -66
  107. data/test/testcases/responses/whois.dns.lu/available.txt +0 -26
  108. data/test/testcases/responses/whois.dns.lu/property_nameservers_with_ip.txt +0 -55
  109. data/test/testcases/responses/whois.dns.lu/registered.txt +0 -57
  110. data/test/testcases/responses/whois.dns.pt/available.txt +0 -1
  111. data/test/testcases/responses/whois.dns.pt/registered.txt +0 -32
  112. data/test/testcases/responses/whois.domain-registry.nl/available.txt +0 -21
  113. data/test/testcases/responses/whois.domain-registry.nl/registered.txt +0 -67
  114. data/test/testcases/responses/whois.domainregistry.ie/available.txt +0 -7
  115. data/test/testcases/responses/whois.domainregistry.ie/registered.txt +0 -26
  116. data/test/testcases/responses/whois.domreg.lt/available.txt +0 -18
  117. data/test/testcases/responses/whois.domreg.lt/property_nameservers_with_ip.txt +0 -32
  118. data/test/testcases/responses/whois.domreg.lt/registered.txt +0 -37
  119. data/test/testcases/responses/whois.dot.tk/available.txt +0 -1
  120. data/test/testcases/responses/whois.dot.tk/registered.txt +0 -28
  121. data/test/testcases/responses/whois.dotmobiregistry.net/available.txt +0 -25
  122. data/test/testcases/responses/whois.dotmobiregistry.net/registered.txt +0 -81
  123. data/test/testcases/responses/whois.educause.edu/available.txt +0 -28
  124. data/test/testcases/responses/whois.educause.edu/registered.txt +0 -66
  125. data/test/testcases/responses/whois.eenet.ee/available.txt +0 -6
  126. data/test/testcases/responses/whois.eenet.ee/registered.txt +0 -27
  127. data/test/testcases/responses/whois.eu.org/available.txt +0 -1
  128. data/test/testcases/responses/whois.eu.org/registered.txt +0 -19
  129. data/test/testcases/responses/whois.eu/available.txt +0 -47
  130. data/test/testcases/responses/whois.eu/property_nameservers_with_ip.txt +0 -61
  131. data/test/testcases/responses/whois.eu/registered.txt +0 -63
  132. data/test/testcases/responses/whois.hkdnr.net.hk/available.txt +0 -1
  133. data/test/testcases/responses/whois.hkdnr.net.hk/registered.txt +0 -96
  134. data/test/testcases/responses/whois.iana.org/MULTIPLE.txt +0 -3
  135. data/test/testcases/responses/whois.iana.org/available.txt +0 -7
  136. data/test/testcases/responses/whois.iana.org/registered.txt +0 -89
  137. data/test/testcases/responses/whois.in.ua/available.txt +0 -4
  138. data/test/testcases/responses/whois.in.ua/registered.txt +0 -16
  139. data/test/testcases/responses/whois.isnic.is/available.txt +0 -7
  140. data/test/testcases/responses/whois.isnic.is/registered.txt +0 -57
  141. data/test/testcases/responses/whois.jprs.jp/jp/available.txt +0 -17
  142. data/test/testcases/responses/whois.jprs.jp/jp/registered.txt +0 -30
  143. data/test/testcases/responses/whois.jprs.jp/ne.jp/available.txt +0 -17
  144. data/test/testcases/responses/whois.jprs.jp/ne.jp/registered.txt +0 -19
  145. data/test/testcases/responses/whois.meregistry.net/available.txt +0 -1
  146. data/test/testcases/responses/whois.meregistry.net/registered.txt +0 -94
  147. data/test/testcases/responses/whois.museum/available.txt +0 -18
  148. data/test/testcases/responses/whois.museum/registered.txt +0 -92
  149. data/test/testcases/responses/whois.net.ua/available.txt +0 -7
  150. data/test/testcases/responses/whois.net.ua/property_nameservers_uppercase.txt +0 -29
  151. data/test/testcases/responses/whois.net.ua/redirect_to_whois.in.ua.txt +0 -29
  152. data/test/testcases/responses/whois.net.ua/registered.txt +0 -58
  153. data/test/testcases/responses/whois.nic-se.se/available.txt +0 -21
  154. data/test/testcases/responses/whois.nic-se.se/property_nameservers_with_ip.txt +0 -37
  155. data/test/testcases/responses/whois.nic-se.se/registered.txt +0 -37
  156. data/test/testcases/responses/whois.nic.ac/available.txt +0 -2
  157. data/test/testcases/responses/whois.nic.ac/registered.txt +0 -2
  158. data/test/testcases/responses/whois.nic.af/available.txt +0 -13
  159. data/test/testcases/responses/whois.nic.af/registered.txt +0 -56
  160. data/test/testcases/responses/whois.nic.ag/available.txt +0 -1
  161. data/test/testcases/responses/whois.nic.ag/registered.txt +0 -100
  162. data/test/testcases/responses/whois.nic.am/available.txt +0 -3
  163. data/test/testcases/responses/whois.nic.am/registered.txt +0 -42
  164. data/test/testcases/responses/whois.nic.as/available.txt +0 -12
  165. data/test/testcases/responses/whois.nic.as/registered.txt +0 -18
  166. data/test/testcases/responses/whois.nic.asia/available.txt +0 -1
  167. data/test/testcases/responses/whois.nic.asia/registered.txt +0 -159
  168. data/test/testcases/responses/whois.nic.at/available.txt +0 -25
  169. data/test/testcases/responses/whois.nic.at/registered.txt +0 -65
  170. data/test/testcases/responses/whois.nic.cc/available.txt +0 -44
  171. data/test/testcases/responses/whois.nic.cc/registered.txt +0 -58
  172. data/test/testcases/responses/whois.nic.cd/available.txt +0 -1
  173. data/test/testcases/responses/whois.nic.cd/registered.txt +0 -85
  174. data/test/testcases/responses/whois.nic.ch/available.txt +0 -2
  175. data/test/testcases/responses/whois.nic.ch/property_nameservers_with_ip.txt +0 -27
  176. data/test/testcases/responses/whois.nic.ch/registered.txt +0 -28
  177. data/test/testcases/responses/whois.nic.co/available.txt +0 -28
  178. data/test/testcases/responses/whois.nic.co/registered.txt +0 -82
  179. data/test/testcases/responses/whois.nic.coop/available.txt +0 -33
  180. data/test/testcases/responses/whois.nic.coop/registered.txt +0 -123
  181. data/test/testcases/responses/whois.nic.ec/available.txt +0 -1
  182. data/test/testcases/responses/whois.nic.ec/registered.txt +0 -40
  183. data/test/testcases/responses/whois.nic.fr/fr/available.txt +0 -19
  184. data/test/testcases/responses/whois.nic.fr/fr/registered.txt +0 -98
  185. data/test/testcases/responses/whois.nic.fr/pm/available.txt +0 -19
  186. data/test/testcases/responses/whois.nic.fr/pm/registered.txt +0 -88
  187. data/test/testcases/responses/whois.nic.fr/re/available.txt +0 -19
  188. data/test/testcases/responses/whois.nic.fr/re/registered.txt +0 -83
  189. data/test/testcases/responses/whois.nic.fr/wf/available.txt +0 -19
  190. data/test/testcases/responses/whois.nic.fr/wf/registered.txt +0 -88
  191. data/test/testcases/responses/whois.nic.fr/yt/available.txt +0 -19
  192. data/test/testcases/responses/whois.nic.fr/yt/registered.txt +0 -88
  193. data/test/testcases/responses/whois.nic.gl/available.txt +0 -23
  194. data/test/testcases/responses/whois.nic.gl/registered.txt +0 -40
  195. data/test/testcases/responses/whois.nic.gov/available.txt +0 -1
  196. data/test/testcases/responses/whois.nic.gov/registered.txt +0 -5
  197. data/test/testcases/responses/whois.nic.ht/available.txt +0 -23
  198. data/test/testcases/responses/whois.nic.ht/registered.txt +0 -59
  199. data/test/testcases/responses/whois.nic.hu/current/available.txt +0 -3
  200. data/test/testcases/responses/whois.nic.hu/current/registered.txt +0 -9
  201. data/test/testcases/responses/whois.nic.hu/v1.99/available.txt +0 -12
  202. data/test/testcases/responses/whois.nic.hu/v1.99/in_progress.txt +0 -13
  203. data/test/testcases/responses/whois.nic.hu/v1.99/property_registrant_as_company.txt +0 -65
  204. data/test/testcases/responses/whois.nic.hu/v1.99/property_registrant_as_private_person.txt +0 -58
  205. data/test/testcases/responses/whois.nic.hu/v1.99/property_registrant_without_address.txt +0 -58
  206. data/test/testcases/responses/whois.nic.hu/v1.99/registered.txt +0 -65
  207. data/test/testcases/responses/whois.nic.im/available.txt +0 -2
  208. data/test/testcases/responses/whois.nic.im/registered.txt +0 -45
  209. data/test/testcases/responses/whois.nic.io/available.txt +0 -2
  210. data/test/testcases/responses/whois.nic.io/registered.txt +0 -2
  211. data/test/testcases/responses/whois.nic.it/available.txt +0 -2
  212. data/test/testcases/responses/whois.nic.it/property_admin_contact.txt +0 -53
  213. data/test/testcases/responses/whois.nic.it/property_registrant_contact.txt +0 -58
  214. data/test/testcases/responses/whois.nic.it/property_status_active.txt +0 -53
  215. data/test/testcases/responses/whois.nic.it/property_status_available.txt +0 -2
  216. data/test/testcases/responses/whois.nic.it/property_technical_contact.txt +0 -53
  217. data/test/testcases/responses/whois.nic.it/registered.txt +0 -53
  218. data/test/testcases/responses/whois.nic.kz/available.txt +0 -4
  219. data/test/testcases/responses/whois.nic.kz/registered.txt +0 -37
  220. data/test/testcases/responses/whois.nic.la/available.txt +0 -1
  221. data/test/testcases/responses/whois.nic.la/registered.txt +0 -70
  222. data/test/testcases/responses/whois.nic.lv/available.txt +0 -7
  223. data/test/testcases/responses/whois.nic.lv/registered.txt +0 -33
  224. data/test/testcases/responses/whois.nic.ly/available.txt +0 -1
  225. data/test/testcases/responses/whois.nic.ly/registered.txt +0 -65
  226. data/test/testcases/responses/whois.nic.mu/ki/available.txt +0 -20
  227. data/test/testcases/responses/whois.nic.mu/ki/registered.txt +0 -30
  228. data/test/testcases/responses/whois.nic.mu/mu/available.txt +0 -9
  229. data/test/testcases/responses/whois.nic.mu/mu/registered.txt +0 -22
  230. data/test/testcases/responses/whois.nic.mx/available.txt +0 -11
  231. data/test/testcases/responses/whois.nic.mx/registered.txt +0 -58
  232. data/test/testcases/responses/whois.nic.name/available.txt +0 -29
  233. data/test/testcases/responses/whois.nic.name/registered.txt +0 -36
  234. data/test/testcases/responses/whois.nic.name/reserved.txt +0 -30
  235. data/test/testcases/responses/whois.nic.net.sa/available.txt +0 -5
  236. data/test/testcases/responses/whois.nic.net.sa/registered.txt +0 -17
  237. data/test/testcases/responses/whois.nic.nu/available.txt +0 -19
  238. data/test/testcases/responses/whois.nic.nu/registered.txt +0 -35
  239. data/test/testcases/responses/whois.nic.or.kr/available.txt +0 -10
  240. data/test/testcases/responses/whois.nic.or.kr/registered.txt +0 -48
  241. data/test/testcases/responses/whois.nic.org.uy/available.txt +0 -10
  242. data/test/testcases/responses/whois.nic.org.uy/registered.txt +0 -48
  243. data/test/testcases/responses/whois.nic.sn/available.txt +0 -3
  244. data/test/testcases/responses/whois.nic.sn/registered.txt +0 -14
  245. data/test/testcases/responses/whois.nic.st/available.txt +0 -1
  246. data/test/testcases/responses/whois.nic.st/registered.txt +0 -47
  247. data/test/testcases/responses/whois.nic.tel/available.txt +0 -59
  248. data/test/testcases/responses/whois.nic.tel/registered.txt +0 -111
  249. data/test/testcases/responses/whois.nic.tl/available.txt +0 -21
  250. data/test/testcases/responses/whois.nic.tl/registered.txt +0 -29
  251. data/test/testcases/responses/whois.nic.tr/available.txt +0 -1
  252. data/test/testcases/responses/whois.nic.tr/property_nameservers_with_trailing_space.txt +0 -42
  253. data/test/testcases/responses/whois.nic.tr/registered.txt +0 -48
  254. data/test/testcases/responses/whois.nic.travel/available.txt +0 -25
  255. data/test/testcases/responses/whois.nic.travel/registered.txt +0 -75
  256. data/test/testcases/responses/whois.nic.tv/available.txt +0 -44
  257. data/test/testcases/responses/whois.nic.tv/registered.txt +0 -54
  258. data/test/testcases/responses/whois.nic.uk/available.txt +0 -20
  259. data/test/testcases/responses/whois.nic.uk/invalid.txt +0 -22
  260. data/test/testcases/responses/whois.nic.uk/registered.txt +0 -50
  261. data/test/testcases/responses/whois.nic.us/available.txt +0 -29
  262. data/test/testcases/responses/whois.nic.us/registered.txt +0 -99
  263. data/test/testcases/responses/whois.nic.ve/available.txt +0 -10
  264. data/test/testcases/responses/whois.nic.ve/registered.txt +0 -48
  265. data/test/testcases/responses/whois.norid.no/available.txt +0 -5
  266. data/test/testcases/responses/whois.norid.no/registered.txt +0 -34
  267. data/test/testcases/responses/whois.pandi.or.id/available.txt +0 -9
  268. data/test/testcases/responses/whois.pandi.or.id/registered.txt +0 -33
  269. data/test/testcases/responses/whois.publicinterestregistry.net/available.txt +0 -1
  270. data/test/testcases/responses/whois.publicinterestregistry.net/registered.txt +0 -85
  271. data/test/testcases/responses/whois.publicinterestregistry.net/throttle.txt +0 -1
  272. data/test/testcases/responses/whois.register.bg/available.txt +0 -1
  273. data/test/testcases/responses/whois.register.bg/property_nameservers_with_ip.txt +0 -42
  274. data/test/testcases/responses/whois.register.bg/registered.txt +0 -44
  275. data/test/testcases/responses/whois.registro.br/available.txt +0 -22
  276. data/test/testcases/responses/whois.registro.br/registered.txt +0 -23
  277. data/test/testcases/responses/whois.registry.in/available.txt +0 -1
  278. data/test/testcases/responses/whois.registry.in/registered.txt +0 -83
  279. data/test/testcases/responses/whois.registrypro.pro/available.txt +0 -20
  280. data/test/testcases/responses/whois.registrypro.pro/registered.txt +0 -62
  281. data/test/testcases/responses/whois.ripe.net/fo/available.txt +0 -11
  282. data/test/testcases/responses/whois.ripe.net/fo/registered.txt +0 -45
  283. data/test/testcases/responses/whois.ripe.net/gm/available.txt +0 -11
  284. data/test/testcases/responses/whois.ripe.net/gm/registered.txt +0 -37
  285. data/test/testcases/responses/whois.ripe.net/mc/available.txt +0 -11
  286. data/test/testcases/responses/whois.ripe.net/mc/registered.txt +0 -36
  287. data/test/testcases/responses/whois.ripe.net/sm/available.txt +0 -11
  288. data/test/testcases/responses/whois.ripe.net/sm/registered.txt +0 -60
  289. data/test/testcases/responses/whois.ripe.net/va/available.txt +0 -11
  290. data/test/testcases/responses/whois.ripe.net/va/registered.txt +0 -48
  291. data/test/testcases/responses/whois.ripn.net/ru/available.txt +0 -9
  292. data/test/testcases/responses/whois.ripn.net/ru/property_nameservers_with_ip.txt +0 -22
  293. data/test/testcases/responses/whois.ripn.net/ru/registered.txt +0 -24
  294. data/test/testcases/responses/whois.ripn.net/su/available.txt +0 -9
  295. data/test/testcases/responses/whois.ripn.net/su/registered.txt +0 -20
  296. data/test/testcases/responses/whois.rotld.ro/available.txt +0 -16
  297. data/test/testcases/responses/whois.rotld.ro/registered.txt +0 -27
  298. data/test/testcases/responses/whois.samoanic.ws/available.txt +0 -12
  299. data/test/testcases/responses/whois.samoanic.ws/registered.txt +0 -34
  300. data/test/testcases/responses/whois.srs.net.nz/available.txt +0 -28
  301. data/test/testcases/responses/whois.srs.net.nz/invalid.txt +0 -28
  302. data/test/testcases/responses/whois.srs.net.nz/registered.txt +0 -72
  303. data/test/testcases/responses/whois.tonic.to/1.txt +0 -1
  304. data/test/testcases/responses/whois.tonic.to/available.txt +0 -2
  305. data/test/testcases/responses/whois.tonic.to/incomplete.txt +0 -1
  306. data/test/testcases/responses/whois.tonic.to/registered.txt +0 -3
  307. data/test/testcases/responses/whois.za.net/available.txt +0 -9
  308. data/test/testcases/responses/whois.za.net/registered.txt +0 -42
  309. data/test/testcases/responses/whois.za.org/available.txt +0 -9
  310. data/test/testcases/responses/whois.za.org/registered.txt +0 -44
  311. data/test/whois/answer/contact_test.rb +0 -14
  312. data/test/whois/answer/parser/base_test.rb +0 -84
  313. data/test/whois/answer/parser/blank_test.rb +0 -19
  314. data/test/whois/answer/parser/jobswhois.verisign-grs.com_test.rb +0 -161
  315. data/test/whois/answer/parser/saudinic.net.sa_test.rb +0 -12
  316. data/test/whois/answer/parser/whois.adamsnames.tc_test.rb +0 -162
  317. data/test/whois/answer/parser/whois.aeda.net.ae_test.rb +0 -63
  318. data/test/whois/answer/parser/whois.aero_test.rb +0 -84
  319. data/test/whois/answer/parser/whois.afilias-grs.info_test.rb +0 -438
  320. data/test/whois/answer/parser/whois.afilias.info_test.rb +0 -64
  321. data/test/whois/answer/parser/whois.ai_test.rb +0 -58
  322. data/test/whois/answer/parser/whois.arnes.si_test.rb +0 -72
  323. data/test/whois/answer/parser/whois.audns.net.au_test.rb +0 -70
  324. data/test/whois/answer/parser/whois.ausregistry.net.au_test.rb +0 -12
  325. data/test/whois/answer/parser/whois.biz_test.rb +0 -64
  326. data/test/whois/answer/parser/whois.cat_test.rb +0 -64
  327. data/test/whois/answer/parser/whois.cctld.uz_test.rb +0 -91
  328. data/test/whois/answer/parser/whois.cira.ca_test.rb +0 -64
  329. data/test/whois/answer/parser/whois.cnnic.cn_test.rb +0 -73
  330. data/test/whois/answer/parser/whois.cnnic.net.cn_test.rb +0 -11
  331. data/test/whois/answer/parser/whois.crsnic.net_test.rb +0 -186
  332. data/test/whois/answer/parser/whois.denic.de_test.rb +0 -414
  333. data/test/whois/answer/parser/whois.dk-hostmaster.dk_test.rb +0 -57
  334. data/test/whois/answer/parser/whois.dns.be_test.rb +0 -65
  335. data/test/whois/answer/parser/whois.dns.lu_test.rb +0 -77
  336. data/test/whois/answer/parser/whois.dns.pt_test.rb +0 -84
  337. data/test/whois/answer/parser/whois.domain-registry.nl_test.rb +0 -62
  338. data/test/whois/answer/parser/whois.domainregistry.ie_test.rb +0 -60
  339. data/test/whois/answer/parser/whois.domreg.lt_test.rb +0 -67
  340. data/test/whois/answer/parser/whois.dot.tk_test.rb +0 -77
  341. data/test/whois/answer/parser/whois.dotmobiregistry.net_test.rb +0 -64
  342. data/test/whois/answer/parser/whois.educause.edu_test.rb +0 -64
  343. data/test/whois/answer/parser/whois.eenet.ee_test.rb +0 -91
  344. data/test/whois/answer/parser/whois.eu.org_test.rb +0 -51
  345. data/test/whois/answer/parser/whois.eu_test.rb +0 -65
  346. data/test/whois/answer/parser/whois.hkdnr.net.hk_test.rb +0 -77
  347. data/test/whois/answer/parser/whois.iana.org_test.rb +0 -63
  348. data/test/whois/answer/parser/whois.in.ua_test.rb +0 -91
  349. data/test/whois/answer/parser/whois.isnic.is_test.rb +0 -62
  350. data/test/whois/answer/parser/whois.jprs.jp_test.rb +0 -165
  351. data/test/whois/answer/parser/whois.meregistry.net_test.rb +0 -64
  352. data/test/whois/answer/parser/whois.museum_test.rb +0 -64
  353. data/test/whois/answer/parser/whois.net.ua_test.rb +0 -98
  354. data/test/whois/answer/parser/whois.nic-se.se_test.rb +0 -71
  355. data/test/whois/answer/parser/whois.nic.ac_test.rb +0 -126
  356. data/test/whois/answer/parser/whois.nic.af_test.rb +0 -84
  357. data/test/whois/answer/parser/whois.nic.ag_test.rb +0 -84
  358. data/test/whois/answer/parser/whois.nic.am_test.rb +0 -84
  359. data/test/whois/answer/parser/whois.nic.as_test.rb +0 -63
  360. data/test/whois/answer/parser/whois.nic.asia_test.rb +0 -69
  361. data/test/whois/answer/parser/whois.nic.at_test.rb +0 -65
  362. data/test/whois/answer/parser/whois.nic.cc_test.rb +0 -133
  363. data/test/whois/answer/parser/whois.nic.cd_test.rb +0 -62
  364. data/test/whois/answer/parser/whois.nic.ch_test.rb +0 -65
  365. data/test/whois/answer/parser/whois.nic.co_test.rb +0 -64
  366. data/test/whois/answer/parser/whois.nic.coop_test.rb +0 -64
  367. data/test/whois/answer/parser/whois.nic.ec_test.rb +0 -98
  368. data/test/whois/answer/parser/whois.nic.fr_test.rb +0 -281
  369. data/test/whois/answer/parser/whois.nic.gl_test.rb +0 -64
  370. data/test/whois/answer/parser/whois.nic.gov_test.rb +0 -51
  371. data/test/whois/answer/parser/whois.nic.ht_test.rb +0 -98
  372. data/test/whois/answer/parser/whois.nic.hu_test.rb +0 -321
  373. data/test/whois/answer/parser/whois.nic.im_test.rb +0 -60
  374. data/test/whois/answer/parser/whois.nic.io_test.rb +0 -51
  375. data/test/whois/answer/parser/whois.nic.it_test.rb +0 -298
  376. data/test/whois/answer/parser/whois.nic.kz_test.rb +0 -91
  377. data/test/whois/answer/parser/whois.nic.la_test.rb +0 -98
  378. data/test/whois/answer/parser/whois.nic.lv_test.rb +0 -65
  379. data/test/whois/answer/parser/whois.nic.ly_test.rb +0 -64
  380. data/test/whois/answer/parser/whois.nic.mu_test.rb +0 -123
  381. data/test/whois/answer/parser/whois.nic.mx_test.rb +0 -84
  382. data/test/whois/answer/parser/whois.nic.name_test.rb +0 -51
  383. data/test/whois/answer/parser/whois.nic.net.sa_test.rb +0 -84
  384. data/test/whois/answer/parser/whois.nic.nu_test.rb +0 -59
  385. data/test/whois/answer/parser/whois.nic.or.kr_test.rb +0 -64
  386. data/test/whois/answer/parser/whois.nic.org.uy_test.rb +0 -91
  387. data/test/whois/answer/parser/whois.nic.sn_test.rb +0 -190
  388. data/test/whois/answer/parser/whois.nic.st_test.rb +0 -77
  389. data/test/whois/answer/parser/whois.nic.tel_test.rb +0 -64
  390. data/test/whois/answer/parser/whois.nic.tl_test.rb +0 -84
  391. data/test/whois/answer/parser/whois.nic.tr_test.rb +0 -98
  392. data/test/whois/answer/parser/whois.nic.travel_test.rb +0 -64
  393. data/test/whois/answer/parser/whois.nic.tv_test.rb +0 -132
  394. data/test/whois/answer/parser/whois.nic.uk_test.rb +0 -76
  395. data/test/whois/answer/parser/whois.nic.us_test.rb +0 -64
  396. data/test/whois/answer/parser/whois.nic.ve_test.rb +0 -91
  397. data/test/whois/answer/parser/whois.norid.no_test.rb +0 -49
  398. data/test/whois/answer/parser/whois.pandi.or.id_test.rb +0 -79
  399. data/test/whois/answer/parser/whois.publicinterestregistry.net_test.rb +0 -284
  400. data/test/whois/answer/parser/whois.register.bg_test.rb +0 -69
  401. data/test/whois/answer/parser/whois.registro.br_test.rb +0 -51
  402. data/test/whois/answer/parser/whois.registry.in_test.rb +0 -69
  403. data/test/whois/answer/parser/whois.registrypro.pro_test.rb +0 -84
  404. data/test/whois/answer/parser/whois.ripe.net_test.rb +0 -266
  405. data/test/whois/answer/parser/whois.ripn.net_test.rb +0 -127
  406. data/test/whois/answer/parser/whois.rotld.ro_test.rb +0 -63
  407. data/test/whois/answer/parser/whois.samoanic.ws_test.rb +0 -64
  408. data/test/whois/answer/parser/whois.srs.net.nz_test.rb +0 -79
  409. data/test/whois/answer/parser/whois.tonic.to_test.rb +0 -125
  410. data/test/whois/answer/parser/whois.za.net_test.rb +0 -62
  411. data/test/whois/answer/parser/whois.za.org_test.rb +0 -62
  412. data/test/whois/answer/parser_test.rb +0 -219
  413. data/test/whois/answer/super_struct_test.rb +0 -24
  414. data/test/whois/answer_test.rb +0 -180
  415. data/test/whois/client_test.rb +0 -96
  416. data/test/whois/errors_test.rb +0 -23
  417. data/test/whois/integration_test.rb +0 -31
  418. data/test/whois/server/adapters/afilias_test.rb +0 -37
  419. data/test/whois/server/adapters/base_test.rb +0 -15
  420. data/test/whois/server/adapters/formatted_test.rb +0 -29
  421. data/test/whois/server/adapters/none_test.rb +0 -22
  422. data/test/whois/server/adapters/not_implemented_test.rb +0 -16
  423. data/test/whois/server/adapters/pir_test.rb +0 -37
  424. data/test/whois/server/adapters/standard_test.rb +0 -36
  425. data/test/whois/server/adapters/verisign_test.rb +0 -51
  426. data/test/whois/server/adapters/web_test.rb +0 -17
  427. data/test/whois/server_test.rb +0 -105
  428. data/utils/bm_delegation_vs_inheritance.rb +0 -150
  429. data/utils/bm_shell_vs_pure.rb +0 -14
@@ -1,84 +0,0 @@
1
- require 'test_helper'
2
- require 'whois/answer/parser/whois.nic.ag'
3
-
4
- class AnswerParserWhoisNicAgTest < Whois::Answer::Parser::TestCase
5
-
6
- def setup
7
- @klass = Whois::Answer::Parser::WhoisNicAg
8
- @host = "whois.nic.ag"
9
- end
10
-
11
-
12
- def test_status
13
- parser = @klass.new(load_part('/registered.txt'))
14
- expected = ["CLIENT DELETE PROHIBITED", "CLIENT TRANSFER PROHIBITED", "CLIENT UPDATE PROHIBITED"]
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 = []
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
-
35
- def test_created_on
36
- parser = @klass.new(load_part('/registered.txt'))
37
- expected = Time.parse("2003-01-05 14:06:59 UTC")
38
- assert_equal expected, parser.created_on
39
- assert_equal expected, parser.instance_eval { @created_on }
40
-
41
- parser = @klass.new(load_part('/available.txt'))
42
- expected = nil
43
- assert_equal expected, parser.created_on
44
- assert_equal expected, parser.instance_eval { @created_on }
45
- end
46
-
47
- def test_updated_on
48
- parser = @klass.new(load_part('/registered.txt'))
49
- expected = Time.parse("2009-12-09 19:28:04 UTC")
50
- assert_equal expected, parser.updated_on
51
- assert_equal expected, parser.instance_eval { @updated_on }
52
-
53
- parser = @klass.new(load_part('/available.txt'))
54
- expected = nil
55
- assert_equal expected, parser.updated_on
56
- assert_equal expected, parser.instance_eval { @updated_on }
57
- end
58
-
59
- def test_expires_on
60
- parser = @klass.new(load_part('/registered.txt'))
61
- expected = Time.parse("2011-01-05 14:06:59 UTC")
62
- assert_equal expected, parser.expires_on
63
- assert_equal expected, parser.instance_eval { @expires_on }
64
-
65
- parser = @klass.new(load_part('/available.txt'))
66
- expected = nil
67
- assert_equal expected, parser.expires_on
68
- assert_equal expected, parser.instance_eval { @expires_on }
69
- end
70
-
71
-
72
- def test_nameservers
73
- parser = @klass.new(load_part('/registered.txt'))
74
- expected = %w( ns1.google.com ns2.google.com ns3.google.com ns4.google.com )
75
- assert_equal expected, parser.nameservers
76
- assert_equal expected, parser.instance_eval { @nameservers }
77
-
78
- parser = @klass.new(load_part('/available.txt'))
79
- expected = %w()
80
- assert_equal expected, parser.nameservers
81
- assert_equal expected, parser.instance_eval { @nameservers }
82
- end
83
-
84
- end
@@ -1,84 +0,0 @@
1
- require 'test_helper'
2
- require 'whois/answer/parser/whois.nic.am'
3
-
4
- class AnswerParserWhoisNicAmTest < Whois::Answer::Parser::TestCase
5
-
6
- def setup
7
- @klass = Whois::Answer::Parser::WhoisNicAm
8
- @host = "whois.nic.am"
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
-
35
- def test_created_on
36
- parser = @klass.new(load_part('/registered.txt'))
37
- expected = Time.parse("1999-06-05")
38
- assert_equal expected, parser.created_on
39
- assert_equal expected, parser.instance_eval { @created_on }
40
-
41
- parser = @klass.new(load_part('/available.txt'))
42
- expected = nil
43
- assert_equal expected, parser.created_on
44
- assert_equal expected, parser.instance_eval { @created_on }
45
- end
46
-
47
- def test_updated_on
48
- parser = @klass.new(load_part('/registered.txt'))
49
- expected = Time.parse("2010-03-16")
50
- assert_equal expected, parser.updated_on
51
- assert_equal expected, parser.instance_eval { @updated_on }
52
-
53
- parser = @klass.new(load_part('/available.txt'))
54
- expected = nil
55
- assert_equal expected, parser.updated_on
56
- assert_equal expected, parser.instance_eval { @updated_on }
57
- end
58
-
59
- def test_expires_on
60
- parser = @klass.new(load_part('/registered.txt'))
61
- expected = Time.parse("2011-04-15")
62
- assert_equal expected, parser.expires_on
63
- assert_equal expected, parser.instance_eval { @expires_on }
64
-
65
- parser = @klass.new(load_part('/available.txt'))
66
- expected = nil
67
- assert_equal expected, parser.expires_on
68
- assert_equal expected, parser.instance_eval { @expires_on }
69
- end
70
-
71
-
72
- def test_nameservers
73
- parser = @klass.new(load_part('/registered.txt'))
74
- expected = %w( ns1.google.com ns2.google.com ns3.google.com ns4.google.com )
75
- assert_equal expected, parser.nameservers
76
- assert_equal expected, parser.instance_eval { @nameservers }
77
-
78
- parser = @klass.new(load_part('/available.txt'))
79
- expected = %w()
80
- assert_equal expected, parser.nameservers
81
- assert_equal expected, parser.instance_eval { @nameservers }
82
- end
83
-
84
- end
@@ -1,63 +0,0 @@
1
- require 'test_helper'
2
- require 'whois/answer/parser/whois.nic.as'
3
-
4
- class AnswerParserWhoisNicAsTest < Whois::Answer::Parser::TestCase
5
-
6
- def setup
7
- @klass = Whois::Answer::Parser::WhoisNicAs
8
- @host = "whois.nic.as"
9
- end
10
-
11
-
12
- def test_status
13
- parser = @klass.new(load_part('/registered.txt'))
14
- expected = :registered
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 = :available
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
-
35
- def test_created_on
36
- assert_raise(Whois::PropertyNotSupported) { @klass.new(load_part('/registered.txt')).created_on }
37
- assert_raise(Whois::PropertyNotSupported) { @klass.new(load_part('/available.txt')).created_on }
38
- end
39
-
40
- def test_updated_on
41
- assert_raise(Whois::PropertyNotSupported) { @klass.new(load_part('/registered.txt')).updated_on }
42
- assert_raise(Whois::PropertyNotSupported) { @klass.new(load_part('/available.txt')).updated_on }
43
- end
44
-
45
- def test_expires_on
46
- assert_raise(Whois::PropertyNotSupported) { @klass.new(load_part('/registered.txt')).expires_on }
47
- assert_raise(Whois::PropertyNotSupported) { @klass.new(load_part('/available.txt')).expires_on }
48
- end
49
-
50
-
51
- def test_nameservers
52
- parser = @klass.new(load_part('/registered.txt'))
53
- expected = %w( ns1.google.com ns2.google.com ns3.google.com ns4.google.com )
54
- assert_equal expected, parser.nameservers
55
- assert_equal expected, parser.instance_eval { @nameservers }
56
-
57
- parser = @klass.new(load_part('/available.txt'))
58
- expected = %w()
59
- assert_equal expected, parser.nameservers
60
- assert_equal expected, parser.instance_eval { @nameservers }
61
- end
62
-
63
- end
@@ -1,69 +0,0 @@
1
- require 'test_helper'
2
- require 'whois/answer/parser/whois.nic.asia'
3
-
4
- class AnswerParserWhoisNicAsiaTest < Whois::Answer::Parser::TestCase
5
-
6
- def setup
7
- @klass = Whois::Answer::Parser::WhoisNicAsia
8
- @host = "whois.nic.asia"
9
- end
10
-
11
-
12
- def test_status
13
- parser = @klass.new(load_part('/registered.txt'))
14
- expected = "OK"
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
-
35
- def test_created_on
36
- assert_equal Time.parse("2008-01-15 11:28:02 UTC"),
37
- @klass.new(load_part('/registered.txt')).created_on
38
- assert_equal nil,
39
- @klass.new(load_part('/available.txt')).created_on
40
- end
41
-
42
- def test_updated_on
43
- assert_equal Time.parse("2008-03-16 04:30:25 UTC"),
44
- @klass.new(load_part('/registered.txt')).updated_on
45
- assert_equal nil,
46
- @klass.new(load_part('/available.txt')).updated_on
47
- end
48
-
49
- def test_expires_on
50
- assert_equal Time.parse("2010-01-15 11:28:02 UTC"),
51
- @klass.new(load_part('/registered.txt')).expires_on
52
- assert_equal nil,
53
- @klass.new(load_part('/available.txt')).expires_on
54
- end
55
-
56
-
57
- def test_nameservers
58
- parser = @klass.new(load_part('/registered.txt'))
59
- expected = %w( ns1.dotasia.org ns2.dotasia.org )
60
- assert_equal expected, parser.nameservers
61
- assert_equal expected, parser.instance_eval { @nameservers }
62
-
63
- parser = @klass.new(load_part('/available.txt'))
64
- expected = %w()
65
- assert_equal expected, parser.nameservers
66
- assert_equal expected, parser.instance_eval { @nameservers }
67
- end
68
-
69
- end
@@ -1,65 +0,0 @@
1
- require 'test_helper'
2
- require 'whois/answer/parser/whois.nic.at'
3
-
4
- class AnswerParserWhoisNicAtTest < Whois::Answer::Parser::TestCase
5
-
6
- def setup
7
- @klass = Whois::Answer::Parser::WhoisNicAt
8
- @host = "whois.nic.at"
9
- end
10
-
11
-
12
- def test_status
13
- assert_equal :registered,
14
- @klass.new(load_part('/registered.txt')).status
15
- assert_equal :available,
16
- @klass.new(load_part('/available.txt')).status
17
- end
18
-
19
- def test_available?
20
- assert !@klass.new(load_part('/registered.txt')).available?
21
- assert @klass.new(load_part('/available.txt')).available?
22
- end
23
-
24
- def test_registered?
25
- assert @klass.new(load_part('/registered.txt')).registered?
26
- assert !@klass.new(load_part('/available.txt')).registered?
27
- end
28
-
29
-
30
- def test_created_on
31
- assert_raise(Whois::PropertyNotSupported) { @klass.new(load_part('/registered.txt')).created_on }
32
- assert_raise(Whois::PropertyNotSupported) { @klass.new(load_part('/available.txt')).created_on }
33
- end
34
-
35
- def test_updated_on
36
- parser = @klass.new(load_part('/registered.txt'))
37
- expected = Time.parse("2006-10-04 14:57:26")
38
- assert_equal expected, parser.updated_on
39
- assert_equal expected, parser.instance_eval { @updated_on }
40
-
41
- parser = @klass.new(load_part('/available.txt'))
42
- expected = nil
43
- assert_equal expected, parser.updated_on
44
- assert_equal expected, parser.instance_eval { @updated_on }
45
- end
46
-
47
- def test_expires_on
48
- assert_raise(Whois::PropertyNotSupported) { @klass.new(load_part('/registered.txt')).expires_on }
49
- assert_raise(Whois::PropertyNotSupported) { @klass.new(load_part('/available.txt')).expires_on }
50
- end
51
-
52
-
53
- def test_nameservers
54
- parser = @klass.new(load_part('/registered.txt'))
55
- expected = %w( ns1.google.com ns2.google.com ns3.google.com ns4.google.com )
56
- assert_equal expected, parser.nameservers
57
- assert_equal expected, parser.instance_eval { @nameservers }
58
-
59
- parser = @klass.new(load_part('/available.txt'))
60
- expected = %w()
61
- assert_equal expected, parser.nameservers
62
- assert_equal expected, parser.instance_eval { @nameservers }
63
- end
64
-
65
- end
@@ -1,133 +0,0 @@
1
- require 'test_helper'
2
- require 'whois/answer/parser/whois.nic.cc'
3
-
4
- class AnswerParserWhoisNicCcTest < Whois::Answer::Parser::TestCase
5
-
6
- def setup
7
- @klass = Whois::Answer::Parser::WhoisNicCc
8
- @host = "whois.nic.cc"
9
- end
10
-
11
-
12
- def test_disclaimer
13
- expected = <<-EOS.strip
14
- TERMS OF USE: You are not authorized to access or query our Whois \
15
- database through the use of electronic processes that are high-volume and \
16
- automated except as reasonably necessary to register domain names or \
17
- modify existing registrations; the Data in VeriSign's ("VeriSign") Whois \
18
- database is provided by VeriSign for information purposes only, and to \
19
- assist persons in obtaining information about or related to a domain name \
20
- registration record. VeriSign does not guarantee its accuracy. \
21
- By submitting a Whois query, you agree to abide by the following terms of \
22
- use: You agree that you may use this Data only for lawful purposes and that \
23
- under no circumstances will you use this Data to: (1) allow, enable, or \
24
- otherwise support the transmission of mass unsolicited, commercial \
25
- advertising or solicitations via e-mail, telephone, or facsimile; or \
26
- (2) enable high volume, automated, electronic processes that apply to \
27
- VeriSign (or its computer systems). The compilation, repackaging, \
28
- dissemination or other use of this Data is expressly prohibited without \
29
- the prior written consent of VeriSign. You agree not to use electronic \
30
- processes that are automated and high-volume to access or query the \
31
- Whois database except as reasonably necessary to register domain names \
32
- or modify existing registrations. VeriSign reserves the right to restrict \
33
- your access to the Whois database in its sole discretion to ensure \
34
- operational stability. VeriSign may restrict or terminate your access to the \
35
- Whois database for failure to abide by these terms of use. VeriSign \
36
- reserves the right to modify these terms at any time.
37
- EOS
38
- assert_equal expected,
39
- @klass.new(load_part('/registered.txt')).disclaimer
40
- assert_equal expected,
41
- @klass.new(load_part('/available.txt')).disclaimer
42
- end
43
-
44
-
45
- def test_domain
46
- assert_equal "google.cc",
47
- @klass.new(load_part('/registered.txt')).domain
48
- assert_equal "u34jedzcq.cc",
49
- @klass.new(load_part('/available.txt')).domain
50
- end
51
-
52
- def test_domain_id
53
- assert_raise(Whois::PropertyNotSupported) { @klass.new(load_part('/registered.txt')).domain_id }
54
- assert_raise(Whois::PropertyNotSupported) { @klass.new(load_part('/available.txt')).domain_id }
55
- end
56
-
57
-
58
- def test_referral_whois
59
- assert_equal "whois.markmonitor.com",
60
- @klass.new(load_part('/registered.txt')).referral_whois
61
- assert_equal nil,
62
- @klass.new(load_part('/available.txt')).referral_whois
63
- end
64
-
65
- def test_referral_url
66
- assert_equal "http://www.markmonitor.com",
67
- @klass.new(load_part('/registered.txt')).referral_url
68
- assert_equal nil,
69
- @klass.new(load_part('/available.txt')).referral_url
70
- end
71
-
72
-
73
- def test_status
74
- assert_equal ["CLIENT-XFER-PROHIBITED", "CLIENT-UPDATE-PROHIBITED", "CLIENT-DELETE-PROHIBITED"],
75
- @klass.new(load_part('/registered.txt')).status
76
- assert_equal nil,
77
- @klass.new(load_part('/available.txt')).status
78
- end
79
-
80
- def test_available?
81
- assert !@klass.new(load_part('/registered.txt')).available?
82
- assert @klass.new(load_part('/available.txt')).available?
83
- end
84
-
85
- def test_registered?
86
- assert @klass.new(load_part('/registered.txt')).registered?
87
- assert !@klass.new(load_part('/available.txt')).registered?
88
- end
89
-
90
-
91
- def test_created_on
92
- assert_equal Time.parse("1999-06-07"),
93
- @klass.new(load_part('/registered.txt')).created_on
94
- assert_equal nil,
95
- @klass.new(load_part('/available.txt')).created_on
96
- end
97
-
98
- def test_updated_on
99
- assert_equal Time.parse("2009-05-06"),
100
- @klass.new(load_part('/registered.txt')).updated_on
101
- assert_equal nil,
102
- @klass.new(load_part('/available.txt')).updated_on
103
- end
104
-
105
- def test_expires_on
106
- assert_equal Time.parse("2010-06-07"),
107
- @klass.new(load_part('/registered.txt')).expires_on
108
- assert_equal nil,
109
- @klass.new(load_part('/available.txt')).expires_on
110
- end
111
-
112
-
113
- def test_registrar
114
- assert_equal nil,
115
- @klass.new(load_part('/registered.txt')).registrar
116
- assert_equal nil,
117
- @klass.new(load_part('/available.txt')).registrar
118
- end
119
-
120
-
121
- def test_nameservers
122
- parser = @klass.new(load_part('/registered.txt'))
123
- expected = %w( ns2.google.com ns1.google.com ns4.google.com ns3.google.com )
124
- assert_equal expected, parser.nameservers
125
- assert_equal expected, parser.instance_eval { @nameservers }
126
-
127
- parser = @klass.new(load_part('/available.txt'))
128
- expected = %w()
129
- assert_equal expected, parser.nameservers
130
- assert_equal expected, parser.instance_eval { @nameservers }
131
- end
132
-
133
- end