whois 2.5.1 → 2.6.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (308) hide show
  1. data/CHANGELOG.md +1537 -0
  2. data/README.md +212 -0
  3. data/Rakefile +3 -3
  4. data/lib/whois.rb +26 -1
  5. data/lib/whois/definitions/tlds.rb +3 -2
  6. data/lib/whois/record.rb +2 -2
  7. data/lib/whois/record/parser/base_afilias.rb +2 -2
  8. data/lib/whois/record/parser/base_cocca.rb +9 -1
  9. data/lib/whois/record/parser/jobswhois.verisign-grs.com.rb +6 -2
  10. data/lib/whois/record/parser/kero.yachay.pe.rb +1 -1
  11. data/lib/whois/record/parser/whois.adamsnames.tc.rb +1 -1
  12. data/lib/whois/record/parser/whois.aeda.net.ae.rb +1 -1
  13. data/lib/whois/record/parser/whois.ai.rb +1 -1
  14. data/lib/whois/record/parser/whois.arnes.si.rb +1 -1
  15. data/lib/whois/record/parser/whois.ati.tn.rb +133 -0
  16. data/lib/whois/record/parser/whois.biz.rb +1 -1
  17. data/lib/whois/record/parser/whois.cat.rb +1 -1
  18. data/lib/whois/record/parser/whois.cctld.uz.rb +4 -3
  19. data/lib/whois/record/parser/whois.centralnic.com.rb +1 -3
  20. data/lib/whois/record/parser/whois.cnnic.cn.rb +1 -1
  21. data/lib/whois/record/parser/whois.co.ca.rb +1 -1
  22. data/lib/whois/record/parser/whois.co.pl.rb +1 -1
  23. data/lib/whois/record/parser/whois.co.ug.rb +13 -12
  24. data/lib/whois/record/parser/whois.crsnic.net.rb +6 -2
  25. data/lib/whois/record/parser/whois.denic.de.rb +1 -1
  26. data/lib/whois/record/parser/whois.dk-hostmaster.dk.rb +1 -1
  27. data/lib/whois/record/parser/whois.dns.be.rb +2 -2
  28. data/lib/whois/record/parser/whois.dns.lu.rb +2 -2
  29. data/lib/whois/record/parser/whois.dns.pl.rb +2 -2
  30. data/lib/whois/record/parser/whois.dns.pt.rb +1 -1
  31. data/lib/whois/record/parser/whois.domain-registry.nl.rb +1 -1
  32. data/lib/whois/record/parser/whois.domain.kg.rb +1 -1
  33. data/lib/whois/record/parser/whois.domainregistry.my.rb +1 -1
  34. data/lib/whois/record/parser/whois.domreg.lt.rb +2 -2
  35. data/lib/whois/record/parser/whois.dot.tk.rb +1 -1
  36. data/lib/whois/record/parser/whois.dreamhost.com.rb +1 -1
  37. data/lib/whois/record/parser/whois.educause.edu.rb +128 -20
  38. data/lib/whois/record/parser/whois.eenet.ee.rb +1 -1
  39. data/lib/whois/record/parser/whois.eu.rb +2 -2
  40. data/lib/whois/record/parser/whois.fi.rb +1 -1
  41. data/lib/whois/record/parser/whois.gg.rb +1 -1
  42. data/lib/whois/record/parser/whois.godaddy.com.rb +1 -1
  43. data/lib/whois/record/parser/whois.hkirc.hk.rb +12 -13
  44. data/lib/whois/record/parser/whois.iana.org.rb +2 -1
  45. data/lib/whois/record/parser/whois.in.ua.rb +1 -1
  46. data/lib/whois/record/parser/whois.isnic.is.rb +1 -1
  47. data/lib/whois/record/parser/whois.isoc.org.il.rb +1 -1
  48. data/lib/whois/record/parser/whois.ja.net.rb +2 -1
  49. data/lib/whois/record/parser/whois.je.rb +1 -1
  50. data/lib/whois/record/parser/whois.jprs.jp.rb +1 -1
  51. data/lib/whois/record/parser/whois.kenic.or.ke.rb +1 -1
  52. data/lib/whois/record/parser/whois.markmonitor.com.rb +1 -1
  53. data/lib/whois/record/parser/whois.meregistry.net.rb +1 -1
  54. data/lib/whois/record/parser/whois.museum.rb +1 -1
  55. data/lib/whois/record/parser/whois.na-nic.com.na.rb +1 -0
  56. data/lib/whois/record/parser/whois.netcom.cm.rb +1 -1
  57. data/lib/whois/record/parser/whois.nic-se.se.rb +1 -1
  58. data/lib/whois/record/parser/whois.nic.am.rb +1 -1
  59. data/lib/whois/record/parser/whois.nic.as.rb +1 -1
  60. data/lib/whois/record/parser/whois.nic.asia.rb +1 -1
  61. data/lib/whois/record/parser/whois.nic.at.rb +1 -1
  62. data/lib/whois/record/parser/whois.nic.cc.rb +1 -1
  63. data/lib/whois/record/parser/whois.nic.cd.rb +1 -1
  64. data/lib/whois/record/parser/whois.nic.ch.rb +2 -2
  65. data/lib/whois/record/parser/whois.nic.ci.rb +1 -1
  66. data/lib/whois/record/parser/whois.nic.ck.rb +1 -1
  67. data/lib/whois/record/parser/whois.nic.cl.rb +1 -1
  68. data/lib/whois/record/parser/whois.nic.co.rb +1 -1
  69. data/lib/whois/record/parser/whois.nic.coop.rb +1 -1
  70. data/lib/whois/record/parser/whois.nic.cz.rb +11 -9
  71. data/lib/whois/record/parser/whois.nic.ec.rb +1 -1
  72. data/lib/whois/record/parser/whois.nic.gl.rb +2 -63
  73. data/lib/whois/record/parser/whois.nic.hu.rb +3 -3
  74. data/lib/whois/record/parser/whois.nic.im.rb +1 -1
  75. data/lib/whois/record/parser/whois.nic.ir.rb +1 -1
  76. data/lib/whois/record/parser/whois.nic.it.rb +4 -4
  77. data/lib/whois/record/parser/whois.nic.kz.rb +1 -1
  78. data/lib/whois/record/parser/whois.nic.li.rb +1 -1
  79. data/lib/whois/record/parser/whois.nic.lv.rb +1 -1
  80. data/lib/whois/record/parser/whois.nic.ly.rb +1 -1
  81. data/lib/whois/record/parser/whois.nic.md.rb +5 -5
  82. data/lib/whois/record/parser/whois.nic.mg.rb +1 -1
  83. data/lib/whois/record/parser/whois.nic.mx.rb +1 -1
  84. data/lib/whois/record/parser/whois.nic.net.sa.rb +1 -1
  85. data/lib/whois/record/parser/whois.nic.nu.rb +1 -1
  86. data/lib/whois/record/parser/whois.nic.org.uy.rb +1 -1
  87. data/lib/whois/record/parser/whois.nic.sl.rb +1 -1
  88. data/lib/whois/record/parser/whois.nic.sm.rb +1 -1
  89. data/lib/whois/record/parser/whois.nic.sn.rb +6 -3
  90. data/lib/whois/record/parser/whois.nic.so.rb +1 -1
  91. data/lib/whois/record/parser/whois.nic.st.rb +1 -1
  92. data/lib/whois/record/parser/whois.nic.tel.rb +1 -1
  93. data/lib/whois/record/parser/whois.nic.tr.rb +2 -1
  94. data/lib/whois/record/parser/whois.nic.travel.rb +1 -1
  95. data/lib/whois/record/parser/whois.nic.tv.rb +1 -1
  96. data/lib/whois/record/parser/whois.nic.uk.rb +11 -4
  97. data/lib/whois/record/parser/whois.nic.us.rb +1 -1
  98. data/lib/whois/record/parser/whois.nic.ve.rb +5 -3
  99. data/lib/whois/record/parser/whois.pandi.or.id.rb +5 -4
  100. data/lib/whois/record/parser/whois.pnina.ps.rb +8 -8
  101. data/lib/whois/record/parser/whois.register.bg.rb +6 -5
  102. data/lib/whois/record/parser/whois.registry.hm.rb +1 -1
  103. data/lib/whois/record/parser/whois.registry.om.rb +125 -0
  104. data/lib/whois/record/parser/whois.registrypro.pro.rb +1 -1
  105. data/lib/whois/record/parser/whois.ripe.net.rb +1 -1
  106. data/lib/whois/record/parser/whois.rnids.rs.rb +1 -1
  107. data/lib/whois/record/parser/whois.rotld.ro.rb +5 -4
  108. data/lib/whois/record/parser/whois.samoanic.ws.rb +1 -1
  109. data/lib/whois/record/parser/whois.sgnic.sg.rb +16 -16
  110. data/lib/whois/record/parser/whois.sk-nic.sk.rb +15 -8
  111. data/lib/whois/record/parser/whois.smallregistry.net.rb +10 -2
  112. data/lib/whois/record/parser/whois.srs.net.nz.rb +38 -20
  113. data/lib/whois/record/parser/whois.tcinet.ru.rb +4 -2
  114. data/lib/whois/record/parser/whois.thnic.co.th.rb +5 -4
  115. data/lib/whois/record/parser/whois.tld.ee.rb +7 -7
  116. data/lib/whois/record/parser/whois.tonic.to.rb +2 -3
  117. data/lib/whois/record/parser/whois.twnic.net.tw.rb +1 -1
  118. data/lib/whois/record/parser/whois.tznic.or.tz.rb +8 -4
  119. data/lib/whois/record/parser/whois.usp.ac.fj.rb +5 -4
  120. data/lib/whois/record/parser/whois.za.net.rb +1 -1
  121. data/lib/whois/record/parser/whois.za.org.rb +1 -1
  122. data/lib/whois/record/scanners/whois.ati.tn.rb +46 -0
  123. data/lib/whois/record/scanners/whois.cira.ca.rb +0 -1
  124. data/lib/whois/record/scanners/whois.registry.om.rb +39 -0
  125. data/lib/whois/record/scanners/whois.rnids.rs.rb +5 -0
  126. data/lib/whois/record/super_struct.rb +8 -5
  127. data/lib/whois/server/adapters/base.rb +53 -53
  128. data/lib/whois/version.rb +2 -2
  129. data/spec/fixtures/responses/whois.ati.tn/status_available.expected +57 -0
  130. data/spec/fixtures/responses/whois.ati.tn/status_available.txt +4 -0
  131. data/spec/fixtures/responses/whois.ati.tn/status_registered.expected +122 -0
  132. data/spec/fixtures/responses/whois.ati.tn/status_registered.txt +36 -0
  133. data/spec/fixtures/responses/whois.cctld.uz/property_expires_on_dash.expected +2 -0
  134. data/spec/fixtures/responses/whois.cctld.uz/property_expires_on_dash.txt +123 -0
  135. data/spec/fixtures/responses/whois.cctld.uz/property_status_reserved.expected +8 -0
  136. data/spec/fixtures/responses/whois.cctld.uz/property_status_reserved.txt +123 -0
  137. data/spec/fixtures/responses/{whois.nic.uk/property_status_registered.expected → whois.co.ug/property_status_active.expected} +0 -0
  138. data/spec/fixtures/responses/whois.co.ug/property_status_active.txt +35 -0
  139. data/spec/fixtures/responses/whois.co.ug/property_status_unconfirmed.expected +8 -0
  140. data/spec/fixtures/responses/whois.co.ug/property_status_unconfirmed.txt +30 -0
  141. data/spec/fixtures/responses/whois.dns.be/{response_throttled.expected → response_throttled_hourly.expected} +0 -0
  142. data/spec/fixtures/responses/whois.dns.be/{response_throttled_max.txt → response_throttled_hourly.txt} +0 -0
  143. data/spec/fixtures/responses/whois.dns.be/{response_throttled_max.expected → response_throttled_limit.expected} +0 -0
  144. data/spec/fixtures/responses/whois.dns.be/{response_throttled.txt → response_throttled_limit.txt} +0 -0
  145. data/spec/fixtures/responses/whois.dns.hr/status_registered.expected +13 -11
  146. data/spec/fixtures/responses/whois.domain-registry.nl/status_available.expected +4 -0
  147. data/spec/fixtures/responses/whois.domain-registry.nl/status_redemption.expected +4 -0
  148. data/spec/fixtures/responses/whois.educause.edu/fixture1.txt +63 -0
  149. data/spec/fixtures/responses/whois.educause.edu/fixture2.txt +66 -0
  150. data/spec/fixtures/responses/whois.educause.edu/fixture3.txt +67 -0
  151. data/spec/fixtures/responses/whois.educause.edu/fixture4.txt +68 -0
  152. data/spec/fixtures/responses/whois.educause.edu/fixture5.txt +66 -0
  153. data/spec/fixtures/responses/whois.educause.edu/fixture6.txt +66 -0
  154. data/spec/fixtures/responses/whois.educause.edu/property_contact_registrant.expected +27 -0
  155. data/spec/fixtures/responses/whois.educause.edu/property_contact_registrant.txt +63 -0
  156. data/spec/fixtures/responses/whois.educause.edu/property_contact_registrant_with_additional_organization.expected +28 -0
  157. data/spec/fixtures/responses/whois.educause.edu/property_contact_registrant_with_additional_organization.txt +66 -0
  158. data/spec/fixtures/responses/whois.educause.edu/property_contact_registrant_without_address.expected +26 -0
  159. data/spec/fixtures/responses/whois.educause.edu/{property_registrant_without_address.txt → property_contact_registrant_without_address.txt} +0 -0
  160. data/spec/fixtures/responses/whois.educause.edu/property_contact_registrant_without_zip.expected +27 -0
  161. data/spec/fixtures/responses/whois.educause.edu/{property_registrant_without_zip.txt → property_contact_registrant_without_zip.txt} +0 -0
  162. data/spec/fixtures/responses/whois.educause.edu/property_contacts.expected +31 -0
  163. data/spec/fixtures/responses/whois.educause.edu/property_contacts.txt +63 -0
  164. data/spec/fixtures/responses/whois.educause.edu/property_contacts_case1.expected +31 -0
  165. data/spec/fixtures/responses/whois.educause.edu/property_contacts_case1.txt +66 -0
  166. data/spec/fixtures/responses/whois.educause.edu/property_contacts_case2.expected +32 -0
  167. data/spec/fixtures/responses/whois.educause.edu/property_contacts_case2.txt +67 -0
  168. data/spec/fixtures/responses/whois.educause.edu/property_contacts_case3.expected +32 -0
  169. data/spec/fixtures/responses/whois.educause.edu/property_contacts_case3.txt +66 -0
  170. data/spec/fixtures/responses/whois.educause.edu/property_contacts_case4.expected +32 -0
  171. data/spec/fixtures/responses/whois.educause.edu/property_contacts_case4.txt +68 -0
  172. data/spec/fixtures/responses/whois.educause.edu/status_available.expected +34 -0
  173. data/spec/fixtures/responses/whois.educause.edu/status_registered.expected +70 -8
  174. data/spec/fixtures/responses/whois.hkirc.hk/property_expires_on_null.expected +2 -0
  175. data/spec/fixtures/responses/whois.hkirc.hk/property_expires_on_null.txt +104 -0
  176. data/spec/fixtures/responses/whois.na-nic.com.na/property_status_active.expected +8 -0
  177. data/spec/fixtures/responses/whois.na-nic.com.na/property_status_active.txt +54 -0
  178. data/spec/fixtures/responses/whois.na-nic.com.na/property_status_delegated.expected +8 -0
  179. data/spec/fixtures/responses/whois.na-nic.com.na/property_status_delegated.txt +86 -0
  180. data/spec/fixtures/responses/whois.na-nic.com.na/status_registered.expected +9 -2
  181. data/spec/fixtures/responses/whois.na-nic.com.na/status_registered.txt +17 -7
  182. data/spec/fixtures/responses/whois.nc/property_contact_without_state.txt +21 -0
  183. data/spec/fixtures/responses/whois.nic.af/status_registered.expected +14 -3
  184. data/spec/fixtures/responses/whois.nic.af/status_registered.txt +59 -40
  185. data/spec/fixtures/responses/whois.nic.cx/status_registered.expected +7 -0
  186. data/spec/fixtures/responses/whois.nic.gl/status_available.expected +7 -0
  187. data/spec/fixtures/responses/whois.nic.gl/status_registered.expected +14 -0
  188. data/spec/fixtures/responses/whois.nic.gs/status_registered.expected +7 -0
  189. data/spec/fixtures/responses/whois.nic.ht/status_registered.expected +9 -2
  190. data/spec/fixtures/responses/whois.nic.ht/status_registered.txt +58 -44
  191. data/spec/fixtures/responses/whois.nic.ki/status_registered.expected +7 -0
  192. data/spec/fixtures/responses/whois.nic.ms/status_registered.expected +7 -0
  193. data/spec/fixtures/responses/whois.nic.mu/status_registered.expected +9 -2
  194. data/spec/fixtures/responses/whois.nic.mu/status_registered.txt +52 -8
  195. data/spec/fixtures/responses/whois.nic.net.nf/status_registered.expected +7 -0
  196. data/spec/fixtures/responses/whois.nic.net.ng/status_registered.expected +7 -0
  197. data/spec/fixtures/responses/whois.nic.net.sb/status_registered.expected +7 -0
  198. data/spec/fixtures/responses/whois.nic.tl/status_registered.expected +9 -2
  199. data/spec/fixtures/responses/whois.nic.tl/status_registered.txt +42 -5
  200. data/spec/fixtures/responses/whois.nic.uk/property_nameservers_with_ip.txt +11 -7
  201. data/spec/fixtures/responses/whois.nic.uk/property_registrant_type_individual.txt +45 -0
  202. data/spec/fixtures/responses/whois.nic.uk/{property_status_registered.txt → property_registrant_type_unknown.txt} +5 -5
  203. data/spec/fixtures/responses/whois.nic.uk/property_status_missing.txt +2 -2
  204. data/spec/fixtures/responses/whois.nic.uk/property_status_no_status_listed.txt +2 -2
  205. data/spec/fixtures/responses/whois.nic.uk/property_status_registered_until_expiry_date.txt +18 -13
  206. data/spec/fixtures/responses/whois.nic.uk/property_status_suspended.txt +51 -51
  207. data/spec/fixtures/responses/whois.nic.uk/status_available.txt +2 -2
  208. data/spec/fixtures/responses/whois.nic.uk/status_invalid.txt +2 -2
  209. data/spec/fixtures/responses/whois.nic.uk/status_registered.expected +2 -2
  210. data/spec/fixtures/responses/whois.nic.uk/status_registered.txt +5 -5
  211. data/spec/fixtures/responses/whois.nic.uk/status_reserved.expected +1 -1
  212. data/spec/fixtures/responses/whois.nic.uk/status_reserved.txt +2 -2
  213. data/spec/fixtures/responses/whois.nic.uk/status_suspended.expected +1 -1
  214. data/spec/fixtures/responses/whois.nic.uk/status_suspended.txt +51 -51
  215. data/spec/fixtures/responses/whois.registry.gy/status_registered.expected +7 -0
  216. data/spec/fixtures/responses/whois.registry.om/status_available.expected +56 -0
  217. data/spec/fixtures/responses/whois.registry.om/status_available.txt +1 -0
  218. data/spec/fixtures/responses/whois.registry.om/status_registered.expected +100 -0
  219. data/spec/fixtures/responses/whois.registry.om/status_registered.txt +18 -0
  220. data/spec/fixtures/responses/whois.rnids.rs/property_nameservers_hyphenated.expected +9 -0
  221. data/spec/fixtures/responses/whois.rnids.rs/property_nameservers_hyphenated.txt +36 -0
  222. data/spec/fixtures/responses/whois.rnids.rs/token_whois_privacy.expected +11 -0
  223. data/spec/fixtures/responses/whois.rnids.rs/token_whois_privacy.txt +36 -0
  224. data/spec/fixtures/responses/whois.srs.net.nz/response_throttled.expected +2 -0
  225. data/spec/fixtures/responses/whois.srs.net.nz/response_throttled.txt +27 -0
  226. data/spec/fixtures/responses/whois.srs.net.nz/status_available.expected +4 -0
  227. data/spec/fixtures/responses/whois.srs.net.nz/status_available.txt +2 -3
  228. data/spec/fixtures/responses/whois.srs.net.nz/status_invalid.expected +4 -0
  229. data/spec/fixtures/responses/whois.srs.net.nz/status_invalid.txt +2 -3
  230. data/spec/fixtures/responses/whois.srs.net.nz/status_registered.expected +6 -2
  231. data/spec/fixtures/responses/whois.srs.net.nz/status_registered.txt +5 -4
  232. data/spec/fixtures/responses/whois.tznic.or.tz/property_status_expired.expected +8 -0
  233. data/spec/fixtures/responses/whois.tznic.or.tz/property_status_expired.txt +56 -0
  234. data/spec/support/helpers/spec_helper.rb +0 -5
  235. data/spec/tlds +4 -2
  236. data/spec/whois/record/contact_spec.rb +8 -8
  237. data/spec/whois/record/nameserver_spec.rb +6 -6
  238. data/spec/whois/record/parser/base_spec.rb +11 -11
  239. data/spec/whois/record/parser/blank_spec.rb +1 -1
  240. data/spec/whois/record/parser/responses/whois.ati.tn/status_available_spec.rb +108 -0
  241. data/spec/whois/record/parser/responses/whois.ati.tn/status_registered_spec.rb +173 -0
  242. data/spec/whois/record/parser/responses/whois.cctld.uz/property_expires_on_dash_spec.rb +29 -0
  243. data/spec/whois/record/parser/responses/whois.cctld.uz/property_status_reserved_spec.rb +39 -0
  244. data/spec/whois/record/parser/responses/{whois.nic.uk/property_status_registered_spec.rb → whois.co.ug/property_status_active_spec.rb} +4 -4
  245. data/spec/whois/record/parser/responses/whois.co.ug/property_status_unconfirmed_spec.rb +39 -0
  246. data/spec/whois/record/parser/responses/whois.dns.be/{response_throttled_spec.rb → response_throttled_hourly_spec.rb} +3 -3
  247. data/spec/whois/record/parser/responses/whois.dns.be/{response_throttled_max_spec.rb → response_throttled_limit_spec.rb} +3 -3
  248. data/spec/whois/record/parser/responses/whois.dns.hr/status_registered_spec.rb +13 -11
  249. data/spec/whois/record/parser/responses/whois.domain-registry.nl/status_available_spec.rb +5 -0
  250. data/spec/whois/record/parser/responses/whois.domain-registry.nl/status_redemption_spec.rb +5 -0
  251. data/spec/whois/record/parser/responses/whois.educause.edu/property_contact_registrant_spec.rb +44 -0
  252. data/spec/whois/record/parser/responses/whois.educause.edu/property_contact_registrant_with_additional_organization_spec.rb +44 -0
  253. data/spec/whois/record/parser/responses/whois.educause.edu/property_contact_registrant_without_address_spec.rb +44 -0
  254. data/spec/whois/record/parser/responses/whois.educause.edu/property_contact_registrant_without_zip_spec.rb +44 -0
  255. data/spec/whois/record/parser/responses/whois.educause.edu/property_contacts_case1_spec.rb +43 -0
  256. data/spec/whois/record/parser/responses/whois.educause.edu/property_contacts_case2_spec.rb +43 -0
  257. data/spec/whois/record/parser/responses/whois.educause.edu/property_contacts_case3_spec.rb +43 -0
  258. data/spec/whois/record/parser/responses/whois.educause.edu/property_contacts_case4_spec.rb +43 -0
  259. data/spec/whois/record/parser/responses/whois.educause.edu/property_contacts_spec.rb +43 -0
  260. data/spec/whois/record/parser/responses/whois.educause.edu/status_available_spec.rb +48 -0
  261. data/spec/whois/record/parser/responses/whois.educause.edu/status_registered_spec.rb +83 -8
  262. data/spec/whois/record/parser/responses/whois.hkirc.hk/property_expires_on_null_spec.rb +29 -0
  263. data/spec/whois/record/parser/responses/whois.na-nic.com.na/property_status_active_spec.rb +39 -0
  264. data/spec/whois/record/parser/responses/whois.na-nic.com.na/property_status_delegated_spec.rb +39 -0
  265. data/spec/whois/record/parser/responses/whois.na-nic.com.na/status_registered_spec.rb +10 -2
  266. data/spec/whois/record/parser/responses/whois.nic.af/status_registered_spec.rb +15 -3
  267. data/spec/whois/record/parser/responses/whois.nic.cx/status_registered_spec.rb +8 -0
  268. data/spec/whois/record/parser/responses/whois.nic.gl/status_available_spec.rb +10 -0
  269. data/spec/whois/record/parser/responses/whois.nic.gl/status_registered_spec.rb +18 -0
  270. data/spec/whois/record/parser/responses/whois.nic.gs/status_registered_spec.rb +8 -0
  271. data/spec/whois/record/parser/responses/whois.nic.ht/status_registered_spec.rb +10 -2
  272. data/spec/whois/record/parser/responses/whois.nic.ki/status_registered_spec.rb +8 -0
  273. data/spec/whois/record/parser/responses/whois.nic.ms/status_registered_spec.rb +8 -0
  274. data/spec/whois/record/parser/responses/whois.nic.mu/status_registered_spec.rb +10 -2
  275. data/spec/whois/record/parser/responses/whois.nic.net.nf/status_registered_spec.rb +8 -0
  276. data/spec/whois/record/parser/responses/whois.nic.net.ng/status_registered_spec.rb +8 -0
  277. data/spec/whois/record/parser/responses/whois.nic.net.sb/status_registered_spec.rb +8 -0
  278. data/spec/whois/record/parser/responses/whois.nic.tl/status_registered_spec.rb +10 -2
  279. data/spec/whois/record/parser/responses/whois.nic.uk/status_registered_spec.rb +2 -2
  280. data/spec/whois/record/parser/responses/whois.nic.uk/status_reserved_spec.rb +1 -1
  281. data/spec/whois/record/parser/responses/whois.nic.uk/status_suspended_spec.rb +1 -1
  282. data/spec/whois/record/parser/responses/whois.registry.gy/status_registered_spec.rb +8 -0
  283. data/spec/whois/record/parser/responses/whois.registry.om/status_available_spec.rb +107 -0
  284. data/spec/whois/record/parser/responses/whois.registry.om/status_registered_spec.rb +151 -0
  285. data/spec/whois/record/parser/responses/whois.rnids.rs/property_nameservers_hyphenated_spec.rb +36 -0
  286. data/spec/whois/record/parser/responses/whois.rnids.rs/token_whois_privacy_spec.rb +42 -0
  287. data/spec/whois/record/parser/responses/whois.srs.net.nz/response_throttled_spec.rb +29 -0
  288. data/spec/whois/record/parser/responses/whois.srs.net.nz/status_available_spec.rb +5 -0
  289. data/spec/whois/record/parser/responses/whois.srs.net.nz/status_invalid_spec.rb +5 -0
  290. data/spec/whois/record/parser/responses/whois.srs.net.nz/status_registered_spec.rb +7 -2
  291. data/spec/whois/record/parser/responses/whois.tznic.or.tz/property_status_expired_spec.rb +39 -0
  292. data/spec/whois/record/parser_spec.rb +25 -25
  293. data/spec/whois/record/part_spec.rb +5 -5
  294. data/spec/whois/record/registrar_spec.rb +8 -8
  295. data/spec/whois/record/super_struct_spec.rb +0 -1
  296. data/spec/whois/record_spec.rb +12 -12
  297. data/spec/whois/server/adapters/afilias_spec.rb +2 -2
  298. data/spec/whois/server/adapters/formatted_spec.rb +1 -1
  299. data/spec/whois/server/adapters/pir_spec.rb +2 -2
  300. data/spec/whois/server/adapters/standard_spec.rb +1 -1
  301. data/spec/whois/server/adapters/verisign_spec.rb +2 -2
  302. data/whois.gemspec +6 -6
  303. metadata +97 -20
  304. data/.rspec +0 -1
  305. data/spec/fixtures/responses/whois.educause.edu/property_registrant_without_address.expected +0 -11
  306. data/spec/fixtures/responses/whois.educause.edu/property_registrant_without_zip.expected +0 -12
  307. data/spec/whois/record/parser/responses/whois.educause.edu/property_registrant_without_address_spec.rb +0 -38
  308. data/spec/whois/record/parser/responses/whois.educause.edu/property_registrant_without_zip_spec.rb +0 -39
