whois 2.0.7 → 2.1.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (224) hide show
  1. data/CHANGELOG.rdoc +84 -10
  2. data/Rakefile +0 -7
  3. data/lib/core_ext.rb +9 -45
  4. data/lib/core_ext/array/extract_options.rb +29 -0
  5. data/lib/core_ext/array/wrap.rb +48 -0
  6. data/lib/core_ext/class/attribute.rb +115 -0
  7. data/lib/core_ext/date_time/conversions.rb +15 -0
  8. data/lib/core_ext/kernel/singleton_class.rb +13 -0
  9. data/lib/core_ext/module/remove_method.rb +16 -0
  10. data/lib/whois.rb +0 -4
  11. data/lib/whois/definitions/tlds.rb +10 -5
  12. data/lib/whois/record.rb +0 -3
  13. data/lib/whois/record/parser.rb +3 -3
  14. data/lib/whois/record/parser/NOTES.txt +15 -8
  15. data/lib/whois/record/parser/base.rb +12 -35
  16. data/lib/whois/record/parser/base_afilias.rb +156 -0
  17. data/lib/whois/record/parser/example.rb +8 -4
  18. data/lib/whois/record/parser/jobswhois.verisign-grs.com.rb +2 -2
  19. data/lib/whois/record/parser/scanners/afilias.rb +13 -4
  20. data/lib/whois/record/parser/{features → scanners}/ast.rb +1 -1
  21. data/lib/whois/record/parser/scanners/base.rb +9 -0
  22. data/lib/whois/record/parser/scanners/cnnic.rb +2 -2
  23. data/lib/whois/record/parser/scanners/{whoisbiz.rb → whois.biz.rb} +2 -8
  24. data/lib/whois/record/parser/scanners/whois.denic.de.rb +117 -0
  25. data/lib/whois/record/parser/scanners/whois.nic.hu.rb +187 -0
  26. data/lib/whois/record/parser/scanners/{whoisit.rb → whois.nic.it.rb} +2 -2
  27. data/lib/whois/record/parser/scanners/whois.registry.qa.rb +54 -0
  28. data/lib/whois/record/parser/scanners/whois.tld.ee.rb +41 -0
  29. data/lib/whois/record/parser/whois.aero.rb +8 -46
  30. data/lib/whois/record/parser/whois.afilias-grs.info.rb +2 -51
  31. data/lib/whois/record/parser/whois.afilias.info.rb +2 -126
  32. data/lib/whois/record/parser/whois.biz.rb +6 -6
  33. data/lib/whois/record/parser/whois.cnnic.cn.rb +5 -5
  34. data/lib/whois/record/parser/whois.crsnic.net.rb +2 -2
  35. data/lib/whois/record/parser/whois.denic.de.rb +8 -105
  36. data/lib/whois/record/parser/whois.dotmobiregistry.net.rb +2 -51
  37. data/lib/whois/record/parser/whois.godaddy.com.rb +138 -0
  38. data/lib/whois/record/parser/whois.iana.org.rb +2 -2
  39. data/lib/whois/record/parser/whois.markmonitor.com.rb +13 -12
  40. data/lib/whois/record/parser/whois.meregistry.net.rb +45 -30
  41. data/lib/whois/record/parser/whois.nic.af.rb +6 -2
  42. data/lib/whois/record/parser/whois.nic.ag.rb +2 -51
  43. data/lib/whois/record/parser/whois.nic.asia.rb +47 -38
  44. data/lib/whois/record/parser/whois.nic.cc.rb +2 -2
  45. data/lib/whois/record/parser/whois.nic.hu.rb +7 -174
  46. data/lib/whois/record/parser/whois.nic.it.rb +6 -6
  47. data/lib/whois/record/parser/whois.nic.name.rb +1 -5
  48. data/lib/whois/record/parser/whois.nic.travel.rb +4 -12
  49. data/lib/whois/record/parser/whois.nic.tv.rb +2 -2
  50. data/lib/whois/record/parser/whois.nic.us.rb +4 -4
  51. data/lib/whois/record/parser/whois.nic.xxx.rb +5 -112
  52. data/lib/whois/record/parser/whois.publicinterestregistry.net.rb +8 -168
  53. data/lib/whois/record/parser/whois.registry.in.rb +2 -60
  54. data/lib/whois/record/parser/whois.registry.qa.rb +117 -0
  55. data/lib/whois/record/parser/whois.ripn.net.rb +4 -84
  56. data/lib/whois/record/parser/whois.sgnic.sg.rb +13 -5
  57. data/lib/whois/record/parser/whois.tcinet.ru.rb +102 -0
  58. data/lib/whois/record/parser/whois.tld.ee.rb +5 -26
  59. data/lib/whois/record/parser/whois.tonic.to.rb +0 -8
  60. data/lib/whois/server/adapters/base.rb +23 -10
  61. data/lib/whois/version.rb +2 -2
  62. data/spec/fixtures/responses/FIND.txt +1 -0
  63. data/spec/fixtures/responses/whois.aero/status_available.expected +35 -1
  64. data/spec/fixtures/responses/whois.aero/status_registered.expected +77 -1
  65. data/spec/fixtures/responses/whois.afilias-grs.info/bz/status_available.expected +34 -0
  66. data/spec/fixtures/responses/whois.afilias-grs.info/bz/status_registered.expected +39 -2
  67. data/spec/fixtures/responses/whois.afilias-grs.info/bz/status_registered.txt +2 -82
  68. data/spec/fixtures/responses/whois.afilias-grs.info/gi/status_available.expected +34 -0
  69. data/spec/fixtures/responses/whois.afilias-grs.info/gi/status_registered.expected +76 -0
  70. data/spec/fixtures/responses/whois.afilias-grs.info/hn/status_available.expected +34 -0
  71. data/spec/fixtures/responses/whois.afilias-grs.info/hn/status_registered.expected +76 -0
  72. data/spec/fixtures/responses/whois.afilias-grs.info/lc/status_available.expected +34 -0
  73. data/spec/fixtures/responses/whois.afilias-grs.info/lc/status_registered.expected +76 -0
  74. data/spec/fixtures/responses/whois.afilias-grs.info/mn/status_available.expected +34 -0
  75. data/spec/fixtures/responses/whois.afilias-grs.info/mn/status_registered.expected +76 -0
  76. data/spec/fixtures/responses/whois.afilias-grs.info/sc/status_available.expected +57 -0
  77. data/spec/fixtures/responses/whois.afilias-grs.info/sc/status_registered.expected +76 -0
  78. data/spec/fixtures/responses/whois.afilias-grs.info/vc/status_available.expected +34 -0
  79. data/spec/fixtures/responses/whois.afilias-grs.info/vc/status_registered.expected +76 -0
  80. data/spec/fixtures/responses/whois.dotmobiregistry.net/status_available.expected +35 -0
  81. data/spec/fixtures/responses/whois.dotmobiregistry.net/status_available.txt +1 -25
  82. data/spec/fixtures/responses/whois.dotmobiregistry.net/status_registered.expected +76 -0
  83. data/spec/fixtures/responses/whois.educause.edu/{properties_updated_on_unknown.expected → property_updated_on_unknown.expected} +0 -0
  84. data/spec/fixtures/responses/whois.educause.edu/{properties_updated_on_unknown.txt → property_updated_on_unknown.txt} +0 -0
  85. data/spec/fixtures/responses/whois.godaddy.com/status_registered.expected +87 -0
  86. data/spec/fixtures/responses/whois.godaddy.com/status_registered.txt +60 -0
  87. data/spec/fixtures/responses/whois.markmonitor.com/{properties_empty_contacts.expected → property_contacts_are_blank.expected} +0 -0
  88. data/spec/fixtures/responses/whois.markmonitor.com/{properties_empty_contacts.txt → property_contacts_are_blank.txt} +0 -0
  89. data/spec/fixtures/responses/whois.meregistry.net/{property_nameservers_is_missing.expected → property_nameservers_is_blank.expected} +0 -0
  90. data/spec/fixtures/responses/whois.meregistry.net/{property_nameservers_is_missing.txt → property_nameservers_is_blank.txt} +0 -0
  91. data/spec/fixtures/responses/whois.meregistry.net/status_available.expected +34 -0
  92. data/spec/fixtures/responses/whois.meregistry.net/status_registered.expected +77 -0
  93. data/spec/fixtures/responses/whois.meregistry.net/status_registered.txt +1 -1
  94. data/spec/fixtures/responses/{whois.nic.asia/property_status_client_delete_prohibited.expected → whois.nic.af/property_status_active.expected} +0 -0
  95. data/spec/fixtures/responses/whois.nic.af/property_status_active.txt +56 -0
  96. data/spec/fixtures/responses/{whois.nic.asia/property_status_client_transfer_prohibited.expected → whois.nic.af/property_status_delegated.expected} +0 -0
  97. data/spec/fixtures/responses/whois.nic.af/property_status_delegated.txt +46 -0
  98. data/spec/fixtures/responses/whois.nic.af/property_status_not_registered.expected +8 -0
  99. data/spec/fixtures/responses/whois.nic.af/property_status_not_registered.txt +13 -0
  100. data/spec/fixtures/responses/whois.nic.ag/status_available.expected +34 -0
  101. data/spec/fixtures/responses/whois.nic.ag/status_registered.expected +76 -0
  102. data/spec/fixtures/responses/whois.nic.asia/property_status_multiple.expected +8 -0
  103. data/spec/fixtures/responses/whois.nic.asia/{property_status_client_delete_prohibited.txt → property_status_multiple.txt} +0 -0
  104. data/spec/fixtures/responses/whois.nic.asia/property_status_single.expected +8 -0
  105. data/spec/fixtures/responses/whois.nic.asia/{property_status_client_transfer_prohibited.txt → property_status_single.txt} +76 -76
  106. data/spec/fixtures/responses/whois.nic.asia/status_available.expected +35 -1
  107. data/spec/fixtures/responses/whois.nic.asia/status_registered.expected +78 -1
  108. data/spec/fixtures/responses/whois.nic.dz/{status_available.expected → dz/status_available.expected} +0 -0
  109. data/spec/fixtures/responses/whois.nic.dz/{status_available.txt → dz/status_available.txt} +0 -0
  110. data/spec/fixtures/responses/whois.nic.dz/{status_registered.expected → dz/status_registered.expected} +0 -0
  111. data/spec/fixtures/responses/whois.nic.dz/{status_registered.txt → dz/status_registered.txt} +0 -0
  112. data/spec/fixtures/responses/whois.nic.name/status_available.expected +1 -1
  113. data/spec/fixtures/responses/whois.nic.name/status_registered.expected +1 -1
  114. data/spec/fixtures/responses/whois.nic.travel/property_status_multiple.expected +2 -0
  115. data/spec/fixtures/responses/whois.nic.travel/property_status_multiple.txt +83 -0
  116. data/spec/fixtures/responses/whois.nic.travel/property_status_single.expected +2 -0
  117. data/spec/fixtures/responses/whois.nic.travel/property_status_single.txt +75 -0
  118. data/spec/fixtures/responses/whois.nic.travel/status_available.expected +1 -1
  119. data/spec/fixtures/responses/whois.nic.travel/status_registered.expected +1 -1
  120. data/spec/fixtures/responses/whois.nic.xxx/property_updated_on_blank.expected +2 -0
  121. data/spec/fixtures/responses/whois.nic.xxx/property_updated_on_blank.txt +98 -0
  122. data/spec/fixtures/responses/whois.nic.xxx/status_registered.expected +45 -46
  123. data/spec/fixtures/responses/whois.nic.xxx/status_registered.txt +61 -61
  124. data/spec/fixtures/responses/whois.publicinterestregistry.net/status_available.expected +1 -1
  125. data/spec/fixtures/responses/whois.publicinterestregistry.net/status_registered.expected +8 -1
  126. data/spec/fixtures/responses/whois.registry.in/property_status_missing.expected +1 -1
  127. data/spec/fixtures/responses/whois.registry.in/property_status_multiple.expected +1 -1
  128. data/spec/fixtures/responses/whois.registry.in/property_status_ok.expected +1 -1
  129. data/spec/fixtures/responses/whois.registry.in/status_available.expected +31 -1
  130. data/spec/fixtures/responses/whois.registry.in/status_registered.expected +70 -1
  131. data/spec/fixtures/responses/whois.registry.qa/qa/status_available.expected +56 -0
  132. data/spec/fixtures/responses/whois.registry.qa/qa/status_available.txt +1 -0
  133. data/spec/fixtures/responses/whois.registry.qa/qa/status_registered.expected +91 -0
  134. data/spec/fixtures/responses/whois.registry.qa/qa/status_registered.txt +23 -0
  135. data/spec/fixtures/responses/whois.sgnic.sg/property_nameservers_schema_1_with_ip.expected +12 -0
  136. data/spec/fixtures/responses/whois.sgnic.sg/property_nameservers_schema_1_with_ip.txt +94 -0
  137. data/spec/fixtures/responses/{whois.ripn.net → whois.tcinet.ru}/ru/property_nameservers_with_ip.expected +0 -0
  138. data/spec/fixtures/responses/{whois.ripn.net → whois.tcinet.ru}/ru/property_nameservers_with_ip.txt +0 -0
  139. data/spec/fixtures/responses/{whois.ripn.net → whois.tcinet.ru}/ru/status_available.expected +0 -0
  140. data/spec/fixtures/responses/{whois.ripn.net → whois.tcinet.ru}/ru/status_available.txt +0 -0
  141. data/spec/fixtures/responses/{whois.ripn.net → whois.tcinet.ru}/ru/status_registered.expected +0 -0
  142. data/spec/fixtures/responses/{whois.ripn.net → whois.tcinet.ru}/ru/status_registered.txt +0 -0
  143. data/spec/fixtures/responses/{whois.ripn.net → whois.tcinet.ru}/su/status_available.expected +0 -0
  144. data/spec/fixtures/responses/{whois.ripn.net → whois.tcinet.ru}/su/status_available.txt +0 -0
  145. data/spec/fixtures/responses/{whois.ripn.net → whois.tcinet.ru}/su/status_registered.expected +0 -0
  146. data/spec/fixtures/responses/{whois.ripn.net → whois.tcinet.ru}/su/status_registered.txt +0 -0
  147. data/spec/fixtures/responses/{whois.ripn.net → whois.tcinet.ru}/xn--p1ai/status_available.expected +0 -0
  148. data/spec/fixtures/responses/{whois.ripn.net → whois.tcinet.ru}/xn--p1ai/status_available.txt +0 -0
  149. data/spec/fixtures/responses/{whois.ripn.net → whois.tcinet.ru}/xn--p1ai/status_registered.expected +0 -0
  150. data/spec/fixtures/responses/{whois.ripn.net → whois.tcinet.ru}/xn--p1ai/status_registered.txt +0 -0
  151. data/spec/integration_spec.rb +29 -12
  152. data/spec/support/helpers/spec_helper.rb +0 -10
  153. data/spec/tlds +1 -1
  154. data/spec/whois/record/parser/base_spec.rb +23 -51
  155. data/spec/whois/record/parser/responses/whois.aero/status_available_spec.rb +49 -1
  156. data/spec/whois/record/parser/responses/whois.aero/status_registered_spec.rb +91 -1
  157. data/spec/whois/record/parser/responses/whois.afilias-grs.info/bz/status_available_spec.rb +48 -0
  158. data/spec/whois/record/parser/responses/whois.afilias-grs.info/bz/status_registered_spec.rb +53 -2
  159. data/spec/whois/record/parser/responses/whois.afilias-grs.info/gi/status_available_spec.rb +48 -0
  160. data/spec/whois/record/parser/responses/whois.afilias-grs.info/gi/status_registered_spec.rb +90 -0
  161. data/spec/whois/record/parser/responses/whois.afilias-grs.info/hn/status_available_spec.rb +48 -0
  162. data/spec/whois/record/parser/responses/whois.afilias-grs.info/hn/status_registered_spec.rb +90 -0
  163. data/spec/whois/record/parser/responses/whois.afilias-grs.info/lc/status_available_spec.rb +48 -0
  164. data/spec/whois/record/parser/responses/whois.afilias-grs.info/lc/status_registered_spec.rb +90 -0
  165. data/spec/whois/record/parser/responses/whois.afilias-grs.info/mn/status_available_spec.rb +48 -0
  166. data/spec/whois/record/parser/responses/whois.afilias-grs.info/mn/status_registered_spec.rb +90 -0
  167. data/spec/whois/record/parser/responses/whois.afilias-grs.info/sc/status_available_spec.rb +48 -0
  168. data/spec/whois/record/parser/responses/whois.afilias-grs.info/sc/status_registered_spec.rb +90 -0
  169. data/spec/whois/record/parser/responses/whois.afilias-grs.info/vc/status_available_spec.rb +48 -0
  170. data/spec/whois/record/parser/responses/whois.afilias-grs.info/vc/status_registered_spec.rb +90 -0
  171. data/spec/whois/record/parser/responses/whois.dotmobiregistry.net/status_available_spec.rb +48 -0
  172. data/spec/whois/record/parser/responses/whois.dotmobiregistry.net/status_registered_spec.rb +90 -0
  173. data/spec/whois/record/parser/responses/whois.educause.edu/{properties_updated_on_unknown_spec.rb → property_updated_on_unknown_spec.rb} +3 -3
  174. data/spec/whois/record/parser/responses/whois.godaddy.com/status_registered_spec.rb +131 -0
  175. data/spec/whois/record/parser/responses/whois.markmonitor.com/{properties_empty_contacts_spec.rb → property_contacts_are_blank_spec.rb} +3 -3
  176. data/spec/whois/record/parser/responses/whois.meregistry.net/{property_nameservers_is_missing_spec.rb → property_nameservers_is_blank_spec.rb} +3 -3
  177. data/spec/whois/record/parser/responses/whois.meregistry.net/status_available_spec.rb +48 -0
  178. data/spec/whois/record/parser/responses/whois.meregistry.net/status_registered_spec.rb +91 -0
  179. data/spec/whois/record/parser/responses/whois.nic.af/property_status_active_spec.rb +39 -0
  180. data/spec/whois/record/parser/responses/whois.nic.af/property_status_delegated_spec.rb +39 -0
  181. data/spec/whois/record/parser/responses/whois.nic.af/property_status_not_registered_spec.rb +39 -0
  182. data/spec/whois/record/parser/responses/whois.nic.ag/status_available_spec.rb +48 -0
  183. data/spec/whois/record/parser/responses/whois.nic.ag/status_registered_spec.rb +90 -0
  184. data/spec/whois/record/parser/responses/whois.nic.asia/{property_status_client_delete_prohibited_spec.rb → property_status_multiple_spec.rb} +4 -4
  185. data/spec/whois/record/parser/responses/whois.nic.asia/{property_status_client_transfer_prohibited_spec.rb → property_status_single_spec.rb} +4 -4
  186. data/spec/whois/record/parser/responses/whois.nic.asia/status_available_spec.rb +49 -1
  187. data/spec/whois/record/parser/responses/whois.nic.asia/status_registered_spec.rb +92 -1
  188. data/spec/whois/record/parser/responses/whois.nic.dz/{status_available_spec.rb → dz/status_available_spec.rb} +2 -2
  189. data/spec/whois/record/parser/responses/whois.nic.dz/{status_registered_spec.rb → dz/status_registered_spec.rb} +2 -2
  190. data/spec/whois/record/parser/responses/whois.nic.name/status_available_spec.rb +1 -1
  191. data/spec/whois/record/parser/responses/whois.nic.name/status_registered_spec.rb +1 -1
  192. data/spec/whois/record/parser/responses/whois.nic.travel/property_status_multiple_spec.rb +29 -0
  193. data/spec/whois/record/parser/responses/whois.nic.travel/property_status_single_spec.rb +29 -0
  194. data/spec/whois/record/parser/responses/whois.nic.travel/status_available_spec.rb +1 -1
  195. data/spec/whois/record/parser/responses/whois.nic.travel/status_registered_spec.rb +1 -1
  196. data/spec/whois/record/parser/responses/whois.nic.xxx/property_updated_on_blank_spec.rb +29 -0
  197. data/spec/whois/record/parser/responses/whois.nic.xxx/status_registered_spec.rb +45 -46
  198. data/spec/whois/record/parser/responses/whois.publicinterestregistry.net/status_available_spec.rb +1 -1
  199. data/spec/whois/record/parser/responses/whois.publicinterestregistry.net/status_registered_spec.rb +11 -1
  200. data/spec/whois/record/parser/responses/whois.registry.in/property_status_missing_spec.rb +1 -1
  201. data/spec/whois/record/parser/responses/whois.registry.in/property_status_multiple_spec.rb +1 -1
  202. data/spec/whois/record/parser/responses/whois.registry.in/property_status_ok_spec.rb +1 -1
  203. data/spec/whois/record/parser/responses/whois.registry.in/status_available_spec.rb +44 -1
  204. data/spec/whois/record/parser/responses/whois.registry.in/status_registered_spec.rb +83 -1
  205. data/spec/whois/record/parser/responses/whois.registry.qa/qa/status_available_spec.rb +107 -0
  206. data/spec/whois/record/parser/responses/whois.registry.qa/qa/status_registered_spec.rb +142 -0
  207. data/spec/whois/record/parser/responses/whois.sgnic.sg/property_nameservers_schema_1_with_ip_spec.rb +39 -0
  208. data/spec/whois/record/parser/responses/{whois.ripn.net → whois.tcinet.ru}/ru/property_nameservers_with_ip_spec.rb +4 -4
  209. data/spec/whois/record/parser/responses/{whois.ripn.net/su → whois.tcinet.ru/ru}/status_available_spec.rb +4 -4
  210. data/spec/whois/record/parser/responses/{whois.ripn.net → whois.tcinet.ru}/ru/status_registered_spec.rb +4 -4
  211. data/spec/whois/record/parser/responses/{whois.ripn.net/ru → whois.tcinet.ru/su}/status_available_spec.rb +4 -4
  212. data/spec/whois/record/parser/responses/{whois.ripn.net → whois.tcinet.ru}/su/status_registered_spec.rb +4 -4
  213. data/spec/whois/record/parser/responses/{whois.ripn.net → whois.tcinet.ru}/xn--p1ai/status_available_spec.rb +4 -4
  214. data/spec/whois/record/parser/responses/{whois.ripn.net → whois.tcinet.ru}/xn--p1ai/status_registered_spec.rb +4 -4
  215. data/spec/whois/record_spec.rb +4 -4
  216. data/spec/whois/server/adapters/afilias_spec.rb +3 -3
  217. data/spec/whois/server/adapters/base_spec.rb +50 -10
  218. data/spec/whois/server/adapters/formatted_spec.rb +4 -4
  219. data/spec/whois/server/adapters/pir_spec.rb +3 -3
  220. data/spec/whois/server/adapters/standard_spec.rb +4 -4
  221. data/spec/whois/server/adapters/verisign_spec.rb +7 -7
  222. data/whois.gemspec +4 -4
  223. metadata +101 -57
  224. data/lib/whois/answer.rb +0 -14
