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,64 +0,0 @@
1
- require 'test_helper'
2
- require 'whois/answer/parser/whois.museum'
3
-
4
- class AnswerParserWhoisMuseumTest < Whois::Answer::Parser::TestCase
5
-
6
- def setup
7
- @klass = Whois::Answer::Parser::WhoisMuseum
8
- @host = "whois.museum"
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_equal Time.parse("2001-11-10 15:23:42 GMT"),
32
- @klass.new(load_part('/registered.txt')).created_on
33
- assert_equal nil,
34
- @klass.new(load_part('/available.txt')).created_on
35
- end
36
-
37
- def test_updated_on
38
- assert_equal Time.parse("2002-04-04 17:48:43 GMT"),
39
- @klass.new(load_part('/registered.txt')).updated_on
40
- assert_equal nil,
41
- @klass.new(load_part('/available.txt')).updated_on
42
- end
43
-
44
- def test_expires_on
45
- assert_equal Time.parse("2003-07-31 11:00:00 GMT"),
46
- @klass.new(load_part('/registered.txt')).expires_on
47
- assert_equal nil,
48
- @klass.new(load_part('/available.txt')).expires_on
49
- end
50
-
51
-
52
- def test_nameservers
53
- parser = @klass.new(load_part('/registered.txt'))
54
- expected = %w( nic.frd.se nic.museum )
55
- assert_equal expected, parser.nameservers
56
- assert_equal expected, parser.instance_eval { @nameservers }
57
-
58
- parser = @klass.new(load_part('/available.txt'))
59
- expected = %w()
60
- assert_equal expected, parser.nameservers
61
- assert_equal expected, parser.instance_eval { @nameservers }
62
- end
63
-
64
- end
@@ -1,98 +0,0 @@
1
- require 'test_helper'
2
- require 'whois/answer/parser/whois.net.ua'
3
-
4
- class AnswerParserWhoisNetUaTest < Whois::Answer::Parser::TestCase
5
-
6
- def setup
7
- @klass = Whois::Answer::Parser::WhoisNetUa
8
- @host = "whois.net.ua"
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
- parser = @klass.new(load_part('/registered.txt'))
26
- expected = false
27
- assert_equal expected, parser.available?
28
- assert_equal expected, parser.instance_eval { @available }
29
-
30
- parser = @klass.new(load_part('/available.txt'))
31
- expected = true
32
- assert_equal expected, parser.available?
33
- assert_equal expected, parser.instance_eval { @available }
34
- end
35
-
36
- def test_registered?
37
- parser = @klass.new(load_part('/registered.txt'))
38
- expected = true
39
- assert_equal expected, parser.registered?
40
- assert_equal expected, parser.instance_eval { @registered }
41
-
42
- parser = @klass.new(load_part('/available.txt'))
43
- expected = false
44
- assert_equal expected, parser.registered?
45
- assert_equal expected, parser.instance_eval { @registered }
46
- end
47
-
48
-
49
- def test_created_on
50
- assert_raise(Whois::PropertyNotSupported) { @klass.new(load_part('/registered.txt')).created_on }
51
- assert_raise(Whois::PropertyNotSupported) { @klass.new(load_part('/available.txt')).created_on }
52
- end
53
-
54
- def test_updated_on
55
- parser = @klass.new(load_part('/registered.txt'))
56
- expected = Time.utc(2009, 12, 01, 12, 10, 41)
57
- assert_equal expected, parser.updated_on
58
- assert_equal expected, parser.instance_eval { @updated_on }
59
-
60
- parser = @klass.new(load_part('/available.txt'))
61
- expected = nil
62
- assert_equal expected, parser.updated_on
63
- assert_equal expected, parser.instance_eval { @updated_on }
64
- end
65
-
66
- def test_expires_on
67
- parser = @klass.new(load_part('/registered.txt'))
68
- expected = Time.utc(2010, 12, 04)
69
- assert_equal expected, parser.expires_on
70
- assert_equal expected, parser.instance_eval { @expires_on }
71
-
72
- parser = @klass.new(load_part('/available.txt'))
73
- expected = nil
74
- assert_equal expected, parser.expires_on
75
- assert_equal expected, parser.instance_eval { @expires_on }
76
- end
77
-
78
-
79
- def test_nameservers
80
- parser = @klass.new(load_part('/registered.txt'))
81
- expected = %w( ns2.google.com ns4.google.com ns3.google.com ns1.google.com )
82
- assert_equal expected, parser.nameservers
83
- assert_equal expected, parser.instance_eval { @nameservers }
84
-
85
- parser = @klass.new(load_part('/available.txt'))
86
- expected = %w()
87
- assert_equal expected, parser.nameservers
88
- assert_equal expected, parser.instance_eval { @nameservers }
89
- end
90
-
91
- def test_nameservers_uppercase
92
- parser = @klass.new(load_part('/property_nameservers_uppercase.txt'))
93
- expected = %w( ns10.uadns.com ns11.uadns.com ns12.uadns.com )
94
- assert_equal expected, parser.nameservers
95
- assert_equal expected, parser.instance_eval { @nameservers }
96
- end
97
-
98
- end
@@ -1,71 +0,0 @@
1
- require 'test_helper'
2
- require 'whois/answer/parser/whois.nic-se.se'
3
-
4
- class AnswerParserWhoisNicSeSeTest < Whois::Answer::Parser::TestCase
5
-
6
- def setup
7
- @klass = Whois::Answer::Parser::WhoisNicSeSe
8
- @host = "whois.nic-se.se"
9
- end
10
-
11
-
12
- def test_status
13
- assert_equal :active,
14
- @klass.new(load_part('/registered.txt')).status
15
- assert_equal nil,
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_equal Time.parse("2008-10-20"),
32
- @klass.new(load_part('/registered.txt')).created_on
33
- assert_equal nil,
34
- @klass.new(load_part('/available.txt')).created_on
35
- end
36
-
37
- def test_updated_on
38
- assert_equal Time.parse("2009-08-01"),
39
- @klass.new(load_part('/registered.txt')).updated_on
40
- assert_equal nil,
41
- @klass.new(load_part('/available.txt')).updated_on
42
- end
43
-
44
- def test_expires_on
45
- assert_equal Time.parse("2010-10-20"),
46
- @klass.new(load_part('/registered.txt')).expires_on
47
- assert_equal nil,
48
- @klass.new(load_part('/available.txt')).expires_on
49
- end
50
-
51
-
52
- def test_nameservers
53
- parser = @klass.new(load_part('/registered.txt'))
54
- expected = %w( ns1.google.com ns2.google.com ns3.google.com ns4.google.com )
55
- assert_equal expected, parser.nameservers
56
- assert_equal expected, parser.instance_eval { @nameservers }
57
-
58
- parser = @klass.new(load_part('/available.txt'))
59
- expected = %w()
60
- assert_equal expected, parser.nameservers
61
- assert_equal expected, parser.instance_eval { @nameservers }
62
- end
63
-
64
- def test_nameservers_with_ip
65
- parser = @klass.new(load_part('/property_nameservers_with_ip.txt'))
66
- expected = %w( ns2.loopia.se ns4.loopia.se ns3.loopia.se ns1.loopia.se )
67
- assert_equal expected, parser.nameservers
68
- assert_equal expected, parser.instance_eval { @nameservers }
69
- end
70
-
71
- end
@@ -1,126 +0,0 @@
1
- require 'test_helper'
2
- require 'whois/answer/parser/whois.nic.ac'
3
-
4
- class AnswerParserWhoisNicAcTest < Whois::Answer::Parser::TestCase
5
-
6
- def setup
7
- @klass = Whois::Answer::Parser::WhoisNicAc
8
- @host = "whois.nic.ac"
9
- end
10
-
11
-
12
- def test_domain
13
- parser = @klass.new(load_part('/registered.txt'))
14
- expected = "google.ac"
15
- assert_equal expected, parser.domain
16
- assert_equal expected, parser.instance_eval { @domain }
17
-
18
- parser = @klass.new(load_part('/available.txt'))
19
- expected = "u34jedzcq.ac"
20
- assert_equal expected, parser.domain
21
- assert_equal expected, parser.instance_eval { @domain }
22
- end
23
-
24
- def test_domain_id
25
- assert_raise(Whois::PropertyNotSupported) { @klass.new(load_part('/registered.txt')).domain_id }
26
- assert_raise(Whois::PropertyNotSupported) { @klass.new(load_part('/available.txt')).domain_id }
27
- end
28
-
29
-
30
- def test_status
31
- parser = @klass.new(load_part('/registered.txt'))
32
- expected = :registered
33
- assert_equal expected, parser.status
34
- assert_equal expected, parser.instance_eval { @status }
35
-
36
- parser = @klass.new(load_part('/available.txt'))
37
- expected = :available
38
- assert_equal expected, parser.status
39
- assert_equal expected, parser.instance_eval { @status }
40
- end
41
-
42
- def test_available?
43
- assert !@klass.new(load_part('/registered.txt')).available?
44
- assert @klass.new(load_part('/available.txt')).available?
45
- end
46
-
47
- def test_registered?
48
- assert @klass.new(load_part('/registered.txt')).registered?
49
- assert !@klass.new(load_part('/available.txt')).registered?
50
- end
51
-
52
-
53
- def test_created_on
54
- assert_raise(Whois::PropertyNotSupported) { @klass.new(load_part('/registered.txt')).created_on }
55
- assert_raise(Whois::PropertyNotSupported) { @klass.new(load_part('/available.txt')).created_on }
56
- end
57
-
58
- def test_updated_on
59
- assert_raise(Whois::PropertyNotSupported) { @klass.new(load_part('/registered.txt')).updated_on }
60
- assert_raise(Whois::PropertyNotSupported) { @klass.new(load_part('/available.txt')).updated_on }
61
- end
62
-
63
- def test_expires_on
64
- assert_raise(Whois::PropertyNotSupported) { @klass.new(load_part('/registered.txt')).expires_on }
65
- assert_raise(Whois::PropertyNotSupported) { @klass.new(load_part('/available.txt')).expires_on }
66
- end
67
-
68
-
69
- def test_registrar
70
- assert_raise(Whois::PropertyNotSupported) { @klass.new(load_part('/registered.txt')).registrar }
71
- assert_raise(Whois::PropertyNotSupported) { @klass.new(load_part('/available.txt')).registrar }
72
- end
73
-
74
- def test_registrant_contact
75
- assert_raise(Whois::PropertyNotSupported) { @klass.new(load_part('/registered.txt')).registrant_contact }
76
- assert_raise(Whois::PropertyNotSupported) { @klass.new(load_part('/available.txt')).registrant_contact }
77
- end
78
-
79
- def test_admin_contact
80
- assert_raise(Whois::PropertyNotSupported) { @klass.new(load_part('/registered.txt')).admin_contact }
81
- assert_raise(Whois::PropertyNotSupported) { @klass.new(load_part('/available.txt')).admin_contact }
82
- end
83
-
84
- def test_technical_contact
85
- assert_raise(Whois::PropertyNotSupported) { @klass.new(load_part('/registered.txt')).technical_contact }
86
- assert_raise(Whois::PropertyNotSupported) { @klass.new(load_part('/available.txt')).technical_contact }
87
- end
88
-
89
-
90
- def test_nameservers
91
- assert_raise(Whois::PropertyNotSupported) { @klass.new(load_part('/registered.txt')).nameservers }
92
- assert_raise(Whois::PropertyNotSupported) { @klass.new(load_part('/available.txt')).nameservers }
93
- end
94
-
95
-
96
- def test_changed?
97
- parser_r1 = @klass.new(load_part('/registered.txt'))
98
- parser_r2 = @klass.new(load_part('/registered.txt'))
99
- parser_a1 = @klass.new(load_part('/available.txt'))
100
- parser_a2 = @klass.new(load_part('/available.txt'))
101
-
102
- assert !parser_r1.changed?(parser_r1)
103
- assert !parser_r1.changed?(parser_r2)
104
- assert parser_r1.changed?(parser_a1)
105
-
106
- assert !parser_a1.changed?(parser_a1)
107
- assert !parser_a1.changed?(parser_a2)
108
- assert parser_a1.changed?(parser_r1)
109
- end
110
-
111
- def test_unchanged?
112
- parser_r1 = @klass.new(load_part('/registered.txt'))
113
- parser_r2 = @klass.new(load_part('/registered.txt'))
114
- parser_a1 = @klass.new(load_part('/available.txt'))
115
- parser_a2 = @klass.new(load_part('/available.txt'))
116
-
117
- assert parser_r1.unchanged?(parser_r1)
118
- assert parser_r1.unchanged?(parser_r2)
119
- assert !parser_r1.unchanged?(parser_a1)
120
-
121
- assert parser_a1.unchanged?(parser_a1)
122
- assert parser_a1.unchanged?(parser_a2)
123
- assert !parser_a1.unchanged?(parser_r1)
124
- end
125
-
126
- end
@@ -1,84 +0,0 @@
1
- require 'test_helper'
2
- require 'whois/answer/parser/whois.nic.af'
3
-
4
- class AnswerParserWhoisNicAfTest < Whois::Answer::Parser::TestCase
5
-
6
- def setup
7
- @klass = Whois::Answer::Parser::WhoisNicAf
8
- @host = "whois.nic.af"
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 = "Not Registered"
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("2009-10-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-01-29")
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("2010-05-05")
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 )
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