@@ -0,0 +1,42 @@
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.rnids.rs/token_whois_privacy.expected
7
+ #
8
+ # and regenerate the tests with the following rake task
9
+ #
10
+ # $ rake spec:generate
11
+ #
12
+
13
+ require 'spec_helper'
14
+ require 'whois/record/parser/whois.rnids.rs.rb'
15
+
16
+ describe Whois::Record::Parser::WhoisRnidsRs, "token_whois_privacy.expected" do
17
+
18
+ before(:each) do
19
+ file = fixture("responses", "whois.rnids.rs/token_whois_privacy.txt")
20
+ part = Whois::Record::Part.new(:body => File.read(file))
21
+ @parser = klass.new(part)
22
+ end
23
+
24
+ describe "#registrant_contacts" do
25
+ it do
26
+ @parser.registrant_contacts.should be_a(Array)
27
+ @parser.registrant_contacts.should == []
28
+ end
29
+ end
30
+ describe "#admin_contacts" do
31
+ it do
32
+ @parser.admin_contacts.should be_a(Array)
33
+ @parser.admin_contacts.should == []
34
+ end
35
+ end
36
+ describe "#technical_contacts" do
37
+ it do
38
+ @parser.technical_contacts.should be_a(Array)
39
+ @parser.technical_contacts.should == []
40
+ end
41
+ end
42
+ end
@@ -0,0 +1,29 @@
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.srs.net.nz/response_throttled.expected
7
+ #
8
+ # and regenerate the tests with the following rake task
9
+ #
10
+ # $ rake spec:generate
11
+ #
12
+
13
+ require 'spec_helper'
14
+ require 'whois/record/parser/whois.srs.net.nz.rb'
15
+
16
+ describe Whois::Record::Parser::WhoisSrsNetNz, "response_throttled.expected" do
17
+
18
+ before(:each) do
19
+ file = fixture("responses", "whois.srs.net.nz/response_throttled.txt")
20
+ part = Whois::Record::Part.new(:body => File.read(file))
21
+ @parser = klass.new(part)
22
+ end
23
+
24
+ describe "#response_throttled?" do
25
+ it do
26
+ @parser.response_throttled?.should == true
27
+ end
28
+ end
29
+ end
@@ -57,4 +57,9 @@ describe Whois::Record::Parser::WhoisSrsNetNz, "status_available.expected" do
57
57
  @parser.nameservers.should == []