@@ -38,7 +38,7 @@ describe Whois::Record::Parser::WhoisPublicinterestregistryNet, "status_availabl
38
38
  end
39
39
  describe "#status" do
40
40
  it do
41
- @parser.status.should == nil
41
+ @parser.status.should == []
42
42
  end
43
43
  end
44
44
  describe "#available?" do
@@ -36,6 +36,16 @@ describe Whois::Record::Parser::WhoisPublicinterestregistryNet, "status_register
36
36
  @parser.domain_id.should == "D2244233-LROR"
37
37
  end
38
38
  end
39
+ describe "#referral_whois" do
40
+ it do
41
+ lambda { @parser.referral_whois }.should raise_error(Whois::PropertyNotSupported)
42
+ end
43
+ end
44
+ describe "#referral_url" do
45
+ it do
46
+ lambda { @parser.referral_url }.should raise_error(Whois::PropertyNotSupported)
47
+ end
48
+ end
39
49
  describe "#status" do
40
50
  it do
41
51
  @parser.status.should == ["CLIENT DELETE PROHIBITED", "CLIENT TRANSFER PROHIBITED", "CLIENT UPDATE PROHIBITED"]
@@ -74,7 +84,7 @@ describe Whois::Record::Parser::WhoisPublicinterestregistryNet, "status_register
74
84
  @parser.registrar.should be_a(_registrar)
