whois 2.5.1 → 2.6.0
Sign up to get free protection for your applications and to get access to all the features.
- data/CHANGELOG.md +1537 -0
- data/README.md +212 -0
- data/Rakefile +3 -3
- data/lib/whois.rb +26 -1
- data/lib/whois/definitions/tlds.rb +3 -2
- data/lib/whois/record.rb +2 -2
- data/lib/whois/record/parser/base_afilias.rb +2 -2
- data/lib/whois/record/parser/base_cocca.rb +9 -1
- data/lib/whois/record/parser/jobswhois.verisign-grs.com.rb +6 -2
- data/lib/whois/record/parser/kero.yachay.pe.rb +1 -1
- data/lib/whois/record/parser/whois.adamsnames.tc.rb +1 -1
- data/lib/whois/record/parser/whois.aeda.net.ae.rb +1 -1
- data/lib/whois/record/parser/whois.ai.rb +1 -1
- data/lib/whois/record/parser/whois.arnes.si.rb +1 -1
- data/lib/whois/record/parser/whois.ati.tn.rb +133 -0
- data/lib/whois/record/parser/whois.biz.rb +1 -1
- data/lib/whois/record/parser/whois.cat.rb +1 -1
- data/lib/whois/record/parser/whois.cctld.uz.rb +4 -3
- data/lib/whois/record/parser/whois.centralnic.com.rb +1 -3
- data/lib/whois/record/parser/whois.cnnic.cn.rb +1 -1
- data/lib/whois/record/parser/whois.co.ca.rb +1 -1
- data/lib/whois/record/parser/whois.co.pl.rb +1 -1
- data/lib/whois/record/parser/whois.co.ug.rb +13 -12
- data/lib/whois/record/parser/whois.crsnic.net.rb +6 -2
- data/lib/whois/record/parser/whois.denic.de.rb +1 -1
- data/lib/whois/record/parser/whois.dk-hostmaster.dk.rb +1 -1
- data/lib/whois/record/parser/whois.dns.be.rb +2 -2
- data/lib/whois/record/parser/whois.dns.lu.rb +2 -2
- data/lib/whois/record/parser/whois.dns.pl.rb +2 -2
- data/lib/whois/record/parser/whois.dns.pt.rb +1 -1
- data/lib/whois/record/parser/whois.domain-registry.nl.rb +1 -1
- data/lib/whois/record/parser/whois.domain.kg.rb +1 -1
- data/lib/whois/record/parser/whois.domainregistry.my.rb +1 -1
- data/lib/whois/record/parser/whois.domreg.lt.rb +2 -2
- data/lib/whois/record/parser/whois.dot.tk.rb +1 -1
- data/lib/whois/record/parser/whois.dreamhost.com.rb +1 -1
- data/lib/whois/record/parser/whois.educause.edu.rb +128 -20
- data/lib/whois/record/parser/whois.eenet.ee.rb +1 -1
- data/lib/whois/record/parser/whois.eu.rb +2 -2
- data/lib/whois/record/parser/whois.fi.rb +1 -1
- data/lib/whois/record/parser/whois.gg.rb +1 -1
- data/lib/whois/record/parser/whois.godaddy.com.rb +1 -1
- data/lib/whois/record/parser/whois.hkirc.hk.rb +12 -13
- data/lib/whois/record/parser/whois.iana.org.rb +2 -1
- data/lib/whois/record/parser/whois.in.ua.rb +1 -1
- data/lib/whois/record/parser/whois.isnic.is.rb +1 -1
- data/lib/whois/record/parser/whois.isoc.org.il.rb +1 -1
- data/lib/whois/record/parser/whois.ja.net.rb +2 -1
- data/lib/whois/record/parser/whois.je.rb +1 -1
- data/lib/whois/record/parser/whois.jprs.jp.rb +1 -1
- data/lib/whois/record/parser/whois.kenic.or.ke.rb +1 -1
- data/lib/whois/record/parser/whois.markmonitor.com.rb +1 -1
- data/lib/whois/record/parser/whois.meregistry.net.rb +1 -1
- data/lib/whois/record/parser/whois.museum.rb +1 -1
- data/lib/whois/record/parser/whois.na-nic.com.na.rb +1 -0
- data/lib/whois/record/parser/whois.netcom.cm.rb +1 -1
- data/lib/whois/record/parser/whois.nic-se.se.rb +1 -1
- data/lib/whois/record/parser/whois.nic.am.rb +1 -1
- data/lib/whois/record/parser/whois.nic.as.rb +1 -1
- data/lib/whois/record/parser/whois.nic.asia.rb +1 -1
- data/lib/whois/record/parser/whois.nic.at.rb +1 -1
- data/lib/whois/record/parser/whois.nic.cc.rb +1 -1
- data/lib/whois/record/parser/whois.nic.cd.rb +1 -1
- data/lib/whois/record/parser/whois.nic.ch.rb +2 -2
- data/lib/whois/record/parser/whois.nic.ci.rb +1 -1
- data/lib/whois/record/parser/whois.nic.ck.rb +1 -1
- data/lib/whois/record/parser/whois.nic.cl.rb +1 -1
- data/lib/whois/record/parser/whois.nic.co.rb +1 -1
- data/lib/whois/record/parser/whois.nic.coop.rb +1 -1
- data/lib/whois/record/parser/whois.nic.cz.rb +11 -9
- data/lib/whois/record/parser/whois.nic.ec.rb +1 -1
- data/lib/whois/record/parser/whois.nic.gl.rb +2 -63
- data/lib/whois/record/parser/whois.nic.hu.rb +3 -3
- data/lib/whois/record/parser/whois.nic.im.rb +1 -1
- data/lib/whois/record/parser/whois.nic.ir.rb +1 -1
- data/lib/whois/record/parser/whois.nic.it.rb +4 -4
- data/lib/whois/record/parser/whois.nic.kz.rb +1 -1
- data/lib/whois/record/parser/whois.nic.li.rb +1 -1
- data/lib/whois/record/parser/whois.nic.lv.rb +1 -1
- data/lib/whois/record/parser/whois.nic.ly.rb +1 -1
- data/lib/whois/record/parser/whois.nic.md.rb +5 -5
- data/lib/whois/record/parser/whois.nic.mg.rb +1 -1
- data/lib/whois/record/parser/whois.nic.mx.rb +1 -1
- data/lib/whois/record/parser/whois.nic.net.sa.rb +1 -1
- data/lib/whois/record/parser/whois.nic.nu.rb +1 -1
- data/lib/whois/record/parser/whois.nic.org.uy.rb +1 -1
- data/lib/whois/record/parser/whois.nic.sl.rb +1 -1
- data/lib/whois/record/parser/whois.nic.sm.rb +1 -1
- data/lib/whois/record/parser/whois.nic.sn.rb +6 -3
- data/lib/whois/record/parser/whois.nic.so.rb +1 -1
- data/lib/whois/record/parser/whois.nic.st.rb +1 -1
- data/lib/whois/record/parser/whois.nic.tel.rb +1 -1
- data/lib/whois/record/parser/whois.nic.tr.rb +2 -1
- data/lib/whois/record/parser/whois.nic.travel.rb +1 -1
- data/lib/whois/record/parser/whois.nic.tv.rb +1 -1
- data/lib/whois/record/parser/whois.nic.uk.rb +11 -4
- data/lib/whois/record/parser/whois.nic.us.rb +1 -1
- data/lib/whois/record/parser/whois.nic.ve.rb +5 -3
- data/lib/whois/record/parser/whois.pandi.or.id.rb +5 -4
- data/lib/whois/record/parser/whois.pnina.ps.rb +8 -8
- data/lib/whois/record/parser/whois.register.bg.rb +6 -5
- data/lib/whois/record/parser/whois.registry.hm.rb +1 -1
- data/lib/whois/record/parser/whois.registry.om.rb +125 -0
- data/lib/whois/record/parser/whois.registrypro.pro.rb +1 -1
- data/lib/whois/record/parser/whois.ripe.net.rb +1 -1
- data/lib/whois/record/parser/whois.rnids.rs.rb +1 -1
- data/lib/whois/record/parser/whois.rotld.ro.rb +5 -4
- data/lib/whois/record/parser/whois.samoanic.ws.rb +1 -1
- data/lib/whois/record/parser/whois.sgnic.sg.rb +16 -16
- data/lib/whois/record/parser/whois.sk-nic.sk.rb +15 -8
- data/lib/whois/record/parser/whois.smallregistry.net.rb +10 -2
- data/lib/whois/record/parser/whois.srs.net.nz.rb +38 -20
- data/lib/whois/record/parser/whois.tcinet.ru.rb +4 -2
- data/lib/whois/record/parser/whois.thnic.co.th.rb +5 -4
- data/lib/whois/record/parser/whois.tld.ee.rb +7 -7
- data/lib/whois/record/parser/whois.tonic.to.rb +2 -3
- data/lib/whois/record/parser/whois.twnic.net.tw.rb +1 -1
- data/lib/whois/record/parser/whois.tznic.or.tz.rb +8 -4
- data/lib/whois/record/parser/whois.usp.ac.fj.rb +5 -4
- data/lib/whois/record/parser/whois.za.net.rb +1 -1
- data/lib/whois/record/parser/whois.za.org.rb +1 -1
- data/lib/whois/record/scanners/whois.ati.tn.rb +46 -0
- data/lib/whois/record/scanners/whois.cira.ca.rb +0 -1
- data/lib/whois/record/scanners/whois.registry.om.rb +39 -0
- data/lib/whois/record/scanners/whois.rnids.rs.rb +5 -0
- data/lib/whois/record/super_struct.rb +8 -5
- data/lib/whois/server/adapters/base.rb +53 -53
- data/lib/whois/version.rb +2 -2
- data/spec/fixtures/responses/whois.ati.tn/status_available.expected +57 -0
- data/spec/fixtures/responses/whois.ati.tn/status_available.txt +4 -0
- data/spec/fixtures/responses/whois.ati.tn/status_registered.expected +122 -0
- data/spec/fixtures/responses/whois.ati.tn/status_registered.txt +36 -0
- data/spec/fixtures/responses/whois.cctld.uz/property_expires_on_dash.expected +2 -0
- data/spec/fixtures/responses/whois.cctld.uz/property_expires_on_dash.txt +123 -0
- data/spec/fixtures/responses/whois.cctld.uz/property_status_reserved.expected +8 -0
- data/spec/fixtures/responses/whois.cctld.uz/property_status_reserved.txt +123 -0
- data/spec/fixtures/responses/{whois.nic.uk/property_status_registered.expected → whois.co.ug/property_status_active.expected} +0 -0
- data/spec/fixtures/responses/whois.co.ug/property_status_active.txt +35 -0
- data/spec/fixtures/responses/whois.co.ug/property_status_unconfirmed.expected +8 -0
- data/spec/fixtures/responses/whois.co.ug/property_status_unconfirmed.txt +30 -0
- data/spec/fixtures/responses/whois.dns.be/{response_throttled.expected → response_throttled_hourly.expected} +0 -0
- data/spec/fixtures/responses/whois.dns.be/{response_throttled_max.txt → response_throttled_hourly.txt} +0 -0
- data/spec/fixtures/responses/whois.dns.be/{response_throttled_max.expected → response_throttled_limit.expected} +0 -0
- data/spec/fixtures/responses/whois.dns.be/{response_throttled.txt → response_throttled_limit.txt} +0 -0
- data/spec/fixtures/responses/whois.dns.hr/status_registered.expected +13 -11
- data/spec/fixtures/responses/whois.domain-registry.nl/status_available.expected +4 -0
- data/spec/fixtures/responses/whois.domain-registry.nl/status_redemption.expected +4 -0
- data/spec/fixtures/responses/whois.educause.edu/fixture1.txt +63 -0
- data/spec/fixtures/responses/whois.educause.edu/fixture2.txt +66 -0
- data/spec/fixtures/responses/whois.educause.edu/fixture3.txt +67 -0
- data/spec/fixtures/responses/whois.educause.edu/fixture4.txt +68 -0
- data/spec/fixtures/responses/whois.educause.edu/fixture5.txt +66 -0
- data/spec/fixtures/responses/whois.educause.edu/fixture6.txt +66 -0
- data/spec/fixtures/responses/whois.educause.edu/property_contact_registrant.expected +27 -0
- data/spec/fixtures/responses/whois.educause.edu/property_contact_registrant.txt +63 -0
- data/spec/fixtures/responses/whois.educause.edu/property_contact_registrant_with_additional_organization.expected +28 -0
- data/spec/fixtures/responses/whois.educause.edu/property_contact_registrant_with_additional_organization.txt +66 -0
- data/spec/fixtures/responses/whois.educause.edu/property_contact_registrant_without_address.expected +26 -0
- data/spec/fixtures/responses/whois.educause.edu/{property_registrant_without_address.txt → property_contact_registrant_without_address.txt} +0 -0
- data/spec/fixtures/responses/whois.educause.edu/property_contact_registrant_without_zip.expected +27 -0
- data/spec/fixtures/responses/whois.educause.edu/{property_registrant_without_zip.txt → property_contact_registrant_without_zip.txt} +0 -0
- data/spec/fixtures/responses/whois.educause.edu/property_contacts.expected +31 -0
- data/spec/fixtures/responses/whois.educause.edu/property_contacts.txt +63 -0
- data/spec/fixtures/responses/whois.educause.edu/property_contacts_case1.expected +31 -0
- data/spec/fixtures/responses/whois.educause.edu/property_contacts_case1.txt +66 -0
- data/spec/fixtures/responses/whois.educause.edu/property_contacts_case2.expected +32 -0
- data/spec/fixtures/responses/whois.educause.edu/property_contacts_case2.txt +67 -0
- data/spec/fixtures/responses/whois.educause.edu/property_contacts_case3.expected +32 -0
- data/spec/fixtures/responses/whois.educause.edu/property_contacts_case3.txt +66 -0
- data/spec/fixtures/responses/whois.educause.edu/property_contacts_case4.expected +32 -0
- data/spec/fixtures/responses/whois.educause.edu/property_contacts_case4.txt +68 -0
- data/spec/fixtures/responses/whois.educause.edu/status_available.expected +34 -0
- data/spec/fixtures/responses/whois.educause.edu/status_registered.expected +70 -8
- data/spec/fixtures/responses/whois.hkirc.hk/property_expires_on_null.expected +2 -0
- data/spec/fixtures/responses/whois.hkirc.hk/property_expires_on_null.txt +104 -0
- data/spec/fixtures/responses/whois.na-nic.com.na/property_status_active.expected +8 -0
- data/spec/fixtures/responses/whois.na-nic.com.na/property_status_active.txt +54 -0
- data/spec/fixtures/responses/whois.na-nic.com.na/property_status_delegated.expected +8 -0
- data/spec/fixtures/responses/whois.na-nic.com.na/property_status_delegated.txt +86 -0
- data/spec/fixtures/responses/whois.na-nic.com.na/status_registered.expected +9 -2
- data/spec/fixtures/responses/whois.na-nic.com.na/status_registered.txt +17 -7
- data/spec/fixtures/responses/whois.nc/property_contact_without_state.txt +21 -0
- data/spec/fixtures/responses/whois.nic.af/status_registered.expected +14 -3
- data/spec/fixtures/responses/whois.nic.af/status_registered.txt +59 -40
- data/spec/fixtures/responses/whois.nic.cx/status_registered.expected +7 -0
- data/spec/fixtures/responses/whois.nic.gl/status_available.expected +7 -0
- data/spec/fixtures/responses/whois.nic.gl/status_registered.expected +14 -0
- data/spec/fixtures/responses/whois.nic.gs/status_registered.expected +7 -0
- data/spec/fixtures/responses/whois.nic.ht/status_registered.expected +9 -2
- data/spec/fixtures/responses/whois.nic.ht/status_registered.txt +58 -44
- data/spec/fixtures/responses/whois.nic.ki/status_registered.expected +7 -0
- data/spec/fixtures/responses/whois.nic.ms/status_registered.expected +7 -0
- data/spec/fixtures/responses/whois.nic.mu/status_registered.expected +9 -2
- data/spec/fixtures/responses/whois.nic.mu/status_registered.txt +52 -8
- data/spec/fixtures/responses/whois.nic.net.nf/status_registered.expected +7 -0
- data/spec/fixtures/responses/whois.nic.net.ng/status_registered.expected +7 -0
- data/spec/fixtures/responses/whois.nic.net.sb/status_registered.expected +7 -0
- data/spec/fixtures/responses/whois.nic.tl/status_registered.expected +9 -2
- data/spec/fixtures/responses/whois.nic.tl/status_registered.txt +42 -5
- data/spec/fixtures/responses/whois.nic.uk/property_nameservers_with_ip.txt +11 -7
- data/spec/fixtures/responses/whois.nic.uk/property_registrant_type_individual.txt +45 -0
- data/spec/fixtures/responses/whois.nic.uk/{property_status_registered.txt → property_registrant_type_unknown.txt} +5 -5
- data/spec/fixtures/responses/whois.nic.uk/property_status_missing.txt +2 -2
- data/spec/fixtures/responses/whois.nic.uk/property_status_no_status_listed.txt +2 -2
- data/spec/fixtures/responses/whois.nic.uk/property_status_registered_until_expiry_date.txt +18 -13
- data/spec/fixtures/responses/whois.nic.uk/property_status_suspended.txt +51 -51
- data/spec/fixtures/responses/whois.nic.uk/status_available.txt +2 -2
- data/spec/fixtures/responses/whois.nic.uk/status_invalid.txt +2 -2
- data/spec/fixtures/responses/whois.nic.uk/status_registered.expected +2 -2
- data/spec/fixtures/responses/whois.nic.uk/status_registered.txt +5 -5
- data/spec/fixtures/responses/whois.nic.uk/status_reserved.expected +1 -1
- data/spec/fixtures/responses/whois.nic.uk/status_reserved.txt +2 -2
- data/spec/fixtures/responses/whois.nic.uk/status_suspended.expected +1 -1
- data/spec/fixtures/responses/whois.nic.uk/status_suspended.txt +51 -51
- data/spec/fixtures/responses/whois.registry.gy/status_registered.expected +7 -0
- data/spec/fixtures/responses/whois.registry.om/status_available.expected +56 -0
- data/spec/fixtures/responses/whois.registry.om/status_available.txt +1 -0
- data/spec/fixtures/responses/whois.registry.om/status_registered.expected +100 -0
- data/spec/fixtures/responses/whois.registry.om/status_registered.txt +18 -0
- data/spec/fixtures/responses/whois.rnids.rs/property_nameservers_hyphenated.expected +9 -0
- data/spec/fixtures/responses/whois.rnids.rs/property_nameservers_hyphenated.txt +36 -0
- data/spec/fixtures/responses/whois.rnids.rs/token_whois_privacy.expected +11 -0
- data/spec/fixtures/responses/whois.rnids.rs/token_whois_privacy.txt +36 -0
- data/spec/fixtures/responses/whois.srs.net.nz/response_throttled.expected +2 -0
- data/spec/fixtures/responses/whois.srs.net.nz/response_throttled.txt +27 -0
- data/spec/fixtures/responses/whois.srs.net.nz/status_available.expected +4 -0
- data/spec/fixtures/responses/whois.srs.net.nz/status_available.txt +2 -3
- data/spec/fixtures/responses/whois.srs.net.nz/status_invalid.expected +4 -0
- data/spec/fixtures/responses/whois.srs.net.nz/status_invalid.txt +2 -3
- data/spec/fixtures/responses/whois.srs.net.nz/status_registered.expected +6 -2
- data/spec/fixtures/responses/whois.srs.net.nz/status_registered.txt +5 -4
- data/spec/fixtures/responses/whois.tznic.or.tz/property_status_expired.expected +8 -0
- data/spec/fixtures/responses/whois.tznic.or.tz/property_status_expired.txt +56 -0
- data/spec/support/helpers/spec_helper.rb +0 -5
- data/spec/tlds +4 -2
- data/spec/whois/record/contact_spec.rb +8 -8
- data/spec/whois/record/nameserver_spec.rb +6 -6
- data/spec/whois/record/parser/base_spec.rb +11 -11
- data/spec/whois/record/parser/blank_spec.rb +1 -1
- data/spec/whois/record/parser/responses/whois.ati.tn/status_available_spec.rb +108 -0
- data/spec/whois/record/parser/responses/whois.ati.tn/status_registered_spec.rb +173 -0
- data/spec/whois/record/parser/responses/whois.cctld.uz/property_expires_on_dash_spec.rb +29 -0
- data/spec/whois/record/parser/responses/whois.cctld.uz/property_status_reserved_spec.rb +39 -0
- data/spec/whois/record/parser/responses/{whois.nic.uk/property_status_registered_spec.rb → whois.co.ug/property_status_active_spec.rb} +4 -4
- data/spec/whois/record/parser/responses/whois.co.ug/property_status_unconfirmed_spec.rb +39 -0
- data/spec/whois/record/parser/responses/whois.dns.be/{response_throttled_spec.rb → response_throttled_hourly_spec.rb} +3 -3
- data/spec/whois/record/parser/responses/whois.dns.be/{response_throttled_max_spec.rb → response_throttled_limit_spec.rb} +3 -3
- data/spec/whois/record/parser/responses/whois.dns.hr/status_registered_spec.rb +13 -11
- data/spec/whois/record/parser/responses/whois.domain-registry.nl/status_available_spec.rb +5 -0
- data/spec/whois/record/parser/responses/whois.domain-registry.nl/status_redemption_spec.rb +5 -0
- data/spec/whois/record/parser/responses/whois.educause.edu/property_contact_registrant_spec.rb +44 -0
- data/spec/whois/record/parser/responses/whois.educause.edu/property_contact_registrant_with_additional_organization_spec.rb +44 -0
- data/spec/whois/record/parser/responses/whois.educause.edu/property_contact_registrant_without_address_spec.rb +44 -0
- data/spec/whois/record/parser/responses/whois.educause.edu/property_contact_registrant_without_zip_spec.rb +44 -0
- data/spec/whois/record/parser/responses/whois.educause.edu/property_contacts_case1_spec.rb +43 -0
- data/spec/whois/record/parser/responses/whois.educause.edu/property_contacts_case2_spec.rb +43 -0
- data/spec/whois/record/parser/responses/whois.educause.edu/property_contacts_case3_spec.rb +43 -0
- data/spec/whois/record/parser/responses/whois.educause.edu/property_contacts_case4_spec.rb +43 -0
- data/spec/whois/record/parser/responses/whois.educause.edu/property_contacts_spec.rb +43 -0
- data/spec/whois/record/parser/responses/whois.educause.edu/status_available_spec.rb +48 -0
- data/spec/whois/record/parser/responses/whois.educause.edu/status_registered_spec.rb +83 -8
- data/spec/whois/record/parser/responses/whois.hkirc.hk/property_expires_on_null_spec.rb +29 -0
- data/spec/whois/record/parser/responses/whois.na-nic.com.na/property_status_active_spec.rb +39 -0
- data/spec/whois/record/parser/responses/whois.na-nic.com.na/property_status_delegated_spec.rb +39 -0
- data/spec/whois/record/parser/responses/whois.na-nic.com.na/status_registered_spec.rb +10 -2
- data/spec/whois/record/parser/responses/whois.nic.af/status_registered_spec.rb +15 -3
- data/spec/whois/record/parser/responses/whois.nic.cx/status_registered_spec.rb +8 -0
- data/spec/whois/record/parser/responses/whois.nic.gl/status_available_spec.rb +10 -0
- data/spec/whois/record/parser/responses/whois.nic.gl/status_registered_spec.rb +18 -0
- data/spec/whois/record/parser/responses/whois.nic.gs/status_registered_spec.rb +8 -0
- data/spec/whois/record/parser/responses/whois.nic.ht/status_registered_spec.rb +10 -2
- data/spec/whois/record/parser/responses/whois.nic.ki/status_registered_spec.rb +8 -0
- data/spec/whois/record/parser/responses/whois.nic.ms/status_registered_spec.rb +8 -0
- data/spec/whois/record/parser/responses/whois.nic.mu/status_registered_spec.rb +10 -2
- data/spec/whois/record/parser/responses/whois.nic.net.nf/status_registered_spec.rb +8 -0
- data/spec/whois/record/parser/responses/whois.nic.net.ng/status_registered_spec.rb +8 -0
- data/spec/whois/record/parser/responses/whois.nic.net.sb/status_registered_spec.rb +8 -0
- data/spec/whois/record/parser/responses/whois.nic.tl/status_registered_spec.rb +10 -2
- data/spec/whois/record/parser/responses/whois.nic.uk/status_registered_spec.rb +2 -2
- data/spec/whois/record/parser/responses/whois.nic.uk/status_reserved_spec.rb +1 -1
- data/spec/whois/record/parser/responses/whois.nic.uk/status_suspended_spec.rb +1 -1
- data/spec/whois/record/parser/responses/whois.registry.gy/status_registered_spec.rb +8 -0
- data/spec/whois/record/parser/responses/whois.registry.om/status_available_spec.rb +107 -0
- data/spec/whois/record/parser/responses/whois.registry.om/status_registered_spec.rb +151 -0
- data/spec/whois/record/parser/responses/whois.rnids.rs/property_nameservers_hyphenated_spec.rb +36 -0
- data/spec/whois/record/parser/responses/whois.rnids.rs/token_whois_privacy_spec.rb +42 -0
- data/spec/whois/record/parser/responses/whois.srs.net.nz/response_throttled_spec.rb +29 -0
- data/spec/whois/record/parser/responses/whois.srs.net.nz/status_available_spec.rb +5 -0
- data/spec/whois/record/parser/responses/whois.srs.net.nz/status_invalid_spec.rb +5 -0
- data/spec/whois/record/parser/responses/whois.srs.net.nz/status_registered_spec.rb +7 -2
- data/spec/whois/record/parser/responses/whois.tznic.or.tz/property_status_expired_spec.rb +39 -0
- data/spec/whois/record/parser_spec.rb +25 -25
- data/spec/whois/record/part_spec.rb +5 -5
- data/spec/whois/record/registrar_spec.rb +8 -8
- data/spec/whois/record/super_struct_spec.rb +0 -1
- data/spec/whois/record_spec.rb +12 -12
- data/spec/whois/server/adapters/afilias_spec.rb +2 -2
- data/spec/whois/server/adapters/formatted_spec.rb +1 -1
- data/spec/whois/server/adapters/pir_spec.rb +2 -2
- data/spec/whois/server/adapters/standard_spec.rb +1 -1
- data/spec/whois/server/adapters/verisign_spec.rb +2 -2
- data/whois.gemspec +6 -6
- metadata +97 -20
- data/.rspec +0 -1
- data/spec/fixtures/responses/whois.educause.edu/property_registrant_without_address.expected +0 -11
- data/spec/fixtures/responses/whois.educause.edu/property_registrant_without_zip.expected +0 -12
- data/spec/whois/record/parser/responses/whois.educause.edu/property_registrant_without_address_spec.rb +0 -38
- data/spec/whois/record/parser/responses/whois.educause.edu/property_registrant_without_zip_spec.rb +0 -39
@@ -14,11 +14,10 @@ module Whois
|
|
14
14
|
class Record
|
15
15
|
class Parser
|
16
16
|
|
17
|
-
#
|
18
|
-
# = whois.tonic.to parser
|
19
|
-
#
|
20
17
|
# Parser for the whois.tonic.to server.
|
21
18
|
#
|
19
|
+
# @see Whois::Record::Parser::Example
|
20
|
+
# The Example parser for the list of all available methods.
|
22
21
|
class WhoisTonicTo < Base
|
23
22
|
|
24
23
|
property_not_supported :disclaimer
|
@@ -62,7 +62,7 @@ module Whois
|
|
62
62
|
property_supported :nameservers do
|
63
63
|
if content_for_scanner =~ /Domain servers in listed order:\n((.+\n)+)\n/
|
64
64
|
$1.split("\n").map do |name|
|
65
|
-
Record::Nameserver.new(name.strip)
|
65
|
+
Record::Nameserver.new(:name => name.strip)
|
66
66
|
end
|
67
67
|
end
|
68
68
|
end
|
@@ -30,9 +30,13 @@ module Whois
|
|
30
30
|
property_supported :status do
|
31
31
|
if content_for_scanner =~ /status:\s+(.+)\n/
|
32
32
|
case $1.downcase
|
33
|
-
|
34
|
-
|
35
|
-
|
33
|
+
when "paid and in zone"
|
34
|
+
:registered
|
35
|
+
# NEWSTATUS (redemption?)
|
36
|
+
when "expired"
|
37
|
+
:expired
|
38
|
+
else
|
39
|
+
Whois.bug!(ParserError, "Unknown status `#{$1}'.")
|
36
40
|
end
|
37
41
|
else
|
38
42
|
:available
|
@@ -69,7 +73,7 @@ module Whois
|
|
69
73
|
|
70
74
|
property_supported :nameservers do
|
71
75
|
content_for_scanner.scan(/nserver:\s+(.+)\n/).flatten.map do |name|
|
72
|
-
Record::Nameserver.new(name.strip)
|
76
|
+
Record::Nameserver.new(:name => name.strip)
|
73
77
|
end
|
74
78
|
end
|
75
79
|
|
@@ -30,9 +30,10 @@ module Whois
|
|
30
30
|
property_supported :status do
|
31
31
|
if content_for_scanner =~ /Status:\s+(.+?)\n/
|
32
32
|
case $1.downcase
|
33
|
-
|
34
|
-
|
35
|
-
|
33
|
+
when "active"
|
34
|
+
:registered
|
35
|
+
else
|
36
|
+
Whois.bug!(ParserError, "Unknown status `#{$1}'.")
|
36
37
|
end
|
37
38
|
else
|
38
39
|
:available
|
@@ -62,7 +63,7 @@ module Whois
|
|
62
63
|
property_supported :nameservers do
|
63
64
|
if content_for_scanner =~ /Domain servers:\n\n((.+\n)+)\n/
|
64
65
|
$1.split("\n").map do |name|
|
65
|
-
Record::Nameserver.new(name.strip.downcase)
|
66
|
+
Record::Nameserver.new(:name => name.strip.downcase)
|
66
67
|
end
|
67
68
|
end
|
68
69
|
end
|
@@ -62,7 +62,7 @@ module Whois
|
|
62
62
|
property_supported :nameservers do
|
63
63
|
if content_for_scanner =~ /Domain Name Servers listed in order:\n\n((.+\n)+)\n/
|
64
64
|
$1.split("\n").reject { |value| value.strip.empty? }.map do |name|
|
65
|
-
Record::Nameserver.new(name.strip)
|
65
|
+
Record::Nameserver.new(:name => name.strip)
|
66
66
|
end
|
67
67
|
end
|
68
68
|
end
|
@@ -62,7 +62,7 @@ module Whois
|
|
62
62
|
property_supported :nameservers do
|
63
63
|
if content_for_scanner =~ /Domain Name Servers listed in order:\n\n((.+\n)+)\n/
|
64
64
|
$1.split("\n").reject { |value| value.strip.empty? }.map do |name|
|
65
|
-
Record::Nameserver.new(name.strip)
|
65
|
+
Record::Nameserver.new(:name => name.strip)
|
66
66
|
end
|
67
67
|
end
|
68
68
|
end
|
@@ -0,0 +1,46 @@
|
|
1
|
+
#--
|
2
|
+
# Ruby Whois
|
3
|
+
#
|
4
|
+
# An intelligent pure Ruby WHOIS client and parser.
|
5
|
+
#
|
6
|
+
# Copyright (c) 2009-2012 Simone Carletti <weppos@weppos.net>
|
7
|
+
#++
|
8
|
+
|
9
|
+
|
10
|
+
require 'whois/record/scanners/base'
|
11
|
+
|
12
|
+
|
13
|
+
module Whois
|
14
|
+
class Record
|
15
|
+
module Scanners
|
16
|
+
|
17
|
+
# Scanner for the whois.ati.tn record.
|
18
|
+
#
|
19
|
+
# @since RELEASE
|
20
|
+
class WhoisAtiTn < Base
|
21
|
+
|
22
|
+
self.tokenizers += [
|
23
|
+
:skip_empty_line,
|
24
|
+
:scan_available,
|
25
|
+
:scan_disclaimer,
|
26
|
+
:scan_keyvalue,
|
27
|
+
]
|
28
|
+
|
29
|
+
|
30
|
+
tokenizer :scan_available do
|
31
|
+
if @input.skip(/^Domain (.+) not found/)
|
32
|
+
@ast["status:available"] = true
|
33
|
+
end
|
34
|
+
end
|
35
|
+
|
36
|
+
tokenizer :scan_disclaimer do
|
37
|
+
if @input.match?(/^All rights reserved/)
|
38
|
+
@ast["field:disclaimer"] = _scan_lines_to_array(/(.+)\n/).join("\n")
|
39
|
+
end
|
40
|
+
end
|
41
|
+
|
42
|
+
end
|
43
|
+
|
44
|
+
end
|
45
|
+
end
|
46
|
+
end
|
@@ -0,0 +1,39 @@
|
|
1
|
+
#--
|
2
|
+
# Ruby Whois
|
3
|
+
#
|
4
|
+
# An intelligent pure Ruby WHOIS client and parser.
|
5
|
+
#
|
6
|
+
# Copyright (c) 2009-2012 Simone Carletti <weppos@weppos.net>
|
7
|
+
#++
|
8
|
+
|
9
|
+
|
10
|
+
require 'whois/record/scanners/base'
|
11
|
+
|
12
|
+
|
13
|
+
module Whois
|
14
|
+
class Record
|
15
|
+
module Scanners
|
16
|
+
|
17
|
+
# Scanner for the whois.registry.om record.
|
18
|
+
#
|
19
|
+
# @since RELEASE
|
20
|
+
class WhoisRegistryOm < Base
|
21
|
+
|
22
|
+
self.tokenizers += [
|
23
|
+
:skip_empty_line,
|
24
|
+
:scan_available,
|
25
|
+
:scan_keyvalue,
|
26
|
+
]
|
27
|
+
|
28
|
+
|
29
|
+
tokenizer :scan_available do
|
30
|
+
if @input.skip(/^No Data Found\n/)
|
31
|
+
@ast['status:available'] = true
|
32
|
+
end
|
33
|
+
end
|
34
|
+
|
35
|
+
end
|
36
|
+
|
37
|
+
end
|
38
|
+
end
|
39
|
+
end
|
@@ -26,6 +26,7 @@ module Whois
|
|
26
26
|
:scan_group_keyvalue,
|
27
27
|
:flag_group_end,
|
28
28
|
:skip_empty_line,
|
29
|
+
:skip_privacy,
|
29
30
|
]
|
30
31
|
|
31
32
|
|
@@ -68,6 +69,10 @@ module Whois
|
|
68
69
|
@input.skip(/^%.*\n/)
|
69
70
|
end
|
70
71
|
|
72
|
+
tokenizer :skip_privacy do
|
73
|
+
@input.skip(/^Whois privacy has been activated for domain.\n/)
|
74
|
+
end
|
75
|
+
|
71
76
|
end
|
72
77
|
|
73
78
|
end
|
@@ -43,18 +43,21 @@ class SuperStruct < Struct
|
|
43
43
|
def initialize(*args)
|
44
44
|
if args.first.is_a? Hash
|
45
45
|
initialize_with_hash(args.first)
|
46
|
+
elsif args.size == 0
|
47
|
+
super
|
46
48
|
else
|
49
|
+
Whois.deprecate "Passing a list of arguments to #{self.class} is deprecated, please use the Hash syntax."
|
47
50
|
super
|
48
51
|
end
|
49
52
|
yield(self) if block_given?
|
50
53
|
end
|
51
54
|
|
52
|
-
|
55
|
+
private
|
53
56
|
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
end
|
57
|
+
def initialize_with_hash(attributes = {})
|
58
|
+
attributes.each do |key, value|
|
59
|
+
self[key] = value
|
58
60
|
end
|
61
|
+
end
|
59
62
|
|
60
63
|
end
|
@@ -133,66 +133,66 @@ module Whois
|
|
133
133
|
|
134
134
|
private
|
135
135
|
|
136
|
-
|
137
|
-
|
138
|
-
|
139
|
-
|
140
|
-
|
141
|
-
|
142
|
-
|
143
|
-
|
144
|
-
|
145
|
-
|
136
|
+
# Store a record part in {#buffer}.
|
137
|
+
#
|
138
|
+
# @param [String] body
|
139
|
+
# @param [String] host
|
140
|
+
# @return [void]
|
141
|
+
#
|
142
|
+
# @api public
|
143
|
+
def buffer_append(body, host)
|
144
|
+
@buffer << Whois::Record::Part.new(:body => body, :host => host)
|
145
|
+
end
|
146
146
|
|
147
|
-
|
148
|
-
|
149
|
-
|
150
|
-
|
151
|
-
|
152
|
-
|
153
|
-
|
147
|
+
# @api internal
|
148
|
+
def buffer_start
|
149
|
+
@buffer = []
|
150
|
+
result = yield(@buffer)
|
151
|
+
@buffer = [] # reset
|
152
|
+
result
|
153
|
+
end
|
154
154
|
|
155
|
-
|
156
|
-
|
157
|
-
|
158
|
-
|
159
|
-
|
160
|
-
|
161
|
-
# This is a hack to prevent +TCPSocket.new+ to crash
|
162
|
-
# when resolv-replace.rb file is required.
|
163
|
-
#
|
164
|
-
# +TCPSocket.new+ defaults +local_host+ and +local_port+ to nil
|
165
|
-
# but when you require resolv-replace.rb, +local_host+
|
166
|
-
# is resolved when you pass any local parameter and in case of nil
|
167
|
-
# it raises the following error
|
168
|
-
#
|
169
|
-
# ArgumentError: cannot interpret as DNS name: nil
|
170
|
-
#
|
171
|
-
if options[:bind_host] || options[:bind_port]
|
172
|
-
args.push(options[:bind_host] || DEFAULT_BIND_HOST)
|
173
|
-
args.push(options[:bind_port]) if options[:bind_port]
|
174
|
-
end
|
175
|
-
|
176
|
-
ask_the_socket(query, *args)
|
177
|
-
|
178
|
-
rescue *RESCUABLE_CONNECTION_ERRORS => error
|
179
|
-
raise ConnectionError, "#{error.class}: #{error.message}"
|
180
|
-
end
|
155
|
+
# @api public
|
156
|
+
def query_the_socket(query, host, port = nil)
|
157
|
+
args = []
|
158
|
+
args.push(host)
|
159
|
+
args.push(port || options[:port] || DEFAULT_WHOIS_PORT)
|
181
160
|
|
182
|
-
# This
|
183
|
-
#
|
161
|
+
# This is a hack to prevent +TCPSocket.new+ to crash
|
162
|
+
# when resolv-replace.rb file is required.
|
163
|
+
#
|
164
|
+
# +TCPSocket.new+ defaults +local_host+ and +local_port+ to nil
|
165
|
+
# but when you require resolv-replace.rb, +local_host+
|
166
|
+
# is resolved when you pass any local parameter and in case of nil
|
167
|
+
# it raises the following error
|
184
168
|
#
|
185
|
-
#
|
169
|
+
# ArgumentError: cannot interpret as DNS name: nil
|
186
170
|
#
|
187
|
-
|
188
|
-
|
189
|
-
|
190
|
-
client.write("#{query}\r\n") # I could use put(foo) and forget the \n
|
191
|
-
client.read # but write/read is more symmetric than puts/read
|
192
|
-
ensure # and I really want to use read instead of gets.
|
193
|
-
client.close if client # If != client something went wrong.
|
171
|
+
if options[:bind_host] || options[:bind_port]
|
172
|
+
args.push(options[:bind_host] || DEFAULT_BIND_HOST)
|
173
|
+
args.push(options[:bind_port]) if options[:bind_port]
|
194
174
|
end
|
195
175
|
|
176
|
+
ask_the_socket(query, *args)
|
177
|
+
|
178
|
+
rescue *RESCUABLE_CONNECTION_ERRORS => error
|
179
|
+
raise ConnectionError, "#{error.class}: #{error.message}"
|
180
|
+
end
|
181
|
+
|
182
|
+
# This method handles the lowest connection
|
183
|
+
# to the WHOIS server.
|
184
|
+
#
|
185
|
+
# This is for internal use only!
|
186
|
+
#
|
187
|
+
# @api internal
|
188
|
+
def ask_the_socket(query, *args)
|
189
|
+
client = TCPSocket.new(*args)
|
190
|
+
client.write("#{query}\r\n") # I could use put(foo) and forget the \n
|
191
|
+
client.read # but write/read is more symmetric than puts/read
|
192
|
+
ensure # and I really want to use read instead of gets.
|
193
|
+
client.close if client # If != client something went wrong.
|
194
|
+
end
|
195
|
+
|
196
196
|
end
|
197
197
|
|
198
198
|
end
|
data/lib/whois/version.rb
CHANGED
@@ -0,0 +1,57 @@
|
|
1
|
+
#disclaimer
|
2
|
+
should: %s == "All rights reserved.\nCopyright \"Tunisian Internet Agency - http://whois.tn\""
|
3
|
+
|
4
|
+
|
5
|
+
#domain
|
6
|
+
should: %s == nil
|
7
|
+
|
8
|
+
#domain_id
|
9
|
+
should: %s raise_error(Whois::PropertyNotSupported)
|
10
|
+
|
11
|
+
|
12
|
+
#referral_url
|
13
|
+
should: %s raise_error(Whois::PropertyNotSupported)
|
14
|
+
|
15
|
+
#referral_whois
|
16
|
+
should: %s raise_error(Whois::PropertyNotSupported)
|
17
|
+
|
18
|
+
|
19
|
+
#status
|
20
|
+
should: %s == :available
|
21
|
+
|
22
|
+
#available?
|
23
|
+
should: %s == true
|
24
|
+
|
25
|
+
#registered?
|
26
|
+
should: %s == false
|
27
|
+
|
28
|
+
|
29
|
+
#created_on
|
30
|
+
should: %s == nil
|
31
|
+
|
32
|
+
#updated_on
|
33
|
+
should: %s raise_error(Whois::PropertyNotSupported)
|
34
|
+
|
35
|
+
#expires_on
|
36
|
+
should: %s raise_error(Whois::PropertyNotSupported)
|
37
|
+
|
38
|
+
|
39
|
+
#registrar
|
40
|
+
should: %s == nil
|
41
|
+
|
42
|
+
#registrant_contacts
|
43
|
+
should: %s CLASS(array)
|
44
|
+
should: %s == []
|
45
|
+
|
46
|
+
#admin_contacts
|
47
|
+
should: %s CLASS(array)
|
48
|
+
should: %s == []
|
49
|
+
|
50
|
+
#technical_contacts
|
51
|
+
should: %s CLASS(array)
|
52
|
+
should: %s == []
|
53
|
+
|
54
|
+
|
55
|
+
#nameservers
|
56
|
+
should: %s CLASS(array)
|
57
|
+
should: %s == []
|
@@ -0,0 +1,122 @@
|
|
1
|
+
#disclaimer
|
2
|
+
should: %s == "All rights reserved.\nCopyright \"Tunisian Internet Agency - http://whois.tn\""
|
3
|
+
|
4
|
+
|
5
|
+
#domain
|
6
|
+
should: %s == "google.tn"
|
7
|
+
|
8
|
+
#domain_id
|
9
|
+
should: %s raise_error(Whois::PropertyNotSupported)
|
10
|
+
|
11
|
+
|
12
|
+
#referral_url
|
13
|
+
should: %s raise_error(Whois::PropertyNotSupported)
|
14
|
+
|
15
|
+
#referral_whois
|
16
|
+
should: %s raise_error(Whois::PropertyNotSupported)
|
17
|
+
|
18
|
+
|
19
|
+
#status
|
20
|
+
should: %s == :registered
|
21
|
+
|
22
|
+
#available?
|
23
|
+
should: %s == false
|
24
|
+
|
25
|
+
#registered?
|
26
|
+
should: %s == true
|
27
|
+
|
28
|
+
|
29
|
+
#created_on
|
30
|
+
should: %s CLASS(time)
|
31
|
+
should: %s == Time.parse("2009-05-14 00:00:00")
|
32
|
+
|
33
|
+
#updated_on
|
34
|
+
should: %s raise_error(Whois::PropertyNotSupported)
|
35
|
+
|
36
|
+
#expires_on
|
37
|
+
should: %s raise_error(Whois::PropertyNotSupported)
|
38
|
+
|
39
|
+
|
40
|
+
#registrar
|
41
|
+
should: %s CLASS(registrar)
|
42
|
+
should: %s.id == nil
|
43
|
+
should: %s.name == "3S Global Net"
|
44
|
+
should: %s.organization == nil
|
45
|
+
should: %s.url == nil
|
46
|
+
|
47
|
+
#registrant_contacts
|
48
|
+
should: %s CLASS(array)
|
49
|
+
should: %s SIZE(1)
|
50
|
+
should: %s[0] CLASS(contact)
|
51
|
+
should: %s[0].type == Whois::Record::Contact::TYPE_REGISTRANT
|
52
|
+
should: %s[0].id == nil
|
53
|
+
should: %s[0].name == "GOOGLE Inc"
|
54
|
+
should: %s[0].organization == nil
|
55
|
+
should: %s[0].address == "PO BOX 2050 Moutain view CA 94042 USA"
|
56
|
+
should: %s[0].city == nil
|
57
|
+
should: %s[0].zip == nil
|
58
|
+
should: %s[0].state == nil
|
59
|
+
should: %s[0].country == nil
|
60
|
+
should: %s[0].country_code == nil
|
61
|
+
should: %s[0].phone == "+1 925 685 9600"
|
62
|
+
should: %s[0].fax == "+1 925 685 9620"
|
63
|
+
should: %s[0].email == "dns-admin@google.com"
|
64
|
+
should: %s[0].created_on == Time.parse("2009-05-14 00:00:00")
|
65
|
+
should: %s[0].updated_on == Time.parse("2010-07-18 00:00:00")
|
66
|
+
|
67
|
+
#admin_contacts
|
68
|
+
should: %s CLASS(array)
|
69
|
+
should: %s SIZE(1)
|
70
|
+
should: %s[0] CLASS(contact)
|
71
|
+
should: %s[0].type == Whois::Record::Contact::TYPE_ADMIN
|
72
|
+
should: %s[0].id == nil
|
73
|
+
should: %s[0].name == "GOOGLE Inc"
|
74
|
+
should: %s[0].organization == nil
|
75
|
+
should: %s[0].address == "PO BOX 2050 Moutain view CA 94042 USA"
|
76
|
+
should: %s[0].city == nil
|
77
|
+
should: %s[0].zip == nil
|
78
|
+
should: %s[0].state == nil
|
79
|
+
should: %s[0].country == nil
|
80
|
+
should: %s[0].country_code == nil
|
81
|
+
should: %s[0].phone == "+1 925 685 9600"
|
82
|
+
should: %s[0].fax == "+1 925 685 9620"
|
83
|
+
should: %s[0].email == "dns-admin@google.com"
|
84
|
+
should: %s[0].created_on == Time.parse("2009-05-14 00:00:00")
|
85
|
+
should: %s[0].updated_on == Time.parse("2010-07-18 00:00:00")
|
86
|
+
|
87
|
+
#technical_contacts
|
88
|
+
should: %s CLASS(array)
|
89
|
+
should: %s SIZE(1)
|
90
|
+
should: %s[0] CLASS(contact)
|
91
|
+
should: %s[0].type == Whois::Record::Contact::TYPE_TECHNICAL
|
92
|
+
should: %s[0].id == nil
|
93
|
+
should: %s[0].name == "GOOGLE Inc"
|
94
|
+
should: %s[0].organization == nil
|
95
|
+
should: %s[0].address == "PO BOX 2050 Moutain view CA 94042 USA"
|
96
|
+
should: %s[0].city == nil
|
97
|
+
should: %s[0].zip == nil
|
98
|
+
should: %s[0].state == nil
|
99
|
+
should: %s[0].country == nil
|
100
|
+
should: %s[0].country_code == nil
|
101
|
+
should: %s[0].phone == "+1 925 685 9600"
|
102
|
+
should: %s[0].fax == "+1 925 685 9620"
|
103
|
+
should: %s[0].email == "dns-admin@google.com"
|
104
|
+
should: %s[0].created_on == Time.parse("2009-05-14 00:00:00")
|
105
|
+
should: %s[0].updated_on == Time.parse("2010-07-18 00:00:00")
|
106
|
+
|
107
|
+
|
108
|
+
#nameservers
|
109
|
+
should: %s CLASS(array)
|
110
|
+
should: %s SIZE(4)
|
111
|
+
should: %s[0] CLASS(nameserver)
|
112
|
+
should: %s[0].name == "ns1.google.com"
|
113
|
+
should: %s[0].ipv4 == "216.239.32.10"
|
114
|
+
should: %s[1] CLASS(nameserver)
|
115
|
+
should: %s[1].name == "ns2.google.com"
|
116
|
+
should: %s[1].ipv4 == "216.239.34.10"
|
117
|
+
should: %s[2] CLASS(nameserver)
|
118
|
+
should: %s[2].name == "ns3.google.com"
|
119
|
+
should: %s[2].ipv4 == "216.239.36.10"
|
120
|
+
should: %s[3] CLASS(nameserver)
|
121
|
+
should: %s[3].name == "ns4.google.com"
|
122
|
+
should: %s[3].ipv4 == "216.239.38.10"
|