58
58
  end
59
59
  end
60
+ describe "#response_throttled?" do
61
+ it do
62
+ @parser.response_throttled?.should == false
63
+ end
64
+ end
60
65
  end
@@ -67,4 +67,9 @@ describe Whois::Record::Parser::WhoisSrsNetNz, "status_invalid.expected" do
67
67
  @parser.invalid?.should == true
68
68
  end
69
69
  end
70
+ describe "#response_throttled?" do
71
+ it do
72
+ @parser.response_throttled?.should == false
73
+ end
74
+ end
70
75
  end
@@ -45,13 +45,13 @@ describe Whois::Record::Parser::WhoisSrsNetNz, "status_registered.expected" do
45
45
  describe "#updated_on" do
46
46
  it do
47
47
  @parser.updated_on.should be_a(Time)
48
- @parser.updated_on.should == Time.parse("2010-01-16 23:23:15 +13:00")
48
+ @parser.updated_on.should == Time.parse("2012-01-16 23:16:18 +13:00")
49
49
  end
50
50
  end
51
51
  describe "#expires_on" do
52
52
  it do
53
53
  @parser.expires_on.should be_a(Time)
54
- @parser.expires_on.should == Time.parse("2011-02-17 00:00:00 +13:00")
54
+ @parser.expires_on.should == Time.parse("2013-02-17 00:00:00 +13:00")
55
55
  end