75
85
  @parser.registrar.id.should == "R37-LROR"
76
86
  @parser.registrar.name.should == "MarkMonitor Inc."
77
- @parser.registrar.organization.should == nil
87
+ @parser.registrar.organization.should == "MarkMonitor Inc."
78
88
  @parser.registrar.url.should == nil
79
89
  end
80
90
  end
@@ -23,7 +23,7 @@ describe Whois::Record::Parser::WhoisRegistryIn, "property_status_missing.expect
23
23
 
24
24
  describe "#status" do
25
25
  it do
26
- @parser.status.should == nil
26
+ @parser.status.should == []
27
27
  end
28
28
  end
29
29
  end
@@ -23,7 +23,7 @@ describe Whois::Record::Parser::WhoisRegistryIn, "property_status_multiple.expec
23
23
 
24
24
  describe "#status" do
25
25
  it do
26
- @parser.status.should == [ "client delete prohibited", "client renew prohibited", "client transfer prohibited", "client update prohibited" ]
26
+ @parser.status.should == ["CLIENT DELETE PROHIBITED", "CLIENT RENEW PROHIBITED", "CLIENT TRANSFER PROHIBITED", "CLIENT UPDATE PROHIBITED"]
27
27
  end
28
28
  end
29
29
  end
@@ -23,7 +23,7 @@ describe Whois::Record::Parser::WhoisRegistryIn, "property_status_ok.expected" d
23
23
 