56
56
  end
57
57
  describe "#nameservers" do
@@ -68,4 +68,9 @@ describe Whois::Record::Parser::WhoisSrsNetNz, "status_registered.expected" do
68
68
  @parser.nameservers[3].name.should == "ns4.google.com"
69
69
  end
70
70
  end
71
+ describe "#response_throttled?" do
72
+ it do
73
+ @parser.response_throttled?.should == false
74
+ end
75
+ end
71
76
  end
@@ -0,0 +1,39 @@
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.tznic.or.tz/property_status_expired.expected
7
+ #
8
+ # and regenerate the tests with the following rake task
9
+ #
10
+ # $ rake spec:generate
11
+ #
12
+
13
+ require 'spec_helper'
14
+ require 'whois/record/parser/whois.tznic.or.tz.rb'
15
+
16
+ describe Whois::Record::Parser::WhoisTznicOrTz, "property_status_expired.expected" do
17
+
18
+ before(:each) do
19
+ file = fixture("responses", "whois.tznic.or.tz/property_status_expired.txt")
20
+ part = Whois::Record::Part.new(:body => File.read(file))
21
+ @parser = klass.new(part)
22
+ end
23
+
24
+ describe "#status" do
25
+ it do
26
+ @parser.status.should == :expired
27
+ end
28
+ end
29
+ describe "#available?" do
30
+ it do
31
+ @parser.available?.should == false
32
+ end
33
+ end
34
+ describe "#registered?" do
35
+ it do
36
+ @parser.registered?.should == true
37
+ end
38
+ end
39
+ end
@@ -85,29 +85,29 @@ describe Whois::Record::Parser do
85
85
  end
86
86
 
87
87
  it "delegates to first parser when all supported" do
88
- r = Whois::Record.new(nil, [Whois::Record::Part.new("", "parser.supported.test"), Whois::Record::Part.new("", "parser.undefined.test")])
88
+ r = Whois::Record.new(nil, [Whois::Record::Part.new(:body => "", :host => "parser.supported.test"), Whois::Record::Part.new(:body => "", :host => "parser.undefined.test")])
89
89
  klass.new(r).status.should == :status_undefined
90
- r = Whois::Record.new(nil, [Whois::Record::Part.new("", "parser.undefined.test"), Whois::Record::Part.new("", "parser.supported.test")])
90
+ r = Whois::Record.new(nil, [Whois::Record::Part.new(:body => "", :host => "parser.undefined.test"), Whois::Record::Part.new(:body => "", :host => "parser.supported.test")])
91
91
  klass.new(r).status.should == :status_supported
92
92
  end
93
93
 
94
94
  it "delegates to first parser when one supported" do
95
- r = Whois::Record.new(nil, [Whois::Record::Part.new("", "parser.supported.test"), Whois::Record::Part.new("", "parser.undefined.test")])
95
+ r = Whois::Record.new(nil, [Whois::Record::Part.new(:body => "", :host => "parser.supported.test"), Whois::Record::Part.new(:body => "", :host => "parser.undefined.test")])
96
96
  klass.new(r).created_on.should == :created_on_supported