24
24
  describe "#status" do
25
25
  it do
26
- @parser.status.should == %w( ok )
26
+ @parser.status.should == ["OK"]
27
27
  end
28
28
  end
29
29
  end
@@ -21,9 +21,34 @@ describe Whois::Record::Parser::WhoisRegistryIn, "status_available.expected" do
21
21
  @parser = klass.new(part)
22
22
  end
23
23
 
24
+ describe "#disclaimer" do
25
+ it do
26
+ @parser.disclaimer.should == nil
27
+ end
28
+ end
29
+ describe "#domain" do
30
+ it do
31
+ @parser.domain.should == nil
32
+ end
33
+ end
34
+ describe "#domain_id" do
35
+ it do
36
+ @parser.domain_id.should == nil
37
+ end
38
+ end
39
+ describe "#referral_whois" do
40
+ it do
41
+ lambda { @parser.referral_whois }.should raise_error(Whois::PropertyNotSupported)
42
+ end
43
+ end
44
+ describe "#referral_url" do
45
+ it do
46
+ lambda { @parser.referral_url }.should raise_error(Whois::PropertyNotSupported)
47
+ end
48
+ end
24
49
  describe "#status" do
25
50
  it do
26
- @parser.status.should == nil
51
+ @parser.status.should == []
27
52
  end