97
- r = Whois::Record.new(nil, [Whois::Record::Part.new("", "parser.undefined.test"), Whois::Record::Part.new("", "parser.supported.test")])
97
+ r = Whois::Record.new(nil, [Whois::Record::Part.new(:body => "", :host => "parser.undefined.test"), Whois::Record::Part.new(:body => "", :host => "parser.supported.test")])
98
98
  klass.new(r).created_on.should == :created_on_supported
99
99
  end
100
100
 
101
101
  it "raises unless at least one is supported" do
102
102
  lambda do
103
- r = Whois::Record.new(nil, [Whois::Record::Part.new("", "parser.unsupported.test"), Whois::Record::Part.new("", "parser.unsupported.test")])
103
+ r = Whois::Record.new(nil, [Whois::Record::Part.new(:body => "", :host => "parser.unsupported.test"), Whois::Record::Part.new(:body => "", :host => "parser.unsupported.test")])
104
104
  klass.new(r).created_on
105
105
  end.should raise_error(Whois::PropertyNotSupported)
106
106
  end
107
107
 
108
108
  it "raises when parsers are undefined" do
109
109
  lambda do
110
- r = Whois::Record.new(nil, [Whois::Record::Part.new("", "parser.undefined.test"), Whois::Record::Part.new("", "parser.undefined.test")])
110
+ r = Whois::Record.new(nil, [Whois::Record::Part.new(:body => "", :host => "parser.undefined.test"), Whois::Record::Part.new(:body => "", :host => "parser.undefined.test")])
111
111
  klass.new(r).created_on
112
112
  end.should raise_error(Whois::PropertyNotAvailable)
113
113
  end
@@ -121,7 +121,7 @@ describe Whois::Record::Parser do
121
121
 
122
122
  it "does not delegate unknown properties" do
123
123
  lambda do
124
- r = Whois::Record.new(nil, [Whois::Record::Part.new("", "parser.undefined.test")])
124
+ r = Whois::Record.new(nil, [Whois::Record::Part.new(:body => "", :host => "parser.undefined.test")])
125
125
  klass.new(r).unknown_method
126
126
  end.should raise_error(NoMethodError)
127
127
  end
@@ -137,32 +137,32 @@ describe Whois::Record::Parser do
137
137
  end
138
138
 
139
139
  it "returns 1 parser when 1 part" do
140
- record = Whois::Record.new(nil, [Whois::Record::Part.new(nil, "whois.nic.it")])
140
+ record = Whois::Record.new(nil, [Whois::Record::Part.new(:body => nil, :host => "whois.nic.it")])
141
141
  parser = klass.new(record)
142
142
  parser.parsers.should have(1).parsers
143
143
  end
144
144
 
145
145
  it "returns 2 parsers when 2 part" do
146
- record = Whois::Record.new(nil, [Whois::Record::Part.new(nil, "whois.crsnic.net"), Whois::Record::Part.new(nil, "whois.nic.it")])
146
+ record = Whois::Record.new(nil, [Whois::Record::Part.new(:body => nil, :host => "whois.crsnic.net"), Whois::Record::Part.new(:body => nil, :host => "whois.nic.it")])
147
147
  parser = klass.new(record)
148
148
  parser.parsers.should have(2).parsers
149
149
  end
150
150
 
151
151
  it "initializes the parsers in reverse order" do
152
- record = Whois::Record.new(nil, [Whois::Record::Part.new(nil, "whois.crsnic.net"), Whois::Record::Part.new(nil, "whois.nic.it")])
152
+ record = Whois::Record.new(nil, [Whois::Record::Part.new(:body => nil, :host => "whois.crsnic.net"), Whois::Record::Part.new(:body => nil, :host => "whois.nic.it")])
153
153
  parser = klass.new(record)
154
154
  parser.parsers[0].should be_a(Whois::Record::Parser::WhoisNicIt)
155
155
  parser.parsers[1].should be_a(Whois::Record::Parser::WhoisCrsnicNet)
156
156
  end
157
157
 
158
158
  it "returns the host parser when the part is supported" do
159
- record = Whois::Record.new(nil, [Whois::Record::Part.new(nil, "whois.nic.it")])
159
+ record = Whois::Record.new(nil, [Whois::Record::Part.new(:body => nil, :host => "whois.nic.it")])
160
160
  parser = klass.new(record)
161
161
  parser.parsers.first.should be_a(Whois::Record::Parser::WhoisNicIt)
162
162
  end
163
163
 
164
164
  it "returns the Blank parser when the part is not supported" do
165
- record = Whois::Record.new(nil, [Whois::Record::Part.new(nil, "missing.nic.it")])
165
+ record = Whois::Record.new(nil, [Whois::Record::Part.new(:body => nil, :host => "missing.nic.it")])
166
166
  parser = klass.new(record)
167
167
  parser.parsers.first.should be_a(Whois::Record::Parser::Blank)
168
168
  end
@@ -175,22 +175,22 @@ describe Whois::Record::Parser do
175
175
  end
176
176
 
177
177
  it "returns true when 1 part supported" do
178
- record = Whois::Record.new(nil, [Whois::Record::Part.new(nil, "whois.nic.it")])
178
+ record = Whois::Record.new(nil, [Whois::Record::Part.new(:body => nil, :host => "whois.nic.it")])
179
179
  klass.new(record).property_supported?(:disclaimer).should be_true
180
180
  end
181
181
 
182
182
  it "returns false when 1 part supported" do
183
- record = Whois::Record.new(nil, [Whois::Record::Part.new(nil, "missing.nic.it")])
183
+ record = Whois::Record.new(nil, [Whois::Record::Part.new(:body => nil, :host => "missing.nic.it")])
184
184
  klass.new(record).property_supported?(:disclaimer).should be_false
185
185
  end
186
186
 
187
187
  it "returns true when 2 parts" do
188
- record = Whois::Record.new(nil, [Whois::Record::Part.new(nil, "whois.crsnic.net"), Whois::Record::Part.new(nil, "whois.nic.it")])
188
+ record = Whois::Record.new(nil, [Whois::Record::Part.new(:body => nil, :host => "whois.crsnic.net"), Whois::Record::Part.new(:body => nil, :host => "whois.nic.it")])
189
189
  klass.new(record).property_supported?(:disclaimer).should be_true
190
190
  end
191
191
 
192
192
  it "returns true when 1 part supported 1 part not supported" do
193
- record = Whois::Record.new(nil, [Whois::Record::Part.new(nil, "missing.nic.it"), Whois::Record::Part.new(nil, "whois.nic.it")])
193
+ record = Whois::Record.new(nil, [Whois::Record::Part.new(:body => nil, :host => "missing.nic.it"), Whois::Record::Part.new(:body => nil, :host => "whois.nic.it")])
194
194
  klass.new(record).property_supported?(:disclaimer).should be_true
195
195
  end
196
196
  end
@@ -217,21 +217,21 @@ describe Whois::Record::Parser do
217
217
  end
218
218
 
219
219
  it "returns an array of contact when 1 part is supported" do
220
- record = Whois::Record.new(nil, [Whois::Record::Part.new(nil, "contacts2.test")])
220
+ record = Whois::Record.new(nil, [Whois::Record::Part.new(:body => nil, :host => "contacts2.test")])
221
221
  parser = klass.new(record)
222
222
  parser.contacts.should have(2).contacts
223
223
  parser.contacts.should == %w( p2-a1 p2-t1 )
224
224
  end
225
225
 
226
226
  it "returns an array of contact when 1 part is not supported" do
227
- record = Whois::Record.new(nil, [Whois::Record::Part.new(nil, "contacts1.test")])
227
+ record = Whois::Record.new(nil, [Whois::Record::Part.new(:body => nil, :host => "contacts1.test")])
228
228
  parser = klass.new(record)
229
229
  parser.contacts.should have(0).contacts
230
230
  parser.contacts.should == %w()
231
231
  end
232
232
 
233
233
  it "merges the contacts and returns an array of contact when 2 parts" do
234
- record = Whois::Record.new(nil, [Whois::Record::Part.new(nil, "contacts2.test"), Whois::Record::Part.new(nil, "contacts3.test")])
234
+ record = Whois::Record.new(nil, [Whois::Record::Part.new(:body => nil, :host => "contacts2.test"), Whois::Record::Part.new(:body => nil, :host => "contacts3.test")])
235
235
  parser = klass.new(record)
236
236
  parser.contacts.should have(3).contacts
237
237
  parser.contacts.should == %w( p3-t1 p2-a1 p2-t1 )
@@ -269,7 +269,7 @@ describe Whois::Record::Parser do
269
269
 
270
270
  it "returns false if parser and other.parser have different number of elements" do
271
271
  instance = klass.new(Whois::Record.new(nil, []))
272
- other = klass.new(Whois::Record.new(nil, [Whois::Record::Part.new("", "foo.example.test")]))
272
+ other = klass.new(Whois::Record.new(nil, [Whois::Record::Part.new(:body => "", :host => "foo.example.test")]))
273
273
  instance.unchanged?(other).should be_false
274
274
  end
275
275
 
@@ -281,15 +281,15 @@ describe Whois::Record::Parser do
281
281
 
282
282
 
283
283
  it "returns true if every parser in self marches the corresponding parser in other" do
284
- instance = klass.new(Whois::Record.new(nil, [Whois::Record::Part.new("hello", "foo.example.test"), Whois::Record::Part.new("world", "bar.example.test")]))
285
- other = klass.new(Whois::Record.new(nil, [Whois::Record::Part.new("hello", "foo.example.test"), Whois::Record::Part.new("world", "bar.example.test")]))
284
+ instance = klass.new(Whois::Record.new(nil, [Whois::Record::Part.new(:body => "hello", :host => "foo.example.test"), Whois::Record::Part.new(:body => "hello", :host => "bar.example.test")]))
285
+ other = klass.new(Whois::Record.new(nil, [Whois::Record::Part.new(:body => "hello", :host => "foo.example.test"), Whois::Record::Part.new(:body => "hello", :host => "bar.example.test")]))
286
286
 
287
287
  instance.unchanged?(other).should be_true
288
288
  end
289
289
 
290
290
  it "returns false unless every parser in self marches the corresponding parser in other" do
291
- instance = klass.new(Whois::Record.new(nil, [Whois::Record::Part.new("hello", "foo.example.test"), Whois::Record::Part.new("world", "bar.example.test")]))
292
- other = klass.new(Whois::Record.new(nil, [Whois::Record::Part.new("hello", "foo.example.test"), Whois::Record::Part.new("baby!", "bar.example.test")]))
291
+ instance = klass.new(Whois::Record.new(nil, [Whois::Record::Part.new(:body => "hello", :host => "foo.example.test"), Whois::Record::Part.new(:body => "world", :host => "bar.example.test")]))
292
+ other = klass.new(Whois::Record.new(nil, [Whois::Record::Part.new(:body => "hello", :host => "foo.example.test"), Whois::Record::Part.new(:body => "baby!", :host => "bar.example.test")]))
293
293
 
294
294
  instance.unchanged?(other).should be_false
295
295
  end
@@ -371,7 +371,7 @@ describe Whois::Record::Parser do
371
371
  end
372
372
 
373
373
  def parsers(*types)