28
53
  end
29
54
  describe "#available?" do
@@ -56,6 +81,24 @@ describe Whois::Record::Parser::WhoisRegistryIn, "status_available.expected" do
56
81
  @parser.registrar.should == nil
57
82
  end
58
83
  end
84
+ describe "#registrant_contacts" do
85
+ it do
86
+ @parser.registrant_contacts.should be_a(Array)
87
+ @parser.registrant_contacts.should == []
88
+ end
89
+ end
90
+ describe "#admin_contacts" do
91
+ it do
92
+ @parser.admin_contacts.should be_a(Array)
93
+ @parser.admin_contacts.should == []
94
+ end
95
+ end
96
+ describe "#technical_contacts" do
97
+ it do
98
+ @parser.technical_contacts.should be_a(Array)
99
+ @parser.technical_contacts.should == []
100
+ end
101
+ end
59
102
  describe "#nameservers" do
60
103
  it do
61
104
  @parser.nameservers.should be_a(Array)
@@ -21,9 +21,34 @@ describe Whois::Record::Parser::WhoisRegistryIn, "status_registered.expected" do
21
21
  @parser = klass.new(part)
22
22
  end
23
23
 
24
+ describe "#disclaimer" do
25
+ it do
26
+ @parser.disclaimer.should == "Access to .IN WHOIS information is provided to assist persons in determining the contents of a domain name registration record in the .IN registry database. The data in this record is provided by .IN Registry for informational purposes only, and .IN does not guarantee its accuracy. This service is intended only for query-based access. You agree that you will use this data only for lawful purposes and that, under no circumstances will you use this data to: (a) allow, enable, or otherwise support the transmission by e-mail, telephone, or facsimile of mass unsolicited, commercial advertising or solicitations to entities other than the data recipient's own existing customers; or (b) enable high volume, automated, electronic processes that send queries or data to the systems of Registry Operator, a Registrar, or Afilias except as reasonably necessary to register domain names or modify existing registrations. All rights reserved. .IN reserves the right to modify these terms at any time. By submitting this query, you agree to abide by this policy."
27
+ end
28
+ end
29
+ describe "#domain" do
30
+ it do
31
+ @parser.domain.should == "google.in"
32
+ end
33
+ end
34
+ describe "#domain_id" do
35
+ it do
36
+ @parser.domain_id.should == "D21089-AFIN"
37
+ end
38
+ end
39
+ describe "#referral_whois" do
40
+ it do
41
+ lambda { @parser.referral_whois }.should raise_error(Whois::PropertyNotSupported)
42
+ end
43
+ end
44
+ describe "#referral_url" do
45
+ it do
46
+ lambda { @parser.referral_url }.should raise_error(Whois::PropertyNotSupported)
47
+ end
48
+ end
24
49
  describe "#status" do