374
- klass.new(Whois::Record.new(nil, types.map { |type| Whois::Record::Part.new("", "response-#{type}.test") }))
374
+ klass.new(Whois::Record.new(nil, types.map { |type| Whois::Record::Part.new(:body => "", :host => "response-#{type}.test") }))
375
375
  end
376
376
 
377
377
  end
@@ -22,12 +22,12 @@ describe Whois::Record::Part do
22
22
  end.should_not raise_error
23
23
  end
24
24
 
25
- it "initializes a new instance from given params" do
26
- i = klass.new("This is a WHOIS record.", "whois.example.test")
25
+ # it "initializes a new instance from given params" do
26
+ # i = klass.new("This is a WHOIS record.", "whois.example.test")
27
27
 
28
- i.body.should == "This is a WHOIS record."
29
- i.host.should == "whois.example.test"
30
- end
28
+ # i.body.should == "This is a WHOIS record."
29
+ # i.host.should == "whois.example.test"
30
+ # end
31
31
 
32
32
  it "initializes a new instance from given hash" do
33
33
  i = klass.new(:body => "This is a WHOIS record.", :host => "whois.example.test")
@@ -22,14 +22,14 @@ describe Whois::Record::Registrar do
22
22
  end.should_not raise_error
23
23
  end
24
24
 
25
- it "initializes a new instance from given params" do
26
- i = klass.new(10, "John Doe", nil, "http://example.com")
27
-
28
- i.id.should == 10
29
- i.name.should == "John Doe"
30
- i.organization.should be_nil
31
- i.url.should == "http://example.com"
32
- end
25
+ # it "initializes a new instance from given params" do
26
+ # i = klass.new(10, "John Doe", nil, "http://example.com")
27
+
28
+ # i.id.should == 10
29
+ # i.name.should == "John Doe"
30
+ # i.organization.should be_nil
31
+ # i.url.should == "http://example.com"
32
+ # end
33
33
 
34
34
  it "initializes a new instance from given hash" do
35
35
  i = klass.new(:id => 10, :name => "John Doe", :url => "http://example.com")
@@ -12,7 +12,6 @@ describe SuperStruct do
12
12
  describe "#initialize" do
13
13
  it "initializes a new instance from given hash" do
14
14
  i = SuperEroe.new(:name => "Pippo", :supername => "SuperPippo")
15
-
16
15
  i.name.should == "Pippo"
17
16
  i.supername.should == "SuperPippo"
18
17
  end
@@ -5,8 +5,8 @@ describe Whois::Record do
5
5
  before(:each) do
6
6
  @server = Whois::Server.factory(:tld, ".foo", "whois.example.test")
7
7
  @parts = [
8
- Whois::Record::Part.new("This is a record from foo.", "foo.example.test"),
9
- Whois::Record::Part.new("This is a record from bar.", "bar.example.test")
8
+ Whois::Record::Part.new(:body => "This is a record from foo.", :host => "foo.example.test"),
9
+ Whois::Record::Part.new(:body => "This is a record from bar.", :host => "bar.example.test")
10
10
  ]
11
11
  @content = @parts.map(&:body).join("\n")
12
12
  end
@@ -203,57 +203,57 @@ describe Whois::Record do
203
203
 
204
204
  describe "#property_supported?" do
205
205
  it "returns true if the property is supported" do
206
- r = klass.new(nil, [Whois::Record::Part.new("", "whois.properties.test")])
206
+ r = klass.new(nil, [Whois::Record::Part.new(:body => "", :host => "whois.properties.test")])
207
207
  r.property_supported?(:status).should == true
208
208
  r.property_supported?(:created_on).should == true
209
209
  end
210
210
 
211
211
  it "returns false if the property is not supported" do
212
- r = klass.new(nil, [Whois::Record::Part.new("", "whois.properties.test")])
212
+ r = klass.new(nil, [Whois::Record::Part.new(:body => "", :host => "whois.properties.test")])
213
213
  r.property_supported?(:updated_on).should == false
214
214
  end
215
215
 
216
216
  it "returns false if the property is not defined" do
217
- r = klass.new(nil, [Whois::Record::Part.new("", "whois.properties.test")])
217
+ r = klass.new(nil, [Whois::Record::Part.new(:body => "", :host => "whois.properties.test")])
218
218
  r.property_supported?(:expires_on).should == false
219
219
  end
220
220
  end
221
221
 
222
222
  describe "property" do
223
223
  it "returns value when the property is supported" do
224
- r = klass.new(nil, [Whois::Record::Part.new("", "whois.properties.test")])
224
+ r = klass.new(nil, [Whois::Record::Part.new(:body => "", :host => "whois.properties.test")])
225
225
  r.created_on.should == Date.parse("2010-10-20")
226
226
  end
227
227
 
228
228
  it "returns nil when the property is not supported" do
229
- r = klass.new(nil, [Whois::Record::Part.new("", "whois.properties.test")])
229
+ r = klass.new(nil, [Whois::Record::Part.new(:body => "", :host => "whois.properties.test")])
230
230
  r.updated_on.should be_nil
231
231
  end
232
232
 
233
233
  it "returns nil when the property is not implemented" do
234
- r = klass.new(nil, [Whois::Record::Part.new("", "whois.properties.test")])
234
+ r = klass.new(nil, [Whois::Record::Part.new(:body => "", :host => "whois.properties.test")])
235
235
  r.expires_on.should be_nil
236
236
  end
237
237
  end
238
238
 
239
239
  describe "property?" do
240
240
  it "returns true when the property is supported and has no value" do
241
- r = klass.new(nil, [Whois::Record::Part.new("", "whois.properties.test")])
241
+ r = klass.new(nil, [Whois::Record::Part.new(:body => "", :host => "whois.properties.test")])
242
242
  r.status?.should == false
243
243
  end
244
244
 
245
245
  it "returns false when the property is supported and has q value" do
246
- r = klass.new(nil, [Whois::Record::Part.new("", "whois.properties.test")])
246
+ r = klass.new(nil, [Whois::Record::Part.new(:body => "", :host => "whois.properties.test")])
247
247
  r.created_on?.should == true
248
248
  end
249
249
 
250
250
  it "returns false when the property is not supported" do
251
- r = klass.new(nil, [Whois::Record::Part.new("", "whois.properties.test")])
251
+ r = klass.new(nil, [Whois::Record::Part.new(:body => "", :host => "whois.properties.test")])
252
252
  r.updated_on?.should == false
253
253
  end
254
254
 
255
255
  it "returns false when the property is not implemented" do
256
- r = klass.new(nil, [Whois::Record::Part.new("", "whois.properties.test")])
256
+ r = klass.new(nil, [Whois::Record::Part.new(:body => "", :host => "whois.properties.test")])
257
257
  r.expires_on?.should == false
258
258
  end
259
259
  end