25
50
  it do
26
- @parser.status.should == %w( ok )
51
+ @parser.status.should == ["OK"]
27
52
  end
28
53
  end
29
54
  describe "#available?" do
@@ -58,6 +83,63 @@ describe Whois::Record::Parser::WhoisRegistryIn, "status_registered.expected" do
58
83
  @parser.registrar.name.should == "Mark Monitor"
59
84
  end
60
85
  end
86
+ describe "#registrant_contacts" do
87
+ it do
88
+ @parser.registrant_contacts.should be_a(Array)
89
+ @parser.registrant_contacts.should have(1).items
90
+ @parser.registrant_contacts[0].should be_a(_contact)
91
+ @parser.registrant_contacts[0].type.should == Whois::Record::Contact::TYPE_REGISTRANT
92
+ @parser.registrant_contacts[0].id.should == "EPPIPM-143349"
93
+ @parser.registrant_contacts[0].name.should == "Admin DNS"
94
+ @parser.registrant_contacts[0].organization.should == "GOOGLE INC."
95
+ @parser.registrant_contacts[0].address.should == "1600 Amphitheatre Parkway"
96
+ @parser.registrant_contacts[0].city.should == "Mountain View, CA"
97
+ @parser.registrant_contacts[0].zip.should == "94043"
98
+ @parser.registrant_contacts[0].state.should == ""
99
+ @parser.registrant_contacts[0].country_code.should == "US"
100
+ @parser.registrant_contacts[0].phone.should == "+1.6503300100"
101
+ @parser.registrant_contacts[0].fax.should == ""
102
+ @parser.registrant_contacts[0].email.should == "dns-admin@google.com"
103
+ end
104
+ end
105
+ describe "#admin_contacts" do
106
+ it do
107
+ @parser.admin_contacts.should be_a(Array)
108
+ @parser.admin_contacts.should have(1).items
109
+ @parser.admin_contacts[0].should be_a(_contact)
110
+ @parser.admin_contacts[0].type.should == Whois::Record::Contact::TYPE_ADMIN
111
+ @parser.admin_contacts[0].id.should == "EPPIPM-143349"
112
+ @parser.admin_contacts[0].name.should == "Admin DNS"
113
+ @parser.admin_contacts[0].organization.should == "GOOGLE INC."
114
+ @parser.admin_contacts[0].address.should == "1600 Amphitheatre Parkway"
115
+ @parser.admin_contacts[0].city.should == "Mountain View, CA"
116
+ @parser.admin_contacts[0].zip.should == "94043"
117
+ @parser.admin_contacts[0].state.should == ""
118
+ @parser.admin_contacts[0].country_code.should == "US"
119
+ @parser.admin_contacts[0].phone.should == "+1.6503300100"
120
+ @parser.admin_contacts[0].fax.should == ""
121
+ @parser.admin_contacts[0].email.should == "dns-admin@google.com"
122
+ end
123
+ end
124
+ describe "#technical_contacts" do
125
+ it do
126
+ @parser.technical_contacts.should be_a(Array)
127
+ @parser.technical_contacts.should have(1).items
128
+ @parser.technical_contacts[0].should be_a(_contact)
129
+ @parser.technical_contacts[0].type.should == Whois::Record::Contact::TYPE_TECHNICAL
130
+ @parser.technical_contacts[0].id.should == "EPPIPM-143349"
131
+ @parser.technical_contacts[0].name.should == "Admin DNS"
132
+ @parser.technical_contacts[0].organization.should == "GOOGLE INC."
133
+ @parser.technical_contacts[0].address.should == "1600 Amphitheatre Parkway"
134
+ @parser.technical_contacts[0].city.should == "Mountain View, CA"
135
+ @parser.technical_contacts[0].zip.should == "94043"
136
+ @parser.technical_contacts[0].state.should == ""
137
+ @parser.technical_contacts[0].country_code.should == "US"
138
+ @parser.technical_contacts[0].phone.should == "+1.6503300100"
139
+ @parser.technical_contacts[0].fax.should == ""
140
+ @parser.technical_contacts[0].email.should == "dns-admin@google.com"
141
+ end
142
+ end
61
143
  describe "#nameservers" do
62
144
  it do
63
145
  @parser.nameservers.should be_a(Array)
@@ -0,0 +1,107 @@
1
+ # encoding: utf-8
2
+
3
+ # This file is autogenerated. Do not edit it manually.
4
+ # If you want change the content of this file, edit
5
+ #
6
+ # /spec/fixtures/responses/whois.registry.qa/qa/status_available.expected
7
+ #
8
+ # and regenerate the tests with the following rake task
9
+ #
10
+ # $ rake genspec:parsers
11
+ #
12
+
13
+ require 'spec_helper'
14
+ require 'whois/record/parser/whois.registry.qa.rb'
15
+
16
+ describe Whois::Record::Parser::WhoisRegistryQa, "status_available.expected" do
17
+
18
+ before(:each) do
19
+ file = fixture("responses", "whois.registry.qa/qa/status_available.txt")
20
+ part = Whois::Record::Part.new(:body => File.read(file))
21
+ @parser = klass.new(part)
22
+ end
23
+
24
+ describe "#disclaimer" do
25
+ it do
26
+ lambda { @parser.disclaimer }.should raise_error(Whois::PropertyNotSupported)
27
+ end
28
+ end
29
+ describe "#domain" do
30
+ it do
31
+ @parser.domain.should == nil
32
+ end
33
+ end
34
+ describe "#domain_id" do
35
+ it do
36
+ lambda { @parser.domain_id }.should raise_error(Whois::PropertyNotSupported)
37
+ end
38
+ end
39
+ describe "#referral_whois" do
40
+ it do
41
+ lambda { @parser.referral_whois }.should raise_error(Whois::PropertyNotSupported)
42
+ end
43
+ end
44
+ describe "#referral_url" do
45
+ it do
46
+ lambda { @parser.referral_url }.should raise_error(Whois::PropertyNotSupported)
47
+ end
48
+ end
49
+ describe "#status" do
50
+ it do
51
+ @parser.status.should == []
52
+ end
53
+ end
54
+ describe "#available?" do
55
+ it do
56
+ @parser.available?.should == true
57
+ end
58
+ end
59
+ describe "#registered?" do
60
+ it do
61
+ @parser.registered?.should == false
62
+ end
63
+ end
64
+ describe "#created_on" do
65
+ it do
66
+ lambda { @parser.created_on }.should raise_error(Whois::PropertyNotSupported)
67
+ end
68
+ end
69
+ describe "#updated_on" do
70
+ it do
71
+ lambda { @parser.updated_on }.should raise_error(Whois::PropertyNotSupported)
72
+ end
73
+ end
74
+ describe "#expires_on" do
75
+ it do
76
+ lambda { @parser.expires_on }.should raise_error(Whois::PropertyNotSupported)
77
+ end
78
+ end
79
+ describe "#registrar" do
80
+ it do
81
+ @parser.registrar.should == nil
82
+ end
83
+ end
84
+ describe "#registrant_contacts" do
85
+ it do
86
+ @parser.registrant_contacts.should be_a(Array)
87
+ @parser.registrant_contacts.should == []
88
+ end
89
+ end
90
+ describe "#admin_contacts" do
91
+ it do
92
+ lambda { @parser.admin_contacts }.should raise_error(Whois::PropertyNotSupported)
93
+ end
94
+ end
95
+ describe "#technical_contacts" do
96
+ it do
97
+ @parser.technical_contacts.should be_a(Array)
98
+ @parser.technical_contacts.should == []
99
+ end
100
+ end
101
+ describe "#nameservers" do
102
+ it do
103
+ @parser.nameservers.should be_a(Array)
104
+ @parser.nameservers.should == []
105
+ end
106
+ end
107
+ end
@@ -0,0 +1,142 @@
1
+ # encoding: utf-8
2
+
3
+ # This file is autogenerated. Do not edit it manually.
4
+ # If you want change the content of this file, edit
5
+ #
6
+ # /spec/fixtures/responses/whois.registry.qa/qa/status_registered.expected
7
+ #
8
+ # and regenerate the tests with the following rake task
9
+ #
10
+ # $ rake genspec:parsers
11
+ #
12
+
13
+ require 'spec_helper'
14
+ require 'whois/record/parser/whois.registry.qa.rb'
15
+
16
+ describe Whois::Record::Parser::WhoisRegistryQa, "status_registered.expected" do
17
+
18
+ before(:each) do
19
+ file = fixture("responses", "whois.registry.qa/qa/status_registered.txt")
20
+ part = Whois::Record::Part.new(:body => File.read(file))
21
+ @parser = klass.new(part)
22
+ end
23
+
24
+ describe "#disclaimer" do
25
+ it do
26
+ lambda { @parser.disclaimer }.should raise_error(Whois::PropertyNotSupported)
27
+ end
28
+ end
29
+ describe "#domain" do
30
+ it do
31
+ @parser.domain.should == "qtel.com.qa"
32
+ end
33
+ end
34
+ describe "#domain_id" do
35
+ it do
36
+ lambda { @parser.domain_id }.should raise_error(Whois::PropertyNotSupported)
37
+ end
38
+ end
39
+ describe "#referral_whois" do
40
+ it do
41
+ lambda { @parser.referral_whois }.should raise_error(Whois::PropertyNotSupported)
42
+ end
43
+ end
44
+ describe "#referral_url" do
45
+ it do
46
+ lambda { @parser.referral_url }.should raise_error(Whois::PropertyNotSupported)
47
+ end
48
+ end
49
+ describe "#status" do
50
+ it do
51
+ @parser.status.should == ["serverDeleteProhibited (Legacy)", "serverRenewProhibited (Legacy)", "serverTransferProhibited (Legacy)"]
52
+ end
53
+ end
54
+ describe "#available?" do
55
+ it do
56
+ @parser.available?.should == false
57
+ end
58
+ end
59
+ describe "#registered?" do
60
+ it do
61
+ @parser.registered?.should == true
62
+ end
63
+ end
64
+ describe "#created_on" do
65
+ it do
66
+ lambda { @parser.created_on }.should raise_error(Whois::PropertyNotSupported)
67
+ end
68
+ end
69
+ describe "#updated_on" do
70
+ it do
71
+ lambda { @parser.updated_on }.should raise_error(Whois::PropertyNotSupported)
72
+ end
73
+ end
74
+ describe "#expires_on" do
75
+ it do
76
+ lambda { @parser.expires_on }.should raise_error(Whois::PropertyNotSupported)
77
+ end
78
+ end
79
+ describe "#registrar" do
80
+ it do
81
+ @parser.registrar.should be_a(_registrar)
82
+ @parser.registrar.id.should == "QatarTelecom"
83
+ @parser.registrar.name.should == "Qatar Telecom (Qtel) Q. S. C"
84
+ @parser.registrar.organization.should == "Qatar Telecom (Qtel) Q. S. C"
85
+ end
86
+ end
87
+ describe "#registrant_contacts" do
88
+ it do
89
+ @parser.registrant_contacts.should be_a(Array)
90
+ @parser.registrant_contacts.should have(1).items
91
+ @parser.registrant_contacts[0].should be_a(_contact)
92
+ @parser.registrant_contacts[0].type.should == Whois::Record::Contact::TYPE_REGISTRANT
93
+ @parser.registrant_contacts[0].id.should == "QT11734"
94
+ @parser.registrant_contacts[0].name.should == "DNS Administrator - Qtel Internet Services"
95
+ @parser.registrant_contacts[0].organization.should == nil
96
+ @parser.registrant_contacts[0].address.should == nil
97
+ @parser.registrant_contacts[0].city.should == nil
98
+ @parser.registrant_contacts[0].zip.should == nil
99
+ @parser.registrant_contacts[0].state.should == nil
100
+ @parser.registrant_contacts[0].country_code.should == nil
101
+ @parser.registrant_contacts[0].phone.should == nil
102
+ @parser.registrant_contacts[0].fax.should == nil
103
+ @parser.registrant_contacts[0].email.should == "Visit portal.registry.qa for Web based WhoIs"
104
+ end
105
+ end
106
+ describe "#admin_contacts" do
107
+ it do
108
+ lambda { @parser.admin_contacts }.should raise_error(Whois::PropertyNotSupported)
109
+ end
110
+ end
111
+ describe "#technical_contacts" do
112
+ it do
113
+ @parser.technical_contacts.should be_a(Array)
114
+ @parser.technical_contacts.should have(1).items
115
+ @parser.technical_contacts[0].should be_a(_contact)
116
+ @parser.technical_contacts[0].type.should == Whois::Record::Contact::TYPE_TECHNICAL
117
+ @parser.technical_contacts[0].id.should == "QT11734"
118
+ @parser.technical_contacts[0].name.should == "DNS Administrator - Qtel Internet Services"
119
+ @parser.technical_contacts[0].organization.should == nil
120
+ @parser.technical_contacts[0].address.should == nil
121
+ @parser.technical_contacts[0].city.should == nil
122
+ @parser.technical_contacts[0].zip.should == nil
123
+ @parser.technical_contacts[0].state.should == nil
124
+ @parser.technical_contacts[0].country_code.should == nil
125
+ @parser.technical_contacts[0].phone.should == nil
126
+ @parser.technical_contacts[0].fax.should == nil
127
+ @parser.technical_contacts[0].email.should == "Visit portal.registry.qa for Web based WhoIs"
128
+ end
129
+ end
130
+ describe "#nameservers" do
131
+ it do
132
+ @parser.nameservers.should be_a(Array)
133
+ @parser.nameservers.should have(2).items
134
+ @parser.nameservers[0].should be_a(_nameserver)
135
+ @parser.nameservers[0].name.should == "ns1.qtel.com.qa"
136
+ @parser.nameservers[0].ipv4.should == "212.77.203.185"
137
+ @parser.nameservers[1].should be_a(_nameserver)
138
+ @parser.nameservers[1].name.should == "ns2.qtel.com.qa"
139
+ @parser.nameservers[1].ipv4.should == "213.130.113.101"
140
+ end
141
+ end
142
+ end