From 00abeddde8adc0491f268a2f9c1fd600ea281a79 Mon Sep 17 00:00:00 2001 From: Adrien Rey-Jarthon Date: Tue, 9 Nov 2021 11:28:43 +0100 Subject: [PATCH 01/29] Update in.ua parser --- Rakefile | 4 + lib/whois/parsers/whois.in.ua.rb | 18 +-- .../in.ua/status_available.expected | 2 +- .../whois.in.ua/in.ua/status_available.txt | 16 ++- .../in.ua/status_registered.expected | 13 ++- .../whois.in.ua/in.ua/status_registered.txt | 106 +++++++++++++++--- .../in.ua/status_available_spec.rb | 2 +- .../in.ua/status_registered_spec.rb | 13 ++- 8 files changed, 133 insertions(+), 41 deletions(-) diff --git a/Rakefile b/Rakefile index ed1263e0..39669660 100644 --- a/Rakefile +++ b/Rakefile @@ -31,3 +31,7 @@ task :clobber => "yardoc:clobber" Dir["tasks/**/*.rake"].each do |file| load(file) end + +task :console do + sh "irb -r rubygems -I lib -r whois-parser.rb" +end \ No newline at end of file diff --git a/lib/whois/parsers/whois.in.ua.rb b/lib/whois/parsers/whois.in.ua.rb index ef7a2c90..f64dfe54 100644 --- a/lib/whois/parsers/whois.in.ua.rb +++ b/lib/whois/parsers/whois.in.ua.rb @@ -38,7 +38,7 @@ class WhoisInUa < Base end property_supported :available? do - !!(content_for_scanner =~ /No records found for object/) + !!(content_for_scanner =~ /Domain name does not exist/) end property_supported :registered? do @@ -46,19 +46,21 @@ class WhoisInUa < Base end - property_not_supported :created_on + property_supported :created_on do + if content_for_scanner =~ /created:\s+(.*)\n/ + parse_time($1) + end + end property_supported :updated_on do - if content_for_scanner =~ /changed:\s+(.*)\n/ - time = $1.split(" ").last - Time.strptime(time, "%Y%m%d%H%M%S") + if content_for_scanner =~ /modified:\s+(.*)\n/ + parse_time($1) end end property_supported :expires_on do - if content_for_scanner =~ /status:\s+(.*)\n/ - time = $1.split(" ").last - Time.strptime(time, "%Y%m%d%H%M%S") + if content_for_scanner =~ /expires:\s+(.*)\n/ + parse_time($1) end end diff --git a/spec/fixtures/responses/whois.in.ua/in.ua/status_available.expected b/spec/fixtures/responses/whois.in.ua/in.ua/status_available.expected index f304d3ea..3d5a25f8 100644 --- a/spec/fixtures/responses/whois.in.ua/in.ua/status_available.expected +++ b/spec/fixtures/responses/whois.in.ua/in.ua/status_available.expected @@ -9,7 +9,7 @@ #created_on - %s %ERROR{AttributeNotSupported} + %s == nil #updated_on %s == nil diff --git a/spec/fixtures/responses/whois.in.ua/in.ua/status_available.txt b/spec/fixtures/responses/whois.in.ua/in.ua/status_available.txt index 32b98a39..f03d6d0e 100644 --- a/spec/fixtures/responses/whois.in.ua/in.ua/status_available.txt +++ b/spec/fixtures/responses/whois.in.ua/in.ua/status_available.txt @@ -1,4 +1,12 @@ -% In.UA whois server. (whois.in.ua) -% All questions regarding this service please send to help@whois.in.ua -% To search for domains and In.UA maintainers using the web, visit http://whois.in.ua -% No records found for object U34JEDZCQ.IN.UA +% This is the SUNIC WHOIS server. +% The Whois is subject to Terms of use +% See https://hostmaster.ua/documents.php +% +% In the process of delegation of a domain name, +% the Registrant is an entity who uses and manages a certain domain name, +% and the Registrar is a business entity that provides the Registrant +% with the services necessary for the technical maintenance of the +% registration and operation of the domain name. +% For information on the Registrant's domain name, you should contact the Registrar. + +u34jedzcq.in.ua - Domain name does not exist diff --git a/spec/fixtures/responses/whois.in.ua/in.ua/status_registered.expected b/spec/fixtures/responses/whois.in.ua/in.ua/status_registered.expected index 63c8d320..b1b2b244 100644 --- a/spec/fixtures/responses/whois.in.ua/in.ua/status_registered.expected +++ b/spec/fixtures/responses/whois.in.ua/in.ua/status_registered.expected @@ -9,23 +9,24 @@ #created_on - %s %ERROR{AttributeNotSupported} + %s %CLASS{time} + %s %TIME{2007-12-18 20:12:35 +02:00} #updated_on %s %CLASS{time} - %s %TIME{2012-12-16 13:41:04} + %s %TIME{2019-12-03 11:15:10 +02:00} #expires_on %s %CLASS{time} - %s %TIME{2013-12-18 00:00:00} + %s %TIME{2020-12-20 00:00:00 +02:00} #nameservers %s %CLASS{array} %s %SIZE{3} %s[0] %CLASS{nameserver} - %s[0].name == "ns12.uadns.com" + %s[0].name == "ns10.uadns.com" %s[1] %CLASS{nameserver} - %s[1].name == "ns11.uadns.com" + %s[1].name == "ns12.uadns.com" %s[2] %CLASS{nameserver} - %s[2].name == "ns10.uadns.com" + %s[2].name == "ns11.uadns.com" diff --git a/spec/fixtures/responses/whois.in.ua/in.ua/status_registered.txt b/spec/fixtures/responses/whois.in.ua/in.ua/status_registered.txt index fc0adcd8..9aa3f66c 100644 --- a/spec/fixtures/responses/whois.in.ua/in.ua/status_registered.txt +++ b/spec/fixtures/responses/whois.in.ua/in.ua/status_registered.txt @@ -1,16 +1,92 @@ -% In.UA whois server. (whois.in.ua) -% All questions regarding this service please send to help@whois.in.ua -% To search for domains and In.UA maintainers using the web, visit http://whois.in.ua -domain: dle.in.ua -descr: dle.in.ua -admin-c: VP535-UANIC -tech-c: NIC-UANIC -status: OK-UNTIL 20131218000000 -nserver: NS12.UADNS.COM -nserver: NS11.UADNS.COM -nserver: NS10.UADNS.COM -mnt-by: DRS-MNT-INUA -mnt-lower: DRS-MNT-INUA -changed: notify@drs.ua 20121216134104 -source: INUA +% This is the SUNIC WHOIS server. +% The Whois is subject to Terms of use +% See https://hostmaster.ua/documents.php +% +% In the process of delegation of a domain name, +% the Registrant is an entity who uses and manages a certain domain name, +% and the Registrar is a business entity that provides the Registrant +% with the services necessary for the technical maintenance of the +% registration and operation of the domain name. +% For information on the Registrant's domain name, you should contact the Registrar. + +domain: dle.in.ua +dom-public: NO +mnt-by: ua.nic +nserver: ns10.uadns.com +nserver: ns12.uadns.com +nserver: ns11.uadns.com +status: ok +created: 2007-12-18 20:12:35+02 +modified: 2019-12-03 11:15:10+02 +expires: 2020-12-20 00:00:00+02 +source: SUNIC + +% Registrar: +% ========== +registrar: ua.nic +organization: NIC.UA LLC +organization-loc: ТОВ «НІК.ЮЕЙ» +url: http://nic.ua +city: Dnipro +country: UA +abuse-email: abuse@nic.ua +abuse-phone: +380.445933222 +abuse-postal: Ukraine 49000 Dnipro PO/BOX 80 +abuse-postal-loc: UA 49000 Днепр а/я 80 +source: SUNIC + +% Registrant: +% =========== +person: n/a +organization: n/a +address: n/a +person-loc: not published +organization-loc: not published +address-loc: not published +email: not published +phone: not published +fax: not published +mnt-by: sunic +status: linked +status: ok +created: 2017-09-30 01:31:30+03 +modified: 2017-09-30 01:31:30+03 +source: SUNIC + +% Administrative Contacts: +% ======================== +person: n/a +organization: n/a +address: n/a +person-loc: not published +organization-loc: not published +address-loc: not published +email: not published +phone: not published +fax: not published +mnt-by: sunic +status: linked +status: ok +created: 2017-09-30 01:31:30+03 +modified: 2017-09-30 01:31:30+03 +source: SUNIC + + +% Technical Contacts: +% =================== +person: NIC-UANIC +organization: NIC.UA LLC +address: not published +person-loc: n/a +organization-loc: n/a +address-loc: n/a +email: support@nic.ua +phone: +380.445933222 +fax: +380.445937569 +mnt-by: sunic +status: linked +status: ok +created: 2016-09-18 10:37:53+03 +modified: 2016-09-17 10:37:53+03 +source: SUNIC diff --git a/spec/whois/parsers/responses/whois.in.ua/in.ua/status_available_spec.rb b/spec/whois/parsers/responses/whois.in.ua/in.ua/status_available_spec.rb index bb62254d..932b79ce 100644 --- a/spec/whois/parsers/responses/whois.in.ua/in.ua/status_available_spec.rb +++ b/spec/whois/parsers/responses/whois.in.ua/in.ua/status_available_spec.rb @@ -38,7 +38,7 @@ end describe "#created_on" do it do - expect { subject.created_on }.to raise_error(Whois::AttributeNotSupported) + expect(subject.created_on).to eq(nil) end end describe "#updated_on" do diff --git a/spec/whois/parsers/responses/whois.in.ua/in.ua/status_registered_spec.rb b/spec/whois/parsers/responses/whois.in.ua/in.ua/status_registered_spec.rb index d080a83b..d5b4dc5c 100644 --- a/spec/whois/parsers/responses/whois.in.ua/in.ua/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.in.ua/in.ua/status_registered_spec.rb @@ -38,19 +38,20 @@ end describe "#created_on" do it do - expect { subject.created_on }.to raise_error(Whois::AttributeNotSupported) + expect(subject.created_on).to be_a(Time) + expect(subject.created_on).to eq(Time.parse("2007-12-18 20:12:35 +02:00")) end end describe "#updated_on" do it do expect(subject.updated_on).to be_a(Time) - expect(subject.updated_on).to eq(Time.parse("2012-12-16 13:41:04")) + expect(subject.updated_on).to eq(Time.parse("2019-12-03 11:15:10 +02:00")) end end describe "#expires_on" do it do expect(subject.expires_on).to be_a(Time) - expect(subject.expires_on).to eq(Time.parse("2013-12-18 00:00:00")) + expect(subject.expires_on).to eq(Time.parse("2020-12-20 00:00:00 +02:00")) end end describe "#nameservers" do @@ -58,11 +59,11 @@ expect(subject.nameservers).to be_a(Array) expect(subject.nameservers.size).to eq(3) expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[0].name).to eq("ns12.uadns.com") + expect(subject.nameservers[0].name).to eq("ns10.uadns.com") expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[1].name).to eq("ns11.uadns.com") + expect(subject.nameservers[1].name).to eq("ns12.uadns.com") expect(subject.nameservers[2]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[2].name).to eq("ns10.uadns.com") + expect(subject.nameservers[2].name).to eq("ns11.uadns.com") end end end From 0f130390d7ce12d4f4158155d308b79bec790b21 Mon Sep 17 00:00:00 2001 From: Adrien Rey-Jarthon Date: Tue, 9 Nov 2021 11:46:31 +0100 Subject: [PATCH 02/29] Update changelog and readme about fork status --- CHANGELOG.md | 1 + README.md | 13 +++++++++++++ 2 files changed, 14 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index f20b6cf2..e6da2c3b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,7 @@ This project uses [Semantic Versioning 2.0.0](http://semver.org/). #### master +- CHANGED: Updated .IN.UA parsers to the latest response. (#69, #135) Thanks @Vanav and @jarthod - CHANGED: Minimum Ruby version 2.3 diff --git a/README.md b/README.md index 9f9df463..2c97c304 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,16 @@ +⚠️ WARNING: this repository is a fork of https://github.com/weppos/whois-parser. I created it because the maintainer seems [to have paused](https://github.com/weppos/whois-parser/pull/135) so the project was lagging more and more behind actual WHOIS definitions and the [PR piling up](https://github.com/weppos/whois-parser/pulls). I hope we'll be able to merge this back into the main project eventually but in the meantime if you need a more up-to-date and maintained version you can use this one: + +Gemfile: +```ruby +gem 'whois-parser', github: 'jarthod/whois-parser' # Unofficial but more up-to-date fork, check status at https://github.com/jarthod/whois-parser +``` + +I'll try to merge as much existing PR as possible into this fork and provide my own updates too. I don't want to release the gem under another name at the moment to make it easier to go back to the official gem if possible, if so I'll update this page so you can check it from time to time when you see this comment in your Gemfile. The [CHANGELOG](CHANGELOG.md) file will be updated with all the changes in this fork, you can compare it with the upstream [CHANGELOG](https://github.com/weppos/whois-parser/blob/master/CHANGELOG.md) + +Below is the unmodified upstream Readme to make merging easier. + +--- + # [Whois](https://whoisrb.org/) Parser Whois Parser is a — pure Ruby — WHOIS parser. From c936b0c60fcb3a7de6440296ccc183addd349b27 Mon Sep 17 00:00:00 2001 From: Howard Lu Date: Thu, 4 Apr 2019 13:48:47 -0700 Subject: [PATCH 03/29] Fix AFNIC parsers date format Fix date parsing in AFNIC parsers as the format had changed from DD/MM/YYYY to YYYY-MM-DDThh:mm:ssZ. --- CHANGELOG.md | 1 + lib/whois/parsers/base_nic_fr.rb | 11 +- lib/whois/parsers/whois.nic.yt.rb | 25 ++++ .../property_contact_without_address.expected | 17 --- .../fr/property_contact_without_address.txt | 83 ----------- .../fr/status_registered.expected | 66 ++++----- .../whois.nic.fr/fr/status_registered.txt | 132 +++++++++--------- .../tf/status_registered.expected | 30 ++-- .../whois.nic.fr/tf/status_registered.txt | 82 +++++++---- .../whois.nic.fr/yt/status_registered.txt | 91 ------------ .../pm/status_registered.expected | 30 ++-- .../whois.nic.pm/pm/status_registered.txt | 82 +++++++---- .../re/status_registered.expected | 30 ++-- .../whois.nic.re/re/status_registered.txt | 86 ++++++++---- .../wf/status_registered.expected | 30 ++-- .../whois.nic.wf/wf/status_registered.txt | 76 +++++++--- .../yt/response_throttled.expected | 0 .../yt/response_throttled.txt | 0 .../yt/status_available.expected | 0 .../yt/status_available.txt | 0 .../yt/status_registered.expected | 30 ++-- .../whois.nic.yt/yt/status_registered.txt | 125 +++++++++++++++++ .../property_contact_without_address_spec.rb | 44 ------ .../whois.nic.fr/fr/status_registered_spec.rb | 66 ++++----- .../whois.nic.fr/tf/status_registered_spec.rb | 30 ++-- .../whois.nic.pm/pm/status_registered_spec.rb | 30 ++-- .../whois.nic.re/re/status_registered_spec.rb | 30 ++-- .../whois.nic.wf/wf/status_registered_spec.rb | 30 ++-- .../yt/response_throttled_spec.rb | 8 +- .../yt/status_available_spec.rb | 8 +- .../yt/status_registered_spec.rb | 38 +++-- 31 files changed, 668 insertions(+), 643 deletions(-) create mode 100644 lib/whois/parsers/whois.nic.yt.rb delete mode 100644 spec/fixtures/responses/whois.nic.fr/fr/property_contact_without_address.expected delete mode 100644 spec/fixtures/responses/whois.nic.fr/fr/property_contact_without_address.txt delete mode 100644 spec/fixtures/responses/whois.nic.fr/yt/status_registered.txt rename spec/fixtures/responses/{whois.nic.fr => whois.nic.yt}/yt/response_throttled.expected (100%) rename spec/fixtures/responses/{whois.nic.fr => whois.nic.yt}/yt/response_throttled.txt (100%) rename spec/fixtures/responses/{whois.nic.fr => whois.nic.yt}/yt/status_available.expected (100%) rename spec/fixtures/responses/{whois.nic.fr => whois.nic.yt}/yt/status_available.txt (100%) rename spec/fixtures/responses/{whois.nic.fr => whois.nic.yt}/yt/status_registered.expected (66%) create mode 100644 spec/fixtures/responses/whois.nic.yt/yt/status_registered.txt delete mode 100644 spec/whois/parsers/responses/whois.nic.fr/fr/property_contact_without_address_spec.rb rename spec/whois/parsers/responses/{whois.nic.fr => whois.nic.yt}/yt/response_throttled_spec.rb (67%) rename spec/whois/parsers/responses/{whois.nic.fr => whois.nic.yt}/yt/status_available_spec.rb (87%) rename spec/whois/parsers/responses/{whois.nic.fr => whois.nic.yt}/yt/status_registered_spec.rb (77%) diff --git a/CHANGELOG.md b/CHANGELOG.md index e6da2c3b..493ab99f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,7 @@ This project uses [Semantic Versioning 2.0.0](http://semver.org/). #### master +- FIX: AFNIC parsers date format to avoid returning negative dates (#119) Thanks @itghlu - CHANGED: Updated .IN.UA parsers to the latest response. (#69, #135) Thanks @Vanav and @jarthod - CHANGED: Minimum Ruby version 2.3 diff --git a/lib/whois/parsers/base_nic_fr.rb b/lib/whois/parsers/base_nic_fr.rb index 96bdb446..4b0d8c25 100644 --- a/lib/whois/parsers/base_nic_fr.rb +++ b/lib/whois/parsers/base_nic_fr.rb @@ -52,22 +52,19 @@ class BaseNicFr < Base property_supported :created_on do if content_for_scanner =~ /created:\s+(.+)\n/ - d, m, y = $1.split("/") - parse_time("#{y}-#{m}-#{d}") + parse_time($1) end end property_supported :updated_on do if content_for_scanner =~ /last-update:\s+(.+)\n/ - d, m, y = $1.split("/") - parse_time("#{y}-#{m}-#{d}") + parse_time($1) end end property_supported :expires_on do if content_for_scanner =~ /Expiry Date:\s+(.+)\n/ - d, m, y = $1.split("/") - parse_time("#{y}-#{m}-#{d}") + parse_time($1) end end @@ -136,7 +133,7 @@ def parse_contact(element, type) end end - updated_on = values["changed"] ? Time.utc(*values["changed"].split(" ").first.split("/").reverse) : nil + updated_on = values["changed"] ? parse_time(values["changed"].split(" ").first) : nil Parser::Contact.new({ :type => type, diff --git a/lib/whois/parsers/whois.nic.yt.rb b/lib/whois/parsers/whois.nic.yt.rb new file mode 100644 index 00000000..07e1ce15 --- /dev/null +++ b/lib/whois/parsers/whois.nic.yt.rb @@ -0,0 +1,25 @@ +#-- +# Ruby Whois +# +# An intelligent pure Ruby WHOIS client and parser. +# +# Copyright (c) 2009-2018 Simone Carletti +#++ + + +require_relative 'base_nic_fr' + + +module Whois + class Parsers + + # Parser for the whois.nic.yt server. + # + # @see Whois::Parsers::Example + # The Example parser for the list of all available methods. + # + class WhoisNicYt < BaseNicFr + end + + end +end diff --git a/spec/fixtures/responses/whois.nic.fr/fr/property_contact_without_address.expected b/spec/fixtures/responses/whois.nic.fr/fr/property_contact_without_address.expected deleted file mode 100644 index d7b31734..00000000 --- a/spec/fixtures/responses/whois.nic.fr/fr/property_contact_without_address.expected +++ /dev/null @@ -1,17 +0,0 @@ -#registrant_contacts - %s %CLASS{array} - %s %SIZE{1} - %s[0].type == Whois::Parser::Contact::TYPE_REGISTRANT - %s[0].id == "ANO00-FRNIC" - %s[0].name == "Ano Nymous" - %s[0].organization == nil - %s[0].address == nil - %s[0].city == nil - %s[0].zip == nil - %s[0].state == nil - %s[0].country == nil - %s[0].country_code == nil - %s[0].phone == nil - %s[0].fax == nil - %s[0].email == nil - %s[0].updated_on %TIME{2007-09-03 00:00:00 UTC} diff --git a/spec/fixtures/responses/whois.nic.fr/fr/property_contact_without_address.txt b/spec/fixtures/responses/whois.nic.fr/fr/property_contact_without_address.txt deleted file mode 100644 index 7b2f5bb1..00000000 --- a/spec/fixtures/responses/whois.nic.fr/fr/property_contact_without_address.txt +++ /dev/null @@ -1,83 +0,0 @@ -%% -%% This is the AFNIC Whois server. -%% -%% complete date format : DD/MM/YYYY -%% short date format : DD/MM -%% version : FRNIC-2.5 -%% -%% Rights restricted by copyright. -%% See http://www.afnic.fr/afnic/web/mentions-legales-whois_en -%% -%% Use '-h' option to obtain more information about this service. -%% -%% [82.52.158.225 REQUEST] >> shingara.fr -%% -%% RL Net [##########] - RL IP [#########.] -%% - -domain: shingara.fr -status: ACTIVE -hold: NO -holder-c: ANO00-FRNIC -admin-c: ANO00-FRNIC -tech-c: HU3-FRNIC -zone-c: NFC1-FRNIC -nsl-id: NSL26764-FRNIC -registrar: 1&1 Internet AG -anniversary: 03/09 -created: 03/09/2007 -last-update: 06/07/2009 -source: FRNIC - -ns-list: NSL26764-FRNIC -nserver: ns0.vodkanoire.net -nserver: ns1.vodkanoire.net -nserver: ns2.vodkanoire.net -source: FRNIC - -registrar: 1&1 Internet AG -type: Isp Option 1 -address: Brauerstr. 48 -address: DE-76135 KARLSRUHE -country: DE -phone: +49 721 91374 0 -fax-no: +49 721 91374 215 -e-mail: hostmaster@1und1.de -website: http://registrar.1und1.de -anonymous: NO -registered: 17/01/2001 -source: FRNIC - -nic-hdl: HU3-FRNIC -type: ROLE -contact: Hostmaster UNETUN -address: 1&1 Internet Sarl. -address: 7, place de la Gare -address: 57200 Sarreguemines -country: FR -e-mail: hostmaster@1and1.fr -admin-c: IR2-FRNIC -tech-c: IR2-FRNIC -changed: 15/03/2004 hostmaster@1and1.fr -anonymous: NO -obsoleted: NO -source: FRNIC - -nic-hdl: ANO00-FRNIC -type: PERSON -contact: Ano Nymous -remarks: -------------- WARNING -------------- -remarks: While the registrar knows him/her, -remarks: this person chose to restrict access -remarks: to his/her personal data. So PLEASE, -remarks: don't send emails to Ano Nymous. This -remarks: address is bogus and there is no hope -remarks: of a reply. -remarks: -------------- WARNING -------------- -changed: 03/09/2007 anonymous@nowhere.xx.fr -anonymous: YES -obsoleted: NO -eligstatus: ok -eligdate: 03/09/2007 00:00:00 -source: FRNIC - diff --git a/spec/fixtures/responses/whois.nic.fr/fr/status_registered.expected b/spec/fixtures/responses/whois.nic.fr/fr/status_registered.expected index b527669a..9efae622 100644 --- a/spec/fixtures/responses/whois.nic.fr/fr/status_registered.expected +++ b/spec/fixtures/responses/whois.nic.fr/fr/status_registered.expected @@ -10,15 +10,15 @@ #created_on %s %CLASS{time} - %s %TIME{2000-07-27} + %s %TIME{2004-05-20 11:28:40 UTC} #updated_on %s %CLASS{time} - %s %TIME{2016-12-30} + %s %TIME{2018-04-08 03:52:04 UTC} #expires_on %s %CLASS{time} - %s %TIME{2017-12-30} + %s %TIME{2019-05-07 07:43:45 UTC} #registrant_contacts @@ -26,67 +26,63 @@ %s %SIZE{1} %s[0] %CLASS{contact} %s[0].type == Whois::Parser::Contact::TYPE_REGISTRANT - %s[0].id == "GIH6-FRNIC" + %s[0].id == "U4339-FRNIC" %s[0].name == nil - %s[0].organization == "Google Ireland Holdings" - %s[0].address == "70 Sir John Rogersons Quay\n2 Dublin" + %s[0].organization == "1C2" + %s[0].address == "20-22, rue Louis Armand\n75015 Paris" %s[0].city == nil %s[0].zip == nil %s[0].state == nil %s[0].country == nil - %s[0].country_code == "IE" - %s[0].phone == "+353 14361000" + %s[0].country_code == "FR" + %s[0].phone == "+33 1 30 62 40 06" %s[0].fax == nil - %s[0].email == "dns-admin@google.com" - %s[0].updated_on %TIME{2015-03-20 00:00:00 UTC} + %s[0].email == "jmr@1c2.com" + %s[0].updated_on %TIME{2016-09-22 07:52:47 UTC} #admin_contacts %s %CLASS{array} %s %SIZE{1} %s[0] %CLASS{contact} %s[0].type == Whois::Parser::Contact::TYPE_ADMINISTRATIVE - %s[0].id == "GIH5-FRNIC" - %s[0].name == nil - %s[0].organization == "Google Ireland Holdings" - %s[0].address == "70 Sir John Rogersons Quay\n2 Dublin" + %s[0].id == "MO2494-FRNIC" + %s[0].name == "Magic Online" + %s[0].organization == "Magic Online" + %s[0].address == "130, avenue President Wilson\n93100 Montreuil\nParis" %s[0].city == nil %s[0].zip == nil %s[0].state == nil %s[0].country == nil - %s[0].country_code == "IE" - %s[0].phone == "+353 14361000" - %s[0].fax == nil - %s[0].email == "dns-admin@google.com" - %s[0].updated_on %TIME{2011-12-06 00:00:00 UTC} + %s[0].country_code == "FR" + %s[0].phone == "+33 1 41 58 22 50" + %s[0].fax == "+33 1 56 72 93 30" + %s[0].email == "hostmaster@magic.fr" + %s[0].updated_on %TIME{2014-03-31 16:13:52 UTC} #technical_contacts %s %CLASS{array} %s %SIZE{1} %s[0] %CLASS{contact} %s[0].type == Whois::Parser::Contact::TYPE_TECHNICAL - %s[0].id == "CP4370-FRNIC" - %s[0].name == "Ccops Provisioning" - %s[0].organization == "MarkMonitor" - %s[0].address == "10400 Overland Rd.\nPMB 155\n83709 Boise" + %s[0].id == "MO2556-FRNIC" + %s[0].name == "Magic Online" + %s[0].organization == "Magic Online" + %s[0].address == "130-134, avenue du President Wilson\n93100 Montreuil\nFrance" %s[0].city == nil %s[0].zip == nil %s[0].state == nil %s[0].country == nil - %s[0].country_code == "US" - %s[0].phone == "+1 2083895740" - %s[0].fax == "+1 2083895771" - %s[0].email == "ccops@markmonitor.com" - %s[0].updated_on %TIME{2011-06-14 00:00:00 UTC} + %s[0].country_code == "FR" + %s[0].phone == "+33 1 41 58 22 50" + %s[0].fax == "+33 1 56 72 93 30" + %s[0].email == "production@magic.fr" + %s[0].updated_on %TIME{2014-05-20 15:07:08 UTC} #nameservers %s %CLASS{array} - %s %SIZE{4} + %s %SIZE{2} %s[0] %CLASS{nameserver} - %s[0].name == "ns1.google.com" + %s[0].name == "ns.magic.fr" %s[1] %CLASS{nameserver} - %s[1].name == "ns2.google.com" - %s[2] %CLASS{nameserver} - %s[2].name == "ns3.google.com" - %s[3] %CLASS{nameserver} - %s[3].name == "ns4.google.com" + %s[1].name == "ns2.magic.fr" diff --git a/spec/fixtures/responses/whois.nic.fr/fr/status_registered.txt b/spec/fixtures/responses/whois.nic.fr/fr/status_registered.txt index a01f4136..3cf84131 100644 --- a/spec/fixtures/responses/whois.nic.fr/fr/status_registered.txt +++ b/spec/fixtures/responses/whois.nic.fr/fr/status_registered.txt @@ -1,9 +1,7 @@ -[Querying whois.nic.fr] -[whois.nic.fr] %% %% This is the AFNIC Whois server. %% -%% complete date format : DD/MM/YYYY +%% complete date format : YYYY-MM-DDThh:mm:ssZ %% short date format : DD/MM %% version : FRNIC-2.5 %% @@ -12,99 +10,99 @@ %% %% Use '-h' option to obtain more information about this service. %% -%% [0.0.0.0 REQUEST] >> google.fr +%% [209.153.220.50 REQUEST] >> 1c2.fr %% %% RL Net [##########] - RL IP [#########.] %% -domain: google.fr +domain: 1c2.fr status: ACTIVE hold: NO -holder-c: GIH6-FRNIC -admin-c: GIH5-FRNIC -tech-c: CP4370-FRNIC +holder-c: U4339-FRNIC +admin-c: MO2494-FRNIC +tech-c: MO2556-FRNIC zone-c: NFC1-FRNIC -nsl-id: NSL4386-FRNIC -registrar: MARKMONITOR Inc. -Expiry Date: 30/12/2017 -created: 27/07/2000 -last-update: 30/12/2016 +nsl-id: NSL1231-FRNIC +registrar: EPAG Domainservices GmbH +Expiry Date: 2019-05-07T07:43:45Z +created: 2004-05-20T11:28:40Z +last-update: 2018-04-08T03:52:04Z source: FRNIC -ns-list: NSL4386-FRNIC -nserver: ns1.google.com -nserver: ns2.google.com -nserver: ns3.google.com -nserver: ns4.google.com +ns-list: NSL1231-FRNIC +nserver: ns.magic.fr +nserver: ns2.magic.fr source: FRNIC -registrar: MARKMONITOR Inc. +registrar: EPAG Domainservices GmbH type: Isp Option 1 -address: 3540 East Longwing Lane -address: -address: ID 83646 MERIDIAN -country: US -phone: +1 208 389 5740 -fax-no: +1 208 389 5771 -e-mail: registry.admin@markmonitor.com -website: http://www.markmonitor.com +address: Niebuhrstraße 16b +address: DE-53113 BONN +country: DE +phone: +49 228 3296840 +fax-no: +49 228 3296849 +e-mail: support@epag.de +website: https://www.epag.de/en/services/domains/domain-pricing/ anonymous: NO -registered: 10/01/2002 +registered: 2006-01-11T12:00:00Z source: FRNIC -nic-hdl: GIH6-FRNIC +nic-hdl: U4339-FRNIC type: ORGANIZATION -contact: Google Ireland Holdings -address: 70 Sir John Rogersons Quay -address: 2 Dublin -country: IE -phone: +353 14361000 -e-mail: dns-admin@google.com -registrar: MARKMONITOR Inc. -changed: 20/03/2015 nic@nic.fr +contact: 1C2 +address: 20-22, rue Louis Armand +address: 75015 Paris +country: FR +phone: +33 1 30 62 40 06 +e-mail: jmr@1c2.com +registrar: EPAG Domainservices GmbH +changed: 2016-09-22T07:52:47Z nic@nic.fr anonymous: NO obsoleted: NO eligstatus: ok -eligsource: REGISTRAR -eligdate: 30/12/2011 18:15:32 +eligsource: REGISTRY +eligdate: 2016-09-22T07:52:47Z reachmedia: email reachstatus: ok -reachsource: REGISTRAR -reachdate: 20/03/2015 22:13:41 +reachsource: REGISTRY +reachdate: 2016-09-22T07:52:47Z source: FRNIC -nic-hdl: GIH5-FRNIC -type: ORGANIZATION -contact: Google Ireland Holdings -address: 70 Sir John Rogersons Quay -address: 2 Dublin -country: IE -phone: +353 14361000 -e-mail: dns-admin@google.com -registrar: MARKMONITOR Inc. -changed: 06/12/2011 nic@nic.fr +nic-hdl: MO2494-FRNIC +type: PERSON +contact: Magic Online +address: Magic Online +address: 130, avenue President Wilson +address: 93100 Montreuil +address: Paris +country: FR +phone: +33 1 41 58 22 50 +fax-no: +33 1 56 72 93 30 +e-mail: hostmaster@magic.fr +registrar: EPAG Domainservices GmbH +changed: 2014-03-31T16:13:52Z nic@nic.fr anonymous: NO obsoleted: NO -reachmedia: email -reachstatus: ok -reachsource: REGISTRAR -reachdate: 06/12/2011 10:28:50 +eligstatus: not identified +reachstatus: not identified source: FRNIC -nic-hdl: CP4370-FRNIC +nic-hdl: MO2556-FRNIC type: PERSON -contact: Ccops Provisioning -address: MarkMonitor -address: 10400 Overland Rd. -address: PMB 155 -address: 83709 Boise -country: US -phone: +1 2083895740 -fax-no: +1 2083895771 -e-mail: ccops@markmonitor.com -registrar: MARKMONITOR Inc. -changed: 14/06/2011 nic@nic.fr +contact: Magic Online +address: Magic Online +address: 130-134, avenue du President Wilson +address: 93100 Montreuil +address: France +country: FR +phone: +33 1 41 58 22 50 +fax-no: +33 1 56 72 93 30 +e-mail: production@magic.fr +registrar: EPAG Domainservices GmbH +changed: 2014-05-20T15:07:08Z nic@nic.fr anonymous: NO obsoleted: NO +eligstatus: not identified +reachstatus: not identified source: FRNIC diff --git a/spec/fixtures/responses/whois.nic.fr/tf/status_registered.expected b/spec/fixtures/responses/whois.nic.fr/tf/status_registered.expected index 3bcd3af5..e97dd22a 100644 --- a/spec/fixtures/responses/whois.nic.fr/tf/status_registered.expected +++ b/spec/fixtures/responses/whois.nic.fr/tf/status_registered.expected @@ -10,15 +10,15 @@ #created_on %s %CLASS{time} - %s %TIME{2004-10-26} + %s %TIME{2004-10-25 22:00:00 UTC} #updated_on %s %CLASS{time} - %s %TIME{2016-10-25} + %s %TIME{2018-10-25 22:34:00 UTC} #expires_on %s %CLASS{time} - %s %TIME{2017-10-25} + %s %TIME{2019-10-25 22:00:00 UTC} #registrant_contacts @@ -29,16 +29,16 @@ %s[0].id == "AAEA9-FRNIC" %s[0].name == nil %s[0].organization == "Afnic (Terres Australes et Antarctiques - TOM)" - %s[0].address == "immeuble international\n2, rue Stephenson\nMontigny-Le-Bretonneux\n78181 Saint Quentin en Yvelines Cedex" + %s[0].address == "immeuble le Stephenson\n1, rue Stephenson\nHall A2 - 3eme etage\n78180 Montigny le Bretonneux" %s[0].city == nil %s[0].zip == nil %s[0].state == nil %s[0].country == nil %s[0].country_code == "FR" - %s[0].phone == nil - %s[0].fax == nil - %s[0].email == nil - %s[0].updated_on %TIME{2008-10-09 00:00:00 UTC} + %s[0].phone == "+33 1 39 30 83 00" + %s[0].fax == "+33 1 39 30 83 01" + %s[0].email == "support@afnic.fr" + %s[0].updated_on %TIME{2017-07-17 12:40:50 UTC} #admin_contacts %s %CLASS{array} @@ -48,7 +48,7 @@ %s[0].id == "NFC1-FRNIC" %s[0].name == "NIC France Contact" %s[0].organization == "AFNIC" - %s[0].address == "immeuble international\n2, rue Stephenson\nMontigny le Bretonneux\n78181 Saint Quentin en Yvelines Cedex" + %s[0].address == "immeuble le Stephenson\n1, rue Stephenson\nHall A2 - 3eme etage\n78180 Montigny-Le-Bretonneux" %s[0].city == nil %s[0].zip == nil %s[0].state == nil @@ -57,7 +57,7 @@ %s[0].phone == "+33 1 39 30 83 00" %s[0].fax == nil %s[0].email == "hostmaster@nic.fr" - %s[0].updated_on %TIME{2005-08-23 00:00:00 UTC} + %s[0].updated_on %TIME{2005-08-23 16:13:17 UTC} #technical_contacts %s %CLASS{array} @@ -67,7 +67,7 @@ %s[0].id == "NFC1-FRNIC" %s[0].name == "NIC France Contact" %s[0].organization == "AFNIC" - %s[0].address == "immeuble international\n2, rue Stephenson\nMontigny le Bretonneux\n78181 Saint Quentin en Yvelines Cedex" + %s[0].address == "immeuble le Stephenson\n1, rue Stephenson\nHall A2 - 3eme etage\n78180 Montigny-Le-Bretonneux" %s[0].city == nil %s[0].zip == nil %s[0].state == nil @@ -76,7 +76,7 @@ %s[0].phone == "+33 1 39 30 83 00" %s[0].fax == nil %s[0].email == "hostmaster@nic.fr" - %s[0].updated_on %TIME{2005-08-23 00:00:00 UTC} + %s[0].updated_on %TIME{2005-08-23 16:13:17 UTC} #nameservers @@ -84,13 +84,7 @@ %s %SIZE{3} %s[0] %CLASS{nameserver} %s[0].name == "ns1.nic.fr" - %s[0].ipv4 == "192.134.4.1" - %s[0].ipv6 == "2001:67c:2218:2::4:1" %s[1] %CLASS{nameserver} %s[1].name == "ns2.nic.fr" - %s[1].ipv4 == "192.93.0.4" - %s[1].ipv6 == "2001:660:3005:1::1:2" %s[2] %CLASS{nameserver} %s[2].name == "ns3.nic.fr" - %s[2].ipv4 == "192.134.0.49" - %s[2].ipv6 == "2001:660:3006:1::1:1" diff --git a/spec/fixtures/responses/whois.nic.fr/tf/status_registered.txt b/spec/fixtures/responses/whois.nic.fr/tf/status_registered.txt index 79922184..771bc3a1 100644 --- a/spec/fixtures/responses/whois.nic.fr/tf/status_registered.txt +++ b/spec/fixtures/responses/whois.nic.fr/tf/status_registered.txt @@ -1,9 +1,7 @@ -[Querying whois.nic.tf] -[whois.nic.tf] %% %% This is the AFNIC Whois server. %% -%% complete date format : DD/MM/YYYY +%% complete date format : YYYY-MM-DDThh:mm:ssZ %% short date format : DD/MM %% version : FRNIC-2.5 %% @@ -12,7 +10,7 @@ %% %% Use '-h' option to obtain more information about this service. %% -%% [0.0.0.0 REQUEST] >> nic.tf +%% [209.153.220.50 REQUEST] >> nic.tf %% %% RL Net [##########] - RL IP [#########.] %% @@ -31,31 +29,50 @@ remarks: Please email mailto: nic@nic.fr remarks: Spam mailto: abuse@nic.fr remarks: Test mailto: ping@nic.fr registrar: AFNIC registry -Expiry Date: 25/10/2017 -created: 26/10/2004 -last-update: 25/10/2016 +Expiry Date: 2019-10-25T22:00:00Z +created: 2004-10-25T22:00:00Z +last-update: 2018-10-25T22:34:00Z source: FRNIC ns-list: NSL1-FRNIC -nserver: ns1.nic.fr [192.134.4.1 2001:67c:2218:2::4:1] -nserver: ns2.nic.fr [192.93.0.4 2001:660:3005:1::1:2] -nserver: ns3.nic.fr [192.134.0.49 2001:660:3006:1::1:1] +nserver: ns1.nic.fr +nserver: ns2.nic.fr +nserver: ns3.nic.fr source: FRNIC registrar: AFNIC registry type: Isp Option 2 anonymous: YES -registered: 22/05/1997 +registered: 1997-05-22T12:00:00Z +source: FRNIC + +nic-hdl: AAEA9-FRNIC +type: ORGANIZATION +contact: Afnic (Terres Australes et Antarctiques - TOM) +address: immeuble le Stephenson +address: 1, rue Stephenson +address: Hall A2 - 3eme etage +address: 78180 Montigny le Bretonneux +country: FR +phone: +33 1 39 30 83 00 +fax-no: +33 1 39 30 83 01 +e-mail: support@afnic.fr +registrar: AFNIC registry +changed: 2017-07-17T12:40:50Z nic@nic.fr +anonymous: NO +obsoleted: NO +eligstatus: not identified +reachstatus: not identified source: FRNIC nic-hdl: NFC1-FRNIC type: ROLE contact: NIC France Contact address: AFNIC -address: immeuble international -address: 2, rue Stephenson -address: Montigny le Bretonneux -address: 78181 Saint Quentin en Yvelines Cedex +address: immeuble le Stephenson +address: 1, rue Stephensonq +address: Hall A2 - 3eme etage +address: 78180 Montigny-Le-Bretonneux country: FR phone: +33 1 39 30 83 00 e-mail: hostmaster@nic.fr @@ -70,22 +87,39 @@ tech-c: GO661-FRNIC tech-c: MS-FRNIC tech-c: AI1-FRNIC registrar: AFNIC registry -changed: 23/08/2005 hostmaster@nic.fr +changed: 2005-08-23T16:13:17Z hostmaster@nic.fr anonymous: NO obsoleted: NO +eligstatus: not identified +reachstatus: not identified source: FRNIC -nic-hdl: AAEA9-FRNIC -type: ORGANIZATION -contact: Afnic (Terres Australes et Antarctiques - TOM) -address: immeuble international -address: 2, rue Stephenson -address: Montigny-Le-Bretonneux -address: 78181 Saint Quentin en Yvelines Cedex +nic-hdl: NFC1-FRNIC +type: ROLE +contact: NIC France Contact +address: AFNIC +address: immeuble le Stephenson +address: 1, rue Stephenson +address: Hall A2 - 3eme etage +address: 78180 Montigny-Le-Bretonneux country: FR +phone: +33 1 39 30 83 00 +e-mail: hostmaster@nic.fr +admin-c: NFC1-FRNIC +tech-c: PL12-FRNIC +tech-c: JP-FRNIC +tech-c: MS1887-FRNIC +tech-c: VL-FRNIC +tech-c: PR1249-FRNIC +tech-c: PV827-FRNIC +tech-c: GO661-FRNIC +tech-c: MS-FRNIC +tech-c: AI1-FRNIC registrar: AFNIC registry -changed: 09/10/2008 whoismaster@nic.fr +changed: 2005-08-23T16:13:17Z hostmaster@nic.fr anonymous: NO obsoleted: NO +eligstatus: not identified +reachstatus: not identified source: FRNIC diff --git a/spec/fixtures/responses/whois.nic.fr/yt/status_registered.txt b/spec/fixtures/responses/whois.nic.fr/yt/status_registered.txt deleted file mode 100644 index 89e39f27..00000000 --- a/spec/fixtures/responses/whois.nic.fr/yt/status_registered.txt +++ /dev/null @@ -1,91 +0,0 @@ -[Querying whois.nic.yt] -[whois.nic.yt] -%% -%% This is the AFNIC Whois server. -%% -%% complete date format : DD/MM/YYYY -%% short date format : DD/MM -%% version : FRNIC-2.5 -%% -%% Rights restricted by copyright. -%% See https://www.afnic.fr/en/products-and-services/services/whois/whois-special-notice/ -%% -%% Use '-h' option to obtain more information about this service. -%% -%% [0.0.0.0 REQUEST] >> nic.yt -%% -%% RL Net [##########] - RL IP [#########.] -%% - -domain: nic.yt -status: ACTIVE -hold: NO -holder-c: AC3598-FRNIC -admin-c: NFC1-FRNIC -tech-c: NFC1-FRNIC -zone-c: NFC1-FRNIC -nsl-id: NSL1-FRNIC -remarks: Website at: http://www.nic.yt/ -remarks: Whois site at: whois.nic.fr -remarks: Please email mailto: nic@nic.fr -remarks: Spam mailto: abuse@nic.fr -remarks: Test mailto: ping@nic.fr -registrar: AFNIC registry -Expiry Date: 31/12/2017 -created: 01/01/1995 -last-update: 31/12/2016 -source: FRNIC - -ns-list: NSL1-FRNIC -nserver: ns1.nic.fr [192.134.4.1 2001:67c:2218:2::4:1] -nserver: ns2.nic.fr [192.93.0.4 2001:660:3005:1::1:2] -nserver: ns3.nic.fr [192.134.0.49 2001:660:3006:1::1:1] -source: FRNIC - -registrar: AFNIC registry -type: Isp Option 2 -anonymous: YES -registered: 22/05/1997 -source: FRNIC - -nic-hdl: NFC1-FRNIC -type: ROLE -contact: NIC France Contact -address: AFNIC -address: immeuble international -address: 2, rue Stephenson -address: Montigny le Bretonneux -address: 78181 Saint Quentin en Yvelines Cedex -country: FR -phone: +33 1 39 30 83 00 -e-mail: hostmaster@nic.fr -admin-c: NFC1-FRNIC -tech-c: PL12-FRNIC -tech-c: JP-FRNIC -tech-c: MS1887-FRNIC -tech-c: VL-FRNIC -tech-c: PR1249-FRNIC -tech-c: PV827-FRNIC -tech-c: GO661-FRNIC -tech-c: MS-FRNIC -tech-c: AI1-FRNIC -registrar: AFNIC registry -changed: 23/08/2005 hostmaster@nic.fr -anonymous: NO -obsoleted: NO -source: FRNIC - -nic-hdl: AC3598-FRNIC -type: ORGANIZATION -contact: Afnic (Mayotte - CTOM) -address: immeuble international -address: 2, rue Stephenson -address: Montigny-Le-Bretonneux -address: 78181 Saint Quentin en Yvelines Cedex -country: FR -registrar: AFNIC registry -changed: 09/10/2008 whoismaster@nic.fr -anonymous: NO -obsoleted: NO -source: FRNIC - diff --git a/spec/fixtures/responses/whois.nic.pm/pm/status_registered.expected b/spec/fixtures/responses/whois.nic.pm/pm/status_registered.expected index fc793da1..1ff8ca6e 100644 --- a/spec/fixtures/responses/whois.nic.pm/pm/status_registered.expected +++ b/spec/fixtures/responses/whois.nic.pm/pm/status_registered.expected @@ -10,15 +10,15 @@ #created_on %s %CLASS{time} - %s %TIME{1995-01-01} + %s %TIME{1994-12-31 23:00:00 UTC} #updated_on %s %CLASS{time} - %s %TIME{2016-12-31} + %s %TIME{2018-12-31 23:33:19 UTC} #expires_on %s %CLASS{time} - %s %TIME{2017-12-31} + %s %TIME{2019-12-31 23:00:00 UTC} #registrant_contacts @@ -29,16 +29,16 @@ %s[0].id == "APEM2-FRNIC" %s[0].name == nil %s[0].organization == "Afnic (Saint-Pierre et Miquelon - CTOM)" - %s[0].address == "immeuble international\n2, rue Stephenson\nMontigny-Le-Bretonneux\n78181 Saint Quentin en Yvelines Cedex" + %s[0].address == "immeuble le Stephenson\n1, rue Stephenson\nHall A2 - 3eme etage\n78180 Montigny le Bretonneux" %s[0].city == nil %s[0].zip == nil %s[0].state == nil %s[0].country == nil %s[0].country_code == "FR" - %s[0].phone == nil - %s[0].fax == nil - %s[0].email == nil - %s[0].updated_on %TIME{2008-10-09 00:00:00 UTC} + %s[0].phone == "+33 1 39 30 83 00" + %s[0].fax == "+33 1 39 30 83 01" + %s[0].email == "support@afnic.fr" + %s[0].updated_on %TIME{2017-07-17 12:39:46 UTC} #admin_contacts %s %CLASS{array} @@ -48,7 +48,7 @@ %s[0].id == "NFC1-FRNIC" %s[0].name == "NIC France Contact" %s[0].organization == "AFNIC" - %s[0].address == "immeuble international\n2, rue Stephenson\nMontigny le Bretonneux\n78181 Saint Quentin en Yvelines Cedex" + %s[0].address == "immeuble le Stephenson\n1, rue Stephenson\nHall A2 - 3eme etage\n78180 Montigny-Le-Bretonneux" %s[0].city == nil %s[0].zip == nil %s[0].state == nil @@ -57,7 +57,7 @@ %s[0].phone == "+33 1 39 30 83 00" %s[0].fax == nil %s[0].email == "hostmaster@nic.fr" - %s[0].updated_on %TIME{2005-08-23 00:00:00 UTC} + %s[0].updated_on %TIME{2005-08-23 16:13:17 UTC} #technical_contacts %s %CLASS{array} @@ -67,7 +67,7 @@ %s[0].id == "NFC1-FRNIC" %s[0].name == "NIC France Contact" %s[0].organization == "AFNIC" - %s[0].address == "immeuble international\n2, rue Stephenson\nMontigny le Bretonneux\n78181 Saint Quentin en Yvelines Cedex" + %s[0].address == "immeuble le Stephenson\n1, rue Stephenson\nHall A2 - 3eme etage\n78180 Montigny-Le-Bretonneux" %s[0].city == nil %s[0].zip == nil %s[0].state == nil @@ -76,9 +76,15 @@ %s[0].phone == "+33 1 39 30 83 00" %s[0].fax == nil %s[0].email == "hostmaster@nic.fr" - %s[0].updated_on %TIME{2005-08-23 00:00:00 UTC} + %s[0].updated_on %TIME{2005-08-23 16:13:17 UTC} #nameservers %s %CLASS{array} %s %SIZE{3} + %s[0] %CLASS{nameserver} + %s[0].name == "ns1.nic.fr" + %s[1] %CLASS{nameserver} + %s[1].name == "ns2.nic.fr" + %s[2] %CLASS{nameserver} + %s[2].name == "ns3.nic.fr" diff --git a/spec/fixtures/responses/whois.nic.pm/pm/status_registered.txt b/spec/fixtures/responses/whois.nic.pm/pm/status_registered.txt index 01fc19fb..031021d0 100644 --- a/spec/fixtures/responses/whois.nic.pm/pm/status_registered.txt +++ b/spec/fixtures/responses/whois.nic.pm/pm/status_registered.txt @@ -1,9 +1,7 @@ -[Querying whois.nic.pm] -[whois.nic.pm] %% %% This is the AFNIC Whois server. %% -%% complete date format : DD/MM/YYYY +%% complete date format : YYYY-MM-DDThh:mm:ssZ %% short date format : DD/MM %% version : FRNIC-2.5 %% @@ -12,7 +10,7 @@ %% %% Use '-h' option to obtain more information about this service. %% -%% [0.0.0.0 REQUEST] >> nic.pm +%% [209.153.220.50 REQUEST] >> nic.pm %% %% RL Net [##########] - RL IP [#########.] %% @@ -31,31 +29,50 @@ remarks: Please email mailto: nic@nic.fr remarks: Spam mailto: abuse@nic.fr remarks: Test mailto: ping@nic.fr registrar: AFNIC registry -Expiry Date: 31/12/2017 -created: 01/01/1995 -last-update: 31/12/2016 +Expiry Date: 2019-12-31T23:00:00Z +created: 1994-12-31T23:00:00Z +last-update: 2018-12-31T23:33:19Z source: FRNIC ns-list: NSL1-FRNIC -nserver: ns1.nic.fr [192.134.4.1 2001:67c:2218:2::4:1] -nserver: ns2.nic.fr [192.93.0.4 2001:660:3005:1::1:2] -nserver: ns3.nic.fr [192.134.0.49 2001:660:3006:1::1:1] +nserver: ns1.nic.fr +nserver: ns2.nic.fr +nserver: ns3.nic.fr source: FRNIC registrar: AFNIC registry type: Isp Option 2 anonymous: YES -registered: 22/05/1997 +registered: 1997-05-22T12:00:00Z +source: FRNIC + +nic-hdl: APEM2-FRNIC +type: ORGANIZATION +contact: Afnic (Saint-Pierre et Miquelon - CTOM) +address: immeuble le Stephenson +address: 1, rue Stephenson +address: Hall A2 - 3eme etage +address: 78180 Montigny le Bretonneux +country: FR +phone: +33 1 39 30 83 00 +fax-no: +33 1 39 30 83 01 +e-mail: support@afnic.fr +registrar: AFNIC registry +changed: 2017-07-17T12:39:46Z nic@nic.fr +anonymous: NO +obsoleted: NO +eligstatus: not identified +reachstatus: not identified source: FRNIC nic-hdl: NFC1-FRNIC type: ROLE contact: NIC France Contact address: AFNIC -address: immeuble international -address: 2, rue Stephenson -address: Montigny le Bretonneux -address: 78181 Saint Quentin en Yvelines Cedex +address: immeuble le Stephenson +address: 1, rue Stephenson +address: Hall A2 - 3eme etage +address: 78180 Montigny-Le-Bretonneux country: FR phone: +33 1 39 30 83 00 e-mail: hostmaster@nic.fr @@ -70,22 +87,39 @@ tech-c: GO661-FRNIC tech-c: MS-FRNIC tech-c: AI1-FRNIC registrar: AFNIC registry -changed: 23/08/2005 hostmaster@nic.fr +changed: 2005-08-23T16:13:17Z hostmaster@nic.fr anonymous: NO obsoleted: NO +eligstatus: not identified +reachstatus: not identified source: FRNIC -nic-hdl: APEM2-FRNIC -type: ORGANIZATION -contact: Afnic (Saint-Pierre et Miquelon - CTOM) -address: immeuble international -address: 2, rue Stephenson -address: Montigny-Le-Bretonneux -address: 78181 Saint Quentin en Yvelines Cedex +nic-hdl: NFC1-FRNIC +type: ROLE +contact: NIC France Contact +address: AFNIC +address: immeuble le Stephenson +address: 1, rue Stephenson +address: Hall A2 - 3eme etage +address: 78180 Montigny-Le-Bretonneux country: FR +phone: +33 1 39 30 83 00 +e-mail: hostmaster@nic.fr +admin-c: NFC1-FRNIC +tech-c: PL12-FRNIC +tech-c: JP-FRNIC +tech-c: MS1887-FRNIC +tech-c: VL-FRNIC +tech-c: PR1249-FRNIC +tech-c: PV827-FRNIC +tech-c: GO661-FRNIC +tech-c: MS-FRNIC +tech-c: AI1-FRNIC registrar: AFNIC registry -changed: 09/10/2008 whoismaster@nic.fr +changed: 2005-08-23T16:13:17Z hostmaster@nic.fr anonymous: NO obsoleted: NO +eligstatus: not identified +reachstatus: not identified source: FRNIC diff --git a/spec/fixtures/responses/whois.nic.re/re/status_registered.expected b/spec/fixtures/responses/whois.nic.re/re/status_registered.expected index b4105e27..7956b916 100644 --- a/spec/fixtures/responses/whois.nic.re/re/status_registered.expected +++ b/spec/fixtures/responses/whois.nic.re/re/status_registered.expected @@ -10,15 +10,15 @@ #created_on %s %CLASS{time} - %s %TIME{1995-01-01} + %s %TIME{1994-12-31 23:00:00 UTC} #updated_on %s %CLASS{time} - %s %TIME{2016-12-31} + %s %TIME{2018-12-31 23:33:19 UTC} #expires_on %s %CLASS{time} - %s %TIME{2017-12-31} + %s %TIME{2019-12-31 23:00:00 UTC} #registrant_contacts @@ -29,16 +29,16 @@ %s[0].id == "A1967-FRNIC" %s[0].name == nil %s[0].organization == "AFNIC" - %s[0].address == "immeuble international\n2, rue Stephenson\nMontigny-Le-Bretonneux\n78181 Saint Quentin en Yvelines" + %s[0].address == "immeuble le Stephenson\n1, rue Stephenson\nHall A2 - 3eme etage\n78180 Montigny le Bretonneux" %s[0].city == nil %s[0].zip == nil %s[0].state == nil %s[0].country == nil %s[0].country_code == "FR" - %s[0].phone == nil - %s[0].fax == nil - %s[0].email == nil - %s[0].updated_on %TIME{2009-12-02 00:00:00 UTC} + %s[0].phone == "+33 1 39 30 83 00" + %s[0].fax == "+33 1 39 30 83 01" + %s[0].email == "support@afnic.fr" + %s[0].updated_on %TIME{2017-07-17 12:40:19 UTC} #admin_contacts %s %CLASS{array} @@ -48,7 +48,7 @@ %s[0].id == "NFC1-FRNIC" %s[0].name == "NIC France Contact" %s[0].organization == "AFNIC" - %s[0].address == "immeuble international\n2, rue Stephenson\nMontigny le Bretonneux\n78181 Saint Quentin en Yvelines Cedex" + %s[0].address == "immeuble le Stephenson\n1, rue Stephenson\nHall A2 - 3eme etage\n78180 Montigny-Le-Bretonneux" %s[0].city == nil %s[0].zip == nil %s[0].state == nil @@ -57,7 +57,7 @@ %s[0].phone == "+33 1 39 30 83 00" %s[0].fax == nil %s[0].email == "hostmaster@nic.fr" - %s[0].updated_on %TIME{2005-08-23 00:00:00 UTC} + %s[0].updated_on %TIME{2005-08-23 16:13:17 UTC} #technical_contacts %s %CLASS{array} @@ -67,7 +67,7 @@ %s[0].id == "NFC1-FRNIC" %s[0].name == "NIC France Contact" %s[0].organization == "AFNIC" - %s[0].address == "immeuble international\n2, rue Stephenson\nMontigny le Bretonneux\n78181 Saint Quentin en Yvelines Cedex" + %s[0].address == "immeuble le Stephenson\n1, rue Stephenson\nHall A2 - 3eme etage\n78180 Montigny-Le-Bretonneux" %s[0].city == nil %s[0].zip == nil %s[0].state == nil @@ -76,9 +76,15 @@ %s[0].phone == "+33 1 39 30 83 00" %s[0].fax == nil %s[0].email == "hostmaster@nic.fr" - %s[0].updated_on %TIME{2005-08-23 00:00:00 UTC} + %s[0].updated_on %TIME{2005-08-23 16:13:17 UTC} #nameservers %s %CLASS{array} %s %SIZE{3} + %s[0] %CLASS{nameserver} + %s[0].name == "ns1.nic.fr" + %s[1] %CLASS{nameserver} + %s[1].name == "ns2.nic.fr" + %s[2] %CLASS{nameserver} + %s[2].name == "ns3.nic.fr" diff --git a/spec/fixtures/responses/whois.nic.re/re/status_registered.txt b/spec/fixtures/responses/whois.nic.re/re/status_registered.txt index 39d74469..196a5a0b 100644 --- a/spec/fixtures/responses/whois.nic.re/re/status_registered.txt +++ b/spec/fixtures/responses/whois.nic.re/re/status_registered.txt @@ -1,9 +1,7 @@ -[Querying whois.nic.re] -[whois.nic.re] %% %% This is the AFNIC Whois server. %% -%% complete date format : DD/MM/YYYY +%% complete date format : YYYY-MM-DDThh:mm:ssZ %% short date format : DD/MM %% version : FRNIC-2.5 %% @@ -12,7 +10,7 @@ %% %% Use '-h' option to obtain more information about this service. %% -%% [0.0.0.0 REQUEST] >> nic.re +%% [209.153.220.50 REQUEST] >> nic.re %% %% RL Net [##########] - RL IP [#########.] %% @@ -25,56 +23,88 @@ admin-c: NFC1-FRNIC tech-c: NFC1-FRNIC zone-c: NFC1-FRNIC nsl-id: NSL1-FRNIC -dsl-id: SIGN736572-FRNIC +dsl-id: SIGN1272510-FRNIC registrar: AFNIC registry -Expiry Date: 31/12/2017 -created: 01/01/1995 -last-update: 31/12/2016 +Expiry Date: 2019-12-31T23:00:00Z +created: 1994-12-31T23:00:00Z +last-update: 2018-12-31T23:33:19Z source: FRNIC ns-list: NSL1-FRNIC -nserver: ns1.nic.fr [192.134.4.1 2001:67c:2218:2::4:1] -nserver: ns2.nic.fr [192.93.0.4 2001:660:3005:1::1:2] -nserver: ns3.nic.fr [192.134.0.49 2001:660:3006:1::1:1] +nserver: ns1.nic.fr +nserver: ns2.nic.fr +nserver: ns3.nic.fr source: FRNIC -ds-list: SIGN736572-FRNIC -key1-tag: 42275 +ds-list: SIGN1272510-FRNIC +key1-tag: 64861 key1-algo: 8 [RSASHA256] key1-dgst-t: 2 [SHA-256] -key1-dgst: 0337202F13AADFAFF4197396D15C4DC26FB04CF0AC775F595743A2EC075DF9D3 +key1-dgst: 52E3E60DCE1D18991299D4948CB7716E188F86D33EE6D3FB40220E17643A28CC source: FRNIC registrar: AFNIC registry type: Isp Option 2 anonymous: YES -registered: 22/05/1997 +registered: 1997-05-22T12:00:00Z source: FRNIC nic-hdl: A1967-FRNIC type: ORGANIZATION contact: AFNIC -address: immeuble international -address: 2, rue Stephenson -address: Montigny-Le-Bretonneux -address: 78181 Saint Quentin en Yvelines +address: immeuble le Stephenson +address: 1, rue Stephenson +address: Hall A2 - 3eme etage +address: 78180 Montigny le Bretonneux country: FR +phone: +33 1 39 30 83 00 +fax-no: +33 1 39 30 83 01 +e-mail: support@afnic.fr +registrar: AFNIC registry +changed: 2017-07-17T12:40:19Z nic@nic.fr +anonymous: NO +obsoleted: NO +eligstatus: not identified +reachstatus: not identified +source: FRNIC + +nic-hdl: NFC1-FRNIC +type: ROLE +contact: NIC France Contact +address: AFNIC +address: immeuble le Stephenson +address: 1, rue Stephenson +address: Hall A2 - 3eme etage +address: 78180 Montigny-Le-Bretonneux +country: FR +phone: +33 1 39 30 83 00 +e-mail: hostmaster@nic.fr +admin-c: NFC1-FRNIC +tech-c: PL12-FRNIC +tech-c: JP-FRNIC +tech-c: MS1887-FRNIC +tech-c: VL-FRNIC +tech-c: PR1249-FRNIC +tech-c: PV827-FRNIC +tech-c: GO661-FRNIC +tech-c: MS-FRNIC +tech-c: AI1-FRNIC registrar: AFNIC registry -changed: 02/12/2009 nic@nic.fr +changed: 2005-08-23T16:13:17Z hostmaster@nic.fr anonymous: NO obsoleted: NO -eligstatus: ok -eligdate: 01/01/1995 00:00:00 +eligstatus: not identified +reachstatus: not identified source: FRNIC nic-hdl: NFC1-FRNIC type: ROLE contact: NIC France Contact address: AFNIC -address: immeuble international -address: 2, rue Stephenson -address: Montigny le Bretonneux -address: 78181 Saint Quentin en Yvelines Cedex +address: immeuble le Stephenson +address: 1, rue Stephenson +address: Hall A2 - 3eme etage +address: 78180 Montigny-Le-Bretonneux country: FR phone: +33 1 39 30 83 00 e-mail: hostmaster@nic.fr @@ -89,8 +119,10 @@ tech-c: GO661-FRNIC tech-c: MS-FRNIC tech-c: AI1-FRNIC registrar: AFNIC registry -changed: 23/08/2005 hostmaster@nic.fr +changed: 2005-08-23T16:13:17Z hostmaster@nic.fr anonymous: NO obsoleted: NO +eligstatus: not identified +reachstatus: not identified source: FRNIC diff --git a/spec/fixtures/responses/whois.nic.wf/wf/status_registered.expected b/spec/fixtures/responses/whois.nic.wf/wf/status_registered.expected index 34e5f789..e2ae24c5 100644 --- a/spec/fixtures/responses/whois.nic.wf/wf/status_registered.expected +++ b/spec/fixtures/responses/whois.nic.wf/wf/status_registered.expected @@ -10,15 +10,15 @@ #created_on %s %CLASS{time} - %s %TIME{1995-01-01} + %s %TIME{1994-12-31 23:00:00 UTC} #updated_on %s %CLASS{time} - %s %TIME{2016-12-31} + %s %TIME{2018-12-31 23:33:39 UTC} #expires_on %s %CLASS{time} - %s %TIME{2017-12-31} + %s %TIME{2019-12-31 23:00:00 UTC} #registrant_contacts @@ -29,16 +29,16 @@ %s[0].id == "AEFT2-FRNIC" %s[0].name == nil %s[0].organization == "Afnic (Wallis et Futuna - TOM)" - %s[0].address == "immeuble international\n2, rue Stephenson\nMontigny-Le-Bretonneux\n78181 Saint Quentin en Yvelines Cedex" + %s[0].address == "immeuble le Stephenson\n1, rue Stephenson\nHall A2 - 3eme etage\n78180 Montigny le Bretonneux" %s[0].city == nil %s[0].zip == nil %s[0].state == nil %s[0].country == nil %s[0].country_code == "FR" - %s[0].phone == nil - %s[0].fax == nil - %s[0].email == nil - %s[0].updated_on %TIME{2008-10-09 00:00:00 UTC} + %s[0].phone == "+33 1 39 30 83 00" + %s[0].fax == "+33 1 39 30 83 01" + %s[0].email == "support@afnic.fr" + %s[0].updated_on %TIME{2017-07-17 12:41:18 UTC} #admin_contacts %s %CLASS{array} @@ -48,7 +48,7 @@ %s[0].id == "NFC1-FRNIC" %s[0].name == "NIC France Contact" %s[0].organization == "AFNIC" - %s[0].address == "immeuble international\n2, rue Stephenson\nMontigny le Bretonneux\n78181 Saint Quentin en Yvelines Cedex" + %s[0].address == "immeuble le Stephenson\n1, rue Stephenson\nHall A2 - 3eme etage\n78180 Montigny-Le-Bretonneux" %s[0].city == nil %s[0].zip == nil %s[0].state == nil @@ -57,7 +57,7 @@ %s[0].phone == "+33 1 39 30 83 00" %s[0].fax == nil %s[0].email == "hostmaster@nic.fr" - %s[0].updated_on %TIME{2005-08-23 00:00:00 UTC} + %s[0].updated_on %TIME{2005-08-23 16:13:17 UTC} #technical_contacts %s %CLASS{array} @@ -67,7 +67,7 @@ %s[0].id == "NFC1-FRNIC" %s[0].name == "NIC France Contact" %s[0].organization == "AFNIC" - %s[0].address == "immeuble international\n2, rue Stephenson\nMontigny le Bretonneux\n78181 Saint Quentin en Yvelines Cedex" + %s[0].address == "immeuble le Stephenson\n1, rue Stephenson\nHall A2 - 3eme etage\n78180 Montigny-Le-Bretonneux" %s[0].city == nil %s[0].zip == nil %s[0].state == nil @@ -76,7 +76,7 @@ %s[0].phone == "+33 1 39 30 83 00" %s[0].fax == nil %s[0].email == "hostmaster@nic.fr" - %s[0].updated_on %TIME{2005-08-23 00:00:00 UTC} + %s[0].updated_on %TIME{2005-08-23 16:13:17 UTC} #nameservers @@ -84,13 +84,7 @@ %s %SIZE{3} %s[0] %CLASS{nameserver} %s[0].name == "ns1.nic.fr" - %s[0].ipv4 == "192.134.4.1" - %s[0].ipv6 == "2001:67c:2218:2::4:1" %s[1] %CLASS{nameserver} %s[1].name == "ns2.nic.fr" - %s[1].ipv4 == "192.93.0.4" - %s[1].ipv6 == "2001:660:3005:1::1:2" %s[2] %CLASS{nameserver} %s[2].name == "ns3.nic.fr" - %s[2].ipv4 == "192.134.0.49" - %s[2].ipv6 == "2001:660:3006:1::1:1" diff --git a/spec/fixtures/responses/whois.nic.wf/wf/status_registered.txt b/spec/fixtures/responses/whois.nic.wf/wf/status_registered.txt index 199a6190..3be37f5a 100644 --- a/spec/fixtures/responses/whois.nic.wf/wf/status_registered.txt +++ b/spec/fixtures/responses/whois.nic.wf/wf/status_registered.txt @@ -1,9 +1,7 @@ -[Querying whois.nic.wf] -[whois.nic.wf] %% %% This is the AFNIC Whois server. %% -%% complete date format : DD/MM/YYYY +%% complete date format : YYYY-MM-DDThh:mm:ssZ %% short date format : DD/MM %% version : FRNIC-2.5 %% @@ -12,7 +10,7 @@ %% %% Use '-h' option to obtain more information about this service. %% -%% [0.0.0.0 REQUEST] >> nic.wf +%% [209.153.220.50 REQUEST] >> nic.wf %% %% RL Net [##########] - RL IP [#########.] %% @@ -31,45 +29,79 @@ remarks: Please email mailto: nic@nic.fr remarks: Spam mailto: abuse@nic.fr remarks: Test mailto: ping@nic.fr registrar: AFNIC registry -Expiry Date: 31/12/2017 -created: 01/01/1995 -last-update: 31/12/2016 +Expiry Date: 2019-12-31T23:00:00Z +created: 1994-12-31T23:00:00Z +last-update: 2018-12-31T23:33:39Z source: FRNIC ns-list: NSL1-FRNIC -nserver: ns1.nic.fr [192.134.4.1 2001:67c:2218:2::4:1] -nserver: ns2.nic.fr [192.93.0.4 2001:660:3005:1::1:2] -nserver: ns3.nic.fr [192.134.0.49 2001:660:3006:1::1:1] +nserver: ns1.nic.fr +nserver: ns2.nic.fr +nserver: ns3.nic.fr source: FRNIC registrar: AFNIC registry type: Isp Option 2 anonymous: YES -registered: 22/05/1997 +registered: 1997-05-22T12:00:00Z source: FRNIC nic-hdl: AEFT2-FRNIC type: ORGANIZATION contact: Afnic (Wallis et Futuna - TOM) -address: immeuble international -address: 2, rue Stephenson -address: Montigny-Le-Bretonneux -address: 78181 Saint Quentin en Yvelines Cedex +address: immeuble le Stephenson +address: 1, rue Stephenson +address: Hall A2 - 3eme etage +address: 78180 Montigny le Bretonneux country: FR +phone: +33 1 39 30 83 00 +fax-no: +33 1 39 30 83 01 +e-mail: support@afnic.fr +registrar: AFNIC registry +changed: 2017-07-17T12:41:18Z nic@nic.fr +anonymous: NO +obsoleted: NO +eligstatus: not identified +reachstatus: not identified +source: FRNIC + +nic-hdl: NFC1-FRNIC +type: ROLE +contact: NIC France Contact +address: AFNIC +address: immeuble le Stephenson +address: 1, rue Stephenson +address: Hall A2 - 3eme etage +address: 78180 Montigny-Le-Bretonneux +country: FR +phone: +33 1 39 30 83 00 +e-mail: hostmaster@nic.fr +admin-c: NFC1-FRNIC +tech-c: PL12-FRNIC +tech-c: JP-FRNIC +tech-c: MS1887-FRNIC +tech-c: VL-FRNIC +tech-c: PR1249-FRNIC +tech-c: PV827-FRNIC +tech-c: GO661-FRNIC +tech-c: MS-FRNIC +tech-c: AI1-FRNIC registrar: AFNIC registry -changed: 09/10/2008 whoismaster@nic.fr +changed: 2005-08-23T16:13:17Z hostmaster@nic.fr anonymous: NO obsoleted: NO +eligstatus: not identified +reachstatus: not identified source: FRNIC nic-hdl: NFC1-FRNIC type: ROLE contact: NIC France Contact address: AFNIC -address: immeuble international -address: 2, rue Stephenson -address: Montigny le Bretonneux -address: 78181 Saint Quentin en Yvelines Cedex +address: immeuble le Stephenson +address: 1, rue Stephenson +address: Hall A2 - 3eme etage +address: 78180 Montigny-Le-Bretonneux country: FR phone: +33 1 39 30 83 00 e-mail: hostmaster@nic.fr @@ -84,8 +116,10 @@ tech-c: GO661-FRNIC tech-c: MS-FRNIC tech-c: AI1-FRNIC registrar: AFNIC registry -changed: 23/08/2005 hostmaster@nic.fr +changed: 2005-08-23T16:13:17Z hostmaster@nic.fr anonymous: NO obsoleted: NO +eligstatus: not identified +reachstatus: not identified source: FRNIC diff --git a/spec/fixtures/responses/whois.nic.fr/yt/response_throttled.expected b/spec/fixtures/responses/whois.nic.yt/yt/response_throttled.expected similarity index 100% rename from spec/fixtures/responses/whois.nic.fr/yt/response_throttled.expected rename to spec/fixtures/responses/whois.nic.yt/yt/response_throttled.expected diff --git a/spec/fixtures/responses/whois.nic.fr/yt/response_throttled.txt b/spec/fixtures/responses/whois.nic.yt/yt/response_throttled.txt similarity index 100% rename from spec/fixtures/responses/whois.nic.fr/yt/response_throttled.txt rename to spec/fixtures/responses/whois.nic.yt/yt/response_throttled.txt diff --git a/spec/fixtures/responses/whois.nic.fr/yt/status_available.expected b/spec/fixtures/responses/whois.nic.yt/yt/status_available.expected similarity index 100% rename from spec/fixtures/responses/whois.nic.fr/yt/status_available.expected rename to spec/fixtures/responses/whois.nic.yt/yt/status_available.expected diff --git a/spec/fixtures/responses/whois.nic.fr/yt/status_available.txt b/spec/fixtures/responses/whois.nic.yt/yt/status_available.txt similarity index 100% rename from spec/fixtures/responses/whois.nic.fr/yt/status_available.txt rename to spec/fixtures/responses/whois.nic.yt/yt/status_available.txt diff --git a/spec/fixtures/responses/whois.nic.fr/yt/status_registered.expected b/spec/fixtures/responses/whois.nic.yt/yt/status_registered.expected similarity index 66% rename from spec/fixtures/responses/whois.nic.fr/yt/status_registered.expected rename to spec/fixtures/responses/whois.nic.yt/yt/status_registered.expected index b55bc97c..8eb63ff1 100644 --- a/spec/fixtures/responses/whois.nic.fr/yt/status_registered.expected +++ b/spec/fixtures/responses/whois.nic.yt/yt/status_registered.expected @@ -10,15 +10,15 @@ #created_on %s %CLASS{time} - %s %TIME{1995-01-01} + %s %TIME{1994-12-31 23:00:00 UTC} #updated_on %s %CLASS{time} - %s %TIME{2016-12-31} + %s %TIME{2018-12-31 23:33:38 UTC} #expires_on %s %CLASS{time} - %s %TIME{2017-12-31} + %s %TIME{2019-12-31 23:00:00 UTC} #registrant_contacts @@ -29,16 +29,16 @@ %s[0].id == "AC3598-FRNIC" %s[0].name == nil %s[0].organization == "Afnic (Mayotte - CTOM)" - %s[0].address == "immeuble international\n2, rue Stephenson\nMontigny-Le-Bretonneux\n78181 Saint Quentin en Yvelines Cedex" + %s[0].address == "immeuble le Stephenson\n1, rue Stephenson\nHall A2 - 3eme etage\n78180 Montigny le Bretonneux" %s[0].city == nil %s[0].zip == nil %s[0].state == nil %s[0].country == nil %s[0].country_code == "FR" - %s[0].phone == nil - %s[0].fax == nil - %s[0].email == nil - %s[0].updated_on %TIME{2008-10-09 00:00:00 UTC} + %s[0].phone == "+33 1 39 30 83 00" + %s[0].fax == "+33 1 39 30 83 01" + %s[0].email == "support@afnic.fr" + %s[0].updated_on %TIME{2017-07-17 12:41:44 UTC} #admin_contacts %s %CLASS{array} @@ -48,7 +48,7 @@ %s[0].id == "NFC1-FRNIC" %s[0].name == "NIC France Contact" %s[0].organization == "AFNIC" - %s[0].address == "immeuble international\n2, rue Stephenson\nMontigny le Bretonneux\n78181 Saint Quentin en Yvelines Cedex" + %s[0].address == "immeuble le Stephenson\n1, rue Stephenson\nHall A2 - 3eme etage\n78180 Montigny-Le-Bretonneux" %s[0].city == nil %s[0].zip == nil %s[0].state == nil @@ -57,7 +57,7 @@ %s[0].phone == "+33 1 39 30 83 00" %s[0].fax == nil %s[0].email == "hostmaster@nic.fr" - %s[0].updated_on %TIME{2005-08-23 00:00:00 UTC} + %s[0].updated_on %TIME{2005-08-23 16:13:17 UTC} #technical_contacts %s %CLASS{array} @@ -67,7 +67,7 @@ %s[0].id == "NFC1-FRNIC" %s[0].name == "NIC France Contact" %s[0].organization == "AFNIC" - %s[0].address == "immeuble international\n2, rue Stephenson\nMontigny le Bretonneux\n78181 Saint Quentin en Yvelines Cedex" + %s[0].address == "immeuble le Stephenson\n1, rue Stephenson\nHall A2 - 3eme etage\n78180 Montigny-Le-Bretonneux" %s[0].city == nil %s[0].zip == nil %s[0].state == nil @@ -76,7 +76,7 @@ %s[0].phone == "+33 1 39 30 83 00" %s[0].fax == nil %s[0].email == "hostmaster@nic.fr" - %s[0].updated_on %TIME{2005-08-23 00:00:00 UTC} + %s[0].updated_on %TIME{2005-08-23 16:13:17 UTC} #nameservers @@ -84,13 +84,7 @@ %s %SIZE{3} %s[0] %CLASS{nameserver} %s[0].name == "ns1.nic.fr" - %s[0].ipv4 == "192.134.4.1" - %s[0].ipv6 == "2001:67c:2218:2::4:1" %s[1] %CLASS{nameserver} %s[1].name == "ns2.nic.fr" - %s[1].ipv4 == "192.93.0.4" - %s[1].ipv6 == "2001:660:3005:1::1:2" %s[2] %CLASS{nameserver} %s[2].name == "ns3.nic.fr" - %s[2].ipv4 == "192.134.0.49" - %s[2].ipv6 == "2001:660:3006:1::1:1" diff --git a/spec/fixtures/responses/whois.nic.yt/yt/status_registered.txt b/spec/fixtures/responses/whois.nic.yt/yt/status_registered.txt new file mode 100644 index 00000000..edc155c8 --- /dev/null +++ b/spec/fixtures/responses/whois.nic.yt/yt/status_registered.txt @@ -0,0 +1,125 @@ +%% +%% This is the AFNIC Whois server. +%% +%% complete date format : YYYY-MM-DDThh:mm:ssZ +%% short date format : DD/MM +%% version : FRNIC-2.5 +%% +%% Rights restricted by copyright. +%% See https://www.afnic.fr/en/products-and-services/services/whois/whois-special-notice/ +%% +%% Use '-h' option to obtain more information about this service. +%% +%% [209.153.220.50 REQUEST] >> nic.yt +%% +%% RL Net [##########] - RL IP [#########.] +%% + +domain: nic.yt +status: ACTIVE +hold: NO +holder-c: AC3598-FRNIC +admin-c: NFC1-FRNIC +tech-c: NFC1-FRNIC +zone-c: NFC1-FRNIC +nsl-id: NSL1-FRNIC +remarks: Website at: http://www.nic.yt/ +remarks: Whois site at: whois.nic.fr +remarks: Please email mailto: nic@nic.fr +remarks: Spam mailto: abuse@nic.fr +remarks: Test mailto: ping@nic.fr +registrar: AFNIC registry +Expiry Date: 2019-12-31T23:00:00Z +created: 1994-12-31T23:00:00Z +last-update: 2018-12-31T23:33:38Z +source: FRNIC + +ns-list: NSL1-FRNIC +nserver: ns1.nic.fr +nserver: ns2.nic.fr +nserver: ns3.nic.fr +source: FRNIC + +registrar: AFNIC registry +type: Isp Option 2 +anonymous: YES +registered: 1997-05-22T12:00:00Z +source: FRNIC + +nic-hdl: AC3598-FRNIC +type: ORGANIZATION +contact: Afnic (Mayotte - CTOM) +address: immeuble le Stephenson +address: 1, rue Stephenson +address: Hall A2 - 3eme etage +address: 78180 Montigny le Bretonneux +country: FR +phone: +33 1 39 30 83 00 +fax-no: +33 1 39 30 83 01 +e-mail: support@afnic.fr +registrar: AFNIC registry +changed: 2017-07-17T12:41:44Z nic@nic.fr +anonymous: NO +obsoleted: NO +eligstatus: not identified +reachstatus: not identified +source: FRNIC + +nic-hdl: NFC1-FRNIC +type: ROLE +contact: NIC France Contact +address: AFNIC +address: immeuble le Stephenson +address: 1, rue Stephenson +address: Hall A2 - 3eme etage +address: 78180 Montigny-Le-Bretonneux +country: FR +phone: +33 1 39 30 83 00 +e-mail: hostmaster@nic.fr +admin-c: NFC1-FRNIC +tech-c: PL12-FRNIC +tech-c: JP-FRNIC +tech-c: MS1887-FRNIC +tech-c: VL-FRNIC +tech-c: PR1249-FRNIC +tech-c: PV827-FRNIC +tech-c: GO661-FRNIC +tech-c: MS-FRNIC +tech-c: AI1-FRNIC +registrar: AFNIC registry +changed: 2005-08-23T16:13:17Z hostmaster@nic.fr +anonymous: NO +obsoleted: NO +eligstatus: not identified +reachstatus: not identified +source: FRNIC + +nic-hdl: NFC1-FRNIC +type: ROLE +contact: NIC France Contact +address: AFNIC +address: immeuble le Stephenson +address: 1, rue Stephenson +address: Hall A2 - 3eme etage +address: 78180 Montigny-Le-Bretonneux +country: FR +phone: +33 1 39 30 83 00 +e-mail: hostmaster@nic.fr +admin-c: NFC1-FRNIC +tech-c: PL12-FRNIC +tech-c: JP-FRNIC +tech-c: MS1887-FRNIC +tech-c: VL-FRNIC +tech-c: PR1249-FRNIC +tech-c: PV827-FRNIC +tech-c: GO661-FRNIC +tech-c: MS-FRNIC +tech-c: AI1-FRNIC +registrar: AFNIC registry +changed: 2005-08-23T16:13:17Z hostmaster@nic.fr +anonymous: NO +obsoleted: NO +eligstatus: not identified +reachstatus: not identified +source: FRNIC + diff --git a/spec/whois/parsers/responses/whois.nic.fr/fr/property_contact_without_address_spec.rb b/spec/whois/parsers/responses/whois.nic.fr/fr/property_contact_without_address_spec.rb deleted file mode 100644 index 4e6a2a61..00000000 --- a/spec/whois/parsers/responses/whois.nic.fr/fr/property_contact_without_address_spec.rb +++ /dev/null @@ -1,44 +0,0 @@ -# encoding: utf-8 - -# This file is autogenerated. Do not edit it manually. -# If you want change the content of this file, edit -# -# /spec/fixtures/responses/whois.nic.fr/fr/property_contact_without_address.expected -# -# and regenerate the tests with the following rake task -# -# $ rake spec:generate -# - -require 'spec_helper' -require 'whois/parsers/whois.nic.fr.rb' - -describe Whois::Parsers::WhoisNicFr, "property_contact_without_address.expected" do - - subject do - file = fixture("responses", "whois.nic.fr/fr/property_contact_without_address.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) - end - - describe "#registrant_contacts" do - it do - expect(subject.registrant_contacts).to be_a(Array) - expect(subject.registrant_contacts.size).to eq(1) - expect(subject.registrant_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_REGISTRANT) - expect(subject.registrant_contacts[0].id).to eq("ANO00-FRNIC") - expect(subject.registrant_contacts[0].name).to eq("Ano Nymous") - expect(subject.registrant_contacts[0].organization).to eq(nil) - expect(subject.registrant_contacts[0].address).to eq(nil) - expect(subject.registrant_contacts[0].city).to eq(nil) - expect(subject.registrant_contacts[0].zip).to eq(nil) - expect(subject.registrant_contacts[0].state).to eq(nil) - expect(subject.registrant_contacts[0].country).to eq(nil) - expect(subject.registrant_contacts[0].country_code).to eq(nil) - expect(subject.registrant_contacts[0].phone).to eq(nil) - expect(subject.registrant_contacts[0].fax).to eq(nil) - expect(subject.registrant_contacts[0].email).to eq(nil) - expect(subject.registrant_contacts[0].updated_on).to eq(Time.parse("2007-09-03 00:00:00 UTC")) - end - end -end diff --git a/spec/whois/parsers/responses/whois.nic.fr/fr/status_registered_spec.rb b/spec/whois/parsers/responses/whois.nic.fr/fr/status_registered_spec.rb index 5f91d323..392dc488 100644 --- a/spec/whois/parsers/responses/whois.nic.fr/fr/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.nic.fr/fr/status_registered_spec.rb @@ -39,19 +39,19 @@ describe "#created_on" do it do expect(subject.created_on).to be_a(Time) - expect(subject.created_on).to eq(Time.parse("2000-07-27")) + expect(subject.created_on).to eq(Time.parse("2004-05-20 11:28:40 UTC")) end end describe "#updated_on" do it do expect(subject.updated_on).to be_a(Time) - expect(subject.updated_on).to eq(Time.parse("2016-12-30")) + expect(subject.updated_on).to eq(Time.parse("2018-04-08 03:52:04 UTC")) end end describe "#expires_on" do it do expect(subject.expires_on).to be_a(Time) - expect(subject.expires_on).to eq(Time.parse("2017-12-30")) + expect(subject.expires_on).to eq(Time.parse("2019-05-07 07:43:45 UTC")) end end describe "#registrant_contacts" do @@ -60,19 +60,19 @@ expect(subject.registrant_contacts.size).to eq(1) expect(subject.registrant_contacts[0]).to be_a(Whois::Parser::Contact) expect(subject.registrant_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_REGISTRANT) - expect(subject.registrant_contacts[0].id).to eq("GIH6-FRNIC") + expect(subject.registrant_contacts[0].id).to eq("U4339-FRNIC") expect(subject.registrant_contacts[0].name).to eq(nil) - expect(subject.registrant_contacts[0].organization).to eq("Google Ireland Holdings") - expect(subject.registrant_contacts[0].address).to eq("70 Sir John Rogersons Quay\n2 Dublin") + expect(subject.registrant_contacts[0].organization).to eq("1C2") + expect(subject.registrant_contacts[0].address).to eq("20-22, rue Louis Armand\n75015 Paris") expect(subject.registrant_contacts[0].city).to eq(nil) expect(subject.registrant_contacts[0].zip).to eq(nil) expect(subject.registrant_contacts[0].state).to eq(nil) expect(subject.registrant_contacts[0].country).to eq(nil) - expect(subject.registrant_contacts[0].country_code).to eq("IE") - expect(subject.registrant_contacts[0].phone).to eq("+353 14361000") + expect(subject.registrant_contacts[0].country_code).to eq("FR") + expect(subject.registrant_contacts[0].phone).to eq("+33 1 30 62 40 06") expect(subject.registrant_contacts[0].fax).to eq(nil) - expect(subject.registrant_contacts[0].email).to eq("dns-admin@google.com") - expect(subject.registrant_contacts[0].updated_on).to eq(Time.parse("2015-03-20 00:00:00 UTC")) + expect(subject.registrant_contacts[0].email).to eq("jmr@1c2.com") + expect(subject.registrant_contacts[0].updated_on).to eq(Time.parse("2016-09-22 07:52:47 UTC")) end end describe "#admin_contacts" do @@ -81,19 +81,19 @@ expect(subject.admin_contacts.size).to eq(1) expect(subject.admin_contacts[0]).to be_a(Whois::Parser::Contact) expect(subject.admin_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_ADMINISTRATIVE) - expect(subject.admin_contacts[0].id).to eq("GIH5-FRNIC") - expect(subject.admin_contacts[0].name).to eq(nil) - expect(subject.admin_contacts[0].organization).to eq("Google Ireland Holdings") - expect(subject.admin_contacts[0].address).to eq("70 Sir John Rogersons Quay\n2 Dublin") + expect(subject.admin_contacts[0].id).to eq("MO2494-FRNIC") + expect(subject.admin_contacts[0].name).to eq("Magic Online") + expect(subject.admin_contacts[0].organization).to eq("Magic Online") + expect(subject.admin_contacts[0].address).to eq("130, avenue President Wilson\n93100 Montreuil\nParis") expect(subject.admin_contacts[0].city).to eq(nil) expect(subject.admin_contacts[0].zip).to eq(nil) expect(subject.admin_contacts[0].state).to eq(nil) expect(subject.admin_contacts[0].country).to eq(nil) - expect(subject.admin_contacts[0].country_code).to eq("IE") - expect(subject.admin_contacts[0].phone).to eq("+353 14361000") - expect(subject.admin_contacts[0].fax).to eq(nil) - expect(subject.admin_contacts[0].email).to eq("dns-admin@google.com") - expect(subject.admin_contacts[0].updated_on).to eq(Time.parse("2011-12-06 00:00:00 UTC")) + expect(subject.admin_contacts[0].country_code).to eq("FR") + expect(subject.admin_contacts[0].phone).to eq("+33 1 41 58 22 50") + expect(subject.admin_contacts[0].fax).to eq("+33 1 56 72 93 30") + expect(subject.admin_contacts[0].email).to eq("hostmaster@magic.fr") + expect(subject.admin_contacts[0].updated_on).to eq(Time.parse("2014-03-31 16:13:52 UTC")) end end describe "#technical_contacts" do @@ -102,33 +102,29 @@ expect(subject.technical_contacts.size).to eq(1) expect(subject.technical_contacts[0]).to be_a(Whois::Parser::Contact) expect(subject.technical_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_TECHNICAL) - expect(subject.technical_contacts[0].id).to eq("CP4370-FRNIC") - expect(subject.technical_contacts[0].name).to eq("Ccops Provisioning") - expect(subject.technical_contacts[0].organization).to eq("MarkMonitor") - expect(subject.technical_contacts[0].address).to eq("10400 Overland Rd.\nPMB 155\n83709 Boise") + expect(subject.technical_contacts[0].id).to eq("MO2556-FRNIC") + expect(subject.technical_contacts[0].name).to eq("Magic Online") + expect(subject.technical_contacts[0].organization).to eq("Magic Online") + expect(subject.technical_contacts[0].address).to eq("130-134, avenue du President Wilson\n93100 Montreuil\nFrance") expect(subject.technical_contacts[0].city).to eq(nil) expect(subject.technical_contacts[0].zip).to eq(nil) expect(subject.technical_contacts[0].state).to eq(nil) expect(subject.technical_contacts[0].country).to eq(nil) - expect(subject.technical_contacts[0].country_code).to eq("US") - expect(subject.technical_contacts[0].phone).to eq("+1 2083895740") - expect(subject.technical_contacts[0].fax).to eq("+1 2083895771") - expect(subject.technical_contacts[0].email).to eq("ccops@markmonitor.com") - expect(subject.technical_contacts[0].updated_on).to eq(Time.parse("2011-06-14 00:00:00 UTC")) + expect(subject.technical_contacts[0].country_code).to eq("FR") + expect(subject.technical_contacts[0].phone).to eq("+33 1 41 58 22 50") + expect(subject.technical_contacts[0].fax).to eq("+33 1 56 72 93 30") + expect(subject.technical_contacts[0].email).to eq("production@magic.fr") + expect(subject.technical_contacts[0].updated_on).to eq(Time.parse("2014-05-20 15:07:08 UTC")) end end describe "#nameservers" do it do expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers.size).to eq(4) + expect(subject.nameservers.size).to eq(2) expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[0].name).to eq("ns1.google.com") + expect(subject.nameservers[0].name).to eq("ns.magic.fr") expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[1].name).to eq("ns2.google.com") - expect(subject.nameservers[2]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[2].name).to eq("ns3.google.com") - expect(subject.nameservers[3]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[3].name).to eq("ns4.google.com") + expect(subject.nameservers[1].name).to eq("ns2.magic.fr") end end end diff --git a/spec/whois/parsers/responses/whois.nic.fr/tf/status_registered_spec.rb b/spec/whois/parsers/responses/whois.nic.fr/tf/status_registered_spec.rb index aae73d16..410fea8c 100644 --- a/spec/whois/parsers/responses/whois.nic.fr/tf/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.nic.fr/tf/status_registered_spec.rb @@ -39,19 +39,19 @@ describe "#created_on" do it do expect(subject.created_on).to be_a(Time) - expect(subject.created_on).to eq(Time.parse("2004-10-26")) + expect(subject.created_on).to eq(Time.parse("2004-10-25 22:00:00 UTC")) end end describe "#updated_on" do it do expect(subject.updated_on).to be_a(Time) - expect(subject.updated_on).to eq(Time.parse("2016-10-25")) + expect(subject.updated_on).to eq(Time.parse("2018-10-25 22:34:00 UTC")) end end describe "#expires_on" do it do expect(subject.expires_on).to be_a(Time) - expect(subject.expires_on).to eq(Time.parse("2017-10-25")) + expect(subject.expires_on).to eq(Time.parse("2019-10-25 22:00:00 UTC")) end end describe "#registrant_contacts" do @@ -63,16 +63,16 @@ expect(subject.registrant_contacts[0].id).to eq("AAEA9-FRNIC") expect(subject.registrant_contacts[0].name).to eq(nil) expect(subject.registrant_contacts[0].organization).to eq("Afnic (Terres Australes et Antarctiques - TOM)") - expect(subject.registrant_contacts[0].address).to eq("immeuble international\n2, rue Stephenson\nMontigny-Le-Bretonneux\n78181 Saint Quentin en Yvelines Cedex") + expect(subject.registrant_contacts[0].address).to eq("immeuble le Stephenson\n1, rue Stephenson\nHall A2 - 3eme etage\n78180 Montigny le Bretonneux") expect(subject.registrant_contacts[0].city).to eq(nil) expect(subject.registrant_contacts[0].zip).to eq(nil) expect(subject.registrant_contacts[0].state).to eq(nil) expect(subject.registrant_contacts[0].country).to eq(nil) expect(subject.registrant_contacts[0].country_code).to eq("FR") - expect(subject.registrant_contacts[0].phone).to eq(nil) - expect(subject.registrant_contacts[0].fax).to eq(nil) - expect(subject.registrant_contacts[0].email).to eq(nil) - expect(subject.registrant_contacts[0].updated_on).to eq(Time.parse("2008-10-09 00:00:00 UTC")) + expect(subject.registrant_contacts[0].phone).to eq("+33 1 39 30 83 00") + expect(subject.registrant_contacts[0].fax).to eq("+33 1 39 30 83 01") + expect(subject.registrant_contacts[0].email).to eq("support@afnic.fr") + expect(subject.registrant_contacts[0].updated_on).to eq(Time.parse("2017-07-17 12:40:50 UTC")) end end describe "#admin_contacts" do @@ -84,7 +84,7 @@ expect(subject.admin_contacts[0].id).to eq("NFC1-FRNIC") expect(subject.admin_contacts[0].name).to eq("NIC France Contact") expect(subject.admin_contacts[0].organization).to eq("AFNIC") - expect(subject.admin_contacts[0].address).to eq("immeuble international\n2, rue Stephenson\nMontigny le Bretonneux\n78181 Saint Quentin en Yvelines Cedex") + expect(subject.admin_contacts[0].address).to eq("immeuble le Stephenson\n1, rue Stephenson\nHall A2 - 3eme etage\n78180 Montigny-Le-Bretonneux") expect(subject.admin_contacts[0].city).to eq(nil) expect(subject.admin_contacts[0].zip).to eq(nil) expect(subject.admin_contacts[0].state).to eq(nil) @@ -93,7 +93,7 @@ expect(subject.admin_contacts[0].phone).to eq("+33 1 39 30 83 00") expect(subject.admin_contacts[0].fax).to eq(nil) expect(subject.admin_contacts[0].email).to eq("hostmaster@nic.fr") - expect(subject.admin_contacts[0].updated_on).to eq(Time.parse("2005-08-23 00:00:00 UTC")) + expect(subject.admin_contacts[0].updated_on).to eq(Time.parse("2005-08-23 16:13:17 UTC")) end end describe "#technical_contacts" do @@ -105,7 +105,7 @@ expect(subject.technical_contacts[0].id).to eq("NFC1-FRNIC") expect(subject.technical_contacts[0].name).to eq("NIC France Contact") expect(subject.technical_contacts[0].organization).to eq("AFNIC") - expect(subject.technical_contacts[0].address).to eq("immeuble international\n2, rue Stephenson\nMontigny le Bretonneux\n78181 Saint Quentin en Yvelines Cedex") + expect(subject.technical_contacts[0].address).to eq("immeuble le Stephenson\n1, rue Stephenson\nHall A2 - 3eme etage\n78180 Montigny-Le-Bretonneux") expect(subject.technical_contacts[0].city).to eq(nil) expect(subject.technical_contacts[0].zip).to eq(nil) expect(subject.technical_contacts[0].state).to eq(nil) @@ -114,7 +114,7 @@ expect(subject.technical_contacts[0].phone).to eq("+33 1 39 30 83 00") expect(subject.technical_contacts[0].fax).to eq(nil) expect(subject.technical_contacts[0].email).to eq("hostmaster@nic.fr") - expect(subject.technical_contacts[0].updated_on).to eq(Time.parse("2005-08-23 00:00:00 UTC")) + expect(subject.technical_contacts[0].updated_on).to eq(Time.parse("2005-08-23 16:13:17 UTC")) end end describe "#nameservers" do @@ -123,16 +123,10 @@ expect(subject.nameservers.size).to eq(3) expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) expect(subject.nameservers[0].name).to eq("ns1.nic.fr") - expect(subject.nameservers[0].ipv4).to eq("192.134.4.1") - expect(subject.nameservers[0].ipv6).to eq("2001:67c:2218:2::4:1") expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) expect(subject.nameservers[1].name).to eq("ns2.nic.fr") - expect(subject.nameservers[1].ipv4).to eq("192.93.0.4") - expect(subject.nameservers[1].ipv6).to eq("2001:660:3005:1::1:2") expect(subject.nameservers[2]).to be_a(Whois::Parser::Nameserver) expect(subject.nameservers[2].name).to eq("ns3.nic.fr") - expect(subject.nameservers[2].ipv4).to eq("192.134.0.49") - expect(subject.nameservers[2].ipv6).to eq("2001:660:3006:1::1:1") end end end diff --git a/spec/whois/parsers/responses/whois.nic.pm/pm/status_registered_spec.rb b/spec/whois/parsers/responses/whois.nic.pm/pm/status_registered_spec.rb index b78832a2..7af5ceed 100644 --- a/spec/whois/parsers/responses/whois.nic.pm/pm/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.nic.pm/pm/status_registered_spec.rb @@ -39,19 +39,19 @@ describe "#created_on" do it do expect(subject.created_on).to be_a(Time) - expect(subject.created_on).to eq(Time.parse("1995-01-01")) + expect(subject.created_on).to eq(Time.parse("1994-12-31 23:00:00 UTC")) end end describe "#updated_on" do it do expect(subject.updated_on).to be_a(Time) - expect(subject.updated_on).to eq(Time.parse("2016-12-31")) + expect(subject.updated_on).to eq(Time.parse("2018-12-31 23:33:19 UTC")) end end describe "#expires_on" do it do expect(subject.expires_on).to be_a(Time) - expect(subject.expires_on).to eq(Time.parse("2017-12-31")) + expect(subject.expires_on).to eq(Time.parse("2019-12-31 23:00:00 UTC")) end end describe "#registrant_contacts" do @@ -63,16 +63,16 @@ expect(subject.registrant_contacts[0].id).to eq("APEM2-FRNIC") expect(subject.registrant_contacts[0].name).to eq(nil) expect(subject.registrant_contacts[0].organization).to eq("Afnic (Saint-Pierre et Miquelon - CTOM)") - expect(subject.registrant_contacts[0].address).to eq("immeuble international\n2, rue Stephenson\nMontigny-Le-Bretonneux\n78181 Saint Quentin en Yvelines Cedex") + expect(subject.registrant_contacts[0].address).to eq("immeuble le Stephenson\n1, rue Stephenson\nHall A2 - 3eme etage\n78180 Montigny le Bretonneux") expect(subject.registrant_contacts[0].city).to eq(nil) expect(subject.registrant_contacts[0].zip).to eq(nil) expect(subject.registrant_contacts[0].state).to eq(nil) expect(subject.registrant_contacts[0].country).to eq(nil) expect(subject.registrant_contacts[0].country_code).to eq("FR") - expect(subject.registrant_contacts[0].phone).to eq(nil) - expect(subject.registrant_contacts[0].fax).to eq(nil) - expect(subject.registrant_contacts[0].email).to eq(nil) - expect(subject.registrant_contacts[0].updated_on).to eq(Time.parse("2008-10-09 00:00:00 UTC")) + expect(subject.registrant_contacts[0].phone).to eq("+33 1 39 30 83 00") + expect(subject.registrant_contacts[0].fax).to eq("+33 1 39 30 83 01") + expect(subject.registrant_contacts[0].email).to eq("support@afnic.fr") + expect(subject.registrant_contacts[0].updated_on).to eq(Time.parse("2017-07-17 12:39:46 UTC")) end end describe "#admin_contacts" do @@ -84,7 +84,7 @@ expect(subject.admin_contacts[0].id).to eq("NFC1-FRNIC") expect(subject.admin_contacts[0].name).to eq("NIC France Contact") expect(subject.admin_contacts[0].organization).to eq("AFNIC") - expect(subject.admin_contacts[0].address).to eq("immeuble international\n2, rue Stephenson\nMontigny le Bretonneux\n78181 Saint Quentin en Yvelines Cedex") + expect(subject.admin_contacts[0].address).to eq("immeuble le Stephenson\n1, rue Stephenson\nHall A2 - 3eme etage\n78180 Montigny-Le-Bretonneux") expect(subject.admin_contacts[0].city).to eq(nil) expect(subject.admin_contacts[0].zip).to eq(nil) expect(subject.admin_contacts[0].state).to eq(nil) @@ -93,7 +93,7 @@ expect(subject.admin_contacts[0].phone).to eq("+33 1 39 30 83 00") expect(subject.admin_contacts[0].fax).to eq(nil) expect(subject.admin_contacts[0].email).to eq("hostmaster@nic.fr") - expect(subject.admin_contacts[0].updated_on).to eq(Time.parse("2005-08-23 00:00:00 UTC")) + expect(subject.admin_contacts[0].updated_on).to eq(Time.parse("2005-08-23 16:13:17 UTC")) end end describe "#technical_contacts" do @@ -105,7 +105,7 @@ expect(subject.technical_contacts[0].id).to eq("NFC1-FRNIC") expect(subject.technical_contacts[0].name).to eq("NIC France Contact") expect(subject.technical_contacts[0].organization).to eq("AFNIC") - expect(subject.technical_contacts[0].address).to eq("immeuble international\n2, rue Stephenson\nMontigny le Bretonneux\n78181 Saint Quentin en Yvelines Cedex") + expect(subject.technical_contacts[0].address).to eq("immeuble le Stephenson\n1, rue Stephenson\nHall A2 - 3eme etage\n78180 Montigny-Le-Bretonneux") expect(subject.technical_contacts[0].city).to eq(nil) expect(subject.technical_contacts[0].zip).to eq(nil) expect(subject.technical_contacts[0].state).to eq(nil) @@ -114,13 +114,19 @@ expect(subject.technical_contacts[0].phone).to eq("+33 1 39 30 83 00") expect(subject.technical_contacts[0].fax).to eq(nil) expect(subject.technical_contacts[0].email).to eq("hostmaster@nic.fr") - expect(subject.technical_contacts[0].updated_on).to eq(Time.parse("2005-08-23 00:00:00 UTC")) + expect(subject.technical_contacts[0].updated_on).to eq(Time.parse("2005-08-23 16:13:17 UTC")) end end describe "#nameservers" do it do expect(subject.nameservers).to be_a(Array) expect(subject.nameservers.size).to eq(3) + expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[0].name).to eq("ns1.nic.fr") + expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[1].name).to eq("ns2.nic.fr") + expect(subject.nameservers[2]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[2].name).to eq("ns3.nic.fr") end end end diff --git a/spec/whois/parsers/responses/whois.nic.re/re/status_registered_spec.rb b/spec/whois/parsers/responses/whois.nic.re/re/status_registered_spec.rb index b09f4bda..04d98b9c 100644 --- a/spec/whois/parsers/responses/whois.nic.re/re/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.nic.re/re/status_registered_spec.rb @@ -39,19 +39,19 @@ describe "#created_on" do it do expect(subject.created_on).to be_a(Time) - expect(subject.created_on).to eq(Time.parse("1995-01-01")) + expect(subject.created_on).to eq(Time.parse("1994-12-31 23:00:00 UTC")) end end describe "#updated_on" do it do expect(subject.updated_on).to be_a(Time) - expect(subject.updated_on).to eq(Time.parse("2016-12-31")) + expect(subject.updated_on).to eq(Time.parse("2018-12-31 23:33:19 UTC")) end end describe "#expires_on" do it do expect(subject.expires_on).to be_a(Time) - expect(subject.expires_on).to eq(Time.parse("2017-12-31")) + expect(subject.expires_on).to eq(Time.parse("2019-12-31 23:00:00 UTC")) end end describe "#registrant_contacts" do @@ -63,16 +63,16 @@ expect(subject.registrant_contacts[0].id).to eq("A1967-FRNIC") expect(subject.registrant_contacts[0].name).to eq(nil) expect(subject.registrant_contacts[0].organization).to eq("AFNIC") - expect(subject.registrant_contacts[0].address).to eq("immeuble international\n2, rue Stephenson\nMontigny-Le-Bretonneux\n78181 Saint Quentin en Yvelines") + expect(subject.registrant_contacts[0].address).to eq("immeuble le Stephenson\n1, rue Stephenson\nHall A2 - 3eme etage\n78180 Montigny le Bretonneux") expect(subject.registrant_contacts[0].city).to eq(nil) expect(subject.registrant_contacts[0].zip).to eq(nil) expect(subject.registrant_contacts[0].state).to eq(nil) expect(subject.registrant_contacts[0].country).to eq(nil) expect(subject.registrant_contacts[0].country_code).to eq("FR") - expect(subject.registrant_contacts[0].phone).to eq(nil) - expect(subject.registrant_contacts[0].fax).to eq(nil) - expect(subject.registrant_contacts[0].email).to eq(nil) - expect(subject.registrant_contacts[0].updated_on).to eq(Time.parse("2009-12-02 00:00:00 UTC")) + expect(subject.registrant_contacts[0].phone).to eq("+33 1 39 30 83 00") + expect(subject.registrant_contacts[0].fax).to eq("+33 1 39 30 83 01") + expect(subject.registrant_contacts[0].email).to eq("support@afnic.fr") + expect(subject.registrant_contacts[0].updated_on).to eq(Time.parse("2017-07-17 12:40:19 UTC")) end end describe "#admin_contacts" do @@ -84,7 +84,7 @@ expect(subject.admin_contacts[0].id).to eq("NFC1-FRNIC") expect(subject.admin_contacts[0].name).to eq("NIC France Contact") expect(subject.admin_contacts[0].organization).to eq("AFNIC") - expect(subject.admin_contacts[0].address).to eq("immeuble international\n2, rue Stephenson\nMontigny le Bretonneux\n78181 Saint Quentin en Yvelines Cedex") + expect(subject.admin_contacts[0].address).to eq("immeuble le Stephenson\n1, rue Stephenson\nHall A2 - 3eme etage\n78180 Montigny-Le-Bretonneux") expect(subject.admin_contacts[0].city).to eq(nil) expect(subject.admin_contacts[0].zip).to eq(nil) expect(subject.admin_contacts[0].state).to eq(nil) @@ -93,7 +93,7 @@ expect(subject.admin_contacts[0].phone).to eq("+33 1 39 30 83 00") expect(subject.admin_contacts[0].fax).to eq(nil) expect(subject.admin_contacts[0].email).to eq("hostmaster@nic.fr") - expect(subject.admin_contacts[0].updated_on).to eq(Time.parse("2005-08-23 00:00:00 UTC")) + expect(subject.admin_contacts[0].updated_on).to eq(Time.parse("2005-08-23 16:13:17 UTC")) end end describe "#technical_contacts" do @@ -105,7 +105,7 @@ expect(subject.technical_contacts[0].id).to eq("NFC1-FRNIC") expect(subject.technical_contacts[0].name).to eq("NIC France Contact") expect(subject.technical_contacts[0].organization).to eq("AFNIC") - expect(subject.technical_contacts[0].address).to eq("immeuble international\n2, rue Stephenson\nMontigny le Bretonneux\n78181 Saint Quentin en Yvelines Cedex") + expect(subject.technical_contacts[0].address).to eq("immeuble le Stephenson\n1, rue Stephenson\nHall A2 - 3eme etage\n78180 Montigny-Le-Bretonneux") expect(subject.technical_contacts[0].city).to eq(nil) expect(subject.technical_contacts[0].zip).to eq(nil) expect(subject.technical_contacts[0].state).to eq(nil) @@ -114,13 +114,19 @@ expect(subject.technical_contacts[0].phone).to eq("+33 1 39 30 83 00") expect(subject.technical_contacts[0].fax).to eq(nil) expect(subject.technical_contacts[0].email).to eq("hostmaster@nic.fr") - expect(subject.technical_contacts[0].updated_on).to eq(Time.parse("2005-08-23 00:00:00 UTC")) + expect(subject.technical_contacts[0].updated_on).to eq(Time.parse("2005-08-23 16:13:17 UTC")) end end describe "#nameservers" do it do expect(subject.nameservers).to be_a(Array) expect(subject.nameservers.size).to eq(3) + expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[0].name).to eq("ns1.nic.fr") + expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[1].name).to eq("ns2.nic.fr") + expect(subject.nameservers[2]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[2].name).to eq("ns3.nic.fr") end end end diff --git a/spec/whois/parsers/responses/whois.nic.wf/wf/status_registered_spec.rb b/spec/whois/parsers/responses/whois.nic.wf/wf/status_registered_spec.rb index ece8b6c5..e1d096e1 100644 --- a/spec/whois/parsers/responses/whois.nic.wf/wf/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.nic.wf/wf/status_registered_spec.rb @@ -39,19 +39,19 @@ describe "#created_on" do it do expect(subject.created_on).to be_a(Time) - expect(subject.created_on).to eq(Time.parse("1995-01-01")) + expect(subject.created_on).to eq(Time.parse("1994-12-31 23:00:00 UTC")) end end describe "#updated_on" do it do expect(subject.updated_on).to be_a(Time) - expect(subject.updated_on).to eq(Time.parse("2016-12-31")) + expect(subject.updated_on).to eq(Time.parse("2018-12-31 23:33:39 UTC")) end end describe "#expires_on" do it do expect(subject.expires_on).to be_a(Time) - expect(subject.expires_on).to eq(Time.parse("2017-12-31")) + expect(subject.expires_on).to eq(Time.parse("2019-12-31 23:00:00 UTC")) end end describe "#registrant_contacts" do @@ -63,16 +63,16 @@ expect(subject.registrant_contacts[0].id).to eq("AEFT2-FRNIC") expect(subject.registrant_contacts[0].name).to eq(nil) expect(subject.registrant_contacts[0].organization).to eq("Afnic (Wallis et Futuna - TOM)") - expect(subject.registrant_contacts[0].address).to eq("immeuble international\n2, rue Stephenson\nMontigny-Le-Bretonneux\n78181 Saint Quentin en Yvelines Cedex") + expect(subject.registrant_contacts[0].address).to eq("immeuble le Stephenson\n1, rue Stephenson\nHall A2 - 3eme etage\n78180 Montigny le Bretonneux") expect(subject.registrant_contacts[0].city).to eq(nil) expect(subject.registrant_contacts[0].zip).to eq(nil) expect(subject.registrant_contacts[0].state).to eq(nil) expect(subject.registrant_contacts[0].country).to eq(nil) expect(subject.registrant_contacts[0].country_code).to eq("FR") - expect(subject.registrant_contacts[0].phone).to eq(nil) - expect(subject.registrant_contacts[0].fax).to eq(nil) - expect(subject.registrant_contacts[0].email).to eq(nil) - expect(subject.registrant_contacts[0].updated_on).to eq(Time.parse("2008-10-09 00:00:00 UTC")) + expect(subject.registrant_contacts[0].phone).to eq("+33 1 39 30 83 00") + expect(subject.registrant_contacts[0].fax).to eq("+33 1 39 30 83 01") + expect(subject.registrant_contacts[0].email).to eq("support@afnic.fr") + expect(subject.registrant_contacts[0].updated_on).to eq(Time.parse("2017-07-17 12:41:18 UTC")) end end describe "#admin_contacts" do @@ -84,7 +84,7 @@ expect(subject.admin_contacts[0].id).to eq("NFC1-FRNIC") expect(subject.admin_contacts[0].name).to eq("NIC France Contact") expect(subject.admin_contacts[0].organization).to eq("AFNIC") - expect(subject.admin_contacts[0].address).to eq("immeuble international\n2, rue Stephenson\nMontigny le Bretonneux\n78181 Saint Quentin en Yvelines Cedex") + expect(subject.admin_contacts[0].address).to eq("immeuble le Stephenson\n1, rue Stephenson\nHall A2 - 3eme etage\n78180 Montigny-Le-Bretonneux") expect(subject.admin_contacts[0].city).to eq(nil) expect(subject.admin_contacts[0].zip).to eq(nil) expect(subject.admin_contacts[0].state).to eq(nil) @@ -93,7 +93,7 @@ expect(subject.admin_contacts[0].phone).to eq("+33 1 39 30 83 00") expect(subject.admin_contacts[0].fax).to eq(nil) expect(subject.admin_contacts[0].email).to eq("hostmaster@nic.fr") - expect(subject.admin_contacts[0].updated_on).to eq(Time.parse("2005-08-23 00:00:00 UTC")) + expect(subject.admin_contacts[0].updated_on).to eq(Time.parse("2005-08-23 16:13:17 UTC")) end end describe "#technical_contacts" do @@ -105,7 +105,7 @@ expect(subject.technical_contacts[0].id).to eq("NFC1-FRNIC") expect(subject.technical_contacts[0].name).to eq("NIC France Contact") expect(subject.technical_contacts[0].organization).to eq("AFNIC") - expect(subject.technical_contacts[0].address).to eq("immeuble international\n2, rue Stephenson\nMontigny le Bretonneux\n78181 Saint Quentin en Yvelines Cedex") + expect(subject.technical_contacts[0].address).to eq("immeuble le Stephenson\n1, rue Stephenson\nHall A2 - 3eme etage\n78180 Montigny-Le-Bretonneux") expect(subject.technical_contacts[0].city).to eq(nil) expect(subject.technical_contacts[0].zip).to eq(nil) expect(subject.technical_contacts[0].state).to eq(nil) @@ -114,7 +114,7 @@ expect(subject.technical_contacts[0].phone).to eq("+33 1 39 30 83 00") expect(subject.technical_contacts[0].fax).to eq(nil) expect(subject.technical_contacts[0].email).to eq("hostmaster@nic.fr") - expect(subject.technical_contacts[0].updated_on).to eq(Time.parse("2005-08-23 00:00:00 UTC")) + expect(subject.technical_contacts[0].updated_on).to eq(Time.parse("2005-08-23 16:13:17 UTC")) end end describe "#nameservers" do @@ -123,16 +123,10 @@ expect(subject.nameservers.size).to eq(3) expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) expect(subject.nameservers[0].name).to eq("ns1.nic.fr") - expect(subject.nameservers[0].ipv4).to eq("192.134.4.1") - expect(subject.nameservers[0].ipv6).to eq("2001:67c:2218:2::4:1") expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) expect(subject.nameservers[1].name).to eq("ns2.nic.fr") - expect(subject.nameservers[1].ipv4).to eq("192.93.0.4") - expect(subject.nameservers[1].ipv6).to eq("2001:660:3005:1::1:2") expect(subject.nameservers[2]).to be_a(Whois::Parser::Nameserver) expect(subject.nameservers[2].name).to eq("ns3.nic.fr") - expect(subject.nameservers[2].ipv4).to eq("192.134.0.49") - expect(subject.nameservers[2].ipv6).to eq("2001:660:3006:1::1:1") end end end diff --git a/spec/whois/parsers/responses/whois.nic.fr/yt/response_throttled_spec.rb b/spec/whois/parsers/responses/whois.nic.yt/yt/response_throttled_spec.rb similarity index 67% rename from spec/whois/parsers/responses/whois.nic.fr/yt/response_throttled_spec.rb rename to spec/whois/parsers/responses/whois.nic.yt/yt/response_throttled_spec.rb index bdbc7ee0..8417ce59 100644 --- a/spec/whois/parsers/responses/whois.nic.fr/yt/response_throttled_spec.rb +++ b/spec/whois/parsers/responses/whois.nic.yt/yt/response_throttled_spec.rb @@ -3,7 +3,7 @@ # This file is autogenerated. Do not edit it manually. # If you want change the content of this file, edit # -# /spec/fixtures/responses/whois.nic.fr/yt/response_throttled.expected +# /spec/fixtures/responses/whois.nic.yt/yt/response_throttled.expected # # and regenerate the tests with the following rake task # @@ -11,12 +11,12 @@ # require 'spec_helper' -require 'whois/parsers/whois.nic.fr.rb' +require 'whois/parsers/whois.nic.yt.rb' -describe Whois::Parsers::WhoisNicFr, "response_throttled.expected" do +describe Whois::Parsers::WhoisNicYt, "response_throttled.expected" do subject do - file = fixture("responses", "whois.nic.fr/yt/response_throttled.txt") + file = fixture("responses", "whois.nic.yt/yt/response_throttled.txt") part = Whois::Record::Part.new(body: File.read(file)) described_class.new(part) end diff --git a/spec/whois/parsers/responses/whois.nic.fr/yt/status_available_spec.rb b/spec/whois/parsers/responses/whois.nic.yt/yt/status_available_spec.rb similarity index 87% rename from spec/whois/parsers/responses/whois.nic.fr/yt/status_available_spec.rb rename to spec/whois/parsers/responses/whois.nic.yt/yt/status_available_spec.rb index d9f63831..a59f9805 100644 --- a/spec/whois/parsers/responses/whois.nic.fr/yt/status_available_spec.rb +++ b/spec/whois/parsers/responses/whois.nic.yt/yt/status_available_spec.rb @@ -3,7 +3,7 @@ # This file is autogenerated. Do not edit it manually. # If you want change the content of this file, edit # -# /spec/fixtures/responses/whois.nic.fr/yt/status_available.expected +# /spec/fixtures/responses/whois.nic.yt/yt/status_available.expected # # and regenerate the tests with the following rake task # @@ -11,12 +11,12 @@ # require 'spec_helper' -require 'whois/parsers/whois.nic.fr.rb' +require 'whois/parsers/whois.nic.yt.rb' -describe Whois::Parsers::WhoisNicFr, "status_available.expected" do +describe Whois::Parsers::WhoisNicYt, "status_available.expected" do subject do - file = fixture("responses", "whois.nic.fr/yt/status_available.txt") + file = fixture("responses", "whois.nic.yt/yt/status_available.txt") part = Whois::Record::Part.new(body: File.read(file)) described_class.new(part) end diff --git a/spec/whois/parsers/responses/whois.nic.fr/yt/status_registered_spec.rb b/spec/whois/parsers/responses/whois.nic.yt/yt/status_registered_spec.rb similarity index 77% rename from spec/whois/parsers/responses/whois.nic.fr/yt/status_registered_spec.rb rename to spec/whois/parsers/responses/whois.nic.yt/yt/status_registered_spec.rb index aa54db6e..33400dff 100644 --- a/spec/whois/parsers/responses/whois.nic.fr/yt/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.nic.yt/yt/status_registered_spec.rb @@ -3,7 +3,7 @@ # This file is autogenerated. Do not edit it manually. # If you want change the content of this file, edit # -# /spec/fixtures/responses/whois.nic.fr/yt/status_registered.expected +# /spec/fixtures/responses/whois.nic.yt/yt/status_registered.expected # # and regenerate the tests with the following rake task # @@ -11,12 +11,12 @@ # require 'spec_helper' -require 'whois/parsers/whois.nic.fr.rb' +require 'whois/parsers/whois.nic.yt.rb' -describe Whois::Parsers::WhoisNicFr, "status_registered.expected" do +describe Whois::Parsers::WhoisNicYt, "status_registered.expected" do subject do - file = fixture("responses", "whois.nic.fr/yt/status_registered.txt") + file = fixture("responses", "whois.nic.yt/yt/status_registered.txt") part = Whois::Record::Part.new(body: File.read(file)) described_class.new(part) end @@ -39,19 +39,19 @@ describe "#created_on" do it do expect(subject.created_on).to be_a(Time) - expect(subject.created_on).to eq(Time.parse("1995-01-01")) + expect(subject.created_on).to eq(Time.parse("1994-12-31 23:00:00 UTC")) end end describe "#updated_on" do it do expect(subject.updated_on).to be_a(Time) - expect(subject.updated_on).to eq(Time.parse("2016-12-31")) + expect(subject.updated_on).to eq(Time.parse("2018-12-31 23:33:38 UTC")) end end describe "#expires_on" do it do expect(subject.expires_on).to be_a(Time) - expect(subject.expires_on).to eq(Time.parse("2017-12-31")) + expect(subject.expires_on).to eq(Time.parse("2019-12-31 23:00:00 UTC")) end end describe "#registrant_contacts" do @@ -63,16 +63,16 @@ expect(subject.registrant_contacts[0].id).to eq("AC3598-FRNIC") expect(subject.registrant_contacts[0].name).to eq(nil) expect(subject.registrant_contacts[0].organization).to eq("Afnic (Mayotte - CTOM)") - expect(subject.registrant_contacts[0].address).to eq("immeuble international\n2, rue Stephenson\nMontigny-Le-Bretonneux\n78181 Saint Quentin en Yvelines Cedex") + expect(subject.registrant_contacts[0].address).to eq("immeuble le Stephenson\n1, rue Stephenson\nHall A2 - 3eme etage\n78180 Montigny le Bretonneux") expect(subject.registrant_contacts[0].city).to eq(nil) expect(subject.registrant_contacts[0].zip).to eq(nil) expect(subject.registrant_contacts[0].state).to eq(nil) expect(subject.registrant_contacts[0].country).to eq(nil) expect(subject.registrant_contacts[0].country_code).to eq("FR") - expect(subject.registrant_contacts[0].phone).to eq(nil) - expect(subject.registrant_contacts[0].fax).to eq(nil) - expect(subject.registrant_contacts[0].email).to eq(nil) - expect(subject.registrant_contacts[0].updated_on).to eq(Time.parse("2008-10-09 00:00:00 UTC")) + expect(subject.registrant_contacts[0].phone).to eq("+33 1 39 30 83 00") + expect(subject.registrant_contacts[0].fax).to eq("+33 1 39 30 83 01") + expect(subject.registrant_contacts[0].email).to eq("support@afnic.fr") + expect(subject.registrant_contacts[0].updated_on).to eq(Time.parse("2017-07-17 12:41:44 UTC")) end end describe "#admin_contacts" do @@ -84,7 +84,7 @@ expect(subject.admin_contacts[0].id).to eq("NFC1-FRNIC") expect(subject.admin_contacts[0].name).to eq("NIC France Contact") expect(subject.admin_contacts[0].organization).to eq("AFNIC") - expect(subject.admin_contacts[0].address).to eq("immeuble international\n2, rue Stephenson\nMontigny le Bretonneux\n78181 Saint Quentin en Yvelines Cedex") + expect(subject.admin_contacts[0].address).to eq("immeuble le Stephenson\n1, rue Stephenson\nHall A2 - 3eme etage\n78180 Montigny-Le-Bretonneux") expect(subject.admin_contacts[0].city).to eq(nil) expect(subject.admin_contacts[0].zip).to eq(nil) expect(subject.admin_contacts[0].state).to eq(nil) @@ -93,7 +93,7 @@ expect(subject.admin_contacts[0].phone).to eq("+33 1 39 30 83 00") expect(subject.admin_contacts[0].fax).to eq(nil) expect(subject.admin_contacts[0].email).to eq("hostmaster@nic.fr") - expect(subject.admin_contacts[0].updated_on).to eq(Time.parse("2005-08-23 00:00:00 UTC")) + expect(subject.admin_contacts[0].updated_on).to eq(Time.parse("2005-08-23 16:13:17 UTC")) end end describe "#technical_contacts" do @@ -105,7 +105,7 @@ expect(subject.technical_contacts[0].id).to eq("NFC1-FRNIC") expect(subject.technical_contacts[0].name).to eq("NIC France Contact") expect(subject.technical_contacts[0].organization).to eq("AFNIC") - expect(subject.technical_contacts[0].address).to eq("immeuble international\n2, rue Stephenson\nMontigny le Bretonneux\n78181 Saint Quentin en Yvelines Cedex") + expect(subject.technical_contacts[0].address).to eq("immeuble le Stephenson\n1, rue Stephenson\nHall A2 - 3eme etage\n78180 Montigny-Le-Bretonneux") expect(subject.technical_contacts[0].city).to eq(nil) expect(subject.technical_contacts[0].zip).to eq(nil) expect(subject.technical_contacts[0].state).to eq(nil) @@ -114,7 +114,7 @@ expect(subject.technical_contacts[0].phone).to eq("+33 1 39 30 83 00") expect(subject.technical_contacts[0].fax).to eq(nil) expect(subject.technical_contacts[0].email).to eq("hostmaster@nic.fr") - expect(subject.technical_contacts[0].updated_on).to eq(Time.parse("2005-08-23 00:00:00 UTC")) + expect(subject.technical_contacts[0].updated_on).to eq(Time.parse("2005-08-23 16:13:17 UTC")) end end describe "#nameservers" do @@ -123,16 +123,10 @@ expect(subject.nameservers.size).to eq(3) expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) expect(subject.nameservers[0].name).to eq("ns1.nic.fr") - expect(subject.nameservers[0].ipv4).to eq("192.134.4.1") - expect(subject.nameservers[0].ipv6).to eq("2001:67c:2218:2::4:1") expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) expect(subject.nameservers[1].name).to eq("ns2.nic.fr") - expect(subject.nameservers[1].ipv4).to eq("192.93.0.4") - expect(subject.nameservers[1].ipv6).to eq("2001:660:3005:1::1:2") expect(subject.nameservers[2]).to be_a(Whois::Parser::Nameserver) expect(subject.nameservers[2].name).to eq("ns3.nic.fr") - expect(subject.nameservers[2].ipv4).to eq("192.134.0.49") - expect(subject.nameservers[2].ipv6).to eq("2001:660:3006:1::1:1") end end end From e2b84e73f43ef692e834c2d151f5c7e50b384eae Mon Sep 17 00:00:00 2001 From: Adrien Rey-Jarthon Date: Thu, 11 Nov 2021 15:42:09 +0100 Subject: [PATCH 04/29] Big update and refactoring of all the Afilias based parser format, fixing broken parsing for .ME, .ORG, .INFO, .PRO, .BZ, .GI, .LC, .MN, .SC, .VC, .AG, .IN, .AERO, .ASIA, .MOBI, .POST, .XXX. (based on #34) + Standardize a bit more the Registar object by always filling the name first --- CHANGELOG.md | 2 + lib/whois/parsers/base_afilias.rb | 110 +++-------- lib/whois/parsers/base_afilias2.rb | 140 ------------- lib/whois/parsers/base_cocca.rb | 1 - lib/whois/parsers/base_icann_compliant.rb | 31 +-- lib/whois/parsers/base_shared1.rb | 5 +- lib/whois/parsers/base_shared2.rb | 4 +- lib/whois/parsers/base_shared3.rb | 6 +- lib/whois/parsers/whois.aero.rb | 17 +- lib/whois/parsers/whois.afilias.net.rb | 7 +- lib/whois/parsers/whois.ati.tn.rb | 5 +- lib/whois/parsers/whois.audns.net.au.rb | 4 +- lib/whois/parsers/whois.biz.rb | 6 - lib/whois/parsers/whois.cctld.by.rb | 5 +- lib/whois/parsers/whois.centralnic.com.rb | 13 +- lib/whois/parsers/whois.cira.ca.rb | 5 +- lib/whois/parsers/whois.cnnic.cn.rb | 4 +- lib/whois/parsers/whois.denic.de.rb | 7 +- lib/whois/parsers/whois.dns.pl.rb | 4 +- lib/whois/parsers/whois.donuts.co.rb | 28 --- lib/whois/parsers/whois.enom.com.rb | 6 - lib/whois/parsers/whois.inregistry.net.rb | 5 +- lib/whois/parsers/whois.markmonitor.com.rb | 5 - lib/whois/parsers/whois.monic.mo.rb | 4 +- lib/whois/parsers/whois.nic.asia.rb | 64 ------ lib/whois/parsers/whois.nic.es.rb | 15 +- lib/whois/parsers/whois.nic.fm.rb | 6 - lib/whois/parsers/whois.nic.me.rb | 64 ------ lib/whois/parsers/whois.nic.xxx.rb | 25 +-- lib/whois/parsers/whois.pir.org.rb | 70 ------- lib/whois/parsers/whois.schlund.info.rb | 6 - lib/whois/parsers/whois.smallregistry.net.rb | 7 +- lib/whois/parsers/whois.srs.net.nz.rb | 4 +- lib/whois/parsers/whois.sx.rb | 4 +- lib/whois/parsers/whois.tcinet.ru.rb | 4 +- lib/whois/parsers/whois.tld.ee.rb | 1 - lib/whois/parsers/whois.uniregistry.net.rb | 10 +- lib/whois/parsers/whois.yoursrs.com.rb | 4 +- lib/whois/parsers/za_central_registry.rb | 3 +- lib/whois/scanners/base_afilias.rb | 10 +- lib/whois/scanners/base_icann_compliant.rb | 14 ++ lib/whois/scanners/whois.pir.org.rb | 17 -- .../capetown/status_registered.expected | 1 - .../vg/status_registered.expected | 1 - .../cc/status_registered.expected | 1 - .../co.za/status_registered.expected | 1 - .../durban/status_registered.expected | 1 - .../joburg/status_registered.expected | 1 - .../org.za/status_registered.expected | 1 - .../tv/status_registered.expected | 1 - .../status_registered.expected | 1 - .../whois.35.com/status_registered.expected | 1 - .../whois.aero/status_available.expected | 3 +- .../responses/whois.aero/status_available.txt | 4 + .../whois.aero/status_registered.expected | 71 ++----- .../whois.aero/status_registered.txt | 129 +++--------- .../whois.aero/status_reserved.expected | 3 +- .../responses/whois.aero/status_reserved.txt | 6 +- .../bz/status_registered.expected | 21 +- .../bz/status_registered.txt | 69 +++---- .../gi/status_available.expected | 2 +- .../gi/status_available.txt | 4 + .../gi/status_registered.expected | 63 ++---- .../gi/status_registered.txt | 123 +++--------- .../lc/status_available.expected | 2 +- .../lc/status_available.txt | 4 + .../lc/status_registered.expected | 62 ++---- .../lc/status_registered.txt | 108 +++------- .../mn/status_available.expected | 2 +- .../mn/status_available.txt | 4 + .../mn/status_registered.expected | 51 +++-- .../mn/status_registered.txt | 150 +++++++------- .../sc/status_available.expected | 2 +- .../sc/status_available.txt | 4 + .../sc/status_registered.expected | 66 ++----- .../sc/status_registered.txt | 113 +++-------- .../vc/status_available.expected | 3 +- .../vc/status_available.txt | 4 + .../vc/status_registered.expected | 68 ++----- .../vc/status_registered.txt | 129 +++--------- .../info/status_available.expected | 2 +- .../info/status_available.txt | 6 + .../info/status_registered.expected | 61 ++---- .../info/status_registered.txt | 113 +++-------- .../info/status_reserved.txt | 6 +- .../pro/status_available.expected | 2 +- .../pro/status_available.txt | 4 +- .../pro/status_registered.expected | 66 ++----- .../pro/status_registered.txt | 74 ++----- .../whois.afilias.net/pro/status_reserved.txt | 6 +- .../status_registered.expected | 1 - .../tn/status_registered.expected | 1 - .../au/status_registered.expected | 1 - .../by/status_registered.expected | 1 - .../com/status_registered.expected | 1 - .../ae.org/status_registered.expected | 3 +- .../ar.com/status_registered.expected | 3 +- .../br.com/status_registered.expected | 3 +- .../cn.com/status_registered.expected | 3 +- .../de.com/status_registered.expected | 3 +- .../eu.com/status_registered.expected | 3 +- .../gb.com/status_registered.expected | 3 +- .../gb.net/status_registered.expected | 3 +- .../hu.com/status_registered.expected | 3 +- .../jp.net/status_registered.expected | 3 +- .../jpn.com/status_registered.expected | 3 +- .../kr.com/status_registered.expected | 3 +- .../qc.com/status_registered.expected | 3 +- .../sa.com/status_registered.expected | 3 +- .../se.com/status_registered.expected | 3 +- .../se.net/status_registered.expected | 3 +- .../uk.com/status_registered.expected | 3 +- .../uk.net/status_registered.expected | 3 +- .../uy.com/status_registered.expected | 3 +- .../za.com/status_registered.expected | 3 +- .../ca/status_registered.expected | 1 - .../iq/status_registered.expected | 1 - .../cn/status_registered.expected | 1 - .../status_registered.expected | 3 +- .../de/status_registered.expected | 1 - .../pl/status_registered.expected | 1 - .../bike/status_registered.expected | 1 - .../mobi/status_available.expected | 2 +- .../mobi/status_available.txt | 5 + .../mobi/status_registered.expected | 62 ++---- .../mobi/status_registered.txt | 109 +++-------- .../post/status_available.expected | 2 +- .../post/status_available.txt | 4 + .../post/status_registered.expected | 21 +- .../post/status_registered.txt | 161 ++++++--------- .../status_registered.expected | 1 - .../whois.enom.com/status_registered.expected | 1 - .../whois.eu/eu/status_registered.expected | 1 - .../status_registered.expected | 1 - .../status_registered.expected | 1 - .../in/property_status_missing.expected | 2 - .../in/property_status_missing.txt | 1 - .../in/property_status_multiple.expected | 2 - .../in/property_status_multiple.txt | 86 -------- .../in/property_status_ok.expected | 2 - .../in/property_status_ok.txt | 83 -------- .../in/status_available.expected | 2 +- .../in/status_available.txt | 8 +- .../in/status_registered.expected | 89 ++++----- .../in/status_registered.txt | 138 ++++++------- .../status_registered.expected | 1 - .../mo/status_registered.expected | 1 - .../na/status_registered.expected | 1 - .../cm/status_registered.expected | 1 - .../cm/status_suspended.expected | 1 - .../status_registered.expected | 1 - .../ac/status_registered.expected | 1 - .../af/status_registered.expected | 1 - .../whois.nic.ag/ag/status_available.expected | 2 +- .../whois.nic.ag/ag/status_available.txt | 5 + .../ag/status_registered.expected | 67 ++----- .../whois.nic.ag/ag/status_registered.txt | 127 +++--------- .../asia/property_status_multiple.expected | 2 +- .../asia/property_status_multiple.txt | 184 +++--------------- .../asia/property_status_single.expected | 8 - .../asia/property_status_single.txt | 159 --------------- .../asia/status_available.expected | 3 +- .../whois.nic.asia/asia/status_available.txt | 4 + .../asia/status_registered.expected | 67 ++----- .../whois.nic.asia/asia/status_registered.txt | 161 +++------------ .../asia/status_reserved.expected | 3 +- .../whois.nic.asia/asia/status_reserved.txt | 4 + .../cd/status_registered.expected | 1 - .../college/status_registered.expected | 1 - .../cx/status_registered.expected | 1 - .../cz/status_registered.expected | 1 - .../design/status_registered.expected | 1 - .../dm/status_registered.expected | 1 - .../ex/status_registered.expected | 1 - .../whois.nic.es/es/status_available.expected | 1 - .../es/status_registered.expected | 1 - .../gd/status_registered.expected | 1 - .../gl/status_registered.expected | 1 - .../gs/status_registered.expected | 1 - .../ht/status_registered.expected | 1 - .../io/status_registered.expected | 1 - .../jobs/status_registered.expected | 1 - .../ki/status_registered.expected | 1 - .../la/status_registered.expected | 3 +- .../me/property_nameservers_is_blank.txt | 121 +++--------- .../me/property_updated_on_is_blank.txt | 118 +++-------- .../whois.nic.me/me/status_available.expected | 2 +- .../whois.nic.me/me/status_available.txt | 4 + .../me/status_registered.expected | 70 ++----- .../whois.nic.me/me/status_registered.txt | 130 ++++--------- .../mg/status_registered.expected | 1 - .../ms/status_registered.expected | 1 - .../mu/status_registered.expected | 1 - .../ng/status_registered.expected | 1 - .../sb/status_registered.expected | 1 - .../nf/status_registered.expected | 1 - .../pw/status_registered.expected | 3 +- .../sh/status_registered.expected | 1 - .../space/status_registered.expected | 1 - .../tc/status_registered.expected | 1 - .../tech/status_registered.expected | 1 - .../tl/status_registered.expected | 1 - .../xxx/status_available.expected | 5 +- .../whois.nic.xxx/xxx/status_available.txt | 27 ++- .../xxx/status_registered.expected | 97 ++++----- .../whois.nic.xxx/xxx/status_registered.txt | 147 ++++++++------ .../whois.nic.xxx/xxx/status_reserved.txt | 27 ++- .../xyz/status_registered.expected | 1 - .../status_registered.expected | 1 - .../id/status_registered.expected | 3 +- .../org/status_available.expected | 3 +- .../whois.pir.org/org/status_available.txt | 5 + .../org/status_registered.expected | 60 ++---- .../whois.pir.org/org/status_registered.txt | 98 ++++------ .../ps/status_registered.expected | 1 - .../gy/status_registered.expected | 1 - .../om/status_registered.expected | 1 - .../qa/status_registered.expected | 1 - .../rs/status_registered.expected | 1 - .../status_registered.expected | 1 - .../status_registered.expected | 1 - .../status_registered.expected | 1 - .../status_registered.expected | 1 - .../nz/status_registered.expected | 1 - .../whois.sx/sx/status_registered.expected | 1 - .../ru/status_registered.expected | 5 +- .../su/status_registered.expected | 5 +- .../xn--p1ai/status_registered.expected | 5 +- .../ee/property_status_serverhold.expected | 1 - .../whois.tld.ee/ee/status_expired.expected | 1 - .../ee/status_registered.expected | 1 - .../sy/status_registered.expected | 1 - .../status_registered.expected | 1 - .../tz/status_registered.expected | 1 - .../whois.udag.net/status_registered.expected | 1 - .../tattoo/status_registered.expected | 1 - .../com/status_registered.expected | 1 - .../net/status_registered.expected | 1 - .../status_registered.expected | 1 - .../status_registered.expected | 1 - .../bi/status_registered.expected | 1 - .../capetown/status_registered_spec.rb | 1 - .../vg/status_registered_spec.rb | 1 - .../cc/status_registered_spec.rb | 1 - .../co.za/status_registered_spec.rb | 1 - .../durban/status_registered_spec.rb | 1 - .../joburg/status_registered_spec.rb | 1 - .../org.za/status_registered_spec.rb | 1 - .../tv/status_registered_spec.rb | 1 - .../status_registered_spec.rb | 1 - .../whois.35.com/status_registered_spec.rb | 1 - .../whois.aero/status_available_spec.rb | 2 +- .../whois.aero/status_registered_spec.rb | 69 ++----- .../whois.aero/status_reserved_spec.rb | 2 +- .../bz/status_registered_spec.rb | 21 +- .../gi/status_available_spec.rb | 2 +- .../gi/status_registered_spec.rb | 63 ++---- .../lc/status_available_spec.rb | 2 +- .../lc/status_registered_spec.rb | 61 ++---- .../mn/status_available_spec.rb | 2 +- .../mn/status_registered_spec.rb | 51 +++-- .../sc/status_available_spec.rb | 2 +- .../sc/status_registered_spec.rb | 66 ++----- .../vc/status_available_spec.rb | 2 +- .../vc/status_registered_spec.rb | 67 ++----- .../info/status_available_spec.rb | 2 +- .../info/status_registered_spec.rb | 61 ++---- .../pro/status_available_spec.rb | 2 +- .../pro/status_registered_spec.rb | 57 ++---- .../whois.ascio.com/status_registered_spec.rb | 1 - .../whois.ati.tn/tn/status_registered_spec.rb | 1 - .../au/status_registered_spec.rb | 1 - .../by/status_registered_spec.rb | 1 - .../com/status_registered_spec.rb | 1 - .../ae.org/status_registered_spec.rb | 3 +- .../ar.com/status_registered_spec.rb | 3 +- .../br.com/status_registered_spec.rb | 3 +- .../cn.com/status_registered_spec.rb | 3 +- .../de.com/status_registered_spec.rb | 3 +- .../eu.com/status_registered_spec.rb | 3 +- .../gb.com/status_registered_spec.rb | 3 +- .../gb.net/status_registered_spec.rb | 3 +- .../hu.com/status_registered_spec.rb | 3 +- .../jp.net/status_registered_spec.rb | 3 +- .../jpn.com/status_registered_spec.rb | 3 +- .../kr.com/status_registered_spec.rb | 3 +- .../qc.com/status_registered_spec.rb | 3 +- .../sa.com/status_registered_spec.rb | 3 +- .../se.com/status_registered_spec.rb | 3 +- .../se.net/status_registered_spec.rb | 3 +- .../uk.com/status_registered_spec.rb | 3 +- .../uk.net/status_registered_spec.rb | 3 +- .../uy.com/status_registered_spec.rb | 3 +- .../za.com/status_registered_spec.rb | 3 +- .../ca/status_registered_spec.rb | 1 - .../whois.cmc.iq/iq/status_registered_spec.rb | 1 - .../cn/status_registered_spec.rb | 1 - .../status_registered_spec.rb | 1 - .../de/status_registered_spec.rb | 1 - .../whois.dns.pl/pl/status_registered_spec.rb | 1 - .../bike/status_registered_spec.rb | 1 - .../mobi/status_available_spec.rb | 2 +- .../mobi/status_registered_spec.rb | 61 ++---- .../post/status_available_spec.rb | 2 +- .../post/status_registered_spec.rb | 21 +- .../status_registered_spec.rb | 1 - .../whois.enom.com/status_registered_spec.rb | 1 - .../whois.eu/eu/status_registered_spec.rb | 1 - .../whois.gandi.net/status_registered_spec.rb | 1 - .../status_registered_spec.rb | 1 - .../in/property_status_missing_spec.rb | 29 --- .../in/property_status_multiple_spec.rb | 29 --- .../in/property_status_ok_spec.rb | 29 --- .../in/status_available_spec.rb | 2 +- .../in/status_registered_spec.rb | 89 ++++----- .../status_registered_spec.rb | 1 - .../mo/status_registered_spec.rb | 1 - .../na/status_registered_spec.rb | 1 - .../cm/status_registered_spec.rb | 1 - .../cm/status_suspended_spec.rb | 1 - .../status_registered_spec.rb | 1 - .../whois.nic.ac/ac/status_registered_spec.rb | 1 - .../whois.nic.af/af/status_registered_spec.rb | 1 - .../whois.nic.ag/ag/status_available_spec.rb | 2 +- .../whois.nic.ag/ag/status_registered_spec.rb | 67 ++----- .../asia/property_status_multiple_spec.rb | 2 +- .../asia/property_status_single_spec.rb | 39 ---- .../asia/status_available_spec.rb | 2 +- .../asia/status_registered_spec.rb | 67 ++----- .../asia/status_reserved_spec.rb | 2 +- .../whois.nic.cd/cd/status_registered_spec.rb | 1 - .../college/status_registered_spec.rb | 1 - .../whois.nic.cx/cx/status_registered_spec.rb | 1 - .../whois.nic.cz/cz/status_registered_spec.rb | 1 - .../design/status_registered_spec.rb | 1 - .../whois.nic.dm/dm/status_registered_spec.rb | 1 - .../whois.nic.ec/ex/status_registered_spec.rb | 1 - .../whois.nic.es/es/status_available_spec.rb | 1 - .../whois.nic.es/es/status_registered_spec.rb | 1 - .../whois.nic.gd/gd/status_registered_spec.rb | 1 - .../whois.nic.gl/gl/status_registered_spec.rb | 1 - .../whois.nic.gs/gs/status_registered_spec.rb | 1 - .../whois.nic.ht/ht/status_registered_spec.rb | 1 - .../whois.nic.io/io/status_registered_spec.rb | 1 - .../jobs/status_registered_spec.rb | 1 - .../whois.nic.ki/ki/status_registered_spec.rb | 1 - .../whois.nic.la/la/status_registered_spec.rb | 3 +- .../whois.nic.me/me/status_available_spec.rb | 2 +- .../whois.nic.me/me/status_registered_spec.rb | 69 ++----- .../whois.nic.mg/mg/status_registered_spec.rb | 1 - .../whois.nic.ms/ms/status_registered_spec.rb | 1 - .../whois.nic.mu/mu/status_registered_spec.rb | 1 - .../ng/status_registered_spec.rb | 1 - .../sb/status_registered_spec.rb | 1 - .../whois.nic.nf/nf/status_registered_spec.rb | 1 - .../whois.nic.pw/pw/status_registered_spec.rb | 3 +- .../whois.nic.sh/sh/status_registered_spec.rb | 1 - .../space/status_registered_spec.rb | 1 - .../whois.nic.tc/tc/status_registered_spec.rb | 1 - .../tech/status_registered_spec.rb | 1 - .../whois.nic.tl/tl/status_registered_spec.rb | 1 - .../xxx/status_available_spec.rb | 4 +- .../xxx/status_registered_spec.rb | 97 ++++----- .../xyz/status_registered_spec.rb | 1 - .../status_registered_spec.rb | 1 - .../id/status_registered_spec.rb | 3 +- .../org/status_available_spec.rb | 2 +- .../org/status_registered_spec.rb | 59 ++---- .../ps/status_registered_spec.rb | 1 - .../gy/status_registered_spec.rb | 1 - .../om/status_registered_spec.rb | 1 - .../qa/status_registered_spec.rb | 1 - .../rs/status_registered_spec.rb | 1 - .../status_registered_spec.rb | 1 - .../status_registered_spec.rb | 1 - .../status_registered_spec.rb | 1 - .../status_registered_spec.rb | 1 - .../nz/status_registered_spec.rb | 1 - .../whois.sx/sx/status_registered_spec.rb | 1 - .../ru/status_registered_spec.rb | 5 +- .../su/status_registered_spec.rb | 5 +- .../xn--p1ai/status_registered_spec.rb | 5 +- .../ee/property_status_serverhold_spec.rb | 1 - .../whois.tld.ee/ee/status_expired_spec.rb | 1 - .../whois.tld.ee/ee/status_registered_spec.rb | 1 - .../whois.tld.sy/sy/status_registered_spec.rb | 1 - .../status_registered_spec.rb | 1 - .../tz/status_registered_spec.rb | 1 - .../whois.udag.net/status_registered_spec.rb | 1 - .../tattoo/status_registered_spec.rb | 1 - .../com/status_registered_spec.rb | 1 - .../net/status_registered_spec.rb | 1 - .../status_registered_spec.rb | 1 - .../status_registered_spec.rb | 1 - .../bi/status_registered_spec.rb | 1 - 395 files changed, 1785 insertions(+), 4624 deletions(-) delete mode 100644 lib/whois/parsers/base_afilias2.rb delete mode 100644 lib/whois/scanners/whois.pir.org.rb delete mode 100644 spec/fixtures/responses/whois.inregistry.net/in/property_status_missing.expected delete mode 100644 spec/fixtures/responses/whois.inregistry.net/in/property_status_missing.txt delete mode 100644 spec/fixtures/responses/whois.inregistry.net/in/property_status_multiple.expected delete mode 100644 spec/fixtures/responses/whois.inregistry.net/in/property_status_multiple.txt delete mode 100644 spec/fixtures/responses/whois.inregistry.net/in/property_status_ok.expected delete mode 100644 spec/fixtures/responses/whois.inregistry.net/in/property_status_ok.txt delete mode 100644 spec/fixtures/responses/whois.nic.asia/asia/property_status_single.expected delete mode 100644 spec/fixtures/responses/whois.nic.asia/asia/property_status_single.txt delete mode 100644 spec/whois/parsers/responses/whois.inregistry.net/in/property_status_missing_spec.rb delete mode 100644 spec/whois/parsers/responses/whois.inregistry.net/in/property_status_multiple_spec.rb delete mode 100644 spec/whois/parsers/responses/whois.inregistry.net/in/property_status_ok_spec.rb delete mode 100644 spec/whois/parsers/responses/whois.nic.asia/asia/property_status_single_spec.rb diff --git a/CHANGELOG.md b/CHANGELOG.md index 493ab99f..93584663 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,8 @@ This project uses [Semantic Versioning 2.0.0](http://semver.org/). #### master +- FIX: Big update and refactoring of all the Afilias based parser format, fixing broken parsing for .ME, .ORG, .INFO, .PRO, .BZ, .GI, .LC, .MN, .SC, .VC, .AG, .IN, .AERO, .ASIA, .MOBI, .POST, .XXX. (based on #34) Thanks @raszi and @jarthod +- CHANGED: Standardize a bit more the Registar object by always filling the name first (instead of sometimes filling organisation instead and sometimes duplicate both). Only fill "organization" when it's a real different property provided by the whois server. - FIX: AFNIC parsers date format to avoid returning negative dates (#119) Thanks @itghlu - CHANGED: Updated .IN.UA parsers to the latest response. (#69, #135) Thanks @Vanav and @jarthod - CHANGED: Minimum Ruby version 2.3 diff --git a/lib/whois/parsers/base_afilias.rb b/lib/whois/parsers/base_afilias.rb index fa8f4965..a3008f81 100644 --- a/lib/whois/parsers/base_afilias.rb +++ b/lib/whois/parsers/base_afilias.rb @@ -7,7 +7,7 @@ #++ -require_relative 'base' +require_relative 'base_icann_compliant' require 'whois/scanners/base_afilias' @@ -17,68 +17,13 @@ class Parsers # Base parser for Afilias servers. # # @abstract - class BaseAfilias < Base - include Scanners::Scannable + class BaseAfilias < BaseIcannCompliant self.scanner = Scanners::BaseAfilias - property_supported :disclaimer do - node("field:disclaimer") - end - - - property_supported :domain do - node("Domain Name", &:downcase) - end - - property_supported :domain_id do - node("Domain ID") - end - - property_supported :status do - Array.wrap(node("Status")) - end - - property_supported :available? do - !!node("status:available") - end - - property_supported :registered? do - !available? - end - - - property_supported :created_on do - node("Created On") do |value| - parse_time(value) - end - end - - property_supported :updated_on do - node("Last Updated On") do |value| - parse_time(value) - end - end - - property_supported :expires_on do - node("Expiration Date") do |value| - parse_time(value) - end - end - - - property_supported :registrar do - node("Sponsoring Registrar") do |value| - id, name = decompose_registrar(value) || - Whois::Parser.bug!(ParserError, "Unknown registrar format `#{value}'") - - Parser::Registrar.new( - id: id, - name: name - ) - end + Array.wrap(node("Domain Status")) end property_supported :registrant_contacts do @@ -100,39 +45,42 @@ class BaseAfilias < Base end end + # Checks whether the response has been throttled. + # + # @return [Boolean] + # + # @example + # WHOIS LIMIT EXCEEDED - SEE WWW.PIR.ORG/WHOIS FOR DETAILS + # + def response_throttled? + !!node("response:throttled") + end private def build_contact(element, type) - node("#{element} ID") do + node("#{element} Organization") do address = ["", "1", "2", "3"]. - map { |i| node("#{element} Street#{i}") }. - delete_if { |i| i.nil? || i.empty? }. - join("\n") - + map { |i| node("#{element} Street#{i}") }. + delete_if { |i| i.nil? || i.empty? }. + join("\n").presence Parser::Contact.new( - :type => type, - :id => node("#{element} ID"), - :name => node("#{element} Name"), - :organization => node("#{element} Organization"), - :address => address, - :city => node("#{element} City"), - :zip => node("#{element} Postal Code"), - :state => node("#{element} State/Province"), - :country_code => node("#{element} Country"), - :phone => node("#{element} Phone"), - :fax => node("#{element} FAX") || node("#{element} Fax"), - :email => node("#{element} Email") + type: type, + id: node("Registry #{element} ID"), + name: node("#{element} Name"), + organization: node("#{element} Organization"), + address: address, + city: node("#{element} City"), + zip: node("#{element} Postal Code"), + state: node("#{element} State/Province"), + country_code: node("#{element} Country"), + phone: node("#{element} Phone"), + fax: node("#{element} Fax"), + email: node("#{element} Email") ) end end - def decompose_registrar(value) - if value =~ /(.+?) \((.+?)\)/ - [$2, $1] - end - end - end end diff --git a/lib/whois/parsers/base_afilias2.rb b/lib/whois/parsers/base_afilias2.rb deleted file mode 100644 index 7f472e7e..00000000 --- a/lib/whois/parsers/base_afilias2.rb +++ /dev/null @@ -1,140 +0,0 @@ -#-- -# Ruby Whois -# -# An intelligent pure Ruby WHOIS client and parser. -# -# Copyright (c) 2009-2018 Simone Carletti -#++ - - -require_relative 'base' -require 'whois/scanners/base_afilias' - - -module Whois - class Parsers - - # Base parser for Afilias servers. - # - # @abstract - class BaseAfilias2 < Base - include Scanners::Scannable - - self.scanner = Scanners::BaseAfilias - - - property_supported :disclaimer do - node("field:disclaimer") - end - - - property_supported :domain do - node("Domain Name", &:downcase) - end - - property_supported :domain_id do - node("Domain ID") - end - - - property_supported :status do - Array.wrap(node("Domain Status")) - end - - property_supported :available? do - !!node("status:available") - end - - property_supported :registered? do - !available? - end - - - property_supported :created_on do - node("Creation Date") do |value| - parse_time(value) - end - end - - property_supported :updated_on do - node("Updated Date") do |value| - parse_time(value) - end - end - - property_supported :expires_on do - node("Registry Expiry Date") do |value| - parse_time(value) - end - end - - - property_supported :registrar do - node("Sponsoring Registrar") do |value| - id, name = decompose_registrar(value) - - Parser::Registrar.new({ - id: id, - name: name, - }) - end - end - - property_supported :registrant_contacts do - build_contact("Registrant", Parser::Contact::TYPE_REGISTRANT) - end - - property_supported :admin_contacts do - build_contact("Admin", Parser::Contact::TYPE_ADMINISTRATIVE) - end - - property_supported :technical_contacts do - build_contact("Tech", Parser::Contact::TYPE_TECHNICAL) - end - - - property_supported :nameservers do - Array.wrap(node("Name Server")).reject(&:empty?).map do |name| - Parser::Nameserver.new(:name => name.downcase) - end - end - - - private - - def build_contact(element, type) - node("#{element} ID") do - address = ["", "1", "2", "3"]. - map { |i| node("#{element} Street#{i}") }. - delete_if { |i| i.nil? || i.empty? }. - join("\n") - - Parser::Contact.new( - :type => type, - :id => node("#{element} ID"), - :name => node("#{element} Name"), - :organization => node("#{element} Organization"), - :address => address, - :city => node("#{element} City"), - :zip => node("#{element} Postal Code"), - :state => node("#{element} State/Province"), - :country_code => node("#{element} Country"), - :phone => node("#{element} Phone"), - :fax => node("#{element} FAX") || node("#{element} Fax"), - :email => node("#{element} Email") - ) - end - end - - def decompose_registrar(value) - if value =~ /(.+?) \((.+?)\)/ - [$2, $1] - else - [nil, value] - end - end - - end - - end -end diff --git a/lib/whois/parsers/base_cocca.rb b/lib/whois/parsers/base_cocca.rb index a7645f7b..ce03c25f 100644 --- a/lib/whois/parsers/base_cocca.rb +++ b/lib/whois/parsers/base_cocca.rb @@ -76,7 +76,6 @@ class BaseCocca < Base if content_for_scanner =~ /Registrar Name: (.+)\n/ Parser::Registrar.new( name: $1, - organization: nil, url: content_for_scanner.slice(/Registration URL: (.+)\n/, 1) ) end diff --git a/lib/whois/parsers/base_icann_compliant.rb b/lib/whois/parsers/base_icann_compliant.rb index 3b7a477d..44686095 100644 --- a/lib/whois/parsers/base_icann_compliant.rb +++ b/lib/whois/parsers/base_icann_compliant.rb @@ -23,9 +23,13 @@ class BaseIcannCompliant < Base self.scanner = Scanners::BaseIcannCompliant + property_supported :disclaimer do + node("field:disclaimer") + end + property_supported :domain do - node("Domain Name", &:downcase) + node("Domain Name")&.downcase end property_supported :domain_id do @@ -34,8 +38,9 @@ class BaseIcannCompliant < Base property_supported :status do - # status = Array.wrap(node('Domain Status')) - if available? + if reserved? + :reserved + elsif available? :available else :registered @@ -52,21 +57,15 @@ class BaseIcannCompliant < Base property_supported :created_on do - node("Creation Date") do |value| - parse_time(value) - end + parse_time(node("Creation Date")) end property_supported :updated_on do - node("Updated Date") do |value| - parse_time(value) - end + parse_time(node("Updated Date")) end property_supported :expires_on do - node("Registrar Registration Expiration Date") do |value| - parse_time(value) - end + parse_time(node("Registry Expiry Date")) || parse_time(node("Registrar Registration Expiration Date")) end @@ -75,7 +74,6 @@ class BaseIcannCompliant < Base Parser::Registrar.new({ id: node("Registrar IANA ID"), name: node("Registrar"), - organization: node("Registrar"), url: node("Registrar URL"), }) end @@ -100,6 +98,13 @@ class BaseIcannCompliant < Base end end + def reserved? + !!node("status:reserved") + end + + def response_throttled? + !!node("response:throttled") + end protected diff --git a/lib/whois/parsers/base_shared1.rb b/lib/whois/parsers/base_shared1.rb index bf6114ab..d6a2068b 100644 --- a/lib/whois/parsers/base_shared1.rb +++ b/lib/whois/parsers/base_shared1.rb @@ -60,9 +60,8 @@ class BaseShared1 < Base property_supported :registrar do node('Registrar Name') do |name| Parser::Registrar.new( - :id => node('Registrar ID'), - :name => node('Registrar Name'), - :organization => node('Registrar Name') + id: node('Registrar ID'), + name: node('Registrar Name') ) end end diff --git a/lib/whois/parsers/base_shared2.rb b/lib/whois/parsers/base_shared2.rb index 51ae10c4..90583cef 100644 --- a/lib/whois/parsers/base_shared2.rb +++ b/lib/whois/parsers/base_shared2.rb @@ -67,8 +67,8 @@ class BaseShared2 < Base property_supported :registrar do node("Sponsoring Registrar") do |str| Parser::Registrar.new( - :id => node("Sponsoring Registrar IANA ID"), - :name => node("Sponsoring Registrar") + id: node("Sponsoring Registrar IANA ID"), + name: node("Sponsoring Registrar") ) end end diff --git a/lib/whois/parsers/base_shared3.rb b/lib/whois/parsers/base_shared3.rb index c9fd6a84..c30853bc 100644 --- a/lib/whois/parsers/base_shared3.rb +++ b/lib/whois/parsers/base_shared3.rb @@ -70,10 +70,8 @@ class BaseShared3 < Base property_supported :registrar do node("registrar") do |raw| Parser::Registrar.new( - :id => nil, - :name => node("registrar"), - :organization => nil, - :url => node("url") + name: node("registrar"), + url: node("url") ) end end diff --git a/lib/whois/parsers/whois.aero.rb b/lib/whois/parsers/whois.aero.rb index 5f847c51..d0b4a63e 100644 --- a/lib/whois/parsers/whois.aero.rb +++ b/lib/whois/parsers/whois.aero.rb @@ -21,10 +21,9 @@ class Parsers class WhoisAero < BaseAfilias self.scanner = Scanners::BaseAfilias, { - pattern_reserved: /^Name is restricted from registration\n/, + pattern_reserved: /^This domain name has been reserved by SITA/, } - property_supported :status do if reserved? :reserved @@ -33,20 +32,6 @@ class WhoisAero < BaseAfilias end end - - property_supported :updated_on do - node("Updated On") do |value| - parse_time(value) - end - end - - property_supported :expires_on do - node("Expires On") do |value| - parse_time(value) - end - end - - # NEWPROPERTY def reserved? !!node("status:reserved") diff --git a/lib/whois/parsers/whois.afilias.net.rb b/lib/whois/parsers/whois.afilias.net.rb index a298313d..1541b782 100644 --- a/lib/whois/parsers/whois.afilias.net.rb +++ b/lib/whois/parsers/whois.afilias.net.rb @@ -7,18 +7,17 @@ #++ -require_relative 'base_afilias2' +require_relative 'base_afilias' module Whois class Parsers # Parser for the whois.afilias.net server. - class WhoisAfiliasNet < BaseAfilias2 + class WhoisAfiliasNet < BaseAfilias self.scanner = Scanners::BaseAfilias, { - pattern_disclaimer: /^Access to/, - pattern_reserved: /^(Name is reserved by afilias\n)|(Reserved by Registry\n)/, + pattern_reserved: /^(Name is reserved by afilias\n)|(Reserved by the registry.\n)/, } diff --git a/lib/whois/parsers/whois.ati.tn.rb b/lib/whois/parsers/whois.ati.tn.rb index 03d2bb53..4504ee54 100644 --- a/lib/whois/parsers/whois.ati.tn.rb +++ b/lib/whois/parsers/whois.ati.tn.rb @@ -65,10 +65,7 @@ class WhoisAtiTn < Base property_supported :registrar do node("Registrar") do |value| - Parser::Registrar.new( - :id => nil, - :name => value - ) + Parser::Registrar.new(name: value) end end diff --git a/lib/whois/parsers/whois.audns.net.au.rb b/lib/whois/parsers/whois.audns.net.au.rb index ad615bf0..50ea627c 100644 --- a/lib/whois/parsers/whois.audns.net.au.rb +++ b/lib/whois/parsers/whois.audns.net.au.rb @@ -64,9 +64,7 @@ class WhoisAudnsNetAu < Base property_supported :registrar do node("Registrar Name") do |str| - Parser::Registrar.new({ - name: str, - }) + Parser::Registrar.new(name: str) end end diff --git a/lib/whois/parsers/whois.biz.rb b/lib/whois/parsers/whois.biz.rb index 280aa1db..e02f0bef 100644 --- a/lib/whois/parsers/whois.biz.rb +++ b/lib/whois/parsers/whois.biz.rb @@ -22,12 +22,6 @@ class WhoisBiz < BaseIcannCompliant self.scanner = Scanners::BaseIcannCompliant, { pattern_available: /^No Data Found\n/ } - - property_supported :expires_on do - node("Registry Expiry Date") do |value| - parse_time(value) - end - end end end diff --git a/lib/whois/parsers/whois.cctld.by.rb b/lib/whois/parsers/whois.cctld.by.rb index 985c1b4d..a346137e 100644 --- a/lib/whois/parsers/whois.cctld.by.rb +++ b/lib/whois/parsers/whois.cctld.by.rb @@ -69,9 +69,8 @@ class WhoisCctldBy < Base property_supported :registrar do node("Registrar") do |registrar| Parser::Registrar.new( - :id => registrar, - :name => registrar, - :organization => registrar + id: registrar, + name: registrar ) end end diff --git a/lib/whois/parsers/whois.centralnic.com.rb b/lib/whois/parsers/whois.centralnic.com.rb index c1a28a58..23647d3b 100644 --- a/lib/whois/parsers/whois.centralnic.com.rb +++ b/lib/whois/parsers/whois.centralnic.com.rb @@ -71,18 +71,15 @@ class WhoisCentralnicCom < Base property_supported :registrar do node("Sponsoring Registrar ID") do Parser::Registrar.new( - :id => node("Sponsoring Registrar ID"), - :name => nil, - :organization => node("Sponsoring Registrar Organization"), - :url => node("Sponsoring Registrar Website") + id: node("Sponsoring Registrar ID"), + name: node("Sponsoring Registrar Organization"), + url: node("Sponsoring Registrar Website") ) end || node("Sponsoring Registrar IANA ID") do Parser::Registrar.new( - :id => node("Sponsoring Registrar IANA ID"), - :name => node("Sponsoring Registrar"), - :organization => nil, - :url => nil + id: node("Sponsoring Registrar IANA ID"), + name: node("Sponsoring Registrar"), ) end end diff --git a/lib/whois/parsers/whois.cira.ca.rb b/lib/whois/parsers/whois.cira.ca.rb index 0ce796a6..c3e50d64 100644 --- a/lib/whois/parsers/whois.cira.ca.rb +++ b/lib/whois/parsers/whois.cira.ca.rb @@ -87,9 +87,8 @@ class WhoisCiraCa < Base property_supported :registrar do node("Registrar") do |hash| Parser::Registrar.new( - id: hash["Number"], - name: hash["Name"], - organization: hash["Name"] + id: hash["Number"], + name: hash["Name"], ) end end diff --git a/lib/whois/parsers/whois.cnnic.cn.rb b/lib/whois/parsers/whois.cnnic.cn.rb index 6ba64fd9..ce13eda7 100644 --- a/lib/whois/parsers/whois.cnnic.cn.rb +++ b/lib/whois/parsers/whois.cnnic.cn.rb @@ -60,8 +60,8 @@ class WhoisCnnicCn < Base property_supported :registrar do node("Sponsoring Registrar") do |value| Parser::Registrar.new( - :id => value, - :name => value + id: value, + name: value ) end end diff --git a/lib/whois/parsers/whois.denic.de.rb b/lib/whois/parsers/whois.denic.de.rb index a5658c16..0bb8ad93 100644 --- a/lib/whois/parsers/whois.denic.de.rb +++ b/lib/whois/parsers/whois.denic.de.rb @@ -79,12 +79,7 @@ class WhoisDenicDe < Base property_supported :registrar do node("Zone-C") do |raw| - Parser::Registrar.new( - :id => nil, - :name => raw["name"], - :organization => raw["organization"], - :url => nil - ) + Parser::Registrar.new(name: raw["name"]) end end diff --git a/lib/whois/parsers/whois.dns.pl.rb b/lib/whois/parsers/whois.dns.pl.rb index 34008c2d..7860af9e 100644 --- a/lib/whois/parsers/whois.dns.pl.rb +++ b/lib/whois/parsers/whois.dns.pl.rb @@ -70,9 +70,7 @@ class WhoisDnsPl < Base return unless match lines = match.split("\n") - Parser::Registrar.new( - :name => lines[0] - ) + Parser::Registrar.new(name: lines[0]) end property_not_supported :registrant_contacts diff --git a/lib/whois/parsers/whois.donuts.co.rb b/lib/whois/parsers/whois.donuts.co.rb index 3fde06cc..3f08ba1b 100644 --- a/lib/whois/parsers/whois.donuts.co.rb +++ b/lib/whois/parsers/whois.donuts.co.rb @@ -24,34 +24,6 @@ class WhoisDonutsCo < BaseIcannCompliant pattern_available: /^Domain not found\./ } - - property_supported :expires_on do - node("Registry Expiry Date") do |value| - parse_time(value) - end - end - - - property_supported :registrar do - return unless node("Registrar") - Parser::Registrar.new({ - id: node("Registrar IANA ID"), - name: node("Registrar"), - organization: node("Registrar"), - url: node("Registrar URL"), - }) - end - - - private - # - # def build_contact(element, type) - # if (contact = super) - # contact.id = node("#{element} ID") - # end - # contact - # end - end end diff --git a/lib/whois/parsers/whois.enom.com.rb b/lib/whois/parsers/whois.enom.com.rb index bd7e9ec2..7f03ec59 100644 --- a/lib/whois/parsers/whois.enom.com.rb +++ b/lib/whois/parsers/whois.enom.com.rb @@ -22,12 +22,6 @@ class WhoisEnomCom < BaseIcannCompliant self.scanner = Scanners::BaseIcannCompliant, { pattern_available: /^Domain not found\.\n/ } - - property_supported :updated_on do - node('Updated Date') do |value| - parse_time(value) - end - end end end diff --git a/lib/whois/parsers/whois.inregistry.net.rb b/lib/whois/parsers/whois.inregistry.net.rb index 8b98f427..6046be64 100644 --- a/lib/whois/parsers/whois.inregistry.net.rb +++ b/lib/whois/parsers/whois.inregistry.net.rb @@ -16,10 +16,7 @@ class Parsers # Parser for the whois.inregistry.net server. class WhoisInregistryNet < BaseAfilias - self.scanner = Scanners::BaseAfilias, { - # Disclaimer starts with "Access to" in .in servers - pattern_disclaimer: /^Access to/ - } + self.scanner = Scanners::BaseAfilias end diff --git a/lib/whois/parsers/whois.markmonitor.com.rb b/lib/whois/parsers/whois.markmonitor.com.rb index 1f0bb190..8881951b 100644 --- a/lib/whois/parsers/whois.markmonitor.com.rb +++ b/lib/whois/parsers/whois.markmonitor.com.rb @@ -25,11 +25,6 @@ class WhoisMarkmonitorCom < BaseIcannCompliant pattern_throttled: /^You have exceeded your quota of queries\./, } - - def response_throttled? - !!node("response:throttled") - end - end end diff --git a/lib/whois/parsers/whois.monic.mo.rb b/lib/whois/parsers/whois.monic.mo.rb index 38ebacf0..54c2927c 100644 --- a/lib/whois/parsers/whois.monic.mo.rb +++ b/lib/whois/parsers/whois.monic.mo.rb @@ -58,9 +58,7 @@ class WhoisMonicMo < Base property_supported :registrar do if content_for_scanner =~ /Registrar:\s+(.+)\n/ - Parser::Registrar.new( - :name => $1 - ) + Parser::Registrar.new(name: $1) end end diff --git a/lib/whois/parsers/whois.nic.asia.rb b/lib/whois/parsers/whois.nic.asia.rb index e6aa0c78..97026479 100644 --- a/lib/whois/parsers/whois.nic.asia.rb +++ b/lib/whois/parsers/whois.nic.asia.rb @@ -24,7 +24,6 @@ class WhoisNicAsia < BaseAfilias pattern_reserved: /^Reserved by DotAsia\n/, } - property_supported :status do if reserved? :reserved @@ -33,74 +32,11 @@ class WhoisNicAsia < BaseAfilias end end - - property_supported :created_on do - node("Domain Create Date") do |value| - parse_time(value) - end - end - - property_supported :updated_on do - node("Domain Last Updated Date") do |value| - parse_time(value) - end - end - - property_supported :expires_on do - node("Domain Expiration Date") do |value| - parse_time(value) - end - end - - - property_supported :admin_contacts do - build_contact("Administrative", Parser::Contact::TYPE_ADMINISTRATIVE) - end - - property_supported :technical_contacts do - build_contact("Technical", Parser::Contact::TYPE_TECHNICAL) - end - - - property_supported :nameservers do - Array.wrap(node("Nameservers")).reject(&:empty?).map do |name| - Parser::Nameserver.new(:name => name.downcase) - end - end - - # NEWPROPERTY def reserved? !!node("status:reserved") end - - private - - def build_contact(element, type) - node("#{element} ID") do - address = ["", "2", "3"]. - map { |i| node("#{element} Address#{i}") }. - delete_if(&:empty?). - join("\n") - - Parser::Contact.new( - :type => type, - :id => node("#{element} ID"), - :name => node("#{element} Name"), - :organization => node("#{element} Organization"), - :address => address, - :city => node("#{element} City"), - :zip => node("#{element} Postal Code"), - :state => node("#{element} State/Province"), - :country_code => node("#{element} Country/Economy"), - :phone => node("#{element} Phone"), - :fax => node("#{element} FAX"), - :email => node("#{element} E-mail") - ) - end - end - end end diff --git a/lib/whois/parsers/whois.nic.es.rb b/lib/whois/parsers/whois.nic.es.rb index 77cd02f6..63c90675 100644 --- a/lib/whois/parsers/whois.nic.es.rb +++ b/lib/whois/parsers/whois.nic.es.rb @@ -62,10 +62,7 @@ class WhoisNicEs < Base property_supported :registrar do - Parser::Registrar.new( - :name => 'ES-NIC', - :organization => 'ES-NIC Delegated Internet Registry for Spain', - ) + Parser::Registrar.new(name: 'ES-NIC') end @@ -73,17 +70,7 @@ class WhoisNicEs < Base if content_for_scanner =~ /Registrant Name:\s+(.+)\n/ Parser::Contact.new( type: Parser::Contact::TYPE_REGISTRANT, - id: nil, name: $1.to_s.strip, - organization: nil, - address: nil, - city: nil, - zip: nil, - state: nil, - country: nil, - phone: nil, - fax: nil, - email: nil ) end end diff --git a/lib/whois/parsers/whois.nic.fm.rb b/lib/whois/parsers/whois.nic.fm.rb index 9e8c92d5..2ff074fe 100644 --- a/lib/whois/parsers/whois.nic.fm.rb +++ b/lib/whois/parsers/whois.nic.fm.rb @@ -7,12 +7,6 @@ class WhoisNicFm < BaseIcannCompliant self.scanner = Scanners::BaseIcannCompliant, { pattern_available: /DOMAIN NOT FOUND\n/ } - - property_supported :expires_on do - node("Registry Expiry Date") do |value| - parse_time(value) - end - end end end end diff --git a/lib/whois/parsers/whois.nic.me.rb b/lib/whois/parsers/whois.nic.me.rb index f0a74f4d..0b33f72c 100644 --- a/lib/whois/parsers/whois.nic.me.rb +++ b/lib/whois/parsers/whois.nic.me.rb @@ -15,70 +15,6 @@ class Parsers # Parser for the whois.nic.me server. class WhoisNicMe < BaseAfilias - - property_supported :status do - Array.wrap(node("Domain Status")) - end - - - property_supported :created_on do - node("Domain Create Date") do |value| - parse_time(value) - end - end - - property_supported :updated_on do - node("Domain Last Updated Date") do |value| - parse_time(value) - end - end - - property_supported :expires_on do - node("Domain Expiration Date") do |value| - parse_time(value) - end - end - - - property_supported :nameservers do - Array.wrap(node("Nameservers")).reject(&:empty?).map do |name| - Parser::Nameserver.new(name: name.downcase) - end - end - - - private - - def build_contact(element, type) - node("#{element} ID") do - address = ["", "2", "3"]. - map { |i| node("#{element} Address#{i}") }. - delete_if(&:empty?). - join("\n") - - Parser::Contact.new( - type: type, - id: node("#{element} ID"), - name: node("#{element} Name"), - organization: node("#{element} Organization"), - address: address, - city: node("#{element} City"), - zip: node("#{element} Postal Code"), - state: node("#{element} State/Province"), - country_code: node("#{element} Country/Economy"), - phone: node("#{element} Phone"), - fax: node("#{element} FAX"), - email: node("#{element} E-mail") - ) - end - end - - def decompose_registrar(value) - if value =~ /^(.+?) ([^\s]+)$/ - [$2, $1] - end - end - end end diff --git a/lib/whois/parsers/whois.nic.xxx.rb b/lib/whois/parsers/whois.nic.xxx.rb index 747aa3c9..4b92807b 100644 --- a/lib/whois/parsers/whois.nic.xxx.rb +++ b/lib/whois/parsers/whois.nic.xxx.rb @@ -7,35 +7,20 @@ #++ -require_relative 'base_afilias2' +require_relative 'base_icann_compliant' module Whois class Parsers # Parser for the whois.nic.xxx server. - class WhoisNicXxx < BaseAfilias2 + class WhoisNicXxx < BaseIcannCompliant - self.scanner = Scanners::BaseAfilias, { - pattern_disclaimer: /^Access to/, - pattern_reserved: /^Reserved by ICM Registry\n/, + self.scanner = Scanners::BaseIcannCompliant, { + pattern_available: /^No Data Found/, + pattern_reserved: /^Reserved Domain Name\n/, # reserved: a.xxx } - - property_supported :status do - if reserved? - :reserved - else - super() - end - end - - - # NEWPROPERTY - def reserved? - !!node("status:reserved") - end - end end diff --git a/lib/whois/parsers/whois.pir.org.rb b/lib/whois/parsers/whois.pir.org.rb index 56e948bd..566c04bb 100644 --- a/lib/whois/parsers/whois.pir.org.rb +++ b/lib/whois/parsers/whois.pir.org.rb @@ -8,82 +8,12 @@ require_relative 'base_afilias' -require 'whois/scanners/whois.pir.org.rb' module Whois class Parsers # Parser for the whois.pir.org server. class WhoisPirOrg < BaseAfilias - - self.scanner = Scanners::WhoisPirOrg - - # Checks whether the response has been throttled. - # - # @return [Boolean] - # - # @example - # WHOIS LIMIT EXCEEDED - SEE WWW.PIR.ORG/WHOIS FOR DETAILS - # - def response_throttled? - !!node("response:throttled") - end - - property_supported :status do - Array.wrap(node("Domain Status")) - end - - property_supported :registrar do - node('Sponsoring Registrar') do |name| - Parser::Registrar.new( - id: node('Sponsoring Registrar IANA ID'), - name: node('Sponsoring Registrar') - ) - end - end - - property_supported :created_on do - node("Creation Date") do |value| - parse_time(value) - end - end - - property_supported :updated_on do - node("Updated Date") do |value| - parse_time(value) - end - end - - property_supported :expires_on do - node("Registry Expiry Date") do |value| - parse_time(value) - end - end - - def build_contact(element, type) - node("#{element} ID") do - address = [node("#{element} Street")] - address = (address + (1..3).map { |i| node("#{element} Street#{i}") }). - delete_if { |i| i.nil? || i.empty? }. - join("\n") - - Parser::Contact.new( - :type => type, - :id => node("#{element} ID"), - :name => node("#{element} Name"), - :organization => node("#{element} Organization"), - :address => address, - :city => node("#{element} City"), - :zip => node("#{element} Postal Code"), - :state => node("#{element} State/Province"), - :country_code => node("#{element} Country"), - :phone => node("#{element} Phone"), - :fax => node("#{element} Fax"), - :email => node("#{element} Email") - ) - end - end - end end diff --git a/lib/whois/parsers/whois.schlund.info.rb b/lib/whois/parsers/whois.schlund.info.rb index 8c66e732..ba398b27 100644 --- a/lib/whois/parsers/whois.schlund.info.rb +++ b/lib/whois/parsers/whois.schlund.info.rb @@ -22,12 +22,6 @@ class WhoisSchlundInfo < BaseIcannCompliant self.scanner = Scanners::BaseIcannCompliant, { pattern_available: /^Domain [\w\.]+ is not registered here\.\n/ } - - property_supported :updated_on do - node('Updated Date') do |value| - parse_time(value) - end - end end end diff --git a/lib/whois/parsers/whois.smallregistry.net.rb b/lib/whois/parsers/whois.smallregistry.net.rb index 84d60272..1dd8edef 100644 --- a/lib/whois/parsers/whois.smallregistry.net.rb +++ b/lib/whois/parsers/whois.smallregistry.net.rb @@ -78,12 +78,9 @@ class WhoisSmallregistryNet < Base property_supported :registrar do node("registrar") do |hash| - v1, v2, v3, v4 = hash.values_at('nil', 'name', 'name', 'web') Parser::Registrar.new( - :id => v1, - :name => v2, - :organization => v3, - :url => v4 + :name => hash['name'], + :url => hash['web'] ) end end diff --git a/lib/whois/parsers/whois.srs.net.nz.rb b/lib/whois/parsers/whois.srs.net.nz.rb index 0977c17f..62818400 100644 --- a/lib/whois/parsers/whois.srs.net.nz.rb +++ b/lib/whois/parsers/whois.srs.net.nz.rb @@ -78,9 +78,7 @@ class WhoisSrsNetNz < Base property_supported :registrar do node("registrar_name") do |value| - Parser::Registrar.new( - name: value - ) + Parser::Registrar.new(name: value) end end diff --git a/lib/whois/parsers/whois.sx.rb b/lib/whois/parsers/whois.sx.rb index 3409ca24..4fa2b099 100644 --- a/lib/whois/parsers/whois.sx.rb +++ b/lib/whois/parsers/whois.sx.rb @@ -76,9 +76,7 @@ class WhoisSx < Base property_supported :registrar do node("Sponsoring Registrar") do |value| - Parser::Registrar.new( - :name => value - ) + Parser::Registrar.new(name: value) end end diff --git a/lib/whois/parsers/whois.tcinet.ru.rb b/lib/whois/parsers/whois.tcinet.ru.rb index 3901d7fa..63e4b236 100644 --- a/lib/whois/parsers/whois.tcinet.ru.rb +++ b/lib/whois/parsers/whois.tcinet.ru.rb @@ -67,9 +67,7 @@ class WhoisTcinetRu < Base property_supported :registrar do if content_for_scanner =~ /registrar:\s+(.*)\n/ - Parser::Registrar.new( - :id => $1 - ) + Parser::Registrar.new(name: $1) end end diff --git a/lib/whois/parsers/whois.tld.ee.rb b/lib/whois/parsers/whois.tld.ee.rb index b7b1627a..4694d549 100644 --- a/lib/whois/parsers/whois.tld.ee.rb +++ b/lib/whois/parsers/whois.tld.ee.rb @@ -84,7 +84,6 @@ class WhoisTldEe < Base node('Registrar') do |hash| Parser::Registrar.new( name: hash['name'], - organization: hash['name'], url: hash['url'] ) end diff --git a/lib/whois/parsers/whois.uniregistry.net.rb b/lib/whois/parsers/whois.uniregistry.net.rb index 89cfa0f5..0f540d1e 100644 --- a/lib/whois/parsers/whois.uniregistry.net.rb +++ b/lib/whois/parsers/whois.uniregistry.net.rb @@ -29,19 +29,11 @@ class WhoisUniregistryNet < BaseIcannCompliant end - property_supported :expires_on do - node('Registry Expiry Date') do |value| - parse_time(value) - end - end - - property_supported :registrar do return unless node('Sponsoring Registrar') Parser::Registrar.new( id: node('Sponsoring Registrar IANA ID'), - name: node('Sponsoring Registrar'), - organization: node('Sponsoring Registrar') + name: node('Sponsoring Registrar') ) end diff --git a/lib/whois/parsers/whois.yoursrs.com.rb b/lib/whois/parsers/whois.yoursrs.com.rb index d7b162a9..dd0c4f5c 100644 --- a/lib/whois/parsers/whois.yoursrs.com.rb +++ b/lib/whois/parsers/whois.yoursrs.com.rb @@ -66,9 +66,7 @@ class WhoisYoursrsCom < Base property_supported :registrar do node("Sponsoring Registrar") do |value| - Parser::Registrar.new( - name: value - ) + Parser::Registrar.new(name: value) end end diff --git a/lib/whois/parsers/za_central_registry.rb b/lib/whois/parsers/za_central_registry.rb index 360bc55d..84bfb8f6 100644 --- a/lib/whois/parsers/za_central_registry.rb +++ b/lib/whois/parsers/za_central_registry.rb @@ -31,8 +31,7 @@ class ZaCentralRegistry < BaseIcannCompliant return unless node("Sponsoring Registrar") Parser::Registrar.new( id: node('Sponsoring Registrar IANA ID'), - name: node('Sponsoring Registrar'), - organization: node('Sponsoring Registrar'), + name: node('Sponsoring Registrar') ) end diff --git a/lib/whois/scanners/base_afilias.rb b/lib/whois/scanners/base_afilias.rb index ba686b53..b037a065 100644 --- a/lib/whois/scanners/base_afilias.rb +++ b/lib/whois/scanners/base_afilias.rb @@ -17,7 +17,7 @@ class BaseAfilias < Base tokenizer :scan_available do - if @input.scan(/^NOT FOUND\n/) + if @input.scan(/^(NOT FOUND|No Data Found)\n/) @ast["status:available"] = true end end @@ -37,12 +37,8 @@ class BaseAfilias < Base end tokenizer :scan_disclaimer do - if settings[:pattern_disclaimer] - if @input.match?(settings[:pattern_disclaimer]) - @ast["field:disclaimer"] = _scan_lines_to_array(/^(.+)\n/).join(" ") - end - elsif @input.pos == 0 && @input.match?(/^(.+\n){3,}\n/) - @ast["field:disclaimer"] = _scan_lines_to_array(/^(.+)\n/).join(" ") + if @input.match?(/^Access to/) + @ast["field:disclaimer"] = _scan_lines_to_array(/^(.+)\n+/).join(" ") end end end diff --git a/lib/whois/scanners/base_icann_compliant.rb b/lib/whois/scanners/base_icann_compliant.rb index 3fcdc608..67ca41e9 100644 --- a/lib/whois/scanners/base_icann_compliant.rb +++ b/lib/whois/scanners/base_icann_compliant.rb @@ -9,7 +9,9 @@ class BaseIcannCompliant < Base self.tokenizers += [ :skip_head, :scan_available, + :scan_reserved, :scan_throttled, + :scan_disclaimer, :skip_empty_line, :skip_blank_line, :scan_keyvalue, @@ -28,6 +30,12 @@ class BaseIcannCompliant < Base end end + tokenizer :scan_reserved do + if settings[:pattern_reserved] && @input.scan(settings[:pattern_reserved]) + @ast["status:reserved"] = true + end + end + tokenizer :skip_head do if @input.skip_until(/Domain Name:/) @input.scan(/\s?(.+)\n/) @@ -39,6 +47,12 @@ class BaseIcannCompliant < Base @input.terminate end + tokenizer :scan_disclaimer do + if @input.match?(/^The Service is provided/) + @ast["field:disclaimer"] = _scan_lines_to_array(/^(.+)\n+/).join(" ") + end + end + end end diff --git a/lib/whois/scanners/whois.pir.org.rb b/lib/whois/scanners/whois.pir.org.rb deleted file mode 100644 index 5863800b..00000000 --- a/lib/whois/scanners/whois.pir.org.rb +++ /dev/null @@ -1,17 +0,0 @@ -require_relative 'base' - -module Whois - module Scanners - - # Scanner for the Afilias-based records. - class WhoisPirOrg < BaseAfilias - - tokenizer :scan_disclaimer do - if @input.match?(/^Access to/) - @ast["field:disclaimer"] = _scan_lines_to_array(/^(.+)(\n+)/).join(" ") - end - end - end - - end -end diff --git a/spec/fixtures/responses/capetown-whois.registry.net.za/capetown/status_registered.expected b/spec/fixtures/responses/capetown-whois.registry.net.za/capetown/status_registered.expected index 49d34909..85f6394b 100644 --- a/spec/fixtures/responses/capetown-whois.registry.net.za/capetown/status_registered.expected +++ b/spec/fixtures/responses/capetown-whois.registry.net.za/capetown/status_registered.expected @@ -32,7 +32,6 @@ %s %CLASS{registrar} %s.id == "1466" %s.name == "Lexsynergy" - %s.organization == "Lexsynergy" %s.url == nil #registrant_contacts diff --git a/spec/fixtures/responses/ccwhois.ksregistry.net/vg/status_registered.expected b/spec/fixtures/responses/ccwhois.ksregistry.net/vg/status_registered.expected index 13c6893e..ef77364e 100644 --- a/spec/fixtures/responses/ccwhois.ksregistry.net/vg/status_registered.expected +++ b/spec/fixtures/responses/ccwhois.ksregistry.net/vg/status_registered.expected @@ -36,7 +36,6 @@ %s %CLASS{registrar} %s.id == nil %s.name == "MarkMonitor Inc." - %s.organization == nil %s.url == "www.markmonitor.com" #registrant_contacts diff --git a/spec/fixtures/responses/ccwhois.verisign-grs.com/cc/status_registered.expected b/spec/fixtures/responses/ccwhois.verisign-grs.com/cc/status_registered.expected index d08724bd..2b7f20b3 100644 --- a/spec/fixtures/responses/ccwhois.verisign-grs.com/cc/status_registered.expected +++ b/spec/fixtures/responses/ccwhois.verisign-grs.com/cc/status_registered.expected @@ -36,7 +36,6 @@ %s %CLASS{registrar} %s.id == "292" %s.name == "MARKMONITOR INC." - %s.organization == nil %s.url == "http://www.markmonitor.com" diff --git a/spec/fixtures/responses/coza-whois.registry.net.za/co.za/status_registered.expected b/spec/fixtures/responses/coza-whois.registry.net.za/co.za/status_registered.expected index df4497ac..c28471a2 100644 --- a/spec/fixtures/responses/coza-whois.registry.net.za/co.za/status_registered.expected +++ b/spec/fixtures/responses/coza-whois.registry.net.za/co.za/status_registered.expected @@ -29,7 +29,6 @@ %s %CLASS{registrar} %s.id == nil %s.name == "MarkMonitor" - %s.organization == "MarkMonitor" %s.url == nil #registrant_contacts diff --git a/spec/fixtures/responses/durban-whois.registry.net.za/durban/status_registered.expected b/spec/fixtures/responses/durban-whois.registry.net.za/durban/status_registered.expected index 6324f38e..401cb4bc 100644 --- a/spec/fixtures/responses/durban-whois.registry.net.za/durban/status_registered.expected +++ b/spec/fixtures/responses/durban-whois.registry.net.za/durban/status_registered.expected @@ -32,7 +32,6 @@ %s %CLASS{registrar} %s.id == "292" %s.name == "MarkMonitor" - %s.organization == "MarkMonitor" %s.url == nil #registrant_contacts diff --git a/spec/fixtures/responses/joburg-whois.registry.net.za/joburg/status_registered.expected b/spec/fixtures/responses/joburg-whois.registry.net.za/joburg/status_registered.expected index 55b5c359..b5678c23 100644 --- a/spec/fixtures/responses/joburg-whois.registry.net.za/joburg/status_registered.expected +++ b/spec/fixtures/responses/joburg-whois.registry.net.za/joburg/status_registered.expected @@ -32,7 +32,6 @@ %s %CLASS{registrar} %s.id == "1466" %s.name == "Lexsynergy" - %s.organization == "Lexsynergy" %s.url == nil #registrant_contacts diff --git a/spec/fixtures/responses/org-whois.registry.net.za/org.za/status_registered.expected b/spec/fixtures/responses/org-whois.registry.net.za/org.za/status_registered.expected index 3c7cf021..0ddbba69 100644 --- a/spec/fixtures/responses/org-whois.registry.net.za/org.za/status_registered.expected +++ b/spec/fixtures/responses/org-whois.registry.net.za/org.za/status_registered.expected @@ -32,7 +32,6 @@ %s %CLASS{registrar} %s.id == "9999" %s.name == "ZA Central Registry" - %s.organization == "ZA Central Registry" %s.url == nil #registrant_contacts diff --git a/spec/fixtures/responses/tvwhois.verisign-grs.com/tv/status_registered.expected b/spec/fixtures/responses/tvwhois.verisign-grs.com/tv/status_registered.expected index d59a690c..53143484 100644 --- a/spec/fixtures/responses/tvwhois.verisign-grs.com/tv/status_registered.expected +++ b/spec/fixtures/responses/tvwhois.verisign-grs.com/tv/status_registered.expected @@ -35,7 +35,6 @@ %s %CLASS{registrar} %s.id == "292" %s.name == "MARKMONITOR INC." - %s.organization == nil %s.url == "http://www.markmonitor.com" diff --git a/spec/fixtures/responses/whois.1und1.info/status_registered.expected b/spec/fixtures/responses/whois.1und1.info/status_registered.expected index 68d71e1b..ed5ed3b4 100644 --- a/spec/fixtures/responses/whois.1und1.info/status_registered.expected +++ b/spec/fixtures/responses/whois.1und1.info/status_registered.expected @@ -32,7 +32,6 @@ %s %CLASS{registrar} %s.id == "83" %s.name == "1&1 Internet AG" - %s.organization == "1&1 Internet AG" %s.url == "http://1and1.com" diff --git a/spec/fixtures/responses/whois.35.com/status_registered.expected b/spec/fixtures/responses/whois.35.com/status_registered.expected index e5d58f2f..5dbd9be3 100644 --- a/spec/fixtures/responses/whois.35.com/status_registered.expected +++ b/spec/fixtures/responses/whois.35.com/status_registered.expected @@ -25,7 +25,6 @@ %s %CLASS{registrar} %s.id == "1316" %s.name == "35 Technology Co., Ltd." - %s.organization == "35 Technology Co., Ltd." %s.url == "http://www.35.com" #registrant_contacts diff --git a/spec/fixtures/responses/whois.aero/status_available.expected b/spec/fixtures/responses/whois.aero/status_available.expected index 4c6f0cf2..06ca95bf 100644 --- a/spec/fixtures/responses/whois.aero/status_available.expected +++ b/spec/fixtures/responses/whois.aero/status_available.expected @@ -1,6 +1,5 @@ #disclaimer - %s == nil - + %s == "Access to WHOIS information is provided to assist persons in determining the contents of a domain name registration record in the registry database. The data in this record is provided by The Registry Operator for informational purposes only, and accuracy is not guaranteed. 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. Registry Operator reserves the right to modify these terms at any time. By submitting this query, you agree to abide by this policy. The Registrar of Record identified in this output may have an RDDS service that can be queried for additional information on how to contact the Registrant, Admin, or Tech contact of the queried domain name." #domain %s == nil diff --git a/spec/fixtures/responses/whois.aero/status_available.txt b/spec/fixtures/responses/whois.aero/status_available.txt index 679aadb9..21e4ed69 100644 --- a/spec/fixtures/responses/whois.aero/status_available.txt +++ b/spec/fixtures/responses/whois.aero/status_available.txt @@ -1 +1,5 @@ NOT FOUND +>>> Last update of WHOIS database: 2021-11-09T15:45:24Z <<< + +Access to WHOIS information is provided to assist persons in determining the contents of a domain name registration record in the registry database. The data in this record is provided by The Registry Operator for informational purposes only, and accuracy is not guaranteed. 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. Registry Operator reserves the right to modify these terms at any time. By submitting this query, you agree to abide by this policy. +The Registrar of Record identified in this output may have an RDDS service that can be queried for additional information on how to contact the Registrant, Admin, or Tech contact of the queried domain name. diff --git a/spec/fixtures/responses/whois.aero/status_registered.expected b/spec/fixtures/responses/whois.aero/status_registered.expected index d7b69111..3f8e5aae 100644 --- a/spec/fixtures/responses/whois.aero/status_registered.expected +++ b/spec/fixtures/responses/whois.aero/status_registered.expected @@ -1,16 +1,15 @@ #disclaimer - %s == "Access to .AERO WHOIS information is provided to assist persons in determining the contents of a domain name registration record in the Afilias registry database. The data in this record is provided by Afilias Limited for informational purposes only, and Afilias 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. Afilias reserves the right to modify these terms at any time. By submitting this query, you agree to abide by this policy." - + %s == "Access to WHOIS information is provided to assist persons in determining the contents of a domain name registration record in the registry database. The data in this record is provided by The Registry Operator for informational purposes only, and accuracy is not guaranteed. 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. Registry Operator reserves the right to modify these terms at any time. By submitting this query, you agree to abide by this policy. The Registrar of Record identified in this output may have an RDDS service that can be queried for additional information on how to contact the Registrant, Admin, or Tech contact of the queried domain name." #domain %s == "srilankan.aero" #domain_id - %s == "D246-AERO" + %s == "D108300000000000246-AGRS" #status - %s == ["OK"] + %s == ["clientTransferProhibited https://icann.org/epp#clientTransferProhibited"] #available? %s == false @@ -28,80 +27,52 @@ #updated_on %s %CLASS{time} - %s %TIME{2013-04-09 06:35:03 UTC} + %s %TIME{2021-01-08 12:04:52 UTC} #expires_on %s %CLASS{time} - %s %TIME{2014-03-26 06:48:27 UTC} + %s %TIME{2022-03-26 06:48:27 UTC} #registrar %s %CLASS{registrar} %s.id == "380" - %s.name == "Tuonome IT" - %s.organization == nil - %s.url == nil + %s.name == "Tuonome.it.srl d/b/a APIsrs.com" + %s.url == "" #registrant_contacts %s %CLASS{array} %s %SIZE{1} %s[0] %CLASS{contact} %s[0].type == Whois::Parser::Contact::TYPE_REGISTRANT - %s[0].id == "C4526901-AERO" - %s[0].name == "Domain Name Administrator" + %s[0].id == nil + %s[0].name == nil %s[0].organization == "SriLankan Airlines Ltd" - %s[0].address == "Admin Bldg" - %s[0].city == "Katunayaka" - %s[0].zip == "11450" + %s[0].address == nil + %s[0].city == nil + %s[0].zip == nil %s[0].state == "WP" %s[0].country_code == "LK" - %s[0].phone == "+94.197331600" - %s[0].fax == "+94.197335160" - %s[0].email == "domregister@srilankan.aero" + %s[0].phone == nil + %s[0].fax == nil + %s[0].email == nil #admin_contacts %s %CLASS{array} - %s %SIZE{1} - %s[0] %CLASS{contact} - %s[0].type == Whois::Parser::Contact::TYPE_ADMINISTRATIVE - %s[0].id == "C4526901-AERO" - %s[0].name == "Domain Name Administrator" - %s[0].organization == "SriLankan Airlines Ltd" - %s[0].address == "Admin Bldg" - %s[0].city == "Katunayaka" - %s[0].zip == "11450" - %s[0].state == "WP" - %s[0].country_code == "LK" - %s[0].phone == "+94.197331600" - %s[0].fax == "+94.197335160" - %s[0].email == "domregister@srilankan.aero" + %s %SIZE{0} #technical_contacts %s %CLASS{array} - %s %SIZE{1} - %s[0] %CLASS{contact} - %s[0].type == Whois::Parser::Contact::TYPE_TECHNICAL - %s[0].id == "C4526901-AERO" - %s[0].name == "Domain Name Administrator" - %s[0].organization == "SriLankan Airlines Ltd" - %s[0].address == "Admin Bldg" - %s[0].city == "Katunayaka" - %s[0].zip == "11450" - %s[0].state == "WP" - %s[0].country_code == "LK" - %s[0].phone == "+94.197331600" - %s[0].fax == "+94.197335160" - %s[0].email == "domregister@srilankan.aero" - + %s %SIZE{0} #nameservers %s %CLASS{array} %s %SIZE{4} %s[0] %CLASS{nameserver} - %s[0].name == "dns1.srilankan.aero" + %s[0].name == "ns-1046.awsdns-02.org" %s[1] %CLASS{nameserver} - %s[1].name == "dns2.srilankan.aero" + %s[1].name == "ns-2011.awsdns-59.co.uk" %s[2] %CLASS{nameserver} - %s[2].name == "s2.ns.slt.lk" + %s[2].name == "ns-133.awsdns-16.com" %s[3] %CLASS{nameserver} - %s[3].name == "s1.ns.slt.lk" + %s[3].name == "ns-877.awsdns-45.net" diff --git a/spec/fixtures/responses/whois.aero/status_registered.txt b/spec/fixtures/responses/whois.aero/status_registered.txt index 30a727fd..a3cbb4ca 100644 --- a/spec/fixtures/responses/whois.aero/status_registered.txt +++ b/spec/fixtures/responses/whois.aero/status_registered.txt @@ -1,102 +1,29 @@ -Access to .AERO WHOIS information is provided to assist persons in -determining the contents of a domain name registration record in the -Afilias registry database. The data in this record is provided by -Afilias Limited for informational purposes only, and Afilias 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. Afilias reserves -the right to modify these terms at any time. By submitting this query, -you agree to abide by this policy. +Domain Name: SRILANKAN.AERO +Registry Domain ID: D108300000000000246-AGRS +Registrar WHOIS Server: +Registrar URL: +Updated Date: 2021-01-08T12:04:52Z +Creation Date: 2002-03-26T06:48:27Z +Registry Expiry Date: 2022-03-26T06:48:27Z +Registrar Registration Expiration Date: +Registrar: Tuonome.it.srl d/b/a APIsrs.com +Registrar IANA ID: 380 +Registrar Abuse Contact Email: +Registrar Abuse Contact Phone: +Reseller: +Domain Status: clientTransferProhibited https://icann.org/epp#clientTransferProhibited +Registrant Organization: SriLankan Airlines Ltd +Registrant State/Province: WP +Registrant Country: LK +Name Server: NS-1046.AWSDNS-02.ORG +Name Server: NS-2011.AWSDNS-59.CO.UK +Name Server: NS-133.AWSDNS-16.COM +Name Server: NS-877.AWSDNS-45.NET +DNSSEC: unsigned +URL of the ICANN Whois Inaccuracy Complaint Form: https://www.icann.org/wicf/ +>>> Last update of WHOIS database: 2021-11-09T15:49:32Z <<< -Domain ID:D246-AERO -Domain Name:SRILANKAN.AERO -ENS_AuthId:E0261-SITA -Created On:26-Mar-2002 06:48:27 UTC -Expires On:26-Mar-2014 06:48:27 UTC -Updated On:09-Apr-2013 06:35:03 UTC -Created By:Tuonome IT (380) -Updated By:Afilias Internal (984) -Sponsoring Registrar:Tuonome IT (380) -Domain Status:OK -Maintainer:http://www.tuonome.aero -Registrant ID:C4526901-AERO -Registrant Name:Domain Name Administrator -Registrant Organization:SriLankan Airlines Ltd -Registrant Street1:Admin Bldg -Registrant Street2: -Registrant Street3: -Registrant City:Katunayaka -Registrant State/Province:WP -Registrant Postal Code:11450 -Registrant Country:LK -Registrant Phone:+94.197331600 -Registrant Phone Ext.: -Registrant FAX:+94.197335160 -Registrant FAX Ext.: -Registrant Email:domregister@srilankan.aero -Admin ID:C4526901-AERO -Admin Name:Domain Name Administrator -Admin Organization:SriLankan Airlines Ltd -Admin Street1:Admin Bldg -Admin Street2: -Admin Street3: -Admin City:Katunayaka -Admin State/Province:WP -Admin Postal Code:11450 -Admin Country:LK -Admin Phone:+94.197331600 -Admin Phone Ext.: -Admin FAX:+94.197335160 -Admin FAX Ext.: -Admin Email:domregister@srilankan.aero -Billing ID:C4526901-AERO -Billing Name:Domain Name Administrator -Billing Organization:SriLankan Airlines Ltd -Billing Street1:Admin Bldg -Billing Street2: -Billing Street3: -Billing City:Katunayaka -Billing State/Province:WP -Billing Postal Code:11450 -Billing Country:LK -Billing Phone:+94.197331600 -Billing Phone Ext.: -Billing FAX:+94.197335160 -Billing FAX Ext.: -Billing Email:domregister@srilankan.aero -Tech ID:C4526901-AERO -Tech Name:Domain Name Administrator -Tech Organization:SriLankan Airlines Ltd -Tech Street1:Admin Bldg -Tech Street2: -Tech Street3: -Tech City:Katunayaka -Tech State/Province:WP -Tech Postal Code:11450 -Tech Country:LK -Tech Phone:+94.197331600 -Tech Phone Ext.: -Tech FAX:+94.197335160 -Tech FAX Ext.: -Tech Email:domregister@srilankan.aero -Name Server:DNS1.SRILANKAN.AERO -Name Server:DNS2.SRILANKAN.AERO -Name Server:S2.NS.SLT.LK -Name Server:S1.NS.SLT.LK -Name Server: -Name Server: -Name Server: -Name Server: -Name Server: -Name Server: -Name Server: -Name Server: -Name Server: - +For more information on Whois status codes, please visit https://icann.org/epp + +Access to WHOIS information is provided to assist persons in determining the contents of a domain name registration record in the registry database. The data in this record is provided by The Registry Operator for informational purposes only, and accuracy is not guaranteed. 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. Registry Operator reserves the right to modify these terms at any time. By submitting this query, you agree to abide by this policy. +The Registrar of Record identified in this output may have an RDDS service that can be queried for additional information on how to contact the Registrant, Admin, or Tech contact of the queried domain name. diff --git a/spec/fixtures/responses/whois.aero/status_reserved.expected b/spec/fixtures/responses/whois.aero/status_reserved.expected index 300219bf..95995f22 100644 --- a/spec/fixtures/responses/whois.aero/status_reserved.expected +++ b/spec/fixtures/responses/whois.aero/status_reserved.expected @@ -1,6 +1,5 @@ #disclaimer - %s == nil - + %s == "Access to WHOIS information is provided to assist persons in determining the contents of a domain name registration record in the registry database. The data in this record is provided by The Registry Operator for informational purposes only, and accuracy is not guaranteed. 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. Registry Operator reserves the right to modify these terms at any time. By submitting this query, you agree to abide by this policy. The Registrar of Record identified in this output may have an RDDS service that can be queried for additional information on how to contact the Registrant, Admin, or Tech contact of the queried domain name." #domain %s == nil diff --git a/spec/fixtures/responses/whois.aero/status_reserved.txt b/spec/fixtures/responses/whois.aero/status_reserved.txt index a9938ff8..18d0f498 100644 --- a/spec/fixtures/responses/whois.aero/status_reserved.txt +++ b/spec/fixtures/responses/whois.aero/status_reserved.txt @@ -1 +1,5 @@ -Name is restricted from registration +This domain name has been reserved by SITA for exclusive use by holder of the corresponding industry designator. If you are the holder of this industry designator and would like to take active control of this domain name, then please visit our registration page [http://www.information.aero] or contact SITA at aero.enquiries@sita.aero. +>>> Last update of WHOIS database: 2021-11-09T15:47:38Z <<< + +Access to WHOIS information is provided to assist persons in determining the contents of a domain name registration record in the registry database. The data in this record is provided by The Registry Operator for informational purposes only, and accuracy is not guaranteed. 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. Registry Operator reserves the right to modify these terms at any time. By submitting this query, you agree to abide by this policy. +The Registrar of Record identified in this output may have an RDDS service that can be queried for additional information on how to contact the Registrant, Admin, or Tech contact of the queried domain name. diff --git a/spec/fixtures/responses/whois.afilias-grs.info/bz/status_registered.expected b/spec/fixtures/responses/whois.afilias-grs.info/bz/status_registered.expected index 6427b58d..e4270d94 100644 --- a/spec/fixtures/responses/whois.afilias-grs.info/bz/status_registered.expected +++ b/spec/fixtures/responses/whois.afilias-grs.info/bz/status_registered.expected @@ -1,16 +1,16 @@ #disclaimer - %s == "Access to CCTLD WHOIS information is provided to assist persons in determining the contents of a domain name registration record in the Afilias registry database. The data in this record is provided by Afilias Limited for informational purposes only, and Afilias 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. Afilias reserves the right to modify these terms at any time. By submitting this query, you agree to abide by this policy." + %s == "Access to WHOIS information is provided to assist persons in determining the contents of a domain name registration record in the registry database. The data in this record is provided by The Registry Operator for informational purposes only, and accuracy is not guaranteed. 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. Registry Operator reserves the right to modify these terms at any time. By submitting this query, you agree to abide by this policy. The Registrar of Record identified in this output may have an RDDS service that can be queried for additional information on how to contact the Registrant, Admin, or Tech contact of the queried domain name." #domain %s == "google.bz" #domain_id - %s == "D354967-LRCC" + %s == "D105800000000354967-AGRS" #status - %s == ["CLIENT DELETE PROHIBITED", "CLIENT TRANSFER PROHIBITED", "CLIENT UPDATE PROHIBITED", "RENEWPERIOD"] + %s == ["clientDeleteProhibited https://icann.org/epp#clientDeleteProhibited", "clientTransferProhibited https://icann.org/epp#clientTransferProhibited", "clientUpdateProhibited https://icann.org/epp#clientUpdateProhibited"] #available? %s == false @@ -25,19 +25,18 @@ #updated_on %s %CLASS{time} - %s %TIME{2014-01-11 10:18:14 UTC} + %s %TIME{2021-01-11 10:34:48 UTC} #expires_on %s %CLASS{time} - %s %TIME{2015-02-12 18:08:52 UTC} + %s %TIME{2022-02-12 18:08:52 UTC} #registrar %s %CLASS{registrar} - %s.id == "R22-LRCC" - %s.name == "MarkMonitor, Inc." - %s.organization == nil - %s.url == nil + %s.id == "292" + %s.name == "MarkMonitor Inc." + %s.url == "http://www.markmonitor.com" #registrant_contacts %s %CLASS{array} @@ -60,6 +59,6 @@ %s[1] %CLASS{nameserver} %s[1].name == "ns2.google.com" %s[2] %CLASS{nameserver} - %s[2].name == "ns3.google.com" + %s[2].name == "ns4.google.com" %s[3] %CLASS{nameserver} - %s[3].name == "ns4.google.com" + %s[3].name == "ns3.google.com" diff --git a/spec/fixtures/responses/whois.afilias-grs.info/bz/status_registered.txt b/spec/fixtures/responses/whois.afilias-grs.info/bz/status_registered.txt index 32e738a8..213e8728 100644 --- a/spec/fixtures/responses/whois.afilias-grs.info/bz/status_registered.txt +++ b/spec/fixtures/responses/whois.afilias-grs.info/bz/status_registered.txt @@ -1,43 +1,28 @@ -Access to CCTLD WHOIS information is provided to assist persons in -determining the contents of a domain name registration record in the -Afilias registry database. The data in this record is provided by -Afilias Limited for informational purposes only, and Afilias 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. Afilias reserves -the right to modify these terms at any time. By submitting this query, -you agree to abide by this policy. +Domain Name: GOOGLE.BZ +Registry Domain ID: D105800000000354967-AGRS +Registrar WHOIS Server: +Registrar URL: http://www.markmonitor.com +Updated Date: 2021-01-11T10:34:48Z +Creation Date: 2006-02-12T18:08:52Z +Registry Expiry Date: 2022-02-12T18:08:52Z +Registrar Registration Expiration Date: +Registrar: MarkMonitor Inc. +Registrar IANA ID: 292 +Registrar Abuse Contact Email: abusecomplaints@markmonitor.com +Registrar Abuse Contact Phone: +1.2083895740 +Reseller: +Domain Status: clientDeleteProhibited https://icann.org/epp#clientDeleteProhibited +Domain Status: clientTransferProhibited https://icann.org/epp#clientTransferProhibited +Domain Status: clientUpdateProhibited https://icann.org/epp#clientUpdateProhibited +Name Server: NS1.GOOGLE.COM +Name Server: NS2.GOOGLE.COM +Name Server: NS4.GOOGLE.COM +Name Server: NS3.GOOGLE.COM +DNSSEC: unsigned -Domain ID:D354967-LRCC -Domain Name:GOOGLE.BZ -Created On:12-Feb-2006 18:08:52 UTC -Last Updated On:11-Jan-2014 10:18:14 UTC -Expiration Date:12-Feb-2015 18:08:52 UTC -Sponsoring Registrar:MarkMonitor, Inc. (R22-LRCC) -Whois Server:whois.markmonitor.com -Referral URL:http://www.markmonitor.com -Status:CLIENT DELETE PROHIBITED -Status:CLIENT TRANSFER PROHIBITED -Status:CLIENT UPDATE PROHIBITED -Status:RENEWPERIOD -Name Server:NS1.GOOGLE.COM -Name Server:NS2.GOOGLE.COM -Name Server:NS3.GOOGLE.COM -Name Server:NS4.GOOGLE.COM -Name Server: -Name Server: -Name Server: -Name Server: -Name Server: -Name Server: -Name Server: -Name Server: -Name Server: - +>>> Last update of WHOIS database: 2021-11-09T14:45:14Z <<< + +For more information on Whois status codes, please visit https://icann.org/epp + +Access to WHOIS information is provided to assist persons in determining the contents of a domain name registration record in the registry database. The data in this record is provided by The Registry Operator for informational purposes only, and accuracy is not guaranteed. 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. Registry Operator reserves the right to modify these terms at any time. By submitting this query, you agree to abide by this policy. +The Registrar of Record identified in this output may have an RDDS service that can be queried for additional information on how to contact the Registrant, Admin, or Tech contact of the queried domain name. diff --git a/spec/fixtures/responses/whois.afilias-grs.info/gi/status_available.expected b/spec/fixtures/responses/whois.afilias-grs.info/gi/status_available.expected index 2c3fe7a8..65f9ce91 100644 --- a/spec/fixtures/responses/whois.afilias-grs.info/gi/status_available.expected +++ b/spec/fixtures/responses/whois.afilias-grs.info/gi/status_available.expected @@ -1,5 +1,5 @@ #disclaimer - %s == nil + %s == "Access to WHOIS information is provided to assist persons in determining the contents of a domain name registration record in the registry database. The data in this record is provided by The Registry Operator for informational purposes only, and accuracy is not guaranteed. 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. Registry Operator reserves the right to modify these terms at any time. By submitting this query, you agree to abide by this policy. The Registrar of Record identified in this output may have an RDDS service that can be queried for additional information on how to contact the Registrant, Admin, or Tech contact of the queried domain name." #domain diff --git a/spec/fixtures/responses/whois.afilias-grs.info/gi/status_available.txt b/spec/fixtures/responses/whois.afilias-grs.info/gi/status_available.txt index 679aadb9..f79d7cf9 100644 --- a/spec/fixtures/responses/whois.afilias-grs.info/gi/status_available.txt +++ b/spec/fixtures/responses/whois.afilias-grs.info/gi/status_available.txt @@ -1 +1,5 @@ NOT FOUND +>>> Last update of WHOIS database: 2021-11-09T15:11:56Z <<< + +Access to WHOIS information is provided to assist persons in determining the contents of a domain name registration record in the registry database. The data in this record is provided by The Registry Operator for informational purposes only, and accuracy is not guaranteed. 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. Registry Operator reserves the right to modify these terms at any time. By submitting this query, you agree to abide by this policy. +The Registrar of Record identified in this output may have an RDDS service that can be queried for additional information on how to contact the Registrant, Admin, or Tech contact of the queried domain name. diff --git a/spec/fixtures/responses/whois.afilias-grs.info/gi/status_registered.expected b/spec/fixtures/responses/whois.afilias-grs.info/gi/status_registered.expected index e5c394f5..ae0635d9 100644 --- a/spec/fixtures/responses/whois.afilias-grs.info/gi/status_registered.expected +++ b/spec/fixtures/responses/whois.afilias-grs.info/gi/status_registered.expected @@ -1,16 +1,16 @@ #disclaimer - %s == "Access to CCTLD WHOIS information is provided to assist persons in determining the contents of a domain name registration record in the Afilias registry database. The data in this record is provided by Afilias Limited for informational purposes only, and Afilias 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. Afilias reserves the right to modify these terms at any time. By submitting this query, you agree to abide by this policy." + %s == "Access to WHOIS information is provided to assist persons in determining the contents of a domain name registration record in the registry database. The data in this record is provided by The Registry Operator for informational purposes only, and accuracy is not guaranteed. 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. Registry Operator reserves the right to modify these terms at any time. By submitting this query, you agree to abide by this policy. The Registrar of Record identified in this output may have an RDDS service that can be queried for additional information on how to contact the Registrant, Admin, or Tech contact of the queried domain name." #domain %s == "sapphire.gi" #domain_id - %s == "D68296-LRCC" + %s == "D105800000000068296-AGRS" #status - %s == ["OK"] + %s == ["ok https://icann.org/epp#ok"] #available? %s == false @@ -25,70 +25,43 @@ #updated_on %s %CLASS{time} - %s %TIME{2008-12-20 19:25:54 UTC} + %s %TIME{2017-12-05 13:07:12 UTC} #expires_on %s %CLASS{time} - %s %TIME{2009-12-20 13:34:34 UTC} + %s %TIME{2022-12-20 13:34:34 UTC} #registrar %s %CLASS{registrar} - %s.id == "R43-LRCC" + %s.id == "119" %s.name == "GibNet Registrar" - %s.organization == nil - %s.url == nil + %s.url == "" #registrant_contacts %s %CLASS{array} %s %SIZE{1} %s[0] %CLASS{contact} %s[0].type == Whois::Parser::Contact::TYPE_REGISTRANT - %s[0].id == "FR-1103549674779" - %s[0].name == "Jimmy Imossi" + %s[0].id == nil + %s[0].name == nil %s[0].organization == "Broadband Gibraltar Limited" - %s[0].address == "Suite 951\nEuroport" - %s[0].city == "Gibraltar" - %s[0].zip == "NA" - %s[0].state == "" + %s[0].address == nil + %s[0].city == nil + %s[0].zip == nil + %s[0].state == "Not Available" %s[0].country_code == "GI" - %s[0].phone == "+350.47200" - %s[0].fax == "+350.47272" - %s[0].email == "jimossi@sapphire.gi" + %s[0].phone == nil + %s[0].fax == nil + %s[0].email == nil #admin_contacts %s %CLASS{array} - %s %SIZE{1} - %s[0] %CLASS{contact} - %s[0].type == Whois::Parser::Contact::TYPE_ADMINISTRATIVE - %s[0].id == "FR-1103549674779" - %s[0].name == "Jimmy Imossi" - %s[0].organization == "Broadband Gibraltar Limited" - %s[0].address == "Suite 951\nEuroport" - %s[0].city == "Gibraltar" - %s[0].zip == "NA" - %s[0].state == "" - %s[0].country_code == "GI" - %s[0].phone == "+350.47200" - %s[0].fax == "+350.47272" - %s[0].email == "jimossi@sapphire.gi" + %s %SIZE{0} #technical_contacts %s %CLASS{array} - %s %SIZE{1} - %s[0] %CLASS{contact} - %s[0].type == Whois::Parser::Contact::TYPE_TECHNICAL - %s[0].id == "FR-10a223e2e4cf0" - %s[0].name == "Tech Dept" - %s[0].organization == "Broadband Gibraltar Ltd" - %s[0].address == "Suite 9.5.1\nEuroport" - %s[0].city == "N/A" - %s[0].zip == "N/A" - %s[0].state == "" - %s[0].country_code == "GI" - %s[0].phone == "+350.47200" - %s[0].fax == "+350.47271" - %s[0].email == "tech@sapphire.gi" + %s %SIZE{0} #nameservers diff --git a/spec/fixtures/responses/whois.afilias-grs.info/gi/status_registered.txt b/spec/fixtures/responses/whois.afilias-grs.info/gi/status_registered.txt index 7ebfd1b1..aff37c18 100644 --- a/spec/fixtures/responses/whois.afilias-grs.info/gi/status_registered.txt +++ b/spec/fixtures/responses/whois.afilias-grs.info/gi/status_registered.txt @@ -1,98 +1,27 @@ -Access to CCTLD WHOIS information is provided to assist persons in -determining the contents of a domain name registration record in the -Afilias registry database. The data in this record is provided by -Afilias Limited for informational purposes only, and Afilias 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. Afilias reserves -the right to modify these terms at any time. By submitting this query, -you agree to abide by this policy. +Domain Name: SAPPHIRE.GI +Registry Domain ID: D105800000000068296-AGRS +Registrar WHOIS Server: +Registrar URL: +Updated Date: 2017-12-05T13:07:12Z +Creation Date: 2004-12-20T13:34:34Z +Registry Expiry Date: 2022-12-20T13:34:34Z +Registrar Registration Expiration Date: +Registrar: GibNet Registrar +Registrar IANA ID: 119 +Registrar Abuse Contact Email: +Registrar Abuse Contact Phone: +Reseller: +Domain Status: ok https://icann.org/epp#ok +Registrant Organization: Broadband Gibraltar Limited +Registrant State/Province: Not Available +Registrant Country: GI +Name Server: NS1-A.SAPPHIRE.GI +Name Server: NS2-A.SAPPHIRE.GI +DNSSEC: unsigned -Domain ID:D68296-LRCC -Domain Name:SAPPHIRE.GI -Created On:20-Dec-2004 13:34:34 UTC -Last Updated On:20-Dec-2008 19:25:54 UTC -Expiration Date:20-Dec-2009 13:34:34 UTC -Sponsoring Registrar:GibNet Registrar (R43-LRCC) -Status:OK -Registrant ID:FR-1103549674779 -Registrant Name:Jimmy Imossi -Registrant Organization:Broadband Gibraltar Limited -Registrant Street1:Suite 951 -Registrant Street2:Europort -Registrant Street3: -Registrant City:Gibraltar -Registrant State/Province: -Registrant Postal Code:NA -Registrant Country:GI -Registrant Phone:+350.47200 -Registrant Phone Ext.: -Registrant FAX:+350.47272 -Registrant FAX Ext.: -Registrant Email:jimossi@sapphire.gi -Admin ID:FR-1103549674779 -Admin Name:Jimmy Imossi -Admin Organization:Broadband Gibraltar Limited -Admin Street1:Suite 951 -Admin Street2:Europort -Admin Street3: -Admin City:Gibraltar -Admin State/Province: -Admin Postal Code:NA -Admin Country:GI -Admin Phone:+350.47200 -Admin Phone Ext.: -Admin FAX:+350.47272 -Admin FAX Ext.: -Admin Email:jimossi@sapphire.gi -Billing ID:FR-1103549674779 -Billing Name:Jimmy Imossi -Billing Organization:Broadband Gibraltar Limited -Billing Street1:Suite 951 -Billing Street2:Europort -Billing Street3: -Billing City:Gibraltar -Billing State/Province: -Billing Postal Code:NA -Billing Country:GI -Billing Phone:+350.47200 -Billing Phone Ext.: -Billing FAX:+350.47272 -Billing FAX Ext.: -Billing Email:jimossi@sapphire.gi -Tech ID:FR-10a223e2e4cf0 -Tech Name:Tech Dept -Tech Organization:Broadband Gibraltar Ltd -Tech Street1:Suite 9.5.1 -Tech Street2:Europort -Tech Street3: -Tech City:N/A -Tech State/Province: -Tech Postal Code:N/A -Tech Country:GI -Tech Phone:+350.47200 -Tech Phone Ext.: -Tech FAX:+350.47271 -Tech FAX Ext.: -Tech Email:tech@sapphire.gi -Name Server:NS1-A.SAPPHIRE.GI -Name Server:NS2-A.SAPPHIRE.GI -Name Server: -Name Server: -Name Server: -Name Server: -Name Server: -Name Server: -Name Server: -Name Server: -Name Server: -Name Server: -Name Server: - +>>> Last update of WHOIS database: 2021-11-09T15:08:05Z <<< + +For more information on Whois status codes, please visit https://icann.org/epp + +Access to WHOIS information is provided to assist persons in determining the contents of a domain name registration record in the registry database. The data in this record is provided by The Registry Operator for informational purposes only, and accuracy is not guaranteed. 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. Registry Operator reserves the right to modify these terms at any time. By submitting this query, you agree to abide by this policy. +The Registrar of Record identified in this output may have an RDDS service that can be queried for additional information on how to contact the Registrant, Admin, or Tech contact of the queried domain name. diff --git a/spec/fixtures/responses/whois.afilias-grs.info/lc/status_available.expected b/spec/fixtures/responses/whois.afilias-grs.info/lc/status_available.expected index 2c3fe7a8..65f9ce91 100644 --- a/spec/fixtures/responses/whois.afilias-grs.info/lc/status_available.expected +++ b/spec/fixtures/responses/whois.afilias-grs.info/lc/status_available.expected @@ -1,5 +1,5 @@ #disclaimer - %s == nil + %s == "Access to WHOIS information is provided to assist persons in determining the contents of a domain name registration record in the registry database. The data in this record is provided by The Registry Operator for informational purposes only, and accuracy is not guaranteed. 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. Registry Operator reserves the right to modify these terms at any time. By submitting this query, you agree to abide by this policy. The Registrar of Record identified in this output may have an RDDS service that can be queried for additional information on how to contact the Registrant, Admin, or Tech contact of the queried domain name." #domain diff --git a/spec/fixtures/responses/whois.afilias-grs.info/lc/status_available.txt b/spec/fixtures/responses/whois.afilias-grs.info/lc/status_available.txt index 679aadb9..f79d7cf9 100644 --- a/spec/fixtures/responses/whois.afilias-grs.info/lc/status_available.txt +++ b/spec/fixtures/responses/whois.afilias-grs.info/lc/status_available.txt @@ -1 +1,5 @@ NOT FOUND +>>> Last update of WHOIS database: 2021-11-09T15:11:56Z <<< + +Access to WHOIS information is provided to assist persons in determining the contents of a domain name registration record in the registry database. The data in this record is provided by The Registry Operator for informational purposes only, and accuracy is not guaranteed. 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. Registry Operator reserves the right to modify these terms at any time. By submitting this query, you agree to abide by this policy. +The Registrar of Record identified in this output may have an RDDS service that can be queried for additional information on how to contact the Registrant, Admin, or Tech contact of the queried domain name. diff --git a/spec/fixtures/responses/whois.afilias-grs.info/lc/status_registered.expected b/spec/fixtures/responses/whois.afilias-grs.info/lc/status_registered.expected index 57d50c29..4250666e 100644 --- a/spec/fixtures/responses/whois.afilias-grs.info/lc/status_registered.expected +++ b/spec/fixtures/responses/whois.afilias-grs.info/lc/status_registered.expected @@ -1,16 +1,16 @@ #disclaimer - %s == "Access to CCTLD WHOIS information is provided to assist persons in determining the contents of a domain name registration record in the Afilias registry database. The data in this record is provided by Afilias Limited for informational purposes only, and Afilias 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. Afilias reserves the right to modify these terms at any time. By submitting this query, you agree to abide by this policy." + %s == "Access to WHOIS information is provided to assist persons in determining the contents of a domain name registration record in the registry database. The data in this record is provided by The Registry Operator for informational purposes only, and accuracy is not guaranteed. 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. Registry Operator reserves the right to modify these terms at any time. By submitting this query, you agree to abide by this policy. The Registrar of Record identified in this output may have an RDDS service that can be queried for additional information on how to contact the Registrant, Admin, or Tech contact of the queried domain name." #domain %s == "nic.lc" #domain_id - %s == "D946482-LRCC" + %s == "D105800000000946482-AGRS" #status - %s == ["OK"] + %s == ["ok https://icann.org/epp#ok"] #available? %s == false @@ -25,71 +25,43 @@ #updated_on %s %CLASS{time} - %s %TIME{2008-12-08 19:25:09 UTC} + %s %TIME{2020-12-08 22:22:29 UTC} #expires_on %s %CLASS{time} - %s %TIME{2009-12-08 00:00:00 UTC} + %s %TIME{2021-12-08 00:00:00 UTC} #registrar %s %CLASS{registrar} - %s.id == "R144-LRCC" + %s.id == "119" %s.name == "NicLc Registrar" - %s.organization == nil - %s.url == nil + %s.url == "" #registrant_contacts %s %CLASS{array} %s %SIZE{1} %s[0] %CLASS{contact} %s[0].type == Whois::Parser::Contact::TYPE_REGISTRANT - %s[0].id == "LC-54921" - %s[0].name == "Nic LC Admin" + %s[0].id == nil + %s[0].name == nil %s[0].organization == "Nic LC" - %s[0].address == "#4 Colony House\nJohn Compton Hwy" - %s[0].city == "Castries" - %s[0].zip == "Not Provided" + %s[0].address == nil + %s[0].city == nil + %s[0].zip == nil %s[0].state == "Not Provided" %s[0].country_code == "LC" - %s[0].phone == "+758.4520220" - %s[0].fax == "" - %s[0].email == "nic@nic.lc" + %s[0].phone == nil + %s[0].fax == nil + %s[0].email == nil #admin_contacts %s %CLASS{array} - %s %SIZE{1} - %s[0] %CLASS{contact} - %s[0].type == Whois::Parser::Contact::TYPE_ADMINISTRATIVE - %s[0].id == "LC-51893" - %s[0].name == "Nic LC Hostmaster" - %s[0].organization == "Nic LC" - %s[0].address == "#4 Colony House\nNot Provided" - %s[0].city == "Castries" - %s[0].zip == "Not Provided" - %s[0].state == "Not Provided" - %s[0].country_code == "LC" - %s[0].phone == "+758.4520220" - %s[0].fax == "" - %s[0].email == "hostmaster@nic.lc" + %s %SIZE{0} #technical_contacts %s %CLASS{array} - %s %SIZE{1} - %s[0] %CLASS{contact} - %s[0].type == Whois::Parser::Contact::TYPE_TECHNICAL - %s[0].id == "LC-53407" - %s[0].name == "Nic LC Technical" - %s[0].organization == "Nic LC" - %s[0].address == "#4 Colony House\nNot Provided" - %s[0].city == "Castries" - %s[0].zip == "Not Provided" - %s[0].state == "Not Provided" - %s[0].country_code == "LC" - %s[0].phone == "+758.4520220" - %s[0].fax == "" - %s[0].email == "technical@nic.lc" - + %s %SIZE{0} #nameservers %s %CLASS{array} diff --git a/spec/fixtures/responses/whois.afilias-grs.info/lc/status_registered.txt b/spec/fixtures/responses/whois.afilias-grs.info/lc/status_registered.txt index 7f419aa1..0a192d45 100644 --- a/spec/fixtures/responses/whois.afilias-grs.info/lc/status_registered.txt +++ b/spec/fixtures/responses/whois.afilias-grs.info/lc/status_registered.txt @@ -1,83 +1,27 @@ -Access to CCTLD WHOIS information is provided to assist persons in -determining the contents of a domain name registration record in the -Afilias registry database. The data in this record is provided by -Afilias Limited for informational purposes only, and Afilias 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. Afilias reserves -the right to modify these terms at any time. By submitting this query, -you agree to abide by this policy. +Domain Name: NIC.LC +Registry Domain ID: D105800000000946482-AGRS +Registrar WHOIS Server: +Registrar URL: +Updated Date: 2020-12-08T22:22:29Z +Creation Date: 2002-12-08T00:00:00Z +Registry Expiry Date: 2021-12-08T00:00:00Z +Registrar Registration Expiration Date: +Registrar: NicLc Registrar +Registrar IANA ID: 119 +Registrar Abuse Contact Email: +Registrar Abuse Contact Phone: +Reseller: +Domain Status: ok https://icann.org/epp#ok +Registrant Organization: Nic LC +Registrant State/Province: Not Provided +Registrant Country: LC +Name Server: NS1.NIC.AG +Name Server: NS.PATRICKLAY.COM +DNSSEC: unsigned -Domain ID:D946482-LRCC -Domain Name:NIC.LC -Created On:08-Dec-2002 00:00:00 UTC -Last Updated On:08-Dec-2008 19:25:09 UTC -Expiration Date:08-Dec-2009 00:00:00 UTC -Sponsoring Registrar:NicLc Registrar (R144-LRCC) -Status:OK -Registrant ID:LC-54921 -Registrant Name:Nic LC Admin -Registrant Organization:Nic LC -Registrant Street1:#4 Colony House -Registrant Street2:John Compton Hwy -Registrant Street3: -Registrant City:Castries -Registrant State/Province:Not Provided -Registrant Postal Code:Not Provided -Registrant Country:LC -Registrant Phone:+758.4520220 -Registrant Phone Ext.: -Registrant FAX: -Registrant FAX Ext.: -Registrant Email:nic@nic.lc -Admin ID:LC-51893 -Admin Name:Nic LC Hostmaster -Admin Organization:Nic LC -Admin Street1:#4 Colony House -Admin Street2:Not Provided -Admin Street3: -Admin City:Castries -Admin State/Province:Not Provided -Admin Postal Code:Not Provided -Admin Country:LC -Admin Phone:+758.4520220 -Admin Phone Ext.: -Admin FAX: -Admin FAX Ext.: -Admin Email:hostmaster@nic.lc -Tech ID:LC-53407 -Tech Name:Nic LC Technical -Tech Organization:Nic LC -Tech Street1:#4 Colony House -Tech Street2:Not Provided -Tech Street3: -Tech City:Castries -Tech State/Province:Not Provided -Tech Postal Code:Not Provided -Tech Country:LC -Tech Phone:+758.4520220 -Tech Phone Ext.: -Tech FAX: -Tech FAX Ext.: -Tech Email:technical@nic.lc -Name Server:NS1.NIC.AG -Name Server:NS.PATRICKLAY.COM -Name Server: -Name Server: -Name Server: -Name Server: -Name Server: -Name Server: -Name Server: -Name Server: -Name Server: -Name Server: -Name Server: - +>>> Last update of WHOIS database: 2021-11-09T15:15:18Z <<< + +For more information on Whois status codes, please visit https://icann.org/epp + +Access to WHOIS information is provided to assist persons in determining the contents of a domain name registration record in the registry database. The data in this record is provided by The Registry Operator for informational purposes only, and accuracy is not guaranteed. 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. Registry Operator reserves the right to modify these terms at any time. By submitting this query, you agree to abide by this policy. +The Registrar of Record identified in this output may have an RDDS service that can be queried for additional information on how to contact the Registrant, Admin, or Tech contact of the queried domain name. diff --git a/spec/fixtures/responses/whois.afilias-grs.info/mn/status_available.expected b/spec/fixtures/responses/whois.afilias-grs.info/mn/status_available.expected index 2c3fe7a8..65f9ce91 100644 --- a/spec/fixtures/responses/whois.afilias-grs.info/mn/status_available.expected +++ b/spec/fixtures/responses/whois.afilias-grs.info/mn/status_available.expected @@ -1,5 +1,5 @@ #disclaimer - %s == nil + %s == "Access to WHOIS information is provided to assist persons in determining the contents of a domain name registration record in the registry database. The data in this record is provided by The Registry Operator for informational purposes only, and accuracy is not guaranteed. 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. Registry Operator reserves the right to modify these terms at any time. By submitting this query, you agree to abide by this policy. The Registrar of Record identified in this output may have an RDDS service that can be queried for additional information on how to contact the Registrant, Admin, or Tech contact of the queried domain name." #domain diff --git a/spec/fixtures/responses/whois.afilias-grs.info/mn/status_available.txt b/spec/fixtures/responses/whois.afilias-grs.info/mn/status_available.txt index 679aadb9..16a55376 100644 --- a/spec/fixtures/responses/whois.afilias-grs.info/mn/status_available.txt +++ b/spec/fixtures/responses/whois.afilias-grs.info/mn/status_available.txt @@ -1 +1,5 @@ NOT FOUND +>>> Last update of WHOIS database: 2021-11-09T15:20:13Z <<< + +Access to WHOIS information is provided to assist persons in determining the contents of a domain name registration record in the registry database. The data in this record is provided by The Registry Operator for informational purposes only, and accuracy is not guaranteed. 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. Registry Operator reserves the right to modify these terms at any time. By submitting this query, you agree to abide by this policy. +The Registrar of Record identified in this output may have an RDDS service that can be queried for additional information on how to contact the Registrant, Admin, or Tech contact of the queried domain name. diff --git a/spec/fixtures/responses/whois.afilias-grs.info/mn/status_registered.expected b/spec/fixtures/responses/whois.afilias-grs.info/mn/status_registered.expected index 89b52747..4dddfef6 100644 --- a/spec/fixtures/responses/whois.afilias-grs.info/mn/status_registered.expected +++ b/spec/fixtures/responses/whois.afilias-grs.info/mn/status_registered.expected @@ -1,16 +1,16 @@ #disclaimer - %s == "Access to CCTLD WHOIS information is provided to assist persons in determining the contents of a domain name registration record in the Afilias registry database. The data in this record is provided by Afilias Limited for informational purposes only, and Afilias 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. Afilias reserves the right to modify these terms at any time. By submitting this query, you agree to abide by this policy." + %s == "Access to WHOIS information is provided to assist persons in determining the contents of a domain name registration record in the registry database. The data in this record is provided by The Registry Operator for informational purposes only, and accuracy is not guaranteed. 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. Registry Operator reserves the right to modify these terms at any time. By submitting this query, you agree to abide by this policy. The Registrar of Record identified in this output may have an RDDS service that can be queried for additional information on how to contact the Registrant, Admin, or Tech contact of the queried domain name." #domain %s == "google.mn" #domain_id - %s == "D444956-LRCC" + %s == "D105800000000444956-AGRS" #status - %s == ["CLIENT DELETE PROHIBITED", "CLIENT TRANSFER PROHIBITED", "CLIENT UPDATE PROHIBITED"] + %s == ["clientDeleteProhibited https://icann.org/epp#clientDeleteProhibited", "clientTransferProhibited https://icann.org/epp#clientTransferProhibited", "clientUpdateProhibited https://icann.org/epp#clientUpdateProhibited"] #available? %s == false @@ -25,26 +25,25 @@ #updated_on %s %CLASS{time} - %s %TIME{2013-03-06 10:21:48 UTC} + %s %TIME{2021-03-06 10:38:48 UTC} #expires_on %s %CLASS{time} - %s %TIME{2014-04-07 00:00:00 UTC} + %s %TIME{2022-04-07 00:00:00 UTC} #registrar %s %CLASS{registrar} - %s.id == "R22-LRCC" - %s.name == "MarkMonitor, Inc." - %s.organization == nil - %s.url == nil + %s.id == "292" + %s.name == "MarkMonitor Inc." + %s.url == "http://www.markmonitor.com" #registrant_contacts %s %CLASS{array} %s %SIZE{1} %s[0] %CLASS{contact} %s[0].type == Whois::Parser::Contact::TYPE_REGISTRANT - %s[0].id == "MNM-11332" + %s[0].id == "C40795-AGRS" %s[0].name == "DNS Admin" %s[0].organization == "Google Inc." %s[0].address == "1600 Amphitheatre Parkway" @@ -52,8 +51,8 @@ %s[0].zip == "94043" %s[0].state == "CA" %s[0].country_code == "US" - %s[0].phone == "+165.03300100" - %s[0].fax == "+165.06188571" + %s[0].phone == "+1.6502530000" + %s[0].fax == "+1.6502530001" %s[0].email == "dns-admin@google.com" #admin_contacts @@ -61,7 +60,7 @@ %s %SIZE{1} %s[0] %CLASS{contact} %s[0].type == Whois::Parser::Contact::TYPE_ADMINISTRATIVE - %s[0].id == "MNM-11332" + %s[0].id == "C40795-AGRS" %s[0].name == "DNS Admin" %s[0].organization == "Google Inc." %s[0].address == "1600 Amphitheatre Parkway" @@ -69,8 +68,8 @@ %s[0].zip == "94043" %s[0].state == "CA" %s[0].country_code == "US" - %s[0].phone == "+165.03300100" - %s[0].fax == "+165.06188571" + %s[0].phone == "+1.6502530000" + %s[0].fax == "+1.6502530001" %s[0].email == "dns-admin@google.com" #technical_contacts @@ -78,17 +77,17 @@ %s %SIZE{1} %s[0] %CLASS{contact} %s[0].type == Whois::Parser::Contact::TYPE_TECHNICAL - %s[0].id == "mmr-33293" - %s[0].name == "Domain Admin" - %s[0].organization == "MarkMonitor" - %s[0].address == "391 N. Ancestor Place\nSuite 150" - %s[0].city == "Boise" - %s[0].zip == "83704" + %s[0].id == "C40795-AGRS" + %s[0].name == "DNS Admin" + %s[0].organization == "Google Inc." + %s[0].address == "1600 Amphitheatre Parkway" + %s[0].city == "Mountain View" + %s[0].zip == "94043" %s[0].state == "CA" %s[0].country_code == "US" - %s[0].phone == "+1.2083895740" - %s[0].fax == "+1.2083895771" - %s[0].email == "ccops@markmonitor.com" + %s[0].phone == "+1.6502530000" + %s[0].fax == "+1.6502530001" + %s[0].email == "dns-admin@google.com" #nameservers @@ -99,6 +98,6 @@ %s[1] %CLASS{nameserver} %s[1].name == "ns2.google.com" %s[2] %CLASS{nameserver} - %s[2].name == "ns3.google.com" + %s[2].name == "ns4.google.com" %s[3] %CLASS{nameserver} - %s[3].name == "ns4.google.com" + %s[3].name == "ns3.google.com" diff --git a/spec/fixtures/responses/whois.afilias-grs.info/mn/status_registered.txt b/spec/fixtures/responses/whois.afilias-grs.info/mn/status_registered.txt index a78b4621..b19ca2c8 100644 --- a/spec/fixtures/responses/whois.afilias-grs.info/mn/status_registered.txt +++ b/spec/fixtures/responses/whois.afilias-grs.info/mn/status_registered.txt @@ -1,85 +1,67 @@ -Access to CCTLD WHOIS information is provided to assist persons in -determining the contents of a domain name registration record in the -Afilias registry database. The data in this record is provided by -Afilias Limited for informational purposes only, and Afilias 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. Afilias reserves -the right to modify these terms at any time. By submitting this query, -you agree to abide by this policy. +Domain Name: GOOGLE.MN +Registry Domain ID: D105800000000444956-AGRS +Registrar WHOIS Server: +Registrar URL: http://www.markmonitor.com +Updated Date: 2021-03-06T10:38:48Z +Creation Date: 2003-04-07T00:00:00Z +Registry Expiry Date: 2022-04-07T00:00:00Z +Registrar Registration Expiration Date: +Registrar: MarkMonitor Inc. +Registrar IANA ID: 292 +Registrar Abuse Contact Email: abusecomplaints@markmonitor.com +Registrar Abuse Contact Phone: +1.2083895740 +Reseller: +Domain Status: clientDeleteProhibited https://icann.org/epp#clientDeleteProhibited +Domain Status: clientTransferProhibited https://icann.org/epp#clientTransferProhibited +Domain Status: clientUpdateProhibited https://icann.org/epp#clientUpdateProhibited +Registry Registrant ID: C40795-AGRS +Registrant Name: DNS Admin +Registrant Organization: Google Inc. +Registrant Street: 1600 Amphitheatre Parkway +Registrant City: Mountain View +Registrant State/Province: CA +Registrant Postal Code: 94043 +Registrant Country: US +Registrant Phone: +1.6502530000 +Registrant Phone Ext: +Registrant Fax: +1.6502530001 +Registrant Fax Ext: +Registrant Email: dns-admin@google.com +Registry Admin ID: C40795-AGRS +Admin Name: DNS Admin +Admin Organization: Google Inc. +Admin Street: 1600 Amphitheatre Parkway +Admin City: Mountain View +Admin State/Province: CA +Admin Postal Code: 94043 +Admin Country: US +Admin Phone: +1.6502530000 +Admin Phone Ext: +Admin Fax: +1.6502530001 +Admin Fax Ext: +Admin Email: dns-admin@google.com +Registry Tech ID: C40795-AGRS +Tech Name: DNS Admin +Tech Organization: Google Inc. +Tech Street: 1600 Amphitheatre Parkway +Tech City: Mountain View +Tech State/Province: CA +Tech Postal Code: 94043 +Tech Country: US +Tech Phone: +1.6502530000 +Tech Phone Ext: +Tech Fax: +1.6502530001 +Tech Fax Ext: +Tech Email: dns-admin@google.com +Name Server: NS1.GOOGLE.COM +Name Server: NS2.GOOGLE.COM +Name Server: NS4.GOOGLE.COM +Name Server: NS3.GOOGLE.COM +DNSSEC: unsigned -Domain ID:D444956-LRCC -Domain Name:GOOGLE.MN -Created On:07-Apr-2003 00:00:00 UTC -Last Updated On:06-Mar-2013 10:21:48 UTC -Expiration Date:07-Apr-2014 00:00:00 UTC -Sponsoring Registrar:MarkMonitor, Inc. (R22-LRCC) -Status:CLIENT DELETE PROHIBITED -Status:CLIENT TRANSFER PROHIBITED -Status:CLIENT UPDATE PROHIBITED -Registrant ID:MNM-11332 -Registrant Name:DNS Admin -Registrant Organization:Google Inc. -Registrant Street1:1600 Amphitheatre Parkway -Registrant Street2: -Registrant Street3: -Registrant City:Mountain View -Registrant State/Province:CA -Registrant Postal Code:94043 -Registrant Country:US -Registrant Phone:+165.03300100 -Registrant Phone Ext.: -Registrant FAX:+165.06188571 -Registrant FAX Ext.: -Registrant Email:dns-admin@google.com -Admin ID:MNM-11332 -Admin Name:DNS Admin -Admin Organization:Google Inc. -Admin Street1:1600 Amphitheatre Parkway -Admin Street2: -Admin Street3: -Admin City:Mountain View -Admin State/Province:CA -Admin Postal Code:94043 -Admin Country:US -Admin Phone:+165.03300100 -Admin Phone Ext.: -Admin FAX:+165.06188571 -Admin FAX Ext.: -Admin Email:dns-admin@google.com -Tech ID:mmr-33293 -Tech Name:Domain Admin -Tech Organization:MarkMonitor -Tech Street1:391 N. Ancestor Place -Tech Street2:Suite 150 -Tech Street3: -Tech City:Boise -Tech State/Province:CA -Tech Postal Code:83704 -Tech Country:US -Tech Phone:+1.2083895740 -Tech Phone Ext.: -Tech FAX:+1.2083895771 -Tech FAX Ext.: -Tech Email:ccops@markmonitor.com -Name Server:NS1.GOOGLE.COM -Name Server:NS2.GOOGLE.COM -Name Server:NS3.GOOGLE.COM -Name Server:NS4.GOOGLE.COM -Name Server: -Name Server: -Name Server: -Name Server: -Name Server: -Name Server: -Name Server: -Name Server: -Name Server: - +>>> Last update of WHOIS database: 2021-11-09T15:18:31Z <<< + +For more information on Whois status codes, please visit https://icann.org/epp + +Access to WHOIS information is provided to assist persons in determining the contents of a domain name registration record in the registry database. The data in this record is provided by The Registry Operator for informational purposes only, and accuracy is not guaranteed. 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. Registry Operator reserves the right to modify these terms at any time. By submitting this query, you agree to abide by this policy. +The Registrar of Record identified in this output may have an RDDS service that can be queried for additional information on how to contact the Registrant, Admin, or Tech contact of the queried domain name. diff --git a/spec/fixtures/responses/whois.afilias-grs.info/sc/status_available.expected b/spec/fixtures/responses/whois.afilias-grs.info/sc/status_available.expected index d1670fe9..bfa9ac4f 100644 --- a/spec/fixtures/responses/whois.afilias-grs.info/sc/status_available.expected +++ b/spec/fixtures/responses/whois.afilias-grs.info/sc/status_available.expected @@ -1,5 +1,5 @@ #disclaimer - %s == nil + %s == "Access to WHOIS information is provided to assist persons in determining the contents of a domain name registration record in the registry database. The data in this record is provided by The Registry Operator for informational purposes only, and accuracy is not guaranteed. 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. Registry Operator reserves the right to modify these terms at any time. By submitting this query, you agree to abide by this policy. The Registrar of Record identified in this output may have an RDDS service that can be queried for additional information on how to contact the Registrant, Admin, or Tech contact of the queried domain name." #domain diff --git a/spec/fixtures/responses/whois.afilias-grs.info/sc/status_available.txt b/spec/fixtures/responses/whois.afilias-grs.info/sc/status_available.txt index 679aadb9..2b356a3f 100644 --- a/spec/fixtures/responses/whois.afilias-grs.info/sc/status_available.txt +++ b/spec/fixtures/responses/whois.afilias-grs.info/sc/status_available.txt @@ -1 +1,5 @@ NOT FOUND +>>> Last update of WHOIS database: 2021-11-09T15:33:26Z <<< + +Access to WHOIS information is provided to assist persons in determining the contents of a domain name registration record in the registry database. The data in this record is provided by The Registry Operator for informational purposes only, and accuracy is not guaranteed. 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. Registry Operator reserves the right to modify these terms at any time. By submitting this query, you agree to abide by this policy. +The Registrar of Record identified in this output may have an RDDS service that can be queried for additional information on how to contact the Registrant, Admin, or Tech contact of the queried domain name. diff --git a/spec/fixtures/responses/whois.afilias-grs.info/sc/status_registered.expected b/spec/fixtures/responses/whois.afilias-grs.info/sc/status_registered.expected index 6cf05612..0ea27487 100644 --- a/spec/fixtures/responses/whois.afilias-grs.info/sc/status_registered.expected +++ b/spec/fixtures/responses/whois.afilias-grs.info/sc/status_registered.expected @@ -1,16 +1,16 @@ #disclaimer - %s == "Access to CCTLD WHOIS information is provided to assist persons in determining the contents of a domain name registration record in the Afilias registry database. The data in this record is provided by Afilias Limited for informational purposes only, and Afilias 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. Afilias reserves the right to modify these terms at any time. By submitting this query, you agree to abide by this policy." + %s == "Access to WHOIS information is provided to assist persons in determining the contents of a domain name registration record in the registry database. The data in this record is provided by The Registry Operator for informational purposes only, and accuracy is not guaranteed. 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. Registry Operator reserves the right to modify these terms at any time. By submitting this query, you agree to abide by this policy. The Registrar of Record identified in this output may have an RDDS service that can be queried for additional information on how to contact the Registrant, Admin, or Tech contact of the queried domain name." #domain %s == "google.sc" #domain_id - %s == "D47234-LRCC" + %s == "D105800000000047234-AGRS" #status - %s == ["CLIENT DELETE PROHIBITED", "CLIENT TRANSFER PROHIBITED", "CLIENT UPDATE PROHIBITED", "RENEWPERIOD"] + %s == ["clientDeleteProhibited https://icann.org/epp#clientDeleteProhibited", "clientTransferProhibited https://icann.org/epp#clientTransferProhibited", "clientUpdateProhibited https://icann.org/epp#clientUpdateProhibited"] #available? %s == false @@ -25,73 +25,43 @@ #updated_on %s %CLASS{time} - %s %TIME{2014-01-02 10:20:29 UTC} + %s %TIME{2021-01-02 10:34:05 UTC} #expires_on %s %CLASS{time} - %s %TIME{2015-02-03 19:19:12 UTC} + %s %TIME{2022-02-03 19:19:12 UTC} #registrar %s %CLASS{registrar} - %s.id == "R22-LRCC" - %s.name == "MarkMonitor, Inc." - %s.organization == nil - %s.url == nil + %s.id == "292" + %s.name == "MarkMonitor Inc." + %s.url == "http://www.markmonitor.com" #registrant_contacts %s %CLASS{array} %s %SIZE{1} %s[0] %CLASS{contact} %s[0].type == Whois::Parser::Contact::TYPE_REGISTRANT - %s[0].id == "AGRS-129819" - %s[0].name == "DNS Admin" + %s[0].id == nil + %s[0].name == nil %s[0].organization == "Google Inc." - %s[0].address == "1600 Amphitheatre Parkway" - %s[0].city == "Mountain View" - %s[0].zip == "94043" + %s[0].address == nil + %s[0].city == nil + %s[0].zip == nil %s[0].state == "CA" %s[0].country_code == "US" - %s[0].phone == "+1.6502530000" - %s[0].fax == "+1.6506188571" - %s[0].email == "dns-admin@google.com" + %s[0].phone == nil + %s[0].fax == nil + %s[0].email == nil #admin_contacts %s %CLASS{array} - %s %SIZE{1} - %s[0] %CLASS{contact} - %s[0].type == Whois::Parser::Contact::TYPE_ADMINISTRATIVE - %s[0].id == "AGRS-129293" - %s[0].name == "CCOPS" - %s[0].organization == "MarkMonitor" - %s[0].address == "PMB 155\n10400 Overland Rd." - %s[0].city == "Boise" - %s[0].zip == "83709-1433" - %s[0].state == "ID" - %s[0].country_code == "US" - %s[0].phone == "+1.20838957" - %s[0].fax == "+1.20838957" - %s[0].email == "ccops@markmonitor.com" + %s %SIZE{0} #technical_contacts %s %CLASS{array} - %s %SIZE{1} - %s[0] %CLASS{contact} - %s[0].type == Whois::Parser::Contact::TYPE_TECHNICAL - %s[0].id == "mmr-33293" - %s[0].name == "Domain Admin" - %s[0].organization == "MarkMonitor" - %s[0].address == "391 N. Ancestor Place\nSuite 150" - %s[0].city == "Boise" - %s[0].zip == "83704" - %s[0].state == "CA" - %s[0].country == nil - %s[0].country_code == "US" - %s[0].phone == "+1.2083895740" - %s[0].fax == "+1.2083895771" - %s[0].email == "ccops@markmonitor.com" - %s[0].created_on == nil - %s[0].updated_on == nil + %s %SIZE{0} #nameservers diff --git a/spec/fixtures/responses/whois.afilias-grs.info/sc/status_registered.txt b/spec/fixtures/responses/whois.afilias-grs.info/sc/status_registered.txt index 03e2de8e..2bb95102 100644 --- a/spec/fixtures/responses/whois.afilias-grs.info/sc/status_registered.txt +++ b/spec/fixtures/responses/whois.afilias-grs.info/sc/status_registered.txt @@ -1,86 +1,29 @@ -Access to CCTLD WHOIS information is provided to assist persons in -determining the contents of a domain name registration record in the -Afilias registry database. The data in this record is provided by -Afilias Limited for informational purposes only, and Afilias 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. Afilias reserves -the right to modify these terms at any time. By submitting this query, -you agree to abide by this policy. +Domain Name: GOOGLE.SC +Registry Domain ID: D105800000000047234-AGRS +Registrar WHOIS Server: +Registrar URL: http://www.markmonitor.com +Updated Date: 2021-01-02T10:34:05Z +Creation Date: 2004-02-03T19:19:12Z +Registry Expiry Date: 2022-02-03T19:19:12Z +Registrar Registration Expiration Date: +Registrar: MarkMonitor Inc. +Registrar IANA ID: 292 +Registrar Abuse Contact Email: abusecomplaints@markmonitor.com +Registrar Abuse Contact Phone: +1.2083895740 +Reseller: +Domain Status: clientDeleteProhibited https://icann.org/epp#clientDeleteProhibited +Domain Status: clientTransferProhibited https://icann.org/epp#clientTransferProhibited +Domain Status: clientUpdateProhibited https://icann.org/epp#clientUpdateProhibited +Registrant Organization: Google Inc. +Registrant State/Province: CA +Registrant Country: US +Name Server: NS1.GOOGLE.COM +Name Server: NS2.GOOGLE.COM +DNSSEC: unsigned -Domain ID:D47234-LRCC -Domain Name:GOOGLE.SC -Created On:03-Feb-2004 19:19:12 UTC -Last Updated On:02-Jan-2014 10:20:29 UTC -Expiration Date:03-Feb-2015 19:19:12 UTC -Sponsoring Registrar:MarkMonitor, Inc. (R22-LRCC) -Status:CLIENT DELETE PROHIBITED -Status:CLIENT TRANSFER PROHIBITED -Status:CLIENT UPDATE PROHIBITED -Status:RENEWPERIOD -Registrant ID:AGRS-129819 -Registrant Name:DNS Admin -Registrant Organization:Google Inc. -Registrant Street1:1600 Amphitheatre Parkway -Registrant Street2: -Registrant Street3: -Registrant City:Mountain View -Registrant State/Province:CA -Registrant Postal Code:94043 -Registrant Country:US -Registrant Phone:+1.6502530000 -Registrant Phone Ext.: -Registrant FAX:+1.6506188571 -Registrant FAX Ext.: -Registrant Email:dns-admin@google.com -Admin ID:AGRS-129293 -Admin Name:CCOPS -Admin Organization:MarkMonitor -Admin Street1:PMB 155 -Admin Street2:10400 Overland Rd. -Admin Street3: -Admin City:Boise -Admin State/Province:ID -Admin Postal Code:83709-1433 -Admin Country:US -Admin Phone:+1.20838957 -Admin Phone Ext.: -Admin FAX:+1.20838957 -Admin FAX Ext.: -Admin Email:ccops@markmonitor.com -Tech ID:mmr-33293 -Tech Name:Domain Admin -Tech Organization:MarkMonitor -Tech Street1:391 N. Ancestor Place -Tech Street2:Suite 150 -Tech Street3: -Tech City:Boise -Tech State/Province:CA -Tech Postal Code:83704 -Tech Country:US -Tech Phone:+1.2083895740 -Tech Phone Ext.: -Tech FAX:+1.2083895771 -Tech FAX Ext.: -Tech Email:ccops@markmonitor.com -Name Server:NS1.GOOGLE.COM -Name Server:NS2.GOOGLE.COM -Name Server: -Name Server: -Name Server: -Name Server: -Name Server: -Name Server: -Name Server: -Name Server: -Name Server: -Name Server: -Name Server: - +>>> Last update of WHOIS database: 2021-11-09T15:33:25Z <<< + +For more information on Whois status codes, please visit https://icann.org/epp + +Access to WHOIS information is provided to assist persons in determining the contents of a domain name registration record in the registry database. The data in this record is provided by The Registry Operator for informational purposes only, and accuracy is not guaranteed. 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. Registry Operator reserves the right to modify these terms at any time. By submitting this query, you agree to abide by this policy. +The Registrar of Record identified in this output may have an RDDS service that can be queried for additional information on how to contact the Registrant, Admin, or Tech contact of the queried domain name. diff --git a/spec/fixtures/responses/whois.afilias-grs.info/vc/status_available.expected b/spec/fixtures/responses/whois.afilias-grs.info/vc/status_available.expected index 2c3fe7a8..63337ef4 100644 --- a/spec/fixtures/responses/whois.afilias-grs.info/vc/status_available.expected +++ b/spec/fixtures/responses/whois.afilias-grs.info/vc/status_available.expected @@ -1,6 +1,5 @@ #disclaimer - %s == nil - + %s == "Access to WHOIS information is provided to assist persons in determining the contents of a domain name registration record in the registry database. The data in this record is provided by The Registry Operator for informational purposes only, and accuracy is not guaranteed. 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. Registry Operator reserves the right to modify these terms at any time. By submitting this query, you agree to abide by this policy. The Registrar of Record identified in this output may have an RDDS service that can be queried for additional information on how to contact the Registrant, Admin, or Tech contact of the queried domain name." #domain %s == nil diff --git a/spec/fixtures/responses/whois.afilias-grs.info/vc/status_available.txt b/spec/fixtures/responses/whois.afilias-grs.info/vc/status_available.txt index 679aadb9..d68967fa 100644 --- a/spec/fixtures/responses/whois.afilias-grs.info/vc/status_available.txt +++ b/spec/fixtures/responses/whois.afilias-grs.info/vc/status_available.txt @@ -1 +1,5 @@ NOT FOUND +>>> Last update of WHOIS database: 2021-11-09T15:37:36Z <<< + +Access to WHOIS information is provided to assist persons in determining the contents of a domain name registration record in the registry database. The data in this record is provided by The Registry Operator for informational purposes only, and accuracy is not guaranteed. 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. Registry Operator reserves the right to modify these terms at any time. By submitting this query, you agree to abide by this policy. +The Registrar of Record identified in this output may have an RDDS service that can be queried for additional information on how to contact the Registrant, Admin, or Tech contact of the queried domain name. diff --git a/spec/fixtures/responses/whois.afilias-grs.info/vc/status_registered.expected b/spec/fixtures/responses/whois.afilias-grs.info/vc/status_registered.expected index 39e29392..f45d2a16 100644 --- a/spec/fixtures/responses/whois.afilias-grs.info/vc/status_registered.expected +++ b/spec/fixtures/responses/whois.afilias-grs.info/vc/status_registered.expected @@ -1,16 +1,15 @@ #disclaimer - %s == "Access to CCTLD WHOIS information is provided to assist persons in determining the contents of a domain name registration record in the Afilias registry database. The data in this record is provided by Afilias Limited for informational purposes only, and Afilias 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. Afilias reserves the right to modify these terms at any time. By submitting this query, you agree to abide by this policy." - + %s == "Access to WHOIS information is provided to assist persons in determining the contents of a domain name registration record in the registry database. The data in this record is provided by The Registry Operator for informational purposes only, and accuracy is not guaranteed. 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. Registry Operator reserves the right to modify these terms at any time. By submitting this query, you agree to abide by this policy. The Registrar of Record identified in this output may have an RDDS service that can be queried for additional information on how to contact the Registrant, Admin, or Tech contact of the queried domain name." #domain %s == "google.vc" #domain_id - %s == "D133753-LRCC" + %s == "D105800000000133753-AGRS" #status - %s == ["CLIENT DELETE PROHIBITED", "CLIENT TRANSFER PROHIBITED", "CLIENT UPDATE PROHIBITED"] + %s == ["clientDeleteProhibited https://icann.org/epp#clientDeleteProhibited", "clientTransferProhibited https://icann.org/epp#clientTransferProhibited", "clientUpdateProhibited https://icann.org/epp#clientUpdateProhibited"] #available? %s == false @@ -25,70 +24,43 @@ #updated_on %s %CLASS{time} - %s %TIME{2009-02-17 17:43:40 UTC} + %s %TIME{2021-05-28 09:37:54 UTC} #expires_on %s %CLASS{time} - %s %TIME{2011-06-29 00:58:18 UTC} + %s %TIME{2022-06-29 00:58:18 UTC} #registrar %s %CLASS{registrar} - %s.id == "R22-LRCC" - %s.name == "MarkMonitor, Inc." - %s.organization == nil - %s.url == nil + %s.id == "292" + %s.name == "MarkMonitor Inc." + %s.url == "http://www.markmonitor.com" #registrant_contacts %s %CLASS{array} %s %SIZE{1} %s[0] %CLASS{contact} %s[0].type == Whois::Parser::Contact::TYPE_REGISTRANT - %s[0].id == "mmr-2383" - %s[0].name == "DNS Admin" + %s[0].id == nil + %s[0].name == nil %s[0].organization == "Google Inc." - %s[0].address == "1600 Amphitheatre Parkway" - %s[0].city == "Mountain View" - %s[0].zip == "94043" + %s[0].address == nil + %s[0].city == nil + %s[0].zip == nil %s[0].state == "CA" %s[0].country_code == "US" - %s[0].phone == "+1.6502530000" - %s[0].fax == "+1.6506188571" - %s[0].email == "dns-admin@google.com" + %s[0].phone == nil + %s[0].fax == nil + %s[0].email == nil #admin_contacts %s %CLASS{array} - %s %SIZE{1} - %s[0] %CLASS{contact} - %s[0].type == Whois::Parser::Contact::TYPE_ADMINISTRATIVE - %s[0].id == "mmr-2383" - %s[0].name == "DNS Admin" - %s[0].organization == "Google Inc." - %s[0].address == "1600 Amphitheatre Parkway" - %s[0].city == "Mountain View" - %s[0].zip == "94043" - %s[0].state == "CA" - %s[0].country_code == "US" - %s[0].phone == "+1.6502530000" - %s[0].fax == "+1.6506188571" - %s[0].email == "dns-admin@google.com" + %s %SIZE{0} #technical_contacts %s %CLASS{array} - %s %SIZE{1} - %s[0] %CLASS{contact} - %s[0].type == Whois::Parser::Contact::TYPE_TECHNICAL - %s[0].id == "mmr-2383" - %s[0].name == "DNS Admin" - %s[0].organization == "Google Inc." - %s[0].address == "1600 Amphitheatre Parkway" - %s[0].city == "Mountain View" - %s[0].zip == "94043" - %s[0].state == "CA" - %s[0].country_code == "US" - %s[0].phone == "+1.6502530000" - %s[0].fax == "+1.6506188571" - %s[0].email == "dns-admin@google.com" + %s %SIZE{0} #nameservers @@ -99,6 +71,6 @@ %s[1] %CLASS{nameserver} %s[1].name == "ns2.google.com" %s[2] %CLASS{nameserver} - %s[2].name == "ns3.google.com" + %s[2].name == "ns4.google.com" %s[3] %CLASS{nameserver} - %s[3].name == "ns4.google.com" + %s[3].name == "ns3.google.com" diff --git a/spec/fixtures/responses/whois.afilias-grs.info/vc/status_registered.txt b/spec/fixtures/responses/whois.afilias-grs.info/vc/status_registered.txt index f4ca7e98..811a23cb 100644 --- a/spec/fixtures/responses/whois.afilias-grs.info/vc/status_registered.txt +++ b/spec/fixtures/responses/whois.afilias-grs.info/vc/status_registered.txt @@ -1,100 +1,31 @@ -Access to CCTLD WHOIS information is provided to assist persons in -determining the contents of a domain name registration record in the -Afilias registry database. The data in this record is provided by -Afilias Limited for informational purposes only, and Afilias 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. Afilias reserves -the right to modify these terms at any time. By submitting this query, -you agree to abide by this policy. +Domain Name: GOOGLE.VC +Registry Domain ID: D105800000000133753-AGRS +Registrar WHOIS Server: +Registrar URL: http://www.markmonitor.com +Updated Date: 2021-05-28T09:37:54Z +Creation Date: 2005-06-29T00:58:18Z +Registry Expiry Date: 2022-06-29T00:58:18Z +Registrar Registration Expiration Date: +Registrar: MarkMonitor Inc. +Registrar IANA ID: 292 +Registrar Abuse Contact Email: abusecomplaints@markmonitor.com +Registrar Abuse Contact Phone: +1.2083895740 +Reseller: +Domain Status: clientDeleteProhibited https://icann.org/epp#clientDeleteProhibited +Domain Status: clientTransferProhibited https://icann.org/epp#clientTransferProhibited +Domain Status: clientUpdateProhibited https://icann.org/epp#clientUpdateProhibited +Registrant Organization: Google Inc. +Registrant State/Province: CA +Registrant Country: US +Name Server: NS1.GOOGLE.COM +Name Server: NS2.GOOGLE.COM +Name Server: NS4.GOOGLE.COM +Name Server: NS3.GOOGLE.COM +DNSSEC: unsigned -Domain ID:D133753-LRCC -Domain Name:GOOGLE.VC -Created On:29-Jun-2005 00:58:18 UTC -Last Updated On:17-Feb-2009 17:43:40 UTC -Expiration Date:29-Jun-2011 00:58:18 UTC -Sponsoring Registrar:MarkMonitor, Inc. (R22-LRCC) -Status:CLIENT DELETE PROHIBITED -Status:CLIENT TRANSFER PROHIBITED -Status:CLIENT UPDATE PROHIBITED -Registrant ID:mmr-2383 -Registrant Name:DNS Admin -Registrant Organization:Google Inc. -Registrant Street1:1600 Amphitheatre Parkway -Registrant Street2: -Registrant Street3: -Registrant City:Mountain View -Registrant State/Province:CA -Registrant Postal Code:94043 -Registrant Country:US -Registrant Phone:+1.6502530000 -Registrant Phone Ext.: -Registrant FAX:+1.6506188571 -Registrant FAX Ext.: -Registrant Email:dns-admin@google.com -Admin ID:mmr-2383 -Admin Name:DNS Admin -Admin Organization:Google Inc. -Admin Street1:1600 Amphitheatre Parkway -Admin Street2: -Admin Street3: -Admin City:Mountain View -Admin State/Province:CA -Admin Postal Code:94043 -Admin Country:US -Admin Phone:+1.6502530000 -Admin Phone Ext.: -Admin FAX:+1.6506188571 -Admin FAX Ext.: -Admin Email:dns-admin@google.com -Billing ID:mmr-32102 -Billing Name:domain admin -Billing Organization:DNStination, Inc. -Billing Street1:303 Second Street -Billing Street2:Suite 800N -Billing Street3: -Billing City:San Francisco -Billing State/Province:CA -Billing Postal Code:94107 -Billing Country:US -Billing Phone:+1.4155319335 -Billing Phone Ext.: -Billing FAX:+1.2083895740 -Billing FAX Ext.: -Billing Email:admin@dnstinations.com -Tech ID:mmr-2383 -Tech Name:DNS Admin -Tech Organization:Google Inc. -Tech Street1:1600 Amphitheatre Parkway -Tech Street2: -Tech Street3: -Tech City:Mountain View -Tech State/Province:CA -Tech Postal Code:94043 -Tech Country:US -Tech Phone:+1.6502530000 -Tech Phone Ext.: -Tech FAX:+1.6506188571 -Tech FAX Ext.: -Tech Email:dns-admin@google.com -Name Server:NS1.GOOGLE.COM -Name Server:NS2.GOOGLE.COM -Name Server:NS3.GOOGLE.COM -Name Server:NS4.GOOGLE.COM -Name Server: -Name Server: -Name Server: -Name Server: -Name Server: -Name Server: -Name Server: -Name Server: -Name Server: - +>>> Last update of WHOIS database: 2021-11-09T15:37:35Z <<< + +For more information on Whois status codes, please visit https://icann.org/epp + +Access to WHOIS information is provided to assist persons in determining the contents of a domain name registration record in the registry database. The data in this record is provided by The Registry Operator for informational purposes only, and accuracy is not guaranteed. 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. Registry Operator reserves the right to modify these terms at any time. By submitting this query, you agree to abide by this policy. +The Registrar of Record identified in this output may have an RDDS service that can be queried for additional information on how to contact the Registrant, Admin, or Tech contact of the queried domain name. diff --git a/spec/fixtures/responses/whois.afilias.net/info/status_available.expected b/spec/fixtures/responses/whois.afilias.net/info/status_available.expected index 2c3fe7a8..8f020a7a 100644 --- a/spec/fixtures/responses/whois.afilias.net/info/status_available.expected +++ b/spec/fixtures/responses/whois.afilias.net/info/status_available.expected @@ -1,5 +1,5 @@ #disclaimer - %s == nil + %s == "Access to AFILIAS WHOIS information is provided to assist persons in determining the contents of a domain name registration record in the Afilias registry database. The data in this record is provided by Afilias Limited for informational purposes only, and Afilias 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. Afilias reserves the right to modify these terms at any time. By submitting this query, you agree to abide by this policy. The Registrar of Record identified in this output may have an RDDS service that can be queried for additional information on how to contact the Registrant, Admin, or Tech contact of the queried domain name." #domain diff --git a/spec/fixtures/responses/whois.afilias.net/info/status_available.txt b/spec/fixtures/responses/whois.afilias.net/info/status_available.txt index 679aadb9..060f0952 100644 --- a/spec/fixtures/responses/whois.afilias.net/info/status_available.txt +++ b/spec/fixtures/responses/whois.afilias.net/info/status_available.txt @@ -1 +1,7 @@ NOT FOUND +>>> Last update of WHOIS database: 2021-11-09T17:06:24Z <<< + +Access to AFILIAS WHOIS information is provided to assist persons in determining the contents of a domain name registration record in the Afilias registry database. The data in this record is provided by Afilias Limited for informational purposes only, and Afilias 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. Afilias reserves the right to modify these terms at any time. By submitting this query, you agree to abide by this policy. + +The Registrar of Record identified in this output may have an RDDS service that can be queried for additional information on how to contact the Registrant, Admin, or Tech contact of the queried domain name. + diff --git a/spec/fixtures/responses/whois.afilias.net/info/status_registered.expected b/spec/fixtures/responses/whois.afilias.net/info/status_registered.expected index dbf40910..1e637bc2 100644 --- a/spec/fixtures/responses/whois.afilias.net/info/status_registered.expected +++ b/spec/fixtures/responses/whois.afilias.net/info/status_registered.expected @@ -1,5 +1,5 @@ #disclaimer - %s == "Access to AFILIAS WHOIS information is provided to assist persons in determining the contents of a domain name registration record in the Afilias registry database. The data in this record is provided by Afilias Limited for informational purposes only, and Afilias 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. Afilias reserves the right to modify these terms at any time. By submitting this query, you agree to abide by this policy." + %s == "Access to AFILIAS WHOIS information is provided to assist persons in determining the contents of a domain name registration record in the Afilias registry database. The data in this record is provided by Afilias Limited for informational purposes only, and Afilias 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. Afilias reserves the right to modify these terms at any time. By submitting this query, you agree to abide by this policy. The Registrar of Record identified in this output may have an RDDS service that can be queried for additional information on how to contact the Registrant, Admin, or Tech contact of the queried domain name." #domain @@ -10,7 +10,7 @@ #status - %s == ["clientDeleteProhibited", "clientTransferProhibited", "clientUpdateProhibited"] + %s == ["clientDeleteProhibited https://icann.org/epp#clientDeleteProhibited", "clientTransferProhibited https://icann.org/epp#clientTransferProhibited", "clientUpdateProhibited https://icann.org/epp#clientUpdateProhibited", "serverDeleteProhibited https://icann.org/epp#serverDeleteProhibited", "serverTransferProhibited https://icann.org/epp#serverTransferProhibited", "serverUpdateProhibited https://icann.org/epp#serverUpdateProhibited"] #available? %s == false @@ -25,70 +25,43 @@ #updated_on %s %CLASS{time} - %s %TIME{2013-06-29 09:26:18 UTC} + %s %TIME{2021-06-29 09:31:10 UTC} #expires_on %s %CLASS{time} - %s %TIME{2014-07-31 23:57:50 UTC} + %s %TIME{2022-07-31 23:57:50 UTC} #registrar %s %CLASS{registrar} - %s.id == "R151-LRMS" + %s.id == "292" %s.name == "MarkMonitor Inc." - %s.organization == nil - %s.url == nil + %s.url == "http://www.markmonitor.com" #registrant_contacts %s %CLASS{array} %s %SIZE{1} %s[0] %CLASS{contact} %s[0].type == Whois::Parser::Contact::TYPE_REGISTRANT - %s[0].id == "mmr-32097" - %s[0].name == "DNS Admin" - %s[0].organization == "Google Inc." - %s[0].address == "1600 Amphitheatre Parkway" - %s[0].city == "Mountain View" - %s[0].zip == "94043" + %s[0].id == nil + %s[0].name == nil + %s[0].organization == "Google LLC" + %s[0].address == nil + %s[0].city == nil + %s[0].zip == nil %s[0].state == "CA" %s[0].country_code == "US" - %s[0].phone == "+1.6506234000" - %s[0].fax == "+1.6506188571" - %s[0].email == "dns-admin@google.com" + %s[0].phone == nil + %s[0].fax == nil + %s[0].email == nil #admin_contacts %s %CLASS{array} - %s %SIZE{1} - %s[0] %CLASS{contact} - %s[0].type == Whois::Parser::Contact::TYPE_ADMINISTRATIVE - %s[0].id == "mmr-32097" - %s[0].name == "DNS Admin" - %s[0].organization == "Google Inc." - %s[0].address == "1600 Amphitheatre Parkway" - %s[0].city == "Mountain View" - %s[0].zip == "94043" - %s[0].state == "CA" - %s[0].country_code == "US" - %s[0].phone == "+1.6506234000" - %s[0].fax == "+1.6506188571" - %s[0].email == "dns-admin@google.com" + %s %SIZE{0} #technical_contacts %s %CLASS{array} - %s %SIZE{1} - %s[0] %CLASS{contact} - %s[0].type == Whois::Parser::Contact::TYPE_TECHNICAL - %s[0].id == "mmr-32097" - %s[0].name == "DNS Admin" - %s[0].organization == "Google Inc." - %s[0].address == "1600 Amphitheatre Parkway" - %s[0].city == "Mountain View" - %s[0].zip == "94043" - %s[0].state == "CA" - %s[0].country_code == "US" - %s[0].phone == "+1.6506234000" - %s[0].fax == "+1.6506188571" - %s[0].email == "dns-admin@google.com" + %s %SIZE{0} #nameservers diff --git a/spec/fixtures/responses/whois.afilias.net/info/status_registered.txt b/spec/fixtures/responses/whois.afilias.net/info/status_registered.txt index 876791ad..0cae9dad 100644 --- a/spec/fixtures/responses/whois.afilias.net/info/status_registered.txt +++ b/spec/fixtures/responses/whois.afilias.net/info/status_registered.txt @@ -1,86 +1,35 @@ -Domain Name:GOOGLE.INFO -Domain ID: D37288-LRMS +Domain Name: GOOGLE.INFO +Registry Domain ID: D37288-LRMS +Registrar WHOIS Server: whois.markmonitor.com +Registrar URL: http://www.markmonitor.com +Updated Date: 2021-06-29T09:31:10Z Creation Date: 2001-07-31T23:57:50Z -Updated Date: 2013-06-29T09:26:18Z -Registry Expiry Date: 2014-07-31T23:57:50Z -Trademark Name:GOOGLE -Trademark Date:1999-09-17 -Trademark Country:Mexico -Trademark Number:622722 -Sponsoring Registrar:MarkMonitor Inc. (R151-LRMS) -Sponsoring Registrar IANA ID: 292 -WHOIS Server: -Referral URL: -Domain Status: clientDeleteProhibited -Domain Status: clientTransferProhibited -Domain Status: clientUpdateProhibited -Registrant ID:mmr-32097 -Registrant Name:DNS Admin -Registrant Organization:Google Inc. -Registrant Street: 1600 Amphitheatre Parkway -Registrant City:Mountain View -Registrant State/Province:CA -Registrant Postal Code:94043 -Registrant Country:US -Registrant Phone:+1.6506234000 -Registrant Phone Ext: -Registrant Fax: +1.6506188571 -Registrant Fax Ext: -Registrant Email:dns-admin@google.com -Admin ID:mmr-32097 -Admin Name:DNS Admin -Admin Organization:Google Inc. -Admin Street: 1600 Amphitheatre Parkway -Admin City:Mountain View -Admin State/Province:CA -Admin Postal Code:94043 -Admin Country:US -Admin Phone:+1.6506234000 -Admin Phone Ext: -Admin Fax: +1.6506188571 -Admin Fax Ext: -Admin Email:dns-admin@google.com -Billing ID:mmr-32097 -Billing Name:DNS Admin -Billing Organization:Google Inc. -Billing Street: 1600 Amphitheatre Parkway -Billing City:Mountain View -Billing State/Province:CA -Billing Postal Code:94043 -Billing Country:US -Billing Phone:+1.6506234000 -Billing Phone Ext: -Billing Fax: +1.6506188571 -Billing Fax Ext: -Billing Email:dns-admin@google.com -Tech ID:mmr-32097 -Tech Name:DNS Admin -Tech Organization:Google Inc. -Tech Street: 1600 Amphitheatre Parkway -Tech City:Mountain View -Tech State/Province:CA -Tech Postal Code:94043 -Tech Country:US -Tech Phone:+1.6506234000 -Tech Phone Ext: -Tech Fax: +1.6506188571 -Tech Fax Ext: -Tech Email:dns-admin@google.com -Name Server:NS1.GOOGLE.COM -Name Server:NS2.GOOGLE.COM -Name Server:NS3.GOOGLE.COM -Name Server:NS4.GOOGLE.COM -Name Server: -Name Server: -Name Server: -Name Server: -Name Server: -Name Server: -Name Server: -Name Server: -Name Server: -DNSSEC:Unsigned +Registry Expiry Date: 2022-07-31T23:57:50Z +Registrar Registration Expiration Date: +Registrar: MarkMonitor Inc. +Registrar IANA ID: 292 +Registrar Abuse Contact Email: abusecomplaints@markmonitor.com +Registrar Abuse Contact Phone: +1.2083895740 +Reseller: +Domain Status: clientDeleteProhibited https://icann.org/epp#clientDeleteProhibited +Domain Status: clientTransferProhibited https://icann.org/epp#clientTransferProhibited +Domain Status: clientUpdateProhibited https://icann.org/epp#clientUpdateProhibited +Domain Status: serverDeleteProhibited https://icann.org/epp#serverDeleteProhibited +Domain Status: serverTransferProhibited https://icann.org/epp#serverTransferProhibited +Domain Status: serverUpdateProhibited https://icann.org/epp#serverUpdateProhibited +Registrant Organization: Google LLC +Registrant State/Province: CA +Registrant Country: US +Name Server: NS1.GOOGLE.COM +Name Server: NS2.GOOGLE.COM +Name Server: NS3.GOOGLE.COM +Name Server: NS4.GOOGLE.COM +DNSSEC: unsigned +URL of the ICANN Whois Inaccuracy Complaint Form: https://www.icann.org/wicf/ +>>> Last update of WHOIS database: 2021-11-09T17:05:05Z <<< -Access to AFILIAS WHOIS information is provided to assist persons in determining the contents of a domain name registration record in the Afilias registry database. The data in this record is provided by Afilias Limited for informational purposes only, and Afilias 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. Afilias reserves the right to modify these terms at any time. By submitting this query, you agree to abide by this policy. +For more information on Whois status codes, please visit https://icann.org/epp +Access to AFILIAS WHOIS information is provided to assist persons in determining the contents of a domain name registration record in the Afilias registry database. The data in this record is provided by Afilias Limited for informational purposes only, and Afilias 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. Afilias reserves the right to modify these terms at any time. By submitting this query, you agree to abide by this policy. +The Registrar of Record identified in this output may have an RDDS service that can be queried for additional information on how to contact the Registrant, Admin, or Tech contact of the queried domain name. diff --git a/spec/fixtures/responses/whois.afilias.net/info/status_reserved.txt b/spec/fixtures/responses/whois.afilias.net/info/status_reserved.txt index a6531fef..26f93ce3 100644 --- a/spec/fixtures/responses/whois.afilias.net/info/status_reserved.txt +++ b/spec/fixtures/responses/whois.afilias.net/info/status_reserved.txt @@ -1,4 +1,6 @@ -Name is reserved by afilias ->>> Last update of WHOIS database: 2016-02-21T09:56:17Z <<< +Reserved by the registry. +>>> Last update of WHOIS database: 2021-11-09T17:09:19Z <<< Access to AFILIAS WHOIS information is provided to assist persons in determining the contents of a domain name registration record in the Afilias registry database. The data in this record is provided by Afilias Limited for informational purposes only, and Afilias 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. Afilias reserves the right to modify these terms at any time. By submitting this query, you agree to abide by this policy. + +The Registrar of Record identified in this output may have an RDDS service that can be queried for additional information on how to contact the Registrant, Admin, or Tech contact of the queried domain name. diff --git a/spec/fixtures/responses/whois.afilias.net/pro/status_available.expected b/spec/fixtures/responses/whois.afilias.net/pro/status_available.expected index f535421b..8f020a7a 100644 --- a/spec/fixtures/responses/whois.afilias.net/pro/status_available.expected +++ b/spec/fixtures/responses/whois.afilias.net/pro/status_available.expected @@ -1,5 +1,5 @@ #disclaimer - %s == "Access to AFILIAS WHOIS information is provided to assist persons in determining the contents of a domain name registration record in the Afilias registry database. The data in this record is provided by Afilias Limited for informational purposes only, and Afilias 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. Afilias reserves the right to modify these terms at any time. By submitting this query, you agree to abide by this policy." + %s == "Access to AFILIAS WHOIS information is provided to assist persons in determining the contents of a domain name registration record in the Afilias registry database. The data in this record is provided by Afilias Limited for informational purposes only, and Afilias 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. Afilias reserves the right to modify these terms at any time. By submitting this query, you agree to abide by this policy. The Registrar of Record identified in this output may have an RDDS service that can be queried for additional information on how to contact the Registrant, Admin, or Tech contact of the queried domain name." #domain diff --git a/spec/fixtures/responses/whois.afilias.net/pro/status_available.txt b/spec/fixtures/responses/whois.afilias.net/pro/status_available.txt index 937adc6c..c95f18a2 100644 --- a/spec/fixtures/responses/whois.afilias.net/pro/status_available.txt +++ b/spec/fixtures/responses/whois.afilias.net/pro/status_available.txt @@ -1,4 +1,6 @@ NOT FOUND ->>> Last update of WHOIS database: 2016-02-21T09:33:12Z <<< +>>> Last update of WHOIS database: 2021-11-09T21:36:02Z <<< Access to AFILIAS WHOIS information is provided to assist persons in determining the contents of a domain name registration record in the Afilias registry database. The data in this record is provided by Afilias Limited for informational purposes only, and Afilias 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. Afilias reserves the right to modify these terms at any time. By submitting this query, you agree to abide by this policy. + +The Registrar of Record identified in this output may have an RDDS service that can be queried for additional information on how to contact the Registrant, Admin, or Tech contact of the queried domain name. diff --git a/spec/fixtures/responses/whois.afilias.net/pro/status_registered.expected b/spec/fixtures/responses/whois.afilias.net/pro/status_registered.expected index 277d87bd..6cfb2c67 100644 --- a/spec/fixtures/responses/whois.afilias.net/pro/status_registered.expected +++ b/spec/fixtures/responses/whois.afilias.net/pro/status_registered.expected @@ -1,6 +1,5 @@ #disclaimer - %s == "Access to AFILIAS WHOIS information is provided to assist persons in determining the contents of a domain name registration record in the Afilias registry database. The data in this record is provided by Afilias Limited for informational purposes only, and Afilias 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. Afilias reserves the right to modify these terms at any time. By submitting this query, you agree to abide by this policy." - + %s == "Access to AFILIAS WHOIS information is provided to assist persons in determining the contents of a domain name registration record in the Afilias registry database. The data in this record is provided by Afilias Limited for informational purposes only, and Afilias 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. Afilias reserves the right to modify these terms at any time. By submitting this query, you agree to abide by this policy. The Registrar of Record identified in this output may have an RDDS service that can be queried for additional information on how to contact the Registrant, Admin, or Tech contact of the queried domain name." #domain %s == "google.pro" @@ -25,70 +24,43 @@ #updated_on %s %CLASS{time} - %s %TIME{2016-02-01 15:44:03 UTC} + %s %TIME{2021-08-07 09:34:10 UTC} #expires_on %s %CLASS{time} - %s %TIME{2016-09-08 00:00:00 UTC} + %s %TIME{2022-09-08 00:00:00 UTC} #registrar %s %CLASS{registrar} - %s.id == nil + %s.id == "292" %s.name == "MarkMonitor Inc." - %s.organization == nil - %s.url == nil + %s.url == "http://www.markmonitor.com" #registrant_contacts %s %CLASS{array} %s %SIZE{1} %s[0] %CLASS{contact} - %s[0].type == Whois::Parser::Contact::TYPE_REGISTRANT - %s[0].id == "mmr-2383" - %s[0].name == "DNS Admin" - %s[0].organization == "Google Inc." - %s[0].address == "1600 Amphitheatre Parkway" - %s[0].city == "Mountain View" - %s[0].zip == "94043" - %s[0].state == "CA" - %s[0].country_code == "US" - %s[0].phone == "+1.6502530000" - %s[0].fax == "+1.6506188571" - %s[0].email == "dns-admin@google.com" + %s[0].type == Whois::Parser::Contact::TYPE_REGISTRANT + %s[0].id == nil + %s[0].name == nil + %s[0].organization == "Google Inc." + %s[0].address == nil + %s[0].city == nil + %s[0].zip == nil + %s[0].state == "CA" + %s[0].country_code == "US" + %s[0].phone == nil + %s[0].fax == nil + %s[0].email == nil #admin_contacts %s %CLASS{array} - %s %SIZE{1} - %s[0] %CLASS{contact} - %s[0].type == Whois::Parser::Contact::TYPE_ADMINISTRATIVE - %s[0].id == "mmr-2383" - %s[0].name == "DNS Admin" - %s[0].organization == "Google Inc." - %s[0].address == "1600 Amphitheatre Parkway" - %s[0].city == "Mountain View" - %s[0].zip == "94043" - %s[0].state == "CA" - %s[0].country_code == "US" - %s[0].phone == "+1.6502530000" - %s[0].fax == "+1.6506188571" - %s[0].email == "dns-admin@google.com" + %s %SIZE{0} #technical_contacts %s %CLASS{array} - %s %SIZE{1} - %s[0] %CLASS{contact} - %s[0].type == Whois::Parser::Contact::TYPE_TECHNICAL - %s[0].id == "mmr-2383" - %s[0].name == "DNS Admin" - %s[0].organization == "Google Inc." - %s[0].address == "1600 Amphitheatre Parkway" - %s[0].city == "Mountain View" - %s[0].zip == "94043" - %s[0].state == "CA" - %s[0].country_code == "US" - %s[0].phone == "+1.6502530000" - %s[0].fax == "+1.6506188571" - %s[0].email == "dns-admin@google.com" + %s %SIZE{0} #nameservers diff --git a/spec/fixtures/responses/whois.afilias.net/pro/status_registered.txt b/spec/fixtures/responses/whois.afilias.net/pro/status_registered.txt index 7c7c584e..0b1aa02b 100644 --- a/spec/fixtures/responses/whois.afilias.net/pro/status_registered.txt +++ b/spec/fixtures/responses/whois.afilias.net/pro/status_registered.txt @@ -1,72 +1,30 @@ Domain Name: GOOGLE.PRO -Domain ID: D107300000000011545-LRMS -WHOIS Server: -Referral URL: http://www.markmonitor.com -Updated Date: 2016-02-01T15:44:03Z +Registry Domain ID: D107300000000011545-LRMS +Registrar WHOIS Server: whois.markmonitor.com +Registrar URL: http://www.markmonitor.com +Updated Date: 2021-08-07T09:34:10Z Creation Date: 2008-07-22T00:00:00Z -Registry Expiry Date: 2016-09-08T00:00:00Z -Sponsoring Registrar: MarkMonitor Inc. -Sponsoring Registrar IANA ID: 292 +Registry Expiry Date: 2022-09-08T00:00:00Z +Registrar Registration Expiration Date: +Registrar: MarkMonitor Inc. +Registrar IANA ID: 292 +Registrar Abuse Contact Email: abusecomplaints@markmonitor.com +Registrar Abuse Contact Phone: +1.2083895740 +Reseller: Domain Status: clientDeleteProhibited https://icann.org/epp#clientDeleteProhibited Domain Status: clientTransferProhibited https://icann.org/epp#clientTransferProhibited Domain Status: clientUpdateProhibited https://icann.org/epp#clientUpdateProhibited -Registrant ID: mmr-2383 -Registrant Name: DNS Admin Registrant Organization: Google Inc. -Registrant Street: 1600 Amphitheatre Parkway -Registrant City: Mountain View Registrant State/Province: CA -Registrant Postal Code: 94043 Registrant Country: US -Registrant Phone: +1.6502530000 -Registrant Phone Ext: -Registrant Fax: +1.6506188571 -Registrant Fax Ext: -Registrant Email: dns-admin@google.com -Admin ID: mmr-2383 -Admin Name: DNS Admin -Admin Organization: Google Inc. -Admin Street: 1600 Amphitheatre Parkway -Admin City: Mountain View -Admin State/Province: CA -Admin Postal Code: 94043 -Admin Country: US -Admin Phone: +1.6502530000 -Admin Phone Ext: -Admin Fax: +1.6506188571 -Admin Fax Ext: -Admin Email: dns-admin@google.com -Tech ID: mmr-2383 -Tech Name: DNS Admin -Tech Organization: Google Inc. -Tech Street: 1600 Amphitheatre Parkway -Tech City: Mountain View -Tech State/Province: CA -Tech Postal Code: 94043 -Tech Country: US -Tech Phone: +1.6502530000 -Tech Phone Ext: -Tech Fax: +1.6506188571 -Tech Fax Ext: -Tech Email: dns-admin@google.com -Billing ID: mmr-132627 -Billing Name: CCOPS Billing -Billing Organization: MarkMonitor, Inc. -Billing Street: 391 N. Ancestor Place -Billing City: Boise -Billing State/Province: ID -Billing Postal Code: 83704 -Billing Country: US -Billing Phone: +1.2083895740 -Billing Phone Ext: -Billing Fax: +1.2083895771 -Billing Fax Ext: -Billing Email: ccopsbilling@markmonitor.com Name Server: NS1.GOOGLE.COM Name Server: NS2.GOOGLE.COM DNSSEC: unsigned ->>> Last update of WHOIS database: 2016-02-19T15:43:18Z <<< +URL of the ICANN Whois Inaccuracy Complaint Form: https://www.icann.org/wicf/ +>>> Last update of WHOIS database: 2021-11-09T21:35:44Z <<< -"For more information on Whois status codes, please visit https://icann.org/epp" +For more information on Whois status codes, please visit https://icann.org/epp Access to AFILIAS WHOIS information is provided to assist persons in determining the contents of a domain name registration record in the Afilias registry database. The data in this record is provided by Afilias Limited for informational purposes only, and Afilias 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. Afilias reserves the right to modify these terms at any time. By submitting this query, you agree to abide by this policy. + +The Registrar of Record identified in this output may have an RDDS service that can be queried for additional information on how to contact the Registrant, Admin, or Tech contact of the queried domain name. diff --git a/spec/fixtures/responses/whois.afilias.net/pro/status_reserved.txt b/spec/fixtures/responses/whois.afilias.net/pro/status_reserved.txt index f5a90ff3..329aafa4 100644 --- a/spec/fixtures/responses/whois.afilias.net/pro/status_reserved.txt +++ b/spec/fixtures/responses/whois.afilias.net/pro/status_reserved.txt @@ -1,4 +1,6 @@ -Reserved by Registry ->>> Last update of WHOIS database: 2016-02-21T09:40:08Z <<< +Reserved by the registry. +>>> Last update of WHOIS database: 2021-11-09T21:36:44Z <<< Access to AFILIAS WHOIS information is provided to assist persons in determining the contents of a domain name registration record in the Afilias registry database. The data in this record is provided by Afilias Limited for informational purposes only, and Afilias 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. Afilias reserves the right to modify these terms at any time. By submitting this query, you agree to abide by this policy. + +The Registrar of Record identified in this output may have an RDDS service that can be queried for additional information on how to contact the Registrant, Admin, or Tech contact of the queried domain name. diff --git a/spec/fixtures/responses/whois.ascio.com/status_registered.expected b/spec/fixtures/responses/whois.ascio.com/status_registered.expected index 2b69f7d1..56ceb2ba 100644 --- a/spec/fixtures/responses/whois.ascio.com/status_registered.expected +++ b/spec/fixtures/responses/whois.ascio.com/status_registered.expected @@ -32,7 +32,6 @@ %s %CLASS{registrar} %s.id == "106" %s.name == "Ascio Technologies, Inc" - %s.organization == "Ascio Technologies, Inc" %s.url == "http://www.ascio.com" diff --git a/spec/fixtures/responses/whois.ati.tn/tn/status_registered.expected b/spec/fixtures/responses/whois.ati.tn/tn/status_registered.expected index 6a3fe768..bff95c53 100644 --- a/spec/fixtures/responses/whois.ati.tn/tn/status_registered.expected +++ b/spec/fixtures/responses/whois.ati.tn/tn/status_registered.expected @@ -34,7 +34,6 @@ %s %CLASS{registrar} %s.id == nil %s.name == "3S Global Net" - %s.organization == nil %s.url == nil #registrant_contacts diff --git a/spec/fixtures/responses/whois.audns.net.au/au/status_registered.expected b/spec/fixtures/responses/whois.audns.net.au/au/status_registered.expected index f5e03bba..77603cee 100644 --- a/spec/fixtures/responses/whois.audns.net.au/au/status_registered.expected +++ b/spec/fixtures/responses/whois.audns.net.au/au/status_registered.expected @@ -33,7 +33,6 @@ #registrar %s %CLASS{registrar} %s.name == "MarkMonitor Inc." - %s.organization == nil %s.url == nil #registrant_contacts diff --git a/spec/fixtures/responses/whois.cctld.by/by/status_registered.expected b/spec/fixtures/responses/whois.cctld.by/by/status_registered.expected index 4e6b544e..58d49724 100644 --- a/spec/fixtures/responses/whois.cctld.by/by/status_registered.expected +++ b/spec/fixtures/responses/whois.cctld.by/by/status_registered.expected @@ -36,7 +36,6 @@ %s %CLASS{registrar} %s.id == "Active Technologies LLC" %s.name == "Active Technologies LLC" - %s.organization == "Active Technologies LLC" #registrant_contacts %s %ERROR{AttributeNotSupported} diff --git a/spec/fixtures/responses/whois.cdmon.com/com/status_registered.expected b/spec/fixtures/responses/whois.cdmon.com/com/status_registered.expected index ba7f9b6c..5b045878 100644 --- a/spec/fixtures/responses/whois.cdmon.com/com/status_registered.expected +++ b/spec/fixtures/responses/whois.cdmon.com/com/status_registered.expected @@ -25,7 +25,6 @@ %s %CLASS{registrar} %s.id == "1403" %s.name == "10DENCEHISPAHARD, S.L" - %s.organization == "10DENCEHISPAHARD, S.L" %s.url == "https://www.cdmon.com" #registrant_contacts diff --git a/spec/fixtures/responses/whois.centralnic.com/ae.org/status_registered.expected b/spec/fixtures/responses/whois.centralnic.com/ae.org/status_registered.expected index 4f0593fa..ba7af410 100644 --- a/spec/fixtures/responses/whois.centralnic.com/ae.org/status_registered.expected +++ b/spec/fixtures/responses/whois.centralnic.com/ae.org/status_registered.expected @@ -35,8 +35,7 @@ #registrar %s %CLASS{registrar} %s.id == "H65658" - %s.name == nil - %s.organization == "101Domain, Inc." + %s.name == "101Domain, Inc." %s.url == "http://www.101domain.com" #registrant_contacts diff --git a/spec/fixtures/responses/whois.centralnic.com/ar.com/status_registered.expected b/spec/fixtures/responses/whois.centralnic.com/ar.com/status_registered.expected index 6ab12b0b..746c77eb 100644 --- a/spec/fixtures/responses/whois.centralnic.com/ar.com/status_registered.expected +++ b/spec/fixtures/responses/whois.centralnic.com/ar.com/status_registered.expected @@ -35,8 +35,7 @@ #registrar %s %CLASS{registrar} %s.id == "H1323241" - %s.name == nil - %s.organization == "CentralNic Ltd" + %s.name == "CentralNic Ltd" %s.url == nil #registrant_contacts diff --git a/spec/fixtures/responses/whois.centralnic.com/br.com/status_registered.expected b/spec/fixtures/responses/whois.centralnic.com/br.com/status_registered.expected index 9ffff327..6aecd0be 100644 --- a/spec/fixtures/responses/whois.centralnic.com/br.com/status_registered.expected +++ b/spec/fixtures/responses/whois.centralnic.com/br.com/status_registered.expected @@ -35,8 +35,7 @@ #registrar %s %CLASS{registrar} %s.id == "H292913" - %s.name == nil - %s.organization == "Network Solutions LLC" + %s.name == "Network Solutions LLC" %s.url == "http://www.networksolutions.com/" #registrant_contacts diff --git a/spec/fixtures/responses/whois.centralnic.com/cn.com/status_registered.expected b/spec/fixtures/responses/whois.centralnic.com/cn.com/status_registered.expected index b990b82a..7063cea9 100644 --- a/spec/fixtures/responses/whois.centralnic.com/cn.com/status_registered.expected +++ b/spec/fixtures/responses/whois.centralnic.com/cn.com/status_registered.expected @@ -35,8 +35,7 @@ #registrar %s %CLASS{registrar} %s.id == "H67436" - %s.name == nil - %s.organization == "united-domains AG" + %s.name == "united-domains AG" %s.url == "http://www.united-domains.de" #registrant_contacts diff --git a/spec/fixtures/responses/whois.centralnic.com/de.com/status_registered.expected b/spec/fixtures/responses/whois.centralnic.com/de.com/status_registered.expected index be1da3ee..59a6d131 100644 --- a/spec/fixtures/responses/whois.centralnic.com/de.com/status_registered.expected +++ b/spec/fixtures/responses/whois.centralnic.com/de.com/status_registered.expected @@ -35,8 +35,7 @@ #registrar %s %CLASS{registrar} %s.id == "H67436" - %s.name == nil - %s.organization == "united-domains AG" + %s.name == "united-domains AG" %s.url == "http://www.united-domains.de" #registrant_contacts diff --git a/spec/fixtures/responses/whois.centralnic.com/eu.com/status_registered.expected b/spec/fixtures/responses/whois.centralnic.com/eu.com/status_registered.expected index ffa57182..a62ca329 100644 --- a/spec/fixtures/responses/whois.centralnic.com/eu.com/status_registered.expected +++ b/spec/fixtures/responses/whois.centralnic.com/eu.com/status_registered.expected @@ -35,8 +35,7 @@ #registrar %s %CLASS{registrar} %s.id == "H126914" - %s.name == nil - %s.organization == "iTransact Ltd" + %s.name == "iTransact Ltd" %s.url == "www.itransact.ltd.uk" #registrant_contacts diff --git a/spec/fixtures/responses/whois.centralnic.com/gb.com/status_registered.expected b/spec/fixtures/responses/whois.centralnic.com/gb.com/status_registered.expected index cbe5a9fd..ba5cf5c4 100644 --- a/spec/fixtures/responses/whois.centralnic.com/gb.com/status_registered.expected +++ b/spec/fixtures/responses/whois.centralnic.com/gb.com/status_registered.expected @@ -35,8 +35,7 @@ #registrar %s %CLASS{registrar} %s.id == "H386560" - %s.name == nil - %s.organization == "Wind Internethaus GMBH" + %s.name == "Wind Internethaus GMBH" %s.url == "www.windinternethaus.de" #registrant_contacts diff --git a/spec/fixtures/responses/whois.centralnic.com/gb.net/status_registered.expected b/spec/fixtures/responses/whois.centralnic.com/gb.net/status_registered.expected index c6971d8a..f53e88cd 100644 --- a/spec/fixtures/responses/whois.centralnic.com/gb.net/status_registered.expected +++ b/spec/fixtures/responses/whois.centralnic.com/gb.net/status_registered.expected @@ -35,8 +35,7 @@ #registrar %s %CLASS{registrar} %s.id == "H1167922" - %s.name == nil - %s.organization == "Gandi SAS" + %s.name == "Gandi SAS" %s.url == "http://www.gandi.net/" #registrant_contacts diff --git a/spec/fixtures/responses/whois.centralnic.com/hu.com/status_registered.expected b/spec/fixtures/responses/whois.centralnic.com/hu.com/status_registered.expected index 9fb04d65..b03995cb 100644 --- a/spec/fixtures/responses/whois.centralnic.com/hu.com/status_registered.expected +++ b/spec/fixtures/responses/whois.centralnic.com/hu.com/status_registered.expected @@ -35,8 +35,7 @@ #registrar %s %CLASS{registrar} %s.id == "H65658" - %s.name == nil - %s.organization == "101Domain, Inc." + %s.name == "101Domain, Inc." %s.url == "http://www.101domain.com" #registrant_contacts diff --git a/spec/fixtures/responses/whois.centralnic.com/jp.net/status_registered.expected b/spec/fixtures/responses/whois.centralnic.com/jp.net/status_registered.expected index b74b2cbd..bae999a9 100644 --- a/spec/fixtures/responses/whois.centralnic.com/jp.net/status_registered.expected +++ b/spec/fixtures/responses/whois.centralnic.com/jp.net/status_registered.expected @@ -34,8 +34,7 @@ #registrar %s %CLASS{registrar} %s.id == "H1605993" - %s.name == nil - %s.organization == "GMO" + %s.name == "GMO" %s.url == "http://www.onamae.com" #registrant_contacts diff --git a/spec/fixtures/responses/whois.centralnic.com/jpn.com/status_registered.expected b/spec/fixtures/responses/whois.centralnic.com/jpn.com/status_registered.expected index 66c17bab..a63313a7 100644 --- a/spec/fixtures/responses/whois.centralnic.com/jpn.com/status_registered.expected +++ b/spec/fixtures/responses/whois.centralnic.com/jpn.com/status_registered.expected @@ -35,8 +35,7 @@ #registrar %s %CLASS{registrar} %s.id == "I6467" - %s.name == nil - %s.organization == "Webfusion" + %s.name == "Webfusion" %s.url == "http://www.123-reg.co.uk/domain-names/" #registrant_contacts diff --git a/spec/fixtures/responses/whois.centralnic.com/kr.com/status_registered.expected b/spec/fixtures/responses/whois.centralnic.com/kr.com/status_registered.expected index bfc2182f..c8fa879d 100644 --- a/spec/fixtures/responses/whois.centralnic.com/kr.com/status_registered.expected +++ b/spec/fixtures/responses/whois.centralnic.com/kr.com/status_registered.expected @@ -35,8 +35,7 @@ #registrar %s %CLASS{registrar} %s.id == "H292913" - %s.name == nil - %s.organization == "Network Solutions LLC" + %s.name == "Network Solutions LLC" %s.url == "http://www.networksolutions.com/" #registrant_contacts diff --git a/spec/fixtures/responses/whois.centralnic.com/qc.com/status_registered.expected b/spec/fixtures/responses/whois.centralnic.com/qc.com/status_registered.expected index 954a7c91..2e587987 100644 --- a/spec/fixtures/responses/whois.centralnic.com/qc.com/status_registered.expected +++ b/spec/fixtures/responses/whois.centralnic.com/qc.com/status_registered.expected @@ -35,8 +35,7 @@ #registrar %s %CLASS{registrar} %s.id == "7065-EN" - %s.name == nil - %s.organization == "eNom, Inc." + %s.name == "eNom, Inc." %s.url == "http://www.enom.com/" #registrant_contacts diff --git a/spec/fixtures/responses/whois.centralnic.com/sa.com/status_registered.expected b/spec/fixtures/responses/whois.centralnic.com/sa.com/status_registered.expected index af495cab..e23ef910 100644 --- a/spec/fixtures/responses/whois.centralnic.com/sa.com/status_registered.expected +++ b/spec/fixtures/responses/whois.centralnic.com/sa.com/status_registered.expected @@ -35,8 +35,7 @@ #registrar %s %CLASS{registrar} %s.id == "C30342" - %s.name == nil - %s.organization == "Paragon Internet Group" + %s.name == "Paragon Internet Group" %s.url == "http://www.paragon.net.uk" #registrant_contacts diff --git a/spec/fixtures/responses/whois.centralnic.com/se.com/status_registered.expected b/spec/fixtures/responses/whois.centralnic.com/se.com/status_registered.expected index fe401d13..a87d0bf8 100644 --- a/spec/fixtures/responses/whois.centralnic.com/se.com/status_registered.expected +++ b/spec/fixtures/responses/whois.centralnic.com/se.com/status_registered.expected @@ -35,8 +35,7 @@ #registrar %s %CLASS{registrar} %s.id == "7145-IX" - %s.name == nil - %s.organization == "InternetX GmbH" + %s.name == "InternetX GmbH" %s.url == "http://www.internetx.de/" #registrant_contacts diff --git a/spec/fixtures/responses/whois.centralnic.com/se.net/status_registered.expected b/spec/fixtures/responses/whois.centralnic.com/se.net/status_registered.expected index bcdd13b9..dda1e6ba 100644 --- a/spec/fixtures/responses/whois.centralnic.com/se.net/status_registered.expected +++ b/spec/fixtures/responses/whois.centralnic.com/se.net/status_registered.expected @@ -35,8 +35,7 @@ #registrar %s %CLASS{registrar} %s.id == "H2307235" - %s.name == nil - %s.organization == "Soluciones Corporativas IP, S.L.U." + %s.name == "Soluciones Corporativas IP, S.L.U." %s.url == "www.scip.es" #registrant_contacts diff --git a/spec/fixtures/responses/whois.centralnic.com/uk.com/status_registered.expected b/spec/fixtures/responses/whois.centralnic.com/uk.com/status_registered.expected index a8f0dbe6..dc4626ab 100644 --- a/spec/fixtures/responses/whois.centralnic.com/uk.com/status_registered.expected +++ b/spec/fixtures/responses/whois.centralnic.com/uk.com/status_registered.expected @@ -35,8 +35,7 @@ #registrar %s %CLASS{registrar} %s.id == "H78362" - %s.name == nil - %s.organization == "E-VELOCITY LTD" + %s.name == "E-VELOCITY LTD" %s.url == "http://www.e-velocity.co.uk/" #registrant_contacts diff --git a/spec/fixtures/responses/whois.centralnic.com/uk.net/status_registered.expected b/spec/fixtures/responses/whois.centralnic.com/uk.net/status_registered.expected index 27ab1ad1..577d670c 100644 --- a/spec/fixtures/responses/whois.centralnic.com/uk.net/status_registered.expected +++ b/spec/fixtures/responses/whois.centralnic.com/uk.net/status_registered.expected @@ -35,8 +35,7 @@ #registrar %s %CLASS{registrar} %s.id == "I6467" - %s.name == nil - %s.organization == "Webfusion" + %s.name == "Webfusion" %s.url == "http://www.123-reg.co.uk/domain-names/" #registrant_contacts diff --git a/spec/fixtures/responses/whois.centralnic.com/uy.com/status_registered.expected b/spec/fixtures/responses/whois.centralnic.com/uy.com/status_registered.expected index 4f827c3d..afa3ac84 100644 --- a/spec/fixtures/responses/whois.centralnic.com/uy.com/status_registered.expected +++ b/spec/fixtures/responses/whois.centralnic.com/uy.com/status_registered.expected @@ -35,8 +35,7 @@ #registrar %s %CLASS{registrar} %s.id == "I6467" - %s.name == nil - %s.organization == "Webfusion" + %s.name == "Webfusion" %s.url == "http://www.123-reg.co.uk/domain-names/" #registrant_contacts diff --git a/spec/fixtures/responses/whois.centralnic.com/za.com/status_registered.expected b/spec/fixtures/responses/whois.centralnic.com/za.com/status_registered.expected index 58d2f287..6736fa4a 100644 --- a/spec/fixtures/responses/whois.centralnic.com/za.com/status_registered.expected +++ b/spec/fixtures/responses/whois.centralnic.com/za.com/status_registered.expected @@ -35,8 +35,7 @@ #registrar %s %CLASS{registrar} %s.id == "C12112" - %s.name == nil - %s.organization == "Megaweb Internet Services" + %s.name == "Megaweb Internet Services" %s.url == "http://www.megaweb.co.za/" #registrant_contacts diff --git a/spec/fixtures/responses/whois.cira.ca/ca/status_registered.expected b/spec/fixtures/responses/whois.cira.ca/ca/status_registered.expected index 52309b6e..ac4ab60e 100644 --- a/spec/fixtures/responses/whois.cira.ca/ca/status_registered.expected +++ b/spec/fixtures/responses/whois.cira.ca/ca/status_registered.expected @@ -36,7 +36,6 @@ %s %CLASS{registrar} %s.id == "5000040" %s.name == "MarkMonitor International Canada Ltd." - %s.organization == "MarkMonitor International Canada Ltd." %s.url == nil #registrant_contacts diff --git a/spec/fixtures/responses/whois.cmc.iq/iq/status_registered.expected b/spec/fixtures/responses/whois.cmc.iq/iq/status_registered.expected index 9208196f..39ada13e 100644 --- a/spec/fixtures/responses/whois.cmc.iq/iq/status_registered.expected +++ b/spec/fixtures/responses/whois.cmc.iq/iq/status_registered.expected @@ -32,7 +32,6 @@ %s %CLASS{registrar} %s.id == nil %s.name == "CMC Registrar" - %s.organization == nil %s.url == nil diff --git a/spec/fixtures/responses/whois.cnnic.cn/cn/status_registered.expected b/spec/fixtures/responses/whois.cnnic.cn/cn/status_registered.expected index 55875d06..d7542821 100644 --- a/spec/fixtures/responses/whois.cnnic.cn/cn/status_registered.expected +++ b/spec/fixtures/responses/whois.cnnic.cn/cn/status_registered.expected @@ -35,7 +35,6 @@ %s %CLASS{registrar} %s.id == "MarkMonitor Inc." %s.name == "MarkMonitor Inc." - %s.organization == nil #registrant_contacts %s %CLASS{array} diff --git a/spec/fixtures/responses/whois.corporatedomains.com/status_registered.expected b/spec/fixtures/responses/whois.corporatedomains.com/status_registered.expected index 9983b7e7..421ab16b 100644 --- a/spec/fixtures/responses/whois.corporatedomains.com/status_registered.expected +++ b/spec/fixtures/responses/whois.corporatedomains.com/status_registered.expected @@ -18,7 +18,7 @@ #created_on %s %CLASS{time} %s %TIME{1992-11-24 00:00:00 -0500} - + #updated_on %s %CLASS{time} @@ -33,7 +33,6 @@ %s %CLASS{registrar} %s.id == "299" %s.name == "CORPORATE DOMAINS, INC." - %s.organization == "CORPORATE DOMAINS, INC." %s.url == "www.cscprotectsbrands.com" diff --git a/spec/fixtures/responses/whois.denic.de/de/status_registered.expected b/spec/fixtures/responses/whois.denic.de/de/status_registered.expected index a9efa8a2..a7e91c88 100644 --- a/spec/fixtures/responses/whois.denic.de/de/status_registered.expected +++ b/spec/fixtures/responses/whois.denic.de/de/status_registered.expected @@ -34,7 +34,6 @@ %s %CLASS{registrar} %s.id == nil %s.name == "Domain Admin" - %s.organization == "MarkMonitor Inc" %s.url == nil #registrant_contacts diff --git a/spec/fixtures/responses/whois.dns.pl/pl/status_registered.expected b/spec/fixtures/responses/whois.dns.pl/pl/status_registered.expected index d8473f29..6586c200 100644 --- a/spec/fixtures/responses/whois.dns.pl/pl/status_registered.expected +++ b/spec/fixtures/responses/whois.dns.pl/pl/status_registered.expected @@ -32,7 +32,6 @@ %s %CLASS{registrar} %s.id == nil %s.name == "Markmonitor, Inc." - %s.organization == nil %s.url == nil #registrant_contacts diff --git a/spec/fixtures/responses/whois.donuts.co/bike/status_registered.expected b/spec/fixtures/responses/whois.donuts.co/bike/status_registered.expected index 5a83ba4c..33f87c16 100644 --- a/spec/fixtures/responses/whois.donuts.co/bike/status_registered.expected +++ b/spec/fixtures/responses/whois.donuts.co/bike/status_registered.expected @@ -32,7 +32,6 @@ %s %CLASS{registrar} %s.id == "146" %s.name == "GoDaddy.com, LLC" - %s.organization == "GoDaddy.com, LLC" %s.url == "http://www.godaddy.com/domains/search.aspx?ci=8990" diff --git a/spec/fixtures/responses/whois.dotmobiregistry.net/mobi/status_available.expected b/spec/fixtures/responses/whois.dotmobiregistry.net/mobi/status_available.expected index 2c3fe7a8..8f020a7a 100644 --- a/spec/fixtures/responses/whois.dotmobiregistry.net/mobi/status_available.expected +++ b/spec/fixtures/responses/whois.dotmobiregistry.net/mobi/status_available.expected @@ -1,5 +1,5 @@ #disclaimer - %s == nil + %s == "Access to AFILIAS WHOIS information is provided to assist persons in determining the contents of a domain name registration record in the Afilias registry database. The data in this record is provided by Afilias Limited for informational purposes only, and Afilias 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. Afilias reserves the right to modify these terms at any time. By submitting this query, you agree to abide by this policy. The Registrar of Record identified in this output may have an RDDS service that can be queried for additional information on how to contact the Registrant, Admin, or Tech contact of the queried domain name." #domain diff --git a/spec/fixtures/responses/whois.dotmobiregistry.net/mobi/status_available.txt b/spec/fixtures/responses/whois.dotmobiregistry.net/mobi/status_available.txt index 679aadb9..ad047fa2 100644 --- a/spec/fixtures/responses/whois.dotmobiregistry.net/mobi/status_available.txt +++ b/spec/fixtures/responses/whois.dotmobiregistry.net/mobi/status_available.txt @@ -1 +1,6 @@ NOT FOUND +>>> Last update of WHOIS database: 2021-11-09T16:13:26Z <<< + +Access to AFILIAS WHOIS information is provided to assist persons in determining the contents of a domain name registration record in the Afilias registry database. The data in this record is provided by Afilias Limited for informational purposes only, and Afilias 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. Afilias reserves the right to modify these terms at any time. By submitting this query, you agree to abide by this policy. + +The Registrar of Record identified in this output may have an RDDS service that can be queried for additional information on how to contact the Registrant, Admin, or Tech contact of the queried domain name. diff --git a/spec/fixtures/responses/whois.dotmobiregistry.net/mobi/status_registered.expected b/spec/fixtures/responses/whois.dotmobiregistry.net/mobi/status_registered.expected index b3559dc5..07114061 100644 --- a/spec/fixtures/responses/whois.dotmobiregistry.net/mobi/status_registered.expected +++ b/spec/fixtures/responses/whois.dotmobiregistry.net/mobi/status_registered.expected @@ -1,16 +1,15 @@ #disclaimer - %s == "mTLD WHOIS LEGAL STATEMENT AND TERMS & CONDITIONS: The WHOIS service offered by mTLD and the access to the records in the mTLD WHOIS database are provided for information purposes only. It allows persons to check whether a specific domain name is still available or not and to obtain information related to the registration records of existing domain names. mTLD cannot, under any circumstances, be held liable in case the stored information would prove to be wrong, incomplete, or not accurate in any sense. By submitting a query you agree not to use the information made available to: allow, enable or otherwise support the transmission of unsolicited, commercial advertising or other solicitations whether via email or otherwise; target advertising in any possible way; or to cause nuisance in any possible way to the registrants by sending (whether by automated, electronic processes capable of enabling high volumes or other possible means) messages to them. Without prejudice to the above, it is explicitly forbidden to extract, copy and/or use or re-utilise in any form and by any means (electronically or not) the whole or a quantitatively or qualitatively substantial part of the contents of the WHOIS database without prior and explicit permission by mTLD, nor in any attempt hereof, or to apply automated, electronic processes to mTLD (or its systems). You agree that any reproduction and/or transmission of data for commercial purposes will always be considered as the extraction of a substantial part of the content of the WHOIS database. By submitting the query you agree to abide by this policy and accept that mTLD can take measures to limit the use of its WHOIS services in order to protect the privacy of its registrants or the integrity of the database." - + %s == "Access to AFILIAS WHOIS information is provided to assist persons in determining the contents of a domain name registration record in the Afilias registry database. The data in this record is provided by Afilias Limited for informational purposes only, and Afilias 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. Afilias reserves the right to modify these terms at any time. By submitting this query, you agree to abide by this policy. The Registrar of Record identified in this output may have an RDDS service that can be queried for additional information on how to contact the Registrant, Admin, or Tech contact of the queried domain name." #domain %s == "google.mobi" #domain_id - %s == "D117-MOBI" + %s == "D102500000000000117-LRMS" #status - %s == ["CLIENT DELETE PROHIBITED", "CLIENT TRANSFER PROHIBITED", "CLIENT UPDATE PROHIBITED"] + %s == ["clientDeleteProhibited https://icann.org/epp#clientDeleteProhibited", "clientTransferProhibited https://icann.org/epp#clientTransferProhibited", "clientUpdateProhibited https://icann.org/epp#clientUpdateProhibited"] #available? %s == false @@ -25,70 +24,43 @@ #updated_on %s %CLASS{time} - %s %TIME{2013-04-09 09:24:02 UTC} + %s %TIME{2021-04-09 09:29:29 UTC} #expires_on %s %CLASS{time} - %s %TIME{2014-05-11 21:08:42 UTC} + %s %TIME{2022-05-11 21:08:42 UTC} #registrar %s %CLASS{registrar} %s.id == "292" %s.name == "MarkMonitor Inc." - %s.organization == nil - %s.url == nil + %s.url == "http://www.markmonitor.com" #registrant_contacts %s %CLASS{array} %s %SIZE{1} %s[0] %CLASS{contact} %s[0].type == Whois::Parser::Contact::TYPE_REGISTRANT - %s[0].id == "mmr-14290820" - %s[0].name == "DNS Admin" - %s[0].organization == "Google Inc." - %s[0].address == "1600 Amphitheatre Parkway" - %s[0].city == "Mountain View" - %s[0].zip == "94043" + %s[0].id == nil + %s[0].name == nil + %s[0].organization == "Google LLC" + %s[0].address == nil + %s[0].city == nil + %s[0].zip == nil %s[0].state == "CA" %s[0].country_code == "US" - %s[0].phone == "+1.6506234000" - %s[0].fax == "+1.6506188571" - %s[0].email == "dns-admin@google.com" + %s[0].phone == nil + %s[0].fax == nil + %s[0].email == nil #admin_contacts %s %CLASS{array} - %s %SIZE{1} - %s[0] %CLASS{contact} - %s[0].type == Whois::Parser::Contact::TYPE_ADMINISTRATIVE - %s[0].id == "mmr-14290820" - %s[0].name == "DNS Admin" - %s[0].organization == "Google Inc." - %s[0].address == "1600 Amphitheatre Parkway" - %s[0].city == "Mountain View" - %s[0].zip == "94043" - %s[0].state == "CA" - %s[0].country_code == "US" - %s[0].phone == "+1.6506234000" - %s[0].fax == "+1.6506188571" - %s[0].email == "dns-admin@google.com" + %s %SIZE{0} #technical_contacts %s %CLASS{array} - %s %SIZE{1} - %s[0] %CLASS{contact} - %s[0].type == Whois::Parser::Contact::TYPE_TECHNICAL - %s[0].id == "mmr-14290820" - %s[0].name == "DNS Admin" - %s[0].organization == "Google Inc." - %s[0].address == "1600 Amphitheatre Parkway" - %s[0].city == "Mountain View" - %s[0].zip == "94043" - %s[0].state == "CA" - %s[0].country_code == "US" - %s[0].phone == "+1.6506234000" - %s[0].fax == "+1.6506188571" - %s[0].email == "dns-admin@google.com" + %s %SIZE{0} #nameservers diff --git a/spec/fixtures/responses/whois.dotmobiregistry.net/mobi/status_registered.txt b/spec/fixtures/responses/whois.dotmobiregistry.net/mobi/status_registered.txt index b8588b63..fde9ffb0 100644 --- a/spec/fixtures/responses/whois.dotmobiregistry.net/mobi/status_registered.txt +++ b/spec/fixtures/responses/whois.dotmobiregistry.net/mobi/status_registered.txt @@ -1,81 +1,32 @@ -mTLD WHOIS LEGAL STATEMENT AND TERMS & CONDITIONS: The WHOIS service offered -by mTLD and the access to the records in the mTLD WHOIS database are provided -for information purposes only. It allows persons to check whether a specific -domain name is still available or not and to obtain information related to -the registration records of existing domain names. mTLD cannot, under any -circumstances, be held liable in case the stored information would prove to -be wrong, incomplete, or not accurate in any sense. By submitting a query -you agree not to use the information made available to: allow, enable or -otherwise support the transmission of unsolicited, commercial advertising or -other solicitations whether via email or otherwise; target advertising in any -possible way; or to cause nuisance in any possible way to the registrants by -sending (whether by automated, electronic processes capable of enabling high -volumes or other possible means) messages to them. Without prejudice to the -above, it is explicitly forbidden to extract, copy and/or use or re-utilise -in any form and by any means (electronically or not) the whole or a -quantitatively or qualitatively substantial part of the contents of the WHOIS -database without prior and explicit permission by mTLD, nor in any attempt -hereof, or to apply automated, electronic processes to mTLD (or its systems). -You agree that any reproduction and/or transmission of data for commercial -purposes will always be considered as the extraction of a substantial part of -the content of the WHOIS database. By submitting the query you agree to abide -by this policy and accept that mTLD can take measures to limit the use of its -WHOIS services in order to protect the privacy of its registrants or the -integrity of the database. +Domain Name: GOOGLE.MOBI +Registry Domain ID: D102500000000000117-LRMS +Registrar WHOIS Server: whois.markmonitor.com +Registrar URL: http://www.markmonitor.com +Updated Date: 2021-04-09T09:29:29Z +Creation Date: 2006-05-11T21:08:42Z +Registry Expiry Date: 2022-05-11T21:08:42Z +Registrar Registration Expiration Date: +Registrar: MarkMonitor Inc. +Registrar IANA ID: 292 +Registrar Abuse Contact Email: abusecomplaints@markmonitor.com +Registrar Abuse Contact Phone: +1.2083895740 +Reseller: +Domain Status: clientDeleteProhibited https://icann.org/epp#clientDeleteProhibited +Domain Status: clientTransferProhibited https://icann.org/epp#clientTransferProhibited +Domain Status: clientUpdateProhibited https://icann.org/epp#clientUpdateProhibited +Registrant Organization: Google LLC +Registrant State/Province: CA +Registrant Country: US +Name Server: NS1.GOOGLE.COM +Name Server: NS2.GOOGLE.COM +Name Server: NS3.GOOGLE.COM +Name Server: NS4.GOOGLE.COM +DNSSEC: unsigned +URL of the ICANN Whois Inaccuracy Complaint Form: https://www.icann.org/wicf/ +>>> Last update of WHOIS database: 2021-11-09T16:13:10Z <<< -Domain ID:D117-MOBI -Domain Name:GOOGLE.MOBI -Created On:11-May-2006 21:08:42 UTC -Last Updated On:09-Apr-2013 09:24:02 UTC -Expiration Date:11-May-2014 21:08:42 UTC -Last Transferred Date:22-Sep-2006 10:24:54 UTC -Trademark Name:GOOGLE -Trademark Country:US -Trademark Number:2884502 -Date Trademark Applied For:1998-09-16 -Date Trademark Registered:2004-09-14 -Sponsoring Registrar:MarkMonitor Inc. (292) -Created by Registrar:mTLD Mobile Top Level Domain (4000002) -Last Updated by Registrar:MarkMonitor Inc. (292) -Status:CLIENT DELETE PROHIBITED -Status:CLIENT TRANSFER PROHIBITED -Status:CLIENT UPDATE PROHIBITED -Registrant ID:mmr-14290820 -Registrant Name:DNS Admin -Registrant Organization:Google Inc. -Registrant Street1:1600 Amphitheatre Parkway -Registrant City:Mountain View -Registrant State/Province:CA -Registrant Postal Code:94043 -Registrant Country:US -Registrant Phone:+1.6506234000 -Registrant FAX:+1.6506188571 -Registrant Email:dns-admin@google.com -Admin ID:mmr-14290820 -Admin Name:DNS Admin -Admin Organization:Google Inc. -Admin Street1:1600 Amphitheatre Parkway -Admin City:Mountain View -Admin State/Province:CA -Admin Postal Code:94043 -Admin Country:US -Admin Phone:+1.6506234000 -Admin FAX:+1.6506188571 -Admin Email:dns-admin@google.com -Tech ID:mmr-14290820 -Tech Name:DNS Admin -Tech Organization:Google Inc. -Tech Street1:1600 Amphitheatre Parkway -Tech City:Mountain View -Tech State/Province:CA -Tech Postal Code:94043 -Tech Country:US -Tech Phone:+1.6506234000 -Tech FAX:+1.6506188571 -Tech Email:dns-admin@google.com -Name Server:NS1.GOOGLE.COM -Name Server:NS2.GOOGLE.COM -Name Server:NS3.GOOGLE.COM -Name Server:NS4.GOOGLE.COM +For more information on Whois status codes, please visit https://icann.org/epp - +Access to AFILIAS WHOIS information is provided to assist persons in determining the contents of a domain name registration record in the Afilias registry database. The data in this record is provided by Afilias Limited for informational purposes only, and Afilias 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. Afilias reserves the right to modify these terms at any time. By submitting this query, you agree to abide by this policy. + +The Registrar of Record identified in this output may have an RDDS service that can be queried for additional information on how to contact the Registrant, Admin, or Tech contact of the queried domain name. diff --git a/spec/fixtures/responses/whois.dotpostregistry.net/post/status_available.expected b/spec/fixtures/responses/whois.dotpostregistry.net/post/status_available.expected index 2c3fe7a8..65f9ce91 100644 --- a/spec/fixtures/responses/whois.dotpostregistry.net/post/status_available.expected +++ b/spec/fixtures/responses/whois.dotpostregistry.net/post/status_available.expected @@ -1,5 +1,5 @@ #disclaimer - %s == nil + %s == "Access to WHOIS information is provided to assist persons in determining the contents of a domain name registration record in the registry database. The data in this record is provided by The Registry Operator for informational purposes only, and accuracy is not guaranteed. 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. Registry Operator reserves the right to modify these terms at any time. By submitting this query, you agree to abide by this policy. The Registrar of Record identified in this output may have an RDDS service that can be queried for additional information on how to contact the Registrant, Admin, or Tech contact of the queried domain name." #domain diff --git a/spec/fixtures/responses/whois.dotpostregistry.net/post/status_available.txt b/spec/fixtures/responses/whois.dotpostregistry.net/post/status_available.txt index 679aadb9..857c824c 100644 --- a/spec/fixtures/responses/whois.dotpostregistry.net/post/status_available.txt +++ b/spec/fixtures/responses/whois.dotpostregistry.net/post/status_available.txt @@ -1 +1,5 @@ NOT FOUND +>>> Last update of WHOIS database: 2021-11-09T16:19:47Z <<< + +Access to WHOIS information is provided to assist persons in determining the contents of a domain name registration record in the registry database. The data in this record is provided by The Registry Operator for informational purposes only, and accuracy is not guaranteed. 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. Registry Operator reserves the right to modify these terms at any time. By submitting this query, you agree to abide by this policy. +The Registrar of Record identified in this output may have an RDDS service that can be queried for additional information on how to contact the Registrant, Admin, or Tech contact of the queried domain name. diff --git a/spec/fixtures/responses/whois.dotpostregistry.net/post/status_registered.expected b/spec/fixtures/responses/whois.dotpostregistry.net/post/status_registered.expected index b97282f2..9cb45d9e 100644 --- a/spec/fixtures/responses/whois.dotpostregistry.net/post/status_registered.expected +++ b/spec/fixtures/responses/whois.dotpostregistry.net/post/status_registered.expected @@ -1,16 +1,16 @@ #disclaimer - %s == "Access to .POST REGISTRY WHOIS information is provided to assist persons in determining the contents of a domain name registration record in the .POST Registry registry database. The data in this record is provided by .POST Registry for informational purposes only, and .POST Registry 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. .POST Registry reserves the right to modify these terms at any time. By submitting this query, you agree to abide by this policy." + %s == "Access to WHOIS information is provided to assist persons in determining the contents of a domain name registration record in the registry database. The data in this record is provided by The Registry Operator for informational purposes only, and accuracy is not guaranteed. 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. Registry Operator reserves the right to modify these terms at any time. By submitting this query, you agree to abide by this policy. The Registrar of Record identified in this output may have an RDDS service that can be queried for additional information on how to contact the Registrant, Admin, or Tech contact of the queried domain name." #domain %s == "posteitaliane.post" #domain_id - %s == "D19482-POST" + %s == "D108700000000019482-AGRS" #status - %s == ["TRANSFER PROHIBITED"] + %s == ["ok https://icann.org/epp#ok"] #available? %s == false @@ -25,26 +25,25 @@ #updated_on %s %CLASS{time} - %s %TIME{2012-09-21 12:07:40 UTC} + %s %TIME{2021-09-21 22:31:15 UTC} #expires_on %s %CLASS{time} - %s %TIME{2014-09-21 12:03:07 UTC} + %s %TIME{2022-09-21 12:03:07 UTC} #registrar %s %CLASS{registrar} - %s.id == "R4947-POST" + %s.id == "9999" %s.name == "Universal Postal Union" - %s.organization == nil - %s.url == nil + %s.url == "" #registrant_contacts %s %CLASS{array} %s %SIZE{1} %s[0] %CLASS{contact} %s[0].type == Whois::Parser::Contact::TYPE_REGISTRANT - %s[0].id == "ITPI30001" + %s[0].id == "C19309314-AGRS" %s[0].name == "Poste Italiane" %s[0].organization == "Poste Italiane" %s[0].address == "Viale Europa 190" @@ -61,7 +60,7 @@ %s %SIZE{1} %s[0] %CLASS{contact} %s[0].type == Whois::Parser::Contact::TYPE_ADMINISTRATIVE - %s[0].id == "UPU_C1002" + %s[0].id == "C19309312-AGRS" %s[0].name == "Giovanni Brardinoni" %s[0].organization == "Poste Italiane" %s[0].address == "Viale Europa 175" @@ -78,7 +77,7 @@ %s %SIZE{1} %s[0] %CLASS{contact} %s[0].type == Whois::Parser::Contact::TYPE_TECHNICAL - %s[0].id == "UPU_C1001" + %s[0].id == "C19309311-AGRS" %s[0].name == "Andrea Speranza" %s[0].organization == "Poste Italiane" %s[0].address == "Viale Europa 175" diff --git a/spec/fixtures/responses/whois.dotpostregistry.net/post/status_registered.txt b/spec/fixtures/responses/whois.dotpostregistry.net/post/status_registered.txt index d697b4df..603fe2cb 100644 --- a/spec/fixtures/responses/whois.dotpostregistry.net/post/status_registered.txt +++ b/spec/fixtures/responses/whois.dotpostregistry.net/post/status_registered.txt @@ -1,106 +1,63 @@ -Access to .POST REGISTRY WHOIS information is provided to assist persons in -determining the contents of a domain name registration record in the -.POST Registry registry database. The data in this record is provided by -.POST Registry for informational purposes only, and .POST Registry 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. .POST Registry reserves -the right to modify these terms at any time. By submitting this query, -you agree to abide by this policy. - -Domain ID:D19482-POST -Domain Name:POSTEITALIANE.POST -Created On:21-Sep-2012 12:03:07 UTC -Last Updated On:21-Sep-2012 12:07:40 UTC -Expiration Date:21-Sep-2014 12:03:07 UTC -Sponsoring Registrar:Universal Postal Union (R4947-POST) -Status:TRANSFER PROHIBITED -Registrant ID:ITPI30001 -Registrant Name:Poste Italiane -Registrant Organization:Poste Italiane -Registrant Street1:Viale Europa 190 -Registrant Street2: -Registrant Street3: -Registrant City:Rome +Domain Name: POSTEITALIANE.POST +Registry Domain ID: D108700000000019482-AGRS +Registrar WHOIS Server: +Registrar URL: +Updated Date: 2021-09-21T22:31:15Z +Creation Date: 2012-09-21T12:03:07Z +Registry Expiry Date: 2022-09-21T12:03:07Z +Registrar Registration Expiration Date: +Registrar: Universal Postal Union +Registrar IANA ID: 9999 +Registrar Abuse Contact Email: +Registrar Abuse Contact Phone: +Reseller: +Domain Status: ok https://icann.org/epp#ok +Registry Registrant ID: C19309314-AGRS +Registrant Name: Poste Italiane +Registrant Organization: Poste Italiane +Registrant Street: Viale Europa 190 +Registrant City: Rome Registrant State/Province: -Registrant Postal Code:00144 -Registrant Country:IT -Registrant Phone:+39.0659581 -Registrant Phone Ext.: -Registrant FAX:+39.065942298 -Registrant FAX Ext.: -Registrant Email:info@poste.it -Admin ID:UPU_C1002 -Admin Name:Giovanni Brardinoni -Admin Organization:Poste Italiane -Admin Street1:Viale Europa 175 -Admin Street2: -Admin Street3: -Admin City:Rome +Registrant Postal Code: 00144 +Registrant Country: IT +Registrant Phone: +39.0659581 +Registrant Phone Ext: +Registrant Fax: +39.065942298 +Registrant Fax Ext: +Registrant Email: info@poste.it +Registry Admin ID: C19309312-AGRS +Admin Name: Giovanni Brardinoni +Admin Organization: Poste Italiane +Admin Street: Viale Europa 175 +Admin City: Rome Admin State/Province: -Admin Postal Code:00144 -Admin Country:IT -Admin Phone:+39.0659583671 -Admin Phone Ext.: -Admin FAX:+39.0698688651 -Admin FAX Ext.: -Admin Email:Giovanni.Brardinoni@Postecom.it -Billing ID:UPU_C1003 -Billing Name:Plautina Loreti -Billing Organization:Poste Italiane -Billing Street1:Viale Europa 175 -Billing Street2: -Billing Street3: -Billing City:Rome -Billing State/Province: -Billing Postal Code:00144 -Billing Country:IT -Billing Phone:+39.0659585699 -Billing Phone Ext.: -Billing FAX:+39.0659589591 -Billing FAX Ext.: -Billing Email:loretip@posteitaliane.it -Tech ID:UPU_C1001 -Tech Name:Andrea Speranza -Tech Organization:Poste Italiane -Tech Street1:Viale Europa 175 -Tech Street2: -Tech Street3: -Tech City:Rome +Admin Postal Code: 00144 +Admin Country: IT +Admin Phone: +39.0659583671 +Admin Phone Ext: +Admin Fax: +39.0698688651 +Admin Fax Ext: +Admin Email: Giovanni.Brardinoni@Postecom.it +Registry Tech ID: C19309311-AGRS +Tech Name: Andrea Speranza +Tech Organization: Poste Italiane +Tech Street: Viale Europa 175 +Tech City: Rome Tech State/Province: -Tech Postal Code:00144 -Tech Country:IT -Tech Phone:+39.0659583086 -Tech Phone Ext.: -Tech FAX:+39.0659582032 -Tech FAX Ext.: -Tech Email:netsecurity@postecom.it -Name Server:DNS.POSTE.IT -Name Server:DNS2.POSTE.IT -Name Server: -Name Server: -Name Server: -Name Server: -Name Server: -Name Server: -Name Server: -Name Server: -Name Server: -Name Server: -Name Server: -DNSSEC:Signed -DS Created 1:21-Sep-2012 12:04:45 UTC -DS Key Tag 1:43356 -Algorithm 1:7 -Digest Type 1:1 -Digest 1:DB013B5320B837FB3DF1F6A3ADCEA54910729ECB -DS Maximum Signature Life 1:3456000 seconds +Tech Postal Code: 00144 +Tech Country: IT +Tech Phone: +39.0659583086 +Tech Phone Ext: +Tech Fax: +39.0659582032 +Tech Fax Ext: +Tech Email: netsecurity@postecom.it +Name Server: DNS.POSTE.IT +Name Server: DNS2.POSTE.IT +DNSSEC: signedDelegation +URL of the ICANN Whois Inaccuracy Complaint Form: https://www.icann.org/wicf/ +>>> Last update of WHOIS database: 2021-11-09T16:19:33Z <<< + +For more information on Whois status codes, please visit https://icann.org/epp - +Access to WHOIS information is provided to assist persons in determining the contents of a domain name registration record in the registry database. The data in this record is provided by The Registry Operator for informational purposes only, and accuracy is not guaranteed. 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. Registry Operator reserves the right to modify these terms at any time. By submitting this query, you agree to abide by this policy. +The Registrar of Record identified in this output may have an RDDS service that can be queried for additional information on how to contact the Registrant, Admin, or Tech contact of the queried domain name. diff --git a/spec/fixtures/responses/whois.dreamhost.com/status_registered.expected b/spec/fixtures/responses/whois.dreamhost.com/status_registered.expected index 6e12d679..e6166643 100644 --- a/spec/fixtures/responses/whois.dreamhost.com/status_registered.expected +++ b/spec/fixtures/responses/whois.dreamhost.com/status_registered.expected @@ -25,7 +25,6 @@ %s %CLASS{registrar} %s.id == "431" %s.name == "DREAMHOST" - %s.organization == "DREAMHOST" %s.url == "www.dreamhost.com" #registrant_contacts diff --git a/spec/fixtures/responses/whois.enom.com/status_registered.expected b/spec/fixtures/responses/whois.enom.com/status_registered.expected index 35130ef3..38d358b9 100644 --- a/spec/fixtures/responses/whois.enom.com/status_registered.expected +++ b/spec/fixtures/responses/whois.enom.com/status_registered.expected @@ -30,7 +30,6 @@ %s %CLASS{registrar} %s.id == nil %s.name == "eNom, Inc." - %s.organization == "eNom, Inc." %s.url == nil diff --git a/spec/fixtures/responses/whois.eu/eu/status_registered.expected b/spec/fixtures/responses/whois.eu/eu/status_registered.expected index 53beed44..fe0e4558 100644 --- a/spec/fixtures/responses/whois.eu/eu/status_registered.expected +++ b/spec/fixtures/responses/whois.eu/eu/status_registered.expected @@ -29,7 +29,6 @@ %s %CLASS{registrar} %s.id == nil %s.name == "MarkMonitor Inc." - %s.organization == nil %s.url == "https://www.markmonitor.com/" diff --git a/spec/fixtures/responses/whois.gandi.net/status_registered.expected b/spec/fixtures/responses/whois.gandi.net/status_registered.expected index d6ab62fc..14934c85 100644 --- a/spec/fixtures/responses/whois.gandi.net/status_registered.expected +++ b/spec/fixtures/responses/whois.gandi.net/status_registered.expected @@ -32,7 +32,6 @@ %s %CLASS{registrar} %s.id == "81" %s.name == "GANDI SAS" - %s.organization == "GANDI SAS" %s.url == "http://www.gandi.net" #registrant_contacts diff --git a/spec/fixtures/responses/whois.godaddy.com/status_registered.expected b/spec/fixtures/responses/whois.godaddy.com/status_registered.expected index 495a11ae..092fe5fc 100644 --- a/spec/fixtures/responses/whois.godaddy.com/status_registered.expected +++ b/spec/fixtures/responses/whois.godaddy.com/status_registered.expected @@ -32,7 +32,6 @@ %s %CLASS{registrar} %s.id == "146" %s.name == "GoDaddy.com, LLC" - %s.organization == "GoDaddy.com, LLC" %s.url == "http://www.godaddy.com" diff --git a/spec/fixtures/responses/whois.inregistry.net/in/property_status_missing.expected b/spec/fixtures/responses/whois.inregistry.net/in/property_status_missing.expected deleted file mode 100644 index ace5213e..00000000 --- a/spec/fixtures/responses/whois.inregistry.net/in/property_status_missing.expected +++ /dev/null @@ -1,2 +0,0 @@ -#status - %s == [] diff --git a/spec/fixtures/responses/whois.inregistry.net/in/property_status_missing.txt b/spec/fixtures/responses/whois.inregistry.net/in/property_status_missing.txt deleted file mode 100644 index 679aadb9..00000000 --- a/spec/fixtures/responses/whois.inregistry.net/in/property_status_missing.txt +++ /dev/null @@ -1 +0,0 @@ -NOT FOUND diff --git a/spec/fixtures/responses/whois.inregistry.net/in/property_status_multiple.expected b/spec/fixtures/responses/whois.inregistry.net/in/property_status_multiple.expected deleted file mode 100644 index f43ba268..00000000 --- a/spec/fixtures/responses/whois.inregistry.net/in/property_status_multiple.expected +++ /dev/null @@ -1,2 +0,0 @@ -#status - %s == ["CLIENT DELETE PROHIBITED", "CLIENT RENEW PROHIBITED", "CLIENT TRANSFER PROHIBITED", "CLIENT UPDATE PROHIBITED"] diff --git a/spec/fixtures/responses/whois.inregistry.net/in/property_status_multiple.txt b/spec/fixtures/responses/whois.inregistry.net/in/property_status_multiple.txt deleted file mode 100644 index b83ce08d..00000000 --- a/spec/fixtures/responses/whois.inregistry.net/in/property_status_multiple.txt +++ /dev/null @@ -1,86 +0,0 @@ -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. - -Domain ID:D3271170-AFIN -Domain Name:VIDEOGRATIS.IN -Created On:27-Jan-2009 05:01:05 UTC -Last Updated On:01-Jul-2010 12:55:17 UTC -Expiration Date:27-Jan-2011 05:01:05 UTC -Sponsoring Registrar:GoDaddy.com Inc. (R101-AFIN) -Status:CLIENT DELETE PROHIBITED -Status:CLIENT RENEW PROHIBITED -Status:CLIENT TRANSFER PROHIBITED -Status:CLIENT UPDATE PROHIBITED -Registrant ID:CR51214064 -Registrant Name:claudio spada -Registrant Organization:sirismedia -Registrant Street1:foro buonaparte 69 -Registrant Street2: -Registrant Street3: -Registrant City:milano -Registrant State/Province:italy -Registrant Postal Code:20121 -Registrant Country:AX -Registrant Phone:+91.03902861317 -Registrant Phone Ext.: -Registrant FAX: -Registrant FAX Ext.: -Registrant Email:domini@siris.com -Admin ID:CR51214074 -Admin Name:claudio spada -Admin Organization:sirismedia -Admin Street1:foro buonaparte 69 -Admin Street2: -Admin Street3: -Admin City:milano -Admin State/Province:italy -Admin Postal Code:20121 -Admin Country:AX -Admin Phone:+91.03902861317 -Admin Phone Ext.: -Admin FAX: -Admin FAX Ext.: -Admin Email:domini@siris.com -Tech ID:CR51214069 -Tech Name:claudio spada -Tech Organization:sirismedia -Tech Street1:foro buonaparte 69 -Tech Street2: -Tech Street3: -Tech City:milano -Tech State/Province:italy -Tech Postal Code:20121 -Tech Country:AX -Tech Phone:+91.03902861317 -Tech Phone Ext.: -Tech FAX: -Tech FAX Ext.: -Tech Email:domini@siris.com -Name Server:NS1.SLICEHOST.NET -Name Server:NS2.SLICEHOST.NET -Name Server:NS3.SLICEHOST.NET -Name Server: -Name Server: -Name Server: -Name Server: -Name Server: -Name Server: -Name Server: -Name Server: -Name Server: -Name Server: - diff --git a/spec/fixtures/responses/whois.inregistry.net/in/property_status_ok.expected b/spec/fixtures/responses/whois.inregistry.net/in/property_status_ok.expected deleted file mode 100644 index 0075a8d4..00000000 --- a/spec/fixtures/responses/whois.inregistry.net/in/property_status_ok.expected +++ /dev/null @@ -1,2 +0,0 @@ -#status - %s == ["OK"] diff --git a/spec/fixtures/responses/whois.inregistry.net/in/property_status_ok.txt b/spec/fixtures/responses/whois.inregistry.net/in/property_status_ok.txt deleted file mode 100644 index b57a69f9..00000000 --- a/spec/fixtures/responses/whois.inregistry.net/in/property_status_ok.txt +++ /dev/null @@ -1,83 +0,0 @@ -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. - -Domain ID:D21089-AFIN -Domain Name:GOOGLE.IN -Created On:14-Feb-2005 20:35:14 UTC -Last Updated On:06-Apr-2009 18:20:09 UTC -Expiration Date:14-Feb-2011 20:35:14 UTC -Sponsoring Registrar:Mark Monitor (R84-AFIN) -Status:OK -Registrant ID:EPPIPM-143349 -Registrant Name:Admin DNS -Registrant Organization:GOOGLE INC. -Registrant Street1:1600 Amphitheatre Parkway -Registrant Street2: -Registrant Street3: -Registrant City:Mountain View, CA -Registrant State/Province: -Registrant Postal Code:94043 -Registrant Country:US -Registrant Phone:+1.6503300100 -Registrant Phone Ext.: -Registrant FAX: -Registrant FAX Ext.: -Registrant Email:dns-admin@google.com -Admin ID:EPPIPM-143349 -Admin Name:Admin DNS -Admin Organization:GOOGLE INC. -Admin Street1:1600 Amphitheatre Parkway -Admin Street2: -Admin Street3: -Admin City:Mountain View, CA -Admin State/Province: -Admin Postal Code:94043 -Admin Country:US -Admin Phone:+1.6503300100 -Admin Phone Ext.: -Admin FAX: -Admin FAX Ext.: -Admin Email:dns-admin@google.com -Tech ID:EPPIPM-143349 -Tech Name:Admin DNS -Tech Organization:GOOGLE INC. -Tech Street1:1600 Amphitheatre Parkway -Tech Street2: -Tech Street3: -Tech City:Mountain View, CA -Tech State/Province: -Tech Postal Code:94043 -Tech Country:US -Tech Phone:+1.6503300100 -Tech Phone Ext.: -Tech FAX: -Tech FAX Ext.: -Tech Email:dns-admin@google.com -Name Server:NS1.GOOGLE.COM -Name Server:NS2.GOOGLE.COM -Name Server:NS3.GOOGLE.COM -Name Server:NS4.GOOGLE.COM -Name Server: -Name Server: -Name Server: -Name Server: -Name Server: -Name Server: -Name Server: -Name Server: -Name Server: - diff --git a/spec/fixtures/responses/whois.inregistry.net/in/status_available.expected b/spec/fixtures/responses/whois.inregistry.net/in/status_available.expected index 2c3fe7a8..00f7eabe 100644 --- a/spec/fixtures/responses/whois.inregistry.net/in/status_available.expected +++ b/spec/fixtures/responses/whois.inregistry.net/in/status_available.expected @@ -1,5 +1,5 @@ #disclaimer - %s == nil + %s == "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 or a Registrar, or Neustar 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." #domain diff --git a/spec/fixtures/responses/whois.inregistry.net/in/status_available.txt b/spec/fixtures/responses/whois.inregistry.net/in/status_available.txt index 679aadb9..ed632418 100644 --- a/spec/fixtures/responses/whois.inregistry.net/in/status_available.txt +++ b/spec/fixtures/responses/whois.inregistry.net/in/status_available.txt @@ -1 +1,7 @@ -NOT FOUND +No Data Found +URL of the ICANN Whois Inaccuracy Complaint Form: https://www.icann.org/wicf/ +>>> Last update of WHOIS database: 2021-11-09T16:27:54Z <<< + +For more information on Whois status codes, please visit https://icann.org/epp + +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 or a Registrar, or Neustar 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. diff --git a/spec/fixtures/responses/whois.inregistry.net/in/status_registered.expected b/spec/fixtures/responses/whois.inregistry.net/in/status_registered.expected index da3d299e..dbe878fd 100644 --- a/spec/fixtures/responses/whois.inregistry.net/in/status_registered.expected +++ b/spec/fixtures/responses/whois.inregistry.net/in/status_registered.expected @@ -1,16 +1,16 @@ #disclaimer - %s == "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." + %s == "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 or a Registrar, or Neustar 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." #domain %s == "google.in" #domain_id - %s == "D21089-AFIN" + %s == "D21089-IN" #status - %s == ["CLIENT DELETE PROHIBITED", "CLIENT TRANSFER PROHIBITED", "CLIENT UPDATE PROHIBITED"] + %s == ["clientTransferProhibited http://www.icann.org/epp#clientTransferProhibited", "clientDeleteProhibited http://www.icann.org/epp#clientDeleteProhibited", "clientUpdateProhibited http://www.icann.org/epp#clientUpdateProhibited"] #available? %s == false @@ -23,76 +23,71 @@ %s %TIME{2005-02-14 20:35:14 UTC} #updated_on - %s %TIME{2015-01-13 10:22:36 UTC} + %s %TIME{2021-01-18 10:38:43 UTC} #expires_on - %s %TIME{2016-02-14 20:35:14 UTC} + %s %TIME{2022-02-14 20:35:14 UTC} #registrar %s %CLASS{registrar} - %s.id == "R84-AFIN" - %s.name == "Mark Monitor" + %s.id == "292" + %s.name == "MarkMonitor Inc." + %s.url == "http://www.markmonitor.com" #registrant_contacts %s %CLASS{array} %s %SIZE{1} %s[0] %CLASS{contact} %s[0].type == Whois::Parser::Contact::TYPE_REGISTRANT - %s[0].id == "mmr-108695" - %s[0].name == "Christina Chiou" - %s[0].organization == "Google Inc." - %s[0].address == "1600 Amphitheatre Parkway" - %s[0].city == "Mountain View" - %s[0].zip == "94043" + %s[0].id == "REDACTED FOR PRIVACY" + %s[0].name == "REDACTED FOR PRIVACY" + %s[0].organization == "Google LLC" + %s[0].address == "REDACTED FOR PRIVACY\nREDACTED FOR PRIVACY\nREDACTED FOR PRIVACY" + %s[0].city == "REDACTED FOR PRIVACY" + %s[0].zip == "REDACTED FOR PRIVACY" %s[0].state == "CA" %s[0].country == nil %s[0].country_code == "US" - %s[0].phone == "+1.6502530000" - %s[0].fax == "+1.6502530001" - %s[0].email == "dns-admin@google.com" - %s[0].created_on == nil - %s[0].updated_on == nil + %s[0].phone == "REDACTED FOR PRIVACY" + %s[0].fax == "REDACTED FOR PRIVACY" + %s[0].email == "Please contact the Registrar listed above" #admin_contacts %s %CLASS{array} %s %SIZE{1} %s[0] %CLASS{contact} %s[0].type == Whois::Parser::Contact::TYPE_ADMINISTRATIVE - %s[0].id == "mmr-108695" - %s[0].name == "Christina Chiou" - %s[0].organization == "Google Inc." - %s[0].address == "1600 Amphitheatre Parkway" - %s[0].city == "Mountain View" - %s[0].zip == "94043" - %s[0].state == "CA" + %s[0].id == "REDACTED FOR PRIVACY" + %s[0].name == "REDACTED FOR PRIVACY" + %s[0].organization == "REDACTED FOR PRIVACY" + %s[0].address == "REDACTED FOR PRIVACY\nREDACTED FOR PRIVACY\nREDACTED FOR PRIVACY" + %s[0].city == "REDACTED FOR PRIVACY" + %s[0].zip == "REDACTED FOR PRIVACY" + %s[0].state == "REDACTED FOR PRIVACY" %s[0].country == nil - %s[0].country_code == "US" - %s[0].phone == "+1.6502530000" - %s[0].fax == "+1.6502530001" - %s[0].email == "dns-admin@google.com" - %s[0].created_on == nil - %s[0].updated_on == nil + %s[0].country_code == "REDACTED FOR PRIVACY" + %s[0].phone == "REDACTED FOR PRIVACY" + %s[0].fax == "REDACTED FOR PRIVACY" + %s[0].email == "Please contact the Registrar listed above" #technical_contacts %s %CLASS{array} %s %SIZE{1} %s[0] %CLASS{contact} %s[0].type == Whois::Parser::Contact::TYPE_TECHNICAL - %s[0].id == "mmr-108695" - %s[0].name == "Christina Chiou" - %s[0].organization == "Google Inc." - %s[0].address == "1600 Amphitheatre Parkway" - %s[0].city == "Mountain View" - %s[0].zip == "94043" - %s[0].state == "CA" + %s[0].id == "REDACTED FOR PRIVACY" + %s[0].name == "REDACTED FOR PRIVACY" + %s[0].organization == "REDACTED FOR PRIVACY" + %s[0].address == "REDACTED FOR PRIVACY\nREDACTED FOR PRIVACY\nREDACTED FOR PRIVACY" + %s[0].city == "REDACTED FOR PRIVACY" + %s[0].zip == "REDACTED FOR PRIVACY" + %s[0].state == "REDACTED FOR PRIVACY" %s[0].country == nil - %s[0].country_code == "US" - %s[0].phone == "+1.6502530000" - %s[0].fax == "+1.6502530001" - %s[0].email == "dns-admin@google.com" - %s[0].created_on == nil - %s[0].updated_on == nil + %s[0].country_code == "REDACTED FOR PRIVACY" + %s[0].phone == "REDACTED FOR PRIVACY" + %s[0].fax == "REDACTED FOR PRIVACY" + %s[0].email == "Please contact the Registrar listed above" #nameservers @@ -100,10 +95,10 @@ %s %SIZE{4} %s[0] %CLASS{nameserver} %s[0] %CLASS{nameserver} - %s[0].name == "ns1.google.com" + %s[0].name == "ns4.google.com" %s[1] %CLASS{nameserver} %s[1].name == "ns2.google.com" %s[2] %CLASS{nameserver} - %s[2].name == "ns3.google.com" + %s[2].name == "ns1.google.com" %s[3] %CLASS{nameserver} - %s[3].name == "ns4.google.com" + %s[3].name == "ns3.google.com" diff --git a/spec/fixtures/responses/whois.inregistry.net/in/status_registered.txt b/spec/fixtures/responses/whois.inregistry.net/in/status_registered.txt index e171a879..e71c1765 100644 --- a/spec/fixtures/responses/whois.inregistry.net/in/status_registered.txt +++ b/spec/fixtures/responses/whois.inregistry.net/in/status_registered.txt @@ -1,70 +1,70 @@ -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. +Domain Name: google.in +Registry Domain ID: D21089-IN +Registrar WHOIS Server: +Registrar URL: http://www.markmonitor.com +Updated Date: 2021-01-18T10:38:43Z +Creation Date: 2005-02-14T20:35:14Z +Registry Expiry Date: 2022-02-14T20:35:14Z +Registrar: MarkMonitor Inc. +Registrar IANA ID: 292 +Registrar Abuse Contact Email: +Registrar Abuse Contact Phone: +Domain Status: clientTransferProhibited http://www.icann.org/epp#clientTransferProhibited +Domain Status: clientDeleteProhibited http://www.icann.org/epp#clientDeleteProhibited +Domain Status: clientUpdateProhibited http://www.icann.org/epp#clientUpdateProhibited +Registry Registrant ID: REDACTED FOR PRIVACY +Registrant Name: REDACTED FOR PRIVACY +Registrant Organization: Google LLC +Registrant Street: REDACTED FOR PRIVACY +Registrant Street: REDACTED FOR PRIVACY +Registrant Street: REDACTED FOR PRIVACY +Registrant City: REDACTED FOR PRIVACY +Registrant State/Province: CA +Registrant Postal Code: REDACTED FOR PRIVACY +Registrant Country: US +Registrant Phone: REDACTED FOR PRIVACY +Registrant Phone Ext: REDACTED FOR PRIVACY +Registrant Fax: REDACTED FOR PRIVACY +Registrant Fax Ext: REDACTED FOR PRIVACY +Registrant Email: Please contact the Registrar listed above +Registry Admin ID: REDACTED FOR PRIVACY +Admin Name: REDACTED FOR PRIVACY +Admin Organization: REDACTED FOR PRIVACY +Admin Street: REDACTED FOR PRIVACY +Admin Street: REDACTED FOR PRIVACY +Admin Street: REDACTED FOR PRIVACY +Admin City: REDACTED FOR PRIVACY +Admin State/Province: REDACTED FOR PRIVACY +Admin Postal Code: REDACTED FOR PRIVACY +Admin Country: REDACTED FOR PRIVACY +Admin Phone: REDACTED FOR PRIVACY +Admin Phone Ext: REDACTED FOR PRIVACY +Admin Fax: REDACTED FOR PRIVACY +Admin Fax Ext: REDACTED FOR PRIVACY +Admin Email: Please contact the Registrar listed above +Registry Tech ID: REDACTED FOR PRIVACY +Tech Name: REDACTED FOR PRIVACY +Tech Organization: REDACTED FOR PRIVACY +Tech Street: REDACTED FOR PRIVACY +Tech Street: REDACTED FOR PRIVACY +Tech Street: REDACTED FOR PRIVACY +Tech City: REDACTED FOR PRIVACY +Tech State/Province: REDACTED FOR PRIVACY +Tech Postal Code: REDACTED FOR PRIVACY +Tech Country: REDACTED FOR PRIVACY +Tech Phone: REDACTED FOR PRIVACY +Tech Phone Ext: REDACTED FOR PRIVACY +Tech Fax: REDACTED FOR PRIVACY +Tech Fax Ext: REDACTED FOR PRIVACY +Tech Email: Please contact the Registrar listed above +Name Server: ns4.google.com +Name Server: ns2.google.com +Name Server: ns1.google.com +Name Server: ns3.google.com +DNSSEC: unsigned +URL of the ICANN Whois Inaccuracy Complaint Form: https://www.icann.org/wicf/ +>>> Last update of WHOIS database: 2021-11-09T16:27:43Z <<< -Domain ID:D21089-AFIN -Domain Name:GOOGLE.IN -Created On:14-Feb-2005 20:35:14 UTC -Last Updated On:13-Jan-2015 10:22:36 UTC -Expiration Date:14-Feb-2016 20:35:14 UTC -Sponsoring Registrar:Mark Monitor (R84-AFIN) -Status:CLIENT DELETE PROHIBITED -Status:CLIENT TRANSFER PROHIBITED -Status:CLIENT UPDATE PROHIBITED -Registrant ID:mmr-108695 -Registrant Name:Christina Chiou -Registrant Organization:Google Inc. -Registrant Street1:1600 Amphitheatre Parkway -Registrant Street2: -Registrant Street3: -Registrant City:Mountain View -Registrant State/Province:CA -Registrant Postal Code:94043 -Registrant Country:US -Registrant Phone:+1.6502530000 -Registrant Phone Ext.: -Registrant FAX:+1.6502530001 -Registrant FAX Ext.: -Registrant Email:dns-admin@google.com -Admin ID:mmr-108695 -Admin Name:Christina Chiou -Admin Organization:Google Inc. -Admin Street1:1600 Amphitheatre Parkway -Admin Street2: -Admin Street3: -Admin City:Mountain View -Admin State/Province:CA -Admin Postal Code:94043 -Admin Country:US -Admin Phone:+1.6502530000 -Admin Phone Ext.: -Admin FAX:+1.6502530001 -Admin FAX Ext.: -Admin Email:dns-admin@google.com -Tech ID:mmr-108695 -Tech Name:Christina Chiou -Tech Organization:Google Inc. -Tech Street1:1600 Amphitheatre Parkway -Tech Street2: -Tech Street3: -Tech City:Mountain View -Tech State/Province:CA -Tech Postal Code:94043 -Tech Country:US -Tech Phone:+1.6502530000 -Tech Phone Ext.: -Tech FAX:+1.6502530001 -Tech FAX Ext.: -Tech Email:dns-admin@google.com -Name Server:NS1.GOOGLE.COM -Name Server:NS2.GOOGLE.COM -Name Server:NS3.GOOGLE.COM -Name Server:NS4.GOOGLE.COM -Name Server: -Name Server: -Name Server: -Name Server: -Name Server: -Name Server: -Name Server: -Name Server: -Name Server: -DNSSEC:Unsigned +For more information on Whois status codes, please visit https://icann.org/epp + +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 or a Registrar, or Neustar 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. diff --git a/spec/fixtures/responses/whois.markmonitor.com/status_registered.expected b/spec/fixtures/responses/whois.markmonitor.com/status_registered.expected index 5ec8aa59..16e64bcd 100644 --- a/spec/fixtures/responses/whois.markmonitor.com/status_registered.expected +++ b/spec/fixtures/responses/whois.markmonitor.com/status_registered.expected @@ -32,7 +32,6 @@ %s %CLASS{registrar} %s.id == "292" %s.name == "MarkMonitor, Inc." - %s.organization == "MarkMonitor, Inc." %s.url == "http://www.markmonitor.com" diff --git a/spec/fixtures/responses/whois.monic.mo/mo/status_registered.expected b/spec/fixtures/responses/whois.monic.mo/mo/status_registered.expected index cf8346a7..8108ed81 100644 --- a/spec/fixtures/responses/whois.monic.mo/mo/status_registered.expected +++ b/spec/fixtures/responses/whois.monic.mo/mo/status_registered.expected @@ -33,7 +33,6 @@ %s %CLASS{registrar} %s.id == nil %s.name == "MONIC" - %s.organization == nil %s.url == nil #registrant_contacts diff --git a/spec/fixtures/responses/whois.na-nic.com.na/na/status_registered.expected b/spec/fixtures/responses/whois.na-nic.com.na/na/status_registered.expected index d7d73311..3bf15741 100644 --- a/spec/fixtures/responses/whois.na-nic.com.na/na/status_registered.expected +++ b/spec/fixtures/responses/whois.na-nic.com.na/na/status_registered.expected @@ -32,7 +32,6 @@ %s %CLASS{registrar} %s.id == nil %s.name == "MarkMonitor" - %s.organization == nil %s.url == "http://www.markmonitor.com" diff --git a/spec/fixtures/responses/whois.netcom.cm/cm/status_registered.expected b/spec/fixtures/responses/whois.netcom.cm/cm/status_registered.expected index 6f1cd6f7..0e77e8de 100644 --- a/spec/fixtures/responses/whois.netcom.cm/cm/status_registered.expected +++ b/spec/fixtures/responses/whois.netcom.cm/cm/status_registered.expected @@ -32,7 +32,6 @@ %s %CLASS{registrar} %s.id == nil %s.name == "MarkMonitor Inc." - %s.organization == nil %s.url == nil diff --git a/spec/fixtures/responses/whois.netcom.cm/cm/status_suspended.expected b/spec/fixtures/responses/whois.netcom.cm/cm/status_suspended.expected index b3d4b163..8197ce4c 100644 --- a/spec/fixtures/responses/whois.netcom.cm/cm/status_suspended.expected +++ b/spec/fixtures/responses/whois.netcom.cm/cm/status_suspended.expected @@ -32,7 +32,6 @@ %s %CLASS{registrar} %s.id == nil %s.name == "Registrar ANTIC" - %s.organization == nil %s.url == nil diff --git a/spec/fixtures/responses/whois.networksolutions.com/status_registered.expected b/spec/fixtures/responses/whois.networksolutions.com/status_registered.expected index 22ff0e38..944caef1 100644 --- a/spec/fixtures/responses/whois.networksolutions.com/status_registered.expected +++ b/spec/fixtures/responses/whois.networksolutions.com/status_registered.expected @@ -32,7 +32,6 @@ %s %CLASS{registrar} %s.id == "2" %s.name == "NETWORK SOLUTIONS, LLC." - %s.organization == "NETWORK SOLUTIONS, LLC." %s.url == "http//www.networksolutions.com/en_US/" diff --git a/spec/fixtures/responses/whois.nic.ac/ac/status_registered.expected b/spec/fixtures/responses/whois.nic.ac/ac/status_registered.expected index 95bbf09d..84da2e75 100644 --- a/spec/fixtures/responses/whois.nic.ac/ac/status_registered.expected +++ b/spec/fixtures/responses/whois.nic.ac/ac/status_registered.expected @@ -36,7 +36,6 @@ %s %CLASS{registrar} %s.id == "292" %s.name == "MarkMonitor Inc." - %s.organization == "MarkMonitor Inc." %s.url == "http://www.markmonitor.com" #registrant_contacts diff --git a/spec/fixtures/responses/whois.nic.af/af/status_registered.expected b/spec/fixtures/responses/whois.nic.af/af/status_registered.expected index fe40b300..859dfde4 100644 --- a/spec/fixtures/responses/whois.nic.af/af/status_registered.expected +++ b/spec/fixtures/responses/whois.nic.af/af/status_registered.expected @@ -32,7 +32,6 @@ %s %CLASS{registrar} %s.id == nil %s.name == "MarkMonitor" - %s.organization == nil %s.url == "http://www.markmonitor.com" diff --git a/spec/fixtures/responses/whois.nic.ag/ag/status_available.expected b/spec/fixtures/responses/whois.nic.ag/ag/status_available.expected index 2c3fe7a8..65f9ce91 100644 --- a/spec/fixtures/responses/whois.nic.ag/ag/status_available.expected +++ b/spec/fixtures/responses/whois.nic.ag/ag/status_available.expected @@ -1,5 +1,5 @@ #disclaimer - %s == nil + %s == "Access to WHOIS information is provided to assist persons in determining the contents of a domain name registration record in the registry database. The data in this record is provided by The Registry Operator for informational purposes only, and accuracy is not guaranteed. 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. Registry Operator reserves the right to modify these terms at any time. By submitting this query, you agree to abide by this policy. The Registrar of Record identified in this output may have an RDDS service that can be queried for additional information on how to contact the Registrant, Admin, or Tech contact of the queried domain name." #domain diff --git a/spec/fixtures/responses/whois.nic.ag/ag/status_available.txt b/spec/fixtures/responses/whois.nic.ag/ag/status_available.txt index 679aadb9..41c21c47 100644 --- a/spec/fixtures/responses/whois.nic.ag/ag/status_available.txt +++ b/spec/fixtures/responses/whois.nic.ag/ag/status_available.txt @@ -1 +1,6 @@ NOT FOUND +>>> Last update of WHOIS database: 2021-11-09T15:59:46Z <<< + +Access to WHOIS information is provided to assist persons in determining the contents of a domain name registration record in the registry database. The data in this record is provided by The Registry Operator for informational purposes only, and accuracy is not guaranteed. 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. Registry Operator reserves the right to modify these terms at any time. By submitting this query, you agree to abide by this policy. +The Registrar of Record identified in this output may have an RDDS service that can be queried for additional information on how to contact the Registrant, Admin, or Tech contact of the queried domain name. + diff --git a/spec/fixtures/responses/whois.nic.ag/ag/status_registered.expected b/spec/fixtures/responses/whois.nic.ag/ag/status_registered.expected index 31fc9ac6..e7fa6f23 100644 --- a/spec/fixtures/responses/whois.nic.ag/ag/status_registered.expected +++ b/spec/fixtures/responses/whois.nic.ag/ag/status_registered.expected @@ -1,16 +1,16 @@ #disclaimer - %s == "Access to CCTLD WHOIS information is provided to assist persons in determining the contents of a domain name registration record in the Afilias registry database. The data in this record is provided by Afilias Limited for informational purposes only, and Afilias 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. Afilias reserves the right to modify these terms at any time. By submitting this query, you agree to abide by this policy." + %s == "Access to WHOIS information is provided to assist persons in determining the contents of a domain name registration record in the registry database. The data in this record is provided by The Registry Operator for informational purposes only, and accuracy is not guaranteed. 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. Registry Operator reserves the right to modify these terms at any time. By submitting this query, you agree to abide by this policy. The Registrar of Record identified in this output may have an RDDS service that can be queried for additional information on how to contact the Registrant, Admin, or Tech contact of the queried domain name." #domain %s == "google.ag" #domain_id - %s == "D48552-LRCC" + %s == "D105800000000048552-AGRS" #status - %s == ["CLIENT DELETE PROHIBITED", "CLIENT TRANSFER PROHIBITED", "CLIENT UPDATE PROHIBITED"] + %s == ["clientDeleteProhibited https://icann.org/epp#clientDeleteProhibited", "clientTransferProhibited https://icann.org/epp#clientTransferProhibited", "clientUpdateProhibited https://icann.org/epp#clientUpdateProhibited"] #available? %s == false @@ -25,70 +25,43 @@ #updated_on %s %CLASS{time} - %s %TIME{2013-12-04 10:20:49 UTC} + %s %TIME{2020-12-04 10:29:47 UTC} #expires_on %s %CLASS{time} - %s %TIME{2015-01-05 14:06:59 UTC} + %s %TIME{2022-01-05 14:06:59 UTC} #registrar %s %CLASS{registrar} - %s.id == "R22-LRCC" - %s.name == "MarkMonitor, Inc." - %s.organization == nil - %s.url == nil + %s.id == "292" + %s.name == "MarkMonitor Inc." + %s.url == "http://www.markmonitor.com" #registrant_contacts %s %CLASS{array} %s %SIZE{1} %s[0] %CLASS{contact} %s[0].type == Whois::Parser::Contact::TYPE_REGISTRANT - %s[0].id == "AGRS-129819" - %s[0].name == "DNS Admin" + %s[0].id == nil + %s[0].name == nil %s[0].organization == "Google Inc." - %s[0].address == "1600 Amphitheatre Parkway" - %s[0].city == "Mountain View" - %s[0].zip == "94043" + %s[0].address == nil + %s[0].city == nil + %s[0].zip == nil %s[0].state == "CA" %s[0].country_code == "US" - %s[0].phone == "+1.6502530000" - %s[0].fax == "+1.6506188571" - %s[0].email == "dns-admin@google.com" + %s[0].phone == nil + %s[0].fax == nil + %s[0].email == nil #admin_contacts %s %CLASS{array} - %s %SIZE{1} - %s[0] %CLASS{contact} - %s[0].type == Whois::Parser::Contact::TYPE_ADMINISTRATIVE - %s[0].id == "AGRS-129819" - %s[0].name == "DNS Admin" - %s[0].organization == "Google Inc." - %s[0].address == "1600 Amphitheatre Parkway" - %s[0].city == "Mountain View" - %s[0].zip == "94043" - %s[0].state == "CA" - %s[0].country_code == "US" - %s[0].phone == "+1.6502530000" - %s[0].fax == "+1.6506188571" - %s[0].email == "dns-admin@google.com" + %s %SIZE{0} #technical_contacts %s %CLASS{array} - %s %SIZE{1} - %s[0] %CLASS{contact} - %s[0].type == Whois::Parser::Contact::TYPE_TECHNICAL - %s[0].id == "AGRS-129819" - %s[0].name == "DNS Admin" - %s[0].organization == "Google Inc." - %s[0].address == "1600 Amphitheatre Parkway" - %s[0].city == "Mountain View" - %s[0].zip == "94043" - %s[0].state == "CA" - %s[0].country_code == "US" - %s[0].phone == "+1.6502530000" - %s[0].fax == "+1.6506188571" - %s[0].email == "dns-admin@google.com" + %s %SIZE{0} #nameservers @@ -99,6 +72,6 @@ %s[1] %CLASS{nameserver} %s[1].name == "ns2.google.com" %s[2] %CLASS{nameserver} - %s[2].name == "ns3.google.com" + %s[2].name == "ns4.google.com" %s[3] %CLASS{nameserver} - %s[3].name == "ns4.google.com" + %s[3].name == "ns3.google.com" diff --git a/spec/fixtures/responses/whois.nic.ag/ag/status_registered.txt b/spec/fixtures/responses/whois.nic.ag/ag/status_registered.txt index a3b4f900..73cd0881 100644 --- a/spec/fixtures/responses/whois.nic.ag/ag/status_registered.txt +++ b/spec/fixtures/responses/whois.nic.ag/ag/status_registered.txt @@ -1,100 +1,31 @@ -Access to CCTLD WHOIS information is provided to assist persons in -determining the contents of a domain name registration record in the -Afilias registry database. The data in this record is provided by -Afilias Limited for informational purposes only, and Afilias 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. Afilias reserves -the right to modify these terms at any time. By submitting this query, -you agree to abide by this policy. +Domain Name: GOOGLE.AG +Registry Domain ID: D105800000000048552-AGRS +Registrar WHOIS Server: +Registrar URL: http://www.markmonitor.com +Updated Date: 2020-12-04T10:29:47Z +Creation Date: 2003-01-05T14:06:59Z +Registry Expiry Date: 2022-01-05T14:06:59Z +Registrar Registration Expiration Date: +Registrar: MarkMonitor Inc. +Registrar IANA ID: 292 +Registrar Abuse Contact Email: abusecomplaints@markmonitor.com +Registrar Abuse Contact Phone: +1.2083895740 +Reseller: +Domain Status: clientDeleteProhibited https://icann.org/epp#clientDeleteProhibited +Domain Status: clientTransferProhibited https://icann.org/epp#clientTransferProhibited +Domain Status: clientUpdateProhibited https://icann.org/epp#clientUpdateProhibited +Registrant Organization: Google Inc. +Registrant State/Province: CA +Registrant Country: US +Name Server: NS1.GOOGLE.COM +Name Server: NS2.GOOGLE.COM +Name Server: NS4.GOOGLE.COM +Name Server: NS3.GOOGLE.COM +DNSSEC: unsigned -Domain ID:D48552-LRCC -Domain Name:GOOGLE.AG -Created On:05-Jan-2003 14:06:59 UTC -Last Updated On:04-Dec-2013 10:20:49 UTC -Expiration Date:05-Jan-2015 14:06:59 UTC -Sponsoring Registrar:MarkMonitor, Inc. (R22-LRCC) -Status:CLIENT DELETE PROHIBITED -Status:CLIENT TRANSFER PROHIBITED -Status:CLIENT UPDATE PROHIBITED -Registrant ID:AGRS-129819 -Registrant Name:DNS Admin -Registrant Organization:Google Inc. -Registrant Street1:1600 Amphitheatre Parkway -Registrant Street2: -Registrant Street3: -Registrant City:Mountain View -Registrant State/Province:CA -Registrant Postal Code:94043 -Registrant Country:US -Registrant Phone:+1.6502530000 -Registrant Phone Ext.: -Registrant FAX:+1.6506188571 -Registrant FAX Ext.: -Registrant Email:dns-admin@google.com -Admin ID:AGRS-129819 -Admin Name:DNS Admin -Admin Organization:Google Inc. -Admin Street1:1600 Amphitheatre Parkway -Admin Street2: -Admin Street3: -Admin City:Mountain View -Admin State/Province:CA -Admin Postal Code:94043 -Admin Country:US -Admin Phone:+1.6502530000 -Admin Phone Ext.: -Admin FAX:+1.6506188571 -Admin FAX Ext.: -Admin Email:dns-admin@google.com -Billing ID:AGRS-129293 -Billing Name:CCOPS -Billing Organization:MarkMonitor -Billing Street1:PMB 155 -Billing Street2:10400 Overland Rd. -Billing Street3: -Billing City:Boise -Billing State/Province:ID -Billing Postal Code:83709-1433 -Billing Country:US -Billing Phone:+1.20838957 -Billing Phone Ext.: -Billing FAX:+1.20838957 -Billing FAX Ext.: -Billing Email:ccops@markmonitor.com -Tech ID:AGRS-129819 -Tech Name:DNS Admin -Tech Organization:Google Inc. -Tech Street1:1600 Amphitheatre Parkway -Tech Street2: -Tech Street3: -Tech City:Mountain View -Tech State/Province:CA -Tech Postal Code:94043 -Tech Country:US -Tech Phone:+1.6502530000 -Tech Phone Ext.: -Tech FAX:+1.6506188571 -Tech FAX Ext.: -Tech Email:dns-admin@google.com -Name Server:NS1.GOOGLE.COM -Name Server:NS2.GOOGLE.COM -Name Server:NS3.GOOGLE.COM -Name Server:NS4.GOOGLE.COM -Name Server: -Name Server: -Name Server: -Name Server: -Name Server: -Name Server: -Name Server: -Name Server: -Name Server: +>>> Last update of WHOIS database: 2021-11-09T15:57:51Z <<< +For more information on Whois status codes, please visit https://icann.org/epp + +Access to WHOIS information is provided to assist persons in determining the contents of a domain name registration record in the registry database. The data in this record is provided by The Registry Operator for informational purposes only, and accuracy is not guaranteed. 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. Registry Operator reserves the right to modify these terms at any time. By submitting this query, you agree to abide by this policy. +The Registrar of Record identified in this output may have an RDDS service that can be queried for additional information on how to contact the Registrant, Admin, or Tech contact of the queried domain name. diff --git a/spec/fixtures/responses/whois.nic.asia/asia/property_status_multiple.expected b/spec/fixtures/responses/whois.nic.asia/asia/property_status_multiple.expected index 5192c360..6cf0fd21 100644 --- a/spec/fixtures/responses/whois.nic.asia/asia/property_status_multiple.expected +++ b/spec/fixtures/responses/whois.nic.asia/asia/property_status_multiple.expected @@ -1,5 +1,5 @@ #status - %s == ["CLIENT DELETE PROHIBITED", "CLIENT TRANSFER PROHIBITED"] + %s == ["clientDeleteProhibited https://icann.org/epp#clientDeleteProhibited", "clientTransferProhibited https://icann.org/epp#clientTransferProhibited"] #available? %s == false diff --git a/spec/fixtures/responses/whois.nic.asia/asia/property_status_multiple.txt b/spec/fixtures/responses/whois.nic.asia/asia/property_status_multiple.txt index ac71d505..c66fa8c7 100644 --- a/spec/fixtures/responses/whois.nic.asia/asia/property_status_multiple.txt +++ b/spec/fixtures/responses/whois.nic.asia/asia/property_status_multiple.txt @@ -1,160 +1,28 @@ -DotAsia WHOIS LEGAL STATEMENT AND TERMS & CONDITIONS: The WHOIS service offered -by DotAsia and the access to the records in the DotAsia WHOIS database are provided -for information purposes only. It allows persons to check whether a specific -domain name is still available or not and to obtain information related to -the registration records of existing domain names. DotAsia cannot, under any -circumstances, be held liable in case the stored information would prove to -be wrong, incomplete, or not accurate in any sense. By submitting a query -you agree not to use the information made available to: allow, enable or -otherwise support the transmission of unsolicited, commercial advertising or -other solicitations whether via email or otherwise; target advertising in any -possible way; or to cause nuisance in any possible way to the registrants by -sending (whether by automated, electronic processes capable of enabling high -volumes or other possible means) messages to them. Without prejudice to the -above, it is explicitly forbidden to extract, copy and/or use or re-utilise -in any form and by any means (electronically or not) the whole or a -quantitatively or qualitatively substantial part of the contents of the WHOIS -database without prior and explicit permission by DotAsia, nor in any attempt -hereof, or to apply automated, electronic processes to DotAsia (or its systems). -You agree that any reproduction and/or transmission of data for commercial -purposes will always be considered as the extraction of a substantial part of -the content of the WHOIS database. By submitting the query you agree to abide -by this policy and accept that DotAsia can take measures to limit the use of its -WHOIS services in order to protect the privacy of its registrants or the -integrity of the database. +Domain Name: NOVALASH.ASIA +Registry Domain ID: D107700000001032500-AGRS +Registrar WHOIS Server: +Registrar URL: https://www.007names.com +Updated Date: 2021-10-29T11:13:56Z +Creation Date: 2008-10-30T22:54:15Z +Registry Expiry Date: 2022-10-30T22:54:15Z +Registrar Registration Expiration Date: +Registrar: 007Names, Inc. +Registrar IANA ID: 91 +Registrar Abuse Contact Email: +Registrar Abuse Contact Phone: +Reseller: +Domain Status: clientDeleteProhibited https://icann.org/epp#clientDeleteProhibited +Domain Status: clientTransferProhibited https://icann.org/epp#clientTransferProhibited +Registrant Organization: Novalash +Registrant State/Province: TX +Registrant Country: US +Name Server: NS2.RACKSPACE.COM +Name Server: NS.RASKSPACE.COM +DNSSEC: unsigned +URL of the ICANN Whois Inaccuracy Complaint Form: https://www.icann.org/wicf/ +>>> Last update of WHOIS database: 2021-11-09T16:02:53Z <<< -Domain ID:D1032500-ASIA -Domain Name:NOVALASH.ASIA -Domain Create Date:30-Oct-2008 22:54:15 UTC -Domain Expiration Date:30-Oct-2012 22:54:15 UTC -Domain Last Updated Date:01-Oct-2010 03:30:34 UTC -Last Transferred Date: -IPR Name: -IPR Number: -IPR CC Locality: -IPR Applied: -IPR Registered: -IPR Class: -IPR form: -IPR Entitlement: -IPR Type: -Created by:007Names, Inc. R94-ASIA (91) -Last Updated by Registrar:007Names, Inc. R94-ASIA (91) -Sponsoring Registrar:007Names, Inc. R94-ASIA (91) -Registration Agent ID: -Registration Agent Name: -Registration Agent Organization: -Registration Agent Address: -Registration Agent Address2: -Registration Agent Address3: -Registration Agent City: -Registration Agent State/Province: -Registration Agent Country/Economy: -Registration Agent Postal Code: -Registration Agent Phone: -Registration Agent Phone Ext.: -Registration Agent FAX: -Registration Agent FAX Ext.: -Registration Agent E-mail: -Maintainer URL: -Domain Status:CLIENT DELETE PROHIBITED -Domain Status:CLIENT TRANSFER PROHIBITED -Registrant ID:7AERFN4T4P -Registrant Name:Sophy Merszei -Registrant Organization:Novalash -Registrant Address:3701 W. Alabama -Registrant Address2: -Registrant Address3: -Registrant City:Houston -Registrant State/Province:TX -Registrant Country/Economy:US -Registrant Postal Code:77027 -Registrant Phone:+1.8664301261 -Registrant Phone Ext.: -Registrant FAX: -Registrant FAX Ext.: -Registrant E-mail:khickman@awsp.com -Administrative ID:5MTMZMT3K1 -Administrative Name:Sophy Merszei -Administrative Organization:Novalash -Administrative Address:3701 W. Alabama -Administrative Address2: -Administrative Address3: -Administrative City:Houston -Administrative State/Province:TX -Administrative Country/Economy:US -Administrative Postal Code:77027 -Administrative Phone:+1.8664301261 -Administrative Phone Ext.: -Administrative FAX: -Administrative FAX Ext.: -Administrative E-mail:khickman@awsp.com -Technical ID:FR-11594d9eed91 -Technical Name:Edward Lin -Technical Organization:EDM Enterprise Co., LTD -Technical Address:No. 10 Lane 241, Chung Shan Road -Technical Address2: -Technical Address3: -Technical City:Shen Kang Hsiang -Technical State/Province:Taichung Hsien -Technical Country/Economy:TW -Technical Postal Code:35000 -Technical Phone:+886.425625115 -Technical Phone Ext.: -Technical FAX: -Technical FAX Ext.: -Technical E-mail:doamina@yahoo.com -Billing ID:5MTMZMT3K1 -Billing Name:Sophy Merszei -Billing Organization:Novalash -Billing Address:3701 W. Alabama -Billing Address2: -Billing Address3: -Billing City:Houston -Billing State/Province:TX -Billing Country/Economy:US -Billing Postal Code:77027 -Billing Phone:+1.8664301261 -Billing Phone Ext.: -Billing FAX: -Billing FAX Ext.: -Billing E-mail:khickman@awsp.com -CED ID:FR-11594d9eed91 -CED CC Locality:TW -CED State/Province:Taichung Hsien -CED City:Shen Kang Hsiang -CED Type of Legal Entity:Corporations or Companies -CED Type (Other): -CED Form of Identification:Certificate of Incorporation or equivalent business registration certificate -CED Form of ID (Other): -CED Identification Number:N9fTw -Operations and Notifications ID:7AERFN4T4P -Operations and Notifications Name:Sophy Merszei -Operations and Notifications Organization:Novalash -Operations and Notifications Address:3701 W. Alabama -Operations and Notifications Address2: -Operations and Notifications Address3: -Operations and Notifications City:Houston -Operations and Notifications State/Province:TX -Operations and Notifications Country/Economy:US -Operations and Notifications Postal Code:77027 -Operations and Notifications Phone:+1.8664301261 -Operations and Notifications Phone Ext.: -Operations and Notifications FAX: -Operations and Notifications FAX Ext.: -Operations and Notifications E-mail:khickman@awsp.com -Nameservers:NS2.RACKSPACE.COM -Nameservers:NS.RASKSPACE.COM -Nameservers: -Nameservers: -Nameservers: -Nameservers: -Nameservers: -Nameservers: -Nameservers: -Nameservers: -Nameservers: -Nameservers: -Nameservers: +For more information on Whois status codes, please visit https://icann.org/epp - +Access to WHOIS information is provided to assist persons in determining the contents of a domain name registration record in the registry database. The data in this record is provided by The Registry Operator for informational purposes only, and accuracy is not guaranteed. 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. Registry Operator reserves the right to modify these terms at any time. By submitting this query, you agree to abide by this policy. +The Registrar of Record identified in this output may have an RDDS service that can be queried for additional information on how to contact the Registrant, Admin, or Tech contact of the queried domain name. diff --git a/spec/fixtures/responses/whois.nic.asia/asia/property_status_single.expected b/spec/fixtures/responses/whois.nic.asia/asia/property_status_single.expected deleted file mode 100644 index 82e603c3..00000000 --- a/spec/fixtures/responses/whois.nic.asia/asia/property_status_single.expected +++ /dev/null @@ -1,8 +0,0 @@ -#status - %s == ["OK"] - -#available? - %s == false - -#registered? - %s == true diff --git a/spec/fixtures/responses/whois.nic.asia/asia/property_status_single.txt b/spec/fixtures/responses/whois.nic.asia/asia/property_status_single.txt deleted file mode 100644 index 1ac12a30..00000000 --- a/spec/fixtures/responses/whois.nic.asia/asia/property_status_single.txt +++ /dev/null @@ -1,159 +0,0 @@ -DotAsia WHOIS LEGAL STATEMENT AND TERMS & CONDITIONS: The WHOIS service offered -by DotAsia and the access to the records in the DotAsia WHOIS database are provided -for information purposes only. It allows persons to check whether a specific -domain name is still available or not and to obtain information related to -the registration records of existing domain names. DotAsia cannot, under any -circumstances, be held liable in case the stored information would prove to -be wrong, incomplete, or not accurate in any sense. By submitting a query -you agree not to use the information made available to: allow, enable or -otherwise support the transmission of unsolicited, commercial advertising or -other solicitations whether via email or otherwise; target advertising in any -possible way; or to cause nuisance in any possible way to the registrants by -sending (whether by automated, electronic processes capable of enabling high -volumes or other possible means) messages to them. Without prejudice to the -above, it is explicitly forbidden to extract, copy and/or use or re-utilise -in any form and by any means (electronically or not) the whole or a -quantitatively or qualitatively substantial part of the contents of the WHOIS -database without prior and explicit permission by DotAsia, nor in any attempt -hereof, or to apply automated, electronic processes to DotAsia (or its systems). -You agree that any reproduction and/or transmission of data for commercial -purposes will always be considered as the extraction of a substantial part of -the content of the WHOIS database. By submitting the query you agree to abide -by this policy and accept that DotAsia can take measures to limit the use of its -WHOIS services in order to protect the privacy of its registrants or the -integrity of the database. - -Domain ID:D93126-ASIA -Domain Name:CJ7.ASIA -Domain Create Date:15-Jan-2008 11:28:02 UTC -Domain Expiration Date:15-Jan-2010 11:28:02 UTC -Domain Last Updated Date:16-Mar-2008 04:30:25 UTC -Last Transferred Date: -IPR Name:DotAsia Organisation Ltd -IPR Number: -IPR CC Locality:HK -IPR Applied: -IPR Registered: -IPR Class: -IPR form: -IPR Entitlement: -IPR Type:SR1 -Created by:dotASIA R4-ASIA (9998) -Last Updated by Registrar:ASIA Registry R6-ASIA (9996) -Sponsoring Registrar:dotASIA R4-ASIA (9998) -Registration Agent ID: -Registration Agent Name: -Registration Agent Organization: -Registration Agent Address: -Registration Agent Address2: -Registration Agent Address3: -Registration Agent City: -Registration Agent State/Province: -Registration Agent Country/Economy: -Registration Agent Postal Code: -Registration Agent Phone: -Registration Agent Phone Ext.: -Registration Agent FAX: -Registration Agent FAX Ext.: -Registration Agent E-mail: -Maintainer URL: -Domain Status:OK -Registrant ID:FR-1158300cc88a -Registrant Name:Pioneer Domain (Temporary Delegation) -Registrant Organization:DotAsia Organisation -Registrant Address:Unit 617, Miramar Tower -Registrant Address2:132 Nathan Road -Registrant Address3: -Registrant City:Tsim Sha Tsui -Registrant State/Province:Kowloon -Registrant Country/Economy:HK -Registrant Postal Code:HK -Registrant Phone:+852.35202635 -Registrant Phone Ext.: -Registrant FAX: -Registrant FAX Ext.: -Registrant E-mail:domains@registry.asia -Administrative ID:FR-11582fd1b4a9 -Administrative Name:DotAsia Organisation -Administrative Organization:DotAsia Organisation -Administrative Address:Unit 617, Miramar Tower -Administrative Address2:132 Nathan Road -Administrative Address3: -Administrative City:Tsim Sha Tsui -Administrative State/Province:Kowloon -Administrative Country/Economy:HK -Administrative Postal Code:HK -Administrative Phone:+852.35202635 -Administrative Phone Ext.: -Administrative FAX: -Administrative FAX Ext.: -Administrative E-mail:domains@registry.asia -Technical ID:FR-11582fd1b4a9 -Technical Name:DotAsia Organisation -Technical Organization:DotAsia Organisation -Technical Address:Unit 617, Miramar Tower -Technical Address2:132 Nathan Road -Technical Address3: -Technical City:Tsim Sha Tsui -Technical State/Province:Kowloon -Technical Country/Economy:HK -Technical Postal Code:HK -Technical Phone:+852.35202635 -Technical Phone Ext.: -Technical FAX: -Technical FAX Ext.: -Technical E-mail:domains@registry.asia -Billing ID:FR-11582fd1b4a9 -Billing Name:DotAsia Organisation -Billing Organization:DotAsia Organisation -Billing Address:Unit 617, Miramar Tower -Billing Address2:132 Nathan Road -Billing Address3: -Billing City:Tsim Sha Tsui -Billing State/Province:Kowloon -Billing Country/Economy:HK -Billing Postal Code:HK -Billing Phone:+852.35202635 -Billing Phone Ext.: -Billing FAX: -Billing FAX Ext.: -Billing E-mail:domains@registry.asia -CED ID:FR-11582fd1b4a9 -CED CC Locality:HK -CED State/Province: -CED City: -CED Type of Legal Entity:Corporations or Companies -CED Type (Other): -CED Form of Identification:Certificate of Incorporation or equivalent business registration certificate -CED Form of ID (Other): -CED Identification Number:1073566 -Operations and Notifications ID:FR-11582fd1b4a9 -Operations and Notifications Name:DotAsia Organisation -Operations and Notifications Organization:DotAsia Organisation -Operations and Notifications Address:Unit 617, Miramar Tower -Operations and Notifications Address2:132 Nathan Road -Operations and Notifications Address3: -Operations and Notifications City:Tsim Sha Tsui -Operations and Notifications State/Province:Kowloon -Operations and Notifications Country/Economy:HK -Operations and Notifications Postal Code:HK -Operations and Notifications Phone:+852.35202635 -Operations and Notifications Phone Ext.: -Operations and Notifications FAX: -Operations and Notifications FAX Ext.: -Operations and Notifications E-mail:domains@registry.asia -Nameservers:NS1.DOTASIA.ORG -Nameservers:NS2.DOTASIA.ORG -Nameservers: -Nameservers: -Nameservers: -Nameservers: -Nameservers: -Nameservers: -Nameservers: -Nameservers: -Nameservers: -Nameservers: -Nameservers: - - diff --git a/spec/fixtures/responses/whois.nic.asia/asia/status_available.expected b/spec/fixtures/responses/whois.nic.asia/asia/status_available.expected index 31e4bf0c..2c28f207 100644 --- a/spec/fixtures/responses/whois.nic.asia/asia/status_available.expected +++ b/spec/fixtures/responses/whois.nic.asia/asia/status_available.expected @@ -1,6 +1,5 @@ #disclaimer - %s == nil - + %s == "Access to WHOIS information is provided to assist persons in determining the contents of a domain name registration record in the registry database. The data in this record is provided by The Registry Operator for informational purposes only, and accuracy is not guaranteed. 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. Registry Operator reserves the right to modify these terms at any time. By submitting this query, you agree to abide by this policy. The Registrar of Record identified in this output may have an RDDS service that can be queried for additional information on how to contact the Registrant, Admin, or Tech contact of the queried domain name." #domain %s == nil diff --git a/spec/fixtures/responses/whois.nic.asia/asia/status_available.txt b/spec/fixtures/responses/whois.nic.asia/asia/status_available.txt index 679aadb9..7348ff82 100644 --- a/spec/fixtures/responses/whois.nic.asia/asia/status_available.txt +++ b/spec/fixtures/responses/whois.nic.asia/asia/status_available.txt @@ -1 +1,5 @@ NOT FOUND +>>> Last update of WHOIS database: 2021-11-09T16:01:55Z <<< + +Access to WHOIS information is provided to assist persons in determining the contents of a domain name registration record in the registry database. The data in this record is provided by The Registry Operator for informational purposes only, and accuracy is not guaranteed. 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. Registry Operator reserves the right to modify these terms at any time. By submitting this query, you agree to abide by this policy. +The Registrar of Record identified in this output may have an RDDS service that can be queried for additional information on how to contact the Registrant, Admin, or Tech contact of the queried domain name. diff --git a/spec/fixtures/responses/whois.nic.asia/asia/status_registered.expected b/spec/fixtures/responses/whois.nic.asia/asia/status_registered.expected index 33c6797c..5995ed67 100644 --- a/spec/fixtures/responses/whois.nic.asia/asia/status_registered.expected +++ b/spec/fixtures/responses/whois.nic.asia/asia/status_registered.expected @@ -1,16 +1,16 @@ #disclaimer - %s == "DotAsia WHOIS LEGAL STATEMENT AND TERMS & CONDITIONS: The WHOIS service offered by DotAsia and the access to the records in the DotAsia WHOIS database are provided for information purposes only. It allows persons to check whether a specific domain name is still available or not and to obtain information related to the registration records of existing domain names. DotAsia cannot, under any circumstances, be held liable in case the stored information would prove to be wrong, incomplete, or not accurate in any sense. By submitting a query you agree not to use the information made available to: allow, enable or otherwise support the transmission of unsolicited, commercial advertising or other solicitations whether via email or otherwise; target advertising in any possible way; or to cause nuisance in any possible way to the registrants by sending (whether by automated, electronic processes capable of enabling high volumes or other possible means) messages to them. Without prejudice to the above, it is explicitly forbidden to extract, copy and/or use or re-utilise in any form and by any means (electronically or not) the whole or a quantitatively or qualitatively substantial part of the contents of the WHOIS database without prior and explicit permission by DotAsia, nor in any attempt hereof, or to apply automated, electronic processes to DotAsia (or its systems). You agree that any reproduction and/or transmission of data for commercial purposes will always be considered as the extraction of a substantial part of the content of the WHOIS database. By submitting the query you agree to abide by this policy and accept that DotAsia can take measures to limit the use of its WHOIS services in order to protect the privacy of its registrants or the integrity of the database." + %s == "Access to WHOIS information is provided to assist persons in determining the contents of a domain name registration record in the registry database. The data in this record is provided by The Registry Operator for informational purposes only, and accuracy is not guaranteed. 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. Registry Operator reserves the right to modify these terms at any time. By submitting this query, you agree to abide by this policy. The Registrar of Record identified in this output may have an RDDS service that can be queried for additional information on how to contact the Registrant, Admin, or Tech contact of the queried domain name." #domain %s == "cj7.asia" #domain_id - %s == "D93126-ASIA" + %s == "D107700000000093126-AGRS" #status - %s == ["OK"] + %s == ["ok https://icann.org/epp#ok"] #available? %s == false @@ -25,70 +25,43 @@ #updated_on %s %CLASS{time} - %s %TIME{2014-01-15 22:20:16 UTC} + %s %TIME{2020-01-15 22:20:23 UTC} #expires_on %s %CLASS{time} - %s %TIME{2015-01-15 11:28:02 UTC} + %s %TIME{2021-01-15 11:28:02 UTC} #registrar %s %CLASS{registrar} - %s.id == "800046" - %s.name == "dotASIA R4-ASIA" - %s.organization == nil - %s.url == nil + %s.id == "119" + %s.name == "DotAsia Organisation" + %s.url == "" #registrant_contacts %s %CLASS{array} %s %SIZE{1} %s[0] %CLASS{contact} %s[0].type == Whois::Parser::Contact::TYPE_REGISTRANT - %s[0].id == "FR-132aa75b4bf65" - %s[0].name == "RAXCO ASSETS CORP." + %s[0].id == nil + %s[0].name == nil %s[0].organization == "RAXCO ASSETS CORP." - %s[0].address == "RM 1201-1204 12/F\nSEA BIRD HSE\n22-28 WYNDHAM ST CENTRAL HK" - %s[0].city == "Hong Kong" - %s[0].zip == "" + %s[0].address == nil + %s[0].city == nil + %s[0].zip == nil %s[0].state == "" %s[0].country_code == "HK" - %s[0].phone == "+852.21190333" - %s[0].fax == "+852.23045326" - %s[0].email == "eddie.yeung@bingogroup.com.hk" + %s[0].phone == nil + %s[0].fax == nil + %s[0].email == nil #admin_contacts %s %CLASS{array} - %s %SIZE{1} - %s[0] %CLASS{contact} - %s[0].type == Whois::Parser::Contact::TYPE_ADMINISTRATIVE - %s[0].id == "FR-132aa7afe0967" - %s[0].name == "Eddie Yeung" - %s[0].organization == "RAXCO ASSETS CORP." - %s[0].address == "RM 1201-1204 12/F\nSEA BIRD HSE\n22-28 WYNDHAM ST CENTRAL HK" - %s[0].city == "Hong Kong" - %s[0].zip == "" - %s[0].state == "" - %s[0].country_code == "HK" - %s[0].phone == "+852.21190333" - %s[0].fax == "" - %s[0].email == "eddie.yeung@bingogroup.com.hk" + %s %SIZE{0} #technical_contacts %s %CLASS{array} - %s %SIZE{1} - %s[0] %CLASS{contact} - %s[0].type == Whois::Parser::Contact::TYPE_TECHNICAL - %s[0].id == "FR-132aa7afe0967" - %s[0].name == "Eddie Yeung" - %s[0].organization == "RAXCO ASSETS CORP." - %s[0].address == "RM 1201-1204 12/F\nSEA BIRD HSE\n22-28 WYNDHAM ST CENTRAL HK" - %s[0].city == "Hong Kong" - %s[0].zip == "" - %s[0].state == "" - %s[0].country_code == "HK" - %s[0].phone == "+852.21190333" - %s[0].fax == "" - %s[0].email == "eddie.yeung@bingogroup.com.hk" + %s %SIZE{0} #nameservers @@ -103,9 +76,9 @@ %s[3] %CLASS{nameserver} %s[3].name == "ns4.dnspod.net" %s[4] %CLASS{nameserver} - %s[4].name == "ns5.dnspod.net" + %s[4].name == "ns6.dnspod.net" %s[5] %CLASS{nameserver} - %s[5].name == "ns6.dnspod.net" + %s[5].name == "ns5.dnspod.net" #reserved? diff --git a/spec/fixtures/responses/whois.nic.asia/asia/status_registered.txt b/spec/fixtures/responses/whois.nic.asia/asia/status_registered.txt index ed16d077..efec8ee0 100644 --- a/spec/fixtures/responses/whois.nic.asia/asia/status_registered.txt +++ b/spec/fixtures/responses/whois.nic.asia/asia/status_registered.txt @@ -1,134 +1,31 @@ -DotAsia WHOIS LEGAL STATEMENT AND TERMS & CONDITIONS: The WHOIS service offered -by DotAsia and the access to the records in the DotAsia WHOIS database are provided -for information purposes only. It allows persons to check whether a specific -domain name is still available or not and to obtain information related to -the registration records of existing domain names. DotAsia cannot, under any -circumstances, be held liable in case the stored information would prove to -be wrong, incomplete, or not accurate in any sense. By submitting a query -you agree not to use the information made available to: allow, enable or -otherwise support the transmission of unsolicited, commercial advertising or -other solicitations whether via email or otherwise; target advertising in any -possible way; or to cause nuisance in any possible way to the registrants by -sending (whether by automated, electronic processes capable of enabling high -volumes or other possible means) messages to them. Without prejudice to the -above, it is explicitly forbidden to extract, copy and/or use or re-utilise -in any form and by any means (electronically or not) the whole or a -quantitatively or qualitatively substantial part of the contents of the WHOIS -database without prior and explicit permission by DotAsia, nor in any attempt -hereof, or to apply automated, electronic processes to DotAsia (or its systems). -You agree that any reproduction and/or transmission of data for commercial -purposes will always be considered as the extraction of a substantial part of -the content of the WHOIS database. By submitting the query you agree to abide -by this policy and accept that DotAsia can take measures to limit the use of its -WHOIS services in order to protect the privacy of its registrants or the -integrity of the database. - -Domain ID:D93126-ASIA -Domain Name:CJ7.ASIA -Domain Create Date:15-Jan-2008 11:28:02 UTC -Domain Expiration Date:15-Jan-2015 11:28:02 UTC -Domain Last Updated Date:15-Jan-2014 22:20:16 UTC -Last Transferred Date: -IPR Name:CJ7 -IPR CC Locality:HK -IPR Type:SR1 -Created by:dotASIA R4-ASIA (800046) -Last Updated by Registrar:ASIA Registry R6-ASIA (700001) -Sponsoring Registrar:dotASIA R4-ASIA (800046) -Domain Status:OK -Status:AUTORENEWPERIOD -Registrant ID:FR-132aa75b4bf65 -Registrant Name:RAXCO ASSETS CORP. -Registrant Organization:RAXCO ASSETS CORP. -Registrant Address:RM 1201-1204 12/F -Registrant Address2:SEA BIRD HSE -Registrant Address3:22-28 WYNDHAM ST CENTRAL HK -Registrant City:Hong Kong +Domain Name: CJ7.ASIA +Registry Domain ID: D107700000000093126-AGRS +Registrar WHOIS Server: +Registrar URL: +Updated Date: 2020-01-15T22:20:23Z +Creation Date: 2008-01-15T11:28:02Z +Registry Expiry Date: 2021-01-15T11:28:02Z +Registrar Registration Expiration Date: +Registrar: DotAsia Organisation +Registrar IANA ID: 119 +Registrar Abuse Contact Email: +Registrar Abuse Contact Phone: +Reseller: +Domain Status: ok https://icann.org/epp#ok +Registrant Organization: RAXCO ASSETS CORP. Registrant State/Province: -Registrant Country/Economy:HK -Registrant Postal Code: -Registrant Phone:+852.21190333 -Registrant Phone Ext.: -Registrant FAX:+852.23045326 -Registrant FAX Ext.: -Registrant E-mail:eddie.yeung@bingogroup.com.hk -Administrative ID:FR-132aa7afe0967 -Administrative Name:Eddie Yeung -Administrative Organization:RAXCO ASSETS CORP. -Administrative Address:RM 1201-1204 12/F -Administrative Address2:SEA BIRD HSE -Administrative Address3:22-28 WYNDHAM ST CENTRAL HK -Administrative City:Hong Kong -Administrative State/Province: -Administrative Country/Economy:HK -Administrative Postal Code: -Administrative Phone:+852.21190333 -Administrative Phone Ext.: -Administrative FAX: -Administrative FAX Ext.: -Administrative E-mail:eddie.yeung@bingogroup.com.hk -Technical ID:FR-132aa7afe0967 -Technical Name:Eddie Yeung -Technical Organization:RAXCO ASSETS CORP. -Technical Address:RM 1201-1204 12/F -Technical Address2:SEA BIRD HSE -Technical Address3:22-28 WYNDHAM ST CENTRAL HK -Technical City:Hong Kong -Technical State/Province: -Technical Country/Economy:HK -Technical Postal Code: -Technical Phone:+852.21190333 -Technical Phone Ext.: -Technical FAX: -Technical FAX Ext.: -Technical E-mail:eddie.yeung@bingogroup.com.hk -Billing ID:FR-132aa774c1b66 -Billing Name:Frankie Chan -Billing Organization:RAXCO ASSETS CORP. -Billing Address:RM 1201-1204 12/F -Billing Address2:SEA BIRD HSE -Billing Address3:22-28 WYNDHAM ST CENTRAL HK -Billing City:Hong Kong -Billing State/Province: -Billing Country/Economy:HK -Billing Postal Code: -Billing Phone:+852.21190333 -Billing Phone Ext.: -Billing FAX: -Billing FAX Ext.: -Billing E-mail:eddie.yeung@bingogroup.com.hk -CED ID:FR-132aa75b4bf65 -CED CC Locality:HK -CED Type of Legal Entity:Corporations or Companies -CED Form of Identification:Certificate of Incorporation or equivalent business registration certificate -CED Identification Number:35119870 -Operations and Notifications ID:FR-132aa75b4bf65 -Operations and Notifications Name:RAXCO ASSETS CORP. -Operations and Notifications Organization:RAXCO ASSETS CORP. -Operations and Notifications Address:RM 1201-1204 12/F -Operations and Notifications Address2:SEA BIRD HSE -Operations and Notifications Address3:22-28 WYNDHAM ST CENTRAL HK -Operations and Notifications City:Hong Kong -Operations and Notifications State/Province: -Operations and Notifications Country/Economy:HK -Operations and Notifications Postal Code: -Operations and Notifications Phone:+852.21190333 -Operations and Notifications Phone Ext.: -Operations and Notifications FAX:+852.23045326 -Operations and Notifications FAX Ext.: -Operations and Notifications E-mail:eddie.yeung@bingogroup.com.hk -Nameservers:NS1.DNSPOD.NET -Nameservers:NS2.DNSPOD.NET -Nameservers:NS3.DNSPOD.NET -Nameservers:NS4.DNSPOD.NET -Nameservers:NS5.DNSPOD.NET -Nameservers:NS6.DNSPOD.NET -Nameservers: -Nameservers: -Nameservers: -Nameservers: -Nameservers: -Nameservers: -Nameservers: +Registrant Country: HK +Name Server: NS1.DNSPOD.NET +Name Server: NS2.DNSPOD.NET +Name Server: NS3.DNSPOD.NET +Name Server: NS4.DNSPOD.NET +Name Server: NS6.DNSPOD.NET +Name Server: NS5.DNSPOD.NET +DNSSEC: unsigned +URL of the ICANN Whois Inaccuracy Complaint Form: https://www.icann.org/wicf/ +>>> Last update of WHOIS database: 2021-11-09T16:01:06Z <<< + +For more information on Whois status codes, please visit https://icann.org/epp - +Access to WHOIS information is provided to assist persons in determining the contents of a domain name registration record in the registry database. The data in this record is provided by The Registry Operator for informational purposes only, and accuracy is not guaranteed. 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. Registry Operator reserves the right to modify these terms at any time. By submitting this query, you agree to abide by this policy. +The Registrar of Record identified in this output may have an RDDS service that can be queried for additional information on how to contact the Registrant, Admin, or Tech contact of the queried domain name. diff --git a/spec/fixtures/responses/whois.nic.asia/asia/status_reserved.expected b/spec/fixtures/responses/whois.nic.asia/asia/status_reserved.expected index 263f1176..0c8c7942 100644 --- a/spec/fixtures/responses/whois.nic.asia/asia/status_reserved.expected +++ b/spec/fixtures/responses/whois.nic.asia/asia/status_reserved.expected @@ -1,6 +1,5 @@ #disclaimer - %s == nil - + %s == "Access to WHOIS information is provided to assist persons in determining the contents of a domain name registration record in the registry database. The data in this record is provided by The Registry Operator for informational purposes only, and accuracy is not guaranteed. 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. Registry Operator reserves the right to modify these terms at any time. By submitting this query, you agree to abide by this policy. The Registrar of Record identified in this output may have an RDDS service that can be queried for additional information on how to contact the Registrant, Admin, or Tech contact of the queried domain name." #domain %s == nil diff --git a/spec/fixtures/responses/whois.nic.asia/asia/status_reserved.txt b/spec/fixtures/responses/whois.nic.asia/asia/status_reserved.txt index 8a70b35f..fb0ae735 100644 --- a/spec/fixtures/responses/whois.nic.asia/asia/status_reserved.txt +++ b/spec/fixtures/responses/whois.nic.asia/asia/status_reserved.txt @@ -1 +1,5 @@ Reserved by DotAsia +>>> Last update of WHOIS database: 2021-11-09T16:01:48Z <<< + +Access to WHOIS information is provided to assist persons in determining the contents of a domain name registration record in the registry database. The data in this record is provided by The Registry Operator for informational purposes only, and accuracy is not guaranteed. 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. Registry Operator reserves the right to modify these terms at any time. By submitting this query, you agree to abide by this policy. +The Registrar of Record identified in this output may have an RDDS service that can be queried for additional information on how to contact the Registrant, Admin, or Tech contact of the queried domain name. diff --git a/spec/fixtures/responses/whois.nic.cd/cd/status_registered.expected b/spec/fixtures/responses/whois.nic.cd/cd/status_registered.expected index 8ee0caab..2f9a9b7b 100644 --- a/spec/fixtures/responses/whois.nic.cd/cd/status_registered.expected +++ b/spec/fixtures/responses/whois.nic.cd/cd/status_registered.expected @@ -29,7 +29,6 @@ %s %CLASS{registrar} %s.id == nil %s.name == "MARKMONITOR" - %s.organization == nil %s.url == nil diff --git a/spec/fixtures/responses/whois.nic.college/college/status_registered.expected b/spec/fixtures/responses/whois.nic.college/college/status_registered.expected index 0e88fcdb..ae2b2e3f 100644 --- a/spec/fixtures/responses/whois.nic.college/college/status_registered.expected +++ b/spec/fixtures/responses/whois.nic.college/college/status_registered.expected @@ -36,7 +36,6 @@ %s %CLASS{registrar} %s.id == "9999" %s.name == "CentralNic Ltd" - %s.organization == nil %s.url == nil #registrant_contacts diff --git a/spec/fixtures/responses/whois.nic.cx/cx/status_registered.expected b/spec/fixtures/responses/whois.nic.cx/cx/status_registered.expected index 22ce82a2..3993344d 100644 --- a/spec/fixtures/responses/whois.nic.cx/cx/status_registered.expected +++ b/spec/fixtures/responses/whois.nic.cx/cx/status_registered.expected @@ -32,7 +32,6 @@ %s %CLASS{registrar} %s.id == nil %s.name == "MarkMonitor" - %s.organization == nil %s.url == nil diff --git a/spec/fixtures/responses/whois.nic.cz/cz/status_registered.expected b/spec/fixtures/responses/whois.nic.cz/cz/status_registered.expected index 5d501214..674d60d1 100644 --- a/spec/fixtures/responses/whois.nic.cz/cz/status_registered.expected +++ b/spec/fixtures/responses/whois.nic.cz/cz/status_registered.expected @@ -32,7 +32,6 @@ %s %CLASS{registrar} %s.id == "REG-MARKMONITOR" %s.name == "REG-MARKMONITOR" - %s.organization == nil %s.url == nil #registrant_contacts diff --git a/spec/fixtures/responses/whois.nic.design/design/status_registered.expected b/spec/fixtures/responses/whois.nic.design/design/status_registered.expected index c5ebd9d2..bcee79cf 100644 --- a/spec/fixtures/responses/whois.nic.design/design/status_registered.expected +++ b/spec/fixtures/responses/whois.nic.design/design/status_registered.expected @@ -36,7 +36,6 @@ %s %CLASS{registrar} %s.id == "9999" %s.name == "Top Level Design, LLC" - %s.organization == nil %s.url == nil #registrant_contacts diff --git a/spec/fixtures/responses/whois.nic.dm/dm/status_registered.expected b/spec/fixtures/responses/whois.nic.dm/dm/status_registered.expected index 8c80cf40..9ff91d33 100644 --- a/spec/fixtures/responses/whois.nic.dm/dm/status_registered.expected +++ b/spec/fixtures/responses/whois.nic.dm/dm/status_registered.expected @@ -36,7 +36,6 @@ %s %CLASS{registrar} %s.id == nil %s.name == "MarkMonitor Inc." - %s.organization == nil %s.url == "www.markmonitor.com" #registrant_contacts diff --git a/spec/fixtures/responses/whois.nic.ec/ex/status_registered.expected b/spec/fixtures/responses/whois.nic.ec/ex/status_registered.expected index c5632025..ffa00a21 100644 --- a/spec/fixtures/responses/whois.nic.ec/ex/status_registered.expected +++ b/spec/fixtures/responses/whois.nic.ec/ex/status_registered.expected @@ -32,7 +32,6 @@ %s %CLASS{registrar} %s.id == nil %s.name == "MarkMonitor Inc." - %s.organization == nil %s.url == "www.markmonitor.com" diff --git a/spec/fixtures/responses/whois.nic.es/es/status_available.expected b/spec/fixtures/responses/whois.nic.es/es/status_available.expected index abe349f1..845ba91c 100644 --- a/spec/fixtures/responses/whois.nic.es/es/status_available.expected +++ b/spec/fixtures/responses/whois.nic.es/es/status_available.expected @@ -29,7 +29,6 @@ %s %CLASS{registrar} %s.id == nil %s.name == "ES-NIC" - %s.organization == "ES-NIC Delegated Internet Registry for Spain" %s.url == nil diff --git a/spec/fixtures/responses/whois.nic.es/es/status_registered.expected b/spec/fixtures/responses/whois.nic.es/es/status_registered.expected index b20b77aa..7f007ebf 100644 --- a/spec/fixtures/responses/whois.nic.es/es/status_registered.expected +++ b/spec/fixtures/responses/whois.nic.es/es/status_registered.expected @@ -31,7 +31,6 @@ %s %CLASS{registrar} %s.id == nil %s.name == "ES-NIC" - %s.organization == "ES-NIC Delegated Internet Registry for Spain" %s.url == nil diff --git a/spec/fixtures/responses/whois.nic.gd/gd/status_registered.expected b/spec/fixtures/responses/whois.nic.gd/gd/status_registered.expected index d57f7e9f..b2278262 100644 --- a/spec/fixtures/responses/whois.nic.gd/gd/status_registered.expected +++ b/spec/fixtures/responses/whois.nic.gd/gd/status_registered.expected @@ -36,7 +36,6 @@ %s %CLASS{registrar} %s.id == nil %s.name == "MarkMonitor Inc." - %s.organization == nil %s.url == "www.markmonitor.com" #registrant_contacts diff --git a/spec/fixtures/responses/whois.nic.gl/gl/status_registered.expected b/spec/fixtures/responses/whois.nic.gl/gl/status_registered.expected index 7bdbab04..4d344361 100644 --- a/spec/fixtures/responses/whois.nic.gl/gl/status_registered.expected +++ b/spec/fixtures/responses/whois.nic.gl/gl/status_registered.expected @@ -32,7 +32,6 @@ %s %CLASS{registrar} %s.id == nil %s.name == "MarkMonitor" - %s.organization == nil %s.url == "http://www.markmonitor.com" diff --git a/spec/fixtures/responses/whois.nic.gs/gs/status_registered.expected b/spec/fixtures/responses/whois.nic.gs/gs/status_registered.expected index 0fe57903..9fca914c 100644 --- a/spec/fixtures/responses/whois.nic.gs/gs/status_registered.expected +++ b/spec/fixtures/responses/whois.nic.gs/gs/status_registered.expected @@ -32,7 +32,6 @@ %s %CLASS{registrar} %s.id == nil %s.name == "MarkMonitor" - %s.organization == nil %s.url == "http://www.markmonitor.com" diff --git a/spec/fixtures/responses/whois.nic.ht/ht/status_registered.expected b/spec/fixtures/responses/whois.nic.ht/ht/status_registered.expected index d4ec96f8..a90c4df3 100644 --- a/spec/fixtures/responses/whois.nic.ht/ht/status_registered.expected +++ b/spec/fixtures/responses/whois.nic.ht/ht/status_registered.expected @@ -32,7 +32,6 @@ %s %CLASS{registrar} %s.id == nil %s.name == "MarkMonitor" - %s.organization == nil %s.url == "http://www.markmonitor.com" diff --git a/spec/fixtures/responses/whois.nic.io/io/status_registered.expected b/spec/fixtures/responses/whois.nic.io/io/status_registered.expected index e6f56006..6fcd1be2 100644 --- a/spec/fixtures/responses/whois.nic.io/io/status_registered.expected +++ b/spec/fixtures/responses/whois.nic.io/io/status_registered.expected @@ -36,7 +36,6 @@ %s %CLASS{registrar} %s.id == "625" %s.name == "Name.com LLC" - %s.organization == "Name.com LLC" %s.url == "www.name.com" #registrant_contacts diff --git a/spec/fixtures/responses/whois.nic.jobs/jobs/status_registered.expected b/spec/fixtures/responses/whois.nic.jobs/jobs/status_registered.expected index 8c67870c..90a0cdee 100644 --- a/spec/fixtures/responses/whois.nic.jobs/jobs/status_registered.expected +++ b/spec/fixtures/responses/whois.nic.jobs/jobs/status_registered.expected @@ -36,7 +36,6 @@ %s %CLASS{registrar} %s.id == "292" %s.name == "MARKMONITOR INC." - %s.organization == nil %s.url == "http://www.markmonitor.com" diff --git a/spec/fixtures/responses/whois.nic.ki/ki/status_registered.expected b/spec/fixtures/responses/whois.nic.ki/ki/status_registered.expected index 682c51f0..62a2ebb5 100644 --- a/spec/fixtures/responses/whois.nic.ki/ki/status_registered.expected +++ b/spec/fixtures/responses/whois.nic.ki/ki/status_registered.expected @@ -32,7 +32,6 @@ %s %CLASS{registrar} %s.id == nil %s.name == "MarkMonitor" - %s.organization == nil %s.url == "http://www.markmonitor.com" diff --git a/spec/fixtures/responses/whois.nic.la/la/status_registered.expected b/spec/fixtures/responses/whois.nic.la/la/status_registered.expected index ac256227..f454135e 100644 --- a/spec/fixtures/responses/whois.nic.la/la/status_registered.expected +++ b/spec/fixtures/responses/whois.nic.la/la/status_registered.expected @@ -35,8 +35,7 @@ #registrar %s %CLASS{registrar} %s.id == "H2948863" - %s.name == nil - %s.organization == "TLD Registrar Solutions Ltd" + %s.name == "TLD Registrar Solutions Ltd" %s.url == "www.tldregistrarsolutions.com" #registrant_contacts diff --git a/spec/fixtures/responses/whois.nic.me/me/property_nameservers_is_blank.txt b/spec/fixtures/responses/whois.nic.me/me/property_nameservers_is_blank.txt index f6e5d6d1..c9d5bec9 100644 --- a/spec/fixtures/responses/whois.nic.me/me/property_nameservers_is_blank.txt +++ b/spec/fixtures/responses/whois.nic.me/me/property_nameservers_is_blank.txt @@ -1,95 +1,28 @@ -WHOIS TERMS & CONDITIONS: Access to .ME WHOIS information is provided to -assist persons in determining the contents of a domain name registration -record in the .ME registry database. The data in this record is provided by -.ME Registry for informational purposes only, and .ME Registry 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, -facsimile, or other electronic processes 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, -except as reasonably necessary to register domain names or modify existing -registrations. All rights reserved. .ME Registry reserves the right to modify -these terms at any time. By submitting this query, you agree to abide by this -policy. - -Domain ID:D82062-ME -Domain Name:WOSSNA.ME -Domain Create Date:17-Jul-2008 15:54:20 UTC -Domain Last Updated Date:16-Aug-2010 02:15:52 UTC -Domain Expiration Date:17-Jul-2011 15:54:20 UTC -Last Transferred Date: -Trademark Name: -Trademark Country: -Trademark Number: -Date Trademark Applied For: -Date Trademark Registered: -Sponsoring Registrar:Gandi SAS R114-ME (81) -Created by:Gandi SAS R114-ME (81) -Last Updated by Registrar:Gandi SAS R114-ME (81) -Domain Status:CLIENT TRANSFER PROHIBITED -Domain Status:INACTIVE -Domain Status:PENDING DELETE -Registrant ID:GM937-GANDI -Registrant Name:Graeme Mathieson -Registrant Organization: -Registrant Address:12d Monktonhall Terrace -Registrant Address2: -Registrant Address3: -Registrant City:Musselburgh -Registrant State/Province: -Registrant Country/Economy:GB -Registrant Postal Code:EH21 6ER -Registrant Phone:+44.7949077744 -Registrant Phone Ext.: -Registrant FAX: -Registrant FAX Ext.: -Registrant E-mail:mathie@rubaidh.com -Admin ID:GM2519-GANDI -Admin Name:Graeme Mathieson -Admin Organization:Rubaidh Ltd -Admin Address:Stuart House -Admin Address2:Eskmills -Admin Address3: -Admin City:Musselburgh -Admin State/Province: -Admin Country/Economy:GB -Admin Postal Code:EH21 7PB -Admin Phone:+44.1312735271 -Admin Phone Ext.: -Admin FAX: -Admin FAX Ext.: -Admin E-mail:support@rubaidh.com -Tech ID:GM2519-GANDI -Tech Name:Graeme Mathieson -Tech Organization:Rubaidh Ltd -Tech Address:Stuart House -Tech Address2:Eskmills -Tech Address3: -Tech City:Musselburgh -Tech State/Province: -Tech Country/Economy:GB -Tech Postal Code:EH21 7PB -Tech Phone:+44.1312735271 -Tech Phone Ext.: -Tech FAX: -Tech FAX Ext.: -Tech E-mail:support@rubaidh.com -Nameservers: -Nameservers: -Nameservers: -Nameservers: -Nameservers: -Nameservers: -Nameservers: -Nameservers: -Nameservers: -Nameservers: -Nameservers: -Nameservers: -Nameservers: -Nameservers: - +Domain Name: WOSSNA.ME +Registry Domain ID: D108500000011193422-AGRS +Registrar WHOIS Server: whois.gandi.net +Registrar URL: http://www.gandi.net +Updated Date: 2021-09-29T15:43:59Z +Creation Date: 2014-01-29T07:32:26Z +Registry Expiry Date: 2024-01-29T07:32:26Z +Registrar Registration Expiration Date: +Registrar: Gandi SAS +Registrar IANA ID: 81 +Registrar Abuse Contact Email: abuse@support.gandi.net +Registrar Abuse Contact Phone: +33.170377661 +Reseller: +Domain Status: clientTransferProhibited https://icann.org/epp#clientTransferProhibited +Registrant Organization: +Registrant State/Province: Paris +Registrant Country: FR +Name Server: +Name Server: +Name Server: +DNSSEC: unsigned +URL of the ICANN Whois Inaccuracy Complaint Form: https://www.icann.org/wicf/ +>>> Last update of WHOIS database: 2021-11-09T14:03:27Z <<< +For more information on Whois status codes, please visit https://icann.org/epp + +Access to WHOIS information is provided to assist persons in determining the contents of a domain name registration record in the registry database. The data in this record is provided by The Registry Operator for informational purposes only, and accuracy is not guaranteed. 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. Registry Operator reserves the right to modify these terms at any time. By submitting this query, you agree to abide by this policy. +The Registrar of Record identified in this output may have an RDDS service that can be queried for additional information on how to contact the Registrant, Admin, or Tech contact of the queried domain name. diff --git a/spec/fixtures/responses/whois.nic.me/me/property_updated_on_is_blank.txt b/spec/fixtures/responses/whois.nic.me/me/property_updated_on_is_blank.txt index 2e6d26af..14bb974f 100644 --- a/spec/fixtures/responses/whois.nic.me/me/property_updated_on_is_blank.txt +++ b/spec/fixtures/responses/whois.nic.me/me/property_updated_on_is_blank.txt @@ -1,92 +1,28 @@ -WHOIS TERMS & CONDITIONS: Access to .ME WHOIS information is provided to -assist persons in determining the contents of a domain name registration -record in the .ME registry database. The data in this record is provided by -.ME Registry for informational purposes only, and .ME Registry 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, -facsimile, or other electronic processes 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, -except as reasonably necessary to register domain names or modify existing -registrations. All rights reserved. .ME Registry reserves the right to modify -these terms at any time. By submitting this query, you agree to abide by this -policy. - -Domain ID:D2021453-ME -Domain Name:FACTORYOUTLET.ME -Domain Create Date:27-May-2011 16:22:58 UTC -Domain Last Updated Date: -Domain Expiration Date:27-May-2012 16:22:58 UTC -Last Transferred Date: -Trademark Name: -Trademark Country: -Trademark Number: -Date Trademark Applied For: -Date Trademark Registered: -Sponsoring Registrar:Register.it S.p.A. R51-ME -Created by:Register.it S.p.A. R51-ME -Last Updated by Registrar: -Domain Status:TRANSFER PROHIBITED -Registrant ID:a66932b07c2b -Registrant Name:Attana' Simone -Registrant Organization: -Registrant Address:via Merano 9/11 -Registrant Address2: -Registrant Address3: -Registrant City:Gessate -Registrant State/Province:MI -Registrant Country/Economy:IT -Registrant Postal Code:20060 -Registrant Phone:+39.0295780392 -Registrant Phone Ext.: -Registrant FAX:+39.0295780392 -Registrant FAX Ext.: -Registrant E-mail:amministrazione@simoneattana.com -Admin ID:a6ea540dd5aa -Admin Name:Attana' Simone -Admin Organization:Simone Attana' -Admin Address:via Merano 9/11 -Admin Address2: -Admin Address3: -Admin City:Gessate -Admin State/Province:MI -Admin Country/Economy:IT -Admin Postal Code:20060 -Admin Phone:+39.0295780392 -Admin Phone Ext.: -Admin FAX:+39.0295780392 -Admin FAX Ext.: -Admin E-mail:amministrazione@simoneattana.com -Tech ID:FR-11b2b6d2f885 -Tech Name:Technical support -Tech Organization:REGISTER.IT S.p.a. -Tech Address:Via Ponti, 6 -Tech Address2: -Tech Address3: -Tech City:Bergamo -Tech State/Province:BG -Tech Country/Economy:IT -Tech Postal Code:24126 -Tech Phone:+39.0353230300 -Tech Phone Ext.: -Tech FAX:+39.0353230312 -Tech FAX Ext.: -Tech E-mail:support@register.it -Nameservers:NS1.REGISTER.IT -Nameservers:NS2.REGISTER.IT -Nameservers: -Nameservers: -Nameservers: -Nameservers: -Nameservers: -Nameservers: -Nameservers: -Nameservers: -Nameservers: -Nameservers: -Nameservers: - +Domain Name: WOSSNA.ME +Registry Domain ID: D108500000011193422-AGRS +Registrar WHOIS Server: whois.gandi.net +Registrar URL: http://www.gandi.net +Updated Date: +Creation Date: 2014-01-29T07:32:26Z +Registry Expiry Date: 2024-01-29T07:32:26Z +Registrar Registration Expiration Date: +Registrar: Gandi SAS +Registrar IANA ID: 81 +Registrar Abuse Contact Email: abuse@support.gandi.net +Registrar Abuse Contact Phone: +33.170377661 +Reseller: +Domain Status: clientTransferProhibited https://icann.org/epp#clientTransferProhibited +Registrant Organization: +Registrant State/Province: Paris +Registrant Country: FR +Name Server: B.DNS.GANDI.NET +Name Server: C.DNS.GANDI.NET +Name Server: A.DNS.GANDI.NET +DNSSEC: unsigned +URL of the ICANN Whois Inaccuracy Complaint Form: https://www.icann.org/wicf/ +>>> Last update of WHOIS database: 2021-11-09T14:03:27Z <<< +For more information on Whois status codes, please visit https://icann.org/epp + +Access to WHOIS information is provided to assist persons in determining the contents of a domain name registration record in the registry database. The data in this record is provided by The Registry Operator for informational purposes only, and accuracy is not guaranteed. 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. Registry Operator reserves the right to modify these terms at any time. By submitting this query, you agree to abide by this policy. +The Registrar of Record identified in this output may have an RDDS service that can be queried for additional information on how to contact the Registrant, Admin, or Tech contact of the queried domain name. diff --git a/spec/fixtures/responses/whois.nic.me/me/status_available.expected b/spec/fixtures/responses/whois.nic.me/me/status_available.expected index 2c3fe7a8..65f9ce91 100644 --- a/spec/fixtures/responses/whois.nic.me/me/status_available.expected +++ b/spec/fixtures/responses/whois.nic.me/me/status_available.expected @@ -1,5 +1,5 @@ #disclaimer - %s == nil + %s == "Access to WHOIS information is provided to assist persons in determining the contents of a domain name registration record in the registry database. The data in this record is provided by The Registry Operator for informational purposes only, and accuracy is not guaranteed. 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. Registry Operator reserves the right to modify these terms at any time. By submitting this query, you agree to abide by this policy. The Registrar of Record identified in this output may have an RDDS service that can be queried for additional information on how to contact the Registrant, Admin, or Tech contact of the queried domain name." #domain diff --git a/spec/fixtures/responses/whois.nic.me/me/status_available.txt b/spec/fixtures/responses/whois.nic.me/me/status_available.txt index 679aadb9..f636b0cc 100644 --- a/spec/fixtures/responses/whois.nic.me/me/status_available.txt +++ b/spec/fixtures/responses/whois.nic.me/me/status_available.txt @@ -1 +1,5 @@ NOT FOUND +>>> Last update of WHOIS database: 2021-11-09T14:27:38Z <<< + +Access to WHOIS information is provided to assist persons in determining the contents of a domain name registration record in the registry database. The data in this record is provided by The Registry Operator for informational purposes only, and accuracy is not guaranteed. 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. Registry Operator reserves the right to modify these terms at any time. By submitting this query, you agree to abide by this policy. +The Registrar of Record identified in this output may have an RDDS service that can be queried for additional information on how to contact the Registrant, Admin, or Tech contact of the queried domain name. diff --git a/spec/fixtures/responses/whois.nic.me/me/status_registered.expected b/spec/fixtures/responses/whois.nic.me/me/status_registered.expected index 6c4adbd6..efc385a5 100644 --- a/spec/fixtures/responses/whois.nic.me/me/status_registered.expected +++ b/spec/fixtures/responses/whois.nic.me/me/status_registered.expected @@ -1,16 +1,16 @@ #disclaimer - %s == "WHOIS TERMS & CONDITIONS: Access to .ME WHOIS information is provided to assist persons in determining the contents of a domain name registration record in the .ME registry database. The data in this record is provided by .ME Registry for informational purposes only, and .ME Registry 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, facsimile, or other electronic processes 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, except as reasonably necessary to register domain names or modify existing registrations. All rights reserved. .ME Registry reserves the right to modify these terms at any time. By submitting this query, you agree to abide by this policy." + %s == "Access to WHOIS information is provided to assist persons in determining the contents of a domain name registration record in the registry database. The data in this record is provided by The Registry Operator for informational purposes only, and accuracy is not guaranteed. 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. Registry Operator reserves the right to modify these terms at any time. By submitting this query, you agree to abide by this policy. The Registrar of Record identified in this output may have an RDDS service that can be queried for additional information on how to contact the Registrant, Admin, or Tech contact of the queried domain name." #domain %s == "google.me" #domain_id - %s == "D11599-ME" + %s == "D108500000000011599-AGRS" #status - %s == ["CLIENT DELETE PROHIBITED", "CLIENT TRANSFER PROHIBITED", "CLIENT UPDATE PROHIBITED", "DELETE PROHIBITED", "TRANSFER PROHIBITED", "UPDATE PROHIBITED"] + %s == ["clientDeleteProhibited https://icann.org/epp#clientDeleteProhibited", "clientTransferProhibited https://icann.org/epp#clientTransferProhibited", "clientUpdateProhibited https://icann.org/epp#clientUpdateProhibited", "serverDeleteProhibited https://icann.org/epp#serverDeleteProhibited", "serverTransferProhibited https://icann.org/epp#serverTransferProhibited", "serverUpdateProhibited https://icann.org/epp#serverUpdateProhibited"] #available? %s == false @@ -25,79 +25,51 @@ #updated_on %s %CLASS{time} - %s %TIME{2013-05-12 09:21:14 UTC} + %s %TIME{2021-05-12 09:39:59 UTC} #expires_on %s %CLASS{time} - %s %TIME{2014-06-13 17:17:40 UTC} + %s %TIME{2022-06-13 17:17:40 UTC} #registrar %s %CLASS{registrar} - %s.id == "R45-ME" - %s.name == "MarkMonitor Inc" - %s.organization == nil - %s.url == nil + %s.id == "292" + %s.name == "MarkMonitor Inc." + %s.url == "http://www.markmonitor.com" #registrant_contacts %s %CLASS{array} %s %SIZE{1} %s[0] %CLASS{contact} %s[0].type == Whois::Parser::Contact::TYPE_REGISTRANT - %s[0].id == "mmr-32097" - %s[0].name == "DNS Admin" - %s[0].organization == "Google Inc." - %s[0].address == "1600 Amphitheatre Parkway" - %s[0].city == "Mountain View" - %s[0].zip == "94043" + %s[0].id == nil + %s[0].name == nil + %s[0].organization == "Google LLC" + %s[0].address == nil + %s[0].city == nil + %s[0].zip == nil %s[0].state == "CA" %s[0].country_code == "US" - %s[0].phone == "+1.6506234000" - %s[0].fax == "+1.6506188571" - %s[0].email == "dotme@markmonitor.com" + %s[0].phone == nil + %s[0].fax == nil + %s[0].email == nil #admin_contacts %s %CLASS{array} - %s %SIZE{1} - %s[0] %CLASS{contact} - %s[0].type == Whois::Parser::Contact::TYPE_ADMINISTRATIVE - %s[0].id == "mmr-32097" - %s[0].name == "DNS Admin" - %s[0].organization == "Google Inc." - %s[0].address == "1600 Amphitheatre Parkway" - %s[0].city == "Mountain View" - %s[0].zip == "94043" - %s[0].state == "CA" - %s[0].country_code == "US" - %s[0].phone == "+1.6506234000" - %s[0].fax == "+1.6506188571" - %s[0].email == "dotme@markmonitor.com" + %s %SIZE{0} #technical_contacts %s %CLASS{array} - %s %SIZE{1} - %s[0] %CLASS{contact} - %s[0].type == Whois::Parser::Contact::TYPE_TECHNICAL - %s[0].id == "mmr-32097" - %s[0].name == "DNS Admin" - %s[0].organization == "Google Inc." - %s[0].address == "1600 Amphitheatre Parkway" - %s[0].city == "Mountain View" - %s[0].zip == "94043" - %s[0].state == "CA" - %s[0].country_code == "US" - %s[0].phone == "+1.6506234000" - %s[0].fax == "+1.6506188571" - %s[0].email == "dotme@markmonitor.com" - + %s %SIZE{0} #nameservers %s %CLASS{array} %s %SIZE{4} %s[0] %CLASS{nameserver} - %s[0].name == "ns2.google.com" + %s[0].name == "ns1.google.com" %s[1] %CLASS{nameserver} - %s[1].name == "ns1.google.com" + %s[1].name == "ns2.google.com" %s[2] %CLASS{nameserver} %s[2].name == "ns4.google.com" %s[3] %CLASS{nameserver} diff --git a/spec/fixtures/responses/whois.nic.me/me/status_registered.txt b/spec/fixtures/responses/whois.nic.me/me/status_registered.txt index c6cc2703..300acba8 100644 --- a/spec/fixtures/responses/whois.nic.me/me/status_registered.txt +++ b/spec/fixtures/responses/whois.nic.me/me/status_registered.txt @@ -1,98 +1,34 @@ -WHOIS TERMS & CONDITIONS: Access to .ME WHOIS information is provided to -assist persons in determining the contents of a domain name registration -record in the .ME registry database. The data in this record is provided by -.ME Registry for informational purposes only, and .ME Registry 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, -facsimile, or other electronic processes 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, -except as reasonably necessary to register domain names or modify existing -registrations. All rights reserved. .ME Registry reserves the right to modify -these terms at any time. By submitting this query, you agree to abide by this -policy. - -Domain ID:D11599-ME -Domain Name:GOOGLE.ME -Domain Create Date:13-Jun-2008 17:17:40 UTC -Domain Last Updated Date:12-May-2013 09:21:14 UTC -Domain Expiration Date:13-Jun-2014 17:17:40 UTC -Last Transferred Date: -Trademark Name:google -Trademark Country:BX -Trademark Number:Benelux-0694499 -Date Trademark Applied For:2001-09-10 -Date Trademark Registered:2002-01-01 -Sponsoring Registrar:MarkMonitor Inc R45-ME -Created by:MarkMonitor Inc R45-ME -Last Updated by Registrar:MarkMonitor Inc R45-ME -Domain Status:CLIENT DELETE PROHIBITED -Domain Status:CLIENT TRANSFER PROHIBITED -Domain Status:CLIENT UPDATE PROHIBITED -Domain Status:DELETE PROHIBITED -Domain Status:TRANSFER PROHIBITED -Domain Status:UPDATE PROHIBITED -Registrant ID:mmr-32097 -Registrant Name:DNS Admin -Registrant Organization:Google Inc. -Registrant Address:1600 Amphitheatre Parkway -Registrant Address2: -Registrant Address3: -Registrant City:Mountain View -Registrant State/Province:CA -Registrant Country/Economy:US -Registrant Postal Code:94043 -Registrant Phone:+1.6506234000 -Registrant Phone Ext.: -Registrant FAX:+1.6506188571 -Registrant FAX Ext.: -Registrant E-mail:dotme@markmonitor.com -Admin ID:mmr-32097 -Admin Name:DNS Admin -Admin Organization:Google Inc. -Admin Address:1600 Amphitheatre Parkway -Admin Address2: -Admin Address3: -Admin City:Mountain View -Admin State/Province:CA -Admin Country/Economy:US -Admin Postal Code:94043 -Admin Phone:+1.6506234000 -Admin Phone Ext.: -Admin FAX:+1.6506188571 -Admin FAX Ext.: -Admin E-mail:dotme@markmonitor.com -Tech ID:mmr-32097 -Tech Name:DNS Admin -Tech Organization:Google Inc. -Tech Address:1600 Amphitheatre Parkway -Tech Address2: -Tech Address3: -Tech City:Mountain View -Tech State/Province:CA -Tech Country/Economy:US -Tech Postal Code:94043 -Tech Phone:+1.6506234000 -Tech Phone Ext.: -Tech FAX:+1.6506188571 -Tech FAX Ext.: -Tech E-mail:dotme@markmonitor.com -Nameservers:NS2.GOOGLE.COM -Nameservers:NS1.GOOGLE.COM -Nameservers:NS4.GOOGLE.COM -Nameservers:NS3.GOOGLE.COM -Nameservers: -Nameservers: -Nameservers: -Nameservers: -Nameservers: -Nameservers: -Nameservers: -Nameservers: -Nameservers: -DNSSEC:Unsigned - +Domain Name: GOOGLE.ME +Registry Domain ID: D108500000000011599-AGRS +Registrar WHOIS Server: +Registrar URL: http://www.markmonitor.com +Updated Date: 2021-05-12T09:39:59Z +Creation Date: 2008-06-13T17:17:40Z +Registry Expiry Date: 2022-06-13T17:17:40Z +Registrar Registration Expiration Date: +Registrar: MarkMonitor Inc. +Registrar IANA ID: 292 +Registrar Abuse Contact Email: abusecomplaints@markmonitor.com +Registrar Abuse Contact Phone: +1.2083895740 +Reseller: +Domain Status: clientDeleteProhibited https://icann.org/epp#clientDeleteProhibited +Domain Status: clientTransferProhibited https://icann.org/epp#clientTransferProhibited +Domain Status: clientUpdateProhibited https://icann.org/epp#clientUpdateProhibited +Domain Status: serverDeleteProhibited https://icann.org/epp#serverDeleteProhibited +Domain Status: serverTransferProhibited https://icann.org/epp#serverTransferProhibited +Domain Status: serverUpdateProhibited https://icann.org/epp#serverUpdateProhibited +Registrant Organization: Google LLC +Registrant State/Province: CA +Registrant Country: US +Name Server: NS1.GOOGLE.COM +Name Server: NS2.GOOGLE.COM +Name Server: NS4.GOOGLE.COM +Name Server: NS3.GOOGLE.COM +DNSSEC: unsigned +URL of the ICANN Whois Inaccuracy Complaint Form: https://www.icann.org/wicf/ +>>> Last update of WHOIS database: 2021-11-09T14:08:25Z <<< +For more information on Whois status codes, please visit https://icann.org/epp + +Access to WHOIS information is provided to assist persons in determining the contents of a domain name registration record in the registry database. The data in this record is provided by The Registry Operator for informational purposes only, and accuracy is not guaranteed. 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. Registry Operator reserves the right to modify these terms at any time. By submitting this query, you agree to abide by this policy. +The Registrar of Record identified in this output may have an RDDS service that can be queried for additional information on how to contact the Registrant, Admin, or Tech contact of the queried domain name. diff --git a/spec/fixtures/responses/whois.nic.mg/mg/status_registered.expected b/spec/fixtures/responses/whois.nic.mg/mg/status_registered.expected index c573c0a8..06b57ae8 100644 --- a/spec/fixtures/responses/whois.nic.mg/mg/status_registered.expected +++ b/spec/fixtures/responses/whois.nic.mg/mg/status_registered.expected @@ -32,7 +32,6 @@ %s %CLASS{registrar} %s.id == nil %s.name == "MarkMonitor" - %s.organization == nil %s.url == "http://www.markmonitor.com" diff --git a/spec/fixtures/responses/whois.nic.ms/ms/status_registered.expected b/spec/fixtures/responses/whois.nic.ms/ms/status_registered.expected index b2d6e0f7..be0b94c2 100644 --- a/spec/fixtures/responses/whois.nic.ms/ms/status_registered.expected +++ b/spec/fixtures/responses/whois.nic.ms/ms/status_registered.expected @@ -32,7 +32,6 @@ %s %CLASS{registrar} %s.id == nil %s.name == "MarkMonitor" - %s.organization == nil %s.url == "http://www.markmonitor.com" diff --git a/spec/fixtures/responses/whois.nic.mu/mu/status_registered.expected b/spec/fixtures/responses/whois.nic.mu/mu/status_registered.expected index 8ab648a9..82607948 100644 --- a/spec/fixtures/responses/whois.nic.mu/mu/status_registered.expected +++ b/spec/fixtures/responses/whois.nic.mu/mu/status_registered.expected @@ -32,7 +32,6 @@ %s %CLASS{registrar} %s.id == nil %s.name == "MarkMonitor" - %s.organization == nil %s.url == "http://www.markmonitor.com" diff --git a/spec/fixtures/responses/whois.nic.net.ng/ng/status_registered.expected b/spec/fixtures/responses/whois.nic.net.ng/ng/status_registered.expected index 2c068961..e776542a 100644 --- a/spec/fixtures/responses/whois.nic.net.ng/ng/status_registered.expected +++ b/spec/fixtures/responses/whois.nic.net.ng/ng/status_registered.expected @@ -32,7 +32,6 @@ %s %CLASS{registrar} %s.id == nil %s.name == "nira" - %s.organization == nil %s.url == nil diff --git a/spec/fixtures/responses/whois.nic.net.sb/sb/status_registered.expected b/spec/fixtures/responses/whois.nic.net.sb/sb/status_registered.expected index 61a0dfe9..2e0ad578 100644 --- a/spec/fixtures/responses/whois.nic.net.sb/sb/status_registered.expected +++ b/spec/fixtures/responses/whois.nic.net.sb/sb/status_registered.expected @@ -32,7 +32,6 @@ %s %CLASS{registrar} %s.id == nil %s.name == "Key-Systems" - %s.organization == nil %s.url == "http://www.key-systems.net" diff --git a/spec/fixtures/responses/whois.nic.nf/nf/status_registered.expected b/spec/fixtures/responses/whois.nic.nf/nf/status_registered.expected index a88215fe..4456b64f 100644 --- a/spec/fixtures/responses/whois.nic.nf/nf/status_registered.expected +++ b/spec/fixtures/responses/whois.nic.nf/nf/status_registered.expected @@ -32,7 +32,6 @@ %s %CLASS{registrar} %s.id == nil %s.name == "MarkMonitor" - %s.organization == nil %s.url == "http://www.markmonitor.com" diff --git a/spec/fixtures/responses/whois.nic.pw/pw/status_registered.expected b/spec/fixtures/responses/whois.nic.pw/pw/status_registered.expected index 5c22ba99..e25216a3 100644 --- a/spec/fixtures/responses/whois.nic.pw/pw/status_registered.expected +++ b/spec/fixtures/responses/whois.nic.pw/pw/status_registered.expected @@ -35,8 +35,7 @@ #registrar %s %CLASS{registrar} %s.id == "7061-EM" - %s.name == nil - %s.organization == "MarkMonitor, Inc." + %s.name == "MarkMonitor, Inc." %s.url == "http://www.markmonitor.com/" #registrant_contacts diff --git a/spec/fixtures/responses/whois.nic.sh/sh/status_registered.expected b/spec/fixtures/responses/whois.nic.sh/sh/status_registered.expected index 1a13f5b9..bc289911 100644 --- a/spec/fixtures/responses/whois.nic.sh/sh/status_registered.expected +++ b/spec/fixtures/responses/whois.nic.sh/sh/status_registered.expected @@ -36,7 +36,6 @@ %s %CLASS{registrar} %s.id == "292" %s.name == "MarkMonitor Inc." - %s.organization == "MarkMonitor Inc." %s.url == "http://www.markmonitor.com" #registrant_contacts diff --git a/spec/fixtures/responses/whois.nic.space/space/status_registered.expected b/spec/fixtures/responses/whois.nic.space/space/status_registered.expected index fe2f63aa..a7478646 100644 --- a/spec/fixtures/responses/whois.nic.space/space/status_registered.expected +++ b/spec/fixtures/responses/whois.nic.space/space/status_registered.expected @@ -36,7 +36,6 @@ %s %CLASS{registrar} %s.id == "9999" %s.name == "CentralNic Ltd" - %s.organization == nil %s.url == nil #registrant_contacts diff --git a/spec/fixtures/responses/whois.nic.tc/tc/status_registered.expected b/spec/fixtures/responses/whois.nic.tc/tc/status_registered.expected index c6e776ae..fa465c04 100644 --- a/spec/fixtures/responses/whois.nic.tc/tc/status_registered.expected +++ b/spec/fixtures/responses/whois.nic.tc/tc/status_registered.expected @@ -31,7 +31,6 @@ %s %CLASS{registrar} %s.id == "292" %s.name == "MarkMonitor" - %s.organization == nil %s.url == nil diff --git a/spec/fixtures/responses/whois.nic.tech/tech/status_registered.expected b/spec/fixtures/responses/whois.nic.tech/tech/status_registered.expected index ee412458..e8486714 100644 --- a/spec/fixtures/responses/whois.nic.tech/tech/status_registered.expected +++ b/spec/fixtures/responses/whois.nic.tech/tech/status_registered.expected @@ -36,7 +36,6 @@ %s %CLASS{registrar} %s.id == "292" %s.name == "MarkMonitor, Inc (TLDs)" - %s.organization == nil %s.url == nil #registrant_contacts diff --git a/spec/fixtures/responses/whois.nic.tl/tl/status_registered.expected b/spec/fixtures/responses/whois.nic.tl/tl/status_registered.expected index 030dcb90..c9f52cce 100644 --- a/spec/fixtures/responses/whois.nic.tl/tl/status_registered.expected +++ b/spec/fixtures/responses/whois.nic.tl/tl/status_registered.expected @@ -32,7 +32,6 @@ %s %CLASS{registrar} %s.id == nil %s.name == "MarkMonitor" - %s.organization == nil %s.url == "http://www.markmonitor.com" diff --git a/spec/fixtures/responses/whois.nic.xxx/xxx/status_available.expected b/spec/fixtures/responses/whois.nic.xxx/xxx/status_available.expected index 31e4bf0c..851c6127 100644 --- a/spec/fixtures/responses/whois.nic.xxx/xxx/status_available.expected +++ b/spec/fixtures/responses/whois.nic.xxx/xxx/status_available.expected @@ -1,6 +1,5 @@ #disclaimer - %s == nil - + %s == "The Service is provided so that you may look up certain information in relation to domain names that we store in our database. Use of the Service is subject to our policies, in particular you should familiarise yourself with our Acceptable Use Policy and our Privacy Policy. The information provided by this Service is 'as is' and we make no guarantee of it its accuracy. You agree that by your use of the Service you will not use the information provided by us in a way which is: * inconsistent with any applicable laws, * inconsistent with any policy issued by us, * to generate, distribute, or facilitate unsolicited mass email, promotions, advertisings or other solicitations, or * to enable high volume, automated, electronic processes that apply to the Service. You acknowledge that: * a response from the Service that a domain name is 'available', does not guarantee that is able to be registered, * we may restrict, suspend or terminate your access to the Service at any time, and * the copying, compilation, repackaging, dissemination or other use of the information provided by the Service is not permitted, without our express written consent. This information has been prepared and published in order to represent administrative and technical management of the TLD. We may discontinue or amend any part or the whole of these Terms of Service from time to time at our absolute discretion." #domain %s == nil @@ -10,7 +9,7 @@ #status - %s == [] + %s == :available #available? %s == true diff --git a/spec/fixtures/responses/whois.nic.xxx/xxx/status_available.txt b/spec/fixtures/responses/whois.nic.xxx/xxx/status_available.txt index 679aadb9..5f7c8633 100644 --- a/spec/fixtures/responses/whois.nic.xxx/xxx/status_available.txt +++ b/spec/fixtures/responses/whois.nic.xxx/xxx/status_available.txt @@ -1 +1,26 @@ -NOT FOUND +No Data Found +URL of the ICANN Whois Inaccuracy Complaint Form: https://www.icann.org/wicf/ +>>> Last update of WHOIS database: 2021-11-09T21:50:19Z <<< + +For more information on Whois status codes, please visit https://icann.org/epp + +The Service is provided so that you may look up certain information in relation to domain names that we store in our database. + +Use of the Service is subject to our policies, in particular you should familiarise yourself with our Acceptable Use Policy and our Privacy Policy. + +The information provided by this Service is 'as is' and we make no guarantee of it its accuracy. + +You agree that by your use of the Service you will not use the information provided by us in a way which is: +* inconsistent with any applicable laws, +* inconsistent with any policy issued by us, +* to generate, distribute, or facilitate unsolicited mass email, promotions, advertisings or other solicitations, or +* to enable high volume, automated, electronic processes that apply to the Service. + +You acknowledge that: +* a response from the Service that a domain name is 'available', does not guarantee that is able to be registered, +* we may restrict, suspend or terminate your access to the Service at any time, and +* the copying, compilation, repackaging, dissemination or other use of the information provided by the Service is not permitted, without our express written consent. + +This information has been prepared and published in order to represent administrative and technical management of the TLD. + +We may discontinue or amend any part or the whole of these Terms of Service from time to time at our absolute discretion. diff --git a/spec/fixtures/responses/whois.nic.xxx/xxx/status_registered.expected b/spec/fixtures/responses/whois.nic.xxx/xxx/status_registered.expected index b13fe02e..820c03e0 100644 --- a/spec/fixtures/responses/whois.nic.xxx/xxx/status_registered.expected +++ b/spec/fixtures/responses/whois.nic.xxx/xxx/status_registered.expected @@ -1,16 +1,16 @@ #disclaimer - %s == "Access to .XXX ICM REGISTRY WHOIS information is provided to assist persons in determining the contents of a domain name registration record in the ICM registry database. The data in this record is provided by ICM Registry for informational purposes only, and ICM 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. ICM reserves the right to modify these terms at any time. By submitting this query, you agree to abide by this policy." + %s == "The Service is provided so that you may look up certain information in relation to domain names that we store in our database. Use of the Service is subject to our policies, in particular you should familiarise yourself with our Acceptable Use Policy and our Privacy Policy. The information provided by this Service is 'as is' and we make no guarantee of it its accuracy. You agree that by your use of the Service you will not use the information provided by us in a way which is: * inconsistent with any applicable laws, * inconsistent with any policy issued by us, * to generate, distribute, or facilitate unsolicited mass email, promotions, advertisings or other solicitations, or * to enable high volume, automated, electronic processes that apply to the Service. You acknowledge that: * a response from the Service that a domain name is 'available', does not guarantee that is able to be registered, * we may restrict, suspend or terminate your access to the Service at any time, and * the copying, compilation, repackaging, dissemination or other use of the information provided by the Service is not permitted, without our express written consent. This information has been prepared and published in order to represent administrative and technical management of the TLD. We may discontinue or amend any part or the whole of these Terms of Service from time to time at our absolute discretion." #domain - %s == "masala.xxx" + %s == "sex.xxx" #domain_id - %s == "D130773-XXX" + %s == "D855895-GDREG" #status - %s == ["ok"] + %s == :registered #available? %s == false @@ -21,86 +21,89 @@ #created_on %s %CLASS{time} - %s %TIME{2011-12-01 01:37:55 UTC} + %s %TIME{2012-05-31 14:58:50 UTC} #updated_on %s %CLASS{time} - %s %TIME{2013-12-02 22:20:04 UTC} + %s %TIME{2021-05-01 08:25:32 UTC} #expires_on %s %CLASS{time} - %s %TIME{2014-12-01 01:37:55 UTC} + %s %TIME{2022-05-31 14:58:50 UTC} #registrar %s %CLASS{registrar} - %s.id == "R3228-XXX" - %s.name == "Mesh Digital Limited" - %s.organization == nil - %s.url == nil + %s.id == "625" + %s.name == "Name.com, Inc." + %s.url == "www.name.com" #registrant_contacts %s %CLASS{array} %s %SIZE{1} %s[0] %CLASS{contact} %s[0].type == Whois::Parser::Contact::TYPE_REGISTRANT - %s[0].id == "MNT5BB23000590" - %s[0].name == "Domainmonster.com Privacy Service" - %s[0].organization == "Identity Protect Limited" - %s[0].address == "PO Box 795" - %s[0].city == "Godalming" - %s[0].zip == "GU7 9GA" - %s[0].state == "Surrey" + %s[0].id == "REDACTED FOR PRIVACY" + %s[0].name == "REDACTED FOR PRIVACY" + %s[0].organization == "Domain Protection Services, Inc." + %s[0].address == "REDACTED FOR PRIVACY, REDACTED FOR PRIVACY, REDACTED FOR PRIVACY" + %s[0].city == "REDACTED FOR PRIVACY" + %s[0].zip == "REDACTED FOR PRIVACY" + %s[0].state == "" %s[0].country == nil - %s[0].country_code == "GB" - %s[0].phone == "+44.1483307527" - %s[0].fax == "+44.1483304031" - %s[0].email == "masala.xxx@privatemonster.com" + %s[0].country_code == "US" + %s[0].phone == "REDACTED FOR PRIVACY ext: REDACTED FOR PRIVACY" + %s[0].fax == "REDACTED FOR PRIVACY ext: REDACTED FOR PRIVACY" + %s[0].email == "Please query the RDDS service of the Registrar of Record identified in this output for information on how to contact the Registrant, Admin, or Tech contact of the queried domain name." #admin_contacts %s %CLASS{array} %s %SIZE{1} %s[0] %CLASS{contact} %s[0].type == Whois::Parser::Contact::TYPE_ADMINISTRATIVE - %s[0].id == "MNT5BB23000590" - %s[0].name == "Domainmonster.com Privacy Service" - %s[0].organization == "Identity Protect Limited" - %s[0].address == "PO Box 795" - %s[0].city == "Godalming" - %s[0].zip == "GU7 9GA" - %s[0].state == "Surrey" + %s[0].id == "REDACTED FOR PRIVACY" + %s[0].name == "REDACTED FOR PRIVACY" + %s[0].organization == "REDACTED FOR PRIVACY" + %s[0].address == "REDACTED FOR PRIVACY, REDACTED FOR PRIVACY, REDACTED FOR PRIVACY" + %s[0].city == "REDACTED FOR PRIVACY" + %s[0].zip == "REDACTED FOR PRIVACY" + %s[0].state == "REDACTED FOR PRIVACY" %s[0].country == nil - %s[0].country_code == "GB" - %s[0].phone == "+44.1483307527" - %s[0].fax == "+44.1483304031" - %s[0].email == "masala.xxx@privatemonster.com" + %s[0].country_code == "REDACTED FOR PRIVACY" + %s[0].phone == "REDACTED FOR PRIVACY ext: REDACTED FOR PRIVACY" + %s[0].fax == "REDACTED FOR PRIVACY ext: REDACTED FOR PRIVACY" + %s[0].email == "Please query the RDDS service of the Registrar of Record identified in this output for information on how to contact the Registrant, Admin, or Tech contact of the queried domain name." #technical_contacts %s %CLASS{array} %s %SIZE{1} %s[0] %CLASS{contact} %s[0].type == Whois::Parser::Contact::TYPE_TECHNICAL - %s[0].id == "MNT5BB23000590" - %s[0].name == "Domainmonster.com Privacy Service" - %s[0].organization == "Identity Protect Limited" - %s[0].address == "PO Box 795" - %s[0].city == "Godalming" - %s[0].zip == "GU7 9GA" - %s[0].state == "Surrey" + %s[0].id == "REDACTED FOR PRIVACY" + %s[0].name == "REDACTED FOR PRIVACY" + %s[0].organization == "REDACTED FOR PRIVACY" + %s[0].address == "REDACTED FOR PRIVACY, REDACTED FOR PRIVACY, REDACTED FOR PRIVACY" + %s[0].city == "REDACTED FOR PRIVACY" + %s[0].zip == "REDACTED FOR PRIVACY" + %s[0].state == "REDACTED FOR PRIVACY" %s[0].country == nil - %s[0].country_code == "GB" - %s[0].phone == "+44.1483307527" - %s[0].fax == "+44.1483304031" - %s[0].email == "masala.xxx@privatemonster.com" + %s[0].country_code == "REDACTED FOR PRIVACY" + %s[0].phone == "REDACTED FOR PRIVACY ext: REDACTED FOR PRIVACY" + %s[0].fax == "REDACTED FOR PRIVACY ext: REDACTED FOR PRIVACY" + %s[0].email == "Please query the RDDS service of the Registrar of Record identified in this output for information on how to contact the Registrant, Admin, or Tech contact of the queried domain name." #nameservers %s %CLASS{array} - %s %SIZE{2} + %s %SIZE{4} %s[0] %CLASS{nameserver} - %s[0].name == "ns39.domaincontrol.com" + %s[0].name == "ns4.imlns.com" %s[1] %CLASS{nameserver} - %s[1].name == "ns40.domaincontrol.com" + %s[1].name == "ns3.imlns.com" + %s[2] %CLASS{nameserver} + %s[2].name == "ns1.imlns.com" + %s[3] %CLASS{nameserver} + %s[3].name == "ns.imlns.com" #reserved? diff --git a/spec/fixtures/responses/whois.nic.xxx/xxx/status_registered.txt b/spec/fixtures/responses/whois.nic.xxx/xxx/status_registered.txt index 5b23d22c..be05bb7c 100644 --- a/spec/fixtures/responses/whois.nic.xxx/xxx/status_registered.txt +++ b/spec/fixtures/responses/whois.nic.xxx/xxx/status_registered.txt @@ -1,66 +1,87 @@ -Domain Name:MASALA.XXX -Domain ID: D130773-XXX -Creation Date: 01-Dec-2011 01:37:55 UTC -Updated Date: 02-Dec-2013 22:20:04 UTC -Registry Expiry Date: 01-Dec-2014 01:37:55 UTC -Sponsoring Registrar:Mesh Digital Limited (R3228-XXX) -Sponsoring Registrar IANA ID: 1390 -WHOIS Server: -Referral URL: -Domain Status: ok -Registrant ID:MNT5BB23000590 -Registrant Name:Domainmonster.com Privacy Service -Registrant Organization:Identity Protect Limited -Registrant Street: PO Box 795 -Registrant City:Godalming -Registrant State/Province:Surrey -Registrant Postal Code:GU7 9GA -Registrant Country:GB -Registrant Phone:+44.1483307527 -Registrant Phone Ext: -Registrant Fax: +44.1483304031 -Registrant Fax Ext: -Registrant Email:masala.xxx@privatemonster.com -Admin ID:MNT5BB23000590 -Admin Name:Domainmonster.com Privacy Service -Admin Organization:Identity Protect Limited -Admin Street: PO Box 795 -Admin City:Godalming -Admin State/Province:Surrey -Admin Postal Code:GU7 9GA -Admin Country:GB -Admin Phone:+44.1483307527 -Admin Phone Ext: -Admin Fax: +44.1483304031 -Admin Fax Ext: -Admin Email:masala.xxx@privatemonster.com -Tech ID:MNT5BB23000590 -Tech Name:Domainmonster.com Privacy Service -Tech Organization:Identity Protect Limited -Tech Street: PO Box 795 -Tech City:Godalming -Tech State/Province:Surrey -Tech Postal Code:GU7 9GA -Tech Country:GB -Tech Phone:+44.1483307527 -Tech Phone Ext: -Tech Fax: +44.1483304031 -Tech Fax Ext: -Tech Email:masala.xxx@privatemonster.com -Name Server:NS39.DOMAINCONTROL.COM -Name Server:NS40.DOMAINCONTROL.COM -Name Server: -Name Server: -Name Server: -Name Server: -Name Server: -Name Server: -Name Server: -Name Server: -Name Server: -Name Server: -Name Server: +Domain Name: sex.xxx +Registry Domain ID: D855895-GDREG +Registrar WHOIS Server: +Registrar URL: www.name.com +Updated Date: 2021-05-01T08:25:32Z +Creation Date: 2012-05-31T14:58:50Z +Registry Expiry Date: 2022-05-31T14:58:50Z +Registrar: Name.com, Inc. +Registrar IANA ID: 625 +Registrar Abuse Contact Email: abuse@name.com +Registrar Abuse Contact Phone: +1.7203101849 +Domain Status: clientTransferProhibited https://icann.org/epp#clientTransferProhibited +Registry Registrant ID: REDACTED FOR PRIVACY +Registrant Name: REDACTED FOR PRIVACY +Registrant Organization: Domain Protection Services, Inc. +Registrant Street: REDACTED FOR PRIVACY +Registrant Street: REDACTED FOR PRIVACY +Registrant Street: REDACTED FOR PRIVACY +Registrant City: REDACTED FOR PRIVACY +Registrant State/Province: +Registrant Postal Code: REDACTED FOR PRIVACY +Registrant Country: US +Registrant Phone: REDACTED FOR PRIVACY +Registrant Phone Ext: REDACTED FOR PRIVACY +Registrant Fax: REDACTED FOR PRIVACY +Registrant Fax Ext: REDACTED FOR PRIVACY +Registrant Email: Please query the RDDS service of the Registrar of Record identified in this output for information on how to contact the Registrant, Admin, or Tech contact of the queried domain name. +Registry Admin ID: REDACTED FOR PRIVACY +Admin Name: REDACTED FOR PRIVACY +Admin Organization: REDACTED FOR PRIVACY +Admin Street: REDACTED FOR PRIVACY +Admin Street: REDACTED FOR PRIVACY +Admin Street: REDACTED FOR PRIVACY +Admin City: REDACTED FOR PRIVACY +Admin State/Province: REDACTED FOR PRIVACY +Admin Postal Code: REDACTED FOR PRIVACY +Admin Country: REDACTED FOR PRIVACY +Admin Phone: REDACTED FOR PRIVACY +Admin Phone Ext: REDACTED FOR PRIVACY +Admin Fax: REDACTED FOR PRIVACY +Admin Fax Ext: REDACTED FOR PRIVACY +Admin Email: Please query the RDDS service of the Registrar of Record identified in this output for information on how to contact the Registrant, Admin, or Tech contact of the queried domain name. +Registry Tech ID: REDACTED FOR PRIVACY +Tech Name: REDACTED FOR PRIVACY +Tech Organization: REDACTED FOR PRIVACY +Tech Street: REDACTED FOR PRIVACY +Tech Street: REDACTED FOR PRIVACY +Tech Street: REDACTED FOR PRIVACY +Tech City: REDACTED FOR PRIVACY +Tech State/Province: REDACTED FOR PRIVACY +Tech Postal Code: REDACTED FOR PRIVACY +Tech Country: REDACTED FOR PRIVACY +Tech Phone: REDACTED FOR PRIVACY +Tech Phone Ext: REDACTED FOR PRIVACY +Tech Fax: REDACTED FOR PRIVACY +Tech Fax Ext: REDACTED FOR PRIVACY +Tech Email: Please query the RDDS service of the Registrar of Record identified in this output for information on how to contact the Registrant, Admin, or Tech contact of the queried domain name. +Name Server: ns4.imlns.com +Name Server: ns3.imlns.com +Name Server: ns1.imlns.com +Name Server: ns.imlns.com +DNSSEC: unsigned +URL of the ICANN Whois Inaccuracy Complaint Form: https://www.icann.org/wicf/ +>>> Last update of WHOIS database: 2021-11-09T21:49:36Z <<< -Access to .XXX ICM REGISTRY WHOIS information is provided to assist persons in determining the contents of a domain name registration record in the ICM registry database. The data in this record is provided by ICM Registry for informational purposes only, and ICM 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. ICM reserves the right to modify these terms at any time. By submitting this query, you agree to abide by this policy. +For more information on Whois status codes, please visit https://icann.org/epp +The Service is provided so that you may look up certain information in relation to domain names that we store in our database. +Use of the Service is subject to our policies, in particular you should familiarise yourself with our Acceptable Use Policy and our Privacy Policy. + +The information provided by this Service is 'as is' and we make no guarantee of it its accuracy. + +You agree that by your use of the Service you will not use the information provided by us in a way which is: +* inconsistent with any applicable laws, +* inconsistent with any policy issued by us, +* to generate, distribute, or facilitate unsolicited mass email, promotions, advertisings or other solicitations, or +* to enable high volume, automated, electronic processes that apply to the Service. + +You acknowledge that: +* a response from the Service that a domain name is 'available', does not guarantee that is able to be registered, +* we may restrict, suspend or terminate your access to the Service at any time, and +* the copying, compilation, repackaging, dissemination or other use of the information provided by the Service is not permitted, without our express written consent. + +This information has been prepared and published in order to represent administrative and technical management of the TLD. + +We may discontinue or amend any part or the whole of these Terms of Service from time to time at our absolute discretion. diff --git a/spec/fixtures/responses/whois.nic.xxx/xxx/status_reserved.txt b/spec/fixtures/responses/whois.nic.xxx/xxx/status_reserved.txt index b9b91ce7..7b990057 100644 --- a/spec/fixtures/responses/whois.nic.xxx/xxx/status_reserved.txt +++ b/spec/fixtures/responses/whois.nic.xxx/xxx/status_reserved.txt @@ -1 +1,26 @@ -Reserved by ICM Registry +Reserved Domain Name +URL of the ICANN Whois Inaccuracy Complaint Form: https://www.icann.org/wicf/ +>>> Last update of WHOIS database: 2021-11-09T21:52:15Z <<< + +For more information on Whois status codes, please visit https://icann.org/epp + +The Service is provided so that you may look up certain information in relation to domain names that we store in our database. + +Use of the Service is subject to our policies, in particular you should familiarise yourself with our Acceptable Use Policy and our Privacy Policy. + +The information provided by this Service is 'as is' and we make no guarantee of it its accuracy. + +You agree that by your use of the Service you will not use the information provided by us in a way which is: +* inconsistent with any applicable laws, +* inconsistent with any policy issued by us, +* to generate, distribute, or facilitate unsolicited mass email, promotions, advertisings or other solicitations, or +* to enable high volume, automated, electronic processes that apply to the Service. + +You acknowledge that: +* a response from the Service that a domain name is 'available', does not guarantee that is able to be registered, +* we may restrict, suspend or terminate your access to the Service at any time, and +* the copying, compilation, repackaging, dissemination or other use of the information provided by the Service is not permitted, without our express written consent. + +This information has been prepared and published in order to represent administrative and technical management of the TLD. + +We may discontinue or amend any part or the whole of these Terms of Service from time to time at our absolute discretion. diff --git a/spec/fixtures/responses/whois.nic.xyz/xyz/status_registered.expected b/spec/fixtures/responses/whois.nic.xyz/xyz/status_registered.expected index b8b7a122..3bd8e221 100644 --- a/spec/fixtures/responses/whois.nic.xyz/xyz/status_registered.expected +++ b/spec/fixtures/responses/whois.nic.xyz/xyz/status_registered.expected @@ -36,7 +36,6 @@ %s %CLASS{registrar} %s.id == "292" %s.name == "MarkMonitor, Inc (TLDs)" - %s.organization == nil %s.url == nil #registrant_contacts diff --git a/spec/fixtures/responses/whois.pairnic.com/status_registered.expected b/spec/fixtures/responses/whois.pairnic.com/status_registered.expected index 0ba856c7..bd85ae45 100644 --- a/spec/fixtures/responses/whois.pairnic.com/status_registered.expected +++ b/spec/fixtures/responses/whois.pairnic.com/status_registered.expected @@ -32,7 +32,6 @@ %s %CLASS{registrar} %s.id == "99" %s.name == "pairNIC INC" - %s.organization == "pairNIC INC" %s.url == "https://www.pairnic.com" diff --git a/spec/fixtures/responses/whois.pandi.or.id/id/status_registered.expected b/spec/fixtures/responses/whois.pandi.or.id/id/status_registered.expected index 06bb45bf..a63fd792 100644 --- a/spec/fixtures/responses/whois.pandi.or.id/id/status_registered.expected +++ b/spec/fixtures/responses/whois.pandi.or.id/id/status_registered.expected @@ -35,8 +35,7 @@ #registrar %s %CLASS{registrar} %s.id == "digitalreg" - %s.name == nil - %s.organization == "Digital Registra" + %s.name == "Digital Registra" %s.url == nil #registrant_contacts diff --git a/spec/fixtures/responses/whois.pir.org/org/status_available.expected b/spec/fixtures/responses/whois.pir.org/org/status_available.expected index 2c3fe7a8..ed0d1c58 100644 --- a/spec/fixtures/responses/whois.pir.org/org/status_available.expected +++ b/spec/fixtures/responses/whois.pir.org/org/status_available.expected @@ -1,6 +1,5 @@ #disclaimer - %s == nil - + %s == "Access to Public Interest Registry WHOIS information is provided to assist persons in determining the contents of a domain name registration record in the Public Interest Registry registry database. The data in this record is provided by Public Interest Registry for informational purposes only, and Public Interest Registry 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. Public Interest Registry reserves the right to modify these terms at any time. By submitting this query, you agree to abide by this policy. The Registrar of Record identified in this output may have an RDDS service that can be queried for additional information on how to contact the Registrant, Admin, or Tech contact of the queried domain name." #domain %s == nil diff --git a/spec/fixtures/responses/whois.pir.org/org/status_available.txt b/spec/fixtures/responses/whois.pir.org/org/status_available.txt index 679aadb9..25c317c6 100644 --- a/spec/fixtures/responses/whois.pir.org/org/status_available.txt +++ b/spec/fixtures/responses/whois.pir.org/org/status_available.txt @@ -1 +1,6 @@ NOT FOUND +>>> Last update of WHOIS database: 2021-11-09T16:35:20Z <<< + +Access to Public Interest Registry WHOIS information is provided to assist persons in determining the contents of a domain name registration record in the Public Interest Registry registry database. The data in this record is provided by Public Interest Registry for informational purposes only, and Public Interest Registry 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. Public Interest Registry reserves the right to modify these terms at any time. By submitting this query, you agree to abide by this policy. + +The Registrar of Record identified in this output may have an RDDS service that can be queried for additional information on how to contact the Registrant, Admin, or Tech contact of the queried domain name. diff --git a/spec/fixtures/responses/whois.pir.org/org/status_registered.expected b/spec/fixtures/responses/whois.pir.org/org/status_registered.expected index bf58bfc4..af47fc90 100644 --- a/spec/fixtures/responses/whois.pir.org/org/status_registered.expected +++ b/spec/fixtures/responses/whois.pir.org/org/status_registered.expected @@ -1,5 +1,6 @@ #disclaimer - %s == "Access to Public Interest Registry WHOIS information is provided to assist persons in determining the contents of a domain name registration record in the Public Interest Registry registry database. The data in this record is provided by Public Interest Registry for informational purposes only, and Public Interest Registry 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. Public Interest Registry reserves the right to modify these terms at any time. By submitting this query, you agree to abide by this policy. Please query the RDDS service of the Registrar of Record identified in this output for information on how to contact the Registrant, Admin, or Tech contact of the queried domain name." + %s == "Access to Public Interest Registry WHOIS information is provided to assist persons in determining the contents of a domain name registration record in the Public Interest Registry registry database. The data in this record is provided by Public Interest Registry for informational purposes only, and Public Interest Registry 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. Public Interest Registry reserves the right to modify these terms at any time. By submitting this query, you agree to abide by this policy. The Registrar of Record identified in this output may have an RDDS service that can be queried for additional information on how to contact the Registrant, Admin, or Tech contact of the queried domain name." + #domain %s == "google.org" @@ -8,7 +9,7 @@ #status - %s == ["clientDeleteProhibited", "clientTransferProhibited", "clientUpdateProhibited"] + %s == ["clientDeleteProhibited https://icann.org/epp#clientDeleteProhibited", "clientTransferProhibited https://icann.org/epp#clientTransferProhibited", "clientUpdateProhibited https://icann.org/epp#clientUpdateProhibited", "serverDeleteProhibited https://icann.org/epp#serverDeleteProhibited", "serverTransferProhibited https://icann.org/epp#serverTransferProhibited", "serverUpdateProhibited https://icann.org/epp#serverUpdateProhibited"] #available? %s == false @@ -23,70 +24,43 @@ #updated_on %s %CLASS{time} - %s %TIME{2013-09-18 09:17:35 UTC} + %s %TIME{2021-09-18 09:24:00 UTC} #expires_on %s %CLASS{time} - %s %TIME{2014-10-20 04:00:00 UTC} + %s %TIME{2022-10-20 04:00:00 UTC} #registrar %s %CLASS{registrar} %s.id == "292" - %s.name == "MarkMonitor Inc. (R37-LROR)" - %s.organization == nil - %s.url == nil + %s.name == "MarkMonitor Inc." + %s.url == "http://www.markmonitor.com" #registrant_contacts %s %CLASS{array} %s %SIZE{1} %s[0] %CLASS{contact} %s[0].type == Whois::Parser::Contact::TYPE_REGISTRANT - %s[0].id == "mmr-32097" - %s[0].name == "DNS Admin" + %s[0].id == nil + %s[0].name == nil %s[0].organization == "Google Inc." - %s[0].address == "1600 Amphitheatre Parkway" - %s[0].city == "Mountain View" - %s[0].zip == "94043" + %s[0].address == nil + %s[0].city == nil + %s[0].zip == nil %s[0].state == "CA" %s[0].country_code == "US" - %s[0].phone == "+1.6506234000" - %s[0].fax == "+1.6506188571" - %s[0].email == "dns-admin@google.com" + %s[0].phone == nil + %s[0].fax == nil + %s[0].email == nil #admin_contacts %s %CLASS{array} - %s %SIZE{1} - %s[0] %CLASS{contact} - %s[0].type == Whois::Parser::Contact::TYPE_ADMINISTRATIVE - %s[0].id == "mmr-32097" - %s[0].name == "DNS Admin" - %s[0].organization == "Google Inc." - %s[0].address == "1600 Amphitheatre Parkway" - %s[0].city == "Mountain View" - %s[0].zip == "94043" - %s[0].state == "CA" - %s[0].country_code == "US" - %s[0].phone == "+1.6506234000" - %s[0].fax == "+1.6506188571" - %s[0].email == "dns-admin@google.com" + %s %SIZE{0} #technical_contacts %s %CLASS{array} - %s %SIZE{1} - %s[0] %CLASS{contact} - %s[0].type == Whois::Parser::Contact::TYPE_TECHNICAL - %s[0].id == "mmr-32097" - %s[0].name == "DNS Admin" - %s[0].organization == "Google Inc." - %s[0].address == "1600 Amphitheatre Parkway" - %s[0].city == "Mountain View" - %s[0].zip == "94043" - %s[0].state == "CA" - %s[0].country_code == "US" - %s[0].phone == "+1.6506234000" - %s[0].fax == "+1.6506188571" - %s[0].email == "dns-admin@google.com" + %s %SIZE{0} #nameservers diff --git a/spec/fixtures/responses/whois.pir.org/org/status_registered.txt b/spec/fixtures/responses/whois.pir.org/org/status_registered.txt index 1823f173..98630737 100644 --- a/spec/fixtures/responses/whois.pir.org/org/status_registered.txt +++ b/spec/fixtures/responses/whois.pir.org/org/status_registered.txt @@ -1,67 +1,35 @@ -Domain Name:GOOGLE.ORG -Domain ID: D2244233-LROR +Domain Name: GOOGLE.ORG +Registry Domain ID: D2244233-LROR +Registrar WHOIS Server: whois.markmonitor.com +Registrar URL: http://www.markmonitor.com +Updated Date: 2021-09-18T09:24:00Z Creation Date: 1998-10-21T04:00:00Z -Updated Date: 2013-09-18T09:17:35Z -Registry Expiry Date: 2014-10-20T04:00:00Z -Sponsoring Registrar:MarkMonitor Inc. (R37-LROR) -Sponsoring Registrar IANA ID: 292 -WHOIS Server: -Referral URL: -Domain Status: clientDeleteProhibited -Domain Status: clientTransferProhibited -Domain Status: clientUpdateProhibited -Registrant ID:mmr-32097 -Registrant Name:DNS Admin -Registrant Organization:Google Inc. -Registrant Street: 1600 Amphitheatre Parkway -Registrant City:Mountain View -Registrant State/Province:CA -Registrant Postal Code:94043 -Registrant Country:US -Registrant Phone:+1.6506234000 -Registrant Phone Ext: -Registrant Fax: +1.6506188571 -Registrant Fax Ext: -Registrant Email:dns-admin@google.com -Admin ID:mmr-32097 -Admin Name:DNS Admin -Admin Organization:Google Inc. -Admin Street: 1600 Amphitheatre Parkway -Admin City:Mountain View -Admin State/Province:CA -Admin Postal Code:94043 -Admin Country:US -Admin Phone:+1.6506234000 -Admin Phone Ext: -Admin Fax: +1.6506188571 -Admin Fax Ext: -Admin Email:dns-admin@google.com -Tech ID:mmr-32097 -Tech Name:DNS Admin -Tech Organization:Google Inc. -Tech Street: 1600 Amphitheatre Parkway -Tech City:Mountain View -Tech State/Province:CA -Tech Postal Code:94043 -Tech Country:US -Tech Phone:+1.6506234000 -Tech Phone Ext: -Tech Fax: +1.6506188571 -Tech Fax Ext: -Tech Email:dns-admin@google.com -Name Server:NS2.GOOGLE.COM -Name Server:NS1.GOOGLE.COM -Name Server:NS3.GOOGLE.COM -Name Server:NS4.GOOGLE.COM -Name Server: -Name Server: -Name Server: -Name Server: -Name Server: -Name Server: -Name Server: -Name Server: -Name Server: -DNSSEC:Unsigned +Registry Expiry Date: 2022-10-20T04:00:00Z +Registrar Registration Expiration Date: +Registrar: MarkMonitor Inc. +Registrar IANA ID: 292 +Registrar Abuse Contact Email: abusecomplaints@markmonitor.com +Registrar Abuse Contact Phone: +1.2083895740 +Reseller: +Domain Status: clientDeleteProhibited https://icann.org/epp#clientDeleteProhibited +Domain Status: clientTransferProhibited https://icann.org/epp#clientTransferProhibited +Domain Status: clientUpdateProhibited https://icann.org/epp#clientUpdateProhibited +Domain Status: serverDeleteProhibited https://icann.org/epp#serverDeleteProhibited +Domain Status: serverTransferProhibited https://icann.org/epp#serverTransferProhibited +Domain Status: serverUpdateProhibited https://icann.org/epp#serverUpdateProhibited +Registrant Organization: Google Inc. +Registrant State/Province: CA +Registrant Country: US +Name Server: NS2.GOOGLE.COM +Name Server: NS1.GOOGLE.COM +Name Server: NS3.GOOGLE.COM +Name Server: NS4.GOOGLE.COM +DNSSEC: unsigned +URL of the ICANN Whois Inaccuracy Complaint Form https://www.icann.org/wicf/) +>>> Last update of WHOIS database: 2021-11-09T16:35:03Z <<< -Access to Public Interest Registry WHOIS information is provided to assist persons in determining the contents of a domain name registration record in the Public Interest Registry registry database. The data in this record is provided by Public Interest Registry for informational purposes only, and Public Interest Registry 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. Public Interest Registry reserves the right to modify these terms at any time. By submitting this query, you agree to abide by this policy. Please query the RDDS service of the Registrar of Record identified in this output for information on how to contact the Registrant, Admin, or Tech contact of the queried domain name. +For more information on Whois status codes, please visit https://icann.org/epp + +Access to Public Interest Registry WHOIS information is provided to assist persons in determining the contents of a domain name registration record in the Public Interest Registry registry database. The data in this record is provided by Public Interest Registry for informational purposes only, and Public Interest Registry 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. Public Interest Registry reserves the right to modify these terms at any time. By submitting this query, you agree to abide by this policy. + +The Registrar of Record identified in this output may have an RDDS service that can be queried for additional information on how to contact the Registrant, Admin, or Tech contact of the queried domain name. diff --git a/spec/fixtures/responses/whois.pnina.ps/ps/status_registered.expected b/spec/fixtures/responses/whois.pnina.ps/ps/status_registered.expected index 27b80d46..9cf563a4 100644 --- a/spec/fixtures/responses/whois.pnina.ps/ps/status_registered.expected +++ b/spec/fixtures/responses/whois.pnina.ps/ps/status_registered.expected @@ -31,7 +31,6 @@ %s %CLASS{registrar} %s.id == nil %s.name == "MarkMonitor Inc." - %s.organization == nil %s.url == nil diff --git a/spec/fixtures/responses/whois.registry.gy/gy/status_registered.expected b/spec/fixtures/responses/whois.registry.gy/gy/status_registered.expected index ee2a6722..ef231f1c 100644 --- a/spec/fixtures/responses/whois.registry.gy/gy/status_registered.expected +++ b/spec/fixtures/responses/whois.registry.gy/gy/status_registered.expected @@ -32,7 +32,6 @@ %s %CLASS{registrar} %s.id == nil %s.name == "MarkMonitor" - %s.organization == nil %s.url == "http://www.markmonitor.com" diff --git a/spec/fixtures/responses/whois.registry.om/om/status_registered.expected b/spec/fixtures/responses/whois.registry.om/om/status_registered.expected index 2b135776..251d455b 100644 --- a/spec/fixtures/responses/whois.registry.om/om/status_registered.expected +++ b/spec/fixtures/responses/whois.registry.om/om/status_registered.expected @@ -34,7 +34,6 @@ %s %CLASS{registrar} %s.id == nil %s.name == "Oman Telecommunication Company" - %s.organization == "Oman Telecommunication Company" %s.url == nil #registrant_contacts diff --git a/spec/fixtures/responses/whois.registry.qa/qa/status_registered.expected b/spec/fixtures/responses/whois.registry.qa/qa/status_registered.expected index 1ec84577..89a9cc0e 100644 --- a/spec/fixtures/responses/whois.registry.qa/qa/status_registered.expected +++ b/spec/fixtures/responses/whois.registry.qa/qa/status_registered.expected @@ -33,7 +33,6 @@ %s %CLASS{registrar} %s.id == "QatarTelecom" %s.name == "Qatar Telecom (Qtel) Q. S. C" - %s.organization == "Qatar Telecom (Qtel) Q. S. C" #registrant_contacts %s %CLASS{array} diff --git a/spec/fixtures/responses/whois.rnids.rs/rs/status_registered.expected b/spec/fixtures/responses/whois.rnids.rs/rs/status_registered.expected index 4dfbe278..c0348523 100644 --- a/spec/fixtures/responses/whois.rnids.rs/rs/status_registered.expected +++ b/spec/fixtures/responses/whois.rnids.rs/rs/status_registered.expected @@ -36,7 +36,6 @@ %s %CLASS{registrar} %s.id == nil %s.name == "NINET Company d.o.o." - %s.organization == nil %s.url == nil #registrant_contacts diff --git a/spec/fixtures/responses/whois.rrpproxy.net/status_registered.expected b/spec/fixtures/responses/whois.rrpproxy.net/status_registered.expected index 6f6c8b78..993b4c0c 100644 --- a/spec/fixtures/responses/whois.rrpproxy.net/status_registered.expected +++ b/spec/fixtures/responses/whois.rrpproxy.net/status_registered.expected @@ -31,7 +31,6 @@ %s %CLASS{registrar} %s.id == "269" %s.name == "Key-Systems GmbH" - %s.organization == "Key-Systems GmbH" %s.url == "http://www.reasonnet.com" diff --git a/spec/fixtures/responses/whois.safenames.net/status_registered.expected b/spec/fixtures/responses/whois.safenames.net/status_registered.expected index 5ca7c4c2..adf841e3 100644 --- a/spec/fixtures/responses/whois.safenames.net/status_registered.expected +++ b/spec/fixtures/responses/whois.safenames.net/status_registered.expected @@ -32,7 +32,6 @@ %s %CLASS{registrar} %s.id == "447" %s.name == "Safenames Ltd" - %s.organization == "Safenames Ltd" %s.url == "http://www.safenames.net" diff --git a/spec/fixtures/responses/whois.schlund.info/status_registered.expected b/spec/fixtures/responses/whois.schlund.info/status_registered.expected index 3be1e637..2951e4e6 100644 --- a/spec/fixtures/responses/whois.schlund.info/status_registered.expected +++ b/spec/fixtures/responses/whois.schlund.info/status_registered.expected @@ -32,7 +32,6 @@ %s %CLASS{registrar} %s.id == "83" %s.name == "1&1 Internet AG" - %s.organization == "1&1 Internet AG" %s.url == "http://1and1.com" diff --git a/spec/fixtures/responses/whois.smallregistry.net/status_registered.expected b/spec/fixtures/responses/whois.smallregistry.net/status_registered.expected index d01371a7..eddf7124 100644 --- a/spec/fixtures/responses/whois.smallregistry.net/status_registered.expected +++ b/spec/fixtures/responses/whois.smallregistry.net/status_registered.expected @@ -36,7 +36,6 @@ %s %CLASS{registrar} %s.id == nil %s.name == "GOOGLE" - %s.organization == "GOOGLE" %s.url == "http://www.google.com" #registrant_contacts diff --git a/spec/fixtures/responses/whois.srs.net.nz/nz/status_registered.expected b/spec/fixtures/responses/whois.srs.net.nz/nz/status_registered.expected index 014a1119..c9cacf9a 100644 --- a/spec/fixtures/responses/whois.srs.net.nz/nz/status_registered.expected +++ b/spec/fixtures/responses/whois.srs.net.nz/nz/status_registered.expected @@ -32,7 +32,6 @@ %s %CLASS{registrar} %s.id == nil %s.name == "MarkMonitor" - %s.organization == nil %s.url == nil #registrant_contacts diff --git a/spec/fixtures/responses/whois.sx/sx/status_registered.expected b/spec/fixtures/responses/whois.sx/sx/status_registered.expected index f996b4a6..58f3d04a 100644 --- a/spec/fixtures/responses/whois.sx/sx/status_registered.expected +++ b/spec/fixtures/responses/whois.sx/sx/status_registered.expected @@ -36,7 +36,6 @@ %s %CLASS{registrar} %s.id == nil %s.name == "SX Registry O" - %s.organization == nil %s.url == nil #registrant_contacts diff --git a/spec/fixtures/responses/whois.tcinet.ru/ru/status_registered.expected b/spec/fixtures/responses/whois.tcinet.ru/ru/status_registered.expected index 78a22cc4..e628ae3e 100644 --- a/spec/fixtures/responses/whois.tcinet.ru/ru/status_registered.expected +++ b/spec/fixtures/responses/whois.tcinet.ru/ru/status_registered.expected @@ -29,9 +29,8 @@ #registrar %s %CLASS{registrar} - %s.id == "RU-CENTER-REG-RIPN" - %s.name == nil - %s.organization == nil + %s.id == nil + %s.name == "RU-CENTER-REG-RIPN" #registrant_contacts %s %ERROR{AttributeNotSupported} diff --git a/spec/fixtures/responses/whois.tcinet.ru/su/status_registered.expected b/spec/fixtures/responses/whois.tcinet.ru/su/status_registered.expected index 09a350c4..28cf866f 100644 --- a/spec/fixtures/responses/whois.tcinet.ru/su/status_registered.expected +++ b/spec/fixtures/responses/whois.tcinet.ru/su/status_registered.expected @@ -29,9 +29,8 @@ #registrar %s %CLASS{registrar} - %s.id == "RUCENTER-REG-FID" - %s.name == nil - %s.organization == nil + %s.id == nil + %s.name == "RUCENTER-REG-FID" #registrant_contacts %s %ERROR{AttributeNotSupported} diff --git a/spec/fixtures/responses/whois.tcinet.ru/xn--p1ai/status_registered.expected b/spec/fixtures/responses/whois.tcinet.ru/xn--p1ai/status_registered.expected index b5ab784f..b47774a8 100644 --- a/spec/fixtures/responses/whois.tcinet.ru/xn--p1ai/status_registered.expected +++ b/spec/fixtures/responses/whois.tcinet.ru/xn--p1ai/status_registered.expected @@ -29,9 +29,8 @@ #registrar %s %CLASS{registrar} - %s.id == "R01-REG-RF" - %s.name == nil - %s.organization == nil + %s.id == nil + %s.name == "R01-REG-RF" #registrant_contacts %s %ERROR{AttributeNotSupported} diff --git a/spec/fixtures/responses/whois.tld.ee/ee/property_status_serverhold.expected b/spec/fixtures/responses/whois.tld.ee/ee/property_status_serverhold.expected index 3b360e7e..a8698953 100644 --- a/spec/fixtures/responses/whois.tld.ee/ee/property_status_serverhold.expected +++ b/spec/fixtures/responses/whois.tld.ee/ee/property_status_serverhold.expected @@ -31,7 +31,6 @@ #registrar %s %CLASS{registrar} %s.name == "Edicy OÜ" - %s.organization == "Edicy OÜ" %s.url == "http://www.edicy.com" #registrant_contacts diff --git a/spec/fixtures/responses/whois.tld.ee/ee/status_expired.expected b/spec/fixtures/responses/whois.tld.ee/ee/status_expired.expected index 7d9a2a2d..02ef55f3 100644 --- a/spec/fixtures/responses/whois.tld.ee/ee/status_expired.expected +++ b/spec/fixtures/responses/whois.tld.ee/ee/status_expired.expected @@ -28,7 +28,6 @@ #registrar %s %CLASS{registrar} %s.name == "Elisa Eesti AS" - %s.organization == "Elisa Eesti AS" %s.url == "http://www.elisa.ee" #registrant_contacts diff --git a/spec/fixtures/responses/whois.tld.ee/ee/status_registered.expected b/spec/fixtures/responses/whois.tld.ee/ee/status_registered.expected index 8aafb0f9..7af333d7 100644 --- a/spec/fixtures/responses/whois.tld.ee/ee/status_registered.expected +++ b/spec/fixtures/responses/whois.tld.ee/ee/status_registered.expected @@ -31,7 +31,6 @@ #registrar %s %CLASS{registrar} %s.name == "Elisa Eesti AS" - %s.organization == "Elisa Eesti AS" %s.url == "http://www.elisa.ee" #registrant_contacts diff --git a/spec/fixtures/responses/whois.tld.sy/sy/status_registered.expected b/spec/fixtures/responses/whois.tld.sy/sy/status_registered.expected index 47bb255f..9448b9be 100644 --- a/spec/fixtures/responses/whois.tld.sy/sy/status_registered.expected +++ b/spec/fixtures/responses/whois.tld.sy/sy/status_registered.expected @@ -31,7 +31,6 @@ %s %CLASS{registrar} %s.id == nil %s.name == "nans" - %s.organization == nil %s.url == nil diff --git a/spec/fixtures/responses/whois.tucows.com/status_registered.expected b/spec/fixtures/responses/whois.tucows.com/status_registered.expected index bb8fc20c..d740aea1 100644 --- a/spec/fixtures/responses/whois.tucows.com/status_registered.expected +++ b/spec/fixtures/responses/whois.tucows.com/status_registered.expected @@ -33,7 +33,6 @@ %s %CLASS{registrar} %s.id == "69" %s.name == "TUCOWS, INC." - %s.organization == "TUCOWS, INC." %s.url == "http://tucowsdomains.com" #registrant_contacts diff --git a/spec/fixtures/responses/whois.tznic.or.tz/tz/status_registered.expected b/spec/fixtures/responses/whois.tznic.or.tz/tz/status_registered.expected index de48fd9d..2ddeef5c 100644 --- a/spec/fixtures/responses/whois.tznic.or.tz/tz/status_registered.expected +++ b/spec/fixtures/responses/whois.tznic.or.tz/tz/status_registered.expected @@ -32,7 +32,6 @@ %s %CLASS{registrar} %s.id == "REG-TZNIC" %s.name == "REG-TZNIC" - %s.organization == nil %s.url == nil #registrant_contacts diff --git a/spec/fixtures/responses/whois.udag.net/status_registered.expected b/spec/fixtures/responses/whois.udag.net/status_registered.expected index 824b391f..fb4ce02d 100644 --- a/spec/fixtures/responses/whois.udag.net/status_registered.expected +++ b/spec/fixtures/responses/whois.udag.net/status_registered.expected @@ -32,7 +32,6 @@ %s %CLASS{registrar} %s.id == "1408" %s.name == "united domains AG" - %s.organization == "united domains AG" %s.url == "http://www.united-domains.de/" diff --git a/spec/fixtures/responses/whois.uniregistry.net/tattoo/status_registered.expected b/spec/fixtures/responses/whois.uniregistry.net/tattoo/status_registered.expected index f35425cf..3a58f876 100644 --- a/spec/fixtures/responses/whois.uniregistry.net/tattoo/status_registered.expected +++ b/spec/fixtures/responses/whois.uniregistry.net/tattoo/status_registered.expected @@ -32,7 +32,6 @@ %s %CLASS{registrar} %s.id == "9999" %s.name == "Uniregistry, Corp." - %s.organization == "Uniregistry, Corp." %s.url == nil diff --git a/spec/fixtures/responses/whois.verisign-grs.com/com/status_registered.expected b/spec/fixtures/responses/whois.verisign-grs.com/com/status_registered.expected index a8d13d23..a3d53460 100644 --- a/spec/fixtures/responses/whois.verisign-grs.com/com/status_registered.expected +++ b/spec/fixtures/responses/whois.verisign-grs.com/com/status_registered.expected @@ -36,7 +36,6 @@ %s %CLASS{registrar} %s.id == "292" %s.name == "MarkMonitor Inc." - %s.organization == nil %s.url == "http://www.markmonitor.com" diff --git a/spec/fixtures/responses/whois.verisign-grs.com/net/status_registered.expected b/spec/fixtures/responses/whois.verisign-grs.com/net/status_registered.expected index 3436048a..7e8c4ae2 100644 --- a/spec/fixtures/responses/whois.verisign-grs.com/net/status_registered.expected +++ b/spec/fixtures/responses/whois.verisign-grs.com/net/status_registered.expected @@ -36,7 +36,6 @@ %s %CLASS{registrar} %s.id == "292" %s.name == "MarkMonitor Inc." - %s.organization == nil %s.url == "http://www.markmonitor.com" diff --git a/spec/fixtures/responses/whois.wildwestdomains.com/status_registered.expected b/spec/fixtures/responses/whois.wildwestdomains.com/status_registered.expected index 7fc70147..6be4ae30 100644 --- a/spec/fixtures/responses/whois.wildwestdomains.com/status_registered.expected +++ b/spec/fixtures/responses/whois.wildwestdomains.com/status_registered.expected @@ -32,7 +32,6 @@ %s %CLASS{registrar} %s.id == "440" %s.name == "Wild West Domains, LLC" - %s.organization == "Wild West Domains, LLC" %s.url == "http://www.wildwestdomains.com" diff --git a/spec/fixtures/responses/whois.yoursrs.com/status_registered.expected b/spec/fixtures/responses/whois.yoursrs.com/status_registered.expected index e40ab085..05302e36 100644 --- a/spec/fixtures/responses/whois.yoursrs.com/status_registered.expected +++ b/spec/fixtures/responses/whois.yoursrs.com/status_registered.expected @@ -32,7 +32,6 @@ %s %CLASS{registrar} %s.id == nil %s.name == "REALTIME REGISTER B.V." - %s.organization == nil %s.url == nil diff --git a/spec/fixtures/responses/whois1.nic.bi/bi/status_registered.expected b/spec/fixtures/responses/whois1.nic.bi/bi/status_registered.expected index bc71e645..a83b93b1 100644 --- a/spec/fixtures/responses/whois1.nic.bi/bi/status_registered.expected +++ b/spec/fixtures/responses/whois1.nic.bi/bi/status_registered.expected @@ -32,7 +32,6 @@ %s %CLASS{registrar} %s.id == nil %s.name == "MarkMonito" - %s.organization == nil %s.url == nil diff --git a/spec/whois/parsers/responses/capetown-whois.registry.net.za/capetown/status_registered_spec.rb b/spec/whois/parsers/responses/capetown-whois.registry.net.za/capetown/status_registered_spec.rb index e607a7f9..304be82b 100644 --- a/spec/whois/parsers/responses/capetown-whois.registry.net.za/capetown/status_registered_spec.rb +++ b/spec/whois/parsers/responses/capetown-whois.registry.net.za/capetown/status_registered_spec.rb @@ -69,7 +69,6 @@ expect(subject.registrar).to be_a(Whois::Parser::Registrar) expect(subject.registrar.id).to eq("1466") expect(subject.registrar.name).to eq("Lexsynergy") - expect(subject.registrar.organization).to eq("Lexsynergy") expect(subject.registrar.url).to eq(nil) end end diff --git a/spec/whois/parsers/responses/ccwhois.ksregistry.net/vg/status_registered_spec.rb b/spec/whois/parsers/responses/ccwhois.ksregistry.net/vg/status_registered_spec.rb index cb8d9724..3c809f78 100644 --- a/spec/whois/parsers/responses/ccwhois.ksregistry.net/vg/status_registered_spec.rb +++ b/spec/whois/parsers/responses/ccwhois.ksregistry.net/vg/status_registered_spec.rb @@ -74,7 +74,6 @@ expect(subject.registrar).to be_a(Whois::Parser::Registrar) expect(subject.registrar.id).to eq(nil) expect(subject.registrar.name).to eq("MarkMonitor Inc.") - expect(subject.registrar.organization).to eq(nil) expect(subject.registrar.url).to eq("www.markmonitor.com") end end diff --git a/spec/whois/parsers/responses/ccwhois.verisign-grs.com/cc/status_registered_spec.rb b/spec/whois/parsers/responses/ccwhois.verisign-grs.com/cc/status_registered_spec.rb index d4e87cb1..664d5a7f 100644 --- a/spec/whois/parsers/responses/ccwhois.verisign-grs.com/cc/status_registered_spec.rb +++ b/spec/whois/parsers/responses/ccwhois.verisign-grs.com/cc/status_registered_spec.rb @@ -74,7 +74,6 @@ expect(subject.registrar).to be_a(Whois::Parser::Registrar) expect(subject.registrar.id).to eq("292") expect(subject.registrar.name).to eq("MARKMONITOR INC.") - expect(subject.registrar.organization).to eq(nil) expect(subject.registrar.url).to eq("http://www.markmonitor.com") end end diff --git a/spec/whois/parsers/responses/coza-whois.registry.net.za/co.za/status_registered_spec.rb b/spec/whois/parsers/responses/coza-whois.registry.net.za/co.za/status_registered_spec.rb index d08a661c..6e32ca1b 100644 --- a/spec/whois/parsers/responses/coza-whois.registry.net.za/co.za/status_registered_spec.rb +++ b/spec/whois/parsers/responses/coza-whois.registry.net.za/co.za/status_registered_spec.rb @@ -69,7 +69,6 @@ expect(subject.registrar).to be_a(Whois::Parser::Registrar) expect(subject.registrar.id).to eq(nil) expect(subject.registrar.name).to eq("MarkMonitor") - expect(subject.registrar.organization).to eq("MarkMonitor") expect(subject.registrar.url).to eq(nil) end end diff --git a/spec/whois/parsers/responses/durban-whois.registry.net.za/durban/status_registered_spec.rb b/spec/whois/parsers/responses/durban-whois.registry.net.za/durban/status_registered_spec.rb index 31dfeb16..9d6c4706 100644 --- a/spec/whois/parsers/responses/durban-whois.registry.net.za/durban/status_registered_spec.rb +++ b/spec/whois/parsers/responses/durban-whois.registry.net.za/durban/status_registered_spec.rb @@ -69,7 +69,6 @@ expect(subject.registrar).to be_a(Whois::Parser::Registrar) expect(subject.registrar.id).to eq("292") expect(subject.registrar.name).to eq("MarkMonitor") - expect(subject.registrar.organization).to eq("MarkMonitor") expect(subject.registrar.url).to eq(nil) end end diff --git a/spec/whois/parsers/responses/joburg-whois.registry.net.za/joburg/status_registered_spec.rb b/spec/whois/parsers/responses/joburg-whois.registry.net.za/joburg/status_registered_spec.rb index c1a356d4..ead1806d 100644 --- a/spec/whois/parsers/responses/joburg-whois.registry.net.za/joburg/status_registered_spec.rb +++ b/spec/whois/parsers/responses/joburg-whois.registry.net.za/joburg/status_registered_spec.rb @@ -69,7 +69,6 @@ expect(subject.registrar).to be_a(Whois::Parser::Registrar) expect(subject.registrar.id).to eq("1466") expect(subject.registrar.name).to eq("Lexsynergy") - expect(subject.registrar.organization).to eq("Lexsynergy") expect(subject.registrar.url).to eq(nil) end end diff --git a/spec/whois/parsers/responses/org-whois.registry.net.za/org.za/status_registered_spec.rb b/spec/whois/parsers/responses/org-whois.registry.net.za/org.za/status_registered_spec.rb index b7838db3..951b4a8a 100644 --- a/spec/whois/parsers/responses/org-whois.registry.net.za/org.za/status_registered_spec.rb +++ b/spec/whois/parsers/responses/org-whois.registry.net.za/org.za/status_registered_spec.rb @@ -69,7 +69,6 @@ expect(subject.registrar).to be_a(Whois::Parser::Registrar) expect(subject.registrar.id).to eq("9999") expect(subject.registrar.name).to eq("ZA Central Registry") - expect(subject.registrar.organization).to eq("ZA Central Registry") expect(subject.registrar.url).to eq(nil) end end diff --git a/spec/whois/parsers/responses/tvwhois.verisign-grs.com/tv/status_registered_spec.rb b/spec/whois/parsers/responses/tvwhois.verisign-grs.com/tv/status_registered_spec.rb index 164ac4c8..bbf18f19 100644 --- a/spec/whois/parsers/responses/tvwhois.verisign-grs.com/tv/status_registered_spec.rb +++ b/spec/whois/parsers/responses/tvwhois.verisign-grs.com/tv/status_registered_spec.rb @@ -74,7 +74,6 @@ expect(subject.registrar).to be_a(Whois::Parser::Registrar) expect(subject.registrar.id).to eq("292") expect(subject.registrar.name).to eq("MARKMONITOR INC.") - expect(subject.registrar.organization).to eq(nil) expect(subject.registrar.url).to eq("http://www.markmonitor.com") end end diff --git a/spec/whois/parsers/responses/whois.1und1.info/status_registered_spec.rb b/spec/whois/parsers/responses/whois.1und1.info/status_registered_spec.rb index 2999c070..85bfb6bb 100644 --- a/spec/whois/parsers/responses/whois.1und1.info/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.1und1.info/status_registered_spec.rb @@ -69,7 +69,6 @@ expect(subject.registrar).to be_a(Whois::Parser::Registrar) expect(subject.registrar.id).to eq("83") expect(subject.registrar.name).to eq("1&1 Internet AG") - expect(subject.registrar.organization).to eq("1&1 Internet AG") expect(subject.registrar.url).to eq("http://1and1.com") end end diff --git a/spec/whois/parsers/responses/whois.35.com/status_registered_spec.rb b/spec/whois/parsers/responses/whois.35.com/status_registered_spec.rb index 54dd3475..b9d529fe 100644 --- a/spec/whois/parsers/responses/whois.35.com/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.35.com/status_registered_spec.rb @@ -59,7 +59,6 @@ expect(subject.registrar).to be_a(Whois::Parser::Registrar) expect(subject.registrar.id).to eq("1316") expect(subject.registrar.name).to eq("35 Technology Co., Ltd.") - expect(subject.registrar.organization).to eq("35 Technology Co., Ltd.") expect(subject.registrar.url).to eq("http://www.35.com") end end diff --git a/spec/whois/parsers/responses/whois.aero/status_available_spec.rb b/spec/whois/parsers/responses/whois.aero/status_available_spec.rb index c5c3dd86..36f4c8d7 100644 --- a/spec/whois/parsers/responses/whois.aero/status_available_spec.rb +++ b/spec/whois/parsers/responses/whois.aero/status_available_spec.rb @@ -23,7 +23,7 @@ describe "#disclaimer" do it do - expect(subject.disclaimer).to eq(nil) + expect(subject.disclaimer).to eq("Access to WHOIS information is provided to assist persons in determining the contents of a domain name registration record in the registry database. The data in this record is provided by The Registry Operator for informational purposes only, and accuracy is not guaranteed. 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. Registry Operator reserves the right to modify these terms at any time. By submitting this query, you agree to abide by this policy. The Registrar of Record identified in this output may have an RDDS service that can be queried for additional information on how to contact the Registrant, Admin, or Tech contact of the queried domain name.") end end describe "#domain" do diff --git a/spec/whois/parsers/responses/whois.aero/status_registered_spec.rb b/spec/whois/parsers/responses/whois.aero/status_registered_spec.rb index 32d59d65..7588c512 100644 --- a/spec/whois/parsers/responses/whois.aero/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.aero/status_registered_spec.rb @@ -23,7 +23,7 @@ describe "#disclaimer" do it do - expect(subject.disclaimer).to eq("Access to .AERO WHOIS information is provided to assist persons in determining the contents of a domain name registration record in the Afilias registry database. The data in this record is provided by Afilias Limited for informational purposes only, and Afilias 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. Afilias reserves the right to modify these terms at any time. By submitting this query, you agree to abide by this policy.") + expect(subject.disclaimer).to eq("Access to WHOIS information is provided to assist persons in determining the contents of a domain name registration record in the registry database. The data in this record is provided by The Registry Operator for informational purposes only, and accuracy is not guaranteed. 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. Registry Operator reserves the right to modify these terms at any time. By submitting this query, you agree to abide by this policy. The Registrar of Record identified in this output may have an RDDS service that can be queried for additional information on how to contact the Registrant, Admin, or Tech contact of the queried domain name.") end end describe "#domain" do @@ -33,12 +33,12 @@ end describe "#domain_id" do it do - expect(subject.domain_id).to eq("D246-AERO") + expect(subject.domain_id).to eq("D108300000000000246-AGRS") end end describe "#status" do it do - expect(subject.status).to eq(["OK"]) + expect(subject.status).to eq(["clientTransferProhibited https://icann.org/epp#clientTransferProhibited"]) end end describe "#available?" do @@ -65,22 +65,21 @@ describe "#updated_on" do it do expect(subject.updated_on).to be_a(Time) - expect(subject.updated_on).to eq(Time.parse("2013-04-09 06:35:03 UTC")) + expect(subject.updated_on).to eq(Time.parse("2021-01-08 12:04:52 UTC")) end end describe "#expires_on" do it do expect(subject.expires_on).to be_a(Time) - expect(subject.expires_on).to eq(Time.parse("2014-03-26 06:48:27 UTC")) + expect(subject.expires_on).to eq(Time.parse("2022-03-26 06:48:27 UTC")) end end describe "#registrar" do it do expect(subject.registrar).to be_a(Whois::Parser::Registrar) expect(subject.registrar.id).to eq("380") - expect(subject.registrar.name).to eq("Tuonome IT") - expect(subject.registrar.organization).to eq(nil) - expect(subject.registrar.url).to eq(nil) + expect(subject.registrar.name).to eq("Tuonome.it.srl d/b/a APIsrs.com") + expect(subject.registrar.url).to eq("") end end describe "#registrant_contacts" do @@ -89,55 +88,29 @@ expect(subject.registrant_contacts.size).to eq(1) expect(subject.registrant_contacts[0]).to be_a(Whois::Parser::Contact) expect(subject.registrant_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_REGISTRANT) - expect(subject.registrant_contacts[0].id).to eq("C4526901-AERO") - expect(subject.registrant_contacts[0].name).to eq("Domain Name Administrator") + expect(subject.registrant_contacts[0].id).to eq(nil) + expect(subject.registrant_contacts[0].name).to eq(nil) expect(subject.registrant_contacts[0].organization).to eq("SriLankan Airlines Ltd") - expect(subject.registrant_contacts[0].address).to eq("Admin Bldg") - expect(subject.registrant_contacts[0].city).to eq("Katunayaka") - expect(subject.registrant_contacts[0].zip).to eq("11450") + expect(subject.registrant_contacts[0].address).to eq(nil) + expect(subject.registrant_contacts[0].city).to eq(nil) + expect(subject.registrant_contacts[0].zip).to eq(nil) expect(subject.registrant_contacts[0].state).to eq("WP") expect(subject.registrant_contacts[0].country_code).to eq("LK") - expect(subject.registrant_contacts[0].phone).to eq("+94.197331600") - expect(subject.registrant_contacts[0].fax).to eq("+94.197335160") - expect(subject.registrant_contacts[0].email).to eq("domregister@srilankan.aero") + expect(subject.registrant_contacts[0].phone).to eq(nil) + expect(subject.registrant_contacts[0].fax).to eq(nil) + expect(subject.registrant_contacts[0].email).to eq(nil) end end describe "#admin_contacts" do it do expect(subject.admin_contacts).to be_a(Array) - expect(subject.admin_contacts.size).to eq(1) - expect(subject.admin_contacts[0]).to be_a(Whois::Parser::Contact) - expect(subject.admin_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_ADMINISTRATIVE) - expect(subject.admin_contacts[0].id).to eq("C4526901-AERO") - expect(subject.admin_contacts[0].name).to eq("Domain Name Administrator") - expect(subject.admin_contacts[0].organization).to eq("SriLankan Airlines Ltd") - expect(subject.admin_contacts[0].address).to eq("Admin Bldg") - expect(subject.admin_contacts[0].city).to eq("Katunayaka") - expect(subject.admin_contacts[0].zip).to eq("11450") - expect(subject.admin_contacts[0].state).to eq("WP") - expect(subject.admin_contacts[0].country_code).to eq("LK") - expect(subject.admin_contacts[0].phone).to eq("+94.197331600") - expect(subject.admin_contacts[0].fax).to eq("+94.197335160") - expect(subject.admin_contacts[0].email).to eq("domregister@srilankan.aero") + expect(subject.admin_contacts.size).to eq(0) end end describe "#technical_contacts" do it do expect(subject.technical_contacts).to be_a(Array) - expect(subject.technical_contacts.size).to eq(1) - expect(subject.technical_contacts[0]).to be_a(Whois::Parser::Contact) - expect(subject.technical_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_TECHNICAL) - expect(subject.technical_contacts[0].id).to eq("C4526901-AERO") - expect(subject.technical_contacts[0].name).to eq("Domain Name Administrator") - expect(subject.technical_contacts[0].organization).to eq("SriLankan Airlines Ltd") - expect(subject.technical_contacts[0].address).to eq("Admin Bldg") - expect(subject.technical_contacts[0].city).to eq("Katunayaka") - expect(subject.technical_contacts[0].zip).to eq("11450") - expect(subject.technical_contacts[0].state).to eq("WP") - expect(subject.technical_contacts[0].country_code).to eq("LK") - expect(subject.technical_contacts[0].phone).to eq("+94.197331600") - expect(subject.technical_contacts[0].fax).to eq("+94.197335160") - expect(subject.technical_contacts[0].email).to eq("domregister@srilankan.aero") + expect(subject.technical_contacts.size).to eq(0) end end describe "#nameservers" do @@ -145,13 +118,13 @@ expect(subject.nameservers).to be_a(Array) expect(subject.nameservers.size).to eq(4) expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[0].name).to eq("dns1.srilankan.aero") + expect(subject.nameservers[0].name).to eq("ns-1046.awsdns-02.org") expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[1].name).to eq("dns2.srilankan.aero") + expect(subject.nameservers[1].name).to eq("ns-2011.awsdns-59.co.uk") expect(subject.nameservers[2]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[2].name).to eq("s2.ns.slt.lk") + expect(subject.nameservers[2].name).to eq("ns-133.awsdns-16.com") expect(subject.nameservers[3]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[3].name).to eq("s1.ns.slt.lk") + expect(subject.nameservers[3].name).to eq("ns-877.awsdns-45.net") end end end diff --git a/spec/whois/parsers/responses/whois.aero/status_reserved_spec.rb b/spec/whois/parsers/responses/whois.aero/status_reserved_spec.rb index dbfbd99a..ea3344f3 100644 --- a/spec/whois/parsers/responses/whois.aero/status_reserved_spec.rb +++ b/spec/whois/parsers/responses/whois.aero/status_reserved_spec.rb @@ -23,7 +23,7 @@ describe "#disclaimer" do it do - expect(subject.disclaimer).to eq(nil) + expect(subject.disclaimer).to eq("Access to WHOIS information is provided to assist persons in determining the contents of a domain name registration record in the registry database. The data in this record is provided by The Registry Operator for informational purposes only, and accuracy is not guaranteed. 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. Registry Operator reserves the right to modify these terms at any time. By submitting this query, you agree to abide by this policy. The Registrar of Record identified in this output may have an RDDS service that can be queried for additional information on how to contact the Registrant, Admin, or Tech contact of the queried domain name.") end end describe "#domain" do diff --git a/spec/whois/parsers/responses/whois.afilias-grs.info/bz/status_registered_spec.rb b/spec/whois/parsers/responses/whois.afilias-grs.info/bz/status_registered_spec.rb index 4953d88a..0c573cb8 100644 --- a/spec/whois/parsers/responses/whois.afilias-grs.info/bz/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.afilias-grs.info/bz/status_registered_spec.rb @@ -23,7 +23,7 @@ describe "#disclaimer" do it do - expect(subject.disclaimer).to eq("Access to CCTLD WHOIS information is provided to assist persons in determining the contents of a domain name registration record in the Afilias registry database. The data in this record is provided by Afilias Limited for informational purposes only, and Afilias 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. Afilias reserves the right to modify these terms at any time. By submitting this query, you agree to abide by this policy.") + expect(subject.disclaimer).to eq("Access to WHOIS information is provided to assist persons in determining the contents of a domain name registration record in the registry database. The data in this record is provided by The Registry Operator for informational purposes only, and accuracy is not guaranteed. 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. Registry Operator reserves the right to modify these terms at any time. By submitting this query, you agree to abide by this policy. The Registrar of Record identified in this output may have an RDDS service that can be queried for additional information on how to contact the Registrant, Admin, or Tech contact of the queried domain name.") end end describe "#domain" do @@ -33,12 +33,12 @@ end describe "#domain_id" do it do - expect(subject.domain_id).to eq("D354967-LRCC") + expect(subject.domain_id).to eq("D105800000000354967-AGRS") end end describe "#status" do it do - expect(subject.status).to eq(["CLIENT DELETE PROHIBITED", "CLIENT TRANSFER PROHIBITED", "CLIENT UPDATE PROHIBITED", "RENEWPERIOD"]) + expect(subject.status).to eq(["clientDeleteProhibited https://icann.org/epp#clientDeleteProhibited", "clientTransferProhibited https://icann.org/epp#clientTransferProhibited", "clientUpdateProhibited https://icann.org/epp#clientUpdateProhibited"]) end end describe "#available?" do @@ -60,22 +60,21 @@ describe "#updated_on" do it do expect(subject.updated_on).to be_a(Time) - expect(subject.updated_on).to eq(Time.parse("2014-01-11 10:18:14 UTC")) + expect(subject.updated_on).to eq(Time.parse("2021-01-11 10:34:48 UTC")) end end describe "#expires_on" do it do expect(subject.expires_on).to be_a(Time) - expect(subject.expires_on).to eq(Time.parse("2015-02-12 18:08:52 UTC")) + expect(subject.expires_on).to eq(Time.parse("2022-02-12 18:08:52 UTC")) end end describe "#registrar" do it do expect(subject.registrar).to be_a(Whois::Parser::Registrar) - expect(subject.registrar.id).to eq("R22-LRCC") - expect(subject.registrar.name).to eq("MarkMonitor, Inc.") - expect(subject.registrar.organization).to eq(nil) - expect(subject.registrar.url).to eq(nil) + expect(subject.registrar.id).to eq("292") + expect(subject.registrar.name).to eq("MarkMonitor Inc.") + expect(subject.registrar.url).to eq("http://www.markmonitor.com") end end describe "#registrant_contacts" do @@ -105,9 +104,9 @@ expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) expect(subject.nameservers[1].name).to eq("ns2.google.com") expect(subject.nameservers[2]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[2].name).to eq("ns3.google.com") + expect(subject.nameservers[2].name).to eq("ns4.google.com") expect(subject.nameservers[3]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[3].name).to eq("ns4.google.com") + expect(subject.nameservers[3].name).to eq("ns3.google.com") end end end diff --git a/spec/whois/parsers/responses/whois.afilias-grs.info/gi/status_available_spec.rb b/spec/whois/parsers/responses/whois.afilias-grs.info/gi/status_available_spec.rb index e319b26d..09eddf05 100644 --- a/spec/whois/parsers/responses/whois.afilias-grs.info/gi/status_available_spec.rb +++ b/spec/whois/parsers/responses/whois.afilias-grs.info/gi/status_available_spec.rb @@ -23,7 +23,7 @@ describe "#disclaimer" do it do - expect(subject.disclaimer).to eq(nil) + expect(subject.disclaimer).to eq("Access to WHOIS information is provided to assist persons in determining the contents of a domain name registration record in the registry database. The data in this record is provided by The Registry Operator for informational purposes only, and accuracy is not guaranteed. 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. Registry Operator reserves the right to modify these terms at any time. By submitting this query, you agree to abide by this policy. The Registrar of Record identified in this output may have an RDDS service that can be queried for additional information on how to contact the Registrant, Admin, or Tech contact of the queried domain name.") end end describe "#domain" do diff --git a/spec/whois/parsers/responses/whois.afilias-grs.info/gi/status_registered_spec.rb b/spec/whois/parsers/responses/whois.afilias-grs.info/gi/status_registered_spec.rb index 277e0fe2..fd15bf03 100644 --- a/spec/whois/parsers/responses/whois.afilias-grs.info/gi/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.afilias-grs.info/gi/status_registered_spec.rb @@ -23,7 +23,7 @@ describe "#disclaimer" do it do - expect(subject.disclaimer).to eq("Access to CCTLD WHOIS information is provided to assist persons in determining the contents of a domain name registration record in the Afilias registry database. The data in this record is provided by Afilias Limited for informational purposes only, and Afilias 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. Afilias reserves the right to modify these terms at any time. By submitting this query, you agree to abide by this policy.") + expect(subject.disclaimer).to eq("Access to WHOIS information is provided to assist persons in determining the contents of a domain name registration record in the registry database. The data in this record is provided by The Registry Operator for informational purposes only, and accuracy is not guaranteed. 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. Registry Operator reserves the right to modify these terms at any time. By submitting this query, you agree to abide by this policy. The Registrar of Record identified in this output may have an RDDS service that can be queried for additional information on how to contact the Registrant, Admin, or Tech contact of the queried domain name.") end end describe "#domain" do @@ -33,12 +33,12 @@ end describe "#domain_id" do it do - expect(subject.domain_id).to eq("D68296-LRCC") + expect(subject.domain_id).to eq("D105800000000068296-AGRS") end end describe "#status" do it do - expect(subject.status).to eq(["OK"]) + expect(subject.status).to eq(["ok https://icann.org/epp#ok"]) end end describe "#available?" do @@ -60,22 +60,21 @@ describe "#updated_on" do it do expect(subject.updated_on).to be_a(Time) - expect(subject.updated_on).to eq(Time.parse("2008-12-20 19:25:54 UTC")) + expect(subject.updated_on).to eq(Time.parse("2017-12-05 13:07:12 UTC")) end end describe "#expires_on" do it do expect(subject.expires_on).to be_a(Time) - expect(subject.expires_on).to eq(Time.parse("2009-12-20 13:34:34 UTC")) + expect(subject.expires_on).to eq(Time.parse("2022-12-20 13:34:34 UTC")) end end describe "#registrar" do it do expect(subject.registrar).to be_a(Whois::Parser::Registrar) - expect(subject.registrar.id).to eq("R43-LRCC") + expect(subject.registrar.id).to eq("119") expect(subject.registrar.name).to eq("GibNet Registrar") - expect(subject.registrar.organization).to eq(nil) - expect(subject.registrar.url).to eq(nil) + expect(subject.registrar.url).to eq("") end end describe "#registrant_contacts" do @@ -84,55 +83,29 @@ expect(subject.registrant_contacts.size).to eq(1) expect(subject.registrant_contacts[0]).to be_a(Whois::Parser::Contact) expect(subject.registrant_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_REGISTRANT) - expect(subject.registrant_contacts[0].id).to eq("FR-1103549674779") - expect(subject.registrant_contacts[0].name).to eq("Jimmy Imossi") + expect(subject.registrant_contacts[0].id).to eq(nil) + expect(subject.registrant_contacts[0].name).to eq(nil) expect(subject.registrant_contacts[0].organization).to eq("Broadband Gibraltar Limited") - expect(subject.registrant_contacts[0].address).to eq("Suite 951\nEuroport") - expect(subject.registrant_contacts[0].city).to eq("Gibraltar") - expect(subject.registrant_contacts[0].zip).to eq("NA") - expect(subject.registrant_contacts[0].state).to eq("") + expect(subject.registrant_contacts[0].address).to eq(nil) + expect(subject.registrant_contacts[0].city).to eq(nil) + expect(subject.registrant_contacts[0].zip).to eq(nil) + expect(subject.registrant_contacts[0].state).to eq("Not Available") expect(subject.registrant_contacts[0].country_code).to eq("GI") - expect(subject.registrant_contacts[0].phone).to eq("+350.47200") - expect(subject.registrant_contacts[0].fax).to eq("+350.47272") - expect(subject.registrant_contacts[0].email).to eq("jimossi@sapphire.gi") + expect(subject.registrant_contacts[0].phone).to eq(nil) + expect(subject.registrant_contacts[0].fax).to eq(nil) + expect(subject.registrant_contacts[0].email).to eq(nil) end end describe "#admin_contacts" do it do expect(subject.admin_contacts).to be_a(Array) - expect(subject.admin_contacts.size).to eq(1) - expect(subject.admin_contacts[0]).to be_a(Whois::Parser::Contact) - expect(subject.admin_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_ADMINISTRATIVE) - expect(subject.admin_contacts[0].id).to eq("FR-1103549674779") - expect(subject.admin_contacts[0].name).to eq("Jimmy Imossi") - expect(subject.admin_contacts[0].organization).to eq("Broadband Gibraltar Limited") - expect(subject.admin_contacts[0].address).to eq("Suite 951\nEuroport") - expect(subject.admin_contacts[0].city).to eq("Gibraltar") - expect(subject.admin_contacts[0].zip).to eq("NA") - expect(subject.admin_contacts[0].state).to eq("") - expect(subject.admin_contacts[0].country_code).to eq("GI") - expect(subject.admin_contacts[0].phone).to eq("+350.47200") - expect(subject.admin_contacts[0].fax).to eq("+350.47272") - expect(subject.admin_contacts[0].email).to eq("jimossi@sapphire.gi") + expect(subject.admin_contacts.size).to eq(0) end end describe "#technical_contacts" do it do expect(subject.technical_contacts).to be_a(Array) - expect(subject.technical_contacts.size).to eq(1) - expect(subject.technical_contacts[0]).to be_a(Whois::Parser::Contact) - expect(subject.technical_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_TECHNICAL) - expect(subject.technical_contacts[0].id).to eq("FR-10a223e2e4cf0") - expect(subject.technical_contacts[0].name).to eq("Tech Dept") - expect(subject.technical_contacts[0].organization).to eq("Broadband Gibraltar Ltd") - expect(subject.technical_contacts[0].address).to eq("Suite 9.5.1\nEuroport") - expect(subject.technical_contacts[0].city).to eq("N/A") - expect(subject.technical_contacts[0].zip).to eq("N/A") - expect(subject.technical_contacts[0].state).to eq("") - expect(subject.technical_contacts[0].country_code).to eq("GI") - expect(subject.technical_contacts[0].phone).to eq("+350.47200") - expect(subject.technical_contacts[0].fax).to eq("+350.47271") - expect(subject.technical_contacts[0].email).to eq("tech@sapphire.gi") + expect(subject.technical_contacts.size).to eq(0) end end describe "#nameservers" do diff --git a/spec/whois/parsers/responses/whois.afilias-grs.info/lc/status_available_spec.rb b/spec/whois/parsers/responses/whois.afilias-grs.info/lc/status_available_spec.rb index 0e2934ce..2066d950 100644 --- a/spec/whois/parsers/responses/whois.afilias-grs.info/lc/status_available_spec.rb +++ b/spec/whois/parsers/responses/whois.afilias-grs.info/lc/status_available_spec.rb @@ -23,7 +23,7 @@ describe "#disclaimer" do it do - expect(subject.disclaimer).to eq(nil) + expect(subject.disclaimer).to eq("Access to WHOIS information is provided to assist persons in determining the contents of a domain name registration record in the registry database. The data in this record is provided by The Registry Operator for informational purposes only, and accuracy is not guaranteed. 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. Registry Operator reserves the right to modify these terms at any time. By submitting this query, you agree to abide by this policy. The Registrar of Record identified in this output may have an RDDS service that can be queried for additional information on how to contact the Registrant, Admin, or Tech contact of the queried domain name.") end end describe "#domain" do diff --git a/spec/whois/parsers/responses/whois.afilias-grs.info/lc/status_registered_spec.rb b/spec/whois/parsers/responses/whois.afilias-grs.info/lc/status_registered_spec.rb index ef558de5..276b5eb7 100644 --- a/spec/whois/parsers/responses/whois.afilias-grs.info/lc/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.afilias-grs.info/lc/status_registered_spec.rb @@ -23,7 +23,7 @@ describe "#disclaimer" do it do - expect(subject.disclaimer).to eq("Access to CCTLD WHOIS information is provided to assist persons in determining the contents of a domain name registration record in the Afilias registry database. The data in this record is provided by Afilias Limited for informational purposes only, and Afilias 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. Afilias reserves the right to modify these terms at any time. By submitting this query, you agree to abide by this policy.") + expect(subject.disclaimer).to eq("Access to WHOIS information is provided to assist persons in determining the contents of a domain name registration record in the registry database. The data in this record is provided by The Registry Operator for informational purposes only, and accuracy is not guaranteed. 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. Registry Operator reserves the right to modify these terms at any time. By submitting this query, you agree to abide by this policy. The Registrar of Record identified in this output may have an RDDS service that can be queried for additional information on how to contact the Registrant, Admin, or Tech contact of the queried domain name.") end end describe "#domain" do @@ -33,12 +33,12 @@ end describe "#domain_id" do it do - expect(subject.domain_id).to eq("D946482-LRCC") + expect(subject.domain_id).to eq("D105800000000946482-AGRS") end end describe "#status" do it do - expect(subject.status).to eq(["OK"]) + expect(subject.status).to eq(["ok https://icann.org/epp#ok"]) end end describe "#available?" do @@ -60,22 +60,21 @@ describe "#updated_on" do it do expect(subject.updated_on).to be_a(Time) - expect(subject.updated_on).to eq(Time.parse("2008-12-08 19:25:09 UTC")) + expect(subject.updated_on).to eq(Time.parse("2020-12-08 22:22:29 UTC")) end end describe "#expires_on" do it do expect(subject.expires_on).to be_a(Time) - expect(subject.expires_on).to eq(Time.parse("2009-12-08 00:00:00 UTC")) + expect(subject.expires_on).to eq(Time.parse("2021-12-08 00:00:00 UTC")) end end describe "#registrar" do it do expect(subject.registrar).to be_a(Whois::Parser::Registrar) - expect(subject.registrar.id).to eq("R144-LRCC") + expect(subject.registrar.id).to eq("119") expect(subject.registrar.name).to eq("NicLc Registrar") - expect(subject.registrar.organization).to eq(nil) - expect(subject.registrar.url).to eq(nil) + expect(subject.registrar.url).to eq("") end end describe "#registrant_contacts" do @@ -84,55 +83,29 @@ expect(subject.registrant_contacts.size).to eq(1) expect(subject.registrant_contacts[0]).to be_a(Whois::Parser::Contact) expect(subject.registrant_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_REGISTRANT) - expect(subject.registrant_contacts[0].id).to eq("LC-54921") - expect(subject.registrant_contacts[0].name).to eq("Nic LC Admin") + expect(subject.registrant_contacts[0].id).to eq(nil) + expect(subject.registrant_contacts[0].name).to eq(nil) expect(subject.registrant_contacts[0].organization).to eq("Nic LC") - expect(subject.registrant_contacts[0].address).to eq("#4 Colony House\nJohn Compton Hwy") - expect(subject.registrant_contacts[0].city).to eq("Castries") - expect(subject.registrant_contacts[0].zip).to eq("Not Provided") + expect(subject.registrant_contacts[0].address).to eq(nil) + expect(subject.registrant_contacts[0].city).to eq(nil) + expect(subject.registrant_contacts[0].zip).to eq(nil) expect(subject.registrant_contacts[0].state).to eq("Not Provided") expect(subject.registrant_contacts[0].country_code).to eq("LC") - expect(subject.registrant_contacts[0].phone).to eq("+758.4520220") - expect(subject.registrant_contacts[0].fax).to eq("") - expect(subject.registrant_contacts[0].email).to eq("nic@nic.lc") + expect(subject.registrant_contacts[0].phone).to eq(nil) + expect(subject.registrant_contacts[0].fax).to eq(nil) + expect(subject.registrant_contacts[0].email).to eq(nil) end end describe "#admin_contacts" do it do expect(subject.admin_contacts).to be_a(Array) - expect(subject.admin_contacts.size).to eq(1) - expect(subject.admin_contacts[0]).to be_a(Whois::Parser::Contact) - expect(subject.admin_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_ADMINISTRATIVE) - expect(subject.admin_contacts[0].id).to eq("LC-51893") - expect(subject.admin_contacts[0].name).to eq("Nic LC Hostmaster") - expect(subject.admin_contacts[0].organization).to eq("Nic LC") - expect(subject.admin_contacts[0].address).to eq("#4 Colony House\nNot Provided") - expect(subject.admin_contacts[0].city).to eq("Castries") - expect(subject.admin_contacts[0].zip).to eq("Not Provided") - expect(subject.admin_contacts[0].state).to eq("Not Provided") - expect(subject.admin_contacts[0].country_code).to eq("LC") - expect(subject.admin_contacts[0].phone).to eq("+758.4520220") - expect(subject.admin_contacts[0].fax).to eq("") - expect(subject.admin_contacts[0].email).to eq("hostmaster@nic.lc") + expect(subject.admin_contacts.size).to eq(0) end end describe "#technical_contacts" do it do expect(subject.technical_contacts).to be_a(Array) - expect(subject.technical_contacts.size).to eq(1) - expect(subject.technical_contacts[0]).to be_a(Whois::Parser::Contact) - expect(subject.technical_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_TECHNICAL) - expect(subject.technical_contacts[0].id).to eq("LC-53407") - expect(subject.technical_contacts[0].name).to eq("Nic LC Technical") - expect(subject.technical_contacts[0].organization).to eq("Nic LC") - expect(subject.technical_contacts[0].address).to eq("#4 Colony House\nNot Provided") - expect(subject.technical_contacts[0].city).to eq("Castries") - expect(subject.technical_contacts[0].zip).to eq("Not Provided") - expect(subject.technical_contacts[0].state).to eq("Not Provided") - expect(subject.technical_contacts[0].country_code).to eq("LC") - expect(subject.technical_contacts[0].phone).to eq("+758.4520220") - expect(subject.technical_contacts[0].fax).to eq("") - expect(subject.technical_contacts[0].email).to eq("technical@nic.lc") + expect(subject.technical_contacts.size).to eq(0) end end describe "#nameservers" do diff --git a/spec/whois/parsers/responses/whois.afilias-grs.info/mn/status_available_spec.rb b/spec/whois/parsers/responses/whois.afilias-grs.info/mn/status_available_spec.rb index 18842045..013ee323 100644 --- a/spec/whois/parsers/responses/whois.afilias-grs.info/mn/status_available_spec.rb +++ b/spec/whois/parsers/responses/whois.afilias-grs.info/mn/status_available_spec.rb @@ -23,7 +23,7 @@ describe "#disclaimer" do it do - expect(subject.disclaimer).to eq(nil) + expect(subject.disclaimer).to eq("Access to WHOIS information is provided to assist persons in determining the contents of a domain name registration record in the registry database. The data in this record is provided by The Registry Operator for informational purposes only, and accuracy is not guaranteed. 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. Registry Operator reserves the right to modify these terms at any time. By submitting this query, you agree to abide by this policy. The Registrar of Record identified in this output may have an RDDS service that can be queried for additional information on how to contact the Registrant, Admin, or Tech contact of the queried domain name.") end end describe "#domain" do diff --git a/spec/whois/parsers/responses/whois.afilias-grs.info/mn/status_registered_spec.rb b/spec/whois/parsers/responses/whois.afilias-grs.info/mn/status_registered_spec.rb index f7232697..538f6e79 100644 --- a/spec/whois/parsers/responses/whois.afilias-grs.info/mn/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.afilias-grs.info/mn/status_registered_spec.rb @@ -23,7 +23,7 @@ describe "#disclaimer" do it do - expect(subject.disclaimer).to eq("Access to CCTLD WHOIS information is provided to assist persons in determining the contents of a domain name registration record in the Afilias registry database. The data in this record is provided by Afilias Limited for informational purposes only, and Afilias 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. Afilias reserves the right to modify these terms at any time. By submitting this query, you agree to abide by this policy.") + expect(subject.disclaimer).to eq("Access to WHOIS information is provided to assist persons in determining the contents of a domain name registration record in the registry database. The data in this record is provided by The Registry Operator for informational purposes only, and accuracy is not guaranteed. 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. Registry Operator reserves the right to modify these terms at any time. By submitting this query, you agree to abide by this policy. The Registrar of Record identified in this output may have an RDDS service that can be queried for additional information on how to contact the Registrant, Admin, or Tech contact of the queried domain name.") end end describe "#domain" do @@ -33,12 +33,12 @@ end describe "#domain_id" do it do - expect(subject.domain_id).to eq("D444956-LRCC") + expect(subject.domain_id).to eq("D105800000000444956-AGRS") end end describe "#status" do it do - expect(subject.status).to eq(["CLIENT DELETE PROHIBITED", "CLIENT TRANSFER PROHIBITED", "CLIENT UPDATE PROHIBITED"]) + expect(subject.status).to eq(["clientDeleteProhibited https://icann.org/epp#clientDeleteProhibited", "clientTransferProhibited https://icann.org/epp#clientTransferProhibited", "clientUpdateProhibited https://icann.org/epp#clientUpdateProhibited"]) end end describe "#available?" do @@ -60,22 +60,21 @@ describe "#updated_on" do it do expect(subject.updated_on).to be_a(Time) - expect(subject.updated_on).to eq(Time.parse("2013-03-06 10:21:48 UTC")) + expect(subject.updated_on).to eq(Time.parse("2021-03-06 10:38:48 UTC")) end end describe "#expires_on" do it do expect(subject.expires_on).to be_a(Time) - expect(subject.expires_on).to eq(Time.parse("2014-04-07 00:00:00 UTC")) + expect(subject.expires_on).to eq(Time.parse("2022-04-07 00:00:00 UTC")) end end describe "#registrar" do it do expect(subject.registrar).to be_a(Whois::Parser::Registrar) - expect(subject.registrar.id).to eq("R22-LRCC") - expect(subject.registrar.name).to eq("MarkMonitor, Inc.") - expect(subject.registrar.organization).to eq(nil) - expect(subject.registrar.url).to eq(nil) + expect(subject.registrar.id).to eq("292") + expect(subject.registrar.name).to eq("MarkMonitor Inc.") + expect(subject.registrar.url).to eq("http://www.markmonitor.com") end end describe "#registrant_contacts" do @@ -84,7 +83,7 @@ expect(subject.registrant_contacts.size).to eq(1) expect(subject.registrant_contacts[0]).to be_a(Whois::Parser::Contact) expect(subject.registrant_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_REGISTRANT) - expect(subject.registrant_contacts[0].id).to eq("MNM-11332") + expect(subject.registrant_contacts[0].id).to eq("C40795-AGRS") expect(subject.registrant_contacts[0].name).to eq("DNS Admin") expect(subject.registrant_contacts[0].organization).to eq("Google Inc.") expect(subject.registrant_contacts[0].address).to eq("1600 Amphitheatre Parkway") @@ -92,8 +91,8 @@ expect(subject.registrant_contacts[0].zip).to eq("94043") expect(subject.registrant_contacts[0].state).to eq("CA") expect(subject.registrant_contacts[0].country_code).to eq("US") - expect(subject.registrant_contacts[0].phone).to eq("+165.03300100") - expect(subject.registrant_contacts[0].fax).to eq("+165.06188571") + expect(subject.registrant_contacts[0].phone).to eq("+1.6502530000") + expect(subject.registrant_contacts[0].fax).to eq("+1.6502530001") expect(subject.registrant_contacts[0].email).to eq("dns-admin@google.com") end end @@ -103,7 +102,7 @@ expect(subject.admin_contacts.size).to eq(1) expect(subject.admin_contacts[0]).to be_a(Whois::Parser::Contact) expect(subject.admin_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_ADMINISTRATIVE) - expect(subject.admin_contacts[0].id).to eq("MNM-11332") + expect(subject.admin_contacts[0].id).to eq("C40795-AGRS") expect(subject.admin_contacts[0].name).to eq("DNS Admin") expect(subject.admin_contacts[0].organization).to eq("Google Inc.") expect(subject.admin_contacts[0].address).to eq("1600 Amphitheatre Parkway") @@ -111,8 +110,8 @@ expect(subject.admin_contacts[0].zip).to eq("94043") expect(subject.admin_contacts[0].state).to eq("CA") expect(subject.admin_contacts[0].country_code).to eq("US") - expect(subject.admin_contacts[0].phone).to eq("+165.03300100") - expect(subject.admin_contacts[0].fax).to eq("+165.06188571") + expect(subject.admin_contacts[0].phone).to eq("+1.6502530000") + expect(subject.admin_contacts[0].fax).to eq("+1.6502530001") expect(subject.admin_contacts[0].email).to eq("dns-admin@google.com") end end @@ -122,17 +121,17 @@ expect(subject.technical_contacts.size).to eq(1) expect(subject.technical_contacts[0]).to be_a(Whois::Parser::Contact) expect(subject.technical_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_TECHNICAL) - expect(subject.technical_contacts[0].id).to eq("mmr-33293") - expect(subject.technical_contacts[0].name).to eq("Domain Admin") - expect(subject.technical_contacts[0].organization).to eq("MarkMonitor") - expect(subject.technical_contacts[0].address).to eq("391 N. Ancestor Place\nSuite 150") - expect(subject.technical_contacts[0].city).to eq("Boise") - expect(subject.technical_contacts[0].zip).to eq("83704") + expect(subject.technical_contacts[0].id).to eq("C40795-AGRS") + expect(subject.technical_contacts[0].name).to eq("DNS Admin") + expect(subject.technical_contacts[0].organization).to eq("Google Inc.") + expect(subject.technical_contacts[0].address).to eq("1600 Amphitheatre Parkway") + expect(subject.technical_contacts[0].city).to eq("Mountain View") + expect(subject.technical_contacts[0].zip).to eq("94043") expect(subject.technical_contacts[0].state).to eq("CA") expect(subject.technical_contacts[0].country_code).to eq("US") - expect(subject.technical_contacts[0].phone).to eq("+1.2083895740") - expect(subject.technical_contacts[0].fax).to eq("+1.2083895771") - expect(subject.technical_contacts[0].email).to eq("ccops@markmonitor.com") + expect(subject.technical_contacts[0].phone).to eq("+1.6502530000") + expect(subject.technical_contacts[0].fax).to eq("+1.6502530001") + expect(subject.technical_contacts[0].email).to eq("dns-admin@google.com") end end describe "#nameservers" do @@ -144,9 +143,9 @@ expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) expect(subject.nameservers[1].name).to eq("ns2.google.com") expect(subject.nameservers[2]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[2].name).to eq("ns3.google.com") + expect(subject.nameservers[2].name).to eq("ns4.google.com") expect(subject.nameservers[3]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[3].name).to eq("ns4.google.com") + expect(subject.nameservers[3].name).to eq("ns3.google.com") end end end diff --git a/spec/whois/parsers/responses/whois.afilias-grs.info/sc/status_available_spec.rb b/spec/whois/parsers/responses/whois.afilias-grs.info/sc/status_available_spec.rb index 7026629b..3a4fc0fd 100644 --- a/spec/whois/parsers/responses/whois.afilias-grs.info/sc/status_available_spec.rb +++ b/spec/whois/parsers/responses/whois.afilias-grs.info/sc/status_available_spec.rb @@ -23,7 +23,7 @@ describe "#disclaimer" do it do - expect(subject.disclaimer).to eq(nil) + expect(subject.disclaimer).to eq("Access to WHOIS information is provided to assist persons in determining the contents of a domain name registration record in the registry database. The data in this record is provided by The Registry Operator for informational purposes only, and accuracy is not guaranteed. 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. Registry Operator reserves the right to modify these terms at any time. By submitting this query, you agree to abide by this policy. The Registrar of Record identified in this output may have an RDDS service that can be queried for additional information on how to contact the Registrant, Admin, or Tech contact of the queried domain name.") end end describe "#domain" do diff --git a/spec/whois/parsers/responses/whois.afilias-grs.info/sc/status_registered_spec.rb b/spec/whois/parsers/responses/whois.afilias-grs.info/sc/status_registered_spec.rb index 342ed402..6842a9e3 100644 --- a/spec/whois/parsers/responses/whois.afilias-grs.info/sc/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.afilias-grs.info/sc/status_registered_spec.rb @@ -23,7 +23,7 @@ describe "#disclaimer" do it do - expect(subject.disclaimer).to eq("Access to CCTLD WHOIS information is provided to assist persons in determining the contents of a domain name registration record in the Afilias registry database. The data in this record is provided by Afilias Limited for informational purposes only, and Afilias 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. Afilias reserves the right to modify these terms at any time. By submitting this query, you agree to abide by this policy.") + expect(subject.disclaimer).to eq("Access to WHOIS information is provided to assist persons in determining the contents of a domain name registration record in the registry database. The data in this record is provided by The Registry Operator for informational purposes only, and accuracy is not guaranteed. 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. Registry Operator reserves the right to modify these terms at any time. By submitting this query, you agree to abide by this policy. The Registrar of Record identified in this output may have an RDDS service that can be queried for additional information on how to contact the Registrant, Admin, or Tech contact of the queried domain name.") end end describe "#domain" do @@ -33,12 +33,12 @@ end describe "#domain_id" do it do - expect(subject.domain_id).to eq("D47234-LRCC") + expect(subject.domain_id).to eq("D105800000000047234-AGRS") end end describe "#status" do it do - expect(subject.status).to eq(["CLIENT DELETE PROHIBITED", "CLIENT TRANSFER PROHIBITED", "CLIENT UPDATE PROHIBITED", "RENEWPERIOD"]) + expect(subject.status).to eq(["clientDeleteProhibited https://icann.org/epp#clientDeleteProhibited", "clientTransferProhibited https://icann.org/epp#clientTransferProhibited", "clientUpdateProhibited https://icann.org/epp#clientUpdateProhibited"]) end end describe "#available?" do @@ -60,22 +60,21 @@ describe "#updated_on" do it do expect(subject.updated_on).to be_a(Time) - expect(subject.updated_on).to eq(Time.parse("2014-01-02 10:20:29 UTC")) + expect(subject.updated_on).to eq(Time.parse("2021-01-02 10:34:05 UTC")) end end describe "#expires_on" do it do expect(subject.expires_on).to be_a(Time) - expect(subject.expires_on).to eq(Time.parse("2015-02-03 19:19:12 UTC")) + expect(subject.expires_on).to eq(Time.parse("2022-02-03 19:19:12 UTC")) end end describe "#registrar" do it do expect(subject.registrar).to be_a(Whois::Parser::Registrar) - expect(subject.registrar.id).to eq("R22-LRCC") - expect(subject.registrar.name).to eq("MarkMonitor, Inc.") - expect(subject.registrar.organization).to eq(nil) - expect(subject.registrar.url).to eq(nil) + expect(subject.registrar.id).to eq("292") + expect(subject.registrar.name).to eq("MarkMonitor Inc.") + expect(subject.registrar.url).to eq("http://www.markmonitor.com") end end describe "#registrant_contacts" do @@ -84,58 +83,29 @@ expect(subject.registrant_contacts.size).to eq(1) expect(subject.registrant_contacts[0]).to be_a(Whois::Parser::Contact) expect(subject.registrant_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_REGISTRANT) - expect(subject.registrant_contacts[0].id).to eq("AGRS-129819") - expect(subject.registrant_contacts[0].name).to eq("DNS Admin") + expect(subject.registrant_contacts[0].id).to eq(nil) + expect(subject.registrant_contacts[0].name).to eq(nil) expect(subject.registrant_contacts[0].organization).to eq("Google Inc.") - expect(subject.registrant_contacts[0].address).to eq("1600 Amphitheatre Parkway") - expect(subject.registrant_contacts[0].city).to eq("Mountain View") - expect(subject.registrant_contacts[0].zip).to eq("94043") + expect(subject.registrant_contacts[0].address).to eq(nil) + expect(subject.registrant_contacts[0].city).to eq(nil) + expect(subject.registrant_contacts[0].zip).to eq(nil) expect(subject.registrant_contacts[0].state).to eq("CA") expect(subject.registrant_contacts[0].country_code).to eq("US") - expect(subject.registrant_contacts[0].phone).to eq("+1.6502530000") - expect(subject.registrant_contacts[0].fax).to eq("+1.6506188571") - expect(subject.registrant_contacts[0].email).to eq("dns-admin@google.com") + expect(subject.registrant_contacts[0].phone).to eq(nil) + expect(subject.registrant_contacts[0].fax).to eq(nil) + expect(subject.registrant_contacts[0].email).to eq(nil) end end describe "#admin_contacts" do it do expect(subject.admin_contacts).to be_a(Array) - expect(subject.admin_contacts.size).to eq(1) - expect(subject.admin_contacts[0]).to be_a(Whois::Parser::Contact) - expect(subject.admin_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_ADMINISTRATIVE) - expect(subject.admin_contacts[0].id).to eq("AGRS-129293") - expect(subject.admin_contacts[0].name).to eq("CCOPS") - expect(subject.admin_contacts[0].organization).to eq("MarkMonitor") - expect(subject.admin_contacts[0].address).to eq("PMB 155\n10400 Overland Rd.") - expect(subject.admin_contacts[0].city).to eq("Boise") - expect(subject.admin_contacts[0].zip).to eq("83709-1433") - expect(subject.admin_contacts[0].state).to eq("ID") - expect(subject.admin_contacts[0].country_code).to eq("US") - expect(subject.admin_contacts[0].phone).to eq("+1.20838957") - expect(subject.admin_contacts[0].fax).to eq("+1.20838957") - expect(subject.admin_contacts[0].email).to eq("ccops@markmonitor.com") + expect(subject.admin_contacts.size).to eq(0) end end describe "#technical_contacts" do it do expect(subject.technical_contacts).to be_a(Array) - expect(subject.technical_contacts.size).to eq(1) - expect(subject.technical_contacts[0]).to be_a(Whois::Parser::Contact) - expect(subject.technical_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_TECHNICAL) - expect(subject.technical_contacts[0].id).to eq("mmr-33293") - expect(subject.technical_contacts[0].name).to eq("Domain Admin") - expect(subject.technical_contacts[0].organization).to eq("MarkMonitor") - expect(subject.technical_contacts[0].address).to eq("391 N. Ancestor Place\nSuite 150") - expect(subject.technical_contacts[0].city).to eq("Boise") - expect(subject.technical_contacts[0].zip).to eq("83704") - expect(subject.technical_contacts[0].state).to eq("CA") - expect(subject.technical_contacts[0].country).to eq(nil) - expect(subject.technical_contacts[0].country_code).to eq("US") - expect(subject.technical_contacts[0].phone).to eq("+1.2083895740") - expect(subject.technical_contacts[0].fax).to eq("+1.2083895771") - expect(subject.technical_contacts[0].email).to eq("ccops@markmonitor.com") - expect(subject.technical_contacts[0].created_on).to eq(nil) - expect(subject.technical_contacts[0].updated_on).to eq(nil) + expect(subject.technical_contacts.size).to eq(0) end end describe "#nameservers" do diff --git a/spec/whois/parsers/responses/whois.afilias-grs.info/vc/status_available_spec.rb b/spec/whois/parsers/responses/whois.afilias-grs.info/vc/status_available_spec.rb index 558948d6..2ff98b2f 100644 --- a/spec/whois/parsers/responses/whois.afilias-grs.info/vc/status_available_spec.rb +++ b/spec/whois/parsers/responses/whois.afilias-grs.info/vc/status_available_spec.rb @@ -23,7 +23,7 @@ describe "#disclaimer" do it do - expect(subject.disclaimer).to eq(nil) + expect(subject.disclaimer).to eq("Access to WHOIS information is provided to assist persons in determining the contents of a domain name registration record in the registry database. The data in this record is provided by The Registry Operator for informational purposes only, and accuracy is not guaranteed. 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. Registry Operator reserves the right to modify these terms at any time. By submitting this query, you agree to abide by this policy. The Registrar of Record identified in this output may have an RDDS service that can be queried for additional information on how to contact the Registrant, Admin, or Tech contact of the queried domain name.") end end describe "#domain" do diff --git a/spec/whois/parsers/responses/whois.afilias-grs.info/vc/status_registered_spec.rb b/spec/whois/parsers/responses/whois.afilias-grs.info/vc/status_registered_spec.rb index f38f7777..c42c97e5 100644 --- a/spec/whois/parsers/responses/whois.afilias-grs.info/vc/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.afilias-grs.info/vc/status_registered_spec.rb @@ -23,7 +23,7 @@ describe "#disclaimer" do it do - expect(subject.disclaimer).to eq("Access to CCTLD WHOIS information is provided to assist persons in determining the contents of a domain name registration record in the Afilias registry database. The data in this record is provided by Afilias Limited for informational purposes only, and Afilias 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. Afilias reserves the right to modify these terms at any time. By submitting this query, you agree to abide by this policy.") + expect(subject.disclaimer).to eq("Access to WHOIS information is provided to assist persons in determining the contents of a domain name registration record in the registry database. The data in this record is provided by The Registry Operator for informational purposes only, and accuracy is not guaranteed. 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. Registry Operator reserves the right to modify these terms at any time. By submitting this query, you agree to abide by this policy. The Registrar of Record identified in this output may have an RDDS service that can be queried for additional information on how to contact the Registrant, Admin, or Tech contact of the queried domain name.") end end describe "#domain" do @@ -33,12 +33,12 @@ end describe "#domain_id" do it do - expect(subject.domain_id).to eq("D133753-LRCC") + expect(subject.domain_id).to eq("D105800000000133753-AGRS") end end describe "#status" do it do - expect(subject.status).to eq(["CLIENT DELETE PROHIBITED", "CLIENT TRANSFER PROHIBITED", "CLIENT UPDATE PROHIBITED"]) + expect(subject.status).to eq(["clientDeleteProhibited https://icann.org/epp#clientDeleteProhibited", "clientTransferProhibited https://icann.org/epp#clientTransferProhibited", "clientUpdateProhibited https://icann.org/epp#clientUpdateProhibited"]) end end describe "#available?" do @@ -60,22 +60,21 @@ describe "#updated_on" do it do expect(subject.updated_on).to be_a(Time) - expect(subject.updated_on).to eq(Time.parse("2009-02-17 17:43:40 UTC")) + expect(subject.updated_on).to eq(Time.parse("2021-05-28 09:37:54 UTC")) end end describe "#expires_on" do it do expect(subject.expires_on).to be_a(Time) - expect(subject.expires_on).to eq(Time.parse("2011-06-29 00:58:18 UTC")) + expect(subject.expires_on).to eq(Time.parse("2022-06-29 00:58:18 UTC")) end end describe "#registrar" do it do expect(subject.registrar).to be_a(Whois::Parser::Registrar) - expect(subject.registrar.id).to eq("R22-LRCC") - expect(subject.registrar.name).to eq("MarkMonitor, Inc.") - expect(subject.registrar.organization).to eq(nil) - expect(subject.registrar.url).to eq(nil) + expect(subject.registrar.id).to eq("292") + expect(subject.registrar.name).to eq("MarkMonitor Inc.") + expect(subject.registrar.url).to eq("http://www.markmonitor.com") end end describe "#registrant_contacts" do @@ -84,55 +83,29 @@ expect(subject.registrant_contacts.size).to eq(1) expect(subject.registrant_contacts[0]).to be_a(Whois::Parser::Contact) expect(subject.registrant_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_REGISTRANT) - expect(subject.registrant_contacts[0].id).to eq("mmr-2383") - expect(subject.registrant_contacts[0].name).to eq("DNS Admin") + expect(subject.registrant_contacts[0].id).to eq(nil) + expect(subject.registrant_contacts[0].name).to eq(nil) expect(subject.registrant_contacts[0].organization).to eq("Google Inc.") - expect(subject.registrant_contacts[0].address).to eq("1600 Amphitheatre Parkway") - expect(subject.registrant_contacts[0].city).to eq("Mountain View") - expect(subject.registrant_contacts[0].zip).to eq("94043") + expect(subject.registrant_contacts[0].address).to eq(nil) + expect(subject.registrant_contacts[0].city).to eq(nil) + expect(subject.registrant_contacts[0].zip).to eq(nil) expect(subject.registrant_contacts[0].state).to eq("CA") expect(subject.registrant_contacts[0].country_code).to eq("US") - expect(subject.registrant_contacts[0].phone).to eq("+1.6502530000") - expect(subject.registrant_contacts[0].fax).to eq("+1.6506188571") - expect(subject.registrant_contacts[0].email).to eq("dns-admin@google.com") + expect(subject.registrant_contacts[0].phone).to eq(nil) + expect(subject.registrant_contacts[0].fax).to eq(nil) + expect(subject.registrant_contacts[0].email).to eq(nil) end end describe "#admin_contacts" do it do expect(subject.admin_contacts).to be_a(Array) - expect(subject.admin_contacts.size).to eq(1) - expect(subject.admin_contacts[0]).to be_a(Whois::Parser::Contact) - expect(subject.admin_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_ADMINISTRATIVE) - expect(subject.admin_contacts[0].id).to eq("mmr-2383") - expect(subject.admin_contacts[0].name).to eq("DNS Admin") - expect(subject.admin_contacts[0].organization).to eq("Google Inc.") - expect(subject.admin_contacts[0].address).to eq("1600 Amphitheatre Parkway") - expect(subject.admin_contacts[0].city).to eq("Mountain View") - expect(subject.admin_contacts[0].zip).to eq("94043") - expect(subject.admin_contacts[0].state).to eq("CA") - expect(subject.admin_contacts[0].country_code).to eq("US") - expect(subject.admin_contacts[0].phone).to eq("+1.6502530000") - expect(subject.admin_contacts[0].fax).to eq("+1.6506188571") - expect(subject.admin_contacts[0].email).to eq("dns-admin@google.com") + expect(subject.admin_contacts.size).to eq(0) end end describe "#technical_contacts" do it do expect(subject.technical_contacts).to be_a(Array) - expect(subject.technical_contacts.size).to eq(1) - expect(subject.technical_contacts[0]).to be_a(Whois::Parser::Contact) - expect(subject.technical_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_TECHNICAL) - expect(subject.technical_contacts[0].id).to eq("mmr-2383") - expect(subject.technical_contacts[0].name).to eq("DNS Admin") - expect(subject.technical_contacts[0].organization).to eq("Google Inc.") - expect(subject.technical_contacts[0].address).to eq("1600 Amphitheatre Parkway") - expect(subject.technical_contacts[0].city).to eq("Mountain View") - expect(subject.technical_contacts[0].zip).to eq("94043") - expect(subject.technical_contacts[0].state).to eq("CA") - expect(subject.technical_contacts[0].country_code).to eq("US") - expect(subject.technical_contacts[0].phone).to eq("+1.6502530000") - expect(subject.technical_contacts[0].fax).to eq("+1.6506188571") - expect(subject.technical_contacts[0].email).to eq("dns-admin@google.com") + expect(subject.technical_contacts.size).to eq(0) end end describe "#nameservers" do @@ -144,9 +117,9 @@ expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) expect(subject.nameservers[1].name).to eq("ns2.google.com") expect(subject.nameservers[2]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[2].name).to eq("ns3.google.com") + expect(subject.nameservers[2].name).to eq("ns4.google.com") expect(subject.nameservers[3]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[3].name).to eq("ns4.google.com") + expect(subject.nameservers[3].name).to eq("ns3.google.com") end end end diff --git a/spec/whois/parsers/responses/whois.afilias.net/info/status_available_spec.rb b/spec/whois/parsers/responses/whois.afilias.net/info/status_available_spec.rb index c8c9dba9..51521dc9 100644 --- a/spec/whois/parsers/responses/whois.afilias.net/info/status_available_spec.rb +++ b/spec/whois/parsers/responses/whois.afilias.net/info/status_available_spec.rb @@ -23,7 +23,7 @@ describe "#disclaimer" do it do - expect(subject.disclaimer).to eq(nil) + expect(subject.disclaimer).to eq("Access to AFILIAS WHOIS information is provided to assist persons in determining the contents of a domain name registration record in the Afilias registry database. The data in this record is provided by Afilias Limited for informational purposes only, and Afilias 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. Afilias reserves the right to modify these terms at any time. By submitting this query, you agree to abide by this policy. The Registrar of Record identified in this output may have an RDDS service that can be queried for additional information on how to contact the Registrant, Admin, or Tech contact of the queried domain name.") end end describe "#domain" do diff --git a/spec/whois/parsers/responses/whois.afilias.net/info/status_registered_spec.rb b/spec/whois/parsers/responses/whois.afilias.net/info/status_registered_spec.rb index 77808153..6e1013ac 100644 --- a/spec/whois/parsers/responses/whois.afilias.net/info/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.afilias.net/info/status_registered_spec.rb @@ -23,7 +23,7 @@ describe "#disclaimer" do it do - expect(subject.disclaimer).to eq("Access to AFILIAS WHOIS information is provided to assist persons in determining the contents of a domain name registration record in the Afilias registry database. The data in this record is provided by Afilias Limited for informational purposes only, and Afilias 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. Afilias reserves the right to modify these terms at any time. By submitting this query, you agree to abide by this policy.") + expect(subject.disclaimer).to eq("Access to AFILIAS WHOIS information is provided to assist persons in determining the contents of a domain name registration record in the Afilias registry database. The data in this record is provided by Afilias Limited for informational purposes only, and Afilias 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. Afilias reserves the right to modify these terms at any time. By submitting this query, you agree to abide by this policy. The Registrar of Record identified in this output may have an RDDS service that can be queried for additional information on how to contact the Registrant, Admin, or Tech contact of the queried domain name.") end end describe "#domain" do @@ -38,7 +38,7 @@ end describe "#status" do it do - expect(subject.status).to eq(["clientDeleteProhibited", "clientTransferProhibited", "clientUpdateProhibited"]) + expect(subject.status).to eq(["clientDeleteProhibited https://icann.org/epp#clientDeleteProhibited", "clientTransferProhibited https://icann.org/epp#clientTransferProhibited", "clientUpdateProhibited https://icann.org/epp#clientUpdateProhibited", "serverDeleteProhibited https://icann.org/epp#serverDeleteProhibited", "serverTransferProhibited https://icann.org/epp#serverTransferProhibited", "serverUpdateProhibited https://icann.org/epp#serverUpdateProhibited"]) end end describe "#available?" do @@ -60,22 +60,21 @@ describe "#updated_on" do it do expect(subject.updated_on).to be_a(Time) - expect(subject.updated_on).to eq(Time.parse("2013-06-29 09:26:18 UTC")) + expect(subject.updated_on).to eq(Time.parse("2021-06-29 09:31:10 UTC")) end end describe "#expires_on" do it do expect(subject.expires_on).to be_a(Time) - expect(subject.expires_on).to eq(Time.parse("2014-07-31 23:57:50 UTC")) + expect(subject.expires_on).to eq(Time.parse("2022-07-31 23:57:50 UTC")) end end describe "#registrar" do it do expect(subject.registrar).to be_a(Whois::Parser::Registrar) - expect(subject.registrar.id).to eq("R151-LRMS") + expect(subject.registrar.id).to eq("292") expect(subject.registrar.name).to eq("MarkMonitor Inc.") - expect(subject.registrar.organization).to eq(nil) - expect(subject.registrar.url).to eq(nil) + expect(subject.registrar.url).to eq("http://www.markmonitor.com") end end describe "#registrant_contacts" do @@ -84,55 +83,29 @@ expect(subject.registrant_contacts.size).to eq(1) expect(subject.registrant_contacts[0]).to be_a(Whois::Parser::Contact) expect(subject.registrant_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_REGISTRANT) - expect(subject.registrant_contacts[0].id).to eq("mmr-32097") - expect(subject.registrant_contacts[0].name).to eq("DNS Admin") - expect(subject.registrant_contacts[0].organization).to eq("Google Inc.") - expect(subject.registrant_contacts[0].address).to eq("1600 Amphitheatre Parkway") - expect(subject.registrant_contacts[0].city).to eq("Mountain View") - expect(subject.registrant_contacts[0].zip).to eq("94043") + expect(subject.registrant_contacts[0].id).to eq(nil) + expect(subject.registrant_contacts[0].name).to eq(nil) + expect(subject.registrant_contacts[0].organization).to eq("Google LLC") + expect(subject.registrant_contacts[0].address).to eq(nil) + expect(subject.registrant_contacts[0].city).to eq(nil) + expect(subject.registrant_contacts[0].zip).to eq(nil) expect(subject.registrant_contacts[0].state).to eq("CA") expect(subject.registrant_contacts[0].country_code).to eq("US") - expect(subject.registrant_contacts[0].phone).to eq("+1.6506234000") - expect(subject.registrant_contacts[0].fax).to eq("+1.6506188571") - expect(subject.registrant_contacts[0].email).to eq("dns-admin@google.com") + expect(subject.registrant_contacts[0].phone).to eq(nil) + expect(subject.registrant_contacts[0].fax).to eq(nil) + expect(subject.registrant_contacts[0].email).to eq(nil) end end describe "#admin_contacts" do it do expect(subject.admin_contacts).to be_a(Array) - expect(subject.admin_contacts.size).to eq(1) - expect(subject.admin_contacts[0]).to be_a(Whois::Parser::Contact) - expect(subject.admin_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_ADMINISTRATIVE) - expect(subject.admin_contacts[0].id).to eq("mmr-32097") - expect(subject.admin_contacts[0].name).to eq("DNS Admin") - expect(subject.admin_contacts[0].organization).to eq("Google Inc.") - expect(subject.admin_contacts[0].address).to eq("1600 Amphitheatre Parkway") - expect(subject.admin_contacts[0].city).to eq("Mountain View") - expect(subject.admin_contacts[0].zip).to eq("94043") - expect(subject.admin_contacts[0].state).to eq("CA") - expect(subject.admin_contacts[0].country_code).to eq("US") - expect(subject.admin_contacts[0].phone).to eq("+1.6506234000") - expect(subject.admin_contacts[0].fax).to eq("+1.6506188571") - expect(subject.admin_contacts[0].email).to eq("dns-admin@google.com") + expect(subject.admin_contacts.size).to eq(0) end end describe "#technical_contacts" do it do expect(subject.technical_contacts).to be_a(Array) - expect(subject.technical_contacts.size).to eq(1) - expect(subject.technical_contacts[0]).to be_a(Whois::Parser::Contact) - expect(subject.technical_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_TECHNICAL) - expect(subject.technical_contacts[0].id).to eq("mmr-32097") - expect(subject.technical_contacts[0].name).to eq("DNS Admin") - expect(subject.technical_contacts[0].organization).to eq("Google Inc.") - expect(subject.technical_contacts[0].address).to eq("1600 Amphitheatre Parkway") - expect(subject.technical_contacts[0].city).to eq("Mountain View") - expect(subject.technical_contacts[0].zip).to eq("94043") - expect(subject.technical_contacts[0].state).to eq("CA") - expect(subject.technical_contacts[0].country_code).to eq("US") - expect(subject.technical_contacts[0].phone).to eq("+1.6506234000") - expect(subject.technical_contacts[0].fax).to eq("+1.6506188571") - expect(subject.technical_contacts[0].email).to eq("dns-admin@google.com") + expect(subject.technical_contacts.size).to eq(0) end end describe "#nameservers" do diff --git a/spec/whois/parsers/responses/whois.afilias.net/pro/status_available_spec.rb b/spec/whois/parsers/responses/whois.afilias.net/pro/status_available_spec.rb index 7e2c60bf..92d47356 100644 --- a/spec/whois/parsers/responses/whois.afilias.net/pro/status_available_spec.rb +++ b/spec/whois/parsers/responses/whois.afilias.net/pro/status_available_spec.rb @@ -23,7 +23,7 @@ describe "#disclaimer" do it do - expect(subject.disclaimer).to eq("Access to AFILIAS WHOIS information is provided to assist persons in determining the contents of a domain name registration record in the Afilias registry database. The data in this record is provided by Afilias Limited for informational purposes only, and Afilias 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. Afilias reserves the right to modify these terms at any time. By submitting this query, you agree to abide by this policy.") + expect(subject.disclaimer).to eq("Access to AFILIAS WHOIS information is provided to assist persons in determining the contents of a domain name registration record in the Afilias registry database. The data in this record is provided by Afilias Limited for informational purposes only, and Afilias 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. Afilias reserves the right to modify these terms at any time. By submitting this query, you agree to abide by this policy. The Registrar of Record identified in this output may have an RDDS service that can be queried for additional information on how to contact the Registrant, Admin, or Tech contact of the queried domain name.") end end describe "#domain" do diff --git a/spec/whois/parsers/responses/whois.afilias.net/pro/status_registered_spec.rb b/spec/whois/parsers/responses/whois.afilias.net/pro/status_registered_spec.rb index 2863d5c7..c59fcffe 100644 --- a/spec/whois/parsers/responses/whois.afilias.net/pro/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.afilias.net/pro/status_registered_spec.rb @@ -23,7 +23,7 @@ describe "#disclaimer" do it do - expect(subject.disclaimer).to eq("Access to AFILIAS WHOIS information is provided to assist persons in determining the contents of a domain name registration record in the Afilias registry database. The data in this record is provided by Afilias Limited for informational purposes only, and Afilias 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. Afilias reserves the right to modify these terms at any time. By submitting this query, you agree to abide by this policy.") + expect(subject.disclaimer).to eq("Access to AFILIAS WHOIS information is provided to assist persons in determining the contents of a domain name registration record in the Afilias registry database. The data in this record is provided by Afilias Limited for informational purposes only, and Afilias 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. Afilias reserves the right to modify these terms at any time. By submitting this query, you agree to abide by this policy. The Registrar of Record identified in this output may have an RDDS service that can be queried for additional information on how to contact the Registrant, Admin, or Tech contact of the queried domain name.") end end describe "#domain" do @@ -60,22 +60,21 @@ describe "#updated_on" do it do expect(subject.updated_on).to be_a(Time) - expect(subject.updated_on).to eq(Time.parse("2016-02-01 15:44:03 UTC")) + expect(subject.updated_on).to eq(Time.parse("2021-08-07 09:34:10 UTC")) end end describe "#expires_on" do it do expect(subject.expires_on).to be_a(Time) - expect(subject.expires_on).to eq(Time.parse("2016-09-08 00:00:00 UTC")) + expect(subject.expires_on).to eq(Time.parse("2022-09-08 00:00:00 UTC")) end end describe "#registrar" do it do expect(subject.registrar).to be_a(Whois::Parser::Registrar) - expect(subject.registrar.id).to eq(nil) + expect(subject.registrar.id).to eq("292") expect(subject.registrar.name).to eq("MarkMonitor Inc.") - expect(subject.registrar.organization).to eq(nil) - expect(subject.registrar.url).to eq(nil) + expect(subject.registrar.url).to eq("http://www.markmonitor.com") end end describe "#registrant_contacts" do @@ -84,55 +83,29 @@ expect(subject.registrant_contacts.size).to eq(1) expect(subject.registrant_contacts[0]).to be_a(Whois::Parser::Contact) expect(subject.registrant_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_REGISTRANT) - expect(subject.registrant_contacts[0].id).to eq("mmr-2383") - expect(subject.registrant_contacts[0].name).to eq("DNS Admin") + expect(subject.registrant_contacts[0].id).to eq(nil) + expect(subject.registrant_contacts[0].name).to eq(nil) expect(subject.registrant_contacts[0].organization).to eq("Google Inc.") - expect(subject.registrant_contacts[0].address).to eq("1600 Amphitheatre Parkway") - expect(subject.registrant_contacts[0].city).to eq("Mountain View") - expect(subject.registrant_contacts[0].zip).to eq("94043") + expect(subject.registrant_contacts[0].address).to eq(nil) + expect(subject.registrant_contacts[0].city).to eq(nil) + expect(subject.registrant_contacts[0].zip).to eq(nil) expect(subject.registrant_contacts[0].state).to eq("CA") expect(subject.registrant_contacts[0].country_code).to eq("US") - expect(subject.registrant_contacts[0].phone).to eq("+1.6502530000") - expect(subject.registrant_contacts[0].fax).to eq("+1.6506188571") - expect(subject.registrant_contacts[0].email).to eq("dns-admin@google.com") + expect(subject.registrant_contacts[0].phone).to eq(nil) + expect(subject.registrant_contacts[0].fax).to eq(nil) + expect(subject.registrant_contacts[0].email).to eq(nil) end end describe "#admin_contacts" do it do expect(subject.admin_contacts).to be_a(Array) - expect(subject.admin_contacts.size).to eq(1) - expect(subject.admin_contacts[0]).to be_a(Whois::Parser::Contact) - expect(subject.admin_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_ADMINISTRATIVE) - expect(subject.admin_contacts[0].id).to eq("mmr-2383") - expect(subject.admin_contacts[0].name).to eq("DNS Admin") - expect(subject.admin_contacts[0].organization).to eq("Google Inc.") - expect(subject.admin_contacts[0].address).to eq("1600 Amphitheatre Parkway") - expect(subject.admin_contacts[0].city).to eq("Mountain View") - expect(subject.admin_contacts[0].zip).to eq("94043") - expect(subject.admin_contacts[0].state).to eq("CA") - expect(subject.admin_contacts[0].country_code).to eq("US") - expect(subject.admin_contacts[0].phone).to eq("+1.6502530000") - expect(subject.admin_contacts[0].fax).to eq("+1.6506188571") - expect(subject.admin_contacts[0].email).to eq("dns-admin@google.com") + expect(subject.admin_contacts.size).to eq(0) end end describe "#technical_contacts" do it do expect(subject.technical_contacts).to be_a(Array) - expect(subject.technical_contacts.size).to eq(1) - expect(subject.technical_contacts[0]).to be_a(Whois::Parser::Contact) - expect(subject.technical_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_TECHNICAL) - expect(subject.technical_contacts[0].id).to eq("mmr-2383") - expect(subject.technical_contacts[0].name).to eq("DNS Admin") - expect(subject.technical_contacts[0].organization).to eq("Google Inc.") - expect(subject.technical_contacts[0].address).to eq("1600 Amphitheatre Parkway") - expect(subject.technical_contacts[0].city).to eq("Mountain View") - expect(subject.technical_contacts[0].zip).to eq("94043") - expect(subject.technical_contacts[0].state).to eq("CA") - expect(subject.technical_contacts[0].country_code).to eq("US") - expect(subject.technical_contacts[0].phone).to eq("+1.6502530000") - expect(subject.technical_contacts[0].fax).to eq("+1.6506188571") - expect(subject.technical_contacts[0].email).to eq("dns-admin@google.com") + expect(subject.technical_contacts.size).to eq(0) end end describe "#nameservers" do diff --git a/spec/whois/parsers/responses/whois.ascio.com/status_registered_spec.rb b/spec/whois/parsers/responses/whois.ascio.com/status_registered_spec.rb index 7f9e7c2a..87cf4116 100644 --- a/spec/whois/parsers/responses/whois.ascio.com/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.ascio.com/status_registered_spec.rb @@ -69,7 +69,6 @@ expect(subject.registrar).to be_a(Whois::Parser::Registrar) expect(subject.registrar.id).to eq("106") expect(subject.registrar.name).to eq("Ascio Technologies, Inc") - expect(subject.registrar.organization).to eq("Ascio Technologies, Inc") expect(subject.registrar.url).to eq("http://www.ascio.com") end end diff --git a/spec/whois/parsers/responses/whois.ati.tn/tn/status_registered_spec.rb b/spec/whois/parsers/responses/whois.ati.tn/tn/status_registered_spec.rb index 8c69298a..00c5a311 100644 --- a/spec/whois/parsers/responses/whois.ati.tn/tn/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.ati.tn/tn/status_registered_spec.rb @@ -72,7 +72,6 @@ expect(subject.registrar).to be_a(Whois::Parser::Registrar) expect(subject.registrar.id).to eq(nil) expect(subject.registrar.name).to eq("3S Global Net") - expect(subject.registrar.organization).to eq(nil) expect(subject.registrar.url).to eq(nil) end end diff --git a/spec/whois/parsers/responses/whois.audns.net.au/au/status_registered_spec.rb b/spec/whois/parsers/responses/whois.audns.net.au/au/status_registered_spec.rb index 2bf16be3..2cb76555 100644 --- a/spec/whois/parsers/responses/whois.audns.net.au/au/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.audns.net.au/au/status_registered_spec.rb @@ -71,7 +71,6 @@ it do expect(subject.registrar).to be_a(Whois::Parser::Registrar) expect(subject.registrar.name).to eq("MarkMonitor Inc.") - expect(subject.registrar.organization).to eq(nil) expect(subject.registrar.url).to eq(nil) end end diff --git a/spec/whois/parsers/responses/whois.cctld.by/by/status_registered_spec.rb b/spec/whois/parsers/responses/whois.cctld.by/by/status_registered_spec.rb index 44872f76..7d0387b3 100644 --- a/spec/whois/parsers/responses/whois.cctld.by/by/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.cctld.by/by/status_registered_spec.rb @@ -74,7 +74,6 @@ expect(subject.registrar).to be_a(Whois::Parser::Registrar) expect(subject.registrar.id).to eq("Active Technologies LLC") expect(subject.registrar.name).to eq("Active Technologies LLC") - expect(subject.registrar.organization).to eq("Active Technologies LLC") end end describe "#registrant_contacts" do diff --git a/spec/whois/parsers/responses/whois.cdmon.com/com/status_registered_spec.rb b/spec/whois/parsers/responses/whois.cdmon.com/com/status_registered_spec.rb index f1b99d94..c3b92183 100644 --- a/spec/whois/parsers/responses/whois.cdmon.com/com/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.cdmon.com/com/status_registered_spec.rb @@ -59,7 +59,6 @@ expect(subject.registrar).to be_a(Whois::Parser::Registrar) expect(subject.registrar.id).to eq("1403") expect(subject.registrar.name).to eq("10DENCEHISPAHARD, S.L") - expect(subject.registrar.organization).to eq("10DENCEHISPAHARD, S.L") expect(subject.registrar.url).to eq("https://www.cdmon.com") end end diff --git a/spec/whois/parsers/responses/whois.centralnic.com/ae.org/status_registered_spec.rb b/spec/whois/parsers/responses/whois.centralnic.com/ae.org/status_registered_spec.rb index 90030f93..c2e3880e 100644 --- a/spec/whois/parsers/responses/whois.centralnic.com/ae.org/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.centralnic.com/ae.org/status_registered_spec.rb @@ -73,8 +73,7 @@ it do expect(subject.registrar).to be_a(Whois::Parser::Registrar) expect(subject.registrar.id).to eq("H65658") - expect(subject.registrar.name).to eq(nil) - expect(subject.registrar.organization).to eq("101Domain, Inc.") + expect(subject.registrar.name).to eq("101Domain, Inc.") expect(subject.registrar.url).to eq("http://www.101domain.com") end end diff --git a/spec/whois/parsers/responses/whois.centralnic.com/ar.com/status_registered_spec.rb b/spec/whois/parsers/responses/whois.centralnic.com/ar.com/status_registered_spec.rb index 91c6d57d..cff3b509 100644 --- a/spec/whois/parsers/responses/whois.centralnic.com/ar.com/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.centralnic.com/ar.com/status_registered_spec.rb @@ -73,8 +73,7 @@ it do expect(subject.registrar).to be_a(Whois::Parser::Registrar) expect(subject.registrar.id).to eq("H1323241") - expect(subject.registrar.name).to eq(nil) - expect(subject.registrar.organization).to eq("CentralNic Ltd") + expect(subject.registrar.name).to eq("CentralNic Ltd") expect(subject.registrar.url).to eq(nil) end end diff --git a/spec/whois/parsers/responses/whois.centralnic.com/br.com/status_registered_spec.rb b/spec/whois/parsers/responses/whois.centralnic.com/br.com/status_registered_spec.rb index 8e008e5a..c915470c 100644 --- a/spec/whois/parsers/responses/whois.centralnic.com/br.com/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.centralnic.com/br.com/status_registered_spec.rb @@ -73,8 +73,7 @@ it do expect(subject.registrar).to be_a(Whois::Parser::Registrar) expect(subject.registrar.id).to eq("H292913") - expect(subject.registrar.name).to eq(nil) - expect(subject.registrar.organization).to eq("Network Solutions LLC") + expect(subject.registrar.name).to eq("Network Solutions LLC") expect(subject.registrar.url).to eq("http://www.networksolutions.com/") end end diff --git a/spec/whois/parsers/responses/whois.centralnic.com/cn.com/status_registered_spec.rb b/spec/whois/parsers/responses/whois.centralnic.com/cn.com/status_registered_spec.rb index f1b542b6..13ddf41a 100644 --- a/spec/whois/parsers/responses/whois.centralnic.com/cn.com/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.centralnic.com/cn.com/status_registered_spec.rb @@ -73,8 +73,7 @@ it do expect(subject.registrar).to be_a(Whois::Parser::Registrar) expect(subject.registrar.id).to eq("H67436") - expect(subject.registrar.name).to eq(nil) - expect(subject.registrar.organization).to eq("united-domains AG") + expect(subject.registrar.name).to eq("united-domains AG") expect(subject.registrar.url).to eq("http://www.united-domains.de") end end diff --git a/spec/whois/parsers/responses/whois.centralnic.com/de.com/status_registered_spec.rb b/spec/whois/parsers/responses/whois.centralnic.com/de.com/status_registered_spec.rb index ff17f69c..16e962ac 100644 --- a/spec/whois/parsers/responses/whois.centralnic.com/de.com/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.centralnic.com/de.com/status_registered_spec.rb @@ -73,8 +73,7 @@ it do expect(subject.registrar).to be_a(Whois::Parser::Registrar) expect(subject.registrar.id).to eq("H67436") - expect(subject.registrar.name).to eq(nil) - expect(subject.registrar.organization).to eq("united-domains AG") + expect(subject.registrar.name).to eq("united-domains AG") expect(subject.registrar.url).to eq("http://www.united-domains.de") end end diff --git a/spec/whois/parsers/responses/whois.centralnic.com/eu.com/status_registered_spec.rb b/spec/whois/parsers/responses/whois.centralnic.com/eu.com/status_registered_spec.rb index 97c490df..a667985e 100644 --- a/spec/whois/parsers/responses/whois.centralnic.com/eu.com/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.centralnic.com/eu.com/status_registered_spec.rb @@ -73,8 +73,7 @@ it do expect(subject.registrar).to be_a(Whois::Parser::Registrar) expect(subject.registrar.id).to eq("H126914") - expect(subject.registrar.name).to eq(nil) - expect(subject.registrar.organization).to eq("iTransact Ltd") + expect(subject.registrar.name).to eq("iTransact Ltd") expect(subject.registrar.url).to eq("www.itransact.ltd.uk") end end diff --git a/spec/whois/parsers/responses/whois.centralnic.com/gb.com/status_registered_spec.rb b/spec/whois/parsers/responses/whois.centralnic.com/gb.com/status_registered_spec.rb index be712301..baae63e5 100644 --- a/spec/whois/parsers/responses/whois.centralnic.com/gb.com/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.centralnic.com/gb.com/status_registered_spec.rb @@ -73,8 +73,7 @@ it do expect(subject.registrar).to be_a(Whois::Parser::Registrar) expect(subject.registrar.id).to eq("H386560") - expect(subject.registrar.name).to eq(nil) - expect(subject.registrar.organization).to eq("Wind Internethaus GMBH") + expect(subject.registrar.name).to eq("Wind Internethaus GMBH") expect(subject.registrar.url).to eq("www.windinternethaus.de") end end diff --git a/spec/whois/parsers/responses/whois.centralnic.com/gb.net/status_registered_spec.rb b/spec/whois/parsers/responses/whois.centralnic.com/gb.net/status_registered_spec.rb index aaa8af4c..771b75d1 100644 --- a/spec/whois/parsers/responses/whois.centralnic.com/gb.net/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.centralnic.com/gb.net/status_registered_spec.rb @@ -73,8 +73,7 @@ it do expect(subject.registrar).to be_a(Whois::Parser::Registrar) expect(subject.registrar.id).to eq("H1167922") - expect(subject.registrar.name).to eq(nil) - expect(subject.registrar.organization).to eq("Gandi SAS") + expect(subject.registrar.name).to eq("Gandi SAS") expect(subject.registrar.url).to eq("http://www.gandi.net/") end end diff --git a/spec/whois/parsers/responses/whois.centralnic.com/hu.com/status_registered_spec.rb b/spec/whois/parsers/responses/whois.centralnic.com/hu.com/status_registered_spec.rb index 005ff086..21fda963 100644 --- a/spec/whois/parsers/responses/whois.centralnic.com/hu.com/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.centralnic.com/hu.com/status_registered_spec.rb @@ -73,8 +73,7 @@ it do expect(subject.registrar).to be_a(Whois::Parser::Registrar) expect(subject.registrar.id).to eq("H65658") - expect(subject.registrar.name).to eq(nil) - expect(subject.registrar.organization).to eq("101Domain, Inc.") + expect(subject.registrar.name).to eq("101Domain, Inc.") expect(subject.registrar.url).to eq("http://www.101domain.com") end end diff --git a/spec/whois/parsers/responses/whois.centralnic.com/jp.net/status_registered_spec.rb b/spec/whois/parsers/responses/whois.centralnic.com/jp.net/status_registered_spec.rb index e95ed096..3b1b4b29 100644 --- a/spec/whois/parsers/responses/whois.centralnic.com/jp.net/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.centralnic.com/jp.net/status_registered_spec.rb @@ -73,8 +73,7 @@ it do expect(subject.registrar).to be_a(Whois::Parser::Registrar) expect(subject.registrar.id).to eq("H1605993") - expect(subject.registrar.name).to eq(nil) - expect(subject.registrar.organization).to eq("GMO") + expect(subject.registrar.name).to eq("GMO") expect(subject.registrar.url).to eq("http://www.onamae.com") end end diff --git a/spec/whois/parsers/responses/whois.centralnic.com/jpn.com/status_registered_spec.rb b/spec/whois/parsers/responses/whois.centralnic.com/jpn.com/status_registered_spec.rb index 129faa1c..91759625 100644 --- a/spec/whois/parsers/responses/whois.centralnic.com/jpn.com/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.centralnic.com/jpn.com/status_registered_spec.rb @@ -73,8 +73,7 @@ it do expect(subject.registrar).to be_a(Whois::Parser::Registrar) expect(subject.registrar.id).to eq("I6467") - expect(subject.registrar.name).to eq(nil) - expect(subject.registrar.organization).to eq("Webfusion") + expect(subject.registrar.name).to eq("Webfusion") expect(subject.registrar.url).to eq("http://www.123-reg.co.uk/domain-names/") end end diff --git a/spec/whois/parsers/responses/whois.centralnic.com/kr.com/status_registered_spec.rb b/spec/whois/parsers/responses/whois.centralnic.com/kr.com/status_registered_spec.rb index 9b310cae..c0fc25e1 100644 --- a/spec/whois/parsers/responses/whois.centralnic.com/kr.com/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.centralnic.com/kr.com/status_registered_spec.rb @@ -73,8 +73,7 @@ it do expect(subject.registrar).to be_a(Whois::Parser::Registrar) expect(subject.registrar.id).to eq("H292913") - expect(subject.registrar.name).to eq(nil) - expect(subject.registrar.organization).to eq("Network Solutions LLC") + expect(subject.registrar.name).to eq("Network Solutions LLC") expect(subject.registrar.url).to eq("http://www.networksolutions.com/") end end diff --git a/spec/whois/parsers/responses/whois.centralnic.com/qc.com/status_registered_spec.rb b/spec/whois/parsers/responses/whois.centralnic.com/qc.com/status_registered_spec.rb index c32b6c12..93c7477b 100644 --- a/spec/whois/parsers/responses/whois.centralnic.com/qc.com/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.centralnic.com/qc.com/status_registered_spec.rb @@ -73,8 +73,7 @@ it do expect(subject.registrar).to be_a(Whois::Parser::Registrar) expect(subject.registrar.id).to eq("7065-EN") - expect(subject.registrar.name).to eq(nil) - expect(subject.registrar.organization).to eq("eNom, Inc.") + expect(subject.registrar.name).to eq("eNom, Inc.") expect(subject.registrar.url).to eq("http://www.enom.com/") end end diff --git a/spec/whois/parsers/responses/whois.centralnic.com/sa.com/status_registered_spec.rb b/spec/whois/parsers/responses/whois.centralnic.com/sa.com/status_registered_spec.rb index 818b7acb..977332b7 100644 --- a/spec/whois/parsers/responses/whois.centralnic.com/sa.com/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.centralnic.com/sa.com/status_registered_spec.rb @@ -73,8 +73,7 @@ it do expect(subject.registrar).to be_a(Whois::Parser::Registrar) expect(subject.registrar.id).to eq("C30342") - expect(subject.registrar.name).to eq(nil) - expect(subject.registrar.organization).to eq("Paragon Internet Group") + expect(subject.registrar.name).to eq("Paragon Internet Group") expect(subject.registrar.url).to eq("http://www.paragon.net.uk") end end diff --git a/spec/whois/parsers/responses/whois.centralnic.com/se.com/status_registered_spec.rb b/spec/whois/parsers/responses/whois.centralnic.com/se.com/status_registered_spec.rb index 0d33f415..3917dbea 100644 --- a/spec/whois/parsers/responses/whois.centralnic.com/se.com/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.centralnic.com/se.com/status_registered_spec.rb @@ -73,8 +73,7 @@ it do expect(subject.registrar).to be_a(Whois::Parser::Registrar) expect(subject.registrar.id).to eq("7145-IX") - expect(subject.registrar.name).to eq(nil) - expect(subject.registrar.organization).to eq("InternetX GmbH") + expect(subject.registrar.name).to eq("InternetX GmbH") expect(subject.registrar.url).to eq("http://www.internetx.de/") end end diff --git a/spec/whois/parsers/responses/whois.centralnic.com/se.net/status_registered_spec.rb b/spec/whois/parsers/responses/whois.centralnic.com/se.net/status_registered_spec.rb index 2db851b9..5b17cbf6 100644 --- a/spec/whois/parsers/responses/whois.centralnic.com/se.net/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.centralnic.com/se.net/status_registered_spec.rb @@ -73,8 +73,7 @@ it do expect(subject.registrar).to be_a(Whois::Parser::Registrar) expect(subject.registrar.id).to eq("H2307235") - expect(subject.registrar.name).to eq(nil) - expect(subject.registrar.organization).to eq("Soluciones Corporativas IP, S.L.U.") + expect(subject.registrar.name).to eq("Soluciones Corporativas IP, S.L.U.") expect(subject.registrar.url).to eq("www.scip.es") end end diff --git a/spec/whois/parsers/responses/whois.centralnic.com/uk.com/status_registered_spec.rb b/spec/whois/parsers/responses/whois.centralnic.com/uk.com/status_registered_spec.rb index 04f5e52a..459b4744 100644 --- a/spec/whois/parsers/responses/whois.centralnic.com/uk.com/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.centralnic.com/uk.com/status_registered_spec.rb @@ -73,8 +73,7 @@ it do expect(subject.registrar).to be_a(Whois::Parser::Registrar) expect(subject.registrar.id).to eq("H78362") - expect(subject.registrar.name).to eq(nil) - expect(subject.registrar.organization).to eq("E-VELOCITY LTD") + expect(subject.registrar.name).to eq("E-VELOCITY LTD") expect(subject.registrar.url).to eq("http://www.e-velocity.co.uk/") end end diff --git a/spec/whois/parsers/responses/whois.centralnic.com/uk.net/status_registered_spec.rb b/spec/whois/parsers/responses/whois.centralnic.com/uk.net/status_registered_spec.rb index 0905540f..abeb5546 100644 --- a/spec/whois/parsers/responses/whois.centralnic.com/uk.net/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.centralnic.com/uk.net/status_registered_spec.rb @@ -73,8 +73,7 @@ it do expect(subject.registrar).to be_a(Whois::Parser::Registrar) expect(subject.registrar.id).to eq("I6467") - expect(subject.registrar.name).to eq(nil) - expect(subject.registrar.organization).to eq("Webfusion") + expect(subject.registrar.name).to eq("Webfusion") expect(subject.registrar.url).to eq("http://www.123-reg.co.uk/domain-names/") end end diff --git a/spec/whois/parsers/responses/whois.centralnic.com/uy.com/status_registered_spec.rb b/spec/whois/parsers/responses/whois.centralnic.com/uy.com/status_registered_spec.rb index 87347555..44506767 100644 --- a/spec/whois/parsers/responses/whois.centralnic.com/uy.com/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.centralnic.com/uy.com/status_registered_spec.rb @@ -73,8 +73,7 @@ it do expect(subject.registrar).to be_a(Whois::Parser::Registrar) expect(subject.registrar.id).to eq("I6467") - expect(subject.registrar.name).to eq(nil) - expect(subject.registrar.organization).to eq("Webfusion") + expect(subject.registrar.name).to eq("Webfusion") expect(subject.registrar.url).to eq("http://www.123-reg.co.uk/domain-names/") end end diff --git a/spec/whois/parsers/responses/whois.centralnic.com/za.com/status_registered_spec.rb b/spec/whois/parsers/responses/whois.centralnic.com/za.com/status_registered_spec.rb index 236286b1..fb50551c 100644 --- a/spec/whois/parsers/responses/whois.centralnic.com/za.com/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.centralnic.com/za.com/status_registered_spec.rb @@ -73,8 +73,7 @@ it do expect(subject.registrar).to be_a(Whois::Parser::Registrar) expect(subject.registrar.id).to eq("C12112") - expect(subject.registrar.name).to eq(nil) - expect(subject.registrar.organization).to eq("Megaweb Internet Services") + expect(subject.registrar.name).to eq("Megaweb Internet Services") expect(subject.registrar.url).to eq("http://www.megaweb.co.za/") end end diff --git a/spec/whois/parsers/responses/whois.cira.ca/ca/status_registered_spec.rb b/spec/whois/parsers/responses/whois.cira.ca/ca/status_registered_spec.rb index 1d1b9386..e800cde9 100644 --- a/spec/whois/parsers/responses/whois.cira.ca/ca/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.cira.ca/ca/status_registered_spec.rb @@ -74,7 +74,6 @@ expect(subject.registrar).to be_a(Whois::Parser::Registrar) expect(subject.registrar.id).to eq("5000040") expect(subject.registrar.name).to eq("MarkMonitor International Canada Ltd.") - expect(subject.registrar.organization).to eq("MarkMonitor International Canada Ltd.") expect(subject.registrar.url).to eq(nil) end end diff --git a/spec/whois/parsers/responses/whois.cmc.iq/iq/status_registered_spec.rb b/spec/whois/parsers/responses/whois.cmc.iq/iq/status_registered_spec.rb index a76904b1..bd74df9e 100644 --- a/spec/whois/parsers/responses/whois.cmc.iq/iq/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.cmc.iq/iq/status_registered_spec.rb @@ -69,7 +69,6 @@ expect(subject.registrar).to be_a(Whois::Parser::Registrar) expect(subject.registrar.id).to eq(nil) expect(subject.registrar.name).to eq("CMC Registrar") - expect(subject.registrar.organization).to eq(nil) expect(subject.registrar.url).to eq(nil) end end diff --git a/spec/whois/parsers/responses/whois.cnnic.cn/cn/status_registered_spec.rb b/spec/whois/parsers/responses/whois.cnnic.cn/cn/status_registered_spec.rb index b6d998e7..d3142f60 100644 --- a/spec/whois/parsers/responses/whois.cnnic.cn/cn/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.cnnic.cn/cn/status_registered_spec.rb @@ -73,7 +73,6 @@ expect(subject.registrar).to be_a(Whois::Parser::Registrar) expect(subject.registrar.id).to eq("MarkMonitor Inc.") expect(subject.registrar.name).to eq("MarkMonitor Inc.") - expect(subject.registrar.organization).to eq(nil) end end describe "#registrant_contacts" do diff --git a/spec/whois/parsers/responses/whois.corporatedomains.com/status_registered_spec.rb b/spec/whois/parsers/responses/whois.corporatedomains.com/status_registered_spec.rb index 19594b66..1e42d1d6 100644 --- a/spec/whois/parsers/responses/whois.corporatedomains.com/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.corporatedomains.com/status_registered_spec.rb @@ -69,7 +69,6 @@ expect(subject.registrar).to be_a(Whois::Parser::Registrar) expect(subject.registrar.id).to eq("299") expect(subject.registrar.name).to eq("CORPORATE DOMAINS, INC.") - expect(subject.registrar.organization).to eq("CORPORATE DOMAINS, INC.") expect(subject.registrar.url).to eq("www.cscprotectsbrands.com") end end diff --git a/spec/whois/parsers/responses/whois.denic.de/de/status_registered_spec.rb b/spec/whois/parsers/responses/whois.denic.de/de/status_registered_spec.rb index 11e050a8..c9aba2ac 100644 --- a/spec/whois/parsers/responses/whois.denic.de/de/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.denic.de/de/status_registered_spec.rb @@ -72,7 +72,6 @@ expect(subject.registrar).to be_a(Whois::Parser::Registrar) expect(subject.registrar.id).to eq(nil) expect(subject.registrar.name).to eq("Domain Admin") - expect(subject.registrar.organization).to eq("MarkMonitor Inc") expect(subject.registrar.url).to eq(nil) end end diff --git a/spec/whois/parsers/responses/whois.dns.pl/pl/status_registered_spec.rb b/spec/whois/parsers/responses/whois.dns.pl/pl/status_registered_spec.rb index 59e4c896..241ad366 100644 --- a/spec/whois/parsers/responses/whois.dns.pl/pl/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.dns.pl/pl/status_registered_spec.rb @@ -69,7 +69,6 @@ expect(subject.registrar).to be_a(Whois::Parser::Registrar) expect(subject.registrar.id).to eq(nil) expect(subject.registrar.name).to eq("Markmonitor, Inc.") - expect(subject.registrar.organization).to eq(nil) expect(subject.registrar.url).to eq(nil) end end diff --git a/spec/whois/parsers/responses/whois.donuts.co/bike/status_registered_spec.rb b/spec/whois/parsers/responses/whois.donuts.co/bike/status_registered_spec.rb index cabfebd8..5b51dfac 100644 --- a/spec/whois/parsers/responses/whois.donuts.co/bike/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.donuts.co/bike/status_registered_spec.rb @@ -69,7 +69,6 @@ expect(subject.registrar).to be_a(Whois::Parser::Registrar) expect(subject.registrar.id).to eq("146") expect(subject.registrar.name).to eq("GoDaddy.com, LLC") - expect(subject.registrar.organization).to eq("GoDaddy.com, LLC") expect(subject.registrar.url).to eq("http://www.godaddy.com/domains/search.aspx?ci=8990") end end diff --git a/spec/whois/parsers/responses/whois.dotmobiregistry.net/mobi/status_available_spec.rb b/spec/whois/parsers/responses/whois.dotmobiregistry.net/mobi/status_available_spec.rb index bf72315b..f3234c2a 100644 --- a/spec/whois/parsers/responses/whois.dotmobiregistry.net/mobi/status_available_spec.rb +++ b/spec/whois/parsers/responses/whois.dotmobiregistry.net/mobi/status_available_spec.rb @@ -23,7 +23,7 @@ describe "#disclaimer" do it do - expect(subject.disclaimer).to eq(nil) + expect(subject.disclaimer).to eq("Access to AFILIAS WHOIS information is provided to assist persons in determining the contents of a domain name registration record in the Afilias registry database. The data in this record is provided by Afilias Limited for informational purposes only, and Afilias 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. Afilias reserves the right to modify these terms at any time. By submitting this query, you agree to abide by this policy. The Registrar of Record identified in this output may have an RDDS service that can be queried for additional information on how to contact the Registrant, Admin, or Tech contact of the queried domain name.") end end describe "#domain" do diff --git a/spec/whois/parsers/responses/whois.dotmobiregistry.net/mobi/status_registered_spec.rb b/spec/whois/parsers/responses/whois.dotmobiregistry.net/mobi/status_registered_spec.rb index 475ab5e4..98b29331 100644 --- a/spec/whois/parsers/responses/whois.dotmobiregistry.net/mobi/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.dotmobiregistry.net/mobi/status_registered_spec.rb @@ -23,7 +23,7 @@ describe "#disclaimer" do it do - expect(subject.disclaimer).to eq("mTLD WHOIS LEGAL STATEMENT AND TERMS & CONDITIONS: The WHOIS service offered by mTLD and the access to the records in the mTLD WHOIS database are provided for information purposes only. It allows persons to check whether a specific domain name is still available or not and to obtain information related to the registration records of existing domain names. mTLD cannot, under any circumstances, be held liable in case the stored information would prove to be wrong, incomplete, or not accurate in any sense. By submitting a query you agree not to use the information made available to: allow, enable or otherwise support the transmission of unsolicited, commercial advertising or other solicitations whether via email or otherwise; target advertising in any possible way; or to cause nuisance in any possible way to the registrants by sending (whether by automated, electronic processes capable of enabling high volumes or other possible means) messages to them. Without prejudice to the above, it is explicitly forbidden to extract, copy and/or use or re-utilise in any form and by any means (electronically or not) the whole or a quantitatively or qualitatively substantial part of the contents of the WHOIS database without prior and explicit permission by mTLD, nor in any attempt hereof, or to apply automated, electronic processes to mTLD (or its systems). You agree that any reproduction and/or transmission of data for commercial purposes will always be considered as the extraction of a substantial part of the content of the WHOIS database. By submitting the query you agree to abide by this policy and accept that mTLD can take measures to limit the use of its WHOIS services in order to protect the privacy of its registrants or the integrity of the database.") + expect(subject.disclaimer).to eq("Access to AFILIAS WHOIS information is provided to assist persons in determining the contents of a domain name registration record in the Afilias registry database. The data in this record is provided by Afilias Limited for informational purposes only, and Afilias 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. Afilias reserves the right to modify these terms at any time. By submitting this query, you agree to abide by this policy. The Registrar of Record identified in this output may have an RDDS service that can be queried for additional information on how to contact the Registrant, Admin, or Tech contact of the queried domain name.") end end describe "#domain" do @@ -33,12 +33,12 @@ end describe "#domain_id" do it do - expect(subject.domain_id).to eq("D117-MOBI") + expect(subject.domain_id).to eq("D102500000000000117-LRMS") end end describe "#status" do it do - expect(subject.status).to eq(["CLIENT DELETE PROHIBITED", "CLIENT TRANSFER PROHIBITED", "CLIENT UPDATE PROHIBITED"]) + expect(subject.status).to eq(["clientDeleteProhibited https://icann.org/epp#clientDeleteProhibited", "clientTransferProhibited https://icann.org/epp#clientTransferProhibited", "clientUpdateProhibited https://icann.org/epp#clientUpdateProhibited"]) end end describe "#available?" do @@ -60,13 +60,13 @@ describe "#updated_on" do it do expect(subject.updated_on).to be_a(Time) - expect(subject.updated_on).to eq(Time.parse("2013-04-09 09:24:02 UTC")) + expect(subject.updated_on).to eq(Time.parse("2021-04-09 09:29:29 UTC")) end end describe "#expires_on" do it do expect(subject.expires_on).to be_a(Time) - expect(subject.expires_on).to eq(Time.parse("2014-05-11 21:08:42 UTC")) + expect(subject.expires_on).to eq(Time.parse("2022-05-11 21:08:42 UTC")) end end describe "#registrar" do @@ -74,8 +74,7 @@ expect(subject.registrar).to be_a(Whois::Parser::Registrar) expect(subject.registrar.id).to eq("292") expect(subject.registrar.name).to eq("MarkMonitor Inc.") - expect(subject.registrar.organization).to eq(nil) - expect(subject.registrar.url).to eq(nil) + expect(subject.registrar.url).to eq("http://www.markmonitor.com") end end describe "#registrant_contacts" do @@ -84,55 +83,29 @@ expect(subject.registrant_contacts.size).to eq(1) expect(subject.registrant_contacts[0]).to be_a(Whois::Parser::Contact) expect(subject.registrant_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_REGISTRANT) - expect(subject.registrant_contacts[0].id).to eq("mmr-14290820") - expect(subject.registrant_contacts[0].name).to eq("DNS Admin") - expect(subject.registrant_contacts[0].organization).to eq("Google Inc.") - expect(subject.registrant_contacts[0].address).to eq("1600 Amphitheatre Parkway") - expect(subject.registrant_contacts[0].city).to eq("Mountain View") - expect(subject.registrant_contacts[0].zip).to eq("94043") + expect(subject.registrant_contacts[0].id).to eq(nil) + expect(subject.registrant_contacts[0].name).to eq(nil) + expect(subject.registrant_contacts[0].organization).to eq("Google LLC") + expect(subject.registrant_contacts[0].address).to eq(nil) + expect(subject.registrant_contacts[0].city).to eq(nil) + expect(subject.registrant_contacts[0].zip).to eq(nil) expect(subject.registrant_contacts[0].state).to eq("CA") expect(subject.registrant_contacts[0].country_code).to eq("US") - expect(subject.registrant_contacts[0].phone).to eq("+1.6506234000") - expect(subject.registrant_contacts[0].fax).to eq("+1.6506188571") - expect(subject.registrant_contacts[0].email).to eq("dns-admin@google.com") + expect(subject.registrant_contacts[0].phone).to eq(nil) + expect(subject.registrant_contacts[0].fax).to eq(nil) + expect(subject.registrant_contacts[0].email).to eq(nil) end end describe "#admin_contacts" do it do expect(subject.admin_contacts).to be_a(Array) - expect(subject.admin_contacts.size).to eq(1) - expect(subject.admin_contacts[0]).to be_a(Whois::Parser::Contact) - expect(subject.admin_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_ADMINISTRATIVE) - expect(subject.admin_contacts[0].id).to eq("mmr-14290820") - expect(subject.admin_contacts[0].name).to eq("DNS Admin") - expect(subject.admin_contacts[0].organization).to eq("Google Inc.") - expect(subject.admin_contacts[0].address).to eq("1600 Amphitheatre Parkway") - expect(subject.admin_contacts[0].city).to eq("Mountain View") - expect(subject.admin_contacts[0].zip).to eq("94043") - expect(subject.admin_contacts[0].state).to eq("CA") - expect(subject.admin_contacts[0].country_code).to eq("US") - expect(subject.admin_contacts[0].phone).to eq("+1.6506234000") - expect(subject.admin_contacts[0].fax).to eq("+1.6506188571") - expect(subject.admin_contacts[0].email).to eq("dns-admin@google.com") + expect(subject.admin_contacts.size).to eq(0) end end describe "#technical_contacts" do it do expect(subject.technical_contacts).to be_a(Array) - expect(subject.technical_contacts.size).to eq(1) - expect(subject.technical_contacts[0]).to be_a(Whois::Parser::Contact) - expect(subject.technical_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_TECHNICAL) - expect(subject.technical_contacts[0].id).to eq("mmr-14290820") - expect(subject.technical_contacts[0].name).to eq("DNS Admin") - expect(subject.technical_contacts[0].organization).to eq("Google Inc.") - expect(subject.technical_contacts[0].address).to eq("1600 Amphitheatre Parkway") - expect(subject.technical_contacts[0].city).to eq("Mountain View") - expect(subject.technical_contacts[0].zip).to eq("94043") - expect(subject.technical_contacts[0].state).to eq("CA") - expect(subject.technical_contacts[0].country_code).to eq("US") - expect(subject.technical_contacts[0].phone).to eq("+1.6506234000") - expect(subject.technical_contacts[0].fax).to eq("+1.6506188571") - expect(subject.technical_contacts[0].email).to eq("dns-admin@google.com") + expect(subject.technical_contacts.size).to eq(0) end end describe "#nameservers" do diff --git a/spec/whois/parsers/responses/whois.dotpostregistry.net/post/status_available_spec.rb b/spec/whois/parsers/responses/whois.dotpostregistry.net/post/status_available_spec.rb index 5f39ff43..a14851fa 100644 --- a/spec/whois/parsers/responses/whois.dotpostregistry.net/post/status_available_spec.rb +++ b/spec/whois/parsers/responses/whois.dotpostregistry.net/post/status_available_spec.rb @@ -23,7 +23,7 @@ describe "#disclaimer" do it do - expect(subject.disclaimer).to eq(nil) + expect(subject.disclaimer).to eq("Access to WHOIS information is provided to assist persons in determining the contents of a domain name registration record in the registry database. The data in this record is provided by The Registry Operator for informational purposes only, and accuracy is not guaranteed. 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. Registry Operator reserves the right to modify these terms at any time. By submitting this query, you agree to abide by this policy. The Registrar of Record identified in this output may have an RDDS service that can be queried for additional information on how to contact the Registrant, Admin, or Tech contact of the queried domain name.") end end describe "#domain" do diff --git a/spec/whois/parsers/responses/whois.dotpostregistry.net/post/status_registered_spec.rb b/spec/whois/parsers/responses/whois.dotpostregistry.net/post/status_registered_spec.rb index ec2567b1..dc364951 100644 --- a/spec/whois/parsers/responses/whois.dotpostregistry.net/post/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.dotpostregistry.net/post/status_registered_spec.rb @@ -23,7 +23,7 @@ describe "#disclaimer" do it do - expect(subject.disclaimer).to eq("Access to .POST REGISTRY WHOIS information is provided to assist persons in determining the contents of a domain name registration record in the .POST Registry registry database. The data in this record is provided by .POST Registry for informational purposes only, and .POST Registry 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. .POST Registry reserves the right to modify these terms at any time. By submitting this query, you agree to abide by this policy.") + expect(subject.disclaimer).to eq("Access to WHOIS information is provided to assist persons in determining the contents of a domain name registration record in the registry database. The data in this record is provided by The Registry Operator for informational purposes only, and accuracy is not guaranteed. 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. Registry Operator reserves the right to modify these terms at any time. By submitting this query, you agree to abide by this policy. The Registrar of Record identified in this output may have an RDDS service that can be queried for additional information on how to contact the Registrant, Admin, or Tech contact of the queried domain name.") end end describe "#domain" do @@ -33,12 +33,12 @@ end describe "#domain_id" do it do - expect(subject.domain_id).to eq("D19482-POST") + expect(subject.domain_id).to eq("D108700000000019482-AGRS") end end describe "#status" do it do - expect(subject.status).to eq(["TRANSFER PROHIBITED"]) + expect(subject.status).to eq(["ok https://icann.org/epp#ok"]) end end describe "#available?" do @@ -60,22 +60,21 @@ describe "#updated_on" do it do expect(subject.updated_on).to be_a(Time) - expect(subject.updated_on).to eq(Time.parse("2012-09-21 12:07:40 UTC")) + expect(subject.updated_on).to eq(Time.parse("2021-09-21 22:31:15 UTC")) end end describe "#expires_on" do it do expect(subject.expires_on).to be_a(Time) - expect(subject.expires_on).to eq(Time.parse("2014-09-21 12:03:07 UTC")) + expect(subject.expires_on).to eq(Time.parse("2022-09-21 12:03:07 UTC")) end end describe "#registrar" do it do expect(subject.registrar).to be_a(Whois::Parser::Registrar) - expect(subject.registrar.id).to eq("R4947-POST") + expect(subject.registrar.id).to eq("9999") expect(subject.registrar.name).to eq("Universal Postal Union") - expect(subject.registrar.organization).to eq(nil) - expect(subject.registrar.url).to eq(nil) + expect(subject.registrar.url).to eq("") end end describe "#registrant_contacts" do @@ -84,7 +83,7 @@ expect(subject.registrant_contacts.size).to eq(1) expect(subject.registrant_contacts[0]).to be_a(Whois::Parser::Contact) expect(subject.registrant_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_REGISTRANT) - expect(subject.registrant_contacts[0].id).to eq("ITPI30001") + expect(subject.registrant_contacts[0].id).to eq("C19309314-AGRS") expect(subject.registrant_contacts[0].name).to eq("Poste Italiane") expect(subject.registrant_contacts[0].organization).to eq("Poste Italiane") expect(subject.registrant_contacts[0].address).to eq("Viale Europa 190") @@ -103,7 +102,7 @@ expect(subject.admin_contacts.size).to eq(1) expect(subject.admin_contacts[0]).to be_a(Whois::Parser::Contact) expect(subject.admin_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_ADMINISTRATIVE) - expect(subject.admin_contacts[0].id).to eq("UPU_C1002") + expect(subject.admin_contacts[0].id).to eq("C19309312-AGRS") expect(subject.admin_contacts[0].name).to eq("Giovanni Brardinoni") expect(subject.admin_contacts[0].organization).to eq("Poste Italiane") expect(subject.admin_contacts[0].address).to eq("Viale Europa 175") @@ -122,7 +121,7 @@ expect(subject.technical_contacts.size).to eq(1) expect(subject.technical_contacts[0]).to be_a(Whois::Parser::Contact) expect(subject.technical_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_TECHNICAL) - expect(subject.technical_contacts[0].id).to eq("UPU_C1001") + expect(subject.technical_contacts[0].id).to eq("C19309311-AGRS") expect(subject.technical_contacts[0].name).to eq("Andrea Speranza") expect(subject.technical_contacts[0].organization).to eq("Poste Italiane") expect(subject.technical_contacts[0].address).to eq("Viale Europa 175") diff --git a/spec/whois/parsers/responses/whois.dreamhost.com/status_registered_spec.rb b/spec/whois/parsers/responses/whois.dreamhost.com/status_registered_spec.rb index cf39549e..f190da42 100644 --- a/spec/whois/parsers/responses/whois.dreamhost.com/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.dreamhost.com/status_registered_spec.rb @@ -59,7 +59,6 @@ expect(subject.registrar).to be_a(Whois::Parser::Registrar) expect(subject.registrar.id).to eq("431") expect(subject.registrar.name).to eq("DREAMHOST") - expect(subject.registrar.organization).to eq("DREAMHOST") expect(subject.registrar.url).to eq("www.dreamhost.com") end end diff --git a/spec/whois/parsers/responses/whois.enom.com/status_registered_spec.rb b/spec/whois/parsers/responses/whois.enom.com/status_registered_spec.rb index a362009b..3d1be040 100644 --- a/spec/whois/parsers/responses/whois.enom.com/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.enom.com/status_registered_spec.rb @@ -67,7 +67,6 @@ expect(subject.registrar).to be_a(Whois::Parser::Registrar) expect(subject.registrar.id).to eq(nil) expect(subject.registrar.name).to eq("eNom, Inc.") - expect(subject.registrar.organization).to eq("eNom, Inc.") expect(subject.registrar.url).to eq(nil) end end diff --git a/spec/whois/parsers/responses/whois.eu/eu/status_registered_spec.rb b/spec/whois/parsers/responses/whois.eu/eu/status_registered_spec.rb index d2483fdc..81647fd6 100644 --- a/spec/whois/parsers/responses/whois.eu/eu/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.eu/eu/status_registered_spec.rb @@ -66,7 +66,6 @@ expect(subject.registrar).to be_a(Whois::Parser::Registrar) expect(subject.registrar.id).to eq(nil) expect(subject.registrar.name).to eq("MarkMonitor Inc.") - expect(subject.registrar.organization).to eq(nil) expect(subject.registrar.url).to eq("https://www.markmonitor.com/") end end diff --git a/spec/whois/parsers/responses/whois.gandi.net/status_registered_spec.rb b/spec/whois/parsers/responses/whois.gandi.net/status_registered_spec.rb index a68090f6..6a921d0b 100644 --- a/spec/whois/parsers/responses/whois.gandi.net/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.gandi.net/status_registered_spec.rb @@ -69,7 +69,6 @@ expect(subject.registrar).to be_a(Whois::Parser::Registrar) expect(subject.registrar.id).to eq("81") expect(subject.registrar.name).to eq("GANDI SAS") - expect(subject.registrar.organization).to eq("GANDI SAS") expect(subject.registrar.url).to eq("http://www.gandi.net") end end diff --git a/spec/whois/parsers/responses/whois.godaddy.com/status_registered_spec.rb b/spec/whois/parsers/responses/whois.godaddy.com/status_registered_spec.rb index c520075f..ba17b23a 100644 --- a/spec/whois/parsers/responses/whois.godaddy.com/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.godaddy.com/status_registered_spec.rb @@ -69,7 +69,6 @@ expect(subject.registrar).to be_a(Whois::Parser::Registrar) expect(subject.registrar.id).to eq("146") expect(subject.registrar.name).to eq("GoDaddy.com, LLC") - expect(subject.registrar.organization).to eq("GoDaddy.com, LLC") expect(subject.registrar.url).to eq("http://www.godaddy.com") end end diff --git a/spec/whois/parsers/responses/whois.inregistry.net/in/property_status_missing_spec.rb b/spec/whois/parsers/responses/whois.inregistry.net/in/property_status_missing_spec.rb deleted file mode 100644 index 9a013360..00000000 --- a/spec/whois/parsers/responses/whois.inregistry.net/in/property_status_missing_spec.rb +++ /dev/null @@ -1,29 +0,0 @@ -# encoding: utf-8 - -# This file is autogenerated. Do not edit it manually. -# If you want change the content of this file, edit -# -# /spec/fixtures/responses/whois.inregistry.net/in/property_status_missing.expected -# -# and regenerate the tests with the following rake task -# -# $ rake spec:generate -# - -require 'spec_helper' -require 'whois/parsers/whois.inregistry.net.rb' - -describe Whois::Parsers::WhoisInregistryNet, "property_status_missing.expected" do - - subject do - file = fixture("responses", "whois.inregistry.net/in/property_status_missing.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) - end - - describe "#status" do - it do - expect(subject.status).to eq([]) - end - end -end diff --git a/spec/whois/parsers/responses/whois.inregistry.net/in/property_status_multiple_spec.rb b/spec/whois/parsers/responses/whois.inregistry.net/in/property_status_multiple_spec.rb deleted file mode 100644 index 213f311a..00000000 --- a/spec/whois/parsers/responses/whois.inregistry.net/in/property_status_multiple_spec.rb +++ /dev/null @@ -1,29 +0,0 @@ -# encoding: utf-8 - -# This file is autogenerated. Do not edit it manually. -# If you want change the content of this file, edit -# -# /spec/fixtures/responses/whois.inregistry.net/in/property_status_multiple.expected -# -# and regenerate the tests with the following rake task -# -# $ rake spec:generate -# - -require 'spec_helper' -require 'whois/parsers/whois.inregistry.net.rb' - -describe Whois::Parsers::WhoisInregistryNet, "property_status_multiple.expected" do - - subject do - file = fixture("responses", "whois.inregistry.net/in/property_status_multiple.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) - end - - describe "#status" do - it do - expect(subject.status).to eq(["CLIENT DELETE PROHIBITED", "CLIENT RENEW PROHIBITED", "CLIENT TRANSFER PROHIBITED", "CLIENT UPDATE PROHIBITED"]) - end - end -end diff --git a/spec/whois/parsers/responses/whois.inregistry.net/in/property_status_ok_spec.rb b/spec/whois/parsers/responses/whois.inregistry.net/in/property_status_ok_spec.rb deleted file mode 100644 index 00e84bfb..00000000 --- a/spec/whois/parsers/responses/whois.inregistry.net/in/property_status_ok_spec.rb +++ /dev/null @@ -1,29 +0,0 @@ -# encoding: utf-8 - -# This file is autogenerated. Do not edit it manually. -# If you want change the content of this file, edit -# -# /spec/fixtures/responses/whois.inregistry.net/in/property_status_ok.expected -# -# and regenerate the tests with the following rake task -# -# $ rake spec:generate -# - -require 'spec_helper' -require 'whois/parsers/whois.inregistry.net.rb' - -describe Whois::Parsers::WhoisInregistryNet, "property_status_ok.expected" do - - subject do - file = fixture("responses", "whois.inregistry.net/in/property_status_ok.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) - end - - describe "#status" do - it do - expect(subject.status).to eq(["OK"]) - end - end -end diff --git a/spec/whois/parsers/responses/whois.inregistry.net/in/status_available_spec.rb b/spec/whois/parsers/responses/whois.inregistry.net/in/status_available_spec.rb index f06fe16a..e239e881 100644 --- a/spec/whois/parsers/responses/whois.inregistry.net/in/status_available_spec.rb +++ b/spec/whois/parsers/responses/whois.inregistry.net/in/status_available_spec.rb @@ -23,7 +23,7 @@ describe "#disclaimer" do it do - expect(subject.disclaimer).to eq(nil) + expect(subject.disclaimer).to eq("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 or a Registrar, or Neustar 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.") end end describe "#domain" do diff --git a/spec/whois/parsers/responses/whois.inregistry.net/in/status_registered_spec.rb b/spec/whois/parsers/responses/whois.inregistry.net/in/status_registered_spec.rb index 2779afc3..b6d0d15d 100644 --- a/spec/whois/parsers/responses/whois.inregistry.net/in/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.inregistry.net/in/status_registered_spec.rb @@ -23,7 +23,7 @@ describe "#disclaimer" do it do - expect(subject.disclaimer).to eq("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.") + expect(subject.disclaimer).to eq("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 or a Registrar, or Neustar 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.") end end describe "#domain" do @@ -33,12 +33,12 @@ end describe "#domain_id" do it do - expect(subject.domain_id).to eq("D21089-AFIN") + expect(subject.domain_id).to eq("D21089-IN") end end describe "#status" do it do - expect(subject.status).to eq(["CLIENT DELETE PROHIBITED", "CLIENT TRANSFER PROHIBITED", "CLIENT UPDATE PROHIBITED"]) + expect(subject.status).to eq(["clientTransferProhibited http://www.icann.org/epp#clientTransferProhibited", "clientDeleteProhibited http://www.icann.org/epp#clientDeleteProhibited", "clientUpdateProhibited http://www.icann.org/epp#clientUpdateProhibited"]) end end describe "#available?" do @@ -58,19 +58,20 @@ end describe "#updated_on" do it do - expect(subject.updated_on).to eq(Time.parse("2015-01-13 10:22:36 UTC")) + expect(subject.updated_on).to eq(Time.parse("2021-01-18 10:38:43 UTC")) end end describe "#expires_on" do it do - expect(subject.expires_on).to eq(Time.parse("2016-02-14 20:35:14 UTC")) + expect(subject.expires_on).to eq(Time.parse("2022-02-14 20:35:14 UTC")) end end describe "#registrar" do it do expect(subject.registrar).to be_a(Whois::Parser::Registrar) - expect(subject.registrar.id).to eq("R84-AFIN") - expect(subject.registrar.name).to eq("Mark Monitor") + expect(subject.registrar.id).to eq("292") + expect(subject.registrar.name).to eq("MarkMonitor Inc.") + expect(subject.registrar.url).to eq("http://www.markmonitor.com") end end describe "#registrant_contacts" do @@ -79,20 +80,18 @@ expect(subject.registrant_contacts.size).to eq(1) expect(subject.registrant_contacts[0]).to be_a(Whois::Parser::Contact) expect(subject.registrant_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_REGISTRANT) - expect(subject.registrant_contacts[0].id).to eq("mmr-108695") - expect(subject.registrant_contacts[0].name).to eq("Christina Chiou") - expect(subject.registrant_contacts[0].organization).to eq("Google Inc.") - expect(subject.registrant_contacts[0].address).to eq("1600 Amphitheatre Parkway") - expect(subject.registrant_contacts[0].city).to eq("Mountain View") - expect(subject.registrant_contacts[0].zip).to eq("94043") + expect(subject.registrant_contacts[0].id).to eq("REDACTED FOR PRIVACY") + expect(subject.registrant_contacts[0].name).to eq("REDACTED FOR PRIVACY") + expect(subject.registrant_contacts[0].organization).to eq("Google LLC") + expect(subject.registrant_contacts[0].address).to eq("REDACTED FOR PRIVACY\nREDACTED FOR PRIVACY\nREDACTED FOR PRIVACY") + expect(subject.registrant_contacts[0].city).to eq("REDACTED FOR PRIVACY") + expect(subject.registrant_contacts[0].zip).to eq("REDACTED FOR PRIVACY") expect(subject.registrant_contacts[0].state).to eq("CA") expect(subject.registrant_contacts[0].country).to eq(nil) expect(subject.registrant_contacts[0].country_code).to eq("US") - expect(subject.registrant_contacts[0].phone).to eq("+1.6502530000") - expect(subject.registrant_contacts[0].fax).to eq("+1.6502530001") - expect(subject.registrant_contacts[0].email).to eq("dns-admin@google.com") - expect(subject.registrant_contacts[0].created_on).to eq(nil) - expect(subject.registrant_contacts[0].updated_on).to eq(nil) + expect(subject.registrant_contacts[0].phone).to eq("REDACTED FOR PRIVACY") + expect(subject.registrant_contacts[0].fax).to eq("REDACTED FOR PRIVACY") + expect(subject.registrant_contacts[0].email).to eq("Please contact the Registrar listed above") end end describe "#admin_contacts" do @@ -101,20 +100,18 @@ expect(subject.admin_contacts.size).to eq(1) expect(subject.admin_contacts[0]).to be_a(Whois::Parser::Contact) expect(subject.admin_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_ADMINISTRATIVE) - expect(subject.admin_contacts[0].id).to eq("mmr-108695") - expect(subject.admin_contacts[0].name).to eq("Christina Chiou") - expect(subject.admin_contacts[0].organization).to eq("Google Inc.") - expect(subject.admin_contacts[0].address).to eq("1600 Amphitheatre Parkway") - expect(subject.admin_contacts[0].city).to eq("Mountain View") - expect(subject.admin_contacts[0].zip).to eq("94043") - expect(subject.admin_contacts[0].state).to eq("CA") + expect(subject.admin_contacts[0].id).to eq("REDACTED FOR PRIVACY") + expect(subject.admin_contacts[0].name).to eq("REDACTED FOR PRIVACY") + expect(subject.admin_contacts[0].organization).to eq("REDACTED FOR PRIVACY") + expect(subject.admin_contacts[0].address).to eq("REDACTED FOR PRIVACY\nREDACTED FOR PRIVACY\nREDACTED FOR PRIVACY") + expect(subject.admin_contacts[0].city).to eq("REDACTED FOR PRIVACY") + expect(subject.admin_contacts[0].zip).to eq("REDACTED FOR PRIVACY") + expect(subject.admin_contacts[0].state).to eq("REDACTED FOR PRIVACY") expect(subject.admin_contacts[0].country).to eq(nil) - expect(subject.admin_contacts[0].country_code).to eq("US") - expect(subject.admin_contacts[0].phone).to eq("+1.6502530000") - expect(subject.admin_contacts[0].fax).to eq("+1.6502530001") - expect(subject.admin_contacts[0].email).to eq("dns-admin@google.com") - expect(subject.admin_contacts[0].created_on).to eq(nil) - expect(subject.admin_contacts[0].updated_on).to eq(nil) + expect(subject.admin_contacts[0].country_code).to eq("REDACTED FOR PRIVACY") + expect(subject.admin_contacts[0].phone).to eq("REDACTED FOR PRIVACY") + expect(subject.admin_contacts[0].fax).to eq("REDACTED FOR PRIVACY") + expect(subject.admin_contacts[0].email).to eq("Please contact the Registrar listed above") end end describe "#technical_contacts" do @@ -123,20 +120,18 @@ expect(subject.technical_contacts.size).to eq(1) expect(subject.technical_contacts[0]).to be_a(Whois::Parser::Contact) expect(subject.technical_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_TECHNICAL) - expect(subject.technical_contacts[0].id).to eq("mmr-108695") - expect(subject.technical_contacts[0].name).to eq("Christina Chiou") - expect(subject.technical_contacts[0].organization).to eq("Google Inc.") - expect(subject.technical_contacts[0].address).to eq("1600 Amphitheatre Parkway") - expect(subject.technical_contacts[0].city).to eq("Mountain View") - expect(subject.technical_contacts[0].zip).to eq("94043") - expect(subject.technical_contacts[0].state).to eq("CA") + expect(subject.technical_contacts[0].id).to eq("REDACTED FOR PRIVACY") + expect(subject.technical_contacts[0].name).to eq("REDACTED FOR PRIVACY") + expect(subject.technical_contacts[0].organization).to eq("REDACTED FOR PRIVACY") + expect(subject.technical_contacts[0].address).to eq("REDACTED FOR PRIVACY\nREDACTED FOR PRIVACY\nREDACTED FOR PRIVACY") + expect(subject.technical_contacts[0].city).to eq("REDACTED FOR PRIVACY") + expect(subject.technical_contacts[0].zip).to eq("REDACTED FOR PRIVACY") + expect(subject.technical_contacts[0].state).to eq("REDACTED FOR PRIVACY") expect(subject.technical_contacts[0].country).to eq(nil) - expect(subject.technical_contacts[0].country_code).to eq("US") - expect(subject.technical_contacts[0].phone).to eq("+1.6502530000") - expect(subject.technical_contacts[0].fax).to eq("+1.6502530001") - expect(subject.technical_contacts[0].email).to eq("dns-admin@google.com") - expect(subject.technical_contacts[0].created_on).to eq(nil) - expect(subject.technical_contacts[0].updated_on).to eq(nil) + expect(subject.technical_contacts[0].country_code).to eq("REDACTED FOR PRIVACY") + expect(subject.technical_contacts[0].phone).to eq("REDACTED FOR PRIVACY") + expect(subject.technical_contacts[0].fax).to eq("REDACTED FOR PRIVACY") + expect(subject.technical_contacts[0].email).to eq("Please contact the Registrar listed above") end end describe "#nameservers" do @@ -145,13 +140,13 @@ expect(subject.nameservers.size).to eq(4) expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[0].name).to eq("ns1.google.com") + expect(subject.nameservers[0].name).to eq("ns4.google.com") expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) expect(subject.nameservers[1].name).to eq("ns2.google.com") expect(subject.nameservers[2]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[2].name).to eq("ns3.google.com") + expect(subject.nameservers[2].name).to eq("ns1.google.com") expect(subject.nameservers[3]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[3].name).to eq("ns4.google.com") + expect(subject.nameservers[3].name).to eq("ns3.google.com") end end end diff --git a/spec/whois/parsers/responses/whois.markmonitor.com/status_registered_spec.rb b/spec/whois/parsers/responses/whois.markmonitor.com/status_registered_spec.rb index c03fa6f6..9e0997ee 100644 --- a/spec/whois/parsers/responses/whois.markmonitor.com/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.markmonitor.com/status_registered_spec.rb @@ -69,7 +69,6 @@ expect(subject.registrar).to be_a(Whois::Parser::Registrar) expect(subject.registrar.id).to eq("292") expect(subject.registrar.name).to eq("MarkMonitor, Inc.") - expect(subject.registrar.organization).to eq("MarkMonitor, Inc.") expect(subject.registrar.url).to eq("http://www.markmonitor.com") end end diff --git a/spec/whois/parsers/responses/whois.monic.mo/mo/status_registered_spec.rb b/spec/whois/parsers/responses/whois.monic.mo/mo/status_registered_spec.rb index 78edc891..e964134e 100644 --- a/spec/whois/parsers/responses/whois.monic.mo/mo/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.monic.mo/mo/status_registered_spec.rb @@ -71,7 +71,6 @@ expect(subject.registrar).to be_a(Whois::Parser::Registrar) expect(subject.registrar.id).to eq(nil) expect(subject.registrar.name).to eq("MONIC") - expect(subject.registrar.organization).to eq(nil) expect(subject.registrar.url).to eq(nil) end end diff --git a/spec/whois/parsers/responses/whois.na-nic.com.na/na/status_registered_spec.rb b/spec/whois/parsers/responses/whois.na-nic.com.na/na/status_registered_spec.rb index e3348a0b..9f8a5b48 100644 --- a/spec/whois/parsers/responses/whois.na-nic.com.na/na/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.na-nic.com.na/na/status_registered_spec.rb @@ -69,7 +69,6 @@ expect(subject.registrar).to be_a(Whois::Parser::Registrar) expect(subject.registrar.id).to eq(nil) expect(subject.registrar.name).to eq("MarkMonitor") - expect(subject.registrar.organization).to eq(nil) expect(subject.registrar.url).to eq("http://www.markmonitor.com") end end diff --git a/spec/whois/parsers/responses/whois.netcom.cm/cm/status_registered_spec.rb b/spec/whois/parsers/responses/whois.netcom.cm/cm/status_registered_spec.rb index ef1ce442..4c2d5a38 100644 --- a/spec/whois/parsers/responses/whois.netcom.cm/cm/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.netcom.cm/cm/status_registered_spec.rb @@ -69,7 +69,6 @@ expect(subject.registrar).to be_a(Whois::Parser::Registrar) expect(subject.registrar.id).to eq(nil) expect(subject.registrar.name).to eq("MarkMonitor Inc.") - expect(subject.registrar.organization).to eq(nil) expect(subject.registrar.url).to eq(nil) end end diff --git a/spec/whois/parsers/responses/whois.netcom.cm/cm/status_suspended_spec.rb b/spec/whois/parsers/responses/whois.netcom.cm/cm/status_suspended_spec.rb index 949fe039..a3c25afc 100644 --- a/spec/whois/parsers/responses/whois.netcom.cm/cm/status_suspended_spec.rb +++ b/spec/whois/parsers/responses/whois.netcom.cm/cm/status_suspended_spec.rb @@ -69,7 +69,6 @@ expect(subject.registrar).to be_a(Whois::Parser::Registrar) expect(subject.registrar.id).to eq(nil) expect(subject.registrar.name).to eq("Registrar ANTIC") - expect(subject.registrar.organization).to eq(nil) expect(subject.registrar.url).to eq(nil) end end diff --git a/spec/whois/parsers/responses/whois.networksolutions.com/status_registered_spec.rb b/spec/whois/parsers/responses/whois.networksolutions.com/status_registered_spec.rb index 270048b5..d2404645 100644 --- a/spec/whois/parsers/responses/whois.networksolutions.com/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.networksolutions.com/status_registered_spec.rb @@ -69,7 +69,6 @@ expect(subject.registrar).to be_a(Whois::Parser::Registrar) expect(subject.registrar.id).to eq("2") expect(subject.registrar.name).to eq("NETWORK SOLUTIONS, LLC.") - expect(subject.registrar.organization).to eq("NETWORK SOLUTIONS, LLC.") expect(subject.registrar.url).to eq("http//www.networksolutions.com/en_US/") end end diff --git a/spec/whois/parsers/responses/whois.nic.ac/ac/status_registered_spec.rb b/spec/whois/parsers/responses/whois.nic.ac/ac/status_registered_spec.rb index 52dd5846..90980fdb 100644 --- a/spec/whois/parsers/responses/whois.nic.ac/ac/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.nic.ac/ac/status_registered_spec.rb @@ -74,7 +74,6 @@ expect(subject.registrar).to be_a(Whois::Parser::Registrar) expect(subject.registrar.id).to eq("292") expect(subject.registrar.name).to eq("MarkMonitor Inc.") - expect(subject.registrar.organization).to eq("MarkMonitor Inc.") expect(subject.registrar.url).to eq("http://www.markmonitor.com") end end diff --git a/spec/whois/parsers/responses/whois.nic.af/af/status_registered_spec.rb b/spec/whois/parsers/responses/whois.nic.af/af/status_registered_spec.rb index 181192fb..53e3b12d 100644 --- a/spec/whois/parsers/responses/whois.nic.af/af/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.nic.af/af/status_registered_spec.rb @@ -69,7 +69,6 @@ expect(subject.registrar).to be_a(Whois::Parser::Registrar) expect(subject.registrar.id).to eq(nil) expect(subject.registrar.name).to eq("MarkMonitor") - expect(subject.registrar.organization).to eq(nil) expect(subject.registrar.url).to eq("http://www.markmonitor.com") end end diff --git a/spec/whois/parsers/responses/whois.nic.ag/ag/status_available_spec.rb b/spec/whois/parsers/responses/whois.nic.ag/ag/status_available_spec.rb index e404c058..435027d1 100644 --- a/spec/whois/parsers/responses/whois.nic.ag/ag/status_available_spec.rb +++ b/spec/whois/parsers/responses/whois.nic.ag/ag/status_available_spec.rb @@ -23,7 +23,7 @@ describe "#disclaimer" do it do - expect(subject.disclaimer).to eq(nil) + expect(subject.disclaimer).to eq("Access to WHOIS information is provided to assist persons in determining the contents of a domain name registration record in the registry database. The data in this record is provided by The Registry Operator for informational purposes only, and accuracy is not guaranteed. 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. Registry Operator reserves the right to modify these terms at any time. By submitting this query, you agree to abide by this policy. The Registrar of Record identified in this output may have an RDDS service that can be queried for additional information on how to contact the Registrant, Admin, or Tech contact of the queried domain name.") end end describe "#domain" do diff --git a/spec/whois/parsers/responses/whois.nic.ag/ag/status_registered_spec.rb b/spec/whois/parsers/responses/whois.nic.ag/ag/status_registered_spec.rb index a70f9077..aa2c1724 100644 --- a/spec/whois/parsers/responses/whois.nic.ag/ag/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.nic.ag/ag/status_registered_spec.rb @@ -23,7 +23,7 @@ describe "#disclaimer" do it do - expect(subject.disclaimer).to eq("Access to CCTLD WHOIS information is provided to assist persons in determining the contents of a domain name registration record in the Afilias registry database. The data in this record is provided by Afilias Limited for informational purposes only, and Afilias 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. Afilias reserves the right to modify these terms at any time. By submitting this query, you agree to abide by this policy.") + expect(subject.disclaimer).to eq("Access to WHOIS information is provided to assist persons in determining the contents of a domain name registration record in the registry database. The data in this record is provided by The Registry Operator for informational purposes only, and accuracy is not guaranteed. 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. Registry Operator reserves the right to modify these terms at any time. By submitting this query, you agree to abide by this policy. The Registrar of Record identified in this output may have an RDDS service that can be queried for additional information on how to contact the Registrant, Admin, or Tech contact of the queried domain name.") end end describe "#domain" do @@ -33,12 +33,12 @@ end describe "#domain_id" do it do - expect(subject.domain_id).to eq("D48552-LRCC") + expect(subject.domain_id).to eq("D105800000000048552-AGRS") end end describe "#status" do it do - expect(subject.status).to eq(["CLIENT DELETE PROHIBITED", "CLIENT TRANSFER PROHIBITED", "CLIENT UPDATE PROHIBITED"]) + expect(subject.status).to eq(["clientDeleteProhibited https://icann.org/epp#clientDeleteProhibited", "clientTransferProhibited https://icann.org/epp#clientTransferProhibited", "clientUpdateProhibited https://icann.org/epp#clientUpdateProhibited"]) end end describe "#available?" do @@ -60,22 +60,21 @@ describe "#updated_on" do it do expect(subject.updated_on).to be_a(Time) - expect(subject.updated_on).to eq(Time.parse("2013-12-04 10:20:49 UTC")) + expect(subject.updated_on).to eq(Time.parse("2020-12-04 10:29:47 UTC")) end end describe "#expires_on" do it do expect(subject.expires_on).to be_a(Time) - expect(subject.expires_on).to eq(Time.parse("2015-01-05 14:06:59 UTC")) + expect(subject.expires_on).to eq(Time.parse("2022-01-05 14:06:59 UTC")) end end describe "#registrar" do it do expect(subject.registrar).to be_a(Whois::Parser::Registrar) - expect(subject.registrar.id).to eq("R22-LRCC") - expect(subject.registrar.name).to eq("MarkMonitor, Inc.") - expect(subject.registrar.organization).to eq(nil) - expect(subject.registrar.url).to eq(nil) + expect(subject.registrar.id).to eq("292") + expect(subject.registrar.name).to eq("MarkMonitor Inc.") + expect(subject.registrar.url).to eq("http://www.markmonitor.com") end end describe "#registrant_contacts" do @@ -84,55 +83,29 @@ expect(subject.registrant_contacts.size).to eq(1) expect(subject.registrant_contacts[0]).to be_a(Whois::Parser::Contact) expect(subject.registrant_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_REGISTRANT) - expect(subject.registrant_contacts[0].id).to eq("AGRS-129819") - expect(subject.registrant_contacts[0].name).to eq("DNS Admin") + expect(subject.registrant_contacts[0].id).to eq(nil) + expect(subject.registrant_contacts[0].name).to eq(nil) expect(subject.registrant_contacts[0].organization).to eq("Google Inc.") - expect(subject.registrant_contacts[0].address).to eq("1600 Amphitheatre Parkway") - expect(subject.registrant_contacts[0].city).to eq("Mountain View") - expect(subject.registrant_contacts[0].zip).to eq("94043") + expect(subject.registrant_contacts[0].address).to eq(nil) + expect(subject.registrant_contacts[0].city).to eq(nil) + expect(subject.registrant_contacts[0].zip).to eq(nil) expect(subject.registrant_contacts[0].state).to eq("CA") expect(subject.registrant_contacts[0].country_code).to eq("US") - expect(subject.registrant_contacts[0].phone).to eq("+1.6502530000") - expect(subject.registrant_contacts[0].fax).to eq("+1.6506188571") - expect(subject.registrant_contacts[0].email).to eq("dns-admin@google.com") + expect(subject.registrant_contacts[0].phone).to eq(nil) + expect(subject.registrant_contacts[0].fax).to eq(nil) + expect(subject.registrant_contacts[0].email).to eq(nil) end end describe "#admin_contacts" do it do expect(subject.admin_contacts).to be_a(Array) - expect(subject.admin_contacts.size).to eq(1) - expect(subject.admin_contacts[0]).to be_a(Whois::Parser::Contact) - expect(subject.admin_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_ADMINISTRATIVE) - expect(subject.admin_contacts[0].id).to eq("AGRS-129819") - expect(subject.admin_contacts[0].name).to eq("DNS Admin") - expect(subject.admin_contacts[0].organization).to eq("Google Inc.") - expect(subject.admin_contacts[0].address).to eq("1600 Amphitheatre Parkway") - expect(subject.admin_contacts[0].city).to eq("Mountain View") - expect(subject.admin_contacts[0].zip).to eq("94043") - expect(subject.admin_contacts[0].state).to eq("CA") - expect(subject.admin_contacts[0].country_code).to eq("US") - expect(subject.admin_contacts[0].phone).to eq("+1.6502530000") - expect(subject.admin_contacts[0].fax).to eq("+1.6506188571") - expect(subject.admin_contacts[0].email).to eq("dns-admin@google.com") + expect(subject.admin_contacts.size).to eq(0) end end describe "#technical_contacts" do it do expect(subject.technical_contacts).to be_a(Array) - expect(subject.technical_contacts.size).to eq(1) - expect(subject.technical_contacts[0]).to be_a(Whois::Parser::Contact) - expect(subject.technical_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_TECHNICAL) - expect(subject.technical_contacts[0].id).to eq("AGRS-129819") - expect(subject.technical_contacts[0].name).to eq("DNS Admin") - expect(subject.technical_contacts[0].organization).to eq("Google Inc.") - expect(subject.technical_contacts[0].address).to eq("1600 Amphitheatre Parkway") - expect(subject.technical_contacts[0].city).to eq("Mountain View") - expect(subject.technical_contacts[0].zip).to eq("94043") - expect(subject.technical_contacts[0].state).to eq("CA") - expect(subject.technical_contacts[0].country_code).to eq("US") - expect(subject.technical_contacts[0].phone).to eq("+1.6502530000") - expect(subject.technical_contacts[0].fax).to eq("+1.6506188571") - expect(subject.technical_contacts[0].email).to eq("dns-admin@google.com") + expect(subject.technical_contacts.size).to eq(0) end end describe "#nameservers" do @@ -144,9 +117,9 @@ expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) expect(subject.nameservers[1].name).to eq("ns2.google.com") expect(subject.nameservers[2]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[2].name).to eq("ns3.google.com") + expect(subject.nameservers[2].name).to eq("ns4.google.com") expect(subject.nameservers[3]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[3].name).to eq("ns4.google.com") + expect(subject.nameservers[3].name).to eq("ns3.google.com") end end end diff --git a/spec/whois/parsers/responses/whois.nic.asia/asia/property_status_multiple_spec.rb b/spec/whois/parsers/responses/whois.nic.asia/asia/property_status_multiple_spec.rb index b3723011..814513f2 100644 --- a/spec/whois/parsers/responses/whois.nic.asia/asia/property_status_multiple_spec.rb +++ b/spec/whois/parsers/responses/whois.nic.asia/asia/property_status_multiple_spec.rb @@ -23,7 +23,7 @@ describe "#status" do it do - expect(subject.status).to eq(["CLIENT DELETE PROHIBITED", "CLIENT TRANSFER PROHIBITED"]) + expect(subject.status).to eq(["clientDeleteProhibited https://icann.org/epp#clientDeleteProhibited", "clientTransferProhibited https://icann.org/epp#clientTransferProhibited"]) end end describe "#available?" do diff --git a/spec/whois/parsers/responses/whois.nic.asia/asia/property_status_single_spec.rb b/spec/whois/parsers/responses/whois.nic.asia/asia/property_status_single_spec.rb deleted file mode 100644 index 8bb765d9..00000000 --- a/spec/whois/parsers/responses/whois.nic.asia/asia/property_status_single_spec.rb +++ /dev/null @@ -1,39 +0,0 @@ -# encoding: utf-8 - -# This file is autogenerated. Do not edit it manually. -# If you want change the content of this file, edit -# -# /spec/fixtures/responses/whois.nic.asia/asia/property_status_single.expected -# -# and regenerate the tests with the following rake task -# -# $ rake spec:generate -# - -require 'spec_helper' -require 'whois/parsers/whois.nic.asia.rb' - -describe Whois::Parsers::WhoisNicAsia, "property_status_single.expected" do - - subject do - file = fixture("responses", "whois.nic.asia/asia/property_status_single.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) - end - - describe "#status" do - it do - expect(subject.status).to eq(["OK"]) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(false) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(true) - end - end -end diff --git a/spec/whois/parsers/responses/whois.nic.asia/asia/status_available_spec.rb b/spec/whois/parsers/responses/whois.nic.asia/asia/status_available_spec.rb index 64a5f9d5..9e712cef 100644 --- a/spec/whois/parsers/responses/whois.nic.asia/asia/status_available_spec.rb +++ b/spec/whois/parsers/responses/whois.nic.asia/asia/status_available_spec.rb @@ -23,7 +23,7 @@ describe "#disclaimer" do it do - expect(subject.disclaimer).to eq(nil) + expect(subject.disclaimer).to eq("Access to WHOIS information is provided to assist persons in determining the contents of a domain name registration record in the registry database. The data in this record is provided by The Registry Operator for informational purposes only, and accuracy is not guaranteed. 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. Registry Operator reserves the right to modify these terms at any time. By submitting this query, you agree to abide by this policy. The Registrar of Record identified in this output may have an RDDS service that can be queried for additional information on how to contact the Registrant, Admin, or Tech contact of the queried domain name.") end end describe "#domain" do diff --git a/spec/whois/parsers/responses/whois.nic.asia/asia/status_registered_spec.rb b/spec/whois/parsers/responses/whois.nic.asia/asia/status_registered_spec.rb index ba543f30..40705db3 100644 --- a/spec/whois/parsers/responses/whois.nic.asia/asia/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.nic.asia/asia/status_registered_spec.rb @@ -23,7 +23,7 @@ describe "#disclaimer" do it do - expect(subject.disclaimer).to eq("DotAsia WHOIS LEGAL STATEMENT AND TERMS & CONDITIONS: The WHOIS service offered by DotAsia and the access to the records in the DotAsia WHOIS database are provided for information purposes only. It allows persons to check whether a specific domain name is still available or not and to obtain information related to the registration records of existing domain names. DotAsia cannot, under any circumstances, be held liable in case the stored information would prove to be wrong, incomplete, or not accurate in any sense. By submitting a query you agree not to use the information made available to: allow, enable or otherwise support the transmission of unsolicited, commercial advertising or other solicitations whether via email or otherwise; target advertising in any possible way; or to cause nuisance in any possible way to the registrants by sending (whether by automated, electronic processes capable of enabling high volumes or other possible means) messages to them. Without prejudice to the above, it is explicitly forbidden to extract, copy and/or use or re-utilise in any form and by any means (electronically or not) the whole or a quantitatively or qualitatively substantial part of the contents of the WHOIS database without prior and explicit permission by DotAsia, nor in any attempt hereof, or to apply automated, electronic processes to DotAsia (or its systems). You agree that any reproduction and/or transmission of data for commercial purposes will always be considered as the extraction of a substantial part of the content of the WHOIS database. By submitting the query you agree to abide by this policy and accept that DotAsia can take measures to limit the use of its WHOIS services in order to protect the privacy of its registrants or the integrity of the database.") + expect(subject.disclaimer).to eq("Access to WHOIS information is provided to assist persons in determining the contents of a domain name registration record in the registry database. The data in this record is provided by The Registry Operator for informational purposes only, and accuracy is not guaranteed. 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. Registry Operator reserves the right to modify these terms at any time. By submitting this query, you agree to abide by this policy. The Registrar of Record identified in this output may have an RDDS service that can be queried for additional information on how to contact the Registrant, Admin, or Tech contact of the queried domain name.") end end describe "#domain" do @@ -33,12 +33,12 @@ end describe "#domain_id" do it do - expect(subject.domain_id).to eq("D93126-ASIA") + expect(subject.domain_id).to eq("D107700000000093126-AGRS") end end describe "#status" do it do - expect(subject.status).to eq(["OK"]) + expect(subject.status).to eq(["ok https://icann.org/epp#ok"]) end end describe "#available?" do @@ -60,22 +60,21 @@ describe "#updated_on" do it do expect(subject.updated_on).to be_a(Time) - expect(subject.updated_on).to eq(Time.parse("2014-01-15 22:20:16 UTC")) + expect(subject.updated_on).to eq(Time.parse("2020-01-15 22:20:23 UTC")) end end describe "#expires_on" do it do expect(subject.expires_on).to be_a(Time) - expect(subject.expires_on).to eq(Time.parse("2015-01-15 11:28:02 UTC")) + expect(subject.expires_on).to eq(Time.parse("2021-01-15 11:28:02 UTC")) end end describe "#registrar" do it do expect(subject.registrar).to be_a(Whois::Parser::Registrar) - expect(subject.registrar.id).to eq("800046") - expect(subject.registrar.name).to eq("dotASIA R4-ASIA") - expect(subject.registrar.organization).to eq(nil) - expect(subject.registrar.url).to eq(nil) + expect(subject.registrar.id).to eq("119") + expect(subject.registrar.name).to eq("DotAsia Organisation") + expect(subject.registrar.url).to eq("") end end describe "#registrant_contacts" do @@ -84,55 +83,29 @@ expect(subject.registrant_contacts.size).to eq(1) expect(subject.registrant_contacts[0]).to be_a(Whois::Parser::Contact) expect(subject.registrant_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_REGISTRANT) - expect(subject.registrant_contacts[0].id).to eq("FR-132aa75b4bf65") - expect(subject.registrant_contacts[0].name).to eq("RAXCO ASSETS CORP.") + expect(subject.registrant_contacts[0].id).to eq(nil) + expect(subject.registrant_contacts[0].name).to eq(nil) expect(subject.registrant_contacts[0].organization).to eq("RAXCO ASSETS CORP.") - expect(subject.registrant_contacts[0].address).to eq("RM 1201-1204 12/F\nSEA BIRD HSE\n22-28 WYNDHAM ST CENTRAL HK") - expect(subject.registrant_contacts[0].city).to eq("Hong Kong") - expect(subject.registrant_contacts[0].zip).to eq("") + expect(subject.registrant_contacts[0].address).to eq(nil) + expect(subject.registrant_contacts[0].city).to eq(nil) + expect(subject.registrant_contacts[0].zip).to eq(nil) expect(subject.registrant_contacts[0].state).to eq("") expect(subject.registrant_contacts[0].country_code).to eq("HK") - expect(subject.registrant_contacts[0].phone).to eq("+852.21190333") - expect(subject.registrant_contacts[0].fax).to eq("+852.23045326") - expect(subject.registrant_contacts[0].email).to eq("eddie.yeung@bingogroup.com.hk") + expect(subject.registrant_contacts[0].phone).to eq(nil) + expect(subject.registrant_contacts[0].fax).to eq(nil) + expect(subject.registrant_contacts[0].email).to eq(nil) end end describe "#admin_contacts" do it do expect(subject.admin_contacts).to be_a(Array) - expect(subject.admin_contacts.size).to eq(1) - expect(subject.admin_contacts[0]).to be_a(Whois::Parser::Contact) - expect(subject.admin_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_ADMINISTRATIVE) - expect(subject.admin_contacts[0].id).to eq("FR-132aa7afe0967") - expect(subject.admin_contacts[0].name).to eq("Eddie Yeung") - expect(subject.admin_contacts[0].organization).to eq("RAXCO ASSETS CORP.") - expect(subject.admin_contacts[0].address).to eq("RM 1201-1204 12/F\nSEA BIRD HSE\n22-28 WYNDHAM ST CENTRAL HK") - expect(subject.admin_contacts[0].city).to eq("Hong Kong") - expect(subject.admin_contacts[0].zip).to eq("") - expect(subject.admin_contacts[0].state).to eq("") - expect(subject.admin_contacts[0].country_code).to eq("HK") - expect(subject.admin_contacts[0].phone).to eq("+852.21190333") - expect(subject.admin_contacts[0].fax).to eq("") - expect(subject.admin_contacts[0].email).to eq("eddie.yeung@bingogroup.com.hk") + expect(subject.admin_contacts.size).to eq(0) end end describe "#technical_contacts" do it do expect(subject.technical_contacts).to be_a(Array) - expect(subject.technical_contacts.size).to eq(1) - expect(subject.technical_contacts[0]).to be_a(Whois::Parser::Contact) - expect(subject.technical_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_TECHNICAL) - expect(subject.technical_contacts[0].id).to eq("FR-132aa7afe0967") - expect(subject.technical_contacts[0].name).to eq("Eddie Yeung") - expect(subject.technical_contacts[0].organization).to eq("RAXCO ASSETS CORP.") - expect(subject.technical_contacts[0].address).to eq("RM 1201-1204 12/F\nSEA BIRD HSE\n22-28 WYNDHAM ST CENTRAL HK") - expect(subject.technical_contacts[0].city).to eq("Hong Kong") - expect(subject.technical_contacts[0].zip).to eq("") - expect(subject.technical_contacts[0].state).to eq("") - expect(subject.technical_contacts[0].country_code).to eq("HK") - expect(subject.technical_contacts[0].phone).to eq("+852.21190333") - expect(subject.technical_contacts[0].fax).to eq("") - expect(subject.technical_contacts[0].email).to eq("eddie.yeung@bingogroup.com.hk") + expect(subject.technical_contacts.size).to eq(0) end end describe "#nameservers" do @@ -148,9 +121,9 @@ expect(subject.nameservers[3]).to be_a(Whois::Parser::Nameserver) expect(subject.nameservers[3].name).to eq("ns4.dnspod.net") expect(subject.nameservers[4]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[4].name).to eq("ns5.dnspod.net") + expect(subject.nameservers[4].name).to eq("ns6.dnspod.net") expect(subject.nameservers[5]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[5].name).to eq("ns6.dnspod.net") + expect(subject.nameservers[5].name).to eq("ns5.dnspod.net") end end describe "#reserved?" do diff --git a/spec/whois/parsers/responses/whois.nic.asia/asia/status_reserved_spec.rb b/spec/whois/parsers/responses/whois.nic.asia/asia/status_reserved_spec.rb index 7931049f..cf3d9358 100644 --- a/spec/whois/parsers/responses/whois.nic.asia/asia/status_reserved_spec.rb +++ b/spec/whois/parsers/responses/whois.nic.asia/asia/status_reserved_spec.rb @@ -23,7 +23,7 @@ describe "#disclaimer" do it do - expect(subject.disclaimer).to eq(nil) + expect(subject.disclaimer).to eq("Access to WHOIS information is provided to assist persons in determining the contents of a domain name registration record in the registry database. The data in this record is provided by The Registry Operator for informational purposes only, and accuracy is not guaranteed. 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. Registry Operator reserves the right to modify these terms at any time. By submitting this query, you agree to abide by this policy. The Registrar of Record identified in this output may have an RDDS service that can be queried for additional information on how to contact the Registrant, Admin, or Tech contact of the queried domain name.") end end describe "#domain" do diff --git a/spec/whois/parsers/responses/whois.nic.cd/cd/status_registered_spec.rb b/spec/whois/parsers/responses/whois.nic.cd/cd/status_registered_spec.rb index ff9d0412..e680ca33 100644 --- a/spec/whois/parsers/responses/whois.nic.cd/cd/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.nic.cd/cd/status_registered_spec.rb @@ -66,7 +66,6 @@ expect(subject.registrar).to be_a(Whois::Parser::Registrar) expect(subject.registrar.id).to eq(nil) expect(subject.registrar.name).to eq("MARKMONITOR") - expect(subject.registrar.organization).to eq(nil) expect(subject.registrar.url).to eq(nil) end end diff --git a/spec/whois/parsers/responses/whois.nic.college/college/status_registered_spec.rb b/spec/whois/parsers/responses/whois.nic.college/college/status_registered_spec.rb index a9b3fa50..cb780a73 100644 --- a/spec/whois/parsers/responses/whois.nic.college/college/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.nic.college/college/status_registered_spec.rb @@ -74,7 +74,6 @@ expect(subject.registrar).to be_a(Whois::Parser::Registrar) expect(subject.registrar.id).to eq("9999") expect(subject.registrar.name).to eq("CentralNic Ltd") - expect(subject.registrar.organization).to eq(nil) expect(subject.registrar.url).to eq(nil) end end diff --git a/spec/whois/parsers/responses/whois.nic.cx/cx/status_registered_spec.rb b/spec/whois/parsers/responses/whois.nic.cx/cx/status_registered_spec.rb index 61667a5e..40b6ce89 100644 --- a/spec/whois/parsers/responses/whois.nic.cx/cx/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.nic.cx/cx/status_registered_spec.rb @@ -69,7 +69,6 @@ expect(subject.registrar).to be_a(Whois::Parser::Registrar) expect(subject.registrar.id).to eq(nil) expect(subject.registrar.name).to eq("MarkMonitor") - expect(subject.registrar.organization).to eq(nil) expect(subject.registrar.url).to eq(nil) end end diff --git a/spec/whois/parsers/responses/whois.nic.cz/cz/status_registered_spec.rb b/spec/whois/parsers/responses/whois.nic.cz/cz/status_registered_spec.rb index 01ec23a0..6cdf6e3f 100644 --- a/spec/whois/parsers/responses/whois.nic.cz/cz/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.nic.cz/cz/status_registered_spec.rb @@ -69,7 +69,6 @@ expect(subject.registrar).to be_a(Whois::Parser::Registrar) expect(subject.registrar.id).to eq("REG-MARKMONITOR") expect(subject.registrar.name).to eq("REG-MARKMONITOR") - expect(subject.registrar.organization).to eq(nil) expect(subject.registrar.url).to eq(nil) end end diff --git a/spec/whois/parsers/responses/whois.nic.design/design/status_registered_spec.rb b/spec/whois/parsers/responses/whois.nic.design/design/status_registered_spec.rb index f8d83465..b152dca3 100644 --- a/spec/whois/parsers/responses/whois.nic.design/design/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.nic.design/design/status_registered_spec.rb @@ -74,7 +74,6 @@ expect(subject.registrar).to be_a(Whois::Parser::Registrar) expect(subject.registrar.id).to eq("9999") expect(subject.registrar.name).to eq("Top Level Design, LLC") - expect(subject.registrar.organization).to eq(nil) expect(subject.registrar.url).to eq(nil) end end diff --git a/spec/whois/parsers/responses/whois.nic.dm/dm/status_registered_spec.rb b/spec/whois/parsers/responses/whois.nic.dm/dm/status_registered_spec.rb index 948760ed..37c2efff 100644 --- a/spec/whois/parsers/responses/whois.nic.dm/dm/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.nic.dm/dm/status_registered_spec.rb @@ -74,7 +74,6 @@ expect(subject.registrar).to be_a(Whois::Parser::Registrar) expect(subject.registrar.id).to eq(nil) expect(subject.registrar.name).to eq("MarkMonitor Inc.") - expect(subject.registrar.organization).to eq(nil) expect(subject.registrar.url).to eq("www.markmonitor.com") end end diff --git a/spec/whois/parsers/responses/whois.nic.ec/ex/status_registered_spec.rb b/spec/whois/parsers/responses/whois.nic.ec/ex/status_registered_spec.rb index c580a6ef..49d0fc94 100644 --- a/spec/whois/parsers/responses/whois.nic.ec/ex/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.nic.ec/ex/status_registered_spec.rb @@ -69,7 +69,6 @@ expect(subject.registrar).to be_a(Whois::Parser::Registrar) expect(subject.registrar.id).to eq(nil) expect(subject.registrar.name).to eq("MarkMonitor Inc.") - expect(subject.registrar.organization).to eq(nil) expect(subject.registrar.url).to eq("www.markmonitor.com") end end diff --git a/spec/whois/parsers/responses/whois.nic.es/es/status_available_spec.rb b/spec/whois/parsers/responses/whois.nic.es/es/status_available_spec.rb index 37417567..69bf4490 100644 --- a/spec/whois/parsers/responses/whois.nic.es/es/status_available_spec.rb +++ b/spec/whois/parsers/responses/whois.nic.es/es/status_available_spec.rb @@ -66,7 +66,6 @@ expect(subject.registrar).to be_a(Whois::Parser::Registrar) expect(subject.registrar.id).to eq(nil) expect(subject.registrar.name).to eq("ES-NIC") - expect(subject.registrar.organization).to eq("ES-NIC Delegated Internet Registry for Spain") expect(subject.registrar.url).to eq(nil) end end diff --git a/spec/whois/parsers/responses/whois.nic.es/es/status_registered_spec.rb b/spec/whois/parsers/responses/whois.nic.es/es/status_registered_spec.rb index 9aed21f8..54ac7556 100644 --- a/spec/whois/parsers/responses/whois.nic.es/es/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.nic.es/es/status_registered_spec.rb @@ -68,7 +68,6 @@ expect(subject.registrar).to be_a(Whois::Parser::Registrar) expect(subject.registrar.id).to eq(nil) expect(subject.registrar.name).to eq("ES-NIC") - expect(subject.registrar.organization).to eq("ES-NIC Delegated Internet Registry for Spain") expect(subject.registrar.url).to eq(nil) end end diff --git a/spec/whois/parsers/responses/whois.nic.gd/gd/status_registered_spec.rb b/spec/whois/parsers/responses/whois.nic.gd/gd/status_registered_spec.rb index fc8bf3f4..8bef6740 100644 --- a/spec/whois/parsers/responses/whois.nic.gd/gd/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.nic.gd/gd/status_registered_spec.rb @@ -74,7 +74,6 @@ expect(subject.registrar).to be_a(Whois::Parser::Registrar) expect(subject.registrar.id).to eq(nil) expect(subject.registrar.name).to eq("MarkMonitor Inc.") - expect(subject.registrar.organization).to eq(nil) expect(subject.registrar.url).to eq("www.markmonitor.com") end end diff --git a/spec/whois/parsers/responses/whois.nic.gl/gl/status_registered_spec.rb b/spec/whois/parsers/responses/whois.nic.gl/gl/status_registered_spec.rb index 4a71869f..55bea50c 100644 --- a/spec/whois/parsers/responses/whois.nic.gl/gl/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.nic.gl/gl/status_registered_spec.rb @@ -69,7 +69,6 @@ expect(subject.registrar).to be_a(Whois::Parser::Registrar) expect(subject.registrar.id).to eq(nil) expect(subject.registrar.name).to eq("MarkMonitor") - expect(subject.registrar.organization).to eq(nil) expect(subject.registrar.url).to eq("http://www.markmonitor.com") end end diff --git a/spec/whois/parsers/responses/whois.nic.gs/gs/status_registered_spec.rb b/spec/whois/parsers/responses/whois.nic.gs/gs/status_registered_spec.rb index e6740291..7a41c7b7 100644 --- a/spec/whois/parsers/responses/whois.nic.gs/gs/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.nic.gs/gs/status_registered_spec.rb @@ -69,7 +69,6 @@ expect(subject.registrar).to be_a(Whois::Parser::Registrar) expect(subject.registrar.id).to eq(nil) expect(subject.registrar.name).to eq("MarkMonitor") - expect(subject.registrar.organization).to eq(nil) expect(subject.registrar.url).to eq("http://www.markmonitor.com") end end diff --git a/spec/whois/parsers/responses/whois.nic.ht/ht/status_registered_spec.rb b/spec/whois/parsers/responses/whois.nic.ht/ht/status_registered_spec.rb index 60133b8d..34b33563 100644 --- a/spec/whois/parsers/responses/whois.nic.ht/ht/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.nic.ht/ht/status_registered_spec.rb @@ -69,7 +69,6 @@ expect(subject.registrar).to be_a(Whois::Parser::Registrar) expect(subject.registrar.id).to eq(nil) expect(subject.registrar.name).to eq("MarkMonitor") - expect(subject.registrar.organization).to eq(nil) expect(subject.registrar.url).to eq("http://www.markmonitor.com") end end diff --git a/spec/whois/parsers/responses/whois.nic.io/io/status_registered_spec.rb b/spec/whois/parsers/responses/whois.nic.io/io/status_registered_spec.rb index 908d5ab9..36b28e8f 100644 --- a/spec/whois/parsers/responses/whois.nic.io/io/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.nic.io/io/status_registered_spec.rb @@ -74,7 +74,6 @@ expect(subject.registrar).to be_a(Whois::Parser::Registrar) expect(subject.registrar.id).to eq("625") expect(subject.registrar.name).to eq("Name.com LLC") - expect(subject.registrar.organization).to eq("Name.com LLC") expect(subject.registrar.url).to eq("www.name.com") end end diff --git a/spec/whois/parsers/responses/whois.nic.jobs/jobs/status_registered_spec.rb b/spec/whois/parsers/responses/whois.nic.jobs/jobs/status_registered_spec.rb index c32cf127..16edb0e6 100644 --- a/spec/whois/parsers/responses/whois.nic.jobs/jobs/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.nic.jobs/jobs/status_registered_spec.rb @@ -74,7 +74,6 @@ expect(subject.registrar).to be_a(Whois::Parser::Registrar) expect(subject.registrar.id).to eq("292") expect(subject.registrar.name).to eq("MARKMONITOR INC.") - expect(subject.registrar.organization).to eq(nil) expect(subject.registrar.url).to eq("http://www.markmonitor.com") end end diff --git a/spec/whois/parsers/responses/whois.nic.ki/ki/status_registered_spec.rb b/spec/whois/parsers/responses/whois.nic.ki/ki/status_registered_spec.rb index afe7d1e3..9a562508 100644 --- a/spec/whois/parsers/responses/whois.nic.ki/ki/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.nic.ki/ki/status_registered_spec.rb @@ -69,7 +69,6 @@ expect(subject.registrar).to be_a(Whois::Parser::Registrar) expect(subject.registrar.id).to eq(nil) expect(subject.registrar.name).to eq("MarkMonitor") - expect(subject.registrar.organization).to eq(nil) expect(subject.registrar.url).to eq("http://www.markmonitor.com") end end diff --git a/spec/whois/parsers/responses/whois.nic.la/la/status_registered_spec.rb b/spec/whois/parsers/responses/whois.nic.la/la/status_registered_spec.rb index 9a97784a..0ee1aec8 100644 --- a/spec/whois/parsers/responses/whois.nic.la/la/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.nic.la/la/status_registered_spec.rb @@ -73,8 +73,7 @@ it do expect(subject.registrar).to be_a(Whois::Parser::Registrar) expect(subject.registrar.id).to eq("H2948863") - expect(subject.registrar.name).to eq(nil) - expect(subject.registrar.organization).to eq("TLD Registrar Solutions Ltd") + expect(subject.registrar.name).to eq("TLD Registrar Solutions Ltd") expect(subject.registrar.url).to eq("www.tldregistrarsolutions.com") end end diff --git a/spec/whois/parsers/responses/whois.nic.me/me/status_available_spec.rb b/spec/whois/parsers/responses/whois.nic.me/me/status_available_spec.rb index 75663bdd..f9dff9e6 100644 --- a/spec/whois/parsers/responses/whois.nic.me/me/status_available_spec.rb +++ b/spec/whois/parsers/responses/whois.nic.me/me/status_available_spec.rb @@ -23,7 +23,7 @@ describe "#disclaimer" do it do - expect(subject.disclaimer).to eq(nil) + expect(subject.disclaimer).to eq("Access to WHOIS information is provided to assist persons in determining the contents of a domain name registration record in the registry database. The data in this record is provided by The Registry Operator for informational purposes only, and accuracy is not guaranteed. 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. Registry Operator reserves the right to modify these terms at any time. By submitting this query, you agree to abide by this policy. The Registrar of Record identified in this output may have an RDDS service that can be queried for additional information on how to contact the Registrant, Admin, or Tech contact of the queried domain name.") end end describe "#domain" do diff --git a/spec/whois/parsers/responses/whois.nic.me/me/status_registered_spec.rb b/spec/whois/parsers/responses/whois.nic.me/me/status_registered_spec.rb index 5936367f..701d8e71 100644 --- a/spec/whois/parsers/responses/whois.nic.me/me/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.nic.me/me/status_registered_spec.rb @@ -23,7 +23,7 @@ describe "#disclaimer" do it do - expect(subject.disclaimer).to eq("WHOIS TERMS & CONDITIONS: Access to .ME WHOIS information is provided to assist persons in determining the contents of a domain name registration record in the .ME registry database. The data in this record is provided by .ME Registry for informational purposes only, and .ME Registry 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, facsimile, or other electronic processes 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, except as reasonably necessary to register domain names or modify existing registrations. All rights reserved. .ME Registry reserves the right to modify these terms at any time. By submitting this query, you agree to abide by this policy.") + expect(subject.disclaimer).to eq("Access to WHOIS information is provided to assist persons in determining the contents of a domain name registration record in the registry database. The data in this record is provided by The Registry Operator for informational purposes only, and accuracy is not guaranteed. 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. Registry Operator reserves the right to modify these terms at any time. By submitting this query, you agree to abide by this policy. The Registrar of Record identified in this output may have an RDDS service that can be queried for additional information on how to contact the Registrant, Admin, or Tech contact of the queried domain name.") end end describe "#domain" do @@ -33,12 +33,12 @@ end describe "#domain_id" do it do - expect(subject.domain_id).to eq("D11599-ME") + expect(subject.domain_id).to eq("D108500000000011599-AGRS") end end describe "#status" do it do - expect(subject.status).to eq(["CLIENT DELETE PROHIBITED", "CLIENT TRANSFER PROHIBITED", "CLIENT UPDATE PROHIBITED", "DELETE PROHIBITED", "TRANSFER PROHIBITED", "UPDATE PROHIBITED"]) + expect(subject.status).to eq(["clientDeleteProhibited https://icann.org/epp#clientDeleteProhibited", "clientTransferProhibited https://icann.org/epp#clientTransferProhibited", "clientUpdateProhibited https://icann.org/epp#clientUpdateProhibited", "serverDeleteProhibited https://icann.org/epp#serverDeleteProhibited", "serverTransferProhibited https://icann.org/epp#serverTransferProhibited", "serverUpdateProhibited https://icann.org/epp#serverUpdateProhibited"]) end end describe "#available?" do @@ -60,22 +60,21 @@ describe "#updated_on" do it do expect(subject.updated_on).to be_a(Time) - expect(subject.updated_on).to eq(Time.parse("2013-05-12 09:21:14 UTC")) + expect(subject.updated_on).to eq(Time.parse("2021-05-12 09:39:59 UTC")) end end describe "#expires_on" do it do expect(subject.expires_on).to be_a(Time) - expect(subject.expires_on).to eq(Time.parse("2014-06-13 17:17:40 UTC")) + expect(subject.expires_on).to eq(Time.parse("2022-06-13 17:17:40 UTC")) end end describe "#registrar" do it do expect(subject.registrar).to be_a(Whois::Parser::Registrar) - expect(subject.registrar.id).to eq("R45-ME") - expect(subject.registrar.name).to eq("MarkMonitor Inc") - expect(subject.registrar.organization).to eq(nil) - expect(subject.registrar.url).to eq(nil) + expect(subject.registrar.id).to eq("292") + expect(subject.registrar.name).to eq("MarkMonitor Inc.") + expect(subject.registrar.url).to eq("http://www.markmonitor.com") end end describe "#registrant_contacts" do @@ -84,55 +83,29 @@ expect(subject.registrant_contacts.size).to eq(1) expect(subject.registrant_contacts[0]).to be_a(Whois::Parser::Contact) expect(subject.registrant_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_REGISTRANT) - expect(subject.registrant_contacts[0].id).to eq("mmr-32097") - expect(subject.registrant_contacts[0].name).to eq("DNS Admin") - expect(subject.registrant_contacts[0].organization).to eq("Google Inc.") - expect(subject.registrant_contacts[0].address).to eq("1600 Amphitheatre Parkway") - expect(subject.registrant_contacts[0].city).to eq("Mountain View") - expect(subject.registrant_contacts[0].zip).to eq("94043") + expect(subject.registrant_contacts[0].id).to eq(nil) + expect(subject.registrant_contacts[0].name).to eq(nil) + expect(subject.registrant_contacts[0].organization).to eq("Google LLC") + expect(subject.registrant_contacts[0].address).to eq(nil) + expect(subject.registrant_contacts[0].city).to eq(nil) + expect(subject.registrant_contacts[0].zip).to eq(nil) expect(subject.registrant_contacts[0].state).to eq("CA") expect(subject.registrant_contacts[0].country_code).to eq("US") - expect(subject.registrant_contacts[0].phone).to eq("+1.6506234000") - expect(subject.registrant_contacts[0].fax).to eq("+1.6506188571") - expect(subject.registrant_contacts[0].email).to eq("dotme@markmonitor.com") + expect(subject.registrant_contacts[0].phone).to eq(nil) + expect(subject.registrant_contacts[0].fax).to eq(nil) + expect(subject.registrant_contacts[0].email).to eq(nil) end end describe "#admin_contacts" do it do expect(subject.admin_contacts).to be_a(Array) - expect(subject.admin_contacts.size).to eq(1) - expect(subject.admin_contacts[0]).to be_a(Whois::Parser::Contact) - expect(subject.admin_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_ADMINISTRATIVE) - expect(subject.admin_contacts[0].id).to eq("mmr-32097") - expect(subject.admin_contacts[0].name).to eq("DNS Admin") - expect(subject.admin_contacts[0].organization).to eq("Google Inc.") - expect(subject.admin_contacts[0].address).to eq("1600 Amphitheatre Parkway") - expect(subject.admin_contacts[0].city).to eq("Mountain View") - expect(subject.admin_contacts[0].zip).to eq("94043") - expect(subject.admin_contacts[0].state).to eq("CA") - expect(subject.admin_contacts[0].country_code).to eq("US") - expect(subject.admin_contacts[0].phone).to eq("+1.6506234000") - expect(subject.admin_contacts[0].fax).to eq("+1.6506188571") - expect(subject.admin_contacts[0].email).to eq("dotme@markmonitor.com") + expect(subject.admin_contacts.size).to eq(0) end end describe "#technical_contacts" do it do expect(subject.technical_contacts).to be_a(Array) - expect(subject.technical_contacts.size).to eq(1) - expect(subject.technical_contacts[0]).to be_a(Whois::Parser::Contact) - expect(subject.technical_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_TECHNICAL) - expect(subject.technical_contacts[0].id).to eq("mmr-32097") - expect(subject.technical_contacts[0].name).to eq("DNS Admin") - expect(subject.technical_contacts[0].organization).to eq("Google Inc.") - expect(subject.technical_contacts[0].address).to eq("1600 Amphitheatre Parkway") - expect(subject.technical_contacts[0].city).to eq("Mountain View") - expect(subject.technical_contacts[0].zip).to eq("94043") - expect(subject.technical_contacts[0].state).to eq("CA") - expect(subject.technical_contacts[0].country_code).to eq("US") - expect(subject.technical_contacts[0].phone).to eq("+1.6506234000") - expect(subject.technical_contacts[0].fax).to eq("+1.6506188571") - expect(subject.technical_contacts[0].email).to eq("dotme@markmonitor.com") + expect(subject.technical_contacts.size).to eq(0) end end describe "#nameservers" do @@ -140,9 +113,9 @@ expect(subject.nameservers).to be_a(Array) expect(subject.nameservers.size).to eq(4) expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[0].name).to eq("ns2.google.com") + expect(subject.nameservers[0].name).to eq("ns1.google.com") expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[1].name).to eq("ns1.google.com") + expect(subject.nameservers[1].name).to eq("ns2.google.com") expect(subject.nameservers[2]).to be_a(Whois::Parser::Nameserver) expect(subject.nameservers[2].name).to eq("ns4.google.com") expect(subject.nameservers[3]).to be_a(Whois::Parser::Nameserver) diff --git a/spec/whois/parsers/responses/whois.nic.mg/mg/status_registered_spec.rb b/spec/whois/parsers/responses/whois.nic.mg/mg/status_registered_spec.rb index c36e4e9a..5b73c2d0 100644 --- a/spec/whois/parsers/responses/whois.nic.mg/mg/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.nic.mg/mg/status_registered_spec.rb @@ -69,7 +69,6 @@ expect(subject.registrar).to be_a(Whois::Parser::Registrar) expect(subject.registrar.id).to eq(nil) expect(subject.registrar.name).to eq("MarkMonitor") - expect(subject.registrar.organization).to eq(nil) expect(subject.registrar.url).to eq("http://www.markmonitor.com") end end diff --git a/spec/whois/parsers/responses/whois.nic.ms/ms/status_registered_spec.rb b/spec/whois/parsers/responses/whois.nic.ms/ms/status_registered_spec.rb index 383db5a1..2c11eed5 100644 --- a/spec/whois/parsers/responses/whois.nic.ms/ms/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.nic.ms/ms/status_registered_spec.rb @@ -69,7 +69,6 @@ expect(subject.registrar).to be_a(Whois::Parser::Registrar) expect(subject.registrar.id).to eq(nil) expect(subject.registrar.name).to eq("MarkMonitor") - expect(subject.registrar.organization).to eq(nil) expect(subject.registrar.url).to eq("http://www.markmonitor.com") end end diff --git a/spec/whois/parsers/responses/whois.nic.mu/mu/status_registered_spec.rb b/spec/whois/parsers/responses/whois.nic.mu/mu/status_registered_spec.rb index 21d54420..b4ab8342 100644 --- a/spec/whois/parsers/responses/whois.nic.mu/mu/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.nic.mu/mu/status_registered_spec.rb @@ -69,7 +69,6 @@ expect(subject.registrar).to be_a(Whois::Parser::Registrar) expect(subject.registrar.id).to eq(nil) expect(subject.registrar.name).to eq("MarkMonitor") - expect(subject.registrar.organization).to eq(nil) expect(subject.registrar.url).to eq("http://www.markmonitor.com") end end diff --git a/spec/whois/parsers/responses/whois.nic.net.ng/ng/status_registered_spec.rb b/spec/whois/parsers/responses/whois.nic.net.ng/ng/status_registered_spec.rb index ccafa6a0..84c1259a 100644 --- a/spec/whois/parsers/responses/whois.nic.net.ng/ng/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.nic.net.ng/ng/status_registered_spec.rb @@ -69,7 +69,6 @@ expect(subject.registrar).to be_a(Whois::Parser::Registrar) expect(subject.registrar.id).to eq(nil) expect(subject.registrar.name).to eq("nira") - expect(subject.registrar.organization).to eq(nil) expect(subject.registrar.url).to eq(nil) end end diff --git a/spec/whois/parsers/responses/whois.nic.net.sb/sb/status_registered_spec.rb b/spec/whois/parsers/responses/whois.nic.net.sb/sb/status_registered_spec.rb index 325f9ca5..a505d030 100644 --- a/spec/whois/parsers/responses/whois.nic.net.sb/sb/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.nic.net.sb/sb/status_registered_spec.rb @@ -69,7 +69,6 @@ expect(subject.registrar).to be_a(Whois::Parser::Registrar) expect(subject.registrar.id).to eq(nil) expect(subject.registrar.name).to eq("Key-Systems") - expect(subject.registrar.organization).to eq(nil) expect(subject.registrar.url).to eq("http://www.key-systems.net") end end diff --git a/spec/whois/parsers/responses/whois.nic.nf/nf/status_registered_spec.rb b/spec/whois/parsers/responses/whois.nic.nf/nf/status_registered_spec.rb index 65295523..fde940b3 100644 --- a/spec/whois/parsers/responses/whois.nic.nf/nf/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.nic.nf/nf/status_registered_spec.rb @@ -69,7 +69,6 @@ expect(subject.registrar).to be_a(Whois::Parser::Registrar) expect(subject.registrar.id).to eq(nil) expect(subject.registrar.name).to eq("MarkMonitor") - expect(subject.registrar.organization).to eq(nil) expect(subject.registrar.url).to eq("http://www.markmonitor.com") end end diff --git a/spec/whois/parsers/responses/whois.nic.pw/pw/status_registered_spec.rb b/spec/whois/parsers/responses/whois.nic.pw/pw/status_registered_spec.rb index 65e5134f..e2c680be 100644 --- a/spec/whois/parsers/responses/whois.nic.pw/pw/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.nic.pw/pw/status_registered_spec.rb @@ -73,8 +73,7 @@ it do expect(subject.registrar).to be_a(Whois::Parser::Registrar) expect(subject.registrar.id).to eq("7061-EM") - expect(subject.registrar.name).to eq(nil) - expect(subject.registrar.organization).to eq("MarkMonitor, Inc.") + expect(subject.registrar.name).to eq("MarkMonitor, Inc.") expect(subject.registrar.url).to eq("http://www.markmonitor.com/") end end diff --git a/spec/whois/parsers/responses/whois.nic.sh/sh/status_registered_spec.rb b/spec/whois/parsers/responses/whois.nic.sh/sh/status_registered_spec.rb index c6be41e6..8655161c 100644 --- a/spec/whois/parsers/responses/whois.nic.sh/sh/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.nic.sh/sh/status_registered_spec.rb @@ -74,7 +74,6 @@ expect(subject.registrar).to be_a(Whois::Parser::Registrar) expect(subject.registrar.id).to eq("292") expect(subject.registrar.name).to eq("MarkMonitor Inc.") - expect(subject.registrar.organization).to eq("MarkMonitor Inc.") expect(subject.registrar.url).to eq("http://www.markmonitor.com") end end diff --git a/spec/whois/parsers/responses/whois.nic.space/space/status_registered_spec.rb b/spec/whois/parsers/responses/whois.nic.space/space/status_registered_spec.rb index 017816d4..0c1f5b00 100644 --- a/spec/whois/parsers/responses/whois.nic.space/space/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.nic.space/space/status_registered_spec.rb @@ -74,7 +74,6 @@ expect(subject.registrar).to be_a(Whois::Parser::Registrar) expect(subject.registrar.id).to eq("9999") expect(subject.registrar.name).to eq("CentralNic Ltd") - expect(subject.registrar.organization).to eq(nil) expect(subject.registrar.url).to eq(nil) end end diff --git a/spec/whois/parsers/responses/whois.nic.tc/tc/status_registered_spec.rb b/spec/whois/parsers/responses/whois.nic.tc/tc/status_registered_spec.rb index d534ae24..c678782a 100644 --- a/spec/whois/parsers/responses/whois.nic.tc/tc/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.nic.tc/tc/status_registered_spec.rb @@ -68,7 +68,6 @@ expect(subject.registrar).to be_a(Whois::Parser::Registrar) expect(subject.registrar.id).to eq("292") expect(subject.registrar.name).to eq("MarkMonitor") - expect(subject.registrar.organization).to eq(nil) expect(subject.registrar.url).to eq(nil) end end diff --git a/spec/whois/parsers/responses/whois.nic.tech/tech/status_registered_spec.rb b/spec/whois/parsers/responses/whois.nic.tech/tech/status_registered_spec.rb index f8f37931..55d545f6 100644 --- a/spec/whois/parsers/responses/whois.nic.tech/tech/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.nic.tech/tech/status_registered_spec.rb @@ -74,7 +74,6 @@ expect(subject.registrar).to be_a(Whois::Parser::Registrar) expect(subject.registrar.id).to eq("292") expect(subject.registrar.name).to eq("MarkMonitor, Inc (TLDs)") - expect(subject.registrar.organization).to eq(nil) expect(subject.registrar.url).to eq(nil) end end diff --git a/spec/whois/parsers/responses/whois.nic.tl/tl/status_registered_spec.rb b/spec/whois/parsers/responses/whois.nic.tl/tl/status_registered_spec.rb index 5b477f32..fb0155f9 100644 --- a/spec/whois/parsers/responses/whois.nic.tl/tl/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.nic.tl/tl/status_registered_spec.rb @@ -69,7 +69,6 @@ expect(subject.registrar).to be_a(Whois::Parser::Registrar) expect(subject.registrar.id).to eq(nil) expect(subject.registrar.name).to eq("MarkMonitor") - expect(subject.registrar.organization).to eq(nil) expect(subject.registrar.url).to eq("http://www.markmonitor.com") end end diff --git a/spec/whois/parsers/responses/whois.nic.xxx/xxx/status_available_spec.rb b/spec/whois/parsers/responses/whois.nic.xxx/xxx/status_available_spec.rb index 3e949ccf..63790b84 100644 --- a/spec/whois/parsers/responses/whois.nic.xxx/xxx/status_available_spec.rb +++ b/spec/whois/parsers/responses/whois.nic.xxx/xxx/status_available_spec.rb @@ -23,7 +23,7 @@ describe "#disclaimer" do it do - expect(subject.disclaimer).to eq(nil) + expect(subject.disclaimer).to eq("The Service is provided so that you may look up certain information in relation to domain names that we store in our database. Use of the Service is subject to our policies, in particular you should familiarise yourself with our Acceptable Use Policy and our Privacy Policy. The information provided by this Service is 'as is' and we make no guarantee of it its accuracy. You agree that by your use of the Service you will not use the information provided by us in a way which is: * inconsistent with any applicable laws, * inconsistent with any policy issued by us, * to generate, distribute, or facilitate unsolicited mass email, promotions, advertisings or other solicitations, or * to enable high volume, automated, electronic processes that apply to the Service. You acknowledge that: * a response from the Service that a domain name is 'available', does not guarantee that is able to be registered, * we may restrict, suspend or terminate your access to the Service at any time, and * the copying, compilation, repackaging, dissemination or other use of the information provided by the Service is not permitted, without our express written consent. This information has been prepared and published in order to represent administrative and technical management of the TLD. We may discontinue or amend any part or the whole of these Terms of Service from time to time at our absolute discretion.") end end describe "#domain" do @@ -38,7 +38,7 @@ end describe "#status" do it do - expect(subject.status).to eq([]) + expect(subject.status).to eq(:available) end end describe "#available?" do diff --git a/spec/whois/parsers/responses/whois.nic.xxx/xxx/status_registered_spec.rb b/spec/whois/parsers/responses/whois.nic.xxx/xxx/status_registered_spec.rb index f50564df..7c827316 100644 --- a/spec/whois/parsers/responses/whois.nic.xxx/xxx/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.nic.xxx/xxx/status_registered_spec.rb @@ -23,22 +23,22 @@ describe "#disclaimer" do it do - expect(subject.disclaimer).to eq("Access to .XXX ICM REGISTRY WHOIS information is provided to assist persons in determining the contents of a domain name registration record in the ICM registry database. The data in this record is provided by ICM Registry for informational purposes only, and ICM 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. ICM reserves the right to modify these terms at any time. By submitting this query, you agree to abide by this policy.") + expect(subject.disclaimer).to eq("The Service is provided so that you may look up certain information in relation to domain names that we store in our database. Use of the Service is subject to our policies, in particular you should familiarise yourself with our Acceptable Use Policy and our Privacy Policy. The information provided by this Service is 'as is' and we make no guarantee of it its accuracy. You agree that by your use of the Service you will not use the information provided by us in a way which is: * inconsistent with any applicable laws, * inconsistent with any policy issued by us, * to generate, distribute, or facilitate unsolicited mass email, promotions, advertisings or other solicitations, or * to enable high volume, automated, electronic processes that apply to the Service. You acknowledge that: * a response from the Service that a domain name is 'available', does not guarantee that is able to be registered, * we may restrict, suspend or terminate your access to the Service at any time, and * the copying, compilation, repackaging, dissemination or other use of the information provided by the Service is not permitted, without our express written consent. This information has been prepared and published in order to represent administrative and technical management of the TLD. We may discontinue or amend any part or the whole of these Terms of Service from time to time at our absolute discretion.") end end describe "#domain" do it do - expect(subject.domain).to eq("masala.xxx") + expect(subject.domain).to eq("sex.xxx") end end describe "#domain_id" do it do - expect(subject.domain_id).to eq("D130773-XXX") + expect(subject.domain_id).to eq("D855895-GDREG") end end describe "#status" do it do - expect(subject.status).to eq(["ok"]) + expect(subject.status).to eq(:registered) end end describe "#available?" do @@ -54,28 +54,27 @@ describe "#created_on" do it do expect(subject.created_on).to be_a(Time) - expect(subject.created_on).to eq(Time.parse("2011-12-01 01:37:55 UTC")) + expect(subject.created_on).to eq(Time.parse("2012-05-31 14:58:50 UTC")) end end describe "#updated_on" do it do expect(subject.updated_on).to be_a(Time) - expect(subject.updated_on).to eq(Time.parse("2013-12-02 22:20:04 UTC")) + expect(subject.updated_on).to eq(Time.parse("2021-05-01 08:25:32 UTC")) end end describe "#expires_on" do it do expect(subject.expires_on).to be_a(Time) - expect(subject.expires_on).to eq(Time.parse("2014-12-01 01:37:55 UTC")) + expect(subject.expires_on).to eq(Time.parse("2022-05-31 14:58:50 UTC")) end end describe "#registrar" do it do expect(subject.registrar).to be_a(Whois::Parser::Registrar) - expect(subject.registrar.id).to eq("R3228-XXX") - expect(subject.registrar.name).to eq("Mesh Digital Limited") - expect(subject.registrar.organization).to eq(nil) - expect(subject.registrar.url).to eq(nil) + expect(subject.registrar.id).to eq("625") + expect(subject.registrar.name).to eq("Name.com, Inc.") + expect(subject.registrar.url).to eq("www.name.com") end end describe "#registrant_contacts" do @@ -84,18 +83,18 @@ expect(subject.registrant_contacts.size).to eq(1) expect(subject.registrant_contacts[0]).to be_a(Whois::Parser::Contact) expect(subject.registrant_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_REGISTRANT) - expect(subject.registrant_contacts[0].id).to eq("MNT5BB23000590") - expect(subject.registrant_contacts[0].name).to eq("Domainmonster.com Privacy Service") - expect(subject.registrant_contacts[0].organization).to eq("Identity Protect Limited") - expect(subject.registrant_contacts[0].address).to eq("PO Box 795") - expect(subject.registrant_contacts[0].city).to eq("Godalming") - expect(subject.registrant_contacts[0].zip).to eq("GU7 9GA") - expect(subject.registrant_contacts[0].state).to eq("Surrey") + expect(subject.registrant_contacts[0].id).to eq("REDACTED FOR PRIVACY") + expect(subject.registrant_contacts[0].name).to eq("REDACTED FOR PRIVACY") + expect(subject.registrant_contacts[0].organization).to eq("Domain Protection Services, Inc.") + expect(subject.registrant_contacts[0].address).to eq("REDACTED FOR PRIVACY, REDACTED FOR PRIVACY, REDACTED FOR PRIVACY") + expect(subject.registrant_contacts[0].city).to eq("REDACTED FOR PRIVACY") + expect(subject.registrant_contacts[0].zip).to eq("REDACTED FOR PRIVACY") + expect(subject.registrant_contacts[0].state).to eq("") expect(subject.registrant_contacts[0].country).to eq(nil) - expect(subject.registrant_contacts[0].country_code).to eq("GB") - expect(subject.registrant_contacts[0].phone).to eq("+44.1483307527") - expect(subject.registrant_contacts[0].fax).to eq("+44.1483304031") - expect(subject.registrant_contacts[0].email).to eq("masala.xxx@privatemonster.com") + expect(subject.registrant_contacts[0].country_code).to eq("US") + expect(subject.registrant_contacts[0].phone).to eq("REDACTED FOR PRIVACY ext: REDACTED FOR PRIVACY") + expect(subject.registrant_contacts[0].fax).to eq("REDACTED FOR PRIVACY ext: REDACTED FOR PRIVACY") + expect(subject.registrant_contacts[0].email).to eq("Please query the RDDS service of the Registrar of Record identified in this output for information on how to contact the Registrant, Admin, or Tech contact of the queried domain name.") end end describe "#admin_contacts" do @@ -104,18 +103,18 @@ expect(subject.admin_contacts.size).to eq(1) expect(subject.admin_contacts[0]).to be_a(Whois::Parser::Contact) expect(subject.admin_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_ADMINISTRATIVE) - expect(subject.admin_contacts[0].id).to eq("MNT5BB23000590") - expect(subject.admin_contacts[0].name).to eq("Domainmonster.com Privacy Service") - expect(subject.admin_contacts[0].organization).to eq("Identity Protect Limited") - expect(subject.admin_contacts[0].address).to eq("PO Box 795") - expect(subject.admin_contacts[0].city).to eq("Godalming") - expect(subject.admin_contacts[0].zip).to eq("GU7 9GA") - expect(subject.admin_contacts[0].state).to eq("Surrey") + expect(subject.admin_contacts[0].id).to eq("REDACTED FOR PRIVACY") + expect(subject.admin_contacts[0].name).to eq("REDACTED FOR PRIVACY") + expect(subject.admin_contacts[0].organization).to eq("REDACTED FOR PRIVACY") + expect(subject.admin_contacts[0].address).to eq("REDACTED FOR PRIVACY, REDACTED FOR PRIVACY, REDACTED FOR PRIVACY") + expect(subject.admin_contacts[0].city).to eq("REDACTED FOR PRIVACY") + expect(subject.admin_contacts[0].zip).to eq("REDACTED FOR PRIVACY") + expect(subject.admin_contacts[0].state).to eq("REDACTED FOR PRIVACY") expect(subject.admin_contacts[0].country).to eq(nil) - expect(subject.admin_contacts[0].country_code).to eq("GB") - expect(subject.admin_contacts[0].phone).to eq("+44.1483307527") - expect(subject.admin_contacts[0].fax).to eq("+44.1483304031") - expect(subject.admin_contacts[0].email).to eq("masala.xxx@privatemonster.com") + expect(subject.admin_contacts[0].country_code).to eq("REDACTED FOR PRIVACY") + expect(subject.admin_contacts[0].phone).to eq("REDACTED FOR PRIVACY ext: REDACTED FOR PRIVACY") + expect(subject.admin_contacts[0].fax).to eq("REDACTED FOR PRIVACY ext: REDACTED FOR PRIVACY") + expect(subject.admin_contacts[0].email).to eq("Please query the RDDS service of the Registrar of Record identified in this output for information on how to contact the Registrant, Admin, or Tech contact of the queried domain name.") end end describe "#technical_contacts" do @@ -124,28 +123,32 @@ expect(subject.technical_contacts.size).to eq(1) expect(subject.technical_contacts[0]).to be_a(Whois::Parser::Contact) expect(subject.technical_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_TECHNICAL) - expect(subject.technical_contacts[0].id).to eq("MNT5BB23000590") - expect(subject.technical_contacts[0].name).to eq("Domainmonster.com Privacy Service") - expect(subject.technical_contacts[0].organization).to eq("Identity Protect Limited") - expect(subject.technical_contacts[0].address).to eq("PO Box 795") - expect(subject.technical_contacts[0].city).to eq("Godalming") - expect(subject.technical_contacts[0].zip).to eq("GU7 9GA") - expect(subject.technical_contacts[0].state).to eq("Surrey") + expect(subject.technical_contacts[0].id).to eq("REDACTED FOR PRIVACY") + expect(subject.technical_contacts[0].name).to eq("REDACTED FOR PRIVACY") + expect(subject.technical_contacts[0].organization).to eq("REDACTED FOR PRIVACY") + expect(subject.technical_contacts[0].address).to eq("REDACTED FOR PRIVACY, REDACTED FOR PRIVACY, REDACTED FOR PRIVACY") + expect(subject.technical_contacts[0].city).to eq("REDACTED FOR PRIVACY") + expect(subject.technical_contacts[0].zip).to eq("REDACTED FOR PRIVACY") + expect(subject.technical_contacts[0].state).to eq("REDACTED FOR PRIVACY") expect(subject.technical_contacts[0].country).to eq(nil) - expect(subject.technical_contacts[0].country_code).to eq("GB") - expect(subject.technical_contacts[0].phone).to eq("+44.1483307527") - expect(subject.technical_contacts[0].fax).to eq("+44.1483304031") - expect(subject.technical_contacts[0].email).to eq("masala.xxx@privatemonster.com") + expect(subject.technical_contacts[0].country_code).to eq("REDACTED FOR PRIVACY") + expect(subject.technical_contacts[0].phone).to eq("REDACTED FOR PRIVACY ext: REDACTED FOR PRIVACY") + expect(subject.technical_contacts[0].fax).to eq("REDACTED FOR PRIVACY ext: REDACTED FOR PRIVACY") + expect(subject.technical_contacts[0].email).to eq("Please query the RDDS service of the Registrar of Record identified in this output for information on how to contact the Registrant, Admin, or Tech contact of the queried domain name.") end end describe "#nameservers" do it do expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers.size).to eq(2) + expect(subject.nameservers.size).to eq(4) expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[0].name).to eq("ns39.domaincontrol.com") + expect(subject.nameservers[0].name).to eq("ns4.imlns.com") expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[1].name).to eq("ns40.domaincontrol.com") + expect(subject.nameservers[1].name).to eq("ns3.imlns.com") + expect(subject.nameservers[2]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[2].name).to eq("ns1.imlns.com") + expect(subject.nameservers[3]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[3].name).to eq("ns.imlns.com") end end describe "#reserved?" do diff --git a/spec/whois/parsers/responses/whois.nic.xyz/xyz/status_registered_spec.rb b/spec/whois/parsers/responses/whois.nic.xyz/xyz/status_registered_spec.rb index e935e526..f4c4f63f 100644 --- a/spec/whois/parsers/responses/whois.nic.xyz/xyz/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.nic.xyz/xyz/status_registered_spec.rb @@ -74,7 +74,6 @@ expect(subject.registrar).to be_a(Whois::Parser::Registrar) expect(subject.registrar.id).to eq("292") expect(subject.registrar.name).to eq("MarkMonitor, Inc (TLDs)") - expect(subject.registrar.organization).to eq(nil) expect(subject.registrar.url).to eq(nil) end end diff --git a/spec/whois/parsers/responses/whois.pairnic.com/status_registered_spec.rb b/spec/whois/parsers/responses/whois.pairnic.com/status_registered_spec.rb index be427e31..b80319b4 100644 --- a/spec/whois/parsers/responses/whois.pairnic.com/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.pairnic.com/status_registered_spec.rb @@ -69,7 +69,6 @@ expect(subject.registrar).to be_a(Whois::Parser::Registrar) expect(subject.registrar.id).to eq("99") expect(subject.registrar.name).to eq("pairNIC INC") - expect(subject.registrar.organization).to eq("pairNIC INC") expect(subject.registrar.url).to eq("https://www.pairnic.com") end end diff --git a/spec/whois/parsers/responses/whois.pandi.or.id/id/status_registered_spec.rb b/spec/whois/parsers/responses/whois.pandi.or.id/id/status_registered_spec.rb index fc56133d..aefe8689 100644 --- a/spec/whois/parsers/responses/whois.pandi.or.id/id/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.pandi.or.id/id/status_registered_spec.rb @@ -73,8 +73,7 @@ it do expect(subject.registrar).to be_a(Whois::Parser::Registrar) expect(subject.registrar.id).to eq("digitalreg") - expect(subject.registrar.name).to eq(nil) - expect(subject.registrar.organization).to eq("Digital Registra") + expect(subject.registrar.name).to eq("Digital Registra") expect(subject.registrar.url).to eq(nil) end end diff --git a/spec/whois/parsers/responses/whois.pir.org/org/status_available_spec.rb b/spec/whois/parsers/responses/whois.pir.org/org/status_available_spec.rb index 50b569b8..2eefba62 100644 --- a/spec/whois/parsers/responses/whois.pir.org/org/status_available_spec.rb +++ b/spec/whois/parsers/responses/whois.pir.org/org/status_available_spec.rb @@ -23,7 +23,7 @@ describe "#disclaimer" do it do - expect(subject.disclaimer).to eq(nil) + expect(subject.disclaimer).to eq("Access to Public Interest Registry WHOIS information is provided to assist persons in determining the contents of a domain name registration record in the Public Interest Registry registry database. The data in this record is provided by Public Interest Registry for informational purposes only, and Public Interest Registry 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. Public Interest Registry reserves the right to modify these terms at any time. By submitting this query, you agree to abide by this policy. The Registrar of Record identified in this output may have an RDDS service that can be queried for additional information on how to contact the Registrant, Admin, or Tech contact of the queried domain name.") end end describe "#domain" do diff --git a/spec/whois/parsers/responses/whois.pir.org/org/status_registered_spec.rb b/spec/whois/parsers/responses/whois.pir.org/org/status_registered_spec.rb index f1abb232..255d2b84 100644 --- a/spec/whois/parsers/responses/whois.pir.org/org/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.pir.org/org/status_registered_spec.rb @@ -23,7 +23,7 @@ describe "#disclaimer" do it do - expect(subject.disclaimer).to eq("Access to Public Interest Registry WHOIS information is provided to assist persons in determining the contents of a domain name registration record in the Public Interest Registry registry database. The data in this record is provided by Public Interest Registry for informational purposes only, and Public Interest Registry 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. Public Interest Registry reserves the right to modify these terms at any time. By submitting this query, you agree to abide by this policy. Please query the RDDS service of the Registrar of Record identified in this output for information on how to contact the Registrant, Admin, or Tech contact of the queried domain name.") + expect(subject.disclaimer).to eq("Access to Public Interest Registry WHOIS information is provided to assist persons in determining the contents of a domain name registration record in the Public Interest Registry registry database. The data in this record is provided by Public Interest Registry for informational purposes only, and Public Interest Registry 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. Public Interest Registry reserves the right to modify these terms at any time. By submitting this query, you agree to abide by this policy. The Registrar of Record identified in this output may have an RDDS service that can be queried for additional information on how to contact the Registrant, Admin, or Tech contact of the queried domain name.") end end describe "#domain" do @@ -38,7 +38,7 @@ end describe "#status" do it do - expect(subject.status).to eq(["clientDeleteProhibited", "clientTransferProhibited", "clientUpdateProhibited"]) + expect(subject.status).to eq(["clientDeleteProhibited https://icann.org/epp#clientDeleteProhibited", "clientTransferProhibited https://icann.org/epp#clientTransferProhibited", "clientUpdateProhibited https://icann.org/epp#clientUpdateProhibited", "serverDeleteProhibited https://icann.org/epp#serverDeleteProhibited", "serverTransferProhibited https://icann.org/epp#serverTransferProhibited", "serverUpdateProhibited https://icann.org/epp#serverUpdateProhibited"]) end end describe "#available?" do @@ -60,22 +60,21 @@ describe "#updated_on" do it do expect(subject.updated_on).to be_a(Time) - expect(subject.updated_on).to eq(Time.parse("2013-09-18 09:17:35 UTC")) + expect(subject.updated_on).to eq(Time.parse("2021-09-18 09:24:00 UTC")) end end describe "#expires_on" do it do expect(subject.expires_on).to be_a(Time) - expect(subject.expires_on).to eq(Time.parse("2014-10-20 04:00:00 UTC")) + expect(subject.expires_on).to eq(Time.parse("2022-10-20 04:00:00 UTC")) end end describe "#registrar" do it do expect(subject.registrar).to be_a(Whois::Parser::Registrar) expect(subject.registrar.id).to eq("292") - expect(subject.registrar.name).to eq("MarkMonitor Inc. (R37-LROR)") - expect(subject.registrar.organization).to eq(nil) - expect(subject.registrar.url).to eq(nil) + expect(subject.registrar.name).to eq("MarkMonitor Inc.") + expect(subject.registrar.url).to eq("http://www.markmonitor.com") end end describe "#registrant_contacts" do @@ -84,55 +83,29 @@ expect(subject.registrant_contacts.size).to eq(1) expect(subject.registrant_contacts[0]).to be_a(Whois::Parser::Contact) expect(subject.registrant_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_REGISTRANT) - expect(subject.registrant_contacts[0].id).to eq("mmr-32097") - expect(subject.registrant_contacts[0].name).to eq("DNS Admin") + expect(subject.registrant_contacts[0].id).to eq(nil) + expect(subject.registrant_contacts[0].name).to eq(nil) expect(subject.registrant_contacts[0].organization).to eq("Google Inc.") - expect(subject.registrant_contacts[0].address).to eq("1600 Amphitheatre Parkway") - expect(subject.registrant_contacts[0].city).to eq("Mountain View") - expect(subject.registrant_contacts[0].zip).to eq("94043") + expect(subject.registrant_contacts[0].address).to eq(nil) + expect(subject.registrant_contacts[0].city).to eq(nil) + expect(subject.registrant_contacts[0].zip).to eq(nil) expect(subject.registrant_contacts[0].state).to eq("CA") expect(subject.registrant_contacts[0].country_code).to eq("US") - expect(subject.registrant_contacts[0].phone).to eq("+1.6506234000") - expect(subject.registrant_contacts[0].fax).to eq("+1.6506188571") - expect(subject.registrant_contacts[0].email).to eq("dns-admin@google.com") + expect(subject.registrant_contacts[0].phone).to eq(nil) + expect(subject.registrant_contacts[0].fax).to eq(nil) + expect(subject.registrant_contacts[0].email).to eq(nil) end end describe "#admin_contacts" do it do expect(subject.admin_contacts).to be_a(Array) - expect(subject.admin_contacts.size).to eq(1) - expect(subject.admin_contacts[0]).to be_a(Whois::Parser::Contact) - expect(subject.admin_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_ADMINISTRATIVE) - expect(subject.admin_contacts[0].id).to eq("mmr-32097") - expect(subject.admin_contacts[0].name).to eq("DNS Admin") - expect(subject.admin_contacts[0].organization).to eq("Google Inc.") - expect(subject.admin_contacts[0].address).to eq("1600 Amphitheatre Parkway") - expect(subject.admin_contacts[0].city).to eq("Mountain View") - expect(subject.admin_contacts[0].zip).to eq("94043") - expect(subject.admin_contacts[0].state).to eq("CA") - expect(subject.admin_contacts[0].country_code).to eq("US") - expect(subject.admin_contacts[0].phone).to eq("+1.6506234000") - expect(subject.admin_contacts[0].fax).to eq("+1.6506188571") - expect(subject.admin_contacts[0].email).to eq("dns-admin@google.com") + expect(subject.admin_contacts.size).to eq(0) end end describe "#technical_contacts" do it do expect(subject.technical_contacts).to be_a(Array) - expect(subject.technical_contacts.size).to eq(1) - expect(subject.technical_contacts[0]).to be_a(Whois::Parser::Contact) - expect(subject.technical_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_TECHNICAL) - expect(subject.technical_contacts[0].id).to eq("mmr-32097") - expect(subject.technical_contacts[0].name).to eq("DNS Admin") - expect(subject.technical_contacts[0].organization).to eq("Google Inc.") - expect(subject.technical_contacts[0].address).to eq("1600 Amphitheatre Parkway") - expect(subject.technical_contacts[0].city).to eq("Mountain View") - expect(subject.technical_contacts[0].zip).to eq("94043") - expect(subject.technical_contacts[0].state).to eq("CA") - expect(subject.technical_contacts[0].country_code).to eq("US") - expect(subject.technical_contacts[0].phone).to eq("+1.6506234000") - expect(subject.technical_contacts[0].fax).to eq("+1.6506188571") - expect(subject.technical_contacts[0].email).to eq("dns-admin@google.com") + expect(subject.technical_contacts.size).to eq(0) end end describe "#nameservers" do diff --git a/spec/whois/parsers/responses/whois.pnina.ps/ps/status_registered_spec.rb b/spec/whois/parsers/responses/whois.pnina.ps/ps/status_registered_spec.rb index 18ebe0a7..c5ba8051 100644 --- a/spec/whois/parsers/responses/whois.pnina.ps/ps/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.pnina.ps/ps/status_registered_spec.rb @@ -68,7 +68,6 @@ expect(subject.registrar).to be_a(Whois::Parser::Registrar) expect(subject.registrar.id).to eq(nil) expect(subject.registrar.name).to eq("MarkMonitor Inc.") - expect(subject.registrar.organization).to eq(nil) expect(subject.registrar.url).to eq(nil) end end diff --git a/spec/whois/parsers/responses/whois.registry.gy/gy/status_registered_spec.rb b/spec/whois/parsers/responses/whois.registry.gy/gy/status_registered_spec.rb index f661a9ea..6c73e5b7 100644 --- a/spec/whois/parsers/responses/whois.registry.gy/gy/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.registry.gy/gy/status_registered_spec.rb @@ -69,7 +69,6 @@ expect(subject.registrar).to be_a(Whois::Parser::Registrar) expect(subject.registrar.id).to eq(nil) expect(subject.registrar.name).to eq("MarkMonitor") - expect(subject.registrar.organization).to eq(nil) expect(subject.registrar.url).to eq("http://www.markmonitor.com") end end diff --git a/spec/whois/parsers/responses/whois.registry.om/om/status_registered_spec.rb b/spec/whois/parsers/responses/whois.registry.om/om/status_registered_spec.rb index 73a688a6..4eb33e68 100644 --- a/spec/whois/parsers/responses/whois.registry.om/om/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.registry.om/om/status_registered_spec.rb @@ -72,7 +72,6 @@ expect(subject.registrar).to be_a(Whois::Parser::Registrar) expect(subject.registrar.id).to eq(nil) expect(subject.registrar.name).to eq("Oman Telecommunication Company") - expect(subject.registrar.organization).to eq("Oman Telecommunication Company") expect(subject.registrar.url).to eq(nil) end end diff --git a/spec/whois/parsers/responses/whois.registry.qa/qa/status_registered_spec.rb b/spec/whois/parsers/responses/whois.registry.qa/qa/status_registered_spec.rb index fe956943..e7c94dca 100644 --- a/spec/whois/parsers/responses/whois.registry.qa/qa/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.registry.qa/qa/status_registered_spec.rb @@ -71,7 +71,6 @@ expect(subject.registrar).to be_a(Whois::Parser::Registrar) expect(subject.registrar.id).to eq("QatarTelecom") expect(subject.registrar.name).to eq("Qatar Telecom (Qtel) Q. S. C") - expect(subject.registrar.organization).to eq("Qatar Telecom (Qtel) Q. S. C") end end describe "#registrant_contacts" do diff --git a/spec/whois/parsers/responses/whois.rnids.rs/rs/status_registered_spec.rb b/spec/whois/parsers/responses/whois.rnids.rs/rs/status_registered_spec.rb index 0f4646a4..7375d169 100644 --- a/spec/whois/parsers/responses/whois.rnids.rs/rs/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.rnids.rs/rs/status_registered_spec.rb @@ -74,7 +74,6 @@ expect(subject.registrar).to be_a(Whois::Parser::Registrar) expect(subject.registrar.id).to eq(nil) expect(subject.registrar.name).to eq("NINET Company d.o.o.") - expect(subject.registrar.organization).to eq(nil) expect(subject.registrar.url).to eq(nil) end end diff --git a/spec/whois/parsers/responses/whois.rrpproxy.net/status_registered_spec.rb b/spec/whois/parsers/responses/whois.rrpproxy.net/status_registered_spec.rb index f61b7273..4f06b606 100644 --- a/spec/whois/parsers/responses/whois.rrpproxy.net/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.rrpproxy.net/status_registered_spec.rb @@ -68,7 +68,6 @@ expect(subject.registrar).to be_a(Whois::Parser::Registrar) expect(subject.registrar.id).to eq("269") expect(subject.registrar.name).to eq("Key-Systems GmbH") - expect(subject.registrar.organization).to eq("Key-Systems GmbH") expect(subject.registrar.url).to eq("http://www.reasonnet.com") end end diff --git a/spec/whois/parsers/responses/whois.safenames.net/status_registered_spec.rb b/spec/whois/parsers/responses/whois.safenames.net/status_registered_spec.rb index 0c4784df..ec3e6391 100644 --- a/spec/whois/parsers/responses/whois.safenames.net/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.safenames.net/status_registered_spec.rb @@ -69,7 +69,6 @@ expect(subject.registrar).to be_a(Whois::Parser::Registrar) expect(subject.registrar.id).to eq("447") expect(subject.registrar.name).to eq("Safenames Ltd") - expect(subject.registrar.organization).to eq("Safenames Ltd") expect(subject.registrar.url).to eq("http://www.safenames.net") end end diff --git a/spec/whois/parsers/responses/whois.schlund.info/status_registered_spec.rb b/spec/whois/parsers/responses/whois.schlund.info/status_registered_spec.rb index 52da6ecc..ae2785c8 100644 --- a/spec/whois/parsers/responses/whois.schlund.info/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.schlund.info/status_registered_spec.rb @@ -69,7 +69,6 @@ expect(subject.registrar).to be_a(Whois::Parser::Registrar) expect(subject.registrar.id).to eq("83") expect(subject.registrar.name).to eq("1&1 Internet AG") - expect(subject.registrar.organization).to eq("1&1 Internet AG") expect(subject.registrar.url).to eq("http://1and1.com") end end diff --git a/spec/whois/parsers/responses/whois.smallregistry.net/status_registered_spec.rb b/spec/whois/parsers/responses/whois.smallregistry.net/status_registered_spec.rb index 971d4d8b..b1a876e9 100644 --- a/spec/whois/parsers/responses/whois.smallregistry.net/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.smallregistry.net/status_registered_spec.rb @@ -74,7 +74,6 @@ expect(subject.registrar).to be_a(Whois::Parser::Registrar) expect(subject.registrar.id).to eq(nil) expect(subject.registrar.name).to eq("GOOGLE") - expect(subject.registrar.organization).to eq("GOOGLE") expect(subject.registrar.url).to eq("http://www.google.com") end end diff --git a/spec/whois/parsers/responses/whois.srs.net.nz/nz/status_registered_spec.rb b/spec/whois/parsers/responses/whois.srs.net.nz/nz/status_registered_spec.rb index 2fa69ca7..b78dda5e 100644 --- a/spec/whois/parsers/responses/whois.srs.net.nz/nz/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.srs.net.nz/nz/status_registered_spec.rb @@ -69,7 +69,6 @@ expect(subject.registrar).to be_a(Whois::Parser::Registrar) expect(subject.registrar.id).to eq(nil) expect(subject.registrar.name).to eq("MarkMonitor") - expect(subject.registrar.organization).to eq(nil) expect(subject.registrar.url).to eq(nil) end end diff --git a/spec/whois/parsers/responses/whois.sx/sx/status_registered_spec.rb b/spec/whois/parsers/responses/whois.sx/sx/status_registered_spec.rb index 6fa3c01b..34d92651 100644 --- a/spec/whois/parsers/responses/whois.sx/sx/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.sx/sx/status_registered_spec.rb @@ -74,7 +74,6 @@ expect(subject.registrar).to be_a(Whois::Parser::Registrar) expect(subject.registrar.id).to eq(nil) expect(subject.registrar.name).to eq("SX Registry O") - expect(subject.registrar.organization).to eq(nil) expect(subject.registrar.url).to eq(nil) end end diff --git a/spec/whois/parsers/responses/whois.tcinet.ru/ru/status_registered_spec.rb b/spec/whois/parsers/responses/whois.tcinet.ru/ru/status_registered_spec.rb index 75c184e2..ceb3512c 100644 --- a/spec/whois/parsers/responses/whois.tcinet.ru/ru/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.tcinet.ru/ru/status_registered_spec.rb @@ -66,9 +66,8 @@ describe "#registrar" do it do expect(subject.registrar).to be_a(Whois::Parser::Registrar) - expect(subject.registrar.id).to eq("RU-CENTER-REG-RIPN") - expect(subject.registrar.name).to eq(nil) - expect(subject.registrar.organization).to eq(nil) + expect(subject.registrar.id).to eq(nil) + expect(subject.registrar.name).to eq("RU-CENTER-REG-RIPN") end end describe "#registrant_contacts" do diff --git a/spec/whois/parsers/responses/whois.tcinet.ru/su/status_registered_spec.rb b/spec/whois/parsers/responses/whois.tcinet.ru/su/status_registered_spec.rb index cd75f273..183623e4 100644 --- a/spec/whois/parsers/responses/whois.tcinet.ru/su/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.tcinet.ru/su/status_registered_spec.rb @@ -66,9 +66,8 @@ describe "#registrar" do it do expect(subject.registrar).to be_a(Whois::Parser::Registrar) - expect(subject.registrar.id).to eq("RUCENTER-REG-FID") - expect(subject.registrar.name).to eq(nil) - expect(subject.registrar.organization).to eq(nil) + expect(subject.registrar.id).to eq(nil) + expect(subject.registrar.name).to eq("RUCENTER-REG-FID") end end describe "#registrant_contacts" do diff --git a/spec/whois/parsers/responses/whois.tcinet.ru/xn--p1ai/status_registered_spec.rb b/spec/whois/parsers/responses/whois.tcinet.ru/xn--p1ai/status_registered_spec.rb index 81585f3f..881bfac0 100644 --- a/spec/whois/parsers/responses/whois.tcinet.ru/xn--p1ai/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.tcinet.ru/xn--p1ai/status_registered_spec.rb @@ -66,9 +66,8 @@ describe "#registrar" do it do expect(subject.registrar).to be_a(Whois::Parser::Registrar) - expect(subject.registrar.id).to eq("R01-REG-RF") - expect(subject.registrar.name).to eq(nil) - expect(subject.registrar.organization).to eq(nil) + expect(subject.registrar.id).to eq(nil) + expect(subject.registrar.name).to eq("R01-REG-RF") end end describe "#registrant_contacts" do diff --git a/spec/whois/parsers/responses/whois.tld.ee/ee/property_status_serverhold_spec.rb b/spec/whois/parsers/responses/whois.tld.ee/ee/property_status_serverhold_spec.rb index d7cefed8..86193244 100644 --- a/spec/whois/parsers/responses/whois.tld.ee/ee/property_status_serverhold_spec.rb +++ b/spec/whois/parsers/responses/whois.tld.ee/ee/property_status_serverhold_spec.rb @@ -73,7 +73,6 @@ it do expect(subject.registrar).to be_a(Whois::Parser::Registrar) expect(subject.registrar.name).to eq("Edicy OÜ") - expect(subject.registrar.organization).to eq("Edicy OÜ") expect(subject.registrar.url).to eq("http://www.edicy.com") end end diff --git a/spec/whois/parsers/responses/whois.tld.ee/ee/status_expired_spec.rb b/spec/whois/parsers/responses/whois.tld.ee/ee/status_expired_spec.rb index 1b3b3f88..f5c9d0ac 100644 --- a/spec/whois/parsers/responses/whois.tld.ee/ee/status_expired_spec.rb +++ b/spec/whois/parsers/responses/whois.tld.ee/ee/status_expired_spec.rb @@ -68,7 +68,6 @@ it do expect(subject.registrar).to be_a(Whois::Parser::Registrar) expect(subject.registrar.name).to eq("Elisa Eesti AS") - expect(subject.registrar.organization).to eq("Elisa Eesti AS") expect(subject.registrar.url).to eq("http://www.elisa.ee") end end diff --git a/spec/whois/parsers/responses/whois.tld.ee/ee/status_registered_spec.rb b/spec/whois/parsers/responses/whois.tld.ee/ee/status_registered_spec.rb index 984d338b..bd84e2fb 100644 --- a/spec/whois/parsers/responses/whois.tld.ee/ee/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.tld.ee/ee/status_registered_spec.rb @@ -73,7 +73,6 @@ it do expect(subject.registrar).to be_a(Whois::Parser::Registrar) expect(subject.registrar.name).to eq("Elisa Eesti AS") - expect(subject.registrar.organization).to eq("Elisa Eesti AS") expect(subject.registrar.url).to eq("http://www.elisa.ee") end end diff --git a/spec/whois/parsers/responses/whois.tld.sy/sy/status_registered_spec.rb b/spec/whois/parsers/responses/whois.tld.sy/sy/status_registered_spec.rb index 8c085937..b6f8f71d 100644 --- a/spec/whois/parsers/responses/whois.tld.sy/sy/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.tld.sy/sy/status_registered_spec.rb @@ -68,7 +68,6 @@ expect(subject.registrar).to be_a(Whois::Parser::Registrar) expect(subject.registrar.id).to eq(nil) expect(subject.registrar.name).to eq("nans") - expect(subject.registrar.organization).to eq(nil) expect(subject.registrar.url).to eq(nil) end end diff --git a/spec/whois/parsers/responses/whois.tucows.com/status_registered_spec.rb b/spec/whois/parsers/responses/whois.tucows.com/status_registered_spec.rb index 8339dfb2..8b35971c 100644 --- a/spec/whois/parsers/responses/whois.tucows.com/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.tucows.com/status_registered_spec.rb @@ -69,7 +69,6 @@ expect(subject.registrar).to be_a(Whois::Parser::Registrar) expect(subject.registrar.id).to eq("69") expect(subject.registrar.name).to eq("TUCOWS, INC.") - expect(subject.registrar.organization).to eq("TUCOWS, INC.") expect(subject.registrar.url).to eq("http://tucowsdomains.com") end end diff --git a/spec/whois/parsers/responses/whois.tznic.or.tz/tz/status_registered_spec.rb b/spec/whois/parsers/responses/whois.tznic.or.tz/tz/status_registered_spec.rb index 1efcbd48..1fde1081 100644 --- a/spec/whois/parsers/responses/whois.tznic.or.tz/tz/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.tznic.or.tz/tz/status_registered_spec.rb @@ -69,7 +69,6 @@ expect(subject.registrar).to be_a(Whois::Parser::Registrar) expect(subject.registrar.id).to eq("REG-TZNIC") expect(subject.registrar.name).to eq("REG-TZNIC") - expect(subject.registrar.organization).to eq(nil) expect(subject.registrar.url).to eq(nil) end end diff --git a/spec/whois/parsers/responses/whois.udag.net/status_registered_spec.rb b/spec/whois/parsers/responses/whois.udag.net/status_registered_spec.rb index bed58313..da7bcdfb 100644 --- a/spec/whois/parsers/responses/whois.udag.net/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.udag.net/status_registered_spec.rb @@ -69,7 +69,6 @@ expect(subject.registrar).to be_a(Whois::Parser::Registrar) expect(subject.registrar.id).to eq("1408") expect(subject.registrar.name).to eq("united domains AG") - expect(subject.registrar.organization).to eq("united domains AG") expect(subject.registrar.url).to eq("http://www.united-domains.de/") end end diff --git a/spec/whois/parsers/responses/whois.uniregistry.net/tattoo/status_registered_spec.rb b/spec/whois/parsers/responses/whois.uniregistry.net/tattoo/status_registered_spec.rb index 9aab6d8e..0dc3f086 100644 --- a/spec/whois/parsers/responses/whois.uniregistry.net/tattoo/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.uniregistry.net/tattoo/status_registered_spec.rb @@ -69,7 +69,6 @@ expect(subject.registrar).to be_a(Whois::Parser::Registrar) expect(subject.registrar.id).to eq("9999") expect(subject.registrar.name).to eq("Uniregistry, Corp.") - expect(subject.registrar.organization).to eq("Uniregistry, Corp.") expect(subject.registrar.url).to eq(nil) end end diff --git a/spec/whois/parsers/responses/whois.verisign-grs.com/com/status_registered_spec.rb b/spec/whois/parsers/responses/whois.verisign-grs.com/com/status_registered_spec.rb index 9f135002..bc7ae8a7 100644 --- a/spec/whois/parsers/responses/whois.verisign-grs.com/com/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.verisign-grs.com/com/status_registered_spec.rb @@ -74,7 +74,6 @@ expect(subject.registrar).to be_a(Whois::Parser::Registrar) expect(subject.registrar.id).to eq("292") expect(subject.registrar.name).to eq("MarkMonitor Inc.") - expect(subject.registrar.organization).to eq(nil) expect(subject.registrar.url).to eq("http://www.markmonitor.com") end end diff --git a/spec/whois/parsers/responses/whois.verisign-grs.com/net/status_registered_spec.rb b/spec/whois/parsers/responses/whois.verisign-grs.com/net/status_registered_spec.rb index 941a6a1b..4079e72e 100644 --- a/spec/whois/parsers/responses/whois.verisign-grs.com/net/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.verisign-grs.com/net/status_registered_spec.rb @@ -74,7 +74,6 @@ expect(subject.registrar).to be_a(Whois::Parser::Registrar) expect(subject.registrar.id).to eq("292") expect(subject.registrar.name).to eq("MarkMonitor Inc.") - expect(subject.registrar.organization).to eq(nil) expect(subject.registrar.url).to eq("http://www.markmonitor.com") end end diff --git a/spec/whois/parsers/responses/whois.wildwestdomains.com/status_registered_spec.rb b/spec/whois/parsers/responses/whois.wildwestdomains.com/status_registered_spec.rb index 002cefde..52e8d99c 100644 --- a/spec/whois/parsers/responses/whois.wildwestdomains.com/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.wildwestdomains.com/status_registered_spec.rb @@ -69,7 +69,6 @@ expect(subject.registrar).to be_a(Whois::Parser::Registrar) expect(subject.registrar.id).to eq("440") expect(subject.registrar.name).to eq("Wild West Domains, LLC") - expect(subject.registrar.organization).to eq("Wild West Domains, LLC") expect(subject.registrar.url).to eq("http://www.wildwestdomains.com") end end diff --git a/spec/whois/parsers/responses/whois.yoursrs.com/status_registered_spec.rb b/spec/whois/parsers/responses/whois.yoursrs.com/status_registered_spec.rb index 6b94b0be..507eb77d 100644 --- a/spec/whois/parsers/responses/whois.yoursrs.com/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.yoursrs.com/status_registered_spec.rb @@ -69,7 +69,6 @@ expect(subject.registrar).to be_a(Whois::Parser::Registrar) expect(subject.registrar.id).to eq(nil) expect(subject.registrar.name).to eq("REALTIME REGISTER B.V.") - expect(subject.registrar.organization).to eq(nil) expect(subject.registrar.url).to eq(nil) end end diff --git a/spec/whois/parsers/responses/whois1.nic.bi/bi/status_registered_spec.rb b/spec/whois/parsers/responses/whois1.nic.bi/bi/status_registered_spec.rb index 61b4f712..36ffe53d 100644 --- a/spec/whois/parsers/responses/whois1.nic.bi/bi/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois1.nic.bi/bi/status_registered_spec.rb @@ -69,7 +69,6 @@ expect(subject.registrar).to be_a(Whois::Parser::Registrar) expect(subject.registrar.id).to eq(nil) expect(subject.registrar.name).to eq("MarkMonito") - expect(subject.registrar.organization).to eq(nil) expect(subject.registrar.url).to eq(nil) end end From ab3af79c6d27645fffdf53f99a77368eb55ce258 Mon Sep 17 00:00:00 2001 From: Adrien Rey-Jarthon Date: Tue, 16 Nov 2021 14:14:10 +0100 Subject: [PATCH 05/29] Make sure times are parsed as UTC when no zone is specified (instead of using machine timezone) + improve parsing of some timezone when present and set japanese timezone --- CHANGELOG.md | 1 + lib/whois/parsers/base.rb | 11 +++++------ lib/whois/parsers/whois.dot.cf.rb | 4 ++-- lib/whois/parsers/whois.dot.tk.rb | 4 ++-- lib/whois/parsers/whois.jprs.jp.rb | 9 +++------ lib/whois/parsers/whois.nic.es.rb | 4 ++-- lib/whois/parsers/whois.register.bg.rb | 8 ++------ .../jp/status_registered.expected | 6 +++--- .../whois.jprs.jp/jp/status_registered.txt | 10 +++++----- .../whois.jprs.jp/jp/status_reserved.expected | 2 +- .../ne.jp/status_registered.expected | 6 +++--- .../whois.nic.cz/cz/status_registered.expected | 2 +- .../whois.nic.es/es/status_registered.expected | 4 ++-- .../bg/status_registered.expected | 4 ++-- .../za.org/status_registered.expected | 2 +- spec/whois/parsers/base_spec.rb | 12 ++++++++++++ .../capetown/status_registered_spec.rb | 6 +++--- .../vg/status_registered_spec.rb | 6 +++--- .../cc/status_registered_spec.rb | 6 +++--- .../co.za/status_registered_spec.rb | 6 +++--- .../durban/status_registered_spec.rb | 6 +++--- .../joburg/status_registered_spec.rb | 6 +++--- .../org.za/status_registered_spec.rb | 6 +++--- .../tv/status_registered_spec.rb | 6 +++--- .../whois.1und1.info/status_registered_spec.rb | 6 +++--- .../whois.35.com/status_registered_spec.rb | 6 +++--- .../whois.aero/status_registered_spec.rb | 6 +++--- .../bz/status_registered_spec.rb | 6 +++--- .../gi/status_registered_spec.rb | 6 +++--- .../lc/status_registered_spec.rb | 6 +++--- .../mn/status_registered_spec.rb | 6 +++--- .../sc/status_registered_spec.rb | 6 +++--- .../vc/status_registered_spec.rb | 6 +++--- .../info/status_registered_spec.rb | 6 +++--- .../pro/status_registered_spec.rb | 6 +++--- .../am/status_registered_spec.rb | 6 +++--- .../whois.ascio.com/status_registered_spec.rb | 6 +++--- .../tn/property_contact_updated_none_spec.rb | 2 +- .../whois.ati.tn/tn/status_registered_spec.rb | 14 +++++++------- .../au/status_registered_spec.rb | 2 +- .../whois.ax/ax/status_registered_spec.rb | 2 +- .../whois.biz/biz/status_registered_spec.rb | 6 +++--- .../bn/status_registered_spec.rb | 6 +++--- .../whois.cat/cat/status_registered_spec.rb | 6 +++--- .../by/status_registered_spec.rb | 6 +++--- .../uz/status_registered_spec.rb | 6 +++--- .../com/status_registered_spec.rb | 6 +++--- .../ae.org/status_registered_spec.rb | 6 +++--- .../ar.com/status_registered_spec.rb | 6 +++--- .../br.com/status_registered_spec.rb | 6 +++--- .../cn.com/status_registered_spec.rb | 6 +++--- .../de.com/status_registered_spec.rb | 6 +++--- .../eu.com/status_registered_spec.rb | 6 +++--- .../gb.com/status_registered_spec.rb | 6 +++--- .../gb.net/status_registered_spec.rb | 6 +++--- .../gr.com/status_registered_spec.rb | 6 +++--- .../hu.com/status_registered_spec.rb | 6 +++--- .../jp.net/status_registered_spec.rb | 6 +++--- .../jpn.com/status_registered_spec.rb | 6 +++--- .../kr.com/status_registered_spec.rb | 6 +++--- .../qc.com/status_registered_spec.rb | 6 +++--- .../ru.com/status_registered_spec.rb | 6 +++--- .../sa.com/status_registered_spec.rb | 6 +++--- .../se.com/status_registered_spec.rb | 6 +++--- .../se.net/status_registered_spec.rb | 6 +++--- .../uk.com/status_registered_spec.rb | 6 +++--- .../uk.net/status_registered_spec.rb | 6 +++--- .../us.com/status_registered_spec.rb | 6 +++--- .../uy.com/status_registered_spec.rb | 6 +++--- .../za.com/status_registered_spec.rb | 6 +++--- .../whois.cira.ca/ca/status_registered_spec.rb | 6 +++--- .../whois.cmc.iq/iq/status_registered_spec.rb | 6 +++--- .../cn/status_registered_spec.rb | 4 ++-- .../co.ca/status_registered_spec.rb | 4 ++-- .../co.pl/status_registered_spec.rb | 2 +- .../whois.co.ug/ug/status_registered_spec.rb | 6 +++--- .../status_registered_spec.rb | 4 ++-- .../status_registered_spec.rb | 6 +++--- .../de/status_registered_spec.rb | 2 +- .../dk/status_registered_spec.rb | 4 ++-- .../whois.dns.be/be/status_registered_spec.rb | 2 +- .../whois.dns.hr/hr/status_registered_spec.rb | 2 +- .../whois.dns.lu/lu/status_registered_spec.rb | 2 +- .../whois.dns.pl/pl/status_registered_spec.rb | 6 +++--- .../whois.dns.pt/pt/status_inactive_spec.rb | 4 ++-- .../whois.dns.pt/pt/status_registered_spec.rb | 4 ++-- .../whois.dns.pt/pt/status_reserved_spec.rb | 2 +- .../nl/status_registered_spec.rb | 4 ++-- .../ie/status_registered_spec.rb | 4 ++-- .../lt/status_registered_spec.rb | 2 +- .../bike/status_registered_spec.rb | 6 +++--- .../whois.dot.cf/cf/status_registered_spec.rb | 2 +- .../whois.dot.tk/tk/status_registered_spec.rb | 4 ++-- .../mobi/status_registered_spec.rb | 6 +++--- .../post/status_registered_spec.rb | 6 +++--- .../status_registered_spec.rb | 6 +++--- .../edu/status_registered_spec.rb | 6 +++--- .../ee/status_registered_spec.rb | 4 ++-- .../whois.enom.com/status_registered_spec.rb | 2 +- .../fi/property_status_graceperiod_spec.rb | 6 +++--- .../whois.fi/fi/status_registered_spec.rb | 6 +++--- .../whois.gandi.net/status_registered_spec.rb | 6 +++--- .../whois.gg/gg/status_registered_spec.rb | 2 +- .../status_registered_spec.rb | 6 +++--- .../gov.za/status_registered_spec.rb | 2 +- .../hk/status_registered_spec.rb | 4 ++-- .../int/status_registered_spec.rb | 4 ++-- .../tld/status_not_assigned_spec.rb | 2 +- .../whois.iis.nu/nu/status_registered_spec.rb | 6 +++--- .../se/property_datetime_is_dash_spec.rb | 4 ++-- .../se/property_status_inactive_spec.rb | 4 ++-- .../whois.iis.se/se/status_registered_spec.rb | 6 +++--- .../in.ua/status_registered_spec.rb | 6 +++--- .../in/status_registered_spec.rb | 6 +++--- .../is/status_registered_spec.rb | 4 ++-- .../il/status_registered_spec.rb | 2 +- .../ac.uk/status_registered_spec.rb | 6 +++--- .../gov.uk/status_registered_spec.rb | 6 +++--- .../whois.je/je/status_registered_spec.rb | 2 +- ...perty_updates_on_error_out-of-range_spec.rb | 2 +- .../whois.jprs.jp/jp/status_registered_spec.rb | 6 +++--- .../whois.jprs.jp/jp/status_reserved_spec.rb | 2 +- .../ne.jp/status_registered_spec.rb | 6 +++--- .../ke/status_registered_spec.rb | 6 +++--- .../whois.kg/kg/status_registered_spec.rb | 6 +++--- .../whois.kr/kr/status_registered_spec.rb | 6 +++--- .../status_registered_spec.rb | 6 +++--- .../museum/status_registered_spec.rb | 6 +++--- .../my/status_registered_spec.rb | 6 +++--- .../na/status_registered_spec.rb | 6 +++--- .../whois.nc/nc/status_registered_spec.rb | 6 +++--- .../cm/status_registered_spec.rb | 6 +++--- .../cm/status_suspended_spec.rb | 6 +++--- .../status_registered_spec.rb | 6 +++--- .../whois.nic.ac/ac/status_registered_spec.rb | 6 +++--- .../whois.nic.af/af/status_registered_spec.rb | 6 +++--- .../whois.nic.ag/ag/status_registered_spec.rb | 6 +++--- .../asia/status_registered_spec.rb | 6 +++--- .../whois.nic.at/at/status_registered_spec.rb | 2 +- .../whois.nic.bj/bj/status_registered_spec.rb | 4 ++-- .../whois.nic.bo/bo/status_registered_spec.rb | 4 ++-- .../whois.nic.ci/ci/status_registered_spec.rb | 4 ++-- .../whois.nic.co/co/status_registered_spec.rb | 6 +++--- .../college/status_registered_spec.rb | 6 +++--- .../coop/status_registered_spec.rb | 6 +++--- .../whois.nic.cx/cx/status_registered_spec.rb | 6 +++--- .../cz/case_nset_contact_same_name_spec.rb | 2 +- .../cz/response_with_keyset_spec.rb | 6 +++--- .../whois.nic.cz/cz/status_registered_spec.rb | 12 ++++++------ .../design/status_registered_spec.rb | 6 +++--- .../whois.nic.dm/dm/status_registered_spec.rb | 6 +++--- .../whois.nic.ec/ex/status_registered_spec.rb | 6 +++--- .../whois.nic.es/es/status_registered_spec.rb | 4 ++-- .../whois.nic.fm/fm/status_registered_spec.rb | 6 +++--- .../whois.nic.fo/fo/status_registered_spec.rb | 10 +++++----- .../whois.nic.fr/fr/status_registered_spec.rb | 12 ++++++------ .../whois.nic.fr/tf/status_registered_spec.rb | 12 ++++++------ .../whois.nic.gd/gd/status_registered_spec.rb | 6 +++--- .../whois.nic.gl/gl/status_registered_spec.rb | 6 +++--- .../whois.nic.gs/gs/status_registered_spec.rb | 6 +++--- .../whois.nic.hn/hn/status_registered_spec.rb | 6 +++--- .../whois.nic.ht/ht/status_registered_spec.rb | 6 +++--- .../whois.nic.hu/hu/status_registered_spec.rb | 2 +- .../whois.nic.im/im/status_registered_spec.rb | 2 +- .../whois.nic.io/io/status_registered_spec.rb | 6 +++--- .../whois.nic.ir/ir/status_registered_spec.rb | 2 +- .../it/property_contact_province_spec.rb | 4 ++-- ...rty_contact_with_company_in_address_spec.rb | 4 ++-- .../property_contact_with_organization_spec.rb | 4 ++-- .../whois.nic.it/it/status_registered_spec.rb | 18 +++++++++--------- .../jobs/status_registered_spec.rb | 6 +++--- .../whois.nic.ki/ki/status_registered_spec.rb | 6 +++--- .../whois.nic.kz/kz/status_registered_spec.rb | 4 ++-- .../whois.nic.la/la/status_registered_spec.rb | 6 +++--- .../whois.nic.lk/lk/status_registered_spec.rb | 6 +++--- .../whois.nic.lv/lv/status_registered_spec.rb | 2 +- .../whois.nic.ly/ly/status_registered_spec.rb | 6 +++--- .../whois.nic.md/md/status_registered_spec.rb | 4 ++-- .../whois.nic.me/me/status_registered_spec.rb | 6 +++--- .../whois.nic.mg/mg/status_registered_spec.rb | 6 +++--- .../whois.nic.ms/ms/status_registered_spec.rb | 6 +++--- .../whois.nic.mu/mu/status_registered_spec.rb | 6 +++--- .../whois.nic.mx/mx/status_registered_spec.rb | 4 ++-- .../name/status_registered_spec.rb | 6 +++--- .../ng/status_registered_spec.rb | 6 +++--- .../sa/status_registered_spec.rb | 4 ++-- .../sb/status_registered_spec.rb | 6 +++--- .../whois.nic.nf/nf/status_registered_spec.rb | 6 +++--- .../uy/status_registered_spec.rb | 4 ++-- .../whois.nic.pm/pm/status_registered_spec.rb | 12 ++++++------ .../whois.nic.pr/pr/status_registered_spec.rb | 4 ++-- .../at/status_registered_spec.rb | 2 +- .../whois.nic.pw/pw/status_registered_spec.rb | 6 +++--- .../whois.nic.re/re/status_registered_spec.rb | 12 ++++++------ .../whois.nic.sh/sh/status_registered_spec.rb | 6 +++--- .../whois.nic.sl/sl/status_registered_spec.rb | 4 ++-- .../whois.nic.sm/sm/status_registered_spec.rb | 4 ++-- .../whois.nic.sn/sn/status_registered_spec.rb | 2 +- .../whois.nic.so/so/status_registered_spec.rb | 6 +++--- .../space/status_registered_spec.rb | 6 +++--- .../whois.nic.st/st/status_registered_spec.rb | 6 +++--- .../whois.nic.tc/tc/status_registered_spec.rb | 4 ++-- .../tech/status_registered_spec.rb | 6 +++--- .../tel/status_registered_spec.rb | 6 +++--- .../whois.nic.tl/tl/status_registered_spec.rb | 6 +++--- .../whois.nic.tm/tm/status_registered_spec.rb | 2 +- .../whois.nic.tr/tr/status_registered_spec.rb | 4 ++-- .../travel/status_registered_spec.rb | 6 +++--- .../whois.nic.uk/uk/status_registered_spec.rb | 6 +++--- .../whois.nic.uk/uk/status_reserved_spec.rb | 4 ++-- .../whois.nic.uk/uk/status_suspended_spec.rb | 6 +++--- .../whois.nic.us/us/status_registered_spec.rb | 6 +++--- .../ve/property_updated_on_spec.rb | 2 +- .../whois.nic.ve/ve/status_inactive_spec.rb | 6 +++--- .../whois.nic.ve/ve/status_registered_spec.rb | 4 ++-- .../whois.nic.wf/wf/status_registered_spec.rb | 12 ++++++------ .../xxx/status_registered_spec.rb | 6 +++--- .../xyz/status_registered_spec.rb | 6 +++--- .../whois.nic.yt/yt/status_registered_spec.rb | 12 ++++++------ .../no/status_registered_spec.rb | 4 ++-- .../status_registered_spec.rb | 6 +++--- .../id/status_registered_spec.rb | 6 +++--- .../org/status_registered_spec.rb | 6 +++--- .../ps/status_registered_spec.rb | 4 ++-- .../bg/status_registered_spec.rb | 4 ++-- .../status_registered_spec.rb | 6 +++--- .../si/status_registered_spec.rb | 4 ++-- .../ma/status_registered_spec.rb | 4 ++-- .../br/status_registered_spec.rb | 18 +++++++++--------- .../gy/status_registered_spec.rb | 6 +++--- .../hm/status_registered_spec.rb | 4 ++-- .../om/status_registered_spec.rb | 2 +- .../rs/status_registered_spec.rb | 6 +++--- .../status_registered_spec.rb | 4 ++-- .../status_registered_spec.rb | 6 +++--- .../status_registered_spec.rb | 6 +++--- .../sg/status_registered_spec.rb | 4 ++-- .../sk/status_registered_spec.rb | 4 ++-- .../status_registered_spec.rb | 12 ++++++------ .../nz/status_registered_spec.rb | 6 +++--- .../whois.sx/sx/status_registered_spec.rb | 6 +++--- .../ru/status_registered_spec.rb | 4 ++-- .../su/status_registered_spec.rb | 4 ++-- .../xn--p1ai/status_registered_spec.rb | 4 ++-- .../th/status_registered_spec.rb | 6 +++--- .../ee/property_status_serverhold_spec.rb | 14 +++++++------- .../whois.tld.ee/ee/status_expired_spec.rb | 12 ++++++------ .../whois.tld.ee/ee/status_registered_spec.rb | 12 ++++++------ .../whois.tld.sy/sy/status_registered_spec.rb | 4 ++-- .../whois.tucows.com/status_registered_spec.rb | 6 +++--- .../tw/status_registered_spec.rb | 4 ++-- .../tz/status_registered_spec.rb | 12 ++++++------ .../ua/uaepp/status_registered_spec.rb | 12 ++++++------ .../uanic/property_contacts_multiple_spec.rb | 4 ++-- .../ua/uanic/status_registered_spec.rb | 10 +++++----- .../whois.udag.net/status_registered_spec.rb | 6 +++--- .../tattoo/status_registered_spec.rb | 6 +++--- .../fj/status_registered_spec.rb | 2 +- .../com/status_registered_spec.rb | 6 +++--- .../net/status_registered_spec.rb | 6 +++--- .../ws/status_registered_spec.rb | 6 +++--- .../status_registered_spec.rb | 6 +++--- .../status_registered_spec.rb | 6 +++--- .../za.net/status_registered_spec.rb | 4 ++-- .../za.org/status_registered_spec.rb | 4 ++-- .../whois1.nic.bi/bi/status_registered_spec.rb | 6 +++--- tasks/spec.rake | 6 ++++-- 267 files changed, 748 insertions(+), 741 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 93584663..3aa094f4 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,7 @@ This project uses [Semantic Versioning 2.0.0](http://semver.org/). #### master +- CHANGED: Make sure times are parsed as UTC when no zone is specified (instead of using machine timezone) + improve parsing of some timezone when present and set japanese timezone. - FIX: Big update and refactoring of all the Afilias based parser format, fixing broken parsing for .ME, .ORG, .INFO, .PRO, .BZ, .GI, .LC, .MN, .SC, .VC, .AG, .IN, .AERO, .ASIA, .MOBI, .POST, .XXX. (based on #34) Thanks @raszi and @jarthod - CHANGED: Standardize a bit more the Registar object by always filling the name first (instead of sometimes filling organisation instead and sometimes duplicate both). Only fill "organization" when it's a real different property provided by the whois server. - FIX: AFNIC parsers date format to avoid returning negative dates (#119) Thanks @itghlu diff --git a/lib/whois/parsers/base.rb b/lib/whois/parsers/base.rb index 9acbae4f..870751b4 100644 --- a/lib/whois/parsers/base.rb +++ b/lib/whois/parsers/base.rb @@ -169,11 +169,10 @@ def property_supported?(property) # @return [Nil] if the timestamp can't be parsed # @return [Time] # - def self.parse_time(timestamp) + def self.parse_time(timestamp, timezone: 'UTC') return unless timestamp.is_a?(String) && !timestamp.empty? - Time.parse(timestamp).change(usec: 0) - rescue ArgumentError - nil + zone = Time.find_zone(timezone) or raise ArgumentError.new("Invalid timezone: #{timezone.inspect}") + zone.parse(timestamp)&.change(usec: 0) end # @return [Whois::Record::Part] The part referenced by this parser. @@ -384,8 +383,8 @@ def typecast(value, type) end end - def parse_time(timestamp) - self.class.parse_time(timestamp) + def parse_time(timestamp, **args) + self.class.parse_time(timestamp, **args) end def handle_property(property, *args) diff --git a/lib/whois/parsers/whois.dot.cf.rb b/lib/whois/parsers/whois.dot.cf.rb index 22bfd08e..62e40d84 100644 --- a/lib/whois/parsers/whois.dot.cf.rb +++ b/lib/whois/parsers/whois.dot.cf.rb @@ -43,7 +43,7 @@ class WhoisDotCf < Base property_supported :created_on do if content_for_scanner =~ /Domain registered:\s(.+)\n/ - Time.strptime($1, "%m/%d/%Y") + DateTime.strptime($1, "%m/%d/%Y").to_time end end @@ -52,7 +52,7 @@ class WhoisDotCf < Base property_supported :expires_on do if content_for_scanner =~ /Record will expire on:\s(.+)\n/ value = $1.strip - Time.strptime(value, "%m/%d/%Y") if value.present? + DateTime.strptime(value, "%m/%d/%Y").to_time if value.present? end end diff --git a/lib/whois/parsers/whois.dot.tk.rb b/lib/whois/parsers/whois.dot.tk.rb index 353b9ead..04305789 100644 --- a/lib/whois/parsers/whois.dot.tk.rb +++ b/lib/whois/parsers/whois.dot.tk.rb @@ -43,7 +43,7 @@ class WhoisDotTk < Base property_supported :created_on do if content_for_scanner =~ /Domain registered:\s(.+)\n/ - Time.strptime($1, "%m/%d/%Y") + DateTime.strptime($1, "%m/%d/%Y").to_time end end @@ -51,7 +51,7 @@ class WhoisDotTk < Base property_supported :expires_on do if content_for_scanner =~ /Record will expire on:\s(.+)\n/ - Time.strptime($1, "%m/%d/%Y") + DateTime.strptime($1, "%m/%d/%Y").to_time end end diff --git a/lib/whois/parsers/whois.jprs.jp.rb b/lib/whois/parsers/whois.jprs.jp.rb index 700a2bad..45d3fe2f 100644 --- a/lib/whois/parsers/whois.jprs.jp.rb +++ b/lib/whois/parsers/whois.jprs.jp.rb @@ -63,24 +63,21 @@ class WhoisJprsJp < Base end - # TODO: timezone ('Asia/Tokyo') property_supported :created_on do if content_for_scanner =~ /\[(?:Created on|Registered Date)\][ \t]+(.*)\n/ - ($1.empty?) ? nil : parse_time($1) + ($1.empty?) ? nil : parse_time($1, timezone: 'Asia/Tokyo') end end - # TODO: timezone ('Asia/Tokyo') property_supported :updated_on do if content_for_scanner =~ /\[Last Updated?\][ \t]+(.*)\n/ - ($1.empty?) ? nil : parse_time($1) + ($1.empty?) ? nil : parse_time($1, timezone: 'Asia/Tokyo') end end - # TODO: timezone ('Asia/Tokyo') property_supported :expires_on do if content_for_scanner =~ /\[(?:Expires on|State)\][ \t]+(.*)\n/ - ($1.empty?) ? nil : parse_time($1) + ($1.empty?) ? nil : parse_time($1, timezone: 'Asia/Tokyo') end end diff --git a/lib/whois/parsers/whois.nic.es.rb b/lib/whois/parsers/whois.nic.es.rb index 63c90675..7fdf80fc 100644 --- a/lib/whois/parsers/whois.nic.es.rb +++ b/lib/whois/parsers/whois.nic.es.rb @@ -48,7 +48,7 @@ class WhoisNicEs < Base property_supported :created_on do if content_for_scanner =~ /Creation Date:\s+(.+)\n/ - parse_time($1) + DateTime.strptime($1, "%d/%m/%y").to_time end end @@ -56,7 +56,7 @@ class WhoisNicEs < Base property_supported :expires_on do if content_for_scanner =~ /Expiration Date:\s+(.+)\n/ - parse_time($1) + DateTime.strptime($1, "%d/%m/%y").to_time end end diff --git a/lib/whois/parsers/whois.register.bg.rb b/lib/whois/parsers/whois.register.bg.rb index 3afaace8..dda7799e 100644 --- a/lib/whois/parsers/whois.register.bg.rb +++ b/lib/whois/parsers/whois.register.bg.rb @@ -48,9 +48,7 @@ class WhoisRegisterBg < Base property_supported :created_on do if content_for_scanner =~ /activated on:\s+(.*?)\n/ - # Time.parse("30/06/2003 00:00:00") - # => ArgumentError: argument out of range - parse_time($1.gsub("/", "-")) + parse_time($1) end end @@ -58,9 +56,7 @@ class WhoisRegisterBg < Base property_supported :expires_on do if content_for_scanner =~ /expires at:\s+(.*?)\n/ - # Time.parse("30/06/2003 00:00:00") - # => ArgumentError: argument out of range - parse_time($1.gsub("/", "-")) + parse_time($1) end end diff --git a/spec/fixtures/responses/whois.jprs.jp/jp/status_registered.expected b/spec/fixtures/responses/whois.jprs.jp/jp/status_registered.expected index 4092fec4..cd40be2f 100644 --- a/spec/fixtures/responses/whois.jprs.jp/jp/status_registered.expected +++ b/spec/fixtures/responses/whois.jprs.jp/jp/status_registered.expected @@ -10,15 +10,15 @@ #created_on %s %CLASS{time} - %s %TIME{2005-05-30} + %s %TIME{2005-05-30 00:00:00 JST} #updated_on %s %CLASS{time} - %s %TIME{2013-06-01 01:05:07} + %s %TIME{2021-06-01 01:05:09 JST} #expires_on %s %CLASS{time} - %s %TIME{2014-05-31} + %s %TIME{2022-05-31 00:00:00 JST} #nameservers diff --git a/spec/fixtures/responses/whois.jprs.jp/jp/status_registered.txt b/spec/fixtures/responses/whois.jprs.jp/jp/status_registered.txt index ed59a9a6..a5814f0a 100644 --- a/spec/fixtures/responses/whois.jprs.jp/jp/status_registered.txt +++ b/spec/fixtures/responses/whois.jprs.jp/jp/status_registered.txt @@ -6,7 +6,7 @@ Domain Information: [Domain Name] GOOGLE.JP -[Registrant] Google Inc. +[Registrant] Google LLC [Name Server] ns1.google.com [Name Server] ns2.google.com @@ -15,18 +15,18 @@ Domain Information: [Signing Key] [Created on] 2005/05/30 -[Expires on] 2014/05/31 +[Expires on] 2022/05/31 [Status] Active -[Last Updated] 2013/06/01 01:05:07 (JST) +[Last Updated] 2021/06/01 01:05:09 (JST) Contact Information: -[Name] Google Inc. +[Name] Google LLC [Email] dns-admin@google.com [Web Page] [Postal code] 94043 [Postal Address] Mountain View 1600 Amphitheatre Parkway - US + CA [Phone] 16502530000 [Fax] 16502530001 diff --git a/spec/fixtures/responses/whois.jprs.jp/jp/status_reserved.expected b/spec/fixtures/responses/whois.jprs.jp/jp/status_reserved.expected index ca0447f6..3eac766f 100644 --- a/spec/fixtures/responses/whois.jprs.jp/jp/status_reserved.expected +++ b/spec/fixtures/responses/whois.jprs.jp/jp/status_reserved.expected @@ -13,7 +13,7 @@ #updated_on %s %CLASS{time} - %s %TIME{2001-02-21 00:00:00} + %s %TIME{2001-02-21 00:00:00 JST} #expires_on %s == nil diff --git a/spec/fixtures/responses/whois.jprs.jp/ne.jp/status_registered.expected b/spec/fixtures/responses/whois.jprs.jp/ne.jp/status_registered.expected index b45a55e8..426aa7ef 100644 --- a/spec/fixtures/responses/whois.jprs.jp/ne.jp/status_registered.expected +++ b/spec/fixtures/responses/whois.jprs.jp/ne.jp/status_registered.expected @@ -10,15 +10,15 @@ #created_on %s %CLASS{time} - %s %TIME{2003-09-11} + %s %TIME{2003-09-11 00:00:00 JST} #updated_on %s %CLASS{time} - %s %TIME{2009-10-23 19:22:08} + %s %TIME{2009-10-23 19:22:08 JST} #expires_on %s %CLASS{time} - %s %TIME{2010-09-30} + %s %TIME{2010-09-30 00:00:00 JST} #nameservers diff --git a/spec/fixtures/responses/whois.nic.cz/cz/status_registered.expected b/spec/fixtures/responses/whois.nic.cz/cz/status_registered.expected index 674d60d1..c9e5cf8f 100644 --- a/spec/fixtures/responses/whois.nic.cz/cz/status_registered.expected +++ b/spec/fixtures/responses/whois.nic.cz/cz/status_registered.expected @@ -25,7 +25,7 @@ #expires_on %s %CLASS{time} - %s %TIME{2014-07-22} + %s %TIME{2014-07-22 00:00:00} #registrar diff --git a/spec/fixtures/responses/whois.nic.es/es/status_registered.expected b/spec/fixtures/responses/whois.nic.es/es/status_registered.expected index 7f007ebf..2baebaf5 100644 --- a/spec/fixtures/responses/whois.nic.es/es/status_registered.expected +++ b/spec/fixtures/responses/whois.nic.es/es/status_registered.expected @@ -17,14 +17,14 @@ #created_on %s %CLASS{time} - %s %TIME{16/09/03} + %s %TIME{2003-09-16} #updated_on %s %ERROR{AttributeNotSupported} #expires_on %s %CLASS{time} - %s %TIME{16/09/14} + %s %TIME{2014-09-16} #registrar diff --git a/spec/fixtures/responses/whois.register.bg/bg/status_registered.expected b/spec/fixtures/responses/whois.register.bg/bg/status_registered.expected index dd4141fd..a83031e4 100644 --- a/spec/fixtures/responses/whois.register.bg/bg/status_registered.expected +++ b/spec/fixtures/responses/whois.register.bg/bg/status_registered.expected @@ -10,14 +10,14 @@ #created_on %s %CLASS{time} - %s %TIME{2003-06-30 00:00:00} + %s %TIME{2003-06-30 00:00:00 EEST} #updated_on %s %ERROR{AttributeNotSupported} #expires_on %s %CLASS{time} - %s %TIME{2014-06-30 00:00:00} + %s %TIME{2014-06-30 00:00:00 EEST} #nameservers diff --git a/spec/fixtures/responses/whois.za.org/za.org/status_registered.expected b/spec/fixtures/responses/whois.za.org/za.org/status_registered.expected index 11f52d49..1dd9c4c1 100644 --- a/spec/fixtures/responses/whois.za.org/za.org/status_registered.expected +++ b/spec/fixtures/responses/whois.za.org/za.org/status_registered.expected @@ -14,7 +14,7 @@ #updated_on %s %CLASS{time} - %s %TIME{2005-08-15 12:15:10} + %s %TIME{2005-08-15 12:15:10 BST} #expires_on %s %ERROR{AttributeNotSupported} diff --git a/spec/whois/parsers/base_spec.rb b/spec/whois/parsers/base_spec.rb index 97bbfb86..03be23cd 100644 --- a/spec/whois/parsers/base_spec.rb +++ b/spec/whois/parsers/base_spec.rb @@ -40,6 +40,18 @@ expect(described_class.parse_time("1970-01-01T00:00:00Z")).to eq(Time.at(0)) end + it "parse time in UTC by default" do + expect(described_class.parse_time("2021-11-16 08:03")).to eq(Time.utc(2021, 11, 16, 8, 3)) + end + + it "parse custom time zone if present" do + expect(described_class.parse_time("2021-11-16 08:03 JST")).to eq(Time.utc(2021, 11, 15, 23, 3)) + end + + it "allows custom default timezone" do + expect(described_class.parse_time("2021-11-16 08:03", timezone: "Tokyo")).to eq(Time.utc(2021, 11, 15, 23, 3)) + end + it "removes microseconds on parsed timestamps" do expect(described_class.parse_time("1970-01-01T00:00:00.123Z")).to eq(Time.at(0)) end diff --git a/spec/whois/parsers/responses/capetown-whois.registry.net.za/capetown/status_registered_spec.rb b/spec/whois/parsers/responses/capetown-whois.registry.net.za/capetown/status_registered_spec.rb index 304be82b..96294351 100644 --- a/spec/whois/parsers/responses/capetown-whois.registry.net.za/capetown/status_registered_spec.rb +++ b/spec/whois/parsers/responses/capetown-whois.registry.net.za/capetown/status_registered_spec.rb @@ -49,19 +49,19 @@ describe "#created_on" do it do expect(subject.created_on).to be_a(Time) - expect(subject.created_on).to eq(Time.parse("2015-04-01 07:41:59 UTC")) + expect(subject.created_on).to eq(DateTime.parse("2015-04-01 07:41:59 UTC")) end end describe "#updated_on" do it do expect(subject.updated_on).to be_a(Time) - expect(subject.updated_on).to eq(Time.parse("2015-05-30 09:21:00 UTC")) + expect(subject.updated_on).to eq(DateTime.parse("2015-05-30 09:21:00 UTC")) end end describe "#expires_on" do it do expect(subject.expires_on).to be_a(Time) - expect(subject.expires_on).to eq(Time.parse("2016-04-01 07:41:59 UTC")) + expect(subject.expires_on).to eq(DateTime.parse("2016-04-01 07:41:59 UTC")) end end describe "#registrar" do diff --git a/spec/whois/parsers/responses/ccwhois.ksregistry.net/vg/status_registered_spec.rb b/spec/whois/parsers/responses/ccwhois.ksregistry.net/vg/status_registered_spec.rb index 3c809f78..194f0888 100644 --- a/spec/whois/parsers/responses/ccwhois.ksregistry.net/vg/status_registered_spec.rb +++ b/spec/whois/parsers/responses/ccwhois.ksregistry.net/vg/status_registered_spec.rb @@ -54,19 +54,19 @@ describe "#created_on" do it do expect(subject.created_on).to be_a(Time) - expect(subject.created_on).to eq(Time.parse("1999-06-05 00:00:00")) + expect(subject.created_on).to eq(DateTime.parse("1999-06-05 00:00:00")) end end describe "#updated_on" do it do expect(subject.updated_on).to be_a(Time) - expect(subject.updated_on).to eq(Time.parse("2013-03-01 00:02:14")) + expect(subject.updated_on).to eq(DateTime.parse("2013-03-01 00:02:14")) end end describe "#expires_on" do it do expect(subject.expires_on).to be_a(Time) - expect(subject.expires_on).to eq(Time.parse("2013-06-05 00:00:00")) + expect(subject.expires_on).to eq(DateTime.parse("2013-06-05 00:00:00")) end end describe "#registrar" do diff --git a/spec/whois/parsers/responses/ccwhois.verisign-grs.com/cc/status_registered_spec.rb b/spec/whois/parsers/responses/ccwhois.verisign-grs.com/cc/status_registered_spec.rb index 664d5a7f..ddd8512c 100644 --- a/spec/whois/parsers/responses/ccwhois.verisign-grs.com/cc/status_registered_spec.rb +++ b/spec/whois/parsers/responses/ccwhois.verisign-grs.com/cc/status_registered_spec.rb @@ -54,19 +54,19 @@ describe "#created_on" do it do expect(subject.created_on).to be_a(Time) - expect(subject.created_on).to eq(Time.parse("1999-06-07 04:00:00 UTC")) + expect(subject.created_on).to eq(DateTime.parse("1999-06-07 04:00:00 UTC")) end end describe "#updated_on" do it do expect(subject.updated_on).to be_a(Time) - expect(subject.updated_on).to eq(Time.parse("2017-05-06 09:28:40 UTC")) + expect(subject.updated_on).to eq(DateTime.parse("2017-05-06 09:28:40 UTC")) end end describe "#expires_on" do it do expect(subject.expires_on).to be_a(Time) - expect(subject.expires_on).to eq(Time.parse("2018-06-07 04:00:00 UTC")) + expect(subject.expires_on).to eq(DateTime.parse("2018-06-07 04:00:00 UTC")) end end describe "#registrar" do diff --git a/spec/whois/parsers/responses/coza-whois.registry.net.za/co.za/status_registered_spec.rb b/spec/whois/parsers/responses/coza-whois.registry.net.za/co.za/status_registered_spec.rb index 6e32ca1b..35438af0 100644 --- a/spec/whois/parsers/responses/coza-whois.registry.net.za/co.za/status_registered_spec.rb +++ b/spec/whois/parsers/responses/coza-whois.registry.net.za/co.za/status_registered_spec.rb @@ -49,19 +49,19 @@ describe "#created_on" do it do expect(subject.created_on).to be_a(Time) - expect(subject.created_on).to eq(Time.parse("2001-06-25 20:37:59 UTC")) + expect(subject.created_on).to eq(DateTime.parse("2001-06-25 20:37:59 UTC")) end end describe "#updated_on" do it do expect(subject.updated_on).to be_a(Time) - expect(subject.updated_on).to eq(Time.parse("2016-09-24 16:20:09 UTC")) + expect(subject.updated_on).to eq(DateTime.parse("2016-09-24 16:20:09 UTC")) end end describe "#expires_on" do it do expect(subject.expires_on).to be_a(Time) - expect(subject.expires_on).to eq(Time.parse("2017-06-25 20:37:59 UTC")) + expect(subject.expires_on).to eq(DateTime.parse("2017-06-25 20:37:59 UTC")) end end describe "#registrar" do diff --git a/spec/whois/parsers/responses/durban-whois.registry.net.za/durban/status_registered_spec.rb b/spec/whois/parsers/responses/durban-whois.registry.net.za/durban/status_registered_spec.rb index 9d6c4706..c6cf2162 100644 --- a/spec/whois/parsers/responses/durban-whois.registry.net.za/durban/status_registered_spec.rb +++ b/spec/whois/parsers/responses/durban-whois.registry.net.za/durban/status_registered_spec.rb @@ -49,19 +49,19 @@ describe "#created_on" do it do expect(subject.created_on).to be_a(Time) - expect(subject.created_on).to eq(Time.parse("2014-11-04T06:00:01Z")) + expect(subject.created_on).to eq(DateTime.parse("2014-11-04T06:00:01Z")) end end describe "#updated_on" do it do expect(subject.updated_on).to be_a(Time) - expect(subject.updated_on).to eq(Time.parse("2014-11-11T06:00:03Z")) + expect(subject.updated_on).to eq(DateTime.parse("2014-11-11T06:00:03Z")) end end describe "#expires_on" do it do expect(subject.expires_on).to be_a(Time) - expect(subject.expires_on).to eq(Time.parse("2016-11-04T06:00:01Z")) + expect(subject.expires_on).to eq(DateTime.parse("2016-11-04T06:00:01Z")) end end describe "#registrar" do diff --git a/spec/whois/parsers/responses/joburg-whois.registry.net.za/joburg/status_registered_spec.rb b/spec/whois/parsers/responses/joburg-whois.registry.net.za/joburg/status_registered_spec.rb index ead1806d..6ad601a3 100644 --- a/spec/whois/parsers/responses/joburg-whois.registry.net.za/joburg/status_registered_spec.rb +++ b/spec/whois/parsers/responses/joburg-whois.registry.net.za/joburg/status_registered_spec.rb @@ -49,19 +49,19 @@ describe "#created_on" do it do expect(subject.created_on).to be_a(Time) - expect(subject.created_on).to eq(Time.parse("2014-11-03 22:00:08 UTC")) + expect(subject.created_on).to eq(DateTime.parse("2014-11-03 22:00:08 UTC")) end end describe "#updated_on" do it do expect(subject.updated_on).to be_a(Time) - expect(subject.updated_on).to eq(Time.parse("2014-11-10 07:08:28 UTC")) + expect(subject.updated_on).to eq(DateTime.parse("2014-11-10 07:08:28 UTC")) end end describe "#expires_on" do it do expect(subject.expires_on).to be_a(Time) - expect(subject.expires_on).to eq(Time.parse("2015-11-03 22:00:08 UTC")) + expect(subject.expires_on).to eq(DateTime.parse("2015-11-03 22:00:08 UTC")) end end describe "#registrar" do diff --git a/spec/whois/parsers/responses/org-whois.registry.net.za/org.za/status_registered_spec.rb b/spec/whois/parsers/responses/org-whois.registry.net.za/org.za/status_registered_spec.rb index 951b4a8a..50e675a3 100644 --- a/spec/whois/parsers/responses/org-whois.registry.net.za/org.za/status_registered_spec.rb +++ b/spec/whois/parsers/responses/org-whois.registry.net.za/org.za/status_registered_spec.rb @@ -49,19 +49,19 @@ describe "#created_on" do it do expect(subject.created_on).to be_a(Time) - expect(subject.created_on).to eq(Time.parse("1997-10-03 09:46:34 UTC")) + expect(subject.created_on).to eq(DateTime.parse("1997-10-03 09:46:34 UTC")) end end describe "#updated_on" do it do expect(subject.updated_on).to be_a(Time) - expect(subject.updated_on).to eq(Time.parse("2015-02-05 08:45:51 UTC")) + expect(subject.updated_on).to eq(DateTime.parse("2015-02-05 08:45:51 UTC")) end end describe "#expires_on" do it do expect(subject.expires_on).to be_a(Time) - expect(subject.expires_on).to eq(Time.parse("2999-12-31 21:59:59 UTC")) + expect(subject.expires_on).to eq(DateTime.parse("2999-12-31 21:59:59 UTC")) end end describe "#registrar" do diff --git a/spec/whois/parsers/responses/tvwhois.verisign-grs.com/tv/status_registered_spec.rb b/spec/whois/parsers/responses/tvwhois.verisign-grs.com/tv/status_registered_spec.rb index bbf18f19..e842ab20 100644 --- a/spec/whois/parsers/responses/tvwhois.verisign-grs.com/tv/status_registered_spec.rb +++ b/spec/whois/parsers/responses/tvwhois.verisign-grs.com/tv/status_registered_spec.rb @@ -54,19 +54,19 @@ describe "#created_on" do it do expect(subject.created_on).to be_a(Time) - expect(subject.created_on).to eq(Time.parse("2002-08-02 16:43:36 UTC")) + expect(subject.created_on).to eq(DateTime.parse("2002-08-02 16:43:36 UTC")) end end describe "#updated_on" do it do expect(subject.updated_on).to be_a(Time) - expect(subject.updated_on).to eq(Time.parse("2017-07-01 09:25:47 UTC")) + expect(subject.updated_on).to eq(DateTime.parse("2017-07-01 09:25:47 UTC")) end end describe "#expires_on" do it do expect(subject.expires_on).to be_a(Time) - expect(subject.expires_on).to eq(Time.parse("2018-08-02 16:43:36 UTC")) + expect(subject.expires_on).to eq(DateTime.parse("2018-08-02 16:43:36 UTC")) end end describe "#registrar" do diff --git a/spec/whois/parsers/responses/whois.1und1.info/status_registered_spec.rb b/spec/whois/parsers/responses/whois.1und1.info/status_registered_spec.rb index 85bfb6bb..743a0fe1 100644 --- a/spec/whois/parsers/responses/whois.1und1.info/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.1und1.info/status_registered_spec.rb @@ -49,19 +49,19 @@ describe "#created_on" do it do expect(subject.created_on).to be_a(Time) - expect(subject.created_on).to eq(Time.parse("1998-08-12 00:00:00")) + expect(subject.created_on).to eq(DateTime.parse("1998-08-12 00:00:00")) end end describe "#updated_on" do it do expect(subject.updated_on).to be_a(Time) - expect(subject.updated_on).to eq(Time.parse("2013-08-11 00:00:00")) + expect(subject.updated_on).to eq(DateTime.parse("2013-08-11 00:00:00")) end end describe "#expires_on" do it do expect(subject.expires_on).to be_a(Time) - expect(subject.expires_on).to eq(Time.parse("2014-08-11 00:00:00")) + expect(subject.expires_on).to eq(DateTime.parse("2014-08-11 00:00:00")) end end describe "#registrar" do diff --git a/spec/whois/parsers/responses/whois.35.com/status_registered_spec.rb b/spec/whois/parsers/responses/whois.35.com/status_registered_spec.rb index b9d529fe..be781ac1 100644 --- a/spec/whois/parsers/responses/whois.35.com/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.35.com/status_registered_spec.rb @@ -39,19 +39,19 @@ describe "#created_on" do it do expect(subject.created_on).to be_a(Time) - expect(subject.created_on).to eq(Time.parse("2010-09-10")) + expect(subject.created_on).to eq(DateTime.parse("2010-09-10")) end end describe "#updated_on" do it do expect(subject.updated_on).to be_a(Time) - expect(subject.updated_on).to eq(Time.parse("2014-08-21 23:48:59")) + expect(subject.updated_on).to eq(DateTime.parse("2014-08-21 23:48:59")) end end describe "#expires_on" do it do expect(subject.expires_on).to be_a(Time) - expect(subject.expires_on).to eq(Time.parse("2015-09-10")) + expect(subject.expires_on).to eq(DateTime.parse("2015-09-10")) end end describe "#registrar" do diff --git a/spec/whois/parsers/responses/whois.aero/status_registered_spec.rb b/spec/whois/parsers/responses/whois.aero/status_registered_spec.rb index 7588c512..26c68bb2 100644 --- a/spec/whois/parsers/responses/whois.aero/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.aero/status_registered_spec.rb @@ -59,19 +59,19 @@ describe "#created_on" do it do expect(subject.created_on).to be_a(Time) - expect(subject.created_on).to eq(Time.parse("2002-03-26 06:48:27 UTC")) + expect(subject.created_on).to eq(DateTime.parse("2002-03-26 06:48:27 UTC")) end end describe "#updated_on" do it do expect(subject.updated_on).to be_a(Time) - expect(subject.updated_on).to eq(Time.parse("2021-01-08 12:04:52 UTC")) + expect(subject.updated_on).to eq(DateTime.parse("2021-01-08 12:04:52 UTC")) end end describe "#expires_on" do it do expect(subject.expires_on).to be_a(Time) - expect(subject.expires_on).to eq(Time.parse("2022-03-26 06:48:27 UTC")) + expect(subject.expires_on).to eq(DateTime.parse("2022-03-26 06:48:27 UTC")) end end describe "#registrar" do diff --git a/spec/whois/parsers/responses/whois.afilias-grs.info/bz/status_registered_spec.rb b/spec/whois/parsers/responses/whois.afilias-grs.info/bz/status_registered_spec.rb index 0c573cb8..ce5c6df0 100644 --- a/spec/whois/parsers/responses/whois.afilias-grs.info/bz/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.afilias-grs.info/bz/status_registered_spec.rb @@ -54,19 +54,19 @@ describe "#created_on" do it do expect(subject.created_on).to be_a(Time) - expect(subject.created_on).to eq(Time.parse("2006-02-12 18:08:52 UTC")) + expect(subject.created_on).to eq(DateTime.parse("2006-02-12 18:08:52 UTC")) end end describe "#updated_on" do it do expect(subject.updated_on).to be_a(Time) - expect(subject.updated_on).to eq(Time.parse("2021-01-11 10:34:48 UTC")) + expect(subject.updated_on).to eq(DateTime.parse("2021-01-11 10:34:48 UTC")) end end describe "#expires_on" do it do expect(subject.expires_on).to be_a(Time) - expect(subject.expires_on).to eq(Time.parse("2022-02-12 18:08:52 UTC")) + expect(subject.expires_on).to eq(DateTime.parse("2022-02-12 18:08:52 UTC")) end end describe "#registrar" do diff --git a/spec/whois/parsers/responses/whois.afilias-grs.info/gi/status_registered_spec.rb b/spec/whois/parsers/responses/whois.afilias-grs.info/gi/status_registered_spec.rb index fd15bf03..e17598eb 100644 --- a/spec/whois/parsers/responses/whois.afilias-grs.info/gi/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.afilias-grs.info/gi/status_registered_spec.rb @@ -54,19 +54,19 @@ describe "#created_on" do it do expect(subject.created_on).to be_a(Time) - expect(subject.created_on).to eq(Time.parse("2004-12-20 13:34:34 UTC")) + expect(subject.created_on).to eq(DateTime.parse("2004-12-20 13:34:34 UTC")) end end describe "#updated_on" do it do expect(subject.updated_on).to be_a(Time) - expect(subject.updated_on).to eq(Time.parse("2017-12-05 13:07:12 UTC")) + expect(subject.updated_on).to eq(DateTime.parse("2017-12-05 13:07:12 UTC")) end end describe "#expires_on" do it do expect(subject.expires_on).to be_a(Time) - expect(subject.expires_on).to eq(Time.parse("2022-12-20 13:34:34 UTC")) + expect(subject.expires_on).to eq(DateTime.parse("2022-12-20 13:34:34 UTC")) end end describe "#registrar" do diff --git a/spec/whois/parsers/responses/whois.afilias-grs.info/lc/status_registered_spec.rb b/spec/whois/parsers/responses/whois.afilias-grs.info/lc/status_registered_spec.rb index 276b5eb7..4c552708 100644 --- a/spec/whois/parsers/responses/whois.afilias-grs.info/lc/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.afilias-grs.info/lc/status_registered_spec.rb @@ -54,19 +54,19 @@ describe "#created_on" do it do expect(subject.created_on).to be_a(Time) - expect(subject.created_on).to eq(Time.parse("2002-12-08 00:00:00 UTC")) + expect(subject.created_on).to eq(DateTime.parse("2002-12-08 00:00:00 UTC")) end end describe "#updated_on" do it do expect(subject.updated_on).to be_a(Time) - expect(subject.updated_on).to eq(Time.parse("2020-12-08 22:22:29 UTC")) + expect(subject.updated_on).to eq(DateTime.parse("2020-12-08 22:22:29 UTC")) end end describe "#expires_on" do it do expect(subject.expires_on).to be_a(Time) - expect(subject.expires_on).to eq(Time.parse("2021-12-08 00:00:00 UTC")) + expect(subject.expires_on).to eq(DateTime.parse("2021-12-08 00:00:00 UTC")) end end describe "#registrar" do diff --git a/spec/whois/parsers/responses/whois.afilias-grs.info/mn/status_registered_spec.rb b/spec/whois/parsers/responses/whois.afilias-grs.info/mn/status_registered_spec.rb index 538f6e79..17523c6d 100644 --- a/spec/whois/parsers/responses/whois.afilias-grs.info/mn/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.afilias-grs.info/mn/status_registered_spec.rb @@ -54,19 +54,19 @@ describe "#created_on" do it do expect(subject.created_on).to be_a(Time) - expect(subject.created_on).to eq(Time.parse("2003-04-07 00:00:00 UTC")) + expect(subject.created_on).to eq(DateTime.parse("2003-04-07 00:00:00 UTC")) end end describe "#updated_on" do it do expect(subject.updated_on).to be_a(Time) - expect(subject.updated_on).to eq(Time.parse("2021-03-06 10:38:48 UTC")) + expect(subject.updated_on).to eq(DateTime.parse("2021-03-06 10:38:48 UTC")) end end describe "#expires_on" do it do expect(subject.expires_on).to be_a(Time) - expect(subject.expires_on).to eq(Time.parse("2022-04-07 00:00:00 UTC")) + expect(subject.expires_on).to eq(DateTime.parse("2022-04-07 00:00:00 UTC")) end end describe "#registrar" do diff --git a/spec/whois/parsers/responses/whois.afilias-grs.info/sc/status_registered_spec.rb b/spec/whois/parsers/responses/whois.afilias-grs.info/sc/status_registered_spec.rb index 6842a9e3..8ac1589f 100644 --- a/spec/whois/parsers/responses/whois.afilias-grs.info/sc/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.afilias-grs.info/sc/status_registered_spec.rb @@ -54,19 +54,19 @@ describe "#created_on" do it do expect(subject.created_on).to be_a(Time) - expect(subject.created_on).to eq(Time.parse("2004-02-03 19:19:12 UTC")) + expect(subject.created_on).to eq(DateTime.parse("2004-02-03 19:19:12 UTC")) end end describe "#updated_on" do it do expect(subject.updated_on).to be_a(Time) - expect(subject.updated_on).to eq(Time.parse("2021-01-02 10:34:05 UTC")) + expect(subject.updated_on).to eq(DateTime.parse("2021-01-02 10:34:05 UTC")) end end describe "#expires_on" do it do expect(subject.expires_on).to be_a(Time) - expect(subject.expires_on).to eq(Time.parse("2022-02-03 19:19:12 UTC")) + expect(subject.expires_on).to eq(DateTime.parse("2022-02-03 19:19:12 UTC")) end end describe "#registrar" do diff --git a/spec/whois/parsers/responses/whois.afilias-grs.info/vc/status_registered_spec.rb b/spec/whois/parsers/responses/whois.afilias-grs.info/vc/status_registered_spec.rb index c42c97e5..7c5c994e 100644 --- a/spec/whois/parsers/responses/whois.afilias-grs.info/vc/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.afilias-grs.info/vc/status_registered_spec.rb @@ -54,19 +54,19 @@ describe "#created_on" do it do expect(subject.created_on).to be_a(Time) - expect(subject.created_on).to eq(Time.parse("2005-06-29 00:58:18 UTC")) + expect(subject.created_on).to eq(DateTime.parse("2005-06-29 00:58:18 UTC")) end end describe "#updated_on" do it do expect(subject.updated_on).to be_a(Time) - expect(subject.updated_on).to eq(Time.parse("2021-05-28 09:37:54 UTC")) + expect(subject.updated_on).to eq(DateTime.parse("2021-05-28 09:37:54 UTC")) end end describe "#expires_on" do it do expect(subject.expires_on).to be_a(Time) - expect(subject.expires_on).to eq(Time.parse("2022-06-29 00:58:18 UTC")) + expect(subject.expires_on).to eq(DateTime.parse("2022-06-29 00:58:18 UTC")) end end describe "#registrar" do diff --git a/spec/whois/parsers/responses/whois.afilias.net/info/status_registered_spec.rb b/spec/whois/parsers/responses/whois.afilias.net/info/status_registered_spec.rb index 6e1013ac..f8ea4812 100644 --- a/spec/whois/parsers/responses/whois.afilias.net/info/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.afilias.net/info/status_registered_spec.rb @@ -54,19 +54,19 @@ describe "#created_on" do it do expect(subject.created_on).to be_a(Time) - expect(subject.created_on).to eq(Time.parse("2001-07-31 23:57:50 UTC")) + expect(subject.created_on).to eq(DateTime.parse("2001-07-31 23:57:50 UTC")) end end describe "#updated_on" do it do expect(subject.updated_on).to be_a(Time) - expect(subject.updated_on).to eq(Time.parse("2021-06-29 09:31:10 UTC")) + expect(subject.updated_on).to eq(DateTime.parse("2021-06-29 09:31:10 UTC")) end end describe "#expires_on" do it do expect(subject.expires_on).to be_a(Time) - expect(subject.expires_on).to eq(Time.parse("2022-07-31 23:57:50 UTC")) + expect(subject.expires_on).to eq(DateTime.parse("2022-07-31 23:57:50 UTC")) end end describe "#registrar" do diff --git a/spec/whois/parsers/responses/whois.afilias.net/pro/status_registered_spec.rb b/spec/whois/parsers/responses/whois.afilias.net/pro/status_registered_spec.rb index c59fcffe..e16e0800 100644 --- a/spec/whois/parsers/responses/whois.afilias.net/pro/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.afilias.net/pro/status_registered_spec.rb @@ -54,19 +54,19 @@ describe "#created_on" do it do expect(subject.created_on).to be_a(Time) - expect(subject.created_on).to eq(Time.parse("2008-07-22 00:00:00 UTC")) + expect(subject.created_on).to eq(DateTime.parse("2008-07-22 00:00:00 UTC")) end end describe "#updated_on" do it do expect(subject.updated_on).to be_a(Time) - expect(subject.updated_on).to eq(Time.parse("2021-08-07 09:34:10 UTC")) + expect(subject.updated_on).to eq(DateTime.parse("2021-08-07 09:34:10 UTC")) end end describe "#expires_on" do it do expect(subject.expires_on).to be_a(Time) - expect(subject.expires_on).to eq(Time.parse("2022-09-08 00:00:00 UTC")) + expect(subject.expires_on).to eq(DateTime.parse("2022-09-08 00:00:00 UTC")) end end describe "#registrar" do diff --git a/spec/whois/parsers/responses/whois.amnic.net/am/status_registered_spec.rb b/spec/whois/parsers/responses/whois.amnic.net/am/status_registered_spec.rb index 60146307..c38f13eb 100644 --- a/spec/whois/parsers/responses/whois.amnic.net/am/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.amnic.net/am/status_registered_spec.rb @@ -39,19 +39,19 @@ describe "#created_on" do it do expect(subject.created_on).to be_a(Time) - expect(subject.created_on).to eq(Time.parse("1999-06-05")) + expect(subject.created_on).to eq(DateTime.parse("1999-06-05")) end end describe "#updated_on" do it do expect(subject.updated_on).to be_a(Time) - expect(subject.updated_on).to eq(Time.parse("2014-02-13")) + expect(subject.updated_on).to eq(DateTime.parse("2014-02-13")) end end describe "#expires_on" do it do expect(subject.expires_on).to be_a(Time) - expect(subject.expires_on).to eq(Time.parse("2014-04-15")) + expect(subject.expires_on).to eq(DateTime.parse("2014-04-15")) end end describe "#nameservers" do diff --git a/spec/whois/parsers/responses/whois.ascio.com/status_registered_spec.rb b/spec/whois/parsers/responses/whois.ascio.com/status_registered_spec.rb index 87cf4116..80545599 100644 --- a/spec/whois/parsers/responses/whois.ascio.com/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.ascio.com/status_registered_spec.rb @@ -49,19 +49,19 @@ describe "#created_on" do it do expect(subject.created_on).to be_a(Time) - expect(subject.created_on).to eq(Time.parse("2005-03-01 14:11:50 UTC")) + expect(subject.created_on).to eq(DateTime.parse("2005-03-01 14:11:50 UTC")) end end describe "#updated_on" do it do expect(subject.updated_on).to be_a(Time) - expect(subject.updated_on).to eq(Time.parse("2013-06-02 00:23:21 UTC")) + expect(subject.updated_on).to eq(DateTime.parse("2013-06-02 00:23:21 UTC")) end end describe "#expires_on" do it do expect(subject.expires_on).to be_a(Time) - expect(subject.expires_on).to eq(Time.parse("2014-05-31 00:00:00 UTC")) + expect(subject.expires_on).to eq(DateTime.parse("2014-05-31 00:00:00 UTC")) end end describe "#registrar" do diff --git a/spec/whois/parsers/responses/whois.ati.tn/tn/property_contact_updated_none_spec.rb b/spec/whois/parsers/responses/whois.ati.tn/tn/property_contact_updated_none_spec.rb index 76b71dea..fc03fd56 100644 --- a/spec/whois/parsers/responses/whois.ati.tn/tn/property_contact_updated_none_spec.rb +++ b/spec/whois/parsers/responses/whois.ati.tn/tn/property_contact_updated_none_spec.rb @@ -28,7 +28,7 @@ expect(subject.registrant_contacts[0]).to be_a(Whois::Parser::Contact) expect(subject.registrant_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_REGISTRANT) expect(subject.registrant_contacts[0].name).to eq("MAISON DE BIEN HOTELIERS ET EQ Farhat Riadh") - expect(subject.registrant_contacts[0].created_on).to eq(Time.parse("2013-12-13 20:00:57")) + expect(subject.registrant_contacts[0].created_on).to eq(DateTime.parse("2013-12-13 20:00:57")) expect(subject.registrant_contacts[0].updated_on).to eq(nil) end end diff --git a/spec/whois/parsers/responses/whois.ati.tn/tn/status_registered_spec.rb b/spec/whois/parsers/responses/whois.ati.tn/tn/status_registered_spec.rb index 00c5a311..72489c00 100644 --- a/spec/whois/parsers/responses/whois.ati.tn/tn/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.ati.tn/tn/status_registered_spec.rb @@ -54,7 +54,7 @@ describe "#created_on" do it do expect(subject.created_on).to be_a(Time) - expect(subject.created_on).to eq(Time.parse("2009-05-14 00:00:00")) + expect(subject.created_on).to eq(DateTime.parse("2009-05-14 00:00:00")) end end describe "#updated_on" do @@ -93,8 +93,8 @@ expect(subject.registrant_contacts[0].phone).to eq("+1 925 685 9600") expect(subject.registrant_contacts[0].fax).to eq("+1 925 685 9620") expect(subject.registrant_contacts[0].email).to eq("dns-admin@google.com") - expect(subject.registrant_contacts[0].created_on).to eq(Time.parse("2009-05-14 00:00:00")) - expect(subject.registrant_contacts[0].updated_on).to eq(Time.parse("2010-07-18 00:00:00")) + expect(subject.registrant_contacts[0].created_on).to eq(DateTime.parse("2009-05-14 00:00:00")) + expect(subject.registrant_contacts[0].updated_on).to eq(DateTime.parse("2010-07-18 00:00:00")) end end describe "#admin_contacts" do @@ -115,8 +115,8 @@ expect(subject.admin_contacts[0].phone).to eq("+1 925 685 9600") expect(subject.admin_contacts[0].fax).to eq("+1 925 685 9620") expect(subject.admin_contacts[0].email).to eq("dns-admin@google.com") - expect(subject.admin_contacts[0].created_on).to eq(Time.parse("2009-05-14 00:00:00")) - expect(subject.admin_contacts[0].updated_on).to eq(Time.parse("2010-07-18 00:00:00")) + expect(subject.admin_contacts[0].created_on).to eq(DateTime.parse("2009-05-14 00:00:00")) + expect(subject.admin_contacts[0].updated_on).to eq(DateTime.parse("2010-07-18 00:00:00")) end end describe "#technical_contacts" do @@ -137,8 +137,8 @@ expect(subject.technical_contacts[0].phone).to eq("+1 925 685 9600") expect(subject.technical_contacts[0].fax).to eq("+1 925 685 9620") expect(subject.technical_contacts[0].email).to eq("dns-admin@google.com") - expect(subject.technical_contacts[0].created_on).to eq(Time.parse("2009-05-14 00:00:00")) - expect(subject.technical_contacts[0].updated_on).to eq(Time.parse("2010-07-18 00:00:00")) + expect(subject.technical_contacts[0].created_on).to eq(DateTime.parse("2009-05-14 00:00:00")) + expect(subject.technical_contacts[0].updated_on).to eq(DateTime.parse("2010-07-18 00:00:00")) end end describe "#nameservers" do diff --git a/spec/whois/parsers/responses/whois.audns.net.au/au/status_registered_spec.rb b/spec/whois/parsers/responses/whois.audns.net.au/au/status_registered_spec.rb index 2cb76555..7700a279 100644 --- a/spec/whois/parsers/responses/whois.audns.net.au/au/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.audns.net.au/au/status_registered_spec.rb @@ -59,7 +59,7 @@ describe "#updated_on" do it do expect(subject.updated_on).to be_a(Time) - expect(subject.updated_on).to eq(Time.parse("2014-11-05 10:35:59 UTC")) + expect(subject.updated_on).to eq(DateTime.parse("2014-11-05 10:35:59 UTC")) end end describe "#expires_on" do diff --git a/spec/whois/parsers/responses/whois.ax/ax/status_registered_spec.rb b/spec/whois/parsers/responses/whois.ax/ax/status_registered_spec.rb index e3c1fa00..ade180dc 100644 --- a/spec/whois/parsers/responses/whois.ax/ax/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.ax/ax/status_registered_spec.rb @@ -39,7 +39,7 @@ describe "#created_on" do it do expect(subject.created_on).to be_a(Time) - expect(subject.created_on).to eq(Time.parse("2006-08-03")) + expect(subject.created_on).to eq(DateTime.parse("2006-08-03")) end end describe "#updated_on" do diff --git a/spec/whois/parsers/responses/whois.biz/biz/status_registered_spec.rb b/spec/whois/parsers/responses/whois.biz/biz/status_registered_spec.rb index c76dab6f..6ed3243a 100644 --- a/spec/whois/parsers/responses/whois.biz/biz/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.biz/biz/status_registered_spec.rb @@ -49,19 +49,19 @@ describe "#created_on" do it do expect(subject.created_on).to be_a(Time) - expect(subject.created_on).to eq(Time.parse("2002-03-27T16:03:44Z")) + expect(subject.created_on).to eq(DateTime.parse("2002-03-27T16:03:44Z")) end end describe "#updated_on" do it do expect(subject.updated_on).to be_a(Time) - expect(subject.updated_on).to eq(Time.parse("2017-02-22T10:27:42Z")) + expect(subject.updated_on).to eq(DateTime.parse("2017-02-22T10:27:42Z")) end end describe "#expires_on" do it do expect(subject.expires_on).to be_a(Time) - expect(subject.expires_on).to eq(Time.parse("2018-03-26T23:59:59Z")) + expect(subject.expires_on).to eq(DateTime.parse("2018-03-26T23:59:59Z")) end end describe "#registrar" do diff --git a/spec/whois/parsers/responses/whois.bnnic.bn/bn/status_registered_spec.rb b/spec/whois/parsers/responses/whois.bnnic.bn/bn/status_registered_spec.rb index b46bd650..0533e122 100644 --- a/spec/whois/parsers/responses/whois.bnnic.bn/bn/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.bnnic.bn/bn/status_registered_spec.rb @@ -39,19 +39,19 @@ describe "#created_on" do it do expect(subject.created_on).to be_a(Time) - expect(subject.created_on).to eq(Time.parse("2014-10-07 00:00:00")) + expect(subject.created_on).to eq(DateTime.parse("2014-10-07 00:00:00")) end end describe "#updated_on" do it do expect(subject.updated_on).to be_a(Time) - expect(subject.updated_on).to eq(Time.parse("2014-12-17 18:07:42")) + expect(subject.updated_on).to eq(DateTime.parse("2014-12-17 18:07:42")) end end describe "#expires_on" do it do expect(subject.expires_on).to be_a(Time) - expect(subject.expires_on).to eq(Time.parse("2015-10-07 00:00:00")) + expect(subject.expires_on).to eq(DateTime.parse("2015-10-07 00:00:00")) end end describe "#nameservers" do diff --git a/spec/whois/parsers/responses/whois.cat/cat/status_registered_spec.rb b/spec/whois/parsers/responses/whois.cat/cat/status_registered_spec.rb index 02f43f71..8b101578 100644 --- a/spec/whois/parsers/responses/whois.cat/cat/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.cat/cat/status_registered_spec.rb @@ -39,19 +39,19 @@ describe "#created_on" do it do expect(subject.created_on).to be_a(Time) - expect(subject.created_on).to eq(Time.parse("2006-02-14 09:12:37 GMT")) + expect(subject.created_on).to eq(DateTime.parse("2006-02-14 09:12:37 GMT")) end end describe "#updated_on" do it do expect(subject.updated_on).to be_a(Time) - expect(subject.updated_on).to eq(Time.parse("2013-11-27 17:30:59 GMT")) + expect(subject.updated_on).to eq(DateTime.parse("2013-11-27 17:30:59 GMT")) end end describe "#expires_on" do it do expect(subject.expires_on).to be_a(Time) - expect(subject.expires_on).to eq(Time.parse("2020-02-14 09:12:37 GMT")) + expect(subject.expires_on).to eq(DateTime.parse("2020-02-14 09:12:37 GMT")) end end describe "#nameservers" do diff --git a/spec/whois/parsers/responses/whois.cctld.by/by/status_registered_spec.rb b/spec/whois/parsers/responses/whois.cctld.by/by/status_registered_spec.rb index 7d0387b3..77d4650e 100644 --- a/spec/whois/parsers/responses/whois.cctld.by/by/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.cctld.by/by/status_registered_spec.rb @@ -54,19 +54,19 @@ describe "#created_on" do it do expect(subject.created_on).to be_a(Time) - expect(subject.created_on).to eq(Time.parse("2003-02-02")) + expect(subject.created_on).to eq(DateTime.parse("2003-02-02")) end end describe "#updated_on" do it do expect(subject.updated_on).to be_a(Time) - expect(subject.updated_on).to eq(Time.parse("2013-12-16")) + expect(subject.updated_on).to eq(DateTime.parse("2013-12-16")) end end describe "#expires_on" do it do expect(subject.expires_on).to be_a(Time) - expect(subject.expires_on).to eq(Time.parse("2014-12-21")) + expect(subject.expires_on).to eq(DateTime.parse("2014-12-21")) end end describe "#registrar" do diff --git a/spec/whois/parsers/responses/whois.cctld.uz/uz/status_registered_spec.rb b/spec/whois/parsers/responses/whois.cctld.uz/uz/status_registered_spec.rb index 0224f2e9..c8fb04e8 100644 --- a/spec/whois/parsers/responses/whois.cctld.uz/uz/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.cctld.uz/uz/status_registered_spec.rb @@ -39,19 +39,19 @@ describe "#created_on" do it do expect(subject.created_on).to be_a(Time) - expect(subject.created_on).to eq(Time.parse("2006-04-13")) + expect(subject.created_on).to eq(DateTime.parse("2006-04-13")) end end describe "#updated_on" do it do expect(subject.updated_on).to be_a(Time) - expect(subject.updated_on).to eq(Time.parse("2010-03-26")) + expect(subject.updated_on).to eq(DateTime.parse("2010-03-26")) end end describe "#expires_on" do it do expect(subject.expires_on).to be_a(Time) - expect(subject.expires_on).to eq(Time.parse("2011-05-01")) + expect(subject.expires_on).to eq(DateTime.parse("2011-05-01")) end end describe "#nameservers" do diff --git a/spec/whois/parsers/responses/whois.cdmon.com/com/status_registered_spec.rb b/spec/whois/parsers/responses/whois.cdmon.com/com/status_registered_spec.rb index c3b92183..b61e0605 100644 --- a/spec/whois/parsers/responses/whois.cdmon.com/com/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.cdmon.com/com/status_registered_spec.rb @@ -39,19 +39,19 @@ describe "#created_on" do it do expect(subject.created_on).to be_a(Time) - expect(subject.created_on).to eq(Time.parse("2001-08-12T15:02:57Z")) + expect(subject.created_on).to eq(DateTime.parse("2001-08-12T15:02:57Z")) end end describe "#updated_on" do it do expect(subject.updated_on).to be_a(Time) - expect(subject.updated_on).to eq(Time.parse("2009-12-16T11:40:44Z")) + expect(subject.updated_on).to eq(DateTime.parse("2009-12-16T11:40:44Z")) end end describe "#expires_on" do it do expect(subject.expires_on).to be_a(Time) - expect(subject.expires_on).to eq(Time.parse("2024-08-12T15:02:53Z")) + expect(subject.expires_on).to eq(DateTime.parse("2024-08-12T15:02:53Z")) end end describe "#registrar" do diff --git a/spec/whois/parsers/responses/whois.centralnic.com/ae.org/status_registered_spec.rb b/spec/whois/parsers/responses/whois.centralnic.com/ae.org/status_registered_spec.rb index c2e3880e..90876b7e 100644 --- a/spec/whois/parsers/responses/whois.centralnic.com/ae.org/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.centralnic.com/ae.org/status_registered_spec.rb @@ -54,19 +54,19 @@ describe "#created_on" do it do expect(subject.created_on).to be_a(Time) - expect(subject.created_on).to eq(Time.parse("2012-08-03 15:37:33 UTC")) + expect(subject.created_on).to eq(DateTime.parse("2012-08-03 15:37:33 UTC")) end end describe "#updated_on" do it do expect(subject.updated_on).to be_a(Time) - expect(subject.updated_on).to eq(Time.parse("2013-06-09 00:12:37 UTC")) + expect(subject.updated_on).to eq(DateTime.parse("2013-06-09 00:12:37 UTC")) end end describe "#expires_on" do it do expect(subject.expires_on).to be_a(Time) - expect(subject.expires_on).to eq(Time.parse("2014-08-03 23:59:59 UTC")) + expect(subject.expires_on).to eq(DateTime.parse("2014-08-03 23:59:59 UTC")) end end describe "#registrar" do diff --git a/spec/whois/parsers/responses/whois.centralnic.com/ar.com/status_registered_spec.rb b/spec/whois/parsers/responses/whois.centralnic.com/ar.com/status_registered_spec.rb index cff3b509..dcbe102f 100644 --- a/spec/whois/parsers/responses/whois.centralnic.com/ar.com/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.centralnic.com/ar.com/status_registered_spec.rb @@ -54,19 +54,19 @@ describe "#created_on" do it do expect(subject.created_on).to be_a(Time) - expect(subject.created_on).to eq(Time.parse("2008-04-25 16:22:13 UTC")) + expect(subject.created_on).to eq(DateTime.parse("2008-04-25 16:22:13 UTC")) end end describe "#updated_on" do it do expect(subject.updated_on).to be_a(Time) - expect(subject.updated_on).to eq(Time.parse("2013-04-26 00:15:40 UTC")) + expect(subject.updated_on).to eq(DateTime.parse("2013-04-26 00:15:40 UTC")) end end describe "#expires_on" do it do expect(subject.expires_on).to be_a(Time) - expect(subject.expires_on).to eq(Time.parse("2014-04-25 23:59:59 UTC")) + expect(subject.expires_on).to eq(DateTime.parse("2014-04-25 23:59:59 UTC")) end end describe "#registrar" do diff --git a/spec/whois/parsers/responses/whois.centralnic.com/br.com/status_registered_spec.rb b/spec/whois/parsers/responses/whois.centralnic.com/br.com/status_registered_spec.rb index c915470c..b67ca11b 100644 --- a/spec/whois/parsers/responses/whois.centralnic.com/br.com/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.centralnic.com/br.com/status_registered_spec.rb @@ -54,19 +54,19 @@ describe "#created_on" do it do expect(subject.created_on).to be_a(Time) - expect(subject.created_on).to eq(Time.parse("2009-04-17 12:22:49 UTC")) + expect(subject.created_on).to eq(DateTime.parse("2009-04-17 12:22:49 UTC")) end end describe "#updated_on" do it do expect(subject.updated_on).to be_a(Time) - expect(subject.updated_on).to eq(Time.parse("2012-01-16 16:23:18 UTC")) + expect(subject.updated_on).to eq(DateTime.parse("2012-01-16 16:23:18 UTC")) end end describe "#expires_on" do it do expect(subject.expires_on).to be_a(Time) - expect(subject.expires_on).to eq(Time.parse("2017-04-17 23:59:59 UTC")) + expect(subject.expires_on).to eq(DateTime.parse("2017-04-17 23:59:59 UTC")) end end describe "#registrar" do diff --git a/spec/whois/parsers/responses/whois.centralnic.com/cn.com/status_registered_spec.rb b/spec/whois/parsers/responses/whois.centralnic.com/cn.com/status_registered_spec.rb index 13ddf41a..369dbb56 100644 --- a/spec/whois/parsers/responses/whois.centralnic.com/cn.com/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.centralnic.com/cn.com/status_registered_spec.rb @@ -54,19 +54,19 @@ describe "#created_on" do it do expect(subject.created_on).to be_a(Time) - expect(subject.created_on).to eq(Time.parse("2005-11-23 15:44:03 UTC")) + expect(subject.created_on).to eq(DateTime.parse("2005-11-23 15:44:03 UTC")) end end describe "#updated_on" do it do expect(subject.updated_on).to be_a(Time) - expect(subject.updated_on).to eq(Time.parse("2013-11-26 12:16:45 UTC")) + expect(subject.updated_on).to eq(DateTime.parse("2013-11-26 12:16:45 UTC")) end end describe "#expires_on" do it do expect(subject.expires_on).to be_a(Time) - expect(subject.expires_on).to eq(Time.parse("2014-11-23 23:59:59 UTC")) + expect(subject.expires_on).to eq(DateTime.parse("2014-11-23 23:59:59 UTC")) end end describe "#registrar" do diff --git a/spec/whois/parsers/responses/whois.centralnic.com/de.com/status_registered_spec.rb b/spec/whois/parsers/responses/whois.centralnic.com/de.com/status_registered_spec.rb index 16e962ac..2c90e2bc 100644 --- a/spec/whois/parsers/responses/whois.centralnic.com/de.com/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.centralnic.com/de.com/status_registered_spec.rb @@ -54,19 +54,19 @@ describe "#created_on" do it do expect(subject.created_on).to be_a(Time) - expect(subject.created_on).to eq(Time.parse("2008-07-04 20:30:08 UTC")) + expect(subject.created_on).to eq(DateTime.parse("2008-07-04 20:30:08 UTC")) end end describe "#updated_on" do it do expect(subject.updated_on).to be_a(Time) - expect(subject.updated_on).to eq(Time.parse("2013-07-12 10:03:56 UTC")) + expect(subject.updated_on).to eq(DateTime.parse("2013-07-12 10:03:56 UTC")) end end describe "#expires_on" do it do expect(subject.expires_on).to be_a(Time) - expect(subject.expires_on).to eq(Time.parse("2014-07-04 23:59:59 UTC")) + expect(subject.expires_on).to eq(DateTime.parse("2014-07-04 23:59:59 UTC")) end end describe "#registrar" do diff --git a/spec/whois/parsers/responses/whois.centralnic.com/eu.com/status_registered_spec.rb b/spec/whois/parsers/responses/whois.centralnic.com/eu.com/status_registered_spec.rb index a667985e..8336c698 100644 --- a/spec/whois/parsers/responses/whois.centralnic.com/eu.com/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.centralnic.com/eu.com/status_registered_spec.rb @@ -54,19 +54,19 @@ describe "#created_on" do it do expect(subject.created_on).to be_a(Time) - expect(subject.created_on).to eq(Time.parse("2001-08-14 10:14:41 UTC")) + expect(subject.created_on).to eq(DateTime.parse("2001-08-14 10:14:41 UTC")) end end describe "#updated_on" do it do expect(subject.updated_on).to be_a(Time) - expect(subject.updated_on).to eq(Time.parse("2013-08-15 11:25:43 UTC")) + expect(subject.updated_on).to eq(DateTime.parse("2013-08-15 11:25:43 UTC")) end end describe "#expires_on" do it do expect(subject.expires_on).to be_a(Time) - expect(subject.expires_on).to eq(Time.parse("2015-08-14 23:59:59 UTC")) + expect(subject.expires_on).to eq(DateTime.parse("2015-08-14 23:59:59 UTC")) end end describe "#registrar" do diff --git a/spec/whois/parsers/responses/whois.centralnic.com/gb.com/status_registered_spec.rb b/spec/whois/parsers/responses/whois.centralnic.com/gb.com/status_registered_spec.rb index baae63e5..12fd609e 100644 --- a/spec/whois/parsers/responses/whois.centralnic.com/gb.com/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.centralnic.com/gb.com/status_registered_spec.rb @@ -54,19 +54,19 @@ describe "#created_on" do it do expect(subject.created_on).to be_a(Time) - expect(subject.created_on).to eq(Time.parse("2006-04-23 06:26:11 UTC")) + expect(subject.created_on).to eq(DateTime.parse("2006-04-23 06:26:11 UTC")) end end describe "#updated_on" do it do expect(subject.updated_on).to be_a(Time) - expect(subject.updated_on).to eq(Time.parse("2014-02-12 09:45:17 UTC")) + expect(subject.updated_on).to eq(DateTime.parse("2014-02-12 09:45:17 UTC")) end end describe "#expires_on" do it do expect(subject.expires_on).to be_a(Time) - expect(subject.expires_on).to eq(Time.parse("2016-04-23 23:59:59 UTC")) + expect(subject.expires_on).to eq(DateTime.parse("2016-04-23 23:59:59 UTC")) end end describe "#registrar" do diff --git a/spec/whois/parsers/responses/whois.centralnic.com/gb.net/status_registered_spec.rb b/spec/whois/parsers/responses/whois.centralnic.com/gb.net/status_registered_spec.rb index 771b75d1..039f45fe 100644 --- a/spec/whois/parsers/responses/whois.centralnic.com/gb.net/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.centralnic.com/gb.net/status_registered_spec.rb @@ -54,19 +54,19 @@ describe "#created_on" do it do expect(subject.created_on).to be_a(Time) - expect(subject.created_on).to eq(Time.parse("2013-08-25 12:36:24 UTC")) + expect(subject.created_on).to eq(DateTime.parse("2013-08-25 12:36:24 UTC")) end end describe "#updated_on" do it do expect(subject.updated_on).to be_a(Time) - expect(subject.updated_on).to eq(Time.parse("2013-08-30 12:42:09 UTC")) + expect(subject.updated_on).to eq(DateTime.parse("2013-08-30 12:42:09 UTC")) end end describe "#expires_on" do it do expect(subject.expires_on).to be_a(Time) - expect(subject.expires_on).to eq(Time.parse("2014-08-25 23:59:59 UTC")) + expect(subject.expires_on).to eq(DateTime.parse("2014-08-25 23:59:59 UTC")) end end describe "#registrar" do diff --git a/spec/whois/parsers/responses/whois.centralnic.com/gr.com/status_registered_spec.rb b/spec/whois/parsers/responses/whois.centralnic.com/gr.com/status_registered_spec.rb index fd43ab7b..e820eb03 100644 --- a/spec/whois/parsers/responses/whois.centralnic.com/gr.com/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.centralnic.com/gr.com/status_registered_spec.rb @@ -54,19 +54,19 @@ describe "#created_on" do it do expect(subject.created_on).to be_a(Time) - expect(subject.created_on).to eq(Time.parse("2011-02-07 13:10:14 UTC")) + expect(subject.created_on).to eq(DateTime.parse("2011-02-07 13:10:14 UTC")) end end describe "#updated_on" do it do expect(subject.updated_on).to be_a(Time) - expect(subject.updated_on).to eq(Time.parse("2012-06-23 10:38:02 UTC")) + expect(subject.updated_on).to eq(DateTime.parse("2012-06-23 10:38:02 UTC")) end end describe "#expires_on" do it do expect(subject.expires_on).to be_a(Time) - expect(subject.expires_on).to eq(Time.parse("2015-02-07 23:59:59 UTC")) + expect(subject.expires_on).to eq(DateTime.parse("2015-02-07 23:59:59 UTC")) end end describe "#registrar" do diff --git a/spec/whois/parsers/responses/whois.centralnic.com/hu.com/status_registered_spec.rb b/spec/whois/parsers/responses/whois.centralnic.com/hu.com/status_registered_spec.rb index 21fda963..edfa1805 100644 --- a/spec/whois/parsers/responses/whois.centralnic.com/hu.com/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.centralnic.com/hu.com/status_registered_spec.rb @@ -54,19 +54,19 @@ describe "#created_on" do it do expect(subject.created_on).to be_a(Time) - expect(subject.created_on).to eq(Time.parse("2012-11-28 17:46:03 UTC")) + expect(subject.created_on).to eq(DateTime.parse("2012-11-28 17:46:03 UTC")) end end describe "#updated_on" do it do expect(subject.updated_on).to be_a(Time) - expect(subject.updated_on).to eq(Time.parse("2014-02-11 00:16:13 UTC")) + expect(subject.updated_on).to eq(DateTime.parse("2014-02-11 00:16:13 UTC")) end end describe "#expires_on" do it do expect(subject.expires_on).to be_a(Time) - expect(subject.expires_on).to eq(Time.parse("2013-11-28 23:59:59 UTC")) + expect(subject.expires_on).to eq(DateTime.parse("2013-11-28 23:59:59 UTC")) end end describe "#registrar" do diff --git a/spec/whois/parsers/responses/whois.centralnic.com/jp.net/status_registered_spec.rb b/spec/whois/parsers/responses/whois.centralnic.com/jp.net/status_registered_spec.rb index 3b1b4b29..fcb9dc06 100644 --- a/spec/whois/parsers/responses/whois.centralnic.com/jp.net/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.centralnic.com/jp.net/status_registered_spec.rb @@ -54,19 +54,19 @@ describe "#created_on" do it do expect(subject.created_on).to be_a(Time) - expect(subject.created_on).to eq(Time.parse("2012-03-16 11:47:23 UTC")) + expect(subject.created_on).to eq(DateTime.parse("2012-03-16 11:47:23 UTC")) end end describe "#updated_on" do it do expect(subject.updated_on).to be_a(Time) - expect(subject.updated_on).to eq(Time.parse("2013-01-24 16:57:19 UTC")) + expect(subject.updated_on).to eq(DateTime.parse("2013-01-24 16:57:19 UTC")) end end describe "#expires_on" do it do expect(subject.expires_on).to be_a(Time) - expect(subject.expires_on).to eq(Time.parse("2018-03-16 23:59:59 UTC")) + expect(subject.expires_on).to eq(DateTime.parse("2018-03-16 23:59:59 UTC")) end end describe "#registrar" do diff --git a/spec/whois/parsers/responses/whois.centralnic.com/jpn.com/status_registered_spec.rb b/spec/whois/parsers/responses/whois.centralnic.com/jpn.com/status_registered_spec.rb index 91759625..f6585413 100644 --- a/spec/whois/parsers/responses/whois.centralnic.com/jpn.com/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.centralnic.com/jpn.com/status_registered_spec.rb @@ -54,19 +54,19 @@ describe "#created_on" do it do expect(subject.created_on).to be_a(Time) - expect(subject.created_on).to eq(Time.parse("2007-06-29 13:42:35 UTC")) + expect(subject.created_on).to eq(DateTime.parse("2007-06-29 13:42:35 UTC")) end end describe "#updated_on" do it do expect(subject.updated_on).to be_a(Time) - expect(subject.updated_on).to eq(Time.parse("2013-07-01 00:18:14 UTC")) + expect(subject.updated_on).to eq(DateTime.parse("2013-07-01 00:18:14 UTC")) end end describe "#expires_on" do it do expect(subject.expires_on).to be_a(Time) - expect(subject.expires_on).to eq(Time.parse("2015-06-29 23:59:59 UTC")) + expect(subject.expires_on).to eq(DateTime.parse("2015-06-29 23:59:59 UTC")) end end describe "#registrar" do diff --git a/spec/whois/parsers/responses/whois.centralnic.com/kr.com/status_registered_spec.rb b/spec/whois/parsers/responses/whois.centralnic.com/kr.com/status_registered_spec.rb index c0fc25e1..c2d55e5d 100644 --- a/spec/whois/parsers/responses/whois.centralnic.com/kr.com/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.centralnic.com/kr.com/status_registered_spec.rb @@ -54,19 +54,19 @@ describe "#created_on" do it do expect(subject.created_on).to be_a(Time) - expect(subject.created_on).to eq(Time.parse("2008-06-11 21:25:43 UTC")) + expect(subject.created_on).to eq(DateTime.parse("2008-06-11 21:25:43 UTC")) end end describe "#updated_on" do it do expect(subject.updated_on).to be_a(Time) - expect(subject.updated_on).to eq(Time.parse("2012-01-16 16:25:41 UTC")) + expect(subject.updated_on).to eq(DateTime.parse("2012-01-16 16:25:41 UTC")) end end describe "#expires_on" do it do expect(subject.expires_on).to be_a(Time) - expect(subject.expires_on).to eq(Time.parse("2014-06-11 23:59:59 UTC")) + expect(subject.expires_on).to eq(DateTime.parse("2014-06-11 23:59:59 UTC")) end end describe "#registrar" do diff --git a/spec/whois/parsers/responses/whois.centralnic.com/qc.com/status_registered_spec.rb b/spec/whois/parsers/responses/whois.centralnic.com/qc.com/status_registered_spec.rb index 93c7477b..7fd3e1cc 100644 --- a/spec/whois/parsers/responses/whois.centralnic.com/qc.com/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.centralnic.com/qc.com/status_registered_spec.rb @@ -54,19 +54,19 @@ describe "#created_on" do it do expect(subject.created_on).to be_a(Time) - expect(subject.created_on).to eq(Time.parse("2004-10-08 02:12:49 UTC")) + expect(subject.created_on).to eq(DateTime.parse("2004-10-08 02:12:49 UTC")) end end describe "#updated_on" do it do expect(subject.updated_on).to be_a(Time) - expect(subject.updated_on).to eq(Time.parse("2012-11-23 18:03:55 UTC")) + expect(subject.updated_on).to eq(DateTime.parse("2012-11-23 18:03:55 UTC")) end end describe "#expires_on" do it do expect(subject.expires_on).to be_a(Time) - expect(subject.expires_on).to eq(Time.parse("2014-10-08 23:59:59 UTC")) + expect(subject.expires_on).to eq(DateTime.parse("2014-10-08 23:59:59 UTC")) end end describe "#registrar" do diff --git a/spec/whois/parsers/responses/whois.centralnic.com/ru.com/status_registered_spec.rb b/spec/whois/parsers/responses/whois.centralnic.com/ru.com/status_registered_spec.rb index c5672479..8ff9d1bc 100644 --- a/spec/whois/parsers/responses/whois.centralnic.com/ru.com/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.centralnic.com/ru.com/status_registered_spec.rb @@ -54,19 +54,19 @@ describe "#created_on" do it do expect(subject.created_on).to be_a(Time) - expect(subject.created_on).to eq(Time.parse("2006-07-31 10:06:04 UTC")) + expect(subject.created_on).to eq(DateTime.parse("2006-07-31 10:06:04 UTC")) end end describe "#updated_on" do it do expect(subject.updated_on).to be_a(Time) - expect(subject.updated_on).to eq(Time.parse("2012-07-10 08:16:19 UTC")) + expect(subject.updated_on).to eq(DateTime.parse("2012-07-10 08:16:19 UTC")) end end describe "#expires_on" do it do expect(subject.expires_on).to be_a(Time) - expect(subject.expires_on).to eq(Time.parse("2014-07-31 23:59:59 UTC")) + expect(subject.expires_on).to eq(DateTime.parse("2014-07-31 23:59:59 UTC")) end end describe "#registrar" do diff --git a/spec/whois/parsers/responses/whois.centralnic.com/sa.com/status_registered_spec.rb b/spec/whois/parsers/responses/whois.centralnic.com/sa.com/status_registered_spec.rb index 977332b7..4521d60e 100644 --- a/spec/whois/parsers/responses/whois.centralnic.com/sa.com/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.centralnic.com/sa.com/status_registered_spec.rb @@ -54,19 +54,19 @@ describe "#created_on" do it do expect(subject.created_on).to be_a(Time) - expect(subject.created_on).to eq(Time.parse("2007-09-27 18:14:53 UTC")) + expect(subject.created_on).to eq(DateTime.parse("2007-09-27 18:14:53 UTC")) end end describe "#updated_on" do it do expect(subject.updated_on).to be_a(Time) - expect(subject.updated_on).to eq(Time.parse("2013-11-02 13:42:11 UTC")) + expect(subject.updated_on).to eq(DateTime.parse("2013-11-02 13:42:11 UTC")) end end describe "#expires_on" do it do expect(subject.expires_on).to be_a(Time) - expect(subject.expires_on).to eq(Time.parse("2014-09-27 23:59:59 UTC")) + expect(subject.expires_on).to eq(DateTime.parse("2014-09-27 23:59:59 UTC")) end end describe "#registrar" do diff --git a/spec/whois/parsers/responses/whois.centralnic.com/se.com/status_registered_spec.rb b/spec/whois/parsers/responses/whois.centralnic.com/se.com/status_registered_spec.rb index 3917dbea..4d6dc2e4 100644 --- a/spec/whois/parsers/responses/whois.centralnic.com/se.com/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.centralnic.com/se.com/status_registered_spec.rb @@ -54,19 +54,19 @@ describe "#created_on" do it do expect(subject.created_on).to be_a(Time) - expect(subject.created_on).to eq(Time.parse("2008-05-10 05:17:32 UTC")) + expect(subject.created_on).to eq(DateTime.parse("2008-05-10 05:17:32 UTC")) end end describe "#updated_on" do it do expect(subject.updated_on).to be_a(Time) - expect(subject.updated_on).to eq(Time.parse("2013-06-03 10:33:46 UTC")) + expect(subject.updated_on).to eq(DateTime.parse("2013-06-03 10:33:46 UTC")) end end describe "#expires_on" do it do expect(subject.expires_on).to be_a(Time) - expect(subject.expires_on).to eq(Time.parse("2014-05-10 23:59:59 UTC")) + expect(subject.expires_on).to eq(DateTime.parse("2014-05-10 23:59:59 UTC")) end end describe "#registrar" do diff --git a/spec/whois/parsers/responses/whois.centralnic.com/se.net/status_registered_spec.rb b/spec/whois/parsers/responses/whois.centralnic.com/se.net/status_registered_spec.rb index 5b17cbf6..3e5c1330 100644 --- a/spec/whois/parsers/responses/whois.centralnic.com/se.net/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.centralnic.com/se.net/status_registered_spec.rb @@ -54,19 +54,19 @@ describe "#created_on" do it do expect(subject.created_on).to be_a(Time) - expect(subject.created_on).to eq(Time.parse("2013-11-13 10:35:03 UTC")) + expect(subject.created_on).to eq(DateTime.parse("2013-11-13 10:35:03 UTC")) end end describe "#updated_on" do it do expect(subject.updated_on).to be_a(Time) - expect(subject.updated_on).to eq(Time.parse("2013-11-28 11:49:39 UTC")) + expect(subject.updated_on).to eq(DateTime.parse("2013-11-28 11:49:39 UTC")) end end describe "#expires_on" do it do expect(subject.expires_on).to be_a(Time) - expect(subject.expires_on).to eq(Time.parse("2014-11-13 23:59:59 UTC")) + expect(subject.expires_on).to eq(DateTime.parse("2014-11-13 23:59:59 UTC")) end end describe "#registrar" do diff --git a/spec/whois/parsers/responses/whois.centralnic.com/uk.com/status_registered_spec.rb b/spec/whois/parsers/responses/whois.centralnic.com/uk.com/status_registered_spec.rb index 459b4744..4b5fabca 100644 --- a/spec/whois/parsers/responses/whois.centralnic.com/uk.com/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.centralnic.com/uk.com/status_registered_spec.rb @@ -54,19 +54,19 @@ describe "#created_on" do it do expect(subject.created_on).to be_a(Time) - expect(subject.created_on).to eq(Time.parse("2001-08-31 11:50:57 UTC")) + expect(subject.created_on).to eq(DateTime.parse("2001-08-31 11:50:57 UTC")) end end describe "#updated_on" do it do expect(subject.updated_on).to be_a(Time) - expect(subject.updated_on).to eq(Time.parse("2013-09-03 10:36:47 UTC")) + expect(subject.updated_on).to eq(DateTime.parse("2013-09-03 10:36:47 UTC")) end end describe "#expires_on" do it do expect(subject.expires_on).to be_a(Time) - expect(subject.expires_on).to eq(Time.parse("2015-08-31 23:59:59 UTC")) + expect(subject.expires_on).to eq(DateTime.parse("2015-08-31 23:59:59 UTC")) end end describe "#registrar" do diff --git a/spec/whois/parsers/responses/whois.centralnic.com/uk.net/status_registered_spec.rb b/spec/whois/parsers/responses/whois.centralnic.com/uk.net/status_registered_spec.rb index abeb5546..d21e6c1d 100644 --- a/spec/whois/parsers/responses/whois.centralnic.com/uk.net/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.centralnic.com/uk.net/status_registered_spec.rb @@ -54,19 +54,19 @@ describe "#created_on" do it do expect(subject.created_on).to be_a(Time) - expect(subject.created_on).to eq(Time.parse("2006-02-28 12:17:01 UTC")) + expect(subject.created_on).to eq(DateTime.parse("2006-02-28 12:17:01 UTC")) end end describe "#updated_on" do it do expect(subject.updated_on).to be_a(Time) - expect(subject.updated_on).to eq(Time.parse("2013-04-03 12:59:45 UTC")) + expect(subject.updated_on).to eq(DateTime.parse("2013-04-03 12:59:45 UTC")) end end describe "#expires_on" do it do expect(subject.expires_on).to be_a(Time) - expect(subject.expires_on).to eq(Time.parse("2014-02-28 23:59:59 UTC")) + expect(subject.expires_on).to eq(DateTime.parse("2014-02-28 23:59:59 UTC")) end end describe "#registrar" do diff --git a/spec/whois/parsers/responses/whois.centralnic.com/us.com/status_registered_spec.rb b/spec/whois/parsers/responses/whois.centralnic.com/us.com/status_registered_spec.rb index 9ecca008..1e9c716e 100644 --- a/spec/whois/parsers/responses/whois.centralnic.com/us.com/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.centralnic.com/us.com/status_registered_spec.rb @@ -54,19 +54,19 @@ describe "#created_on" do it do expect(subject.created_on).to be_a(Time) - expect(subject.created_on).to eq(Time.parse("2003-10-20 10:03:28 UTC")) + expect(subject.created_on).to eq(DateTime.parse("2003-10-20 10:03:28 UTC")) end end describe "#updated_on" do it do expect(subject.updated_on).to be_a(Time) - expect(subject.updated_on).to eq(Time.parse("2012-01-16 16:27:26 UTC")) + expect(subject.updated_on).to eq(DateTime.parse("2012-01-16 16:27:26 UTC")) end end describe "#expires_on" do it do expect(subject.expires_on).to be_a(Time) - expect(subject.expires_on).to eq(Time.parse("2014-10-20 23:59:59 UTC")) + expect(subject.expires_on).to eq(DateTime.parse("2014-10-20 23:59:59 UTC")) end end describe "#registrar" do diff --git a/spec/whois/parsers/responses/whois.centralnic.com/uy.com/status_registered_spec.rb b/spec/whois/parsers/responses/whois.centralnic.com/uy.com/status_registered_spec.rb index 44506767..7d7a4ce7 100644 --- a/spec/whois/parsers/responses/whois.centralnic.com/uy.com/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.centralnic.com/uy.com/status_registered_spec.rb @@ -54,19 +54,19 @@ describe "#created_on" do it do expect(subject.created_on).to be_a(Time) - expect(subject.created_on).to eq(Time.parse("2007-07-12 13:49:25 UTC")) + expect(subject.created_on).to eq(DateTime.parse("2007-07-12 13:49:25 UTC")) end end describe "#updated_on" do it do expect(subject.updated_on).to be_a(Time) - expect(subject.updated_on).to eq(Time.parse("2013-07-10 00:27:20 UTC")) + expect(subject.updated_on).to eq(DateTime.parse("2013-07-10 00:27:20 UTC")) end end describe "#expires_on" do it do expect(subject.expires_on).to be_a(Time) - expect(subject.expires_on).to eq(Time.parse("2015-07-12 23:59:59 UTC")) + expect(subject.expires_on).to eq(DateTime.parse("2015-07-12 23:59:59 UTC")) end end describe "#registrar" do diff --git a/spec/whois/parsers/responses/whois.centralnic.com/za.com/status_registered_spec.rb b/spec/whois/parsers/responses/whois.centralnic.com/za.com/status_registered_spec.rb index fb50551c..92e09c60 100644 --- a/spec/whois/parsers/responses/whois.centralnic.com/za.com/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.centralnic.com/za.com/status_registered_spec.rb @@ -54,19 +54,19 @@ describe "#created_on" do it do expect(subject.created_on).to be_a(Time) - expect(subject.created_on).to eq(Time.parse("2004-11-17 11:47:29 UTC")) + expect(subject.created_on).to eq(DateTime.parse("2004-11-17 11:47:29 UTC")) end end describe "#updated_on" do it do expect(subject.updated_on).to be_a(Time) - expect(subject.updated_on).to eq(Time.parse("2013-12-03 12:33:13 UTC")) + expect(subject.updated_on).to eq(DateTime.parse("2013-12-03 12:33:13 UTC")) end end describe "#expires_on" do it do expect(subject.expires_on).to be_a(Time) - expect(subject.expires_on).to eq(Time.parse("2014-11-17 23:59:59 UTC")) + expect(subject.expires_on).to eq(DateTime.parse("2014-11-17 23:59:59 UTC")) end end describe "#registrar" do diff --git a/spec/whois/parsers/responses/whois.cira.ca/ca/status_registered_spec.rb b/spec/whois/parsers/responses/whois.cira.ca/ca/status_registered_spec.rb index e800cde9..9b2c1926 100644 --- a/spec/whois/parsers/responses/whois.cira.ca/ca/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.cira.ca/ca/status_registered_spec.rb @@ -54,19 +54,19 @@ describe "#created_on" do it do expect(subject.created_on).to be_a(Time) - expect(subject.created_on).to eq(Time.parse("2000-10-03 00:00:00")) + expect(subject.created_on).to eq(DateTime.parse("2000-10-03 00:00:00")) end end describe "#updated_on" do it do expect(subject.updated_on).to be_a(Time) - expect(subject.updated_on).to eq(Time.parse("2014-02-13 00:00:00")) + expect(subject.updated_on).to eq(DateTime.parse("2014-02-13 00:00:00")) end end describe "#expires_on" do it do expect(subject.expires_on).to be_a(Time) - expect(subject.expires_on).to eq(Time.parse("2015-04-28 00:00:00")) + expect(subject.expires_on).to eq(DateTime.parse("2015-04-28 00:00:00")) end end describe "#registrar" do diff --git a/spec/whois/parsers/responses/whois.cmc.iq/iq/status_registered_spec.rb b/spec/whois/parsers/responses/whois.cmc.iq/iq/status_registered_spec.rb index bd74df9e..e57c53a0 100644 --- a/spec/whois/parsers/responses/whois.cmc.iq/iq/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.cmc.iq/iq/status_registered_spec.rb @@ -49,19 +49,19 @@ describe "#created_on" do it do expect(subject.created_on).to be_a(Time) - expect(subject.created_on).to eq(Time.parse("2010-10-03 21:00:00 UTC")) + expect(subject.created_on).to eq(DateTime.parse("2010-10-03 21:00:00 UTC")) end end describe "#updated_on" do it do expect(subject.updated_on).to be_a(Time) - expect(subject.updated_on).to eq(Time.parse("2013-09-29 05:19:04 UTC")) + expect(subject.updated_on).to eq(DateTime.parse("2013-09-29 05:19:04 UTC")) end end describe "#expires_on" do it do expect(subject.expires_on).to be_a(Time) - expect(subject.expires_on).to eq(Time.parse("2014-10-02 21:00:00 UTC")) + expect(subject.expires_on).to eq(DateTime.parse("2014-10-02 21:00:00 UTC")) end end describe "#registrar" do diff --git a/spec/whois/parsers/responses/whois.cnnic.cn/cn/status_registered_spec.rb b/spec/whois/parsers/responses/whois.cnnic.cn/cn/status_registered_spec.rb index d3142f60..ef765dfc 100644 --- a/spec/whois/parsers/responses/whois.cnnic.cn/cn/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.cnnic.cn/cn/status_registered_spec.rb @@ -54,7 +54,7 @@ describe "#created_on" do it do expect(subject.created_on).to be_a(Time) - expect(subject.created_on).to eq(Time.parse("2003-03-17 12:20:05")) + expect(subject.created_on).to eq(DateTime.parse("2003-03-17 12:20:05")) end end describe "#updated_on" do @@ -65,7 +65,7 @@ describe "#expires_on" do it do expect(subject.expires_on).to be_a(Time) - expect(subject.expires_on).to eq(Time.parse("2017-03-17 12:48:36")) + expect(subject.expires_on).to eq(DateTime.parse("2017-03-17 12:48:36")) end end describe "#registrar" do diff --git a/spec/whois/parsers/responses/whois.co.ca/co.ca/status_registered_spec.rb b/spec/whois/parsers/responses/whois.co.ca/co.ca/status_registered_spec.rb index b6f9f21c..b82b527c 100644 --- a/spec/whois/parsers/responses/whois.co.ca/co.ca/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.co.ca/co.ca/status_registered_spec.rb @@ -39,7 +39,7 @@ describe "#created_on" do it do expect(subject.created_on).to be_a(Time) - expect(subject.created_on).to eq(Time.parse("2005-06-25 16:03:30")) + expect(subject.created_on).to eq(DateTime.parse("2005-06-25 16:03:30")) end end describe "#updated_on" do @@ -50,7 +50,7 @@ describe "#expires_on" do it do expect(subject.expires_on).to be_a(Time) - expect(subject.expires_on).to eq(Time.parse("2014-06-25")) + expect(subject.expires_on).to eq(DateTime.parse("2014-06-25")) end end describe "#nameservers" do diff --git a/spec/whois/parsers/responses/whois.co.pl/co.pl/status_registered_spec.rb b/spec/whois/parsers/responses/whois.co.pl/co.pl/status_registered_spec.rb index 4335ba6f..38d0112a 100644 --- a/spec/whois/parsers/responses/whois.co.pl/co.pl/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.co.pl/co.pl/status_registered_spec.rb @@ -59,7 +59,7 @@ describe "#updated_on" do it do expect(subject.updated_on).to be_a(Time) - expect(subject.updated_on).to eq(Time.parse("2010-06-23 09:41:50")) + expect(subject.updated_on).to eq(DateTime.parse("2010-06-23 09:41:50")) end end describe "#expires_on" do diff --git a/spec/whois/parsers/responses/whois.co.ug/ug/status_registered_spec.rb b/spec/whois/parsers/responses/whois.co.ug/ug/status_registered_spec.rb index e476e045..d923eea5 100644 --- a/spec/whois/parsers/responses/whois.co.ug/ug/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.co.ug/ug/status_registered_spec.rb @@ -39,19 +39,19 @@ describe "#created_on" do it do expect(subject.created_on).to be_a(Time) - expect(subject.created_on).to eq(Time.parse("2001-04-02 00:00:00")) + expect(subject.created_on).to eq(DateTime.parse("2001-04-02 00:00:00")) end end describe "#updated_on" do it do expect(subject.updated_on).to be_a(Time) - expect(subject.updated_on).to eq(Time.parse("2009-11-10 14:06:58 UTC")) + expect(subject.updated_on).to eq(DateTime.parse("2009-11-10 14:06:58 UTC")) end end describe "#expires_on" do it do expect(subject.expires_on).to be_a(Time) - expect(subject.expires_on).to eq(Time.parse("2018-04-07 00:00:00")) + expect(subject.expires_on).to eq(DateTime.parse("2018-04-07 00:00:00")) end end describe "#nameservers" do diff --git a/spec/whois/parsers/responses/whois.comlaude.com/status_registered_spec.rb b/spec/whois/parsers/responses/whois.comlaude.com/status_registered_spec.rb index a053d2b9..51971bd4 100644 --- a/spec/whois/parsers/responses/whois.comlaude.com/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.comlaude.com/status_registered_spec.rb @@ -39,7 +39,7 @@ describe "#created_on" do it do expect(subject.created_on).to be_a(Time) - expect(subject.created_on).to eq(Time.parse("2005-01-30")) + expect(subject.created_on).to eq(DateTime.parse("2005-01-30")) end end describe "#updated_on" do @@ -50,7 +50,7 @@ describe "#expires_on" do it do expect(subject.expires_on).to be_a(Time) - expect(subject.expires_on).to eq(Time.parse("2020-01-30")) + expect(subject.expires_on).to eq(DateTime.parse("2020-01-30")) end end describe "#registrar" do diff --git a/spec/whois/parsers/responses/whois.corporatedomains.com/status_registered_spec.rb b/spec/whois/parsers/responses/whois.corporatedomains.com/status_registered_spec.rb index 1e42d1d6..a3b03807 100644 --- a/spec/whois/parsers/responses/whois.corporatedomains.com/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.corporatedomains.com/status_registered_spec.rb @@ -49,19 +49,19 @@ describe "#created_on" do it do expect(subject.created_on).to be_a(Time) - expect(subject.created_on).to eq(Time.parse("1992-11-24 00:00:00 -0500")) + expect(subject.created_on).to eq(DateTime.parse("1992-11-24 00:00:00 -0500")) end end describe "#updated_on" do it do expect(subject.updated_on).to be_a(Time) - expect(subject.updated_on).to eq(Time.parse("2012-05-16 09:28:56 -0400")) + expect(subject.updated_on).to eq(DateTime.parse("2012-05-16 09:28:56 -0400")) end end describe "#expires_on" do it do expect(subject.expires_on).to be_a(Time) - expect(subject.expires_on).to eq(Time.parse("2013-11-23 00:00:00 -0500")) + expect(subject.expires_on).to eq(DateTime.parse("2013-11-23 00:00:00 -0500")) end end describe "#registrar" do diff --git a/spec/whois/parsers/responses/whois.denic.de/de/status_registered_spec.rb b/spec/whois/parsers/responses/whois.denic.de/de/status_registered_spec.rb index c9aba2ac..9af930bd 100644 --- a/spec/whois/parsers/responses/whois.denic.de/de/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.denic.de/de/status_registered_spec.rb @@ -59,7 +59,7 @@ describe "#updated_on" do it do expect(subject.updated_on).to be_a(Time) - expect(subject.updated_on).to eq(Time.parse("2011-03-30 19:36:27 +0200")) + expect(subject.updated_on).to eq(DateTime.parse("2011-03-30 19:36:27 +0200")) end end describe "#expires_on" do diff --git a/spec/whois/parsers/responses/whois.dk-hostmaster.dk/dk/status_registered_spec.rb b/spec/whois/parsers/responses/whois.dk-hostmaster.dk/dk/status_registered_spec.rb index 93a8885b..68ecf9fc 100644 --- a/spec/whois/parsers/responses/whois.dk-hostmaster.dk/dk/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.dk-hostmaster.dk/dk/status_registered_spec.rb @@ -39,7 +39,7 @@ describe "#created_on" do it do expect(subject.created_on).to be_a(Time) - expect(subject.created_on).to eq(Time.parse("1999-01-10")) + expect(subject.created_on).to eq(DateTime.parse("1999-01-10")) end end describe "#updated_on" do @@ -50,7 +50,7 @@ describe "#expires_on" do it do expect(subject.expires_on).to be_a(Time) - expect(subject.expires_on).to eq(Time.parse("2010-03-31")) + expect(subject.expires_on).to eq(DateTime.parse("2010-03-31")) end end describe "#nameservers" do diff --git a/spec/whois/parsers/responses/whois.dns.be/be/status_registered_spec.rb b/spec/whois/parsers/responses/whois.dns.be/be/status_registered_spec.rb index 34438c44..0d09b87b 100644 --- a/spec/whois/parsers/responses/whois.dns.be/be/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.dns.be/be/status_registered_spec.rb @@ -44,7 +44,7 @@ describe "#created_on" do it do expect(subject.created_on).to be_a(Time) - expect(subject.created_on).to eq(Time.parse("2000-12-12 00:00:00")) + expect(subject.created_on).to eq(DateTime.parse("2000-12-12 00:00:00")) end end describe "#updated_on" do diff --git a/spec/whois/parsers/responses/whois.dns.hr/hr/status_registered_spec.rb b/spec/whois/parsers/responses/whois.dns.hr/hr/status_registered_spec.rb index 381d54b9..b75ad2e1 100644 --- a/spec/whois/parsers/responses/whois.dns.hr/hr/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.dns.hr/hr/status_registered_spec.rb @@ -64,7 +64,7 @@ describe "#expires_on" do it do expect(subject.expires_on).to be_a(Time) - expect(subject.expires_on).to eq(Time.parse("2014-09-21")) + expect(subject.expires_on).to eq(DateTime.parse("2014-09-21")) end end describe "#registrar" do diff --git a/spec/whois/parsers/responses/whois.dns.lu/lu/status_registered_spec.rb b/spec/whois/parsers/responses/whois.dns.lu/lu/status_registered_spec.rb index bf68d8de..580e9b58 100644 --- a/spec/whois/parsers/responses/whois.dns.lu/lu/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.dns.lu/lu/status_registered_spec.rb @@ -39,7 +39,7 @@ describe "#created_on" do it do expect(subject.created_on).to be_a(Time) - expect(subject.created_on).to eq(Time.parse("2003-06-04 00:00:00 UTC")) + expect(subject.created_on).to eq(DateTime.parse("2003-06-04 00:00:00 UTC")) end end describe "#updated_on" do diff --git a/spec/whois/parsers/responses/whois.dns.pl/pl/status_registered_spec.rb b/spec/whois/parsers/responses/whois.dns.pl/pl/status_registered_spec.rb index 241ad366..1b99768d 100644 --- a/spec/whois/parsers/responses/whois.dns.pl/pl/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.dns.pl/pl/status_registered_spec.rb @@ -49,19 +49,19 @@ describe "#created_on" do it do expect(subject.created_on).to be_a(Time) - expect(subject.created_on).to eq(Time.parse("2002-09-19 13:00:00")) + expect(subject.created_on).to eq(DateTime.parse("2002-09-19 13:00:00")) end end describe "#updated_on" do it do expect(subject.updated_on).to be_a(Time) - expect(subject.updated_on).to eq(Time.parse("2012-08-17 11:21:09")) + expect(subject.updated_on).to eq(DateTime.parse("2012-08-17 11:21:09")) end end describe "#expires_on" do it do expect(subject.expires_on).to be_a(Time) - expect(subject.expires_on).to eq(Time.parse("2013-09-18 14:00:00")) + expect(subject.expires_on).to eq(DateTime.parse("2013-09-18 14:00:00")) end end describe "#registrar" do diff --git a/spec/whois/parsers/responses/whois.dns.pt/pt/status_inactive_spec.rb b/spec/whois/parsers/responses/whois.dns.pt/pt/status_inactive_spec.rb index 78137684..0b9c11f6 100644 --- a/spec/whois/parsers/responses/whois.dns.pt/pt/status_inactive_spec.rb +++ b/spec/whois/parsers/responses/whois.dns.pt/pt/status_inactive_spec.rb @@ -39,7 +39,7 @@ describe "#created_on" do it do expect(subject.created_on).to be_a(Time) - expect(subject.created_on).to eq(Time.parse("2009-02-09 00:00:00 UTC")) + expect(subject.created_on).to eq(DateTime.parse("2009-02-09 00:00:00 UTC")) end end describe "#updated_on" do @@ -50,7 +50,7 @@ describe "#expires_on" do it do expect(subject.expires_on).to be_a(Time) - expect(subject.expires_on).to eq(Time.parse("2014-03-01 00:00:00 UTC")) + expect(subject.expires_on).to eq(DateTime.parse("2014-03-01 00:00:00 UTC")) end end describe "#nameservers" do diff --git a/spec/whois/parsers/responses/whois.dns.pt/pt/status_registered_spec.rb b/spec/whois/parsers/responses/whois.dns.pt/pt/status_registered_spec.rb index 45fad65d..519c1f01 100644 --- a/spec/whois/parsers/responses/whois.dns.pt/pt/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.dns.pt/pt/status_registered_spec.rb @@ -39,7 +39,7 @@ describe "#created_on" do it do expect(subject.created_on).to be_a(Time) - expect(subject.created_on).to eq(Time.parse("2003-01-09 00:00:00 UTC")) + expect(subject.created_on).to eq(DateTime.parse("2003-01-09 00:00:00 UTC")) end end describe "#updated_on" do @@ -50,7 +50,7 @@ describe "#expires_on" do it do expect(subject.expires_on).to be_a(Time) - expect(subject.expires_on).to eq(Time.parse("2015-02-28 00:00:00 UTC")) + expect(subject.expires_on).to eq(DateTime.parse("2015-02-28 00:00:00 UTC")) end end describe "#nameservers" do diff --git a/spec/whois/parsers/responses/whois.dns.pt/pt/status_reserved_spec.rb b/spec/whois/parsers/responses/whois.dns.pt/pt/status_reserved_spec.rb index 2fad53fc..0d7292f4 100644 --- a/spec/whois/parsers/responses/whois.dns.pt/pt/status_reserved_spec.rb +++ b/spec/whois/parsers/responses/whois.dns.pt/pt/status_reserved_spec.rb @@ -39,7 +39,7 @@ describe "#created_on" do it do expect(subject.created_on).to be_a(Time) - expect(subject.created_on).to eq(Time.parse("2009-02-09 00:00:00 UTC")) + expect(subject.created_on).to eq(DateTime.parse("2009-02-09 00:00:00 UTC")) end end describe "#updated_on" do diff --git a/spec/whois/parsers/responses/whois.domain-registry.nl/nl/status_registered_spec.rb b/spec/whois/parsers/responses/whois.domain-registry.nl/nl/status_registered_spec.rb index 2661d93a..36286ebf 100644 --- a/spec/whois/parsers/responses/whois.domain-registry.nl/nl/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.domain-registry.nl/nl/status_registered_spec.rb @@ -39,13 +39,13 @@ describe "#created_on" do it do expect(subject.created_on).to be_a(Time) - expect(subject.created_on).to eq(Time.parse("1999-05-27")) + expect(subject.created_on).to eq(DateTime.parse("1999-05-27")) end end describe "#updated_on" do it do expect(subject.updated_on).to be_a(Time) - expect(subject.updated_on).to eq(Time.parse("2009-02-11")) + expect(subject.updated_on).to eq(DateTime.parse("2009-02-11")) end end describe "#expires_on" do diff --git a/spec/whois/parsers/responses/whois.domainregistry.ie/ie/status_registered_spec.rb b/spec/whois/parsers/responses/whois.domainregistry.ie/ie/status_registered_spec.rb index 4a56fc92..42ac3da5 100644 --- a/spec/whois/parsers/responses/whois.domainregistry.ie/ie/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.domainregistry.ie/ie/status_registered_spec.rb @@ -54,7 +54,7 @@ describe "#created_on" do it do expect(subject.created_on).to be_a(Time) - expect(subject.created_on).to eq(Time.parse("2002-03-21")) + expect(subject.created_on).to eq(DateTime.parse("2002-03-21")) end end describe "#updated_on" do @@ -65,7 +65,7 @@ describe "#expires_on" do it do expect(subject.expires_on).to be_a(Time) - expect(subject.expires_on).to eq(Time.parse("2015-03-21")) + expect(subject.expires_on).to eq(DateTime.parse("2015-03-21")) end end describe "#registrar" do diff --git a/spec/whois/parsers/responses/whois.domreg.lt/lt/status_registered_spec.rb b/spec/whois/parsers/responses/whois.domreg.lt/lt/status_registered_spec.rb index 0e0f6a3d..f195a216 100644 --- a/spec/whois/parsers/responses/whois.domreg.lt/lt/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.domreg.lt/lt/status_registered_spec.rb @@ -39,7 +39,7 @@ describe "#created_on" do it do expect(subject.created_on).to be_a(Time) - expect(subject.created_on).to eq(Time.parse("1999-06-06")) + expect(subject.created_on).to eq(DateTime.parse("1999-06-06")) end end describe "#updated_on" do diff --git a/spec/whois/parsers/responses/whois.donuts.co/bike/status_registered_spec.rb b/spec/whois/parsers/responses/whois.donuts.co/bike/status_registered_spec.rb index 5b51dfac..cfa8e5b4 100644 --- a/spec/whois/parsers/responses/whois.donuts.co/bike/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.donuts.co/bike/status_registered_spec.rb @@ -49,19 +49,19 @@ describe "#created_on" do it do expect(subject.created_on).to be_a(Time) - expect(subject.created_on).to eq(Time.parse("2016-02-26 16:49:10 UTC")) + expect(subject.created_on).to eq(DateTime.parse("2016-02-26 16:49:10 UTC")) end end describe "#updated_on" do it do expect(subject.updated_on).to be_a(Time) - expect(subject.updated_on).to eq(Time.parse("2017-04-12 16:49:41 UTC")) + expect(subject.updated_on).to eq(DateTime.parse("2017-04-12 16:49:41 UTC")) end end describe "#expires_on" do it do expect(subject.expires_on).to be_a(Time) - expect(subject.expires_on).to eq(Time.parse("2018-02-26 16:49:10 UTC")) + expect(subject.expires_on).to eq(DateTime.parse("2018-02-26 16:49:10 UTC")) end end describe "#registrar" do diff --git a/spec/whois/parsers/responses/whois.dot.cf/cf/status_registered_spec.rb b/spec/whois/parsers/responses/whois.dot.cf/cf/status_registered_spec.rb index 9c9d9cc6..82aa0ae5 100644 --- a/spec/whois/parsers/responses/whois.dot.cf/cf/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.dot.cf/cf/status_registered_spec.rb @@ -39,7 +39,7 @@ describe "#created_on" do it do expect(subject.created_on).to be_a(Time) - expect(subject.created_on).to eq(Time.parse("2013-03-28 00:00:00")) + expect(subject.created_on).to eq(DateTime.parse("2013-03-28 00:00:00")) end end describe "#updated_on" do diff --git a/spec/whois/parsers/responses/whois.dot.tk/tk/status_registered_spec.rb b/spec/whois/parsers/responses/whois.dot.tk/tk/status_registered_spec.rb index 46d9ca3e..28fd7788 100644 --- a/spec/whois/parsers/responses/whois.dot.tk/tk/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.dot.tk/tk/status_registered_spec.rb @@ -39,7 +39,7 @@ describe "#created_on" do it do expect(subject.created_on).to be_a(Time) - expect(subject.created_on).to eq(Time.parse("2001-12-18 00:00:00")) + expect(subject.created_on).to eq(DateTime.parse("2001-12-18 00:00:00")) end end describe "#updated_on" do @@ -50,7 +50,7 @@ describe "#expires_on" do it do expect(subject.expires_on).to be_a(Time) - expect(subject.expires_on).to eq(Time.parse("2012-03-02 00:00:00")) + expect(subject.expires_on).to eq(DateTime.parse("2012-03-02 00:00:00")) end end describe "#nameservers" do diff --git a/spec/whois/parsers/responses/whois.dotmobiregistry.net/mobi/status_registered_spec.rb b/spec/whois/parsers/responses/whois.dotmobiregistry.net/mobi/status_registered_spec.rb index 98b29331..2649e147 100644 --- a/spec/whois/parsers/responses/whois.dotmobiregistry.net/mobi/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.dotmobiregistry.net/mobi/status_registered_spec.rb @@ -54,19 +54,19 @@ describe "#created_on" do it do expect(subject.created_on).to be_a(Time) - expect(subject.created_on).to eq(Time.parse("2006-05-11 21:08:42 UTC")) + expect(subject.created_on).to eq(DateTime.parse("2006-05-11 21:08:42 UTC")) end end describe "#updated_on" do it do expect(subject.updated_on).to be_a(Time) - expect(subject.updated_on).to eq(Time.parse("2021-04-09 09:29:29 UTC")) + expect(subject.updated_on).to eq(DateTime.parse("2021-04-09 09:29:29 UTC")) end end describe "#expires_on" do it do expect(subject.expires_on).to be_a(Time) - expect(subject.expires_on).to eq(Time.parse("2022-05-11 21:08:42 UTC")) + expect(subject.expires_on).to eq(DateTime.parse("2022-05-11 21:08:42 UTC")) end end describe "#registrar" do diff --git a/spec/whois/parsers/responses/whois.dotpostregistry.net/post/status_registered_spec.rb b/spec/whois/parsers/responses/whois.dotpostregistry.net/post/status_registered_spec.rb index dc364951..5afaf5b5 100644 --- a/spec/whois/parsers/responses/whois.dotpostregistry.net/post/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.dotpostregistry.net/post/status_registered_spec.rb @@ -54,19 +54,19 @@ describe "#created_on" do it do expect(subject.created_on).to be_a(Time) - expect(subject.created_on).to eq(Time.parse("2012-09-21 12:03:07 UTC")) + expect(subject.created_on).to eq(DateTime.parse("2012-09-21 12:03:07 UTC")) end end describe "#updated_on" do it do expect(subject.updated_on).to be_a(Time) - expect(subject.updated_on).to eq(Time.parse("2021-09-21 22:31:15 UTC")) + expect(subject.updated_on).to eq(DateTime.parse("2021-09-21 22:31:15 UTC")) end end describe "#expires_on" do it do expect(subject.expires_on).to be_a(Time) - expect(subject.expires_on).to eq(Time.parse("2022-09-21 12:03:07 UTC")) + expect(subject.expires_on).to eq(DateTime.parse("2022-09-21 12:03:07 UTC")) end end describe "#registrar" do diff --git a/spec/whois/parsers/responses/whois.dreamhost.com/status_registered_spec.rb b/spec/whois/parsers/responses/whois.dreamhost.com/status_registered_spec.rb index f190da42..2a868d8d 100644 --- a/spec/whois/parsers/responses/whois.dreamhost.com/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.dreamhost.com/status_registered_spec.rb @@ -39,19 +39,19 @@ describe "#created_on" do it do expect(subject.created_on).to be_a(Time) - expect(subject.created_on).to eq(Time.parse("1997-09-22 21:00:00 UTC")) + expect(subject.created_on).to eq(DateTime.parse("1997-09-22 21:00:00 UTC")) end end describe "#updated_on" do it do expect(subject.updated_on).to be_a(Time) - expect(subject.updated_on).to eq(Time.parse("2013-12-14 16:53:27 UTC")) + expect(subject.updated_on).to eq(DateTime.parse("2013-12-14 16:53:27 UTC")) end end describe "#expires_on" do it do expect(subject.expires_on).to be_a(Time) - expect(subject.expires_on).to eq(Time.parse("2015-09-22 04:00:00 UTC")) + expect(subject.expires_on).to eq(DateTime.parse("2015-09-22 04:00:00 UTC")) end end describe "#registrar" do diff --git a/spec/whois/parsers/responses/whois.educause.edu/edu/status_registered_spec.rb b/spec/whois/parsers/responses/whois.educause.edu/edu/status_registered_spec.rb index 304bdf34..c5a1595f 100644 --- a/spec/whois/parsers/responses/whois.educause.edu/edu/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.educause.edu/edu/status_registered_spec.rb @@ -54,19 +54,19 @@ describe "#created_on" do it do expect(subject.created_on).to be_a(Time) - expect(subject.created_on).to eq(Time.parse("1999-05-10")) + expect(subject.created_on).to eq(DateTime.parse("1999-05-10")) end end describe "#updated_on" do it do expect(subject.updated_on).to be_a(Time) - expect(subject.updated_on).to eq(Time.parse("2012-04-04")) + expect(subject.updated_on).to eq(DateTime.parse("2012-04-04")) end end describe "#expires_on" do it do expect(subject.expires_on).to be_a(Time) - expect(subject.expires_on).to eq(Time.parse("2014-07-31")) + expect(subject.expires_on).to eq(DateTime.parse("2014-07-31")) end end describe "#registrar" do diff --git a/spec/whois/parsers/responses/whois.eenet.ee/ee/status_registered_spec.rb b/spec/whois/parsers/responses/whois.eenet.ee/ee/status_registered_spec.rb index 62194ad5..581af157 100644 --- a/spec/whois/parsers/responses/whois.eenet.ee/ee/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.eenet.ee/ee/status_registered_spec.rb @@ -39,13 +39,13 @@ describe "#created_on" do it do expect(subject.created_on).to be_a(Time) - expect(subject.created_on).to eq(Time.parse("2003-04-22")) + expect(subject.created_on).to eq(DateTime.parse("2003-04-22")) end end describe "#updated_on" do it do expect(subject.updated_on).to be_a(Time) - expect(subject.updated_on).to eq(Time.parse("2010-05-28")) + expect(subject.updated_on).to eq(DateTime.parse("2010-05-28")) end end describe "#expires_on" do diff --git a/spec/whois/parsers/responses/whois.enom.com/status_registered_spec.rb b/spec/whois/parsers/responses/whois.enom.com/status_registered_spec.rb index 3d1be040..f30d9297 100644 --- a/spec/whois/parsers/responses/whois.enom.com/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.enom.com/status_registered_spec.rb @@ -49,7 +49,7 @@ describe "#created_on" do it do expect(subject.created_on).to be_a(Time) - expect(subject.created_on).to eq(Time.parse("1997-10-24 00:00:00")) + expect(subject.created_on).to eq(DateTime.parse("1997-10-24 00:00:00")) end end describe "#updated_on" do diff --git a/spec/whois/parsers/responses/whois.fi/fi/property_status_graceperiod_spec.rb b/spec/whois/parsers/responses/whois.fi/fi/property_status_graceperiod_spec.rb index e7493fc8..c6d1d8c5 100644 --- a/spec/whois/parsers/responses/whois.fi/fi/property_status_graceperiod_spec.rb +++ b/spec/whois/parsers/responses/whois.fi/fi/property_status_graceperiod_spec.rb @@ -54,19 +54,19 @@ describe "#created_on" do it do expect(subject.created_on).to be_a(Time) - expect(subject.created_on).to eq(Time.parse("2012-06-21")) + expect(subject.created_on).to eq(DateTime.parse("2012-06-21")) end end describe "#updated_on" do it do expect(subject.updated_on).to be_a(Time) - expect(subject.updated_on).to eq(Time.parse("2013-06-22")) + expect(subject.updated_on).to eq(DateTime.parse("2013-06-22")) end end describe "#expires_on" do it do expect(subject.expires_on).to be_a(Time) - expect(subject.expires_on).to eq(Time.parse("2013-06-21")) + expect(subject.expires_on).to eq(DateTime.parse("2013-06-21")) end end describe "#registrar" do diff --git a/spec/whois/parsers/responses/whois.fi/fi/status_registered_spec.rb b/spec/whois/parsers/responses/whois.fi/fi/status_registered_spec.rb index 41153a7f..871d6736 100644 --- a/spec/whois/parsers/responses/whois.fi/fi/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.fi/fi/status_registered_spec.rb @@ -54,19 +54,19 @@ describe "#created_on" do it do expect(subject.created_on).to be_a(Time) - expect(subject.created_on).to eq(Time.parse("2006-06-30")) + expect(subject.created_on).to eq(DateTime.parse("2006-06-30")) end end describe "#updated_on" do it do expect(subject.updated_on).to be_a(Time) - expect(subject.updated_on).to eq(Time.parse("2013-06-07")) + expect(subject.updated_on).to eq(DateTime.parse("2013-06-07")) end end describe "#expires_on" do it do expect(subject.expires_on).to be_a(Time) - expect(subject.expires_on).to eq(Time.parse("2014-07-04")) + expect(subject.expires_on).to eq(DateTime.parse("2014-07-04")) end end describe "#registrar" do diff --git a/spec/whois/parsers/responses/whois.gandi.net/status_registered_spec.rb b/spec/whois/parsers/responses/whois.gandi.net/status_registered_spec.rb index 6a921d0b..7f7b063e 100644 --- a/spec/whois/parsers/responses/whois.gandi.net/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.gandi.net/status_registered_spec.rb @@ -49,19 +49,19 @@ describe "#created_on" do it do expect(subject.created_on).to be_a(Time) - expect(subject.created_on).to eq(Time.parse("2000-02-23 12:12:59 UTC")) + expect(subject.created_on).to eq(DateTime.parse("2000-02-23 12:12:59 UTC")) end end describe "#updated_on" do it do expect(subject.updated_on).to be_a(Time) - expect(subject.updated_on).to eq(Time.parse("2013-10-23 18:42:52 UTC")) + expect(subject.updated_on).to eq(DateTime.parse("2013-10-23 18:42:52 UTC")) end end describe "#expires_on" do it do expect(subject.expires_on).to be_a(Time) - expect(subject.expires_on).to eq(Time.parse("2023-05-21 14:09:56 UTC")) + expect(subject.expires_on).to eq(DateTime.parse("2023-05-21 14:09:56 UTC")) end end describe "#registrar" do diff --git a/spec/whois/parsers/responses/whois.gg/gg/status_registered_spec.rb b/spec/whois/parsers/responses/whois.gg/gg/status_registered_spec.rb index 3d9be836..dcf866dc 100644 --- a/spec/whois/parsers/responses/whois.gg/gg/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.gg/gg/status_registered_spec.rb @@ -49,7 +49,7 @@ describe "#created_on" do it do expect(subject.created_on).to be_a(Time) - expect(subject.created_on).to eq(Time.parse("2003-04-30 00:00:00 UTC")) + expect(subject.created_on).to eq(DateTime.parse("2003-04-30 00:00:00 UTC")) end end describe "#updated_on" do diff --git a/spec/whois/parsers/responses/whois.godaddy.com/status_registered_spec.rb b/spec/whois/parsers/responses/whois.godaddy.com/status_registered_spec.rb index ba17b23a..c1c65f9a 100644 --- a/spec/whois/parsers/responses/whois.godaddy.com/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.godaddy.com/status_registered_spec.rb @@ -49,19 +49,19 @@ describe "#created_on" do it do expect(subject.created_on).to be_a(Time) - expect(subject.created_on).to eq(Time.parse("1999-03-02 05:00:00 UTC")) + expect(subject.created_on).to eq(DateTime.parse("1999-03-02 05:00:00 UTC")) end end describe "#updated_on" do it do expect(subject.updated_on).to be_a(Time) - expect(subject.updated_on).to eq(Time.parse("2013-06-02 12:16:24 UTC")) + expect(subject.updated_on).to eq(DateTime.parse("2013-06-02 12:16:24 UTC")) end end describe "#expires_on" do it do expect(subject.expires_on).to be_a(Time) - expect(subject.expires_on).to eq(Time.parse("2021-11-01 11:59:59 UTC")) + expect(subject.expires_on).to eq(DateTime.parse("2021-11-01 11:59:59 UTC")) end end describe "#registrar" do diff --git a/spec/whois/parsers/responses/whois.gov.za/gov.za/status_registered_spec.rb b/spec/whois/parsers/responses/whois.gov.za/gov.za/status_registered_spec.rb index 6472e260..84f5f226 100644 --- a/spec/whois/parsers/responses/whois.gov.za/gov.za/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.gov.za/gov.za/status_registered_spec.rb @@ -39,7 +39,7 @@ describe "#created_on" do it do expect(subject.created_on).to be_a(Time) - expect(subject.created_on).to eq(Time.parse("2012-09-03")) + expect(subject.created_on).to eq(DateTime.parse("2012-09-03")) end end describe "#updated_on" do diff --git a/spec/whois/parsers/responses/whois.hkirc.hk/hk/status_registered_spec.rb b/spec/whois/parsers/responses/whois.hkirc.hk/hk/status_registered_spec.rb index fc4e7954..c0bc0d9f 100644 --- a/spec/whois/parsers/responses/whois.hkirc.hk/hk/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.hkirc.hk/hk/status_registered_spec.rb @@ -39,7 +39,7 @@ describe "#created_on" do it do expect(subject.created_on).to be_a(Time) - expect(subject.created_on).to eq(Time.parse("2004-04-06")) + expect(subject.created_on).to eq(DateTime.parse("2004-04-06")) end end describe "#updated_on" do @@ -50,7 +50,7 @@ describe "#expires_on" do it do expect(subject.expires_on).to be_a(Time) - expect(subject.expires_on).to eq(Time.parse("2014-03-31")) + expect(subject.expires_on).to eq(DateTime.parse("2014-03-31")) end end describe "#nameservers" do diff --git a/spec/whois/parsers/responses/whois.iana.org/int/status_registered_spec.rb b/spec/whois/parsers/responses/whois.iana.org/int/status_registered_spec.rb index 566b750a..b8517a25 100644 --- a/spec/whois/parsers/responses/whois.iana.org/int/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.iana.org/int/status_registered_spec.rb @@ -39,13 +39,13 @@ describe "#created_on" do it do expect(subject.created_on).to be_a(Time) - expect(subject.created_on).to eq(Time.parse("1997-08-26")) + expect(subject.created_on).to eq(DateTime.parse("1997-08-26")) end end describe "#updated_on" do it do expect(subject.updated_on).to be_a(Time) - expect(subject.updated_on).to eq(Time.parse("2012-08-07")) + expect(subject.updated_on).to eq(DateTime.parse("2012-08-07")) end end describe "#expires_on" do diff --git a/spec/whois/parsers/responses/whois.iana.org/tld/status_not_assigned_spec.rb b/spec/whois/parsers/responses/whois.iana.org/tld/status_not_assigned_spec.rb index 89a74a53..011fe0e6 100644 --- a/spec/whois/parsers/responses/whois.iana.org/tld/status_not_assigned_spec.rb +++ b/spec/whois/parsers/responses/whois.iana.org/tld/status_not_assigned_spec.rb @@ -44,7 +44,7 @@ describe "#updated_on" do it do expect(subject.updated_on).to be_a(Time) - expect(subject.updated_on).to eq(Time.parse("1999-09-27")) + expect(subject.updated_on).to eq(DateTime.parse("1999-09-27")) end end describe "#expires_on" do diff --git a/spec/whois/parsers/responses/whois.iis.nu/nu/status_registered_spec.rb b/spec/whois/parsers/responses/whois.iis.nu/nu/status_registered_spec.rb index e8fad3e0..6d3d1811 100644 --- a/spec/whois/parsers/responses/whois.iis.nu/nu/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.iis.nu/nu/status_registered_spec.rb @@ -54,19 +54,19 @@ describe "#created_on" do it do expect(subject.created_on).to be_a(Time) - expect(subject.created_on).to eq(Time.parse("1999-06-07")) + expect(subject.created_on).to eq(DateTime.parse("1999-06-07")) end end describe "#updated_on" do it do expect(subject.updated_on).to be_a(Time) - expect(subject.updated_on).to eq(Time.parse("2014-05-06")) + expect(subject.updated_on).to eq(DateTime.parse("2014-05-06")) end end describe "#expires_on" do it do expect(subject.expires_on).to be_a(Time) - expect(subject.expires_on).to eq(Time.parse("2015-06-07")) + expect(subject.expires_on).to eq(DateTime.parse("2015-06-07")) end end describe "#registrar" do diff --git a/spec/whois/parsers/responses/whois.iis.se/se/property_datetime_is_dash_spec.rb b/spec/whois/parsers/responses/whois.iis.se/se/property_datetime_is_dash_spec.rb index e37f6c70..00669b2b 100644 --- a/spec/whois/parsers/responses/whois.iis.se/se/property_datetime_is_dash_spec.rb +++ b/spec/whois/parsers/responses/whois.iis.se/se/property_datetime_is_dash_spec.rb @@ -24,7 +24,7 @@ describe "#created_on" do it do expect(subject.created_on).to be_a(Time) - expect(subject.created_on).to eq(Time.parse("2010-08-05")) + expect(subject.created_on).to eq(DateTime.parse("2010-08-05")) end end describe "#updated_on" do @@ -35,7 +35,7 @@ describe "#expires_on" do it do expect(subject.expires_on).to be_a(Time) - expect(subject.expires_on).to eq(Time.parse("2011-08-05")) + expect(subject.expires_on).to eq(DateTime.parse("2011-08-05")) end end end diff --git a/spec/whois/parsers/responses/whois.iis.se/se/property_status_inactive_spec.rb b/spec/whois/parsers/responses/whois.iis.se/se/property_status_inactive_spec.rb index 64c2c770..ba2dbb58 100644 --- a/spec/whois/parsers/responses/whois.iis.se/se/property_status_inactive_spec.rb +++ b/spec/whois/parsers/responses/whois.iis.se/se/property_status_inactive_spec.rb @@ -38,7 +38,7 @@ end describe "#created_on" do it do - expect(subject.created_on).to eq(Time.parse("2000-11-01")) + expect(subject.created_on).to eq(DateTime.parse("2000-11-01")) end end describe "#updated_on" do @@ -48,7 +48,7 @@ end describe "#expires_on" do it do - expect(subject.expires_on).to eq(Time.parse("2006-04-18")) + expect(subject.expires_on).to eq(DateTime.parse("2006-04-18")) end end describe "#registrant_contacts" do diff --git a/spec/whois/parsers/responses/whois.iis.se/se/status_registered_spec.rb b/spec/whois/parsers/responses/whois.iis.se/se/status_registered_spec.rb index 277e713b..6582ecf0 100644 --- a/spec/whois/parsers/responses/whois.iis.se/se/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.iis.se/se/status_registered_spec.rb @@ -54,19 +54,19 @@ describe "#created_on" do it do expect(subject.created_on).to be_a(Time) - expect(subject.created_on).to eq(Time.parse("2008-10-20")) + expect(subject.created_on).to eq(DateTime.parse("2008-10-20")) end end describe "#updated_on" do it do expect(subject.updated_on).to be_a(Time) - expect(subject.updated_on).to eq(Time.parse("2013-09-18")) + expect(subject.updated_on).to eq(DateTime.parse("2013-09-18")) end end describe "#expires_on" do it do expect(subject.expires_on).to be_a(Time) - expect(subject.expires_on).to eq(Time.parse("2014-10-20")) + expect(subject.expires_on).to eq(DateTime.parse("2014-10-20")) end end describe "#registrar" do diff --git a/spec/whois/parsers/responses/whois.in.ua/in.ua/status_registered_spec.rb b/spec/whois/parsers/responses/whois.in.ua/in.ua/status_registered_spec.rb index d5b4dc5c..4b17862e 100644 --- a/spec/whois/parsers/responses/whois.in.ua/in.ua/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.in.ua/in.ua/status_registered_spec.rb @@ -39,19 +39,19 @@ describe "#created_on" do it do expect(subject.created_on).to be_a(Time) - expect(subject.created_on).to eq(Time.parse("2007-12-18 20:12:35 +02:00")) + expect(subject.created_on).to eq(DateTime.parse("2007-12-18 20:12:35 +02:00")) end end describe "#updated_on" do it do expect(subject.updated_on).to be_a(Time) - expect(subject.updated_on).to eq(Time.parse("2019-12-03 11:15:10 +02:00")) + expect(subject.updated_on).to eq(DateTime.parse("2019-12-03 11:15:10 +02:00")) end end describe "#expires_on" do it do expect(subject.expires_on).to be_a(Time) - expect(subject.expires_on).to eq(Time.parse("2020-12-20 00:00:00 +02:00")) + expect(subject.expires_on).to eq(DateTime.parse("2020-12-20 00:00:00 +02:00")) end end describe "#nameservers" do diff --git a/spec/whois/parsers/responses/whois.inregistry.net/in/status_registered_spec.rb b/spec/whois/parsers/responses/whois.inregistry.net/in/status_registered_spec.rb index b6d0d15d..5f3831ee 100644 --- a/spec/whois/parsers/responses/whois.inregistry.net/in/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.inregistry.net/in/status_registered_spec.rb @@ -53,17 +53,17 @@ end describe "#created_on" do it do - expect(subject.created_on).to eq(Time.parse("2005-02-14 20:35:14 UTC")) + expect(subject.created_on).to eq(DateTime.parse("2005-02-14 20:35:14 UTC")) end end describe "#updated_on" do it do - expect(subject.updated_on).to eq(Time.parse("2021-01-18 10:38:43 UTC")) + expect(subject.updated_on).to eq(DateTime.parse("2021-01-18 10:38:43 UTC")) end end describe "#expires_on" do it do - expect(subject.expires_on).to eq(Time.parse("2022-02-14 20:35:14 UTC")) + expect(subject.expires_on).to eq(DateTime.parse("2022-02-14 20:35:14 UTC")) end end describe "#registrar" do diff --git a/spec/whois/parsers/responses/whois.isnic.is/is/status_registered_spec.rb b/spec/whois/parsers/responses/whois.isnic.is/is/status_registered_spec.rb index 5e4286de..9a075bef 100644 --- a/spec/whois/parsers/responses/whois.isnic.is/is/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.isnic.is/is/status_registered_spec.rb @@ -39,7 +39,7 @@ describe "#created_on" do it do expect(subject.created_on).to be_a(Time) - expect(subject.created_on).to eq(Time.parse("2002-05-22")) + expect(subject.created_on).to eq(DateTime.parse("2002-05-22")) end end describe "#updated_on" do @@ -50,7 +50,7 @@ describe "#expires_on" do it do expect(subject.expires_on).to be_a(Time) - expect(subject.expires_on).to eq(Time.parse("2014-05-22")) + expect(subject.expires_on).to eq(DateTime.parse("2014-05-22")) end end describe "#nameservers" do diff --git a/spec/whois/parsers/responses/whois.isoc.org.il/il/status_registered_spec.rb b/spec/whois/parsers/responses/whois.isoc.org.il/il/status_registered_spec.rb index 69671789..da422646 100644 --- a/spec/whois/parsers/responses/whois.isoc.org.il/il/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.isoc.org.il/il/status_registered_spec.rb @@ -44,7 +44,7 @@ describe "#updated_on" do it do expect(subject.updated_on).to be_a(Time) - expect(subject.updated_on).to eq(Time.parse("2014-01-16")) + expect(subject.updated_on).to eq(DateTime.parse("2014-01-16")) end end describe "#expires_on" do diff --git a/spec/whois/parsers/responses/whois.ja.net/ac.uk/status_registered_spec.rb b/spec/whois/parsers/responses/whois.ja.net/ac.uk/status_registered_spec.rb index b4eff2e7..1a851250 100644 --- a/spec/whois/parsers/responses/whois.ja.net/ac.uk/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.ja.net/ac.uk/status_registered_spec.rb @@ -39,19 +39,19 @@ describe "#created_on" do it do expect(subject.created_on).to be_a(Time) - expect(subject.created_on).to eq(Time.parse("2003-11-07")) + expect(subject.created_on).to eq(DateTime.parse("2003-11-07")) end end describe "#updated_on" do it do expect(subject.updated_on).to be_a(Time) - expect(subject.updated_on).to eq(Time.parse("2013-03-20")) + expect(subject.updated_on).to eq(DateTime.parse("2013-03-20")) end end describe "#expires_on" do it do expect(subject.expires_on).to be_a(Time) - expect(subject.expires_on).to eq(Time.parse("2014-06-16")) + expect(subject.expires_on).to eq(DateTime.parse("2014-06-16")) end end describe "#nameservers" do diff --git a/spec/whois/parsers/responses/whois.ja.net/gov.uk/status_registered_spec.rb b/spec/whois/parsers/responses/whois.ja.net/gov.uk/status_registered_spec.rb index 1a77a4f2..5a495126 100644 --- a/spec/whois/parsers/responses/whois.ja.net/gov.uk/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.ja.net/gov.uk/status_registered_spec.rb @@ -39,19 +39,19 @@ describe "#created_on" do it do expect(subject.created_on).to be_a(Time) - expect(subject.created_on).to eq(Time.parse("2003-09-17")) + expect(subject.created_on).to eq(DateTime.parse("2003-09-17")) end end describe "#updated_on" do it do expect(subject.updated_on).to be_a(Time) - expect(subject.updated_on).to eq(Time.parse("2010-01-13")) + expect(subject.updated_on).to eq(DateTime.parse("2010-01-13")) end end describe "#expires_on" do it do expect(subject.expires_on).to be_a(Time) - expect(subject.expires_on).to eq(Time.parse("2011-03-30")) + expect(subject.expires_on).to eq(DateTime.parse("2011-03-30")) end end describe "#nameservers" do diff --git a/spec/whois/parsers/responses/whois.je/je/status_registered_spec.rb b/spec/whois/parsers/responses/whois.je/je/status_registered_spec.rb index 3d791236..6fc55676 100644 --- a/spec/whois/parsers/responses/whois.je/je/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.je/je/status_registered_spec.rb @@ -49,7 +49,7 @@ describe "#created_on" do it do expect(subject.created_on).to be_a(Time) - expect(subject.created_on).to eq(Time.parse("2002-10-31 00:00:00 UTC")) + expect(subject.created_on).to eq(DateTime.parse("2002-10-31 00:00:00 UTC")) end end describe "#updated_on" do diff --git a/spec/whois/parsers/responses/whois.jprs.jp/jp/property_updates_on_error_out-of-range_spec.rb b/spec/whois/parsers/responses/whois.jprs.jp/jp/property_updates_on_error_out-of-range_spec.rb index ec80816f..17815079 100644 --- a/spec/whois/parsers/responses/whois.jprs.jp/jp/property_updates_on_error_out-of-range_spec.rb +++ b/spec/whois/parsers/responses/whois.jprs.jp/jp/property_updates_on_error_out-of-range_spec.rb @@ -24,7 +24,7 @@ describe "#updated_on" do it do expect(subject.updated_on).to be_a(Time) - expect(subject.updated_on).to eq(Time.parse("2010-10-18 11:30:47 JST")) + expect(subject.updated_on).to eq(DateTime.parse("2010-10-18 11:30:47 JST")) end end end diff --git a/spec/whois/parsers/responses/whois.jprs.jp/jp/status_registered_spec.rb b/spec/whois/parsers/responses/whois.jprs.jp/jp/status_registered_spec.rb index fee1d039..fba388a2 100644 --- a/spec/whois/parsers/responses/whois.jprs.jp/jp/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.jprs.jp/jp/status_registered_spec.rb @@ -39,19 +39,19 @@ describe "#created_on" do it do expect(subject.created_on).to be_a(Time) - expect(subject.created_on).to eq(Time.parse("2005-05-30")) + expect(subject.created_on).to eq(DateTime.parse("2005-05-30 00:00:00 JST")) end end describe "#updated_on" do it do expect(subject.updated_on).to be_a(Time) - expect(subject.updated_on).to eq(Time.parse("2013-06-01 01:05:07")) + expect(subject.updated_on).to eq(DateTime.parse("2021-06-01 01:05:09 JST")) end end describe "#expires_on" do it do expect(subject.expires_on).to be_a(Time) - expect(subject.expires_on).to eq(Time.parse("2014-05-31")) + expect(subject.expires_on).to eq(DateTime.parse("2022-05-31 00:00:00 JST")) end end describe "#nameservers" do diff --git a/spec/whois/parsers/responses/whois.jprs.jp/jp/status_reserved_spec.rb b/spec/whois/parsers/responses/whois.jprs.jp/jp/status_reserved_spec.rb index 5d470c4c..a3ae1ff8 100644 --- a/spec/whois/parsers/responses/whois.jprs.jp/jp/status_reserved_spec.rb +++ b/spec/whois/parsers/responses/whois.jprs.jp/jp/status_reserved_spec.rb @@ -44,7 +44,7 @@ describe "#updated_on" do it do expect(subject.updated_on).to be_a(Time) - expect(subject.updated_on).to eq(Time.parse("2001-02-21 00:00:00")) + expect(subject.updated_on).to eq(DateTime.parse("2001-02-21 00:00:00 JST")) end end describe "#expires_on" do diff --git a/spec/whois/parsers/responses/whois.jprs.jp/ne.jp/status_registered_spec.rb b/spec/whois/parsers/responses/whois.jprs.jp/ne.jp/status_registered_spec.rb index 6fcdf5c7..13035822 100644 --- a/spec/whois/parsers/responses/whois.jprs.jp/ne.jp/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.jprs.jp/ne.jp/status_registered_spec.rb @@ -39,19 +39,19 @@ describe "#created_on" do it do expect(subject.created_on).to be_a(Time) - expect(subject.created_on).to eq(Time.parse("2003-09-11")) + expect(subject.created_on).to eq(DateTime.parse("2003-09-11 00:00:00 JST")) end end describe "#updated_on" do it do expect(subject.updated_on).to be_a(Time) - expect(subject.updated_on).to eq(Time.parse("2009-10-23 19:22:08")) + expect(subject.updated_on).to eq(DateTime.parse("2009-10-23 19:22:08 JST")) end end describe "#expires_on" do it do expect(subject.expires_on).to be_a(Time) - expect(subject.expires_on).to eq(Time.parse("2010-09-30")) + expect(subject.expires_on).to eq(DateTime.parse("2010-09-30 00:00:00 JST")) end end describe "#nameservers" do diff --git a/spec/whois/parsers/responses/whois.kenic.or.ke/ke/status_registered_spec.rb b/spec/whois/parsers/responses/whois.kenic.or.ke/ke/status_registered_spec.rb index 9591d800..9934675d 100644 --- a/spec/whois/parsers/responses/whois.kenic.or.ke/ke/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.kenic.or.ke/ke/status_registered_spec.rb @@ -39,19 +39,19 @@ describe "#created_on" do it do expect(subject.created_on).to be_a(Time) - expect(subject.created_on).to eq(Time.parse("2003-04-18 00:00:00 EAT")) + expect(subject.created_on).to eq(DateTime.parse("2003-04-18 00:00:00 EAT")) end end describe "#updated_on" do it do expect(subject.updated_on).to be_a(Time) - expect(subject.updated_on).to eq(Time.parse("2013-12-16 12:48:00 EAT")) + expect(subject.updated_on).to eq(DateTime.parse("2013-12-16 12:48:00 EAT")) end end describe "#expires_on" do it do expect(subject.expires_on).to be_a(Time) - expect(subject.expires_on).to eq(Time.parse("2015-01-01 00:00:00 EAT")) + expect(subject.expires_on).to eq(DateTime.parse("2015-01-01 00:00:00 EAT")) end end describe "#nameservers" do diff --git a/spec/whois/parsers/responses/whois.kg/kg/status_registered_spec.rb b/spec/whois/parsers/responses/whois.kg/kg/status_registered_spec.rb index 72093eea..c137e8eb 100644 --- a/spec/whois/parsers/responses/whois.kg/kg/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.kg/kg/status_registered_spec.rb @@ -39,19 +39,19 @@ describe "#created_on" do it do expect(subject.created_on).to be_a(Time) - expect(subject.created_on).to eq(Time.parse("2004-02-10 09:42:42")) + expect(subject.created_on).to eq(DateTime.parse("2004-02-10 09:42:42")) end end describe "#updated_on" do it do expect(subject.updated_on).to be_a(Time) - expect(subject.updated_on).to eq(Time.parse("2010-04-19 21:47:14")) + expect(subject.updated_on).to eq(DateTime.parse("2010-04-19 21:47:14")) end end describe "#expires_on" do it do expect(subject.expires_on).to be_a(Time) - expect(subject.expires_on).to eq(Time.parse("2014-03-30 23:59:00")) + expect(subject.expires_on).to eq(DateTime.parse("2014-03-30 23:59:00")) end end describe "#nameservers" do diff --git a/spec/whois/parsers/responses/whois.kr/kr/status_registered_spec.rb b/spec/whois/parsers/responses/whois.kr/kr/status_registered_spec.rb index e460096a..dd3840c8 100644 --- a/spec/whois/parsers/responses/whois.kr/kr/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.kr/kr/status_registered_spec.rb @@ -39,19 +39,19 @@ describe "#created_on" do it do expect(subject.created_on).to be_a(Time) - expect(subject.created_on).to eq(Time.parse("2007-03-02")) + expect(subject.created_on).to eq(DateTime.parse("2007-03-02")) end end describe "#updated_on" do it do expect(subject.updated_on).to be_a(Time) - expect(subject.updated_on).to eq(Time.parse("2010-10-04")) + expect(subject.updated_on).to eq(DateTime.parse("2010-10-04")) end end describe "#expires_on" do it do expect(subject.expires_on).to be_a(Time) - expect(subject.expires_on).to eq(Time.parse("2015-03-02")) + expect(subject.expires_on).to eq(DateTime.parse("2015-03-02")) end end describe "#nameservers" do diff --git a/spec/whois/parsers/responses/whois.markmonitor.com/status_registered_spec.rb b/spec/whois/parsers/responses/whois.markmonitor.com/status_registered_spec.rb index 9e0997ee..89c53d7c 100644 --- a/spec/whois/parsers/responses/whois.markmonitor.com/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.markmonitor.com/status_registered_spec.rb @@ -49,19 +49,19 @@ describe "#created_on" do it do expect(subject.created_on).to be_a(Time) - expect(subject.created_on).to eq(Time.parse("2002-10-02 00:00:00 -0700")) + expect(subject.created_on).to eq(DateTime.parse("2002-10-02 00:00:00 -0700")) end end describe "#updated_on" do it do expect(subject.updated_on).to be_a(Time) - expect(subject.updated_on).to eq(Time.parse("2013-10-29 11:50:06 -0700")) + expect(subject.updated_on).to eq(DateTime.parse("2013-10-29 11:50:06 -0700")) end end describe "#expires_on" do it do expect(subject.expires_on).to be_a(Time) - expect(subject.expires_on).to eq(Time.parse("2020-09-13 21:00:00 -0700")) + expect(subject.expires_on).to eq(DateTime.parse("2020-09-13 21:00:00 -0700")) end end describe "#registrar" do diff --git a/spec/whois/parsers/responses/whois.museum/museum/status_registered_spec.rb b/spec/whois/parsers/responses/whois.museum/museum/status_registered_spec.rb index ffc335af..4289ba6c 100644 --- a/spec/whois/parsers/responses/whois.museum/museum/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.museum/museum/status_registered_spec.rb @@ -39,19 +39,19 @@ describe "#created_on" do it do expect(subject.created_on).to be_a(Time) - expect(subject.created_on).to eq(Time.parse("2001-11-10 15:23:42 UTC")) + expect(subject.created_on).to eq(DateTime.parse("2001-11-10 15:23:42 UTC")) end end describe "#updated_on" do it do expect(subject.updated_on).to be_a(Time) - expect(subject.updated_on).to eq(Time.parse("2002-04-04 17:48:43 UTC")) + expect(subject.updated_on).to eq(DateTime.parse("2002-04-04 17:48:43 UTC")) end end describe "#expires_on" do it do expect(subject.expires_on).to be_a(Time) - expect(subject.expires_on).to eq(Time.parse("2003-07-31 11:00:00 UTC")) + expect(subject.expires_on).to eq(DateTime.parse("2003-07-31 11:00:00 UTC")) end end describe "#nameservers" do diff --git a/spec/whois/parsers/responses/whois.mynic.my/my/status_registered_spec.rb b/spec/whois/parsers/responses/whois.mynic.my/my/status_registered_spec.rb index 2569b46b..afd26d77 100644 --- a/spec/whois/parsers/responses/whois.mynic.my/my/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.mynic.my/my/status_registered_spec.rb @@ -39,19 +39,19 @@ describe "#created_on" do it do expect(subject.created_on).to be_a(Time) - expect(subject.created_on).to eq(Time.parse("2009-05-13")) + expect(subject.created_on).to eq(DateTime.parse("2009-05-13")) end end describe "#updated_on" do it do expect(subject.updated_on).to be_a(Time) - expect(subject.updated_on).to eq(Time.parse("2013-10-11")) + expect(subject.updated_on).to eq(DateTime.parse("2013-10-11")) end end describe "#expires_on" do it do expect(subject.expires_on).to be_a(Time) - expect(subject.expires_on).to eq(Time.parse("2014-05-13")) + expect(subject.expires_on).to eq(DateTime.parse("2014-05-13")) end end describe "#nameservers" do diff --git a/spec/whois/parsers/responses/whois.na-nic.com.na/na/status_registered_spec.rb b/spec/whois/parsers/responses/whois.na-nic.com.na/na/status_registered_spec.rb index 9f8a5b48..1e2dbd06 100644 --- a/spec/whois/parsers/responses/whois.na-nic.com.na/na/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.na-nic.com.na/na/status_registered_spec.rb @@ -49,19 +49,19 @@ describe "#created_on" do it do expect(subject.created_on).to be_a(Time) - expect(subject.created_on).to eq(Time.parse("2007-03-27 22:00:00 UTC")) + expect(subject.created_on).to eq(DateTime.parse("2007-03-27 22:00:00 UTC")) end end describe "#updated_on" do it do expect(subject.updated_on).to be_a(Time) - expect(subject.updated_on).to eq(Time.parse("2013-07-22 17:07:58 UTC")) + expect(subject.updated_on).to eq(DateTime.parse("2013-07-22 17:07:58 UTC")) end end describe "#expires_on" do it do expect(subject.expires_on).to be_a(Time) - expect(subject.expires_on).to eq(Time.parse("2014-08-19 23:00:00 UTC")) + expect(subject.expires_on).to eq(DateTime.parse("2014-08-19 23:00:00 UTC")) end end describe "#registrar" do diff --git a/spec/whois/parsers/responses/whois.nc/nc/status_registered_spec.rb b/spec/whois/parsers/responses/whois.nc/nc/status_registered_spec.rb index 91f8392d..ab3de1d1 100644 --- a/spec/whois/parsers/responses/whois.nc/nc/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.nc/nc/status_registered_spec.rb @@ -54,19 +54,19 @@ describe "#created_on" do it do expect(subject.created_on).to be_a(Time) - expect(subject.created_on).to eq(Time.parse("2006-05-14")) + expect(subject.created_on).to eq(DateTime.parse("2006-05-14")) end end describe "#updated_on" do it do expect(subject.updated_on).to be_a(Time) - expect(subject.updated_on).to eq(Time.parse("2013-04-03")) + expect(subject.updated_on).to eq(DateTime.parse("2013-04-03")) end end describe "#expires_on" do it do expect(subject.expires_on).to be_a(Time) - expect(subject.expires_on).to eq(Time.parse("2016-05-14")) + expect(subject.expires_on).to eq(DateTime.parse("2016-05-14")) end end describe "#registrar" do diff --git a/spec/whois/parsers/responses/whois.netcom.cm/cm/status_registered_spec.rb b/spec/whois/parsers/responses/whois.netcom.cm/cm/status_registered_spec.rb index 4c2d5a38..c73ec2fa 100644 --- a/spec/whois/parsers/responses/whois.netcom.cm/cm/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.netcom.cm/cm/status_registered_spec.rb @@ -49,19 +49,19 @@ describe "#created_on" do it do expect(subject.created_on).to be_a(Time) - expect(subject.created_on).to eq(Time.parse("2009-10-07 10:02 WAT")) + expect(subject.created_on).to eq(DateTime.parse("2009-10-07 10:02 WAT")) end end describe "#updated_on" do it do expect(subject.updated_on).to be_a(Time) - expect(subject.updated_on).to eq(Time.parse("2013-09-20 17:47 WAT")) + expect(subject.updated_on).to eq(DateTime.parse("2013-09-20 17:47 WAT")) end end describe "#expires_on" do it do expect(subject.expires_on).to be_a(Time) - expect(subject.expires_on).to eq(Time.parse("2014-10-07 10:02 WAT")) + expect(subject.expires_on).to eq(DateTime.parse("2014-10-07 10:02 WAT")) end end describe "#registrar" do diff --git a/spec/whois/parsers/responses/whois.netcom.cm/cm/status_suspended_spec.rb b/spec/whois/parsers/responses/whois.netcom.cm/cm/status_suspended_spec.rb index a3c25afc..cb47eb7a 100644 --- a/spec/whois/parsers/responses/whois.netcom.cm/cm/status_suspended_spec.rb +++ b/spec/whois/parsers/responses/whois.netcom.cm/cm/status_suspended_spec.rb @@ -49,19 +49,19 @@ describe "#created_on" do it do expect(subject.created_on).to be_a(Time) - expect(subject.created_on).to eq(Time.parse("2009-08-28 01:00 WAT")) + expect(subject.created_on).to eq(DateTime.parse("2009-08-28 01:00 WAT")) end end describe "#updated_on" do it do expect(subject.updated_on).to be_a(Time) - expect(subject.updated_on).to eq(Time.parse("2014-01-24 09:17 WAT")) + expect(subject.updated_on).to eq(DateTime.parse("2014-01-24 09:17 WAT")) end end describe "#expires_on" do it do expect(subject.expires_on).to be_a(Time) - expect(subject.expires_on).to eq(Time.parse("2011-08-28 01:00 WAT")) + expect(subject.expires_on).to eq(DateTime.parse("2011-08-28 01:00 WAT")) end end describe "#registrar" do diff --git a/spec/whois/parsers/responses/whois.networksolutions.com/status_registered_spec.rb b/spec/whois/parsers/responses/whois.networksolutions.com/status_registered_spec.rb index d2404645..775c08a8 100644 --- a/spec/whois/parsers/responses/whois.networksolutions.com/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.networksolutions.com/status_registered_spec.rb @@ -49,19 +49,19 @@ describe "#created_on" do it do expect(subject.created_on).to be_a(Time) - expect(subject.created_on).to eq(Time.parse("1997-06-10")) + expect(subject.created_on).to eq(DateTime.parse("1997-06-10")) end end describe "#updated_on" do it do expect(subject.updated_on).to be_a(Time) - expect(subject.updated_on).to eq(Time.parse("2012-02-13")) + expect(subject.updated_on).to eq(DateTime.parse("2012-02-13")) end end describe "#expires_on" do it do expect(subject.expires_on).to be_a(Time) - expect(subject.expires_on).to eq(Time.parse("2014-06-09")) + expect(subject.expires_on).to eq(DateTime.parse("2014-06-09")) end end describe "#registrar" do diff --git a/spec/whois/parsers/responses/whois.nic.ac/ac/status_registered_spec.rb b/spec/whois/parsers/responses/whois.nic.ac/ac/status_registered_spec.rb index 90980fdb..561c0f7d 100644 --- a/spec/whois/parsers/responses/whois.nic.ac/ac/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.nic.ac/ac/status_registered_spec.rb @@ -54,19 +54,19 @@ describe "#created_on" do it do expect(subject.created_on).to be_a(Time) - expect(subject.created_on).to eq(Time.parse("2006-04-03 13:38:02 UTC")) + expect(subject.created_on).to eq(DateTime.parse("2006-04-03 13:38:02 UTC")) end end describe "#updated_on" do it do expect(subject.updated_on).to be_a(Time) - expect(subject.updated_on).to eq(Time.parse("2019-03-02T10:33:12 UTC")) + expect(subject.updated_on).to eq(DateTime.parse("2019-03-02T10:33:12 UTC")) end end describe "#expires_on" do it do expect(subject.expires_on).to be_a(Time) - expect(subject.expires_on).to eq(Time.parse("2020-04-03 13:38:02 UTC")) + expect(subject.expires_on).to eq(DateTime.parse("2020-04-03 13:38:02 UTC")) end end describe "#registrar" do diff --git a/spec/whois/parsers/responses/whois.nic.af/af/status_registered_spec.rb b/spec/whois/parsers/responses/whois.nic.af/af/status_registered_spec.rb index 53e3b12d..dfed97a3 100644 --- a/spec/whois/parsers/responses/whois.nic.af/af/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.nic.af/af/status_registered_spec.rb @@ -49,19 +49,19 @@ describe "#created_on" do it do expect(subject.created_on).to be_a(Time) - expect(subject.created_on).to eq(Time.parse("2009-10-05 03:51:17 UTC")) + expect(subject.created_on).to eq(DateTime.parse("2009-10-05 03:51:17 UTC")) end end describe "#updated_on" do it do expect(subject.updated_on).to be_a(Time) - expect(subject.updated_on).to eq(Time.parse("2014-01-16 06:50:48 UTC")) + expect(subject.updated_on).to eq(DateTime.parse("2014-01-16 06:50:48 UTC")) end end describe "#expires_on" do it do expect(subject.expires_on).to be_a(Time) - expect(subject.expires_on).to eq(Time.parse("2014-05-05 03:51:17 UTC")) + expect(subject.expires_on).to eq(DateTime.parse("2014-05-05 03:51:17 UTC")) end end describe "#registrar" do diff --git a/spec/whois/parsers/responses/whois.nic.ag/ag/status_registered_spec.rb b/spec/whois/parsers/responses/whois.nic.ag/ag/status_registered_spec.rb index aa2c1724..cd977ed8 100644 --- a/spec/whois/parsers/responses/whois.nic.ag/ag/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.nic.ag/ag/status_registered_spec.rb @@ -54,19 +54,19 @@ describe "#created_on" do it do expect(subject.created_on).to be_a(Time) - expect(subject.created_on).to eq(Time.parse("2003-01-05 14:06:59 UTC")) + expect(subject.created_on).to eq(DateTime.parse("2003-01-05 14:06:59 UTC")) end end describe "#updated_on" do it do expect(subject.updated_on).to be_a(Time) - expect(subject.updated_on).to eq(Time.parse("2020-12-04 10:29:47 UTC")) + expect(subject.updated_on).to eq(DateTime.parse("2020-12-04 10:29:47 UTC")) end end describe "#expires_on" do it do expect(subject.expires_on).to be_a(Time) - expect(subject.expires_on).to eq(Time.parse("2022-01-05 14:06:59 UTC")) + expect(subject.expires_on).to eq(DateTime.parse("2022-01-05 14:06:59 UTC")) end end describe "#registrar" do diff --git a/spec/whois/parsers/responses/whois.nic.asia/asia/status_registered_spec.rb b/spec/whois/parsers/responses/whois.nic.asia/asia/status_registered_spec.rb index 40705db3..0991455d 100644 --- a/spec/whois/parsers/responses/whois.nic.asia/asia/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.nic.asia/asia/status_registered_spec.rb @@ -54,19 +54,19 @@ describe "#created_on" do it do expect(subject.created_on).to be_a(Time) - expect(subject.created_on).to eq(Time.parse("2008-01-15 11:28:02 UTC")) + expect(subject.created_on).to eq(DateTime.parse("2008-01-15 11:28:02 UTC")) end end describe "#updated_on" do it do expect(subject.updated_on).to be_a(Time) - expect(subject.updated_on).to eq(Time.parse("2020-01-15 22:20:23 UTC")) + expect(subject.updated_on).to eq(DateTime.parse("2020-01-15 22:20:23 UTC")) end end describe "#expires_on" do it do expect(subject.expires_on).to be_a(Time) - expect(subject.expires_on).to eq(Time.parse("2021-01-15 11:28:02 UTC")) + expect(subject.expires_on).to eq(DateTime.parse("2021-01-15 11:28:02 UTC")) end end describe "#registrar" do diff --git a/spec/whois/parsers/responses/whois.nic.at/at/status_registered_spec.rb b/spec/whois/parsers/responses/whois.nic.at/at/status_registered_spec.rb index 9fa0c9b1..9347b50e 100644 --- a/spec/whois/parsers/responses/whois.nic.at/at/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.nic.at/at/status_registered_spec.rb @@ -44,7 +44,7 @@ describe "#updated_on" do it do expect(subject.updated_on).to be_a(Time) - expect(subject.updated_on).to eq(Time.parse("2011-04-26 17:57:27")) + expect(subject.updated_on).to eq(DateTime.parse("2011-04-26 17:57:27")) end end describe "#expires_on" do diff --git a/spec/whois/parsers/responses/whois.nic.bj/bj/status_registered_spec.rb b/spec/whois/parsers/responses/whois.nic.bj/bj/status_registered_spec.rb index fe625468..031c7b7c 100644 --- a/spec/whois/parsers/responses/whois.nic.bj/bj/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.nic.bj/bj/status_registered_spec.rb @@ -54,13 +54,13 @@ describe "#created_on" do it do expect(subject.created_on).to be_a(Time) - expect(subject.created_on).to eq(Time.parse("2009-03-25 01:57:22 PDT")) + expect(subject.created_on).to eq(DateTime.parse("2009-03-25 01:57:22 PDT")) end end describe "#updated_on" do it do expect(subject.updated_on).to be_a(Time) - expect(subject.updated_on).to eq(Time.parse("2012-08-10 01:57:22 PDT")) + expect(subject.updated_on).to eq(DateTime.parse("2012-08-10 01:57:22 PDT")) end end describe "#expires_on" do diff --git a/spec/whois/parsers/responses/whois.nic.bo/bo/status_registered_spec.rb b/spec/whois/parsers/responses/whois.nic.bo/bo/status_registered_spec.rb index aafdf476..b25915e7 100644 --- a/spec/whois/parsers/responses/whois.nic.bo/bo/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.nic.bo/bo/status_registered_spec.rb @@ -49,7 +49,7 @@ describe "#created_on" do it do expect(subject.created_on).to be_a(Time) - expect(subject.created_on).to eq(Time.parse("2006-08-22")) + expect(subject.created_on).to eq(DateTime.parse("2006-08-22")) end end describe "#updated_on" do @@ -60,7 +60,7 @@ describe "#expires_on" do it do expect(subject.expires_on).to be_a(Time) - expect(subject.expires_on).to eq(Time.parse("2014-08-22")) + expect(subject.expires_on).to eq(DateTime.parse("2014-08-22")) end end describe "#nameservers" do diff --git a/spec/whois/parsers/responses/whois.nic.ci/ci/status_registered_spec.rb b/spec/whois/parsers/responses/whois.nic.ci/ci/status_registered_spec.rb index 7967b4da..d7dada4c 100644 --- a/spec/whois/parsers/responses/whois.nic.ci/ci/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.nic.ci/ci/status_registered_spec.rb @@ -39,7 +39,7 @@ describe "#created_on" do it do expect(subject.created_on).to be_a(Time) - expect(subject.created_on).to eq(Time.parse("2006-01-27 11:14:47")) + expect(subject.created_on).to eq(DateTime.parse("2006-01-27 11:14:47")) end end describe "#updated_on" do @@ -50,7 +50,7 @@ describe "#expires_on" do it do expect(subject.expires_on).to be_a(Time) - expect(subject.expires_on).to eq(Time.parse("2014-02-14 11:14:47")) + expect(subject.expires_on).to eq(DateTime.parse("2014-02-14 11:14:47")) end end describe "#nameservers" do diff --git a/spec/whois/parsers/responses/whois.nic.co/co/status_registered_spec.rb b/spec/whois/parsers/responses/whois.nic.co/co/status_registered_spec.rb index e3c90f72..bac8c78c 100644 --- a/spec/whois/parsers/responses/whois.nic.co/co/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.nic.co/co/status_registered_spec.rb @@ -49,19 +49,19 @@ describe "#created_on" do it do expect(subject.created_on).to be_a(Time) - expect(subject.created_on).to eq(Time.parse("2010-04-26 07:50:40 GMT")) + expect(subject.created_on).to eq(DateTime.parse("2010-04-26 07:50:40 GMT")) end end describe "#updated_on" do it do expect(subject.updated_on).to be_a(Time) - expect(subject.updated_on).to eq(Time.parse("2013-10-14 13:03:24 GMT")) + expect(subject.updated_on).to eq(DateTime.parse("2013-10-14 13:03:24 GMT")) end end describe "#expires_on" do it do expect(subject.expires_on).to be_a(Time) - expect(subject.expires_on).to eq(Time.parse("2016-04-25 23:59:59 GMT")) + expect(subject.expires_on).to eq(DateTime.parse("2016-04-25 23:59:59 GMT")) end end describe "#registrar" do diff --git a/spec/whois/parsers/responses/whois.nic.college/college/status_registered_spec.rb b/spec/whois/parsers/responses/whois.nic.college/college/status_registered_spec.rb index cb780a73..f2f82ee8 100644 --- a/spec/whois/parsers/responses/whois.nic.college/college/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.nic.college/college/status_registered_spec.rb @@ -54,19 +54,19 @@ describe "#created_on" do it do expect(subject.created_on).to be_a(Time) - expect(subject.created_on).to eq(Time.parse("2013-09-11 00:00:00 UTC")) + expect(subject.created_on).to eq(DateTime.parse("2013-09-11 00:00:00 UTC")) end end describe "#updated_on" do it do expect(subject.updated_on).to be_a(Time) - expect(subject.updated_on).to eq(Time.parse("2014-09-12 00:15:47 UTC")) + expect(subject.updated_on).to eq(DateTime.parse("2014-09-12 00:15:47 UTC")) end end describe "#expires_on" do it do expect(subject.expires_on).to be_a(Time) - expect(subject.expires_on).to eq(Time.parse("2015-09-11 23:59:59 UTC")) + expect(subject.expires_on).to eq(DateTime.parse("2015-09-11 23:59:59 UTC")) end end describe "#registrar" do diff --git a/spec/whois/parsers/responses/whois.nic.coop/coop/status_registered_spec.rb b/spec/whois/parsers/responses/whois.nic.coop/coop/status_registered_spec.rb index 7468f294..c9a3552e 100644 --- a/spec/whois/parsers/responses/whois.nic.coop/coop/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.nic.coop/coop/status_registered_spec.rb @@ -39,19 +39,19 @@ describe "#created_on" do it do expect(subject.created_on).to be_a(Time) - expect(subject.created_on).to eq(Time.parse("2002-01-31 22:12:44 UTC")) + expect(subject.created_on).to eq(DateTime.parse("2002-01-31 22:12:44 UTC")) end end describe "#updated_on" do it do expect(subject.updated_on).to be_a(Time) - expect(subject.updated_on).to eq(Time.parse("2012-01-04 18:30:54 UTC")) + expect(subject.updated_on).to eq(DateTime.parse("2012-01-04 18:30:54 UTC")) end end describe "#expires_on" do it do expect(subject.expires_on).to be_a(Time) - expect(subject.expires_on).to eq(Time.parse("2017-01-31 22:12:44 UTC")) + expect(subject.expires_on).to eq(DateTime.parse("2017-01-31 22:12:44 UTC")) end end describe "#nameservers" do diff --git a/spec/whois/parsers/responses/whois.nic.cx/cx/status_registered_spec.rb b/spec/whois/parsers/responses/whois.nic.cx/cx/status_registered_spec.rb index 40b6ce89..c001af22 100644 --- a/spec/whois/parsers/responses/whois.nic.cx/cx/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.nic.cx/cx/status_registered_spec.rb @@ -49,19 +49,19 @@ describe "#created_on" do it do expect(subject.created_on).to be_a(Time) - expect(subject.created_on).to eq(Time.parse("2010-07-29 18:15:42 UTC")) + expect(subject.created_on).to eq(DateTime.parse("2010-07-29 18:15:42 UTC")) end end describe "#updated_on" do it do expect(subject.updated_on).to be_a(Time) - expect(subject.updated_on).to eq(Time.parse("2014-06-28 09:18:02 UTC")) + expect(subject.updated_on).to eq(DateTime.parse("2014-06-28 09:18:02 UTC")) end end describe "#expires_on" do it do expect(subject.expires_on).to be_a(Time) - expect(subject.expires_on).to eq(Time.parse("2015-07-29 18:15:42 UTC")) + expect(subject.expires_on).to eq(DateTime.parse("2015-07-29 18:15:42 UTC")) end end describe "#registrar" do diff --git a/spec/whois/parsers/responses/whois.nic.cz/cz/case_nset_contact_same_name_spec.rb b/spec/whois/parsers/responses/whois.nic.cz/cz/case_nset_contact_same_name_spec.rb index 1b0d7596..304eb36a 100644 --- a/spec/whois/parsers/responses/whois.nic.cz/cz/case_nset_contact_same_name_spec.rb +++ b/spec/whois/parsers/responses/whois.nic.cz/cz/case_nset_contact_same_name_spec.rb @@ -38,7 +38,7 @@ expect(subject.technical_contacts[0].phone).to eq(nil) expect(subject.technical_contacts[0].fax).to eq(nil) expect(subject.technical_contacts[0].email).to eq("info@webareal.cz") - expect(subject.technical_contacts[0].created_on).to eq(Time.parse("2009-04-10 14:48:02")) + expect(subject.technical_contacts[0].created_on).to eq(DateTime.parse("2009-04-10 14:48:02")) end end end diff --git a/spec/whois/parsers/responses/whois.nic.cz/cz/response_with_keyset_spec.rb b/spec/whois/parsers/responses/whois.nic.cz/cz/response_with_keyset_spec.rb index 72e7c1c4..824db69d 100644 --- a/spec/whois/parsers/responses/whois.nic.cz/cz/response_with_keyset_spec.rb +++ b/spec/whois/parsers/responses/whois.nic.cz/cz/response_with_keyset_spec.rb @@ -24,19 +24,19 @@ describe "#created_on" do it do expect(subject.created_on).to be_a(Time) - expect(subject.created_on).to eq(Time.parse("2006-01-30 18:55:00")) + expect(subject.created_on).to eq(DateTime.parse("2006-01-30 18:55:00")) end end describe "#updated_on" do it do expect(subject.updated_on).to be_a(Time) - expect(subject.updated_on).to eq(Time.parse("2010-03-06 15:53:04")) + expect(subject.updated_on).to eq(DateTime.parse("2010-03-06 15:53:04")) end end describe "#expires_on" do it do expect(subject.expires_on).to be_a(Time) - expect(subject.expires_on).to eq(Time.parse("2014-01-30")) + expect(subject.expires_on).to eq(DateTime.parse("2014-01-30")) end end end diff --git a/spec/whois/parsers/responses/whois.nic.cz/cz/status_registered_spec.rb b/spec/whois/parsers/responses/whois.nic.cz/cz/status_registered_spec.rb index 6cdf6e3f..80faa297 100644 --- a/spec/whois/parsers/responses/whois.nic.cz/cz/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.nic.cz/cz/status_registered_spec.rb @@ -49,19 +49,19 @@ describe "#created_on" do it do expect(subject.created_on).to be_a(Time) - expect(subject.created_on).to eq(Time.parse("2000-07-21 15:21:00")) + expect(subject.created_on).to eq(DateTime.parse("2000-07-21 15:21:00")) end end describe "#updated_on" do it do expect(subject.updated_on).to be_a(Time) - expect(subject.updated_on).to eq(Time.parse("2011-05-18 23:28:45")) + expect(subject.updated_on).to eq(DateTime.parse("2011-05-18 23:28:45")) end end describe "#expires_on" do it do expect(subject.expires_on).to be_a(Time) - expect(subject.expires_on).to eq(Time.parse("2014-07-22")) + expect(subject.expires_on).to eq(DateTime.parse("2014-07-22 00:00:00")) end end describe "#registrar" do @@ -90,7 +90,7 @@ expect(subject.registrant_contacts[0].phone).to eq(nil) expect(subject.registrant_contacts[0].fax).to eq(nil) expect(subject.registrant_contacts[0].email).to eq("dns-admin@google.com") - expect(subject.registrant_contacts[0].created_on).to eq(Time.parse("2011-05-18 23:28:26")) + expect(subject.registrant_contacts[0].created_on).to eq(DateTime.parse("2011-05-18 23:28:26")) end end describe "#admin_contacts" do @@ -111,7 +111,7 @@ expect(subject.admin_contacts[0].phone).to eq(nil) expect(subject.admin_contacts[0].fax).to eq(nil) expect(subject.admin_contacts[0].email).to eq("dns-admin@google.com") - expect(subject.admin_contacts[0].created_on).to eq(Time.parse("2011-05-18 23:28:26")) + expect(subject.admin_contacts[0].created_on).to eq(DateTime.parse("2011-05-18 23:28:26")) end end describe "#technical_contacts" do @@ -131,7 +131,7 @@ expect(subject.technical_contacts[0].phone).to eq(nil) expect(subject.technical_contacts[0].fax).to eq(nil) expect(subject.technical_contacts[0].email).to eq("ccops@markmonitor.com") - expect(subject.technical_contacts[0].created_on).to eq(Time.parse("2011-02-03 18:24:34")) + expect(subject.technical_contacts[0].created_on).to eq(DateTime.parse("2011-02-03 18:24:34")) end end describe "#nameservers" do diff --git a/spec/whois/parsers/responses/whois.nic.design/design/status_registered_spec.rb b/spec/whois/parsers/responses/whois.nic.design/design/status_registered_spec.rb index b152dca3..3130c501 100644 --- a/spec/whois/parsers/responses/whois.nic.design/design/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.nic.design/design/status_registered_spec.rb @@ -54,19 +54,19 @@ describe "#created_on" do it do expect(subject.created_on).to be_a(Time) - expect(subject.created_on).to eq(Time.parse("2015-02-27 16:08:32 UTC")) + expect(subject.created_on).to eq(DateTime.parse("2015-02-27 16:08:32 UTC")) end end describe "#updated_on" do it do expect(subject.updated_on).to be_a(Time) - expect(subject.updated_on).to eq(Time.parse("2015-04-21 17:48:34 UTC")) + expect(subject.updated_on).to eq(DateTime.parse("2015-04-21 17:48:34 UTC")) end end describe "#expires_on" do it do expect(subject.expires_on).to be_a(Time) - expect(subject.expires_on).to eq(Time.parse("2016-02-27 23:59:59 UTC")) + expect(subject.expires_on).to eq(DateTime.parse("2016-02-27 23:59:59 UTC")) end end describe "#registrar" do diff --git a/spec/whois/parsers/responses/whois.nic.dm/dm/status_registered_spec.rb b/spec/whois/parsers/responses/whois.nic.dm/dm/status_registered_spec.rb index 37c2efff..7c22763e 100644 --- a/spec/whois/parsers/responses/whois.nic.dm/dm/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.nic.dm/dm/status_registered_spec.rb @@ -54,19 +54,19 @@ describe "#created_on" do it do expect(subject.created_on).to be_a(Time) - expect(subject.created_on).to eq(Time.parse("2004-08-23 23:00:00")) + expect(subject.created_on).to eq(DateTime.parse("2004-08-23 23:00:00")) end end describe "#updated_on" do it do expect(subject.updated_on).to be_a(Time) - expect(subject.updated_on).to eq(Time.parse("2013-07-23 17:50:34")) + expect(subject.updated_on).to eq(DateTime.parse("2013-07-23 17:50:34")) end end describe "#expires_on" do it do expect(subject.expires_on).to be_a(Time) - expect(subject.expires_on).to eq(Time.parse("2014-08-23 23:00:00")) + expect(subject.expires_on).to eq(DateTime.parse("2014-08-23 23:00:00")) end end describe "#registrar" do diff --git a/spec/whois/parsers/responses/whois.nic.ec/ex/status_registered_spec.rb b/spec/whois/parsers/responses/whois.nic.ec/ex/status_registered_spec.rb index 49d0fc94..fc266587 100644 --- a/spec/whois/parsers/responses/whois.nic.ec/ex/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.nic.ec/ex/status_registered_spec.rb @@ -49,19 +49,19 @@ describe "#created_on" do it do expect(subject.created_on).to be_a(Time) - expect(subject.created_on).to eq(Time.parse("2003-10-16 00:00:00")) + expect(subject.created_on).to eq(DateTime.parse("2003-10-16 00:00:00")) end end describe "#updated_on" do it do expect(subject.updated_on).to be_a(Time) - expect(subject.updated_on).to eq(Time.parse("2013-09-17 00:00:00")) + expect(subject.updated_on).to eq(DateTime.parse("2013-09-17 00:00:00")) end end describe "#expires_on" do it do expect(subject.expires_on).to be_a(Time) - expect(subject.expires_on).to eq(Time.parse("2014-10-16 00:00:00")) + expect(subject.expires_on).to eq(DateTime.parse("2014-10-16 00:00:00")) end end describe "#registrar" do diff --git a/spec/whois/parsers/responses/whois.nic.es/es/status_registered_spec.rb b/spec/whois/parsers/responses/whois.nic.es/es/status_registered_spec.rb index 54ac7556..79bb6c0e 100644 --- a/spec/whois/parsers/responses/whois.nic.es/es/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.nic.es/es/status_registered_spec.rb @@ -49,7 +49,7 @@ describe "#created_on" do it do expect(subject.created_on).to be_a(Time) - expect(subject.created_on).to eq(Time.parse("16/09/03")) + expect(subject.created_on).to eq(DateTime.parse("2003-09-16")) end end describe "#updated_on" do @@ -60,7 +60,7 @@ describe "#expires_on" do it do expect(subject.expires_on).to be_a(Time) - expect(subject.expires_on).to eq(Time.parse("16/09/14")) + expect(subject.expires_on).to eq(DateTime.parse("2014-09-16")) end end describe "#registrar" do diff --git a/spec/whois/parsers/responses/whois.nic.fm/fm/status_registered_spec.rb b/spec/whois/parsers/responses/whois.nic.fm/fm/status_registered_spec.rb index c6f2cda5..73b8ba01 100644 --- a/spec/whois/parsers/responses/whois.nic.fm/fm/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.nic.fm/fm/status_registered_spec.rb @@ -49,19 +49,19 @@ describe "#created_on" do it do expect(subject.created_on).to be_a(Time) - expect(subject.created_on).to eq(Time.parse("2000-09-05T23:59:59.0Z")) + expect(subject.created_on).to eq(DateTime.parse("2000-09-05T23:59:59.0Z")) end end describe "#updated_on" do it do expect(subject.updated_on).to be_a(Time) - expect(subject.updated_on).to eq(Time.parse("2017-10-20T17:48:39.0Z")) + expect(subject.updated_on).to eq(DateTime.parse("2017-10-20T17:48:39.0Z")) end end describe "#expires_on" do it do expect(subject.expires_on).to be_a(Time) - expect(subject.expires_on).to eq(Time.parse("2018-09-04T23:59:59.0Z")) + expect(subject.expires_on).to eq(DateTime.parse("2018-09-04T23:59:59.0Z")) end end describe "#registrar" do diff --git a/spec/whois/parsers/responses/whois.nic.fo/fo/status_registered_spec.rb b/spec/whois/parsers/responses/whois.nic.fo/fo/status_registered_spec.rb index 7f18b782..d9573d82 100644 --- a/spec/whois/parsers/responses/whois.nic.fo/fo/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.nic.fo/fo/status_registered_spec.rb @@ -49,19 +49,19 @@ describe "#created_on" do it do expect(subject.created_on).to be_a(Time) - expect(subject.created_on).to eq(Time.parse("2010-06-03 03:34:05")) + expect(subject.created_on).to eq(DateTime.parse("2010-06-03 03:34:05")) end end describe "#updated_on" do it do expect(subject.updated_on).to be_a(Time) - expect(subject.updated_on).to eq(Time.parse("2011-07-12 12:52:57")) + expect(subject.updated_on).to eq(DateTime.parse("2011-07-12 12:52:57")) end end describe "#expires_on" do it do expect(subject.expires_on).to be_a(Time) - expect(subject.expires_on).to eq(Time.parse("2015-01-03")) + expect(subject.expires_on).to eq(DateTime.parse("2015-01-03")) end end describe "#registrar" do @@ -87,7 +87,7 @@ expect(subject.registrant_contacts[0].phone).to eq("+298.322400") expect(subject.registrant_contacts[0].fax).to eq(nil) expect(subject.registrant_contacts[0].email).to eq(nil) - expect(subject.registrant_contacts[0].created_on).to eq(Time.parse("2010-07-21 19:11:55")) + expect(subject.registrant_contacts[0].created_on).to eq(DateTime.parse("2010-07-21 19:11:55")) end end describe "#admin_contacts" do @@ -113,7 +113,7 @@ expect(subject.technical_contacts[0].phone).to eq("+298.322400") expect(subject.technical_contacts[0].fax).to eq(nil) expect(subject.technical_contacts[0].email).to eq(nil) - expect(subject.technical_contacts[0].created_on).to eq(Time.parse("2010-07-21 19:11:55")) + expect(subject.technical_contacts[0].created_on).to eq(DateTime.parse("2010-07-21 19:11:55")) end end describe "#nameservers" do diff --git a/spec/whois/parsers/responses/whois.nic.fr/fr/status_registered_spec.rb b/spec/whois/parsers/responses/whois.nic.fr/fr/status_registered_spec.rb index 392dc488..f7355509 100644 --- a/spec/whois/parsers/responses/whois.nic.fr/fr/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.nic.fr/fr/status_registered_spec.rb @@ -39,19 +39,19 @@ describe "#created_on" do it do expect(subject.created_on).to be_a(Time) - expect(subject.created_on).to eq(Time.parse("2004-05-20 11:28:40 UTC")) + expect(subject.created_on).to eq(DateTime.parse("2004-05-20 11:28:40 UTC")) end end describe "#updated_on" do it do expect(subject.updated_on).to be_a(Time) - expect(subject.updated_on).to eq(Time.parse("2018-04-08 03:52:04 UTC")) + expect(subject.updated_on).to eq(DateTime.parse("2018-04-08 03:52:04 UTC")) end end describe "#expires_on" do it do expect(subject.expires_on).to be_a(Time) - expect(subject.expires_on).to eq(Time.parse("2019-05-07 07:43:45 UTC")) + expect(subject.expires_on).to eq(DateTime.parse("2019-05-07 07:43:45 UTC")) end end describe "#registrant_contacts" do @@ -72,7 +72,7 @@ expect(subject.registrant_contacts[0].phone).to eq("+33 1 30 62 40 06") expect(subject.registrant_contacts[0].fax).to eq(nil) expect(subject.registrant_contacts[0].email).to eq("jmr@1c2.com") - expect(subject.registrant_contacts[0].updated_on).to eq(Time.parse("2016-09-22 07:52:47 UTC")) + expect(subject.registrant_contacts[0].updated_on).to eq(DateTime.parse("2016-09-22 07:52:47 UTC")) end end describe "#admin_contacts" do @@ -93,7 +93,7 @@ expect(subject.admin_contacts[0].phone).to eq("+33 1 41 58 22 50") expect(subject.admin_contacts[0].fax).to eq("+33 1 56 72 93 30") expect(subject.admin_contacts[0].email).to eq("hostmaster@magic.fr") - expect(subject.admin_contacts[0].updated_on).to eq(Time.parse("2014-03-31 16:13:52 UTC")) + expect(subject.admin_contacts[0].updated_on).to eq(DateTime.parse("2014-03-31 16:13:52 UTC")) end end describe "#technical_contacts" do @@ -114,7 +114,7 @@ expect(subject.technical_contacts[0].phone).to eq("+33 1 41 58 22 50") expect(subject.technical_contacts[0].fax).to eq("+33 1 56 72 93 30") expect(subject.technical_contacts[0].email).to eq("production@magic.fr") - expect(subject.technical_contacts[0].updated_on).to eq(Time.parse("2014-05-20 15:07:08 UTC")) + expect(subject.technical_contacts[0].updated_on).to eq(DateTime.parse("2014-05-20 15:07:08 UTC")) end end describe "#nameservers" do diff --git a/spec/whois/parsers/responses/whois.nic.fr/tf/status_registered_spec.rb b/spec/whois/parsers/responses/whois.nic.fr/tf/status_registered_spec.rb index 410fea8c..2e917a81 100644 --- a/spec/whois/parsers/responses/whois.nic.fr/tf/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.nic.fr/tf/status_registered_spec.rb @@ -39,19 +39,19 @@ describe "#created_on" do it do expect(subject.created_on).to be_a(Time) - expect(subject.created_on).to eq(Time.parse("2004-10-25 22:00:00 UTC")) + expect(subject.created_on).to eq(DateTime.parse("2004-10-25 22:00:00 UTC")) end end describe "#updated_on" do it do expect(subject.updated_on).to be_a(Time) - expect(subject.updated_on).to eq(Time.parse("2018-10-25 22:34:00 UTC")) + expect(subject.updated_on).to eq(DateTime.parse("2018-10-25 22:34:00 UTC")) end end describe "#expires_on" do it do expect(subject.expires_on).to be_a(Time) - expect(subject.expires_on).to eq(Time.parse("2019-10-25 22:00:00 UTC")) + expect(subject.expires_on).to eq(DateTime.parse("2019-10-25 22:00:00 UTC")) end end describe "#registrant_contacts" do @@ -72,7 +72,7 @@ expect(subject.registrant_contacts[0].phone).to eq("+33 1 39 30 83 00") expect(subject.registrant_contacts[0].fax).to eq("+33 1 39 30 83 01") expect(subject.registrant_contacts[0].email).to eq("support@afnic.fr") - expect(subject.registrant_contacts[0].updated_on).to eq(Time.parse("2017-07-17 12:40:50 UTC")) + expect(subject.registrant_contacts[0].updated_on).to eq(DateTime.parse("2017-07-17 12:40:50 UTC")) end end describe "#admin_contacts" do @@ -93,7 +93,7 @@ expect(subject.admin_contacts[0].phone).to eq("+33 1 39 30 83 00") expect(subject.admin_contacts[0].fax).to eq(nil) expect(subject.admin_contacts[0].email).to eq("hostmaster@nic.fr") - expect(subject.admin_contacts[0].updated_on).to eq(Time.parse("2005-08-23 16:13:17 UTC")) + expect(subject.admin_contacts[0].updated_on).to eq(DateTime.parse("2005-08-23 16:13:17 UTC")) end end describe "#technical_contacts" do @@ -114,7 +114,7 @@ expect(subject.technical_contacts[0].phone).to eq("+33 1 39 30 83 00") expect(subject.technical_contacts[0].fax).to eq(nil) expect(subject.technical_contacts[0].email).to eq("hostmaster@nic.fr") - expect(subject.technical_contacts[0].updated_on).to eq(Time.parse("2005-08-23 16:13:17 UTC")) + expect(subject.technical_contacts[0].updated_on).to eq(DateTime.parse("2005-08-23 16:13:17 UTC")) end end describe "#nameservers" do diff --git a/spec/whois/parsers/responses/whois.nic.gd/gd/status_registered_spec.rb b/spec/whois/parsers/responses/whois.nic.gd/gd/status_registered_spec.rb index 8bef6740..9995767e 100644 --- a/spec/whois/parsers/responses/whois.nic.gd/gd/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.nic.gd/gd/status_registered_spec.rb @@ -54,19 +54,19 @@ describe "#created_on" do it do expect(subject.created_on).to be_a(Time) - expect(subject.created_on).to eq(Time.parse("2006-12-11 00:00:00")) + expect(subject.created_on).to eq(DateTime.parse("2006-12-11 00:00:00")) end end describe "#updated_on" do it do expect(subject.updated_on).to be_a(Time) - expect(subject.updated_on).to eq(Time.parse("2013-11-12 16:07:05")) + expect(subject.updated_on).to eq(DateTime.parse("2013-11-12 16:07:05")) end end describe "#expires_on" do it do expect(subject.expires_on).to be_a(Time) - expect(subject.expires_on).to eq(Time.parse("2014-12-11 00:00:00")) + expect(subject.expires_on).to eq(DateTime.parse("2014-12-11 00:00:00")) end end describe "#registrar" do diff --git a/spec/whois/parsers/responses/whois.nic.gl/gl/status_registered_spec.rb b/spec/whois/parsers/responses/whois.nic.gl/gl/status_registered_spec.rb index 55bea50c..f7ae01f8 100644 --- a/spec/whois/parsers/responses/whois.nic.gl/gl/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.nic.gl/gl/status_registered_spec.rb @@ -49,19 +49,19 @@ describe "#created_on" do it do expect(subject.created_on).to be_a(Time) - expect(subject.created_on).to eq(Time.parse("2003-03-11 03:00:00 UTC")) + expect(subject.created_on).to eq(DateTime.parse("2003-03-11 03:00:00 UTC")) end end describe "#updated_on" do it do expect(subject.updated_on).to be_a(Time) - expect(subject.updated_on).to eq(Time.parse("2013-12-02 19:11:52 UTC")) + expect(subject.updated_on).to eq(DateTime.parse("2013-12-02 19:11:52 UTC")) end end describe "#expires_on" do it do expect(subject.expires_on).to be_a(Time) - expect(subject.expires_on).to eq(Time.parse("2015-01-01 03:00:00 UTC")) + expect(subject.expires_on).to eq(DateTime.parse("2015-01-01 03:00:00 UTC")) end end describe "#registrar" do diff --git a/spec/whois/parsers/responses/whois.nic.gs/gs/status_registered_spec.rb b/spec/whois/parsers/responses/whois.nic.gs/gs/status_registered_spec.rb index 7a41c7b7..01693838 100644 --- a/spec/whois/parsers/responses/whois.nic.gs/gs/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.nic.gs/gs/status_registered_spec.rb @@ -49,19 +49,19 @@ describe "#created_on" do it do expect(subject.created_on).to be_a(Time) - expect(subject.created_on).to eq(Time.parse("2004-07-08 12:00:00 UTC")) + expect(subject.created_on).to eq(DateTime.parse("2004-07-08 12:00:00 UTC")) end end describe "#updated_on" do it do expect(subject.updated_on).to be_a(Time) - expect(subject.updated_on).to eq(Time.parse("2013-12-06 07:35:24 UTC")) + expect(subject.updated_on).to eq(DateTime.parse("2013-12-06 07:35:24 UTC")) end end describe "#expires_on" do it do expect(subject.expires_on).to be_a(Time) - expect(subject.expires_on).to eq(Time.parse("2014-07-08 12:00:00 UTC")) + expect(subject.expires_on).to eq(DateTime.parse("2014-07-08 12:00:00 UTC")) end end describe "#registrar" do diff --git a/spec/whois/parsers/responses/whois.nic.hn/hn/status_registered_spec.rb b/spec/whois/parsers/responses/whois.nic.hn/hn/status_registered_spec.rb index 7964a5bd..eea0e016 100644 --- a/spec/whois/parsers/responses/whois.nic.hn/hn/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.nic.hn/hn/status_registered_spec.rb @@ -49,19 +49,19 @@ describe "#created_on" do it do expect(subject.created_on).to be_a(Time) - expect(subject.created_on).to eq(Time.parse("2003-03-07 05:00:00 UTC")) + expect(subject.created_on).to eq(DateTime.parse("2003-03-07 05:00:00 UTC")) end end describe "#updated_on" do it do expect(subject.updated_on).to be_a(Time) - expect(subject.updated_on).to eq(Time.parse("2014-02-03 10:22:23 UTC")) + expect(subject.updated_on).to eq(DateTime.parse("2014-02-03 10:22:23 UTC")) end end describe "#expires_on" do it do expect(subject.expires_on).to be_a(Time) - expect(subject.expires_on).to eq(Time.parse("2015-03-07 05:00:00 UTC")) + expect(subject.expires_on).to eq(DateTime.parse("2015-03-07 05:00:00 UTC")) end end describe "#registrar" do diff --git a/spec/whois/parsers/responses/whois.nic.ht/ht/status_registered_spec.rb b/spec/whois/parsers/responses/whois.nic.ht/ht/status_registered_spec.rb index 34b33563..2b43bb88 100644 --- a/spec/whois/parsers/responses/whois.nic.ht/ht/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.nic.ht/ht/status_registered_spec.rb @@ -49,19 +49,19 @@ describe "#created_on" do it do expect(subject.created_on).to be_a(Time) - expect(subject.created_on).to eq(Time.parse("2004-06-17 23:00:00 UTC")) + expect(subject.created_on).to eq(DateTime.parse("2004-06-17 23:00:00 UTC")) end end describe "#updated_on" do it do expect(subject.updated_on).to be_a(Time) - expect(subject.updated_on).to eq(Time.parse("2013-05-16 09:18:24 UTC")) + expect(subject.updated_on).to eq(DateTime.parse("2013-05-16 09:18:24 UTC")) end end describe "#expires_on" do it do expect(subject.expires_on).to be_a(Time) - expect(subject.expires_on).to eq(Time.parse("2014-06-17 23:00:00 UTC")) + expect(subject.expires_on).to eq(DateTime.parse("2014-06-17 23:00:00 UTC")) end end describe "#registrar" do diff --git a/spec/whois/parsers/responses/whois.nic.hu/hu/status_registered_spec.rb b/spec/whois/parsers/responses/whois.nic.hu/hu/status_registered_spec.rb index cff0e72a..41c93898 100644 --- a/spec/whois/parsers/responses/whois.nic.hu/hu/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.nic.hu/hu/status_registered_spec.rb @@ -54,7 +54,7 @@ describe "#created_on" do it do expect(subject.created_on).to be_a(Time) - expect(subject.created_on).to eq(Time.parse("2000-03-25 23:20:39")) + expect(subject.created_on).to eq(DateTime.parse("2000-03-25 23:20:39")) end end describe "#updated_on" do diff --git a/spec/whois/parsers/responses/whois.nic.im/im/status_registered_spec.rb b/spec/whois/parsers/responses/whois.nic.im/im/status_registered_spec.rb index 3370a7a1..53fe663c 100644 --- a/spec/whois/parsers/responses/whois.nic.im/im/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.nic.im/im/status_registered_spec.rb @@ -49,7 +49,7 @@ describe "#expires_on" do it do expect(subject.expires_on).to be_a(Time) - expect(subject.expires_on).to eq(Time.parse("2014-08-03 23:59:52")) + expect(subject.expires_on).to eq(DateTime.parse("2014-08-03 23:59:52")) end end describe "#nameservers" do diff --git a/spec/whois/parsers/responses/whois.nic.io/io/status_registered_spec.rb b/spec/whois/parsers/responses/whois.nic.io/io/status_registered_spec.rb index 36b28e8f..48708998 100644 --- a/spec/whois/parsers/responses/whois.nic.io/io/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.nic.io/io/status_registered_spec.rb @@ -54,19 +54,19 @@ describe "#created_on" do it do expect(subject.created_on).to be_a(Time) - expect(subject.created_on).to eq(Time.parse("2010-05-28 22:09:44 UTC")) + expect(subject.created_on).to eq(DateTime.parse("2010-05-28 22:09:44 UTC")) end end describe "#updated_on" do it do expect(subject.updated_on).to be_a(Time) - expect(subject.updated_on).to eq(Time.parse("2019-05-06 17:24:58 UTC")) + expect(subject.updated_on).to eq(DateTime.parse("2019-05-06 17:24:58 UTC")) end end describe "#expires_on" do it do expect(subject.expires_on).to be_a(Time) - expect(subject.expires_on).to eq(Time.parse("2020-05-28 22:09:44 UTC")) + expect(subject.expires_on).to eq(DateTime.parse("2020-05-28 22:09:44 UTC")) end end describe "#registrar" do diff --git a/spec/whois/parsers/responses/whois.nic.ir/ir/status_registered_spec.rb b/spec/whois/parsers/responses/whois.nic.ir/ir/status_registered_spec.rb index ec702ec3..19e38b84 100644 --- a/spec/whois/parsers/responses/whois.nic.ir/ir/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.nic.ir/ir/status_registered_spec.rb @@ -44,7 +44,7 @@ describe "#updated_on" do it do expect(subject.updated_on).to be_a(Time) - expect(subject.updated_on).to eq(Time.parse("2014-02-17")) + expect(subject.updated_on).to eq(DateTime.parse("2014-02-17")) end end describe "#expires_on" do diff --git a/spec/whois/parsers/responses/whois.nic.it/it/property_contact_province_spec.rb b/spec/whois/parsers/responses/whois.nic.it/it/property_contact_province_spec.rb index a1f6f018..19cca0f7 100644 --- a/spec/whois/parsers/responses/whois.nic.it/it/property_contact_province_spec.rb +++ b/spec/whois/parsers/responses/whois.nic.it/it/property_contact_province_spec.rb @@ -35,8 +35,8 @@ expect(subject.registrant_contacts[0].zip).to eq("00172") expect(subject.registrant_contacts[0].state).to eq("RM") expect(subject.registrant_contacts[0].country_code).to eq("IT") - expect(subject.registrant_contacts[0].created_on).to eq(Time.parse("2007-03-01 10:28:08")) - expect(subject.registrant_contacts[0].updated_on).to eq(Time.parse("2007-03-01 10:28:08")) + expect(subject.registrant_contacts[0].created_on).to eq(DateTime.parse("2007-03-01 10:28:08")) + expect(subject.registrant_contacts[0].updated_on).to eq(DateTime.parse("2007-03-01 10:28:08")) end end end diff --git a/spec/whois/parsers/responses/whois.nic.it/it/property_contact_with_company_in_address_spec.rb b/spec/whois/parsers/responses/whois.nic.it/it/property_contact_with_company_in_address_spec.rb index 30705c72..8d66e6c0 100644 --- a/spec/whois/parsers/responses/whois.nic.it/it/property_contact_with_company_in_address_spec.rb +++ b/spec/whois/parsers/responses/whois.nic.it/it/property_contact_with_company_in_address_spec.rb @@ -35,8 +35,8 @@ expect(subject.technical_contacts[0].zip).to eq("00146") expect(subject.technical_contacts[0].state).to eq("RM") expect(subject.technical_contacts[0].country_code).to eq("IT") - expect(subject.technical_contacts[0].created_on).to eq(Time.parse("2006-08-16 00:00:00")) - expect(subject.technical_contacts[0].updated_on).to eq(Time.parse("2007-03-01 07:48:42")) + expect(subject.technical_contacts[0].created_on).to eq(DateTime.parse("2006-08-16 00:00:00")) + expect(subject.technical_contacts[0].updated_on).to eq(DateTime.parse("2007-03-01 07:48:42")) end end end diff --git a/spec/whois/parsers/responses/whois.nic.it/it/property_contact_with_organization_spec.rb b/spec/whois/parsers/responses/whois.nic.it/it/property_contact_with_organization_spec.rb index 9684b0bc..25f8dd79 100644 --- a/spec/whois/parsers/responses/whois.nic.it/it/property_contact_with_organization_spec.rb +++ b/spec/whois/parsers/responses/whois.nic.it/it/property_contact_with_organization_spec.rb @@ -35,8 +35,8 @@ expect(subject.admin_contacts[0].zip).to eq("2") expect(subject.admin_contacts[0].state).to eq("IE") expect(subject.admin_contacts[0].country_code).to eq("IE") - expect(subject.admin_contacts[0].created_on).to eq(Time.parse("2008-11-27 16:47:22")) - expect(subject.admin_contacts[0].updated_on).to eq(Time.parse("2008-11-27 16:47:22")) + expect(subject.admin_contacts[0].created_on).to eq(DateTime.parse("2008-11-27 16:47:22")) + expect(subject.admin_contacts[0].updated_on).to eq(DateTime.parse("2008-11-27 16:47:22")) end end end diff --git a/spec/whois/parsers/responses/whois.nic.it/it/status_registered_spec.rb b/spec/whois/parsers/responses/whois.nic.it/it/status_registered_spec.rb index 5921177d..ccee8946 100644 --- a/spec/whois/parsers/responses/whois.nic.it/it/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.nic.it/it/status_registered_spec.rb @@ -54,19 +54,19 @@ describe "#created_on" do it do expect(subject.created_on).to be_a(Time) - expect(subject.created_on).to eq(Time.parse("1999-12-10 00:00:00")) + expect(subject.created_on).to eq(DateTime.parse("1999-12-10 00:00:00")) end end describe "#updated_on" do it do expect(subject.updated_on).to be_a(Time) - expect(subject.updated_on).to eq(Time.parse("2013-04-21 01:05:35")) + expect(subject.updated_on).to eq(DateTime.parse("2013-04-21 01:05:35")) end end describe "#expires_on" do it do expect(subject.expires_on).to be_a(Time) - expect(subject.expires_on).to eq(Time.parse("2014-04-21 00:00:00")) + expect(subject.expires_on).to eq(DateTime.parse("2014-04-21 00:00:00")) end end describe "#registrar" do @@ -96,8 +96,8 @@ expect(subject.registrant_contacts[0].phone).to eq(nil) expect(subject.registrant_contacts[0].fax).to eq(nil) expect(subject.registrant_contacts[0].email).to eq(nil) - expect(subject.registrant_contacts[0].created_on).to eq(Time.parse("2013-04-21 01:05:35")) - expect(subject.registrant_contacts[0].updated_on).to eq(Time.parse("2013-04-21 01:05:35")) + expect(subject.registrant_contacts[0].created_on).to eq(DateTime.parse("2013-04-21 01:05:35")) + expect(subject.registrant_contacts[0].updated_on).to eq(DateTime.parse("2013-04-21 01:05:35")) end end describe "#admin_contacts" do @@ -118,8 +118,8 @@ expect(subject.admin_contacts[0].phone).to eq(nil) expect(subject.admin_contacts[0].fax).to eq(nil) expect(subject.admin_contacts[0].email).to eq(nil) - expect(subject.admin_contacts[0].created_on).to eq(Time.parse("2013-04-21 01:05:35")) - expect(subject.admin_contacts[0].updated_on).to eq(Time.parse("2013-04-21 01:05:35")) + expect(subject.admin_contacts[0].created_on).to eq(DateTime.parse("2013-04-21 01:05:35")) + expect(subject.admin_contacts[0].updated_on).to eq(DateTime.parse("2013-04-21 01:05:35")) end end describe "#technical_contacts" do @@ -136,8 +136,8 @@ expect(subject.technical_contacts[0].phone).to eq(nil) expect(subject.technical_contacts[0].fax).to eq(nil) expect(subject.technical_contacts[0].email).to eq(nil) - expect(subject.technical_contacts[0].created_on).to eq(Time.parse("2013-04-21 01:05:35")) - expect(subject.technical_contacts[0].updated_on).to eq(Time.parse("2013-04-21 01:05:35")) + expect(subject.technical_contacts[0].created_on).to eq(DateTime.parse("2013-04-21 01:05:35")) + expect(subject.technical_contacts[0].updated_on).to eq(DateTime.parse("2013-04-21 01:05:35")) end end describe "#nameservers" do diff --git a/spec/whois/parsers/responses/whois.nic.jobs/jobs/status_registered_spec.rb b/spec/whois/parsers/responses/whois.nic.jobs/jobs/status_registered_spec.rb index 16edb0e6..bca1fc20 100644 --- a/spec/whois/parsers/responses/whois.nic.jobs/jobs/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.nic.jobs/jobs/status_registered_spec.rb @@ -54,19 +54,19 @@ describe "#created_on" do it do expect(subject.created_on).to be_a(Time) - expect(subject.created_on).to eq(Time.parse("2005-09-15 04:00:00 UTC")) + expect(subject.created_on).to eq(DateTime.parse("2005-09-15 04:00:00 UTC")) end end describe "#updated_on" do it do expect(subject.updated_on).to be_a(Time) - expect(subject.updated_on).to eq(Time.parse("2017-07-27 20:59:01 UTC")) + expect(subject.updated_on).to eq(DateTime.parse("2017-07-27 20:59:01 UTC")) end end describe "#expires_on" do it do expect(subject.expires_on).to be_a(Time) - expect(subject.expires_on).to eq(Time.parse("2017-09-15 04:00:00 UTC")) + expect(subject.expires_on).to eq(DateTime.parse("2017-09-15 04:00:00 UTC")) end end describe "#registrar" do diff --git a/spec/whois/parsers/responses/whois.nic.ki/ki/status_registered_spec.rb b/spec/whois/parsers/responses/whois.nic.ki/ki/status_registered_spec.rb index 9a562508..e3014f23 100644 --- a/spec/whois/parsers/responses/whois.nic.ki/ki/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.nic.ki/ki/status_registered_spec.rb @@ -49,19 +49,19 @@ describe "#created_on" do it do expect(subject.created_on).to be_a(Time) - expect(subject.created_on).to eq(Time.parse("2006-05-15 12:00:00 UTC")) + expect(subject.created_on).to eq(DateTime.parse("2006-05-15 12:00:00 UTC")) end end describe "#updated_on" do it do expect(subject.updated_on).to be_a(Time) - expect(subject.updated_on).to eq(Time.parse("2013-12-06 07:34:23 UTC")) + expect(subject.updated_on).to eq(DateTime.parse("2013-12-06 07:34:23 UTC")) end end describe "#expires_on" do it do expect(subject.expires_on).to be_a(Time) - expect(subject.expires_on).to eq(Time.parse("2014-11-27 11:00:00 UTC")) + expect(subject.expires_on).to eq(DateTime.parse("2014-11-27 11:00:00 UTC")) end end describe "#registrar" do diff --git a/spec/whois/parsers/responses/whois.nic.kz/kz/status_registered_spec.rb b/spec/whois/parsers/responses/whois.nic.kz/kz/status_registered_spec.rb index 168e431b..d8948971 100644 --- a/spec/whois/parsers/responses/whois.nic.kz/kz/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.nic.kz/kz/status_registered_spec.rb @@ -39,13 +39,13 @@ describe "#created_on" do it do expect(subject.created_on).to be_a(Time) - expect(subject.created_on).to eq(Time.parse("1999-06-07 13:01:43")) + expect(subject.created_on).to eq(DateTime.parse("1999-06-07 13:01:43")) end end describe "#updated_on" do it do expect(subject.updated_on).to be_a(Time) - expect(subject.updated_on).to eq(Time.parse("2012-11-28 03:16:59")) + expect(subject.updated_on).to eq(DateTime.parse("2012-11-28 03:16:59")) end end describe "#expires_on" do diff --git a/spec/whois/parsers/responses/whois.nic.la/la/status_registered_spec.rb b/spec/whois/parsers/responses/whois.nic.la/la/status_registered_spec.rb index 0ee1aec8..9dbef1c5 100644 --- a/spec/whois/parsers/responses/whois.nic.la/la/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.nic.la/la/status_registered_spec.rb @@ -54,19 +54,19 @@ describe "#created_on" do it do expect(subject.created_on).to be_a(Time) - expect(subject.created_on).to eq(Time.parse("2002-07-18 01:00:00 UTC")) + expect(subject.created_on).to eq(DateTime.parse("2002-07-18 01:00:00 UTC")) end end describe "#updated_on" do it do expect(subject.updated_on).to be_a(Time) - expect(subject.updated_on).to eq(Time.parse("2013-08-01 15:09:21 UTC")) + expect(subject.updated_on).to eq(DateTime.parse("2013-08-01 15:09:21 UTC")) end end describe "#expires_on" do it do expect(subject.expires_on).to be_a(Time) - expect(subject.expires_on).to eq(Time.parse("2014-07-18 23:59:59 UTC")) + expect(subject.expires_on).to eq(DateTime.parse("2014-07-18 23:59:59 UTC")) end end describe "#registrar" do diff --git a/spec/whois/parsers/responses/whois.nic.lk/lk/status_registered_spec.rb b/spec/whois/parsers/responses/whois.nic.lk/lk/status_registered_spec.rb index 698c39b1..ba406671 100644 --- a/spec/whois/parsers/responses/whois.nic.lk/lk/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.nic.lk/lk/status_registered_spec.rb @@ -54,19 +54,19 @@ describe "#created_on" do it do expect(subject.created_on).to be_a(Time) - expect(subject.created_on).to eq(Time.parse("2003-04-01")) + expect(subject.created_on).to eq(DateTime.parse("2003-04-01")) end end describe "#updated_on" do it do expect(subject.updated_on).to be_a(Time) - expect(subject.updated_on).to eq(Time.parse("2013-03-09")) + expect(subject.updated_on).to eq(DateTime.parse("2013-03-09")) end end describe "#expires_on" do it do expect(subject.expires_on).to be_a(Time) - expect(subject.expires_on).to eq(Time.parse("2014-04-01")) + expect(subject.expires_on).to eq(DateTime.parse("2014-04-01")) end end describe "#registrar" do diff --git a/spec/whois/parsers/responses/whois.nic.lv/lv/status_registered_spec.rb b/spec/whois/parsers/responses/whois.nic.lv/lv/status_registered_spec.rb index 5e1cfdf2..96ff7a7e 100644 --- a/spec/whois/parsers/responses/whois.nic.lv/lv/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.nic.lv/lv/status_registered_spec.rb @@ -44,7 +44,7 @@ describe "#updated_on" do it do expect(subject.updated_on).to be_a(Time) - expect(subject.updated_on).to eq(Time.parse("2013-07-08T19:35:53+03:00")) + expect(subject.updated_on).to eq(DateTime.parse("2013-07-08T19:35:53+03:00")) end end describe "#expires_on" do diff --git a/spec/whois/parsers/responses/whois.nic.ly/ly/status_registered_spec.rb b/spec/whois/parsers/responses/whois.nic.ly/ly/status_registered_spec.rb index f3d673cd..df43ae97 100644 --- a/spec/whois/parsers/responses/whois.nic.ly/ly/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.nic.ly/ly/status_registered_spec.rb @@ -39,19 +39,19 @@ describe "#created_on" do it do expect(subject.created_on).to be_a(Time) - expect(subject.created_on).to eq(Time.parse("2007-10-03 13:36:48")) + expect(subject.created_on).to eq(DateTime.parse("2007-10-03 13:36:48")) end end describe "#updated_on" do it do expect(subject.updated_on).to be_a(Time) - expect(subject.updated_on).to eq(Time.parse("2009-08-07 22:52:02")) + expect(subject.updated_on).to eq(DateTime.parse("2009-08-07 22:52:02")) end end describe "#expires_on" do it do expect(subject.expires_on).to be_a(Time) - expect(subject.expires_on).to eq(Time.parse("2010-10-03 13:36:48")) + expect(subject.expires_on).to eq(DateTime.parse("2010-10-03 13:36:48")) end end describe "#nameservers" do diff --git a/spec/whois/parsers/responses/whois.nic.md/md/status_registered_spec.rb b/spec/whois/parsers/responses/whois.nic.md/md/status_registered_spec.rb index 01630507..2a57e801 100644 --- a/spec/whois/parsers/responses/whois.nic.md/md/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.nic.md/md/status_registered_spec.rb @@ -54,7 +54,7 @@ describe "#created_on" do it do expect(subject.created_on).to be_a(Time) - expect(subject.created_on).to eq(Time.parse("2006-05-02")) + expect(subject.created_on).to eq(DateTime.parse("2006-05-02")) end end describe "#updated_on" do @@ -65,7 +65,7 @@ describe "#expires_on" do it do expect(subject.expires_on).to be_a(Time) - expect(subject.expires_on).to eq(Time.parse("2014-05-02")) + expect(subject.expires_on).to eq(DateTime.parse("2014-05-02")) end end describe "#registrar" do diff --git a/spec/whois/parsers/responses/whois.nic.me/me/status_registered_spec.rb b/spec/whois/parsers/responses/whois.nic.me/me/status_registered_spec.rb index 701d8e71..dc26ec97 100644 --- a/spec/whois/parsers/responses/whois.nic.me/me/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.nic.me/me/status_registered_spec.rb @@ -54,19 +54,19 @@ describe "#created_on" do it do expect(subject.created_on).to be_a(Time) - expect(subject.created_on).to eq(Time.parse("2008-06-13 17:17:40 UTC")) + expect(subject.created_on).to eq(DateTime.parse("2008-06-13 17:17:40 UTC")) end end describe "#updated_on" do it do expect(subject.updated_on).to be_a(Time) - expect(subject.updated_on).to eq(Time.parse("2021-05-12 09:39:59 UTC")) + expect(subject.updated_on).to eq(DateTime.parse("2021-05-12 09:39:59 UTC")) end end describe "#expires_on" do it do expect(subject.expires_on).to be_a(Time) - expect(subject.expires_on).to eq(Time.parse("2022-06-13 17:17:40 UTC")) + expect(subject.expires_on).to eq(DateTime.parse("2022-06-13 17:17:40 UTC")) end end describe "#registrar" do diff --git a/spec/whois/parsers/responses/whois.nic.mg/mg/status_registered_spec.rb b/spec/whois/parsers/responses/whois.nic.mg/mg/status_registered_spec.rb index 5b73c2d0..8e39aa6f 100644 --- a/spec/whois/parsers/responses/whois.nic.mg/mg/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.nic.mg/mg/status_registered_spec.rb @@ -49,19 +49,19 @@ describe "#created_on" do it do expect(subject.created_on).to be_a(Time) - expect(subject.created_on).to eq(Time.parse("2009-06-18 08:38:20 UTC")) + expect(subject.created_on).to eq(DateTime.parse("2009-06-18 08:38:20 UTC")) end end describe "#updated_on" do it do expect(subject.updated_on).to be_a(Time) - expect(subject.updated_on).to eq(Time.parse("2013-10-29 15:13:49 UTC")) + expect(subject.updated_on).to eq(DateTime.parse("2013-10-29 15:13:49 UTC")) end end describe "#expires_on" do it do expect(subject.expires_on).to be_a(Time) - expect(subject.expires_on).to eq(Time.parse("2014-11-26 21:00:00 UTC")) + expect(subject.expires_on).to eq(DateTime.parse("2014-11-26 21:00:00 UTC")) end end describe "#registrar" do diff --git a/spec/whois/parsers/responses/whois.nic.ms/ms/status_registered_spec.rb b/spec/whois/parsers/responses/whois.nic.ms/ms/status_registered_spec.rb index 2c11eed5..8cca36c1 100644 --- a/spec/whois/parsers/responses/whois.nic.ms/ms/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.nic.ms/ms/status_registered_spec.rb @@ -49,19 +49,19 @@ describe "#created_on" do it do expect(subject.created_on).to be_a(Time) - expect(subject.created_on).to eq(Time.parse("1999-06-04 12:00:00 UTC")) + expect(subject.created_on).to eq(DateTime.parse("1999-06-04 12:00:00 UTC")) end end describe "#updated_on" do it do expect(subject.updated_on).to be_a(Time) - expect(subject.updated_on).to eq(Time.parse("2013-12-06 08:14:24 UTC")) + expect(subject.updated_on).to eq(DateTime.parse("2013-12-06 08:14:24 UTC")) end end describe "#expires_on" do it do expect(subject.expires_on).to be_a(Time) - expect(subject.expires_on).to eq(Time.parse("2014-06-04 12:00:00 UTC")) + expect(subject.expires_on).to eq(DateTime.parse("2014-06-04 12:00:00 UTC")) end end describe "#registrar" do diff --git a/spec/whois/parsers/responses/whois.nic.mu/mu/status_registered_spec.rb b/spec/whois/parsers/responses/whois.nic.mu/mu/status_registered_spec.rb index b4ab8342..eb9ef229 100644 --- a/spec/whois/parsers/responses/whois.nic.mu/mu/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.nic.mu/mu/status_registered_spec.rb @@ -49,19 +49,19 @@ describe "#created_on" do it do expect(subject.created_on).to be_a(Time) - expect(subject.created_on).to eq(Time.parse("2000-12-20 13:00:00 UTC")) + expect(subject.created_on).to eq(DateTime.parse("2000-12-20 13:00:00 UTC")) end end describe "#updated_on" do it do expect(subject.updated_on).to be_a(Time) - expect(subject.updated_on).to eq(Time.parse("2013-11-17 10:20:08 UTC")) + expect(subject.updated_on).to eq(DateTime.parse("2013-11-17 10:20:08 UTC")) end end describe "#expires_on" do it do expect(subject.expires_on).to be_a(Time) - expect(subject.expires_on).to eq(Time.parse("2014-12-19 13:00:00 UTC")) + expect(subject.expires_on).to eq(DateTime.parse("2014-12-19 13:00:00 UTC")) end end describe "#registrar" do diff --git a/spec/whois/parsers/responses/whois.nic.mx/mx/status_registered_spec.rb b/spec/whois/parsers/responses/whois.nic.mx/mx/status_registered_spec.rb index 95c94468..9c1f17a6 100644 --- a/spec/whois/parsers/responses/whois.nic.mx/mx/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.nic.mx/mx/status_registered_spec.rb @@ -39,13 +39,13 @@ describe "#created_on" do it do expect(subject.created_on).to be_a(Time) - expect(subject.created_on).to eq(Time.parse("2009-05-12")) + expect(subject.created_on).to eq(DateTime.parse("2009-05-12")) end end describe "#expires_on" do it do expect(subject.expires_on).to be_a(Time) - expect(subject.expires_on).to eq(Time.parse("2016-05-11")) + expect(subject.expires_on).to eq(DateTime.parse("2016-05-11")) end end describe "#nameservers" do diff --git a/spec/whois/parsers/responses/whois.nic.name/name/status_registered_spec.rb b/spec/whois/parsers/responses/whois.nic.name/name/status_registered_spec.rb index 6bc6fc22..40e8240c 100644 --- a/spec/whois/parsers/responses/whois.nic.name/name/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.nic.name/name/status_registered_spec.rb @@ -39,19 +39,19 @@ describe "#created_on" do it do expect(subject.created_on).to be_a(Time) - expect(subject.created_on).to eq(Time.parse("2006-04-19 12:22:08 UTC")) + expect(subject.created_on).to eq(DateTime.parse("2006-04-19 12:22:08 UTC")) end end describe "#updated_on" do it do expect(subject.updated_on).to be_a(Time) - expect(subject.updated_on).to eq(Time.parse("2013-11-30 18:51:55 UTC")) + expect(subject.updated_on).to eq(DateTime.parse("2013-11-30 18:51:55 UTC")) end end describe "#expires_on" do it do expect(subject.expires_on).to be_a(Time) - expect(subject.expires_on).to eq(Time.parse("2014-04-19 12:22:08 UTC")) + expect(subject.expires_on).to eq(DateTime.parse("2014-04-19 12:22:08 UTC")) end end describe "#nameservers" do diff --git a/spec/whois/parsers/responses/whois.nic.net.ng/ng/status_registered_spec.rb b/spec/whois/parsers/responses/whois.nic.net.ng/ng/status_registered_spec.rb index 84c1259a..5bb72878 100644 --- a/spec/whois/parsers/responses/whois.nic.net.ng/ng/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.nic.net.ng/ng/status_registered_spec.rb @@ -49,19 +49,19 @@ describe "#created_on" do it do expect(subject.created_on).to be_a(Time) - expect(subject.created_on).to eq(Time.parse("2009-05-13 14:27:27 UTC")) + expect(subject.created_on).to eq(DateTime.parse("2009-05-13 14:27:27 UTC")) end end describe "#updated_on" do it do expect(subject.updated_on).to be_a(Time) - expect(subject.updated_on).to eq(Time.parse("2012-08-24 13:46:14 UTC")) + expect(subject.updated_on).to eq(DateTime.parse("2012-08-24 13:46:14 UTC")) end end describe "#expires_on" do it do expect(subject.expires_on).to be_a(Time) - expect(subject.expires_on).to eq(Time.parse("2020-07-30 23:00:00 UTC")) + expect(subject.expires_on).to eq(DateTime.parse("2020-07-30 23:00:00 UTC")) end end describe "#registrar" do diff --git a/spec/whois/parsers/responses/whois.nic.net.sa/sa/status_registered_spec.rb b/spec/whois/parsers/responses/whois.nic.net.sa/sa/status_registered_spec.rb index 7bc2e6e1..6b8b705b 100644 --- a/spec/whois/parsers/responses/whois.nic.net.sa/sa/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.nic.net.sa/sa/status_registered_spec.rb @@ -39,13 +39,13 @@ describe "#created_on" do it do expect(subject.created_on).to be_a(Time) - expect(subject.created_on).to eq(Time.parse("2000-09-11")) + expect(subject.created_on).to eq(DateTime.parse("2000-09-11")) end end describe "#updated_on" do it do expect(subject.updated_on).to be_a(Time) - expect(subject.updated_on).to eq(Time.parse("2000-09-11")) + expect(subject.updated_on).to eq(DateTime.parse("2000-09-11")) end end describe "#expires_on" do diff --git a/spec/whois/parsers/responses/whois.nic.net.sb/sb/status_registered_spec.rb b/spec/whois/parsers/responses/whois.nic.net.sb/sb/status_registered_spec.rb index a505d030..65ec0d1c 100644 --- a/spec/whois/parsers/responses/whois.nic.net.sb/sb/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.nic.net.sb/sb/status_registered_spec.rb @@ -49,19 +49,19 @@ describe "#created_on" do it do expect(subject.created_on).to be_a(Time) - expect(subject.created_on).to eq(Time.parse("2010-03-27 04:29:19 UTC")) + expect(subject.created_on).to eq(DateTime.parse("2010-03-27 04:29:19 UTC")) end end describe "#updated_on" do it do expect(subject.updated_on).to be_a(Time) - expect(subject.updated_on).to eq(Time.parse("2012-02-26 05:08:41 UTC")) + expect(subject.updated_on).to eq(DateTime.parse("2012-02-26 05:08:41 UTC")) end end describe "#expires_on" do it do expect(subject.expires_on).to be_a(Time) - expect(subject.expires_on).to eq(Time.parse("2013-03-27 04:29:19 UTC")) + expect(subject.expires_on).to eq(DateTime.parse("2013-03-27 04:29:19 UTC")) end end describe "#registrar" do diff --git a/spec/whois/parsers/responses/whois.nic.nf/nf/status_registered_spec.rb b/spec/whois/parsers/responses/whois.nic.nf/nf/status_registered_spec.rb index fde940b3..3606a5f9 100644 --- a/spec/whois/parsers/responses/whois.nic.nf/nf/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.nic.nf/nf/status_registered_spec.rb @@ -49,19 +49,19 @@ describe "#created_on" do it do expect(subject.created_on).to be_a(Time) - expect(subject.created_on).to eq(Time.parse("2005-11-27 11:00:00 UTC")) + expect(subject.created_on).to eq(DateTime.parse("2005-11-27 11:00:00 UTC")) end end describe "#updated_on" do it do expect(subject.updated_on).to be_a(Time) - expect(subject.updated_on).to eq(Time.parse("2013-12-06 07:35:49 UTC")) + expect(subject.updated_on).to eq(DateTime.parse("2013-12-06 07:35:49 UTC")) end end describe "#expires_on" do it do expect(subject.expires_on).to be_a(Time) - expect(subject.expires_on).to eq(Time.parse("2014-11-27 11:00:00 UTC")) + expect(subject.expires_on).to eq(DateTime.parse("2014-11-27 11:00:00 UTC")) end end describe "#registrar" do diff --git a/spec/whois/parsers/responses/whois.nic.org.uy/uy/status_registered_spec.rb b/spec/whois/parsers/responses/whois.nic.org.uy/uy/status_registered_spec.rb index cc5ce5c9..a5ec8e0e 100644 --- a/spec/whois/parsers/responses/whois.nic.org.uy/uy/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.nic.org.uy/uy/status_registered_spec.rb @@ -39,13 +39,13 @@ describe "#created_on" do it do expect(subject.created_on).to be_a(Time) - expect(subject.created_on).to eq(Time.parse("2012-07-03 20:58:58")) + expect(subject.created_on).to eq(DateTime.parse("2012-07-03 20:58:58")) end end describe "#updated_on" do it do expect(subject.updated_on).to be_a(Time) - expect(subject.updated_on).to eq(Time.parse("2012-09-12 02:32:59")) + expect(subject.updated_on).to eq(DateTime.parse("2012-09-12 02:32:59")) end end describe "#expires_on" do diff --git a/spec/whois/parsers/responses/whois.nic.pm/pm/status_registered_spec.rb b/spec/whois/parsers/responses/whois.nic.pm/pm/status_registered_spec.rb index 7af5ceed..c9534b0f 100644 --- a/spec/whois/parsers/responses/whois.nic.pm/pm/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.nic.pm/pm/status_registered_spec.rb @@ -39,19 +39,19 @@ describe "#created_on" do it do expect(subject.created_on).to be_a(Time) - expect(subject.created_on).to eq(Time.parse("1994-12-31 23:00:00 UTC")) + expect(subject.created_on).to eq(DateTime.parse("1994-12-31 23:00:00 UTC")) end end describe "#updated_on" do it do expect(subject.updated_on).to be_a(Time) - expect(subject.updated_on).to eq(Time.parse("2018-12-31 23:33:19 UTC")) + expect(subject.updated_on).to eq(DateTime.parse("2018-12-31 23:33:19 UTC")) end end describe "#expires_on" do it do expect(subject.expires_on).to be_a(Time) - expect(subject.expires_on).to eq(Time.parse("2019-12-31 23:00:00 UTC")) + expect(subject.expires_on).to eq(DateTime.parse("2019-12-31 23:00:00 UTC")) end end describe "#registrant_contacts" do @@ -72,7 +72,7 @@ expect(subject.registrant_contacts[0].phone).to eq("+33 1 39 30 83 00") expect(subject.registrant_contacts[0].fax).to eq("+33 1 39 30 83 01") expect(subject.registrant_contacts[0].email).to eq("support@afnic.fr") - expect(subject.registrant_contacts[0].updated_on).to eq(Time.parse("2017-07-17 12:39:46 UTC")) + expect(subject.registrant_contacts[0].updated_on).to eq(DateTime.parse("2017-07-17 12:39:46 UTC")) end end describe "#admin_contacts" do @@ -93,7 +93,7 @@ expect(subject.admin_contacts[0].phone).to eq("+33 1 39 30 83 00") expect(subject.admin_contacts[0].fax).to eq(nil) expect(subject.admin_contacts[0].email).to eq("hostmaster@nic.fr") - expect(subject.admin_contacts[0].updated_on).to eq(Time.parse("2005-08-23 16:13:17 UTC")) + expect(subject.admin_contacts[0].updated_on).to eq(DateTime.parse("2005-08-23 16:13:17 UTC")) end end describe "#technical_contacts" do @@ -114,7 +114,7 @@ expect(subject.technical_contacts[0].phone).to eq("+33 1 39 30 83 00") expect(subject.technical_contacts[0].fax).to eq(nil) expect(subject.technical_contacts[0].email).to eq("hostmaster@nic.fr") - expect(subject.technical_contacts[0].updated_on).to eq(Time.parse("2005-08-23 16:13:17 UTC")) + expect(subject.technical_contacts[0].updated_on).to eq(DateTime.parse("2005-08-23 16:13:17 UTC")) end end describe "#nameservers" do diff --git a/spec/whois/parsers/responses/whois.nic.pr/pr/status_registered_spec.rb b/spec/whois/parsers/responses/whois.nic.pr/pr/status_registered_spec.rb index 768d722d..15738456 100644 --- a/spec/whois/parsers/responses/whois.nic.pr/pr/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.nic.pr/pr/status_registered_spec.rb @@ -49,7 +49,7 @@ describe "#created_on" do it do expect(subject.created_on).to be_a(Time) - expect(subject.created_on).to eq(Time.parse("2005-09-15")) + expect(subject.created_on).to eq(DateTime.parse("2005-09-15")) end end describe "#updated_on" do @@ -60,7 +60,7 @@ describe "#expires_on" do it do expect(subject.expires_on).to be_a(Time) - expect(subject.expires_on).to eq(Time.parse("2014-09-15")) + expect(subject.expires_on).to eq(DateTime.parse("2014-09-15")) end end describe "#registrar" do diff --git a/spec/whois/parsers/responses/whois.nic.priv.at/at/status_registered_spec.rb b/spec/whois/parsers/responses/whois.nic.priv.at/at/status_registered_spec.rb index c05f5fb8..ee09d1da 100644 --- a/spec/whois/parsers/responses/whois.nic.priv.at/at/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.nic.priv.at/at/status_registered_spec.rb @@ -44,7 +44,7 @@ describe "#updated_on" do it do expect(subject.updated_on).to be_a(Time) - expect(subject.updated_on).to eq(Time.parse("2002-10-13")) + expect(subject.updated_on).to eq(DateTime.parse("2002-10-13")) end end describe "#expires_on" do diff --git a/spec/whois/parsers/responses/whois.nic.pw/pw/status_registered_spec.rb b/spec/whois/parsers/responses/whois.nic.pw/pw/status_registered_spec.rb index e2c680be..564eca7c 100644 --- a/spec/whois/parsers/responses/whois.nic.pw/pw/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.nic.pw/pw/status_registered_spec.rb @@ -54,19 +54,19 @@ describe "#created_on" do it do expect(subject.created_on).to be_a(Time) - expect(subject.created_on).to eq(Time.parse("2012-10-12 10:19:46 UTC")) + expect(subject.created_on).to eq(DateTime.parse("2012-10-12 10:19:46 UTC")) end end describe "#updated_on" do it do expect(subject.updated_on).to be_a(Time) - expect(subject.updated_on).to eq(Time.parse("2014-01-18 00:13:36 UTC")) + expect(subject.updated_on).to eq(DateTime.parse("2014-01-18 00:13:36 UTC")) end end describe "#expires_on" do it do expect(subject.expires_on).to be_a(Time) - expect(subject.expires_on).to eq(Time.parse("2017-02-10 23:59:59 UTC")) + expect(subject.expires_on).to eq(DateTime.parse("2017-02-10 23:59:59 UTC")) end end describe "#registrar" do diff --git a/spec/whois/parsers/responses/whois.nic.re/re/status_registered_spec.rb b/spec/whois/parsers/responses/whois.nic.re/re/status_registered_spec.rb index 04d98b9c..8fa4b83a 100644 --- a/spec/whois/parsers/responses/whois.nic.re/re/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.nic.re/re/status_registered_spec.rb @@ -39,19 +39,19 @@ describe "#created_on" do it do expect(subject.created_on).to be_a(Time) - expect(subject.created_on).to eq(Time.parse("1994-12-31 23:00:00 UTC")) + expect(subject.created_on).to eq(DateTime.parse("1994-12-31 23:00:00 UTC")) end end describe "#updated_on" do it do expect(subject.updated_on).to be_a(Time) - expect(subject.updated_on).to eq(Time.parse("2018-12-31 23:33:19 UTC")) + expect(subject.updated_on).to eq(DateTime.parse("2018-12-31 23:33:19 UTC")) end end describe "#expires_on" do it do expect(subject.expires_on).to be_a(Time) - expect(subject.expires_on).to eq(Time.parse("2019-12-31 23:00:00 UTC")) + expect(subject.expires_on).to eq(DateTime.parse("2019-12-31 23:00:00 UTC")) end end describe "#registrant_contacts" do @@ -72,7 +72,7 @@ expect(subject.registrant_contacts[0].phone).to eq("+33 1 39 30 83 00") expect(subject.registrant_contacts[0].fax).to eq("+33 1 39 30 83 01") expect(subject.registrant_contacts[0].email).to eq("support@afnic.fr") - expect(subject.registrant_contacts[0].updated_on).to eq(Time.parse("2017-07-17 12:40:19 UTC")) + expect(subject.registrant_contacts[0].updated_on).to eq(DateTime.parse("2017-07-17 12:40:19 UTC")) end end describe "#admin_contacts" do @@ -93,7 +93,7 @@ expect(subject.admin_contacts[0].phone).to eq("+33 1 39 30 83 00") expect(subject.admin_contacts[0].fax).to eq(nil) expect(subject.admin_contacts[0].email).to eq("hostmaster@nic.fr") - expect(subject.admin_contacts[0].updated_on).to eq(Time.parse("2005-08-23 16:13:17 UTC")) + expect(subject.admin_contacts[0].updated_on).to eq(DateTime.parse("2005-08-23 16:13:17 UTC")) end end describe "#technical_contacts" do @@ -114,7 +114,7 @@ expect(subject.technical_contacts[0].phone).to eq("+33 1 39 30 83 00") expect(subject.technical_contacts[0].fax).to eq(nil) expect(subject.technical_contacts[0].email).to eq("hostmaster@nic.fr") - expect(subject.technical_contacts[0].updated_on).to eq(Time.parse("2005-08-23 16:13:17 UTC")) + expect(subject.technical_contacts[0].updated_on).to eq(DateTime.parse("2005-08-23 16:13:17 UTC")) end end describe "#nameservers" do diff --git a/spec/whois/parsers/responses/whois.nic.sh/sh/status_registered_spec.rb b/spec/whois/parsers/responses/whois.nic.sh/sh/status_registered_spec.rb index 8655161c..6b2b48cb 100644 --- a/spec/whois/parsers/responses/whois.nic.sh/sh/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.nic.sh/sh/status_registered_spec.rb @@ -54,19 +54,19 @@ describe "#created_on" do it do expect(subject.created_on).to be_a(Time) - expect(subject.created_on).to eq(Time.parse("1999-06-07 17:23:46 UTC")) + expect(subject.created_on).to eq(DateTime.parse("1999-06-07 17:23:46 UTC")) end end describe "#updated_on" do it do expect(subject.updated_on).to be_a(Time) - expect(subject.updated_on).to eq(Time.parse("2019-05-05 09:40:45 UTC")) + expect(subject.updated_on).to eq(DateTime.parse("2019-05-05 09:40:45 UTC")) end end describe "#expires_on" do it do expect(subject.expires_on).to be_a(Time) - expect(subject.expires_on).to eq(Time.parse("2020-06-06 17:23:46 UTC")) + expect(subject.expires_on).to eq(DateTime.parse("2020-06-06 17:23:46 UTC")) end end describe "#registrar" do diff --git a/spec/whois/parsers/responses/whois.nic.sl/sl/status_registered_spec.rb b/spec/whois/parsers/responses/whois.nic.sl/sl/status_registered_spec.rb index 61442e75..74bb1705 100644 --- a/spec/whois/parsers/responses/whois.nic.sl/sl/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.nic.sl/sl/status_registered_spec.rb @@ -39,7 +39,7 @@ describe "#created_on" do it do expect(subject.created_on).to be_a(Time) - expect(subject.created_on).to eq(Time.parse("2008-05-18")) + expect(subject.created_on).to eq(DateTime.parse("2008-05-18")) end end describe "#updated_on" do @@ -50,7 +50,7 @@ describe "#expires_on" do it do expect(subject.expires_on).to be_a(Time) - expect(subject.expires_on).to eq(Time.parse("2011-05-18")) + expect(subject.expires_on).to eq(DateTime.parse("2011-05-18")) end end describe "#nameservers" do diff --git a/spec/whois/parsers/responses/whois.nic.sm/sm/status_registered_spec.rb b/spec/whois/parsers/responses/whois.nic.sm/sm/status_registered_spec.rb index 00e181bf..d64aa09a 100644 --- a/spec/whois/parsers/responses/whois.nic.sm/sm/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.nic.sm/sm/status_registered_spec.rb @@ -39,13 +39,13 @@ describe "#created_on" do it do expect(subject.created_on).to be_a(Time) - expect(subject.created_on).to eq(Time.parse("2003-04-03 00:00:00 UTC")) + expect(subject.created_on).to eq(DateTime.parse("2003-04-03 00:00:00 UTC")) end end describe "#updated_on" do it do expect(subject.updated_on).to be_a(Time) - expect(subject.updated_on).to eq(Time.parse("2008-08-01 00:00:00 UTC")) + expect(subject.updated_on).to eq(DateTime.parse("2008-08-01 00:00:00 UTC")) end end describe "#expires_on" do diff --git a/spec/whois/parsers/responses/whois.nic.sn/sn/status_registered_spec.rb b/spec/whois/parsers/responses/whois.nic.sn/sn/status_registered_spec.rb index 9680c314..92040999 100644 --- a/spec/whois/parsers/responses/whois.nic.sn/sn/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.nic.sn/sn/status_registered_spec.rb @@ -54,7 +54,7 @@ describe "#created_on" do it do expect(subject.created_on).to be_a(Time) - expect(subject.created_on).to eq(Time.parse("2008-05-08 17:59:38")) + expect(subject.created_on).to eq(DateTime.parse("2008-05-08 17:59:38")) end end describe "#updated_on" do diff --git a/spec/whois/parsers/responses/whois.nic.so/so/status_registered_spec.rb b/spec/whois/parsers/responses/whois.nic.so/so/status_registered_spec.rb index 63d625d0..7e5cb473 100644 --- a/spec/whois/parsers/responses/whois.nic.so/so/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.nic.so/so/status_registered_spec.rb @@ -39,19 +39,19 @@ describe "#created_on" do it do expect(subject.created_on).to be_a(Time) - expect(subject.created_on).to eq(Time.parse("2011-01-24 02:22:24 UTC")) + expect(subject.created_on).to eq(DateTime.parse("2011-01-24 02:22:24 UTC")) end end describe "#updated_on" do it do expect(subject.updated_on).to be_a(Time) - expect(subject.updated_on).to eq(Time.parse("2011-01-25 04:20:26 UTC")) + expect(subject.updated_on).to eq(DateTime.parse("2011-01-25 04:20:26 UTC")) end end describe "#expires_on" do it do expect(subject.expires_on).to be_a(Time) - expect(subject.expires_on).to eq(Time.parse("2014-01-24 02:22:24 UTC")) + expect(subject.expires_on).to eq(DateTime.parse("2014-01-24 02:22:24 UTC")) end end describe "#nameservers" do diff --git a/spec/whois/parsers/responses/whois.nic.space/space/status_registered_spec.rb b/spec/whois/parsers/responses/whois.nic.space/space/status_registered_spec.rb index 0c1f5b00..5ae31d31 100644 --- a/spec/whois/parsers/responses/whois.nic.space/space/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.nic.space/space/status_registered_spec.rb @@ -54,19 +54,19 @@ describe "#created_on" do it do expect(subject.created_on).to be_a(Time) - expect(subject.created_on).to eq(Time.parse("2014-04-10T09:14:07.0Z")) + expect(subject.created_on).to eq(DateTime.parse("2014-04-10T09:14:07.0Z")) end end describe "#updated_on" do it do expect(subject.updated_on).to be_a(Time) - expect(subject.updated_on).to eq(Time.parse("2015-04-04T00:14:21.0Z")) + expect(subject.updated_on).to eq(DateTime.parse("2015-04-04T00:14:21.0Z")) end end describe "#expires_on" do it do expect(subject.expires_on).to be_a(Time) - expect(subject.expires_on).to eq(Time.parse("2016-04-10T23:59:59.0Z")) + expect(subject.expires_on).to eq(DateTime.parse("2016-04-10T23:59:59.0Z")) end end describe "#registrar" do diff --git a/spec/whois/parsers/responses/whois.nic.st/st/status_registered_spec.rb b/spec/whois/parsers/responses/whois.nic.st/st/status_registered_spec.rb index 287d29f4..d86af077 100644 --- a/spec/whois/parsers/responses/whois.nic.st/st/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.nic.st/st/status_registered_spec.rb @@ -39,19 +39,19 @@ describe "#created_on" do it do expect(subject.created_on).to be_a(Time) - expect(subject.created_on).to eq(Time.parse("2004-06-15")) + expect(subject.created_on).to eq(DateTime.parse("2004-06-15")) end end describe "#updated_on" do it do expect(subject.updated_on).to be_a(Time) - expect(subject.updated_on).to eq(Time.parse("2017-05-14")) + expect(subject.updated_on).to eq(DateTime.parse("2017-05-14")) end end describe "#expires_on" do it do expect(subject.expires_on).to be_a(Time) - expect(subject.expires_on).to eq(Time.parse("2018-06-15")) + expect(subject.expires_on).to eq(DateTime.parse("2018-06-15")) end end describe "#nameservers" do diff --git a/spec/whois/parsers/responses/whois.nic.tc/tc/status_registered_spec.rb b/spec/whois/parsers/responses/whois.nic.tc/tc/status_registered_spec.rb index c678782a..a56b4d7c 100644 --- a/spec/whois/parsers/responses/whois.nic.tc/tc/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.nic.tc/tc/status_registered_spec.rb @@ -49,7 +49,7 @@ describe "#created_on" do it do expect(subject.created_on).to be_a(Time) - expect(subject.created_on).to eq(Time.parse("2006-10-11 21:00:00 UTC")) + expect(subject.created_on).to eq(DateTime.parse("2006-10-11 21:00:00 UTC")) end end describe "#updated_on" do @@ -60,7 +60,7 @@ describe "#expires_on" do it do expect(subject.expires_on).to be_a(Time) - expect(subject.expires_on).to eq(Time.parse("2014-10-12 21:00:00 UTC")) + expect(subject.expires_on).to eq(DateTime.parse("2014-10-12 21:00:00 UTC")) end end describe "#registrar" do diff --git a/spec/whois/parsers/responses/whois.nic.tech/tech/status_registered_spec.rb b/spec/whois/parsers/responses/whois.nic.tech/tech/status_registered_spec.rb index 55d545f6..a34179b1 100644 --- a/spec/whois/parsers/responses/whois.nic.tech/tech/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.nic.tech/tech/status_registered_spec.rb @@ -54,19 +54,19 @@ describe "#created_on" do it do expect(subject.created_on).to be_a(Time) - expect(subject.created_on).to eq(Time.parse("2015-07-29 00:00:00 UTC")) + expect(subject.created_on).to eq(DateTime.parse("2015-07-29 00:00:00 UTC")) end end describe "#updated_on" do it do expect(subject.updated_on).to be_a(Time) - expect(subject.updated_on).to eq(Time.parse("2015-08-04 09:00:43 UTC")) + expect(subject.updated_on).to eq(DateTime.parse("2015-08-04 09:00:43 UTC")) end end describe "#expires_on" do it do expect(subject.expires_on).to be_a(Time) - expect(subject.expires_on).to eq(Time.parse("2017-07-29 23:59:59 UTC")) + expect(subject.expires_on).to eq(DateTime.parse("2017-07-29 23:59:59 UTC")) end end describe "#registrar" do diff --git a/spec/whois/parsers/responses/whois.nic.tel/tel/status_registered_spec.rb b/spec/whois/parsers/responses/whois.nic.tel/tel/status_registered_spec.rb index d55a21f7..5a385a72 100644 --- a/spec/whois/parsers/responses/whois.nic.tel/tel/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.nic.tel/tel/status_registered_spec.rb @@ -49,19 +49,19 @@ describe "#created_on" do it do expect(subject.created_on).to be_a(Time) - expect(subject.created_on).to eq(Time.parse("2009-03-23 23:59:59 GMT")) + expect(subject.created_on).to eq(DateTime.parse("2009-03-23 23:59:59 GMT")) end end describe "#updated_on" do it do expect(subject.updated_on).to be_a(Time) - expect(subject.updated_on).to eq(Time.parse("2013-02-19 10:23:33 GMT")) + expect(subject.updated_on).to eq(DateTime.parse("2013-02-19 10:23:33 GMT")) end end describe "#expires_on" do it do expect(subject.expires_on).to be_a(Time) - expect(subject.expires_on).to eq(Time.parse("2014-03-22 23:59:59 GMT")) + expect(subject.expires_on).to eq(DateTime.parse("2014-03-22 23:59:59 GMT")) end end describe "#registrar" do diff --git a/spec/whois/parsers/responses/whois.nic.tl/tl/status_registered_spec.rb b/spec/whois/parsers/responses/whois.nic.tl/tl/status_registered_spec.rb index fb0155f9..e4b81eb3 100644 --- a/spec/whois/parsers/responses/whois.nic.tl/tl/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.nic.tl/tl/status_registered_spec.rb @@ -49,19 +49,19 @@ describe "#created_on" do it do expect(subject.created_on).to be_a(Time) - expect(subject.created_on).to eq(Time.parse("2003-05-23 12:00:00 UTC")) + expect(subject.created_on).to eq(DateTime.parse("2003-05-23 12:00:00 UTC")) end end describe "#updated_on" do it do expect(subject.updated_on).to be_a(Time) - expect(subject.updated_on).to eq(Time.parse("2013-12-06 07:41:57 UTC")) + expect(subject.updated_on).to eq(DateTime.parse("2013-12-06 07:41:57 UTC")) end end describe "#expires_on" do it do expect(subject.expires_on).to be_a(Time) - expect(subject.expires_on).to eq(Time.parse("2014-05-23 12:00:00 UTC")) + expect(subject.expires_on).to eq(DateTime.parse("2014-05-23 12:00:00 UTC")) end end describe "#registrar" do diff --git a/spec/whois/parsers/responses/whois.nic.tm/tm/status_registered_spec.rb b/spec/whois/parsers/responses/whois.nic.tm/tm/status_registered_spec.rb index 0daf485e..10685ac2 100644 --- a/spec/whois/parsers/responses/whois.nic.tm/tm/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.nic.tm/tm/status_registered_spec.rb @@ -64,7 +64,7 @@ describe "#expires_on" do it do expect(subject.expires_on).to be_a(Time) - expect(subject.expires_on).to eq(Time.parse("2020-01-30")) + expect(subject.expires_on).to eq(DateTime.parse("2020-01-30")) end end describe "#registrar" do diff --git a/spec/whois/parsers/responses/whois.nic.tr/tr/status_registered_spec.rb b/spec/whois/parsers/responses/whois.nic.tr/tr/status_registered_spec.rb index b00ec5c3..d98e1b13 100644 --- a/spec/whois/parsers/responses/whois.nic.tr/tr/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.nic.tr/tr/status_registered_spec.rb @@ -54,7 +54,7 @@ describe "#created_on" do it do expect(subject.created_on).to be_a(Time) - expect(subject.created_on).to eq(Time.parse("2001-08-23 00:00:00 UTC")) + expect(subject.created_on).to eq(DateTime.parse("2001-08-23 00:00:00 UTC")) end end describe "#updated_on" do @@ -65,7 +65,7 @@ describe "#expires_on" do it do expect(subject.expires_on).to be_a(Time) - expect(subject.expires_on).to eq(Time.parse("2014-08-22 00:00:00 UTC")) + expect(subject.expires_on).to eq(DateTime.parse("2014-08-22 00:00:00 UTC")) end end describe "#registrar" do diff --git a/spec/whois/parsers/responses/whois.nic.travel/travel/status_registered_spec.rb b/spec/whois/parsers/responses/whois.nic.travel/travel/status_registered_spec.rb index 76989b88..ccc6463a 100644 --- a/spec/whois/parsers/responses/whois.nic.travel/travel/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.nic.travel/travel/status_registered_spec.rb @@ -49,19 +49,19 @@ describe "#created_on" do it do expect(subject.created_on).to be_a(Time) - expect(subject.created_on).to eq(Time.parse("2005-10-04 21:44:27 GMT")) + expect(subject.created_on).to eq(DateTime.parse("2005-10-04 21:44:27 GMT")) end end describe "#updated_on" do it do expect(subject.updated_on).to be_a(Time) - expect(subject.updated_on).to eq(Time.parse("2013-09-18 15:13:32 GMT")) + expect(subject.updated_on).to eq(DateTime.parse("2013-09-18 15:13:32 GMT")) end end describe "#expires_on" do it do expect(subject.expires_on).to be_a(Time) - expect(subject.expires_on).to eq(Time.parse("2021-10-03 23:59:59 GMT")) + expect(subject.expires_on).to eq(DateTime.parse("2021-10-03 23:59:59 GMT")) end end describe "#registrar" do diff --git a/spec/whois/parsers/responses/whois.nic.uk/uk/status_registered_spec.rb b/spec/whois/parsers/responses/whois.nic.uk/uk/status_registered_spec.rb index 3a7ae26b..d66fb97f 100644 --- a/spec/whois/parsers/responses/whois.nic.uk/uk/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.nic.uk/uk/status_registered_spec.rb @@ -39,19 +39,19 @@ describe "#created_on" do it do expect(subject.created_on).to be_a(Time) - expect(subject.created_on).to eq(Time.parse("1999-02-14")) + expect(subject.created_on).to eq(DateTime.parse("1999-02-14")) end end describe "#updated_on" do it do expect(subject.updated_on).to be_a(Time) - expect(subject.updated_on).to eq(Time.parse("2014-01-13")) + expect(subject.updated_on).to eq(DateTime.parse("2014-01-13")) end end describe "#expires_on" do it do expect(subject.expires_on).to be_a(Time) - expect(subject.expires_on).to eq(Time.parse("2015-02-14")) + expect(subject.expires_on).to eq(DateTime.parse("2015-02-14")) end end describe "#registrar" do diff --git a/spec/whois/parsers/responses/whois.nic.uk/uk/status_reserved_spec.rb b/spec/whois/parsers/responses/whois.nic.uk/uk/status_reserved_spec.rb index 5c68dfa1..de7408cd 100644 --- a/spec/whois/parsers/responses/whois.nic.uk/uk/status_reserved_spec.rb +++ b/spec/whois/parsers/responses/whois.nic.uk/uk/status_reserved_spec.rb @@ -39,13 +39,13 @@ describe "#created_on" do it do expect(subject.created_on).to be_a(Time) - expect(subject.created_on).to eq(Time.parse("1996-08-01")) + expect(subject.created_on).to eq(DateTime.parse("1996-08-01")) end end describe "#updated_on" do it do expect(subject.updated_on).to be_a(Time) - expect(subject.updated_on).to eq(Time.parse("2012-03-23")) + expect(subject.updated_on).to eq(DateTime.parse("2012-03-23")) end end describe "#expires_on" do diff --git a/spec/whois/parsers/responses/whois.nic.uk/uk/status_suspended_spec.rb b/spec/whois/parsers/responses/whois.nic.uk/uk/status_suspended_spec.rb index 617343a4..8cc4bc42 100644 --- a/spec/whois/parsers/responses/whois.nic.uk/uk/status_suspended_spec.rb +++ b/spec/whois/parsers/responses/whois.nic.uk/uk/status_suspended_spec.rb @@ -39,19 +39,19 @@ describe "#created_on" do it do expect(subject.created_on).to be_a(Time) - expect(subject.created_on).to eq(Time.parse("2008-08-30")) + expect(subject.created_on).to eq(DateTime.parse("2008-08-30")) end end describe "#updated_on" do it do expect(subject.updated_on).to be_a(Time) - expect(subject.updated_on).to eq(Time.parse("2012-02-09")) + expect(subject.updated_on).to eq(DateTime.parse("2012-02-09")) end end describe "#expires_on" do it do expect(subject.expires_on).to be_a(Time) - expect(subject.expires_on).to eq(Time.parse("2010-08-30")) + expect(subject.expires_on).to eq(DateTime.parse("2010-08-30")) end end describe "#registrar" do diff --git a/spec/whois/parsers/responses/whois.nic.us/us/status_registered_spec.rb b/spec/whois/parsers/responses/whois.nic.us/us/status_registered_spec.rb index 220c5dfe..1c51b3e2 100644 --- a/spec/whois/parsers/responses/whois.nic.us/us/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.nic.us/us/status_registered_spec.rb @@ -49,19 +49,19 @@ describe "#created_on" do it do expect(subject.created_on).to be_a(Time) - expect(subject.created_on).to eq(Time.parse("2002-04-19 23:15:57 GMT")) + expect(subject.created_on).to eq(DateTime.parse("2002-04-19 23:15:57 GMT")) end end describe "#updated_on" do it do expect(subject.updated_on).to be_a(Time) - expect(subject.updated_on).to eq(Time.parse("2013-03-17 09:44:30 GMT")) + expect(subject.updated_on).to eq(DateTime.parse("2013-03-17 09:44:30 GMT")) end end describe "#expires_on" do it do expect(subject.expires_on).to be_a(Time) - expect(subject.expires_on).to eq(Time.parse("2014-04-18 23:59:59 GMT")) + expect(subject.expires_on).to eq(DateTime.parse("2014-04-18 23:59:59 GMT")) end end describe "#registrar" do diff --git a/spec/whois/parsers/responses/whois.nic.ve/ve/property_updated_on_spec.rb b/spec/whois/parsers/responses/whois.nic.ve/ve/property_updated_on_spec.rb index 21ab6e00..e0cc55d2 100644 --- a/spec/whois/parsers/responses/whois.nic.ve/ve/property_updated_on_spec.rb +++ b/spec/whois/parsers/responses/whois.nic.ve/ve/property_updated_on_spec.rb @@ -24,7 +24,7 @@ describe "#updated_on" do it do expect(subject.updated_on).to be_a(Time) - expect(subject.updated_on).to eq(Time.parse("2005-11-17 21:16:31")) + expect(subject.updated_on).to eq(DateTime.parse("2005-11-17 21:16:31")) end end end diff --git a/spec/whois/parsers/responses/whois.nic.ve/ve/status_inactive_spec.rb b/spec/whois/parsers/responses/whois.nic.ve/ve/status_inactive_spec.rb index 994df535..9d4f88c2 100644 --- a/spec/whois/parsers/responses/whois.nic.ve/ve/status_inactive_spec.rb +++ b/spec/whois/parsers/responses/whois.nic.ve/ve/status_inactive_spec.rb @@ -39,19 +39,19 @@ describe "#created_on" do it do expect(subject.created_on).to be_a(Time) - expect(subject.created_on).to eq(Time.parse("2005-11-21 15:21:32")) + expect(subject.created_on).to eq(DateTime.parse("2005-11-21 15:21:32")) end end describe "#updated_on" do it do expect(subject.updated_on).to be_a(Time) - expect(subject.updated_on).to eq(Time.parse("2006-06-08 21:54:41")) + expect(subject.updated_on).to eq(DateTime.parse("2006-06-08 21:54:41")) end end describe "#expires_on" do it do expect(subject.expires_on).to be_a(Time) - expect(subject.expires_on).to eq(Time.parse("2010-11-21 15:21:32")) + expect(subject.expires_on).to eq(DateTime.parse("2010-11-21 15:21:32")) end end describe "#nameservers" do diff --git a/spec/whois/parsers/responses/whois.nic.ve/ve/status_registered_spec.rb b/spec/whois/parsers/responses/whois.nic.ve/ve/status_registered_spec.rb index 54327b6e..feec49ce 100644 --- a/spec/whois/parsers/responses/whois.nic.ve/ve/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.nic.ve/ve/status_registered_spec.rb @@ -39,7 +39,7 @@ describe "#created_on" do it do expect(subject.created_on).to be_a(Time) - expect(subject.created_on).to eq(Time.parse("2010-10-27 12:23:43")) + expect(subject.created_on).to eq(DateTime.parse("2010-10-27 12:23:43")) end end describe "#updated_on" do @@ -50,7 +50,7 @@ describe "#expires_on" do it do expect(subject.expires_on).to be_a(Time) - expect(subject.expires_on).to eq(Time.parse("2011-10-27 12:23:43")) + expect(subject.expires_on).to eq(DateTime.parse("2011-10-27 12:23:43")) end end describe "#nameservers" do diff --git a/spec/whois/parsers/responses/whois.nic.wf/wf/status_registered_spec.rb b/spec/whois/parsers/responses/whois.nic.wf/wf/status_registered_spec.rb index e1d096e1..65c17c04 100644 --- a/spec/whois/parsers/responses/whois.nic.wf/wf/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.nic.wf/wf/status_registered_spec.rb @@ -39,19 +39,19 @@ describe "#created_on" do it do expect(subject.created_on).to be_a(Time) - expect(subject.created_on).to eq(Time.parse("1994-12-31 23:00:00 UTC")) + expect(subject.created_on).to eq(DateTime.parse("1994-12-31 23:00:00 UTC")) end end describe "#updated_on" do it do expect(subject.updated_on).to be_a(Time) - expect(subject.updated_on).to eq(Time.parse("2018-12-31 23:33:39 UTC")) + expect(subject.updated_on).to eq(DateTime.parse("2018-12-31 23:33:39 UTC")) end end describe "#expires_on" do it do expect(subject.expires_on).to be_a(Time) - expect(subject.expires_on).to eq(Time.parse("2019-12-31 23:00:00 UTC")) + expect(subject.expires_on).to eq(DateTime.parse("2019-12-31 23:00:00 UTC")) end end describe "#registrant_contacts" do @@ -72,7 +72,7 @@ expect(subject.registrant_contacts[0].phone).to eq("+33 1 39 30 83 00") expect(subject.registrant_contacts[0].fax).to eq("+33 1 39 30 83 01") expect(subject.registrant_contacts[0].email).to eq("support@afnic.fr") - expect(subject.registrant_contacts[0].updated_on).to eq(Time.parse("2017-07-17 12:41:18 UTC")) + expect(subject.registrant_contacts[0].updated_on).to eq(DateTime.parse("2017-07-17 12:41:18 UTC")) end end describe "#admin_contacts" do @@ -93,7 +93,7 @@ expect(subject.admin_contacts[0].phone).to eq("+33 1 39 30 83 00") expect(subject.admin_contacts[0].fax).to eq(nil) expect(subject.admin_contacts[0].email).to eq("hostmaster@nic.fr") - expect(subject.admin_contacts[0].updated_on).to eq(Time.parse("2005-08-23 16:13:17 UTC")) + expect(subject.admin_contacts[0].updated_on).to eq(DateTime.parse("2005-08-23 16:13:17 UTC")) end end describe "#technical_contacts" do @@ -114,7 +114,7 @@ expect(subject.technical_contacts[0].phone).to eq("+33 1 39 30 83 00") expect(subject.technical_contacts[0].fax).to eq(nil) expect(subject.technical_contacts[0].email).to eq("hostmaster@nic.fr") - expect(subject.technical_contacts[0].updated_on).to eq(Time.parse("2005-08-23 16:13:17 UTC")) + expect(subject.technical_contacts[0].updated_on).to eq(DateTime.parse("2005-08-23 16:13:17 UTC")) end end describe "#nameservers" do diff --git a/spec/whois/parsers/responses/whois.nic.xxx/xxx/status_registered_spec.rb b/spec/whois/parsers/responses/whois.nic.xxx/xxx/status_registered_spec.rb index 7c827316..a3980d52 100644 --- a/spec/whois/parsers/responses/whois.nic.xxx/xxx/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.nic.xxx/xxx/status_registered_spec.rb @@ -54,19 +54,19 @@ describe "#created_on" do it do expect(subject.created_on).to be_a(Time) - expect(subject.created_on).to eq(Time.parse("2012-05-31 14:58:50 UTC")) + expect(subject.created_on).to eq(DateTime.parse("2012-05-31 14:58:50 UTC")) end end describe "#updated_on" do it do expect(subject.updated_on).to be_a(Time) - expect(subject.updated_on).to eq(Time.parse("2021-05-01 08:25:32 UTC")) + expect(subject.updated_on).to eq(DateTime.parse("2021-05-01 08:25:32 UTC")) end end describe "#expires_on" do it do expect(subject.expires_on).to be_a(Time) - expect(subject.expires_on).to eq(Time.parse("2022-05-31 14:58:50 UTC")) + expect(subject.expires_on).to eq(DateTime.parse("2022-05-31 14:58:50 UTC")) end end describe "#registrar" do diff --git a/spec/whois/parsers/responses/whois.nic.xyz/xyz/status_registered_spec.rb b/spec/whois/parsers/responses/whois.nic.xyz/xyz/status_registered_spec.rb index f4c4f63f..e1731af6 100644 --- a/spec/whois/parsers/responses/whois.nic.xyz/xyz/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.nic.xyz/xyz/status_registered_spec.rb @@ -54,19 +54,19 @@ describe "#created_on" do it do expect(subject.created_on).to be_a(Time) - expect(subject.created_on).to eq(Time.parse("2014-03-20 12:59:17 UTC")) + expect(subject.created_on).to eq(DateTime.parse("2014-03-20 12:59:17 UTC")) end end describe "#updated_on" do it do expect(subject.updated_on).to be_a(Time) - expect(subject.updated_on).to eq(Time.parse("2015-08-18 15:09:36 UTC")) + expect(subject.updated_on).to eq(DateTime.parse("2015-08-18 15:09:36 UTC")) end end describe "#expires_on" do it do expect(subject.expires_on).to be_a(Time) - expect(subject.expires_on).to eq(Time.parse("2025-03-20 23:59:59 UTC")) + expect(subject.expires_on).to eq(DateTime.parse("2025-03-20 23:59:59 UTC")) end end describe "#registrar" do diff --git a/spec/whois/parsers/responses/whois.nic.yt/yt/status_registered_spec.rb b/spec/whois/parsers/responses/whois.nic.yt/yt/status_registered_spec.rb index 33400dff..d7027e7a 100644 --- a/spec/whois/parsers/responses/whois.nic.yt/yt/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.nic.yt/yt/status_registered_spec.rb @@ -39,19 +39,19 @@ describe "#created_on" do it do expect(subject.created_on).to be_a(Time) - expect(subject.created_on).to eq(Time.parse("1994-12-31 23:00:00 UTC")) + expect(subject.created_on).to eq(DateTime.parse("1994-12-31 23:00:00 UTC")) end end describe "#updated_on" do it do expect(subject.updated_on).to be_a(Time) - expect(subject.updated_on).to eq(Time.parse("2018-12-31 23:33:38 UTC")) + expect(subject.updated_on).to eq(DateTime.parse("2018-12-31 23:33:38 UTC")) end end describe "#expires_on" do it do expect(subject.expires_on).to be_a(Time) - expect(subject.expires_on).to eq(Time.parse("2019-12-31 23:00:00 UTC")) + expect(subject.expires_on).to eq(DateTime.parse("2019-12-31 23:00:00 UTC")) end end describe "#registrant_contacts" do @@ -72,7 +72,7 @@ expect(subject.registrant_contacts[0].phone).to eq("+33 1 39 30 83 00") expect(subject.registrant_contacts[0].fax).to eq("+33 1 39 30 83 01") expect(subject.registrant_contacts[0].email).to eq("support@afnic.fr") - expect(subject.registrant_contacts[0].updated_on).to eq(Time.parse("2017-07-17 12:41:44 UTC")) + expect(subject.registrant_contacts[0].updated_on).to eq(DateTime.parse("2017-07-17 12:41:44 UTC")) end end describe "#admin_contacts" do @@ -93,7 +93,7 @@ expect(subject.admin_contacts[0].phone).to eq("+33 1 39 30 83 00") expect(subject.admin_contacts[0].fax).to eq(nil) expect(subject.admin_contacts[0].email).to eq("hostmaster@nic.fr") - expect(subject.admin_contacts[0].updated_on).to eq(Time.parse("2005-08-23 16:13:17 UTC")) + expect(subject.admin_contacts[0].updated_on).to eq(DateTime.parse("2005-08-23 16:13:17 UTC")) end end describe "#technical_contacts" do @@ -114,7 +114,7 @@ expect(subject.technical_contacts[0].phone).to eq("+33 1 39 30 83 00") expect(subject.technical_contacts[0].fax).to eq(nil) expect(subject.technical_contacts[0].email).to eq("hostmaster@nic.fr") - expect(subject.technical_contacts[0].updated_on).to eq(Time.parse("2005-08-23 16:13:17 UTC")) + expect(subject.technical_contacts[0].updated_on).to eq(DateTime.parse("2005-08-23 16:13:17 UTC")) end end describe "#nameservers" do diff --git a/spec/whois/parsers/responses/whois.norid.no/no/status_registered_spec.rb b/spec/whois/parsers/responses/whois.norid.no/no/status_registered_spec.rb index 60bdbedd..74747e68 100644 --- a/spec/whois/parsers/responses/whois.norid.no/no/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.norid.no/no/status_registered_spec.rb @@ -39,13 +39,13 @@ describe "#created_on" do it do expect(subject.created_on).to be_a(Time) - expect(subject.created_on).to eq(Time.parse("2001-02-26")) + expect(subject.created_on).to eq(DateTime.parse("2001-02-26")) end end describe "#updated_on" do it do expect(subject.updated_on).to be_a(Time) - expect(subject.updated_on).to eq(Time.parse("2015-01-27")) + expect(subject.updated_on).to eq(DateTime.parse("2015-01-27")) end end describe "#expires_on" do diff --git a/spec/whois/parsers/responses/whois.pairnic.com/status_registered_spec.rb b/spec/whois/parsers/responses/whois.pairnic.com/status_registered_spec.rb index b80319b4..fe97e2b8 100644 --- a/spec/whois/parsers/responses/whois.pairnic.com/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.pairnic.com/status_registered_spec.rb @@ -49,19 +49,19 @@ describe "#created_on" do it do expect(subject.created_on).to be_a(Time) - expect(subject.created_on).to eq(Time.parse("1998-12-19T05:00:00.0000Z")) + expect(subject.created_on).to eq(DateTime.parse("1998-12-19T05:00:00.0000Z")) end end describe "#updated_on" do it do expect(subject.updated_on).to be_a(Time) - expect(subject.updated_on).to eq(Time.parse("2012-09-04T13:55:30.0000Z")) + expect(subject.updated_on).to eq(DateTime.parse("2012-09-04T13:55:30.0000Z")) end end describe "#expires_on" do it do expect(subject.expires_on).to be_a(Time) - expect(subject.expires_on).to eq(Time.parse("2017-12-18T19:00:-0500Z")) + expect(subject.expires_on).to eq(DateTime.parse("2017-12-18T19:00:-0500Z")) end end describe "#registrar" do diff --git a/spec/whois/parsers/responses/whois.pandi.or.id/id/status_registered_spec.rb b/spec/whois/parsers/responses/whois.pandi.or.id/id/status_registered_spec.rb index aefe8689..77d23b16 100644 --- a/spec/whois/parsers/responses/whois.pandi.or.id/id/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.pandi.or.id/id/status_registered_spec.rb @@ -54,19 +54,19 @@ describe "#created_on" do it do expect(subject.created_on).to be_a(Time) - expect(subject.created_on).to eq(Time.parse("2004-12-18 13:33:21 UTC")) + expect(subject.created_on).to eq(DateTime.parse("2004-12-18 13:33:21 UTC")) end end describe "#updated_on" do it do expect(subject.updated_on).to be_a(Time) - expect(subject.updated_on).to eq(Time.parse("2013-09-20 23:24:51 UTC")) + expect(subject.updated_on).to eq(DateTime.parse("2013-09-20 23:24:51 UTC")) end end describe "#expires_on" do it do expect(subject.expires_on).to be_a(Time) - expect(subject.expires_on).to eq(Time.parse("2014-09-01 23:59:59 UTC")) + expect(subject.expires_on).to eq(DateTime.parse("2014-09-01 23:59:59 UTC")) end end describe "#registrar" do diff --git a/spec/whois/parsers/responses/whois.pir.org/org/status_registered_spec.rb b/spec/whois/parsers/responses/whois.pir.org/org/status_registered_spec.rb index 255d2b84..1f2f5306 100644 --- a/spec/whois/parsers/responses/whois.pir.org/org/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.pir.org/org/status_registered_spec.rb @@ -54,19 +54,19 @@ describe "#created_on" do it do expect(subject.created_on).to be_a(Time) - expect(subject.created_on).to eq(Time.parse("1998-10-21 04:00:00 UTC")) + expect(subject.created_on).to eq(DateTime.parse("1998-10-21 04:00:00 UTC")) end end describe "#updated_on" do it do expect(subject.updated_on).to be_a(Time) - expect(subject.updated_on).to eq(Time.parse("2021-09-18 09:24:00 UTC")) + expect(subject.updated_on).to eq(DateTime.parse("2021-09-18 09:24:00 UTC")) end end describe "#expires_on" do it do expect(subject.expires_on).to be_a(Time) - expect(subject.expires_on).to eq(Time.parse("2022-10-20 04:00:00 UTC")) + expect(subject.expires_on).to eq(DateTime.parse("2022-10-20 04:00:00 UTC")) end end describe "#registrar" do diff --git a/spec/whois/parsers/responses/whois.pnina.ps/ps/status_registered_spec.rb b/spec/whois/parsers/responses/whois.pnina.ps/ps/status_registered_spec.rb index c5ba8051..a1f2f82e 100644 --- a/spec/whois/parsers/responses/whois.pnina.ps/ps/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.pnina.ps/ps/status_registered_spec.rb @@ -49,7 +49,7 @@ describe "#created_on" do it do expect(subject.created_on).to be_a(Time) - expect(subject.created_on).to eq(Time.parse("2004-05-18 22:00:00 UTC")) + expect(subject.created_on).to eq(DateTime.parse("2004-05-18 22:00:00 UTC")) end end describe "#updated_on" do @@ -60,7 +60,7 @@ describe "#expires_on" do it do expect(subject.expires_on).to be_a(Time) - expect(subject.expires_on).to eq(Time.parse("2014-05-18 22:00:00 UTC")) + expect(subject.expires_on).to eq(DateTime.parse("2014-05-18 22:00:00 UTC")) end end describe "#registrar" do diff --git a/spec/whois/parsers/responses/whois.register.bg/bg/status_registered_spec.rb b/spec/whois/parsers/responses/whois.register.bg/bg/status_registered_spec.rb index 0428b792..39ae6429 100644 --- a/spec/whois/parsers/responses/whois.register.bg/bg/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.register.bg/bg/status_registered_spec.rb @@ -39,7 +39,7 @@ describe "#created_on" do it do expect(subject.created_on).to be_a(Time) - expect(subject.created_on).to eq(Time.parse("2003-06-30 00:00:00")) + expect(subject.created_on).to eq(DateTime.parse("2003-06-30 00:00:00 EEST")) end end describe "#updated_on" do @@ -50,7 +50,7 @@ describe "#expires_on" do it do expect(subject.expires_on).to be_a(Time) - expect(subject.expires_on).to eq(Time.parse("2014-06-30 00:00:00")) + expect(subject.expires_on).to eq(DateTime.parse("2014-06-30 00:00:00 EEST")) end end describe "#nameservers" do diff --git a/spec/whois/parsers/responses/whois.register.com/status_registered_spec.rb b/spec/whois/parsers/responses/whois.register.com/status_registered_spec.rb index af347bce..f2a22776 100644 --- a/spec/whois/parsers/responses/whois.register.com/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.register.com/status_registered_spec.rb @@ -49,19 +49,19 @@ describe "#created_on" do it do expect(subject.created_on).to be_a(Time) - expect(subject.created_on).to eq(Time.parse("1994-11-01T00:00:00-0500")) + expect(subject.created_on).to eq(DateTime.parse("1994-11-01T00:00:00-0500")) end end describe "#updated_on" do it do expect(subject.updated_on).to be_a(Time) - expect(subject.updated_on).to eq(Time.parse("2009-08-26T00:00:00-0400")) + expect(subject.updated_on).to eq(DateTime.parse("2009-08-26T00:00:00-0400")) end end describe "#expires_on" do it do expect(subject.expires_on).to be_a(Time) - expect(subject.expires_on).to eq(Time.parse("2019-08-04T00:00:00-0400")) + expect(subject.expires_on).to eq(DateTime.parse("2019-08-04T00:00:00-0400")) end end describe "#registrar" do diff --git a/spec/whois/parsers/responses/whois.register.si/si/status_registered_spec.rb b/spec/whois/parsers/responses/whois.register.si/si/status_registered_spec.rb index f921d958..335f2025 100644 --- a/spec/whois/parsers/responses/whois.register.si/si/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.register.si/si/status_registered_spec.rb @@ -39,7 +39,7 @@ describe "#created_on" do it do expect(subject.created_on).to be_a(Time) - expect(subject.created_on).to eq(Time.parse("2005-04-04")) + expect(subject.created_on).to eq(DateTime.parse("2005-04-04")) end end describe "#updated_on" do @@ -50,7 +50,7 @@ describe "#expires_on" do it do expect(subject.expires_on).to be_a(Time) - expect(subject.expires_on).to eq(Time.parse("2015-07-19")) + expect(subject.expires_on).to eq(DateTime.parse("2015-07-19")) end end describe "#nameservers" do diff --git a/spec/whois/parsers/responses/whois.registre.ma/ma/status_registered_spec.rb b/spec/whois/parsers/responses/whois.registre.ma/ma/status_registered_spec.rb index fb14c0bc..66ec6b84 100644 --- a/spec/whois/parsers/responses/whois.registre.ma/ma/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.registre.ma/ma/status_registered_spec.rb @@ -39,13 +39,13 @@ describe "#created_on" do it do expect(subject.created_on).to be_a(Time) - expect(subject.created_on).to eq(Time.parse("2009-03-24")) + expect(subject.created_on).to eq(DateTime.parse("2009-03-24")) end end describe "#updated_on" do it do expect(subject.updated_on).to be_a(Time) - expect(subject.updated_on).to eq(Time.parse("2009-03-24")) + expect(subject.updated_on).to eq(DateTime.parse("2009-03-24")) end end describe "#expires_on" do diff --git a/spec/whois/parsers/responses/whois.registro.br/br/status_registered_spec.rb b/spec/whois/parsers/responses/whois.registro.br/br/status_registered_spec.rb index 8295243e..14e6e55b 100644 --- a/spec/whois/parsers/responses/whois.registro.br/br/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.registro.br/br/status_registered_spec.rb @@ -44,19 +44,19 @@ describe "#created_on" do it do expect(subject.created_on).to be_a(Time) - expect(subject.created_on).to eq(Time.parse("1999-05-18")) + expect(subject.created_on).to eq(DateTime.parse("1999-05-18")) end end describe "#updated_on" do it do expect(subject.updated_on).to be_a(Time) - expect(subject.updated_on).to eq(Time.parse("2017-04-27")) + expect(subject.updated_on).to eq(DateTime.parse("2017-04-27")) end end describe "#expires_on" do it do expect(subject.expires_on).to be_a(Time) - expect(subject.expires_on).to eq(Time.parse("2018-05-18")) + expect(subject.expires_on).to eq(DateTime.parse("2018-05-18")) end end describe "#registrant_contacts" do @@ -77,8 +77,8 @@ expect(subject.registrant_contacts[0].phone).to eq(nil) expect(subject.registrant_contacts[0].fax).to eq(nil) expect(subject.registrant_contacts[0].email).to eq("ccops@markmonitor.com") - expect(subject.registrant_contacts[0].created_on).to eq(Time.parse("2010-05-20 00:00:00 UTC")) - expect(subject.registrant_contacts[0].updated_on).to eq(Time.parse("2017-01-03 00:00:00 UTC")) + expect(subject.registrant_contacts[0].created_on).to eq(DateTime.parse("2010-05-20 00:00:00 UTC")) + expect(subject.registrant_contacts[0].updated_on).to eq(DateTime.parse("2017-01-03 00:00:00 UTC")) end end describe "#admin_contacts" do @@ -99,8 +99,8 @@ expect(subject.admin_contacts[0].phone).to eq(nil) expect(subject.admin_contacts[0].fax).to eq(nil) expect(subject.admin_contacts[0].email).to eq("ccops@markmonitor.com") - expect(subject.admin_contacts[0].created_on).to eq(Time.parse("2010-05-20 00:00:00 UTC")) - expect(subject.admin_contacts[0].updated_on).to eq(Time.parse("2017-01-03 00:00:00 UTC")) + expect(subject.admin_contacts[0].created_on).to eq(DateTime.parse("2010-05-20 00:00:00 UTC")) + expect(subject.admin_contacts[0].updated_on).to eq(DateTime.parse("2017-01-03 00:00:00 UTC")) end end describe "#technical_contacts" do @@ -121,8 +121,8 @@ expect(subject.technical_contacts[0].phone).to eq(nil) expect(subject.technical_contacts[0].fax).to eq(nil) expect(subject.technical_contacts[0].email).to eq("ccops@markmonitor.com") - expect(subject.technical_contacts[0].created_on).to eq(Time.parse("2010-05-20 00:00:00 UTC")) - expect(subject.technical_contacts[0].updated_on).to eq(Time.parse("2017-01-03 00:00:00 UTC")) + expect(subject.technical_contacts[0].created_on).to eq(DateTime.parse("2010-05-20 00:00:00 UTC")) + expect(subject.technical_contacts[0].updated_on).to eq(DateTime.parse("2017-01-03 00:00:00 UTC")) end end describe "#nameservers" do diff --git a/spec/whois/parsers/responses/whois.registry.gy/gy/status_registered_spec.rb b/spec/whois/parsers/responses/whois.registry.gy/gy/status_registered_spec.rb index 6c73e5b7..6f1b9d8a 100644 --- a/spec/whois/parsers/responses/whois.registry.gy/gy/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.registry.gy/gy/status_registered_spec.rb @@ -49,19 +49,19 @@ describe "#created_on" do it do expect(subject.created_on).to be_a(Time) - expect(subject.created_on).to eq(Time.parse("2008-05-12 17:56:23 UTC")) + expect(subject.created_on).to eq(DateTime.parse("2008-05-12 17:56:23 UTC")) end end describe "#updated_on" do it do expect(subject.updated_on).to be_a(Time) - expect(subject.updated_on).to eq(Time.parse("2014-01-16 06:53:13 UTC")) + expect(subject.updated_on).to eq(DateTime.parse("2014-01-16 06:53:13 UTC")) end end describe "#expires_on" do it do expect(subject.expires_on).to be_a(Time) - expect(subject.expires_on).to eq(Time.parse("2014-10-04 23:30:00 UTC")) + expect(subject.expires_on).to eq(DateTime.parse("2014-10-04 23:30:00 UTC")) end end describe "#registrar" do diff --git a/spec/whois/parsers/responses/whois.registry.hm/hm/status_registered_spec.rb b/spec/whois/parsers/responses/whois.registry.hm/hm/status_registered_spec.rb index b64efe44..f8c45d93 100644 --- a/spec/whois/parsers/responses/whois.registry.hm/hm/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.registry.hm/hm/status_registered_spec.rb @@ -39,7 +39,7 @@ describe "#created_on" do it do expect(subject.created_on).to be_a(Time) - expect(subject.created_on).to eq(Time.parse("2003-04-28")) + expect(subject.created_on).to eq(DateTime.parse("2003-04-28")) end end describe "#updated_on" do @@ -50,7 +50,7 @@ describe "#expires_on" do it do expect(subject.expires_on).to be_a(Time) - expect(subject.expires_on).to eq(Time.parse("2020-04-28")) + expect(subject.expires_on).to eq(DateTime.parse("2020-04-28")) end end describe "#nameservers" do diff --git a/spec/whois/parsers/responses/whois.registry.om/om/status_registered_spec.rb b/spec/whois/parsers/responses/whois.registry.om/om/status_registered_spec.rb index 4eb33e68..5a5c52bd 100644 --- a/spec/whois/parsers/responses/whois.registry.om/om/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.registry.om/om/status_registered_spec.rb @@ -59,7 +59,7 @@ describe "#updated_on" do it do expect(subject.updated_on).to be_a(Time) - expect(subject.updated_on).to eq(Time.parse("2013-10-06 18:20:12 UTC")) + expect(subject.updated_on).to eq(DateTime.parse("2013-10-06 18:20:12 UTC")) end end describe "#expires_on" do diff --git a/spec/whois/parsers/responses/whois.rnids.rs/rs/status_registered_spec.rb b/spec/whois/parsers/responses/whois.rnids.rs/rs/status_registered_spec.rb index 7375d169..69b1f5e1 100644 --- a/spec/whois/parsers/responses/whois.rnids.rs/rs/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.rnids.rs/rs/status_registered_spec.rb @@ -54,19 +54,19 @@ describe "#created_on" do it do expect(subject.created_on).to be_a(Time) - expect(subject.created_on).to eq(Time.parse("2008-03-10 12:31:19")) + expect(subject.created_on).to eq(DateTime.parse("2008-03-10 12:31:19")) end end describe "#updated_on" do it do expect(subject.updated_on).to be_a(Time) - expect(subject.updated_on).to eq(Time.parse("2014-02-11 19:49:38")) + expect(subject.updated_on).to eq(DateTime.parse("2014-02-11 19:49:38")) end end describe "#expires_on" do it do expect(subject.expires_on).to be_a(Time) - expect(subject.expires_on).to eq(Time.parse("2015-03-10 12:31:19")) + expect(subject.expires_on).to eq(DateTime.parse("2015-03-10 12:31:19")) end end describe "#registrar" do diff --git a/spec/whois/parsers/responses/whois.rrpproxy.net/status_registered_spec.rb b/spec/whois/parsers/responses/whois.rrpproxy.net/status_registered_spec.rb index 4f06b606..23446cb7 100644 --- a/spec/whois/parsers/responses/whois.rrpproxy.net/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.rrpproxy.net/status_registered_spec.rb @@ -49,13 +49,13 @@ describe "#created_on" do it do expect(subject.created_on).to be_a(Time) - expect(subject.created_on).to eq(Time.parse("2006-02-03 19:44:56 UTC")) + expect(subject.created_on).to eq(DateTime.parse("2006-02-03 19:44:56 UTC")) end end describe "#updated_on" do it do expect(subject.updated_on).to be_a(Time) - expect(subject.updated_on).to eq(Time.parse("2014-02-04 08:34:14 UTC")) + expect(subject.updated_on).to eq(DateTime.parse("2014-02-04 08:34:14 UTC")) end end describe "#expires_on" do diff --git a/spec/whois/parsers/responses/whois.safenames.net/status_registered_spec.rb b/spec/whois/parsers/responses/whois.safenames.net/status_registered_spec.rb index ec3e6391..ab957bfe 100644 --- a/spec/whois/parsers/responses/whois.safenames.net/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.safenames.net/status_registered_spec.rb @@ -49,19 +49,19 @@ describe "#created_on" do it do expect(subject.created_on).to be_a(Time) - expect(subject.created_on).to eq(Time.parse("1995-09-12T04:00:00Z")) + expect(subject.created_on).to eq(DateTime.parse("1995-09-12T04:00:00Z")) end end describe "#updated_on" do it do expect(subject.updated_on).to be_a(Time) - expect(subject.updated_on).to eq(Time.parse("2014-10-02T15:33:46Z")) + expect(subject.updated_on).to eq(DateTime.parse("2014-10-02T15:33:46Z")) end end describe "#expires_on" do it do expect(subject.expires_on).to be_a(Time) - expect(subject.expires_on).to eq(Time.parse("2024-09-11T04:00:00Z")) + expect(subject.expires_on).to eq(DateTime.parse("2024-09-11T04:00:00Z")) end end describe "#registrar" do diff --git a/spec/whois/parsers/responses/whois.schlund.info/status_registered_spec.rb b/spec/whois/parsers/responses/whois.schlund.info/status_registered_spec.rb index ae2785c8..f463ad2d 100644 --- a/spec/whois/parsers/responses/whois.schlund.info/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.schlund.info/status_registered_spec.rb @@ -49,19 +49,19 @@ describe "#created_on" do it do expect(subject.created_on).to be_a(Time) - expect(subject.created_on).to eq(Time.parse("1996-10-10 00:00:00")) + expect(subject.created_on).to eq(DateTime.parse("1996-10-10 00:00:00")) end end describe "#updated_on" do it do expect(subject.updated_on).to be_a(Time) - expect(subject.updated_on).to eq(Time.parse("2013-10-09 00:00:00")) + expect(subject.updated_on).to eq(DateTime.parse("2013-10-09 00:00:00")) end end describe "#expires_on" do it do expect(subject.expires_on).to be_a(Time) - expect(subject.expires_on).to eq(Time.parse("2014-10-09 00:00:00")) + expect(subject.expires_on).to eq(DateTime.parse("2014-10-09 00:00:00")) end end describe "#registrar" do diff --git a/spec/whois/parsers/responses/whois.sgnic.sg/sg/status_registered_spec.rb b/spec/whois/parsers/responses/whois.sgnic.sg/sg/status_registered_spec.rb index 733a4a5b..5546c3e8 100644 --- a/spec/whois/parsers/responses/whois.sgnic.sg/sg/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.sgnic.sg/sg/status_registered_spec.rb @@ -39,7 +39,7 @@ describe "#created_on" do it do expect(subject.created_on).to be_a(Time) - expect(subject.created_on).to eq(Time.parse("2005-01-03 12:00:00")) + expect(subject.created_on).to eq(DateTime.parse("2005-01-03 12:00:00")) end end describe "#updated_on" do @@ -50,7 +50,7 @@ describe "#expires_on" do it do expect(subject.expires_on).to be_a(Time) - expect(subject.expires_on).to eq(Time.parse("2015-01-03 00:00:00")) + expect(subject.expires_on).to eq(DateTime.parse("2015-01-03 00:00:00")) end end describe "#nameservers" do diff --git a/spec/whois/parsers/responses/whois.sk-nic.sk/sk/status_registered_spec.rb b/spec/whois/parsers/responses/whois.sk-nic.sk/sk/status_registered_spec.rb index adfdb810..37eef6e5 100644 --- a/spec/whois/parsers/responses/whois.sk-nic.sk/sk/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.sk-nic.sk/sk/status_registered_spec.rb @@ -44,13 +44,13 @@ describe "#updated_on" do it do expect(subject.updated_on).to be_a(Time) - expect(subject.updated_on).to eq(Time.parse("2010-06-28")) + expect(subject.updated_on).to eq(DateTime.parse("2010-06-28")) end end describe "#expires_on" do it do expect(subject.expires_on).to be_a(Time) - expect(subject.expires_on).to eq(Time.parse("2011-07-23")) + expect(subject.expires_on).to eq(DateTime.parse("2011-07-23")) end end describe "#nameservers" do diff --git a/spec/whois/parsers/responses/whois.smallregistry.net/status_registered_spec.rb b/spec/whois/parsers/responses/whois.smallregistry.net/status_registered_spec.rb index b1a876e9..98aaf4ce 100644 --- a/spec/whois/parsers/responses/whois.smallregistry.net/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.smallregistry.net/status_registered_spec.rb @@ -54,19 +54,19 @@ describe "#created_on" do it do expect(subject.created_on).to be_a(Time) - expect(subject.created_on).to eq(Time.parse("2011-01-13 15:45:18 +01:00")) + expect(subject.created_on).to eq(DateTime.parse("2011-01-13 15:45:18 +01:00")) end end describe "#expires_on" do it do expect(subject.expires_on).to be_a(Time) - expect(subject.expires_on).to eq(Time.parse("2013-01-13 15:45:18 +01:00")) + expect(subject.expires_on).to eq(DateTime.parse("2013-01-13 15:45:18 +01:00")) end end describe "#updated_on" do it do expect(subject.updated_on).to be_a(Time) - expect(subject.updated_on).to eq(Time.parse("2012-01-13 16:00:09 +01:00")) + expect(subject.updated_on).to eq(DateTime.parse("2012-01-13 16:00:09 +01:00")) end end describe "#registrar" do @@ -89,7 +89,7 @@ expect(subject.registrant_contacts[0].address).to eq("116 RUE DE LA PAIX\n75001 PARIS\nFRANCE") expect(subject.registrant_contacts[0].phone).to eq("+33.123456651") expect(subject.registrant_contacts[0].fax).to eq("+33.123456660") - expect(subject.registrant_contacts[0].updated_on).to eq(Time.parse("2011-01-13 15:45:18 +01:00")) + expect(subject.registrant_contacts[0].updated_on).to eq(DateTime.parse("2011-01-13 15:45:18 +01:00")) end end describe "#admin_contacts" do @@ -103,7 +103,7 @@ expect(subject.admin_contacts[0].organization).to eq("QWE RTY") expect(subject.admin_contacts[0].address).to eq("13 RUE DE LA PAIX\n75003 PARIS\nFRANCE") expect(subject.admin_contacts[0].phone).to eq("+33.144887967") - expect(subject.admin_contacts[0].updated_on).to eq(Time.parse("2010-08-02 14:48:21 +02:00")) + expect(subject.admin_contacts[0].updated_on).to eq(DateTime.parse("2010-08-02 14:48:21 +02:00")) end end describe "#technical_contacts" do @@ -118,7 +118,7 @@ expect(subject.technical_contacts[0].address).to eq("GOOGLE\n22, RUE DE LA PAIX\n75008 PARIS\nFRANCE") expect(subject.technical_contacts[0].phone).to eq("+33.821845353") expect(subject.technical_contacts[0].fax).to eq("+33.821845354") - expect(subject.technical_contacts[0].updated_on).to eq(Time.parse("2011-05-18 09:35:37 +02:00")) + expect(subject.technical_contacts[0].updated_on).to eq(DateTime.parse("2011-05-18 09:35:37 +02:00")) end end describe "#nameservers" do diff --git a/spec/whois/parsers/responses/whois.srs.net.nz/nz/status_registered_spec.rb b/spec/whois/parsers/responses/whois.srs.net.nz/nz/status_registered_spec.rb index b78dda5e..c15abe33 100644 --- a/spec/whois/parsers/responses/whois.srs.net.nz/nz/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.srs.net.nz/nz/status_registered_spec.rb @@ -49,19 +49,19 @@ describe "#created_on" do it do expect(subject.created_on).to be_a(Time) - expect(subject.created_on).to eq(Time.parse("1999-02-17 00:00:00 +13:00")) + expect(subject.created_on).to eq(DateTime.parse("1999-02-17 00:00:00 +13:00")) end end describe "#updated_on" do it do expect(subject.updated_on).to be_a(Time) - expect(subject.updated_on).to eq(Time.parse("2013-01-16 23:20:24 +13:00")) + expect(subject.updated_on).to eq(DateTime.parse("2013-01-16 23:20:24 +13:00")) end end describe "#expires_on" do it do expect(subject.expires_on).to be_a(Time) - expect(subject.expires_on).to eq(Time.parse("2014-02-17 00:00:00 +13:00")) + expect(subject.expires_on).to eq(DateTime.parse("2014-02-17 00:00:00 +13:00")) end end describe "#registrar" do diff --git a/spec/whois/parsers/responses/whois.sx/sx/status_registered_spec.rb b/spec/whois/parsers/responses/whois.sx/sx/status_registered_spec.rb index 34d92651..4cd96de8 100644 --- a/spec/whois/parsers/responses/whois.sx/sx/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.sx/sx/status_registered_spec.rb @@ -54,19 +54,19 @@ describe "#created_on" do it do expect(subject.created_on).to be_a(Time) - expect(subject.created_on).to eq(Time.parse("2011-12-09 14:07:22 UTC")) + expect(subject.created_on).to eq(DateTime.parse("2011-12-09 14:07:22 UTC")) end end describe "#updated_on" do it do expect(subject.updated_on).to be_a(Time) - expect(subject.updated_on).to eq(Time.parse("2013-02-25 16:50:39 UTC")) + expect(subject.updated_on).to eq(DateTime.parse("2013-02-25 16:50:39 UTC")) end end describe "#expires_on" do it do expect(subject.expires_on).to be_a(Time) - expect(subject.expires_on).to eq(Time.parse("2022-12-09 14:07:22 UTC")) + expect(subject.expires_on).to eq(DateTime.parse("2022-12-09 14:07:22 UTC")) end end describe "#registrar" do diff --git a/spec/whois/parsers/responses/whois.tcinet.ru/ru/status_registered_spec.rb b/spec/whois/parsers/responses/whois.tcinet.ru/ru/status_registered_spec.rb index ceb3512c..8adea6d9 100644 --- a/spec/whois/parsers/responses/whois.tcinet.ru/ru/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.tcinet.ru/ru/status_registered_spec.rb @@ -49,7 +49,7 @@ describe "#created_on" do it do expect(subject.created_on).to be_a(Time) - expect(subject.created_on).to eq(Time.parse("2004-03-04")) + expect(subject.created_on).to eq(DateTime.parse("2004-03-04")) end end describe "#updated_on" do @@ -60,7 +60,7 @@ describe "#expires_on" do it do expect(subject.expires_on).to be_a(Time) - expect(subject.expires_on).to eq(Time.parse("2015-03-05")) + expect(subject.expires_on).to eq(DateTime.parse("2015-03-05")) end end describe "#registrar" do diff --git a/spec/whois/parsers/responses/whois.tcinet.ru/su/status_registered_spec.rb b/spec/whois/parsers/responses/whois.tcinet.ru/su/status_registered_spec.rb index 183623e4..8cc74e6c 100644 --- a/spec/whois/parsers/responses/whois.tcinet.ru/su/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.tcinet.ru/su/status_registered_spec.rb @@ -49,7 +49,7 @@ describe "#created_on" do it do expect(subject.created_on).to be_a(Time) - expect(subject.created_on).to eq(Time.parse("2005-10-16")) + expect(subject.created_on).to eq(DateTime.parse("2005-10-16")) end end describe "#updated_on" do @@ -60,7 +60,7 @@ describe "#expires_on" do it do expect(subject.expires_on).to be_a(Time) - expect(subject.expires_on).to eq(Time.parse("2010-10-16")) + expect(subject.expires_on).to eq(DateTime.parse("2010-10-16")) end end describe "#registrar" do diff --git a/spec/whois/parsers/responses/whois.tcinet.ru/xn--p1ai/status_registered_spec.rb b/spec/whois/parsers/responses/whois.tcinet.ru/xn--p1ai/status_registered_spec.rb index 881bfac0..4488fcd6 100644 --- a/spec/whois/parsers/responses/whois.tcinet.ru/xn--p1ai/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.tcinet.ru/xn--p1ai/status_registered_spec.rb @@ -49,7 +49,7 @@ describe "#created_on" do it do expect(subject.created_on).to be_a(Time) - expect(subject.created_on).to eq(Time.parse("2010-11-12")) + expect(subject.created_on).to eq(DateTime.parse("2010-11-12")) end end describe "#updated_on" do @@ -60,7 +60,7 @@ describe "#expires_on" do it do expect(subject.expires_on).to be_a(Time) - expect(subject.expires_on).to eq(Time.parse("2011-11-12")) + expect(subject.expires_on).to eq(DateTime.parse("2011-11-12")) end end describe "#registrar" do diff --git a/spec/whois/parsers/responses/whois.thnic.co.th/th/status_registered_spec.rb b/spec/whois/parsers/responses/whois.thnic.co.th/th/status_registered_spec.rb index 8aa7bdb4..5d3878dd 100644 --- a/spec/whois/parsers/responses/whois.thnic.co.th/th/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.thnic.co.th/th/status_registered_spec.rb @@ -39,19 +39,19 @@ describe "#created_on" do it do expect(subject.created_on).to be_a(Time) - expect(subject.created_on).to eq(Time.parse("2004-10-08")) + expect(subject.created_on).to eq(DateTime.parse("2004-10-08")) end end describe "#updated_on" do it do expect(subject.updated_on).to be_a(Time) - expect(subject.updated_on).to eq(Time.parse("2012-09-07")) + expect(subject.updated_on).to eq(DateTime.parse("2012-09-07")) end end describe "#expires_on" do it do expect(subject.expires_on).to be_a(Time) - expect(subject.expires_on).to eq(Time.parse("2013-10-07")) + expect(subject.expires_on).to eq(DateTime.parse("2013-10-07")) end end describe "#nameservers" do diff --git a/spec/whois/parsers/responses/whois.tld.ee/ee/property_status_serverhold_spec.rb b/spec/whois/parsers/responses/whois.tld.ee/ee/property_status_serverhold_spec.rb index 86193244..96c56a46 100644 --- a/spec/whois/parsers/responses/whois.tld.ee/ee/property_status_serverhold_spec.rb +++ b/spec/whois/parsers/responses/whois.tld.ee/ee/property_status_serverhold_spec.rb @@ -54,19 +54,19 @@ describe "#created_on" do it do expect(subject.created_on).to be_a(Time) - expect(subject.created_on).to eq(Time.parse("2014-11-01 20:38:55 +02:00")) + expect(subject.created_on).to eq(DateTime.parse("2014-11-01 20:38:55 +02:00")) end end describe "#updated_on" do it do expect(subject.updated_on).to be_a(Time) - expect(subject.updated_on).to eq(Time.parse("2014-11-01 20:38:55 +02:00")) + expect(subject.updated_on).to eq(DateTime.parse("2014-11-01 20:38:55 +02:00")) end end describe "#expires_on" do it do expect(subject.expires_on).to be_a(Time) - expect(subject.expires_on).to eq(Time.parse("2015-11-01")) + expect(subject.expires_on).to eq(DateTime.parse("2015-11-01")) end end describe "#registrar" do @@ -95,7 +95,7 @@ expect(subject.registrant_contacts[0].fax).to eq(nil) expect(subject.registrant_contacts[0].email).to eq("Not Disclosed - Visit www.internet.ee for webbased WHOIS") expect(subject.registrant_contacts[0].created_on).to eq(nil) - expect(subject.registrant_contacts[0].updated_on).to eq(Time.parse("2014-11-01 20:38:55 +02:00")) + expect(subject.registrant_contacts[0].updated_on).to eq(DateTime.parse("2014-11-01 20:38:55 +02:00")) end end describe "#admin_contacts" do @@ -117,7 +117,7 @@ expect(subject.admin_contacts[0].fax).to eq(nil) expect(subject.admin_contacts[0].email).to eq("Not Disclosed - Visit www.internet.ee for webbased WHOIS") expect(subject.admin_contacts[0].created_on).to eq(nil) - expect(subject.admin_contacts[0].updated_on).to eq(Time.parse("2014-11-01 20:38:55 +02:00")) + expect(subject.admin_contacts[0].updated_on).to eq(DateTime.parse("2014-11-01 20:38:55 +02:00")) expect(subject.admin_contacts[1]).to be_a(Whois::Parser::Contact) expect(subject.admin_contacts[1].type).to eq(Whois::Parser::Contact::TYPE_ADMINISTRATIVE) expect(subject.admin_contacts[1].id).to eq(nil) @@ -133,7 +133,7 @@ expect(subject.admin_contacts[1].fax).to eq(nil) expect(subject.admin_contacts[1].email).to eq("Not Disclosed - Visit www.internet.ee for webbased WHOIS") expect(subject.admin_contacts[1].created_on).to eq(nil) - expect(subject.admin_contacts[1].updated_on).to eq(Time.parse("2014-11-01 20:38:55 +02:00")) + expect(subject.admin_contacts[1].updated_on).to eq(DateTime.parse("2014-11-01 20:38:55 +02:00")) end end describe "#technical_contacts" do @@ -155,7 +155,7 @@ expect(subject.technical_contacts[0].fax).to eq(nil) expect(subject.technical_contacts[0].email).to eq("Not Disclosed - Visit www.internet.ee for webbased WHOIS") expect(subject.technical_contacts[0].created_on).to eq(nil) - expect(subject.technical_contacts[0].updated_on).to eq(Time.parse("2010-12-09 16:08:33 +02:00")) + expect(subject.technical_contacts[0].updated_on).to eq(DateTime.parse("2010-12-09 16:08:33 +02:00")) end end describe "#nameservers" do diff --git a/spec/whois/parsers/responses/whois.tld.ee/ee/status_expired_spec.rb b/spec/whois/parsers/responses/whois.tld.ee/ee/status_expired_spec.rb index f5c9d0ac..f9172241 100644 --- a/spec/whois/parsers/responses/whois.tld.ee/ee/status_expired_spec.rb +++ b/spec/whois/parsers/responses/whois.tld.ee/ee/status_expired_spec.rb @@ -49,19 +49,19 @@ describe "#created_on" do it do expect(subject.created_on).to be_a(Time) - expect(subject.created_on).to eq(Time.parse("2010-07-04 07:52:56 +03:00")) + expect(subject.created_on).to eq(DateTime.parse("2010-07-04 07:52:56 +03:00")) end end describe "#updated_on" do it do expect(subject.updated_on).to be_a(Time) - expect(subject.updated_on).to eq(Time.parse("2010-11-29 13:32:16 +02:00")) + expect(subject.updated_on).to eq(DateTime.parse("2010-11-29 13:32:16 +02:00")) end end describe "#expires_on" do it do expect(subject.expires_on).to be_a(Time) - expect(subject.expires_on).to eq(Time.parse("2015-11-29")) + expect(subject.expires_on).to eq(DateTime.parse("2015-11-29")) end end describe "#registrar" do @@ -90,7 +90,7 @@ expect(subject.registrant_contacts[0].fax).to eq(nil) expect(subject.registrant_contacts[0].email).to eq("Not Disclosed - Visit www.internet.ee for webbased WHOIS") expect(subject.registrant_contacts[0].created_on).to eq(nil) - expect(subject.registrant_contacts[0].updated_on).to eq(Time.parse("2010-11-29 13:32:16 +02:00")) + expect(subject.registrant_contacts[0].updated_on).to eq(DateTime.parse("2010-11-29 13:32:16 +02:00")) end end describe "#admin_contacts" do @@ -112,7 +112,7 @@ expect(subject.admin_contacts[0].fax).to eq(nil) expect(subject.admin_contacts[0].email).to eq("Not Disclosed - Visit www.internet.ee for webbased WHOIS") expect(subject.admin_contacts[0].created_on).to eq(nil) - expect(subject.admin_contacts[0].updated_on).to eq(Time.parse("2015-10-30 08:31:21 +02:00")) + expect(subject.admin_contacts[0].updated_on).to eq(DateTime.parse("2015-10-30 08:31:21 +02:00")) end end describe "#technical_contacts" do @@ -134,7 +134,7 @@ expect(subject.technical_contacts[0].fax).to eq(nil) expect(subject.technical_contacts[0].email).to eq("Not Disclosed - Visit www.internet.ee for webbased WHOIS") expect(subject.technical_contacts[0].created_on).to eq(nil) - expect(subject.technical_contacts[0].updated_on).to eq(Time.parse("2015-10-30 08:31:21 +02:00")) + expect(subject.technical_contacts[0].updated_on).to eq(DateTime.parse("2015-10-30 08:31:21 +02:00")) end end describe "#nameservers" do diff --git a/spec/whois/parsers/responses/whois.tld.ee/ee/status_registered_spec.rb b/spec/whois/parsers/responses/whois.tld.ee/ee/status_registered_spec.rb index bd84e2fb..8bd115d8 100644 --- a/spec/whois/parsers/responses/whois.tld.ee/ee/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.tld.ee/ee/status_registered_spec.rb @@ -54,19 +54,19 @@ describe "#created_on" do it do expect(subject.created_on).to be_a(Time) - expect(subject.created_on).to eq(Time.parse("2010-08-10 16:43:38 +03:00")) + expect(subject.created_on).to eq(DateTime.parse("2010-08-10 16:43:38 +03:00")) end end describe "#updated_on" do it do expect(subject.updated_on).to be_a(Time) - expect(subject.updated_on).to eq(Time.parse("2010-11-29 13:32:16 +02:00")) + expect(subject.updated_on).to eq(DateTime.parse("2010-11-29 13:32:16 +02:00")) end end describe "#expires_on" do it do expect(subject.expires_on).to be_a(Time) - expect(subject.expires_on).to eq(Time.parse("2017-02-04")) + expect(subject.expires_on).to eq(DateTime.parse("2017-02-04")) end end describe "#registrar" do @@ -95,7 +95,7 @@ expect(subject.registrant_contacts[0].fax).to eq(nil) expect(subject.registrant_contacts[0].email).to eq("Not Disclosed - Visit www.internet.ee for webbased WHOIS") expect(subject.registrant_contacts[0].created_on).to eq(nil) - expect(subject.registrant_contacts[0].updated_on).to eq(Time.parse("2010-11-29 13:32:16 +02:00")) + expect(subject.registrant_contacts[0].updated_on).to eq(DateTime.parse("2010-11-29 13:32:16 +02:00")) end end describe "#admin_contacts" do @@ -117,7 +117,7 @@ expect(subject.admin_contacts[0].fax).to eq(nil) expect(subject.admin_contacts[0].email).to eq("Not Disclosed - Visit www.internet.ee for webbased WHOIS") expect(subject.admin_contacts[0].created_on).to eq(nil) - expect(subject.admin_contacts[0].updated_on).to eq(Time.parse("2015-10-30 08:31:21 +02:00")) + expect(subject.admin_contacts[0].updated_on).to eq(DateTime.parse("2015-10-30 08:31:21 +02:00")) end end describe "#technical_contacts" do @@ -139,7 +139,7 @@ expect(subject.technical_contacts[0].fax).to eq(nil) expect(subject.technical_contacts[0].email).to eq("Not Disclosed - Visit www.internet.ee for webbased WHOIS") expect(subject.technical_contacts[0].created_on).to eq(nil) - expect(subject.technical_contacts[0].updated_on).to eq(Time.parse("2015-10-30 08:31:21 +02:00")) + expect(subject.technical_contacts[0].updated_on).to eq(DateTime.parse("2015-10-30 08:31:21 +02:00")) end end describe "#nameservers" do diff --git a/spec/whois/parsers/responses/whois.tld.sy/sy/status_registered_spec.rb b/spec/whois/parsers/responses/whois.tld.sy/sy/status_registered_spec.rb index b6f8f71d..a262163b 100644 --- a/spec/whois/parsers/responses/whois.tld.sy/sy/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.tld.sy/sy/status_registered_spec.rb @@ -49,7 +49,7 @@ describe "#created_on" do it do expect(subject.created_on).to be_a(Time) - expect(subject.created_on).to eq(Time.parse("2010-12-02 16:01:27 UTC")) + expect(subject.created_on).to eq(DateTime.parse("2010-12-02 16:01:27 UTC")) end end describe "#updated_on" do @@ -60,7 +60,7 @@ describe "#expires_on" do it do expect(subject.expires_on).to be_a(Time) - expect(subject.expires_on).to eq(Time.parse("2017-12-01 22:00:00 UTC")) + expect(subject.expires_on).to eq(DateTime.parse("2017-12-01 22:00:00 UTC")) end end describe "#registrar" do diff --git a/spec/whois/parsers/responses/whois.tucows.com/status_registered_spec.rb b/spec/whois/parsers/responses/whois.tucows.com/status_registered_spec.rb index 8b35971c..55754592 100644 --- a/spec/whois/parsers/responses/whois.tucows.com/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.tucows.com/status_registered_spec.rb @@ -49,19 +49,19 @@ describe "#created_on" do it do expect(subject.created_on).to be_a(Time) - expect(subject.created_on).to eq(Time.parse("1995-09-07 04:00:00")) + expect(subject.created_on).to eq(DateTime.parse("1995-09-07 04:00:00")) end end describe "#updated_on" do it do expect(subject.updated_on).to be_a(Time) - expect(subject.updated_on).to eq(Time.parse("2013-08-07 23:52:35")) + expect(subject.updated_on).to eq(DateTime.parse("2013-08-07 23:52:35")) end end describe "#expires_on" do it do expect(subject.expires_on).to be_a(Time) - expect(subject.expires_on).to eq(Time.parse("2014-09-06 04:00:00")) + expect(subject.expires_on).to eq(DateTime.parse("2014-09-06 04:00:00")) end end describe "#registrar" do diff --git a/spec/whois/parsers/responses/whois.twnic.net.tw/tw/status_registered_spec.rb b/spec/whois/parsers/responses/whois.twnic.net.tw/tw/status_registered_spec.rb index a0015396..92ce5779 100644 --- a/spec/whois/parsers/responses/whois.twnic.net.tw/tw/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.twnic.net.tw/tw/status_registered_spec.rb @@ -39,7 +39,7 @@ describe "#created_on" do it do expect(subject.created_on).to be_a(Time) - expect(subject.created_on).to eq(Time.parse("2000-08-29")) + expect(subject.created_on).to eq(DateTime.parse("2000-08-29")) end end describe "#updated_on" do @@ -50,7 +50,7 @@ describe "#expires_on" do it do expect(subject.expires_on).to be_a(Time) - expect(subject.expires_on).to eq(Time.parse("2011-11-09")) + expect(subject.expires_on).to eq(DateTime.parse("2011-11-09")) end end describe "#nameservers" do diff --git a/spec/whois/parsers/responses/whois.tznic.or.tz/tz/status_registered_spec.rb b/spec/whois/parsers/responses/whois.tznic.or.tz/tz/status_registered_spec.rb index 1fde1081..1aa593df 100644 --- a/spec/whois/parsers/responses/whois.tznic.or.tz/tz/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.tznic.or.tz/tz/status_registered_spec.rb @@ -49,19 +49,19 @@ describe "#created_on" do it do expect(subject.created_on).to be_a(Time) - expect(subject.created_on).to eq(Time.parse("2009-07-27 11:01:10")) + expect(subject.created_on).to eq(DateTime.parse("2009-07-27 11:01:10")) end end describe "#updated_on" do it do expect(subject.updated_on).to be_a(Time) - expect(subject.updated_on).to eq(Time.parse("2010-08-30 15:47:56")) + expect(subject.updated_on).to eq(DateTime.parse("2010-08-30 15:47:56")) end end describe "#expires_on" do it do expect(subject.expires_on).to be_a(Time) - expect(subject.expires_on).to eq(Time.parse("2012-07-27")) + expect(subject.expires_on).to eq(DateTime.parse("2012-07-27")) end end describe "#registrar" do @@ -90,7 +90,7 @@ expect(subject.registrant_contacts[0].phone).to eq(nil) expect(subject.registrant_contacts[0].fax).to eq(nil) expect(subject.registrant_contacts[0].email).to eq("mcollins@dailynews.co.tz") - expect(subject.registrant_contacts[0].created_on).to eq(Time.parse("2010-08-30 15:46:35")) + expect(subject.registrant_contacts[0].created_on).to eq(DateTime.parse("2010-08-30 15:46:35")) end end describe "#admin_contacts" do @@ -111,7 +111,7 @@ expect(subject.admin_contacts[0].phone).to eq(nil) expect(subject.admin_contacts[0].fax).to eq(nil) expect(subject.admin_contacts[0].email).to eq("mcollins@dailynews.co.tz") - expect(subject.admin_contacts[0].created_on).to eq(Time.parse("2010-08-30 15:46:35")) + expect(subject.admin_contacts[0].created_on).to eq(DateTime.parse("2010-08-30 15:46:35")) end end describe "#technical_contacts" do @@ -132,7 +132,7 @@ expect(subject.technical_contacts[0].phone).to eq("+255.755763951") expect(subject.technical_contacts[0].fax).to eq(nil) expect(subject.technical_contacts[0].email).to eq("jacobn@twigaonline.com") - expect(subject.technical_contacts[0].created_on).to eq(Time.parse("2009-08-24 06:21:51")) + expect(subject.technical_contacts[0].created_on).to eq(DateTime.parse("2009-08-24 06:21:51")) end end describe "#nameservers" do diff --git a/spec/whois/parsers/responses/whois.ua/ua/uaepp/status_registered_spec.rb b/spec/whois/parsers/responses/whois.ua/ua/uaepp/status_registered_spec.rb index d96ecddc..64e7960d 100644 --- a/spec/whois/parsers/responses/whois.ua/ua/uaepp/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.ua/ua/uaepp/status_registered_spec.rb @@ -49,19 +49,19 @@ describe "#created_on" do it do expect(subject.created_on).to be_a(Time) - expect(subject.created_on).to eq(Time.parse("2002-12-04 00:00:00 +02:00")) + expect(subject.created_on).to eq(DateTime.parse("2002-12-04 00:00:00 +02:00")) end end describe "#updated_on" do it do expect(subject.updated_on).to be_a(Time) - expect(subject.updated_on).to eq(Time.parse("2013-04-15 20:00:10 +03:00")) + expect(subject.updated_on).to eq(DateTime.parse("2013-04-15 20:00:10 +03:00")) end end describe "#expires_on" do it do expect(subject.expires_on).to be_a(Time) - expect(subject.expires_on).to eq(Time.parse("2013-12-04 00:00:00 +02:00")) + expect(subject.expires_on).to eq(DateTime.parse("2013-12-04 00:00:00 +02:00")) end end describe "#registrar" do @@ -87,7 +87,7 @@ expect(subject.registrant_contacts[0].phone).to eq("+16503300100") expect(subject.registrant_contacts[0].fax).to eq("+16506188571") expect(subject.registrant_contacts[0].email).to eq("dns-admin@google.com") - expect(subject.registrant_contacts[0].created_on).to eq(Time.parse("2013-03-31 19:13:45 +03:00")) + expect(subject.registrant_contacts[0].created_on).to eq(DateTime.parse("2013-03-31 19:13:45 +03:00")) expect(subject.registrant_contacts[0].updated_on).to eq(nil) end end @@ -109,7 +109,7 @@ expect(subject.admin_contacts[0].phone).to eq("+16503300100") expect(subject.admin_contacts[0].fax).to eq("+16506188571") expect(subject.admin_contacts[0].email).to eq("dns-admin@google.com") - expect(subject.admin_contacts[0].created_on).to eq(Time.parse("2013-03-31 19:13:45 +03:00")) + expect(subject.admin_contacts[0].created_on).to eq(DateTime.parse("2013-03-31 19:13:45 +03:00")) expect(subject.admin_contacts[0].updated_on).to eq(nil) end end @@ -131,7 +131,7 @@ expect(subject.technical_contacts[0].phone).to eq("+16503300100") expect(subject.technical_contacts[0].fax).to eq("+16506188571") expect(subject.technical_contacts[0].email).to eq("dns-admin@google.com") - expect(subject.technical_contacts[0].created_on).to eq(Time.parse("2013-03-31 19:13:45 +03:00")) + expect(subject.technical_contacts[0].created_on).to eq(DateTime.parse("2013-03-31 19:13:45 +03:00")) expect(subject.technical_contacts[0].updated_on).to eq(nil) end end diff --git a/spec/whois/parsers/responses/whois.ua/ua/uanic/property_contacts_multiple_spec.rb b/spec/whois/parsers/responses/whois.ua/ua/uanic/property_contacts_multiple_spec.rb index 3d699c8a..31976ac7 100644 --- a/spec/whois/parsers/responses/whois.ua/ua/uanic/property_contacts_multiple_spec.rb +++ b/spec/whois/parsers/responses/whois.ua/ua/uanic/property_contacts_multiple_spec.rb @@ -40,7 +40,7 @@ expect(subject.technical_contacts[0].fax).to eq("+380 (44) 2473954") expect(subject.technical_contacts[0].email).to eq("dnsmaster@kyivstar.net") expect(subject.technical_contacts[0].created_on).to eq(nil) - expect(subject.technical_contacts[0].updated_on).to eq(Time.parse("2008-09-02 12:52:47")) + expect(subject.technical_contacts[0].updated_on).to eq(DateTime.parse("2008-09-02 12:52:47")) expect(subject.technical_contacts[1]).to be_a(Whois::Parser::Contact) expect(subject.technical_contacts[1].type).to eq(Whois::Parser::Contact::TYPE_TECHNICAL) expect(subject.technical_contacts[1].id).to eq("EIC-UANIC") @@ -56,7 +56,7 @@ expect(subject.technical_contacts[1].fax).to eq(nil) expect(subject.technical_contacts[1].email).to eq("hostmaster@visti.net") expect(subject.technical_contacts[1].created_on).to eq(nil) - expect(subject.technical_contacts[1].updated_on).to eq(Time.parse("2011-12-15 11:33:14")) + expect(subject.technical_contacts[1].updated_on).to eq(DateTime.parse("2011-12-15 11:33:14")) end end end diff --git a/spec/whois/parsers/responses/whois.ua/ua/uanic/status_registered_spec.rb b/spec/whois/parsers/responses/whois.ua/ua/uanic/status_registered_spec.rb index 7222973d..3537b859 100644 --- a/spec/whois/parsers/responses/whois.ua/ua/uanic/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.ua/ua/uanic/status_registered_spec.rb @@ -49,19 +49,19 @@ describe "#created_on" do it do expect(subject.created_on).to be_a(Time) - expect(subject.created_on).to eq(Time.parse("2002-09-03 00:00:00")) + expect(subject.created_on).to eq(DateTime.parse("2002-09-03 00:00:00")) end end describe "#updated_on" do it do expect(subject.updated_on).to be_a(Time) - expect(subject.updated_on).to eq(Time.parse("2012-07-30 16:42:30")) + expect(subject.updated_on).to eq(DateTime.parse("2012-07-30 16:42:30")) end end describe "#expires_on" do it do expect(subject.expires_on).to be_a(Time) - expect(subject.expires_on).to eq(Time.parse("2014-09-03 12:18:52")) + expect(subject.expires_on).to eq(DateTime.parse("2014-09-03 12:18:52")) end end describe "#registrar" do @@ -94,7 +94,7 @@ expect(subject.admin_contacts[0].fax).to eq("+380 (44) 2473954") expect(subject.admin_contacts[0].email).to eq("dnsmaster@kyivstar.net") expect(subject.admin_contacts[0].created_on).to eq(nil) - expect(subject.admin_contacts[0].updated_on).to eq(Time.parse("2008-09-02 12:52:47")) + expect(subject.admin_contacts[0].updated_on).to eq(DateTime.parse("2008-09-02 12:52:47")) end end describe "#technical_contacts" do @@ -116,7 +116,7 @@ expect(subject.technical_contacts[0].fax).to eq("+380 (44) 2473954") expect(subject.technical_contacts[0].email).to eq("dnsmaster@kyivstar.net") expect(subject.technical_contacts[0].created_on).to eq(nil) - expect(subject.technical_contacts[0].updated_on).to eq(Time.parse("2008-09-02 12:52:47")) + expect(subject.technical_contacts[0].updated_on).to eq(DateTime.parse("2008-09-02 12:52:47")) end end describe "#nameservers" do diff --git a/spec/whois/parsers/responses/whois.udag.net/status_registered_spec.rb b/spec/whois/parsers/responses/whois.udag.net/status_registered_spec.rb index da7bcdfb..75459ed7 100644 --- a/spec/whois/parsers/responses/whois.udag.net/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.udag.net/status_registered_spec.rb @@ -49,19 +49,19 @@ describe "#created_on" do it do expect(subject.created_on).to be_a(Time) - expect(subject.created_on).to eq(Time.parse("2001-02-11T20:15:57Z")) + expect(subject.created_on).to eq(DateTime.parse("2001-02-11T20:15:57Z")) end end describe "#updated_on" do it do expect(subject.updated_on).to be_a(Time) - expect(subject.updated_on).to eq(Time.parse("2013-02-12T08:40:19Z")) + expect(subject.updated_on).to eq(DateTime.parse("2013-02-12T08:40:19Z")) end end describe "#expires_on" do it do expect(subject.expires_on).to be_a(Time) - expect(subject.expires_on).to eq(Time.parse("2014-02-11T20:15:57Z")) + expect(subject.expires_on).to eq(DateTime.parse("2014-02-11T20:15:57Z")) end end describe "#registrar" do diff --git a/spec/whois/parsers/responses/whois.uniregistry.net/tattoo/status_registered_spec.rb b/spec/whois/parsers/responses/whois.uniregistry.net/tattoo/status_registered_spec.rb index 0dc3f086..7d004f15 100644 --- a/spec/whois/parsers/responses/whois.uniregistry.net/tattoo/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.uniregistry.net/tattoo/status_registered_spec.rb @@ -49,19 +49,19 @@ describe "#created_on" do it do expect(subject.created_on).to be_a(Time) - expect(subject.created_on).to eq(Time.parse("2013-09-16 14:21:26 UTC")) + expect(subject.created_on).to eq(DateTime.parse("2013-09-16 14:21:26 UTC")) end end describe "#updated_on" do it do expect(subject.updated_on).to be_a(Time) - expect(subject.updated_on).to eq(Time.parse("2013-11-09 02:51:24 UTC")) + expect(subject.updated_on).to eq(DateTime.parse("2013-11-09 02:51:24 UTC")) end end describe "#expires_on" do it do expect(subject.expires_on).to be_a(Time) - expect(subject.expires_on).to eq(Time.parse("2023-09-16 14:21:26 UTC")) + expect(subject.expires_on).to eq(DateTime.parse("2023-09-16 14:21:26 UTC")) end end describe "#registrar" do diff --git a/spec/whois/parsers/responses/whois.usp.ac.fj/fj/status_registered_spec.rb b/spec/whois/parsers/responses/whois.usp.ac.fj/fj/status_registered_spec.rb index da353a56..fbabab39 100644 --- a/spec/whois/parsers/responses/whois.usp.ac.fj/fj/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.usp.ac.fj/fj/status_registered_spec.rb @@ -49,7 +49,7 @@ describe "#expires_on" do it do expect(subject.expires_on).to be_a(Time) - expect(subject.expires_on).to eq(Time.parse("2014-04-28")) + expect(subject.expires_on).to eq(DateTime.parse("2014-04-28")) end end describe "#nameservers" do diff --git a/spec/whois/parsers/responses/whois.verisign-grs.com/com/status_registered_spec.rb b/spec/whois/parsers/responses/whois.verisign-grs.com/com/status_registered_spec.rb index bc7ae8a7..8d318a6a 100644 --- a/spec/whois/parsers/responses/whois.verisign-grs.com/com/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.verisign-grs.com/com/status_registered_spec.rb @@ -54,19 +54,19 @@ describe "#created_on" do it do expect(subject.created_on).to be_a(Time) - expect(subject.created_on).to eq(Time.parse("1997-09-15 04:00:00 UTC")) + expect(subject.created_on).to eq(DateTime.parse("1997-09-15 04:00:00 UTC")) end end describe "#updated_on" do it do expect(subject.updated_on).to be_a(Time) - expect(subject.updated_on).to eq(Time.parse("2011-07-20 16:55:31 UTC")) + expect(subject.updated_on).to eq(DateTime.parse("2011-07-20 16:55:31 UTC")) end end describe "#expires_on" do it do expect(subject.expires_on).to be_a(Time) - expect(subject.expires_on).to eq(Time.parse("2020-09-14 04:00:00 UTC")) + expect(subject.expires_on).to eq(DateTime.parse("2020-09-14 04:00:00 UTC")) end end describe "#registrar" do diff --git a/spec/whois/parsers/responses/whois.verisign-grs.com/net/status_registered_spec.rb b/spec/whois/parsers/responses/whois.verisign-grs.com/net/status_registered_spec.rb index 4079e72e..cfa2a791 100644 --- a/spec/whois/parsers/responses/whois.verisign-grs.com/net/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.verisign-grs.com/net/status_registered_spec.rb @@ -54,19 +54,19 @@ describe "#created_on" do it do expect(subject.created_on).to be_a(Time) - expect(subject.created_on).to eq(Time.parse("1999-03-15 05:00:00 UTC")) + expect(subject.created_on).to eq(DateTime.parse("1999-03-15 05:00:00 UTC")) end end describe "#updated_on" do it do expect(subject.updated_on).to be_a(Time) - expect(subject.updated_on).to eq(Time.parse("2017-02-11 10:56:37 UTC")) + expect(subject.updated_on).to eq(DateTime.parse("2017-02-11 10:56:37 UTC")) end end describe "#expires_on" do it do expect(subject.expires_on).to be_a(Time) - expect(subject.expires_on).to eq(Time.parse("2018-03-15 04:00:00 UTC")) + expect(subject.expires_on).to eq(DateTime.parse("2018-03-15 04:00:00 UTC")) end end describe "#registrar" do diff --git a/spec/whois/parsers/responses/whois.website.ws/ws/status_registered_spec.rb b/spec/whois/parsers/responses/whois.website.ws/ws/status_registered_spec.rb index 849aa775..4daecba3 100644 --- a/spec/whois/parsers/responses/whois.website.ws/ws/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.website.ws/ws/status_registered_spec.rb @@ -39,19 +39,19 @@ describe "#created_on" do it do expect(subject.created_on).to be_a(Time) - expect(subject.created_on).to eq(Time.parse("2002-03-03")) + expect(subject.created_on).to eq(DateTime.parse("2002-03-03")) end end describe "#updated_on" do it do expect(subject.updated_on).to be_a(Time) - expect(subject.updated_on).to eq(Time.parse("2008-12-08")) + expect(subject.updated_on).to eq(DateTime.parse("2008-12-08")) end end describe "#expires_on" do it do expect(subject.expires_on).to be_a(Time) - expect(subject.expires_on).to eq(Time.parse("2010-03-03")) + expect(subject.expires_on).to eq(DateTime.parse("2010-03-03")) end end describe "#nameservers" do diff --git a/spec/whois/parsers/responses/whois.wildwestdomains.com/status_registered_spec.rb b/spec/whois/parsers/responses/whois.wildwestdomains.com/status_registered_spec.rb index 52e8d99c..8b98d6ee 100644 --- a/spec/whois/parsers/responses/whois.wildwestdomains.com/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.wildwestdomains.com/status_registered_spec.rb @@ -49,19 +49,19 @@ describe "#created_on" do it do expect(subject.created_on).to be_a(Time) - expect(subject.created_on).to eq(Time.parse("2000-08-22 23:29:11 UTC")) + expect(subject.created_on).to eq(DateTime.parse("2000-08-22 23:29:11 UTC")) end end describe "#updated_on" do it do expect(subject.updated_on).to be_a(Time) - expect(subject.updated_on).to eq(Time.parse("2011-11-01 21:31:47 UTC")) + expect(subject.updated_on).to eq(DateTime.parse("2011-11-01 21:31:47 UTC")) end end describe "#expires_on" do it do expect(subject.expires_on).to be_a(Time) - expect(subject.expires_on).to eq(Time.parse("2021-11-01 11:59:59 UTC")) + expect(subject.expires_on).to eq(DateTime.parse("2021-11-01 11:59:59 UTC")) end end describe "#registrar" do diff --git a/spec/whois/parsers/responses/whois.yoursrs.com/status_registered_spec.rb b/spec/whois/parsers/responses/whois.yoursrs.com/status_registered_spec.rb index 507eb77d..ba1979f9 100644 --- a/spec/whois/parsers/responses/whois.yoursrs.com/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.yoursrs.com/status_registered_spec.rb @@ -49,19 +49,19 @@ describe "#created_on" do it do expect(subject.created_on).to be_a(Time) - expect(subject.created_on).to eq(Time.parse("2003-11-24 09:40:55")) + expect(subject.created_on).to eq(DateTime.parse("2003-11-24 09:40:55")) end end describe "#updated_on" do it do expect(subject.updated_on).to be_a(Time) - expect(subject.updated_on).to eq(Time.parse("2014-01-22 14:04:50")) + expect(subject.updated_on).to eq(DateTime.parse("2014-01-22 14:04:50")) end end describe "#expires_on" do it do expect(subject.expires_on).to be_a(Time) - expect(subject.expires_on).to eq(Time.parse("2014-11-24 09:40:55")) + expect(subject.expires_on).to eq(DateTime.parse("2014-11-24 09:40:55")) end end describe "#registrar" do diff --git a/spec/whois/parsers/responses/whois.za.net/za.net/status_registered_spec.rb b/spec/whois/parsers/responses/whois.za.net/za.net/status_registered_spec.rb index 2ee15a88..73846749 100644 --- a/spec/whois/parsers/responses/whois.za.net/za.net/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.za.net/za.net/status_registered_spec.rb @@ -39,13 +39,13 @@ describe "#created_on" do it do expect(subject.created_on).to be_a(Time) - expect(subject.created_on).to eq(Time.parse("2002-03-29 22:03:53 UTC")) + expect(subject.created_on).to eq(DateTime.parse("2002-03-29 22:03:53 UTC")) end end describe "#updated_on" do it do expect(subject.updated_on).to be_a(Time) - expect(subject.updated_on).to eq(Time.parse("2002-03-29 22:03:53 UTC")) + expect(subject.updated_on).to eq(DateTime.parse("2002-03-29 22:03:53 UTC")) end end describe "#expires_on" do diff --git a/spec/whois/parsers/responses/whois.za.org/za.org/status_registered_spec.rb b/spec/whois/parsers/responses/whois.za.org/za.org/status_registered_spec.rb index ecaf7b8f..a4445fe9 100644 --- a/spec/whois/parsers/responses/whois.za.org/za.org/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.za.org/za.org/status_registered_spec.rb @@ -39,13 +39,13 @@ describe "#created_on" do it do expect(subject.created_on).to be_a(Time) - expect(subject.created_on).to eq(Time.parse("2000-11-05 14:03:48 UTC")) + expect(subject.created_on).to eq(DateTime.parse("2000-11-05 14:03:48 UTC")) end end describe "#updated_on" do it do expect(subject.updated_on).to be_a(Time) - expect(subject.updated_on).to eq(Time.parse("2005-08-15 12:15:10")) + expect(subject.updated_on).to eq(DateTime.parse("2005-08-15 12:15:10 BST")) end end describe "#expires_on" do diff --git a/spec/whois/parsers/responses/whois1.nic.bi/bi/status_registered_spec.rb b/spec/whois/parsers/responses/whois1.nic.bi/bi/status_registered_spec.rb index 36ffe53d..a3ae2468 100644 --- a/spec/whois/parsers/responses/whois1.nic.bi/bi/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois1.nic.bi/bi/status_registered_spec.rb @@ -49,19 +49,19 @@ describe "#created_on" do it do expect(subject.created_on).to be_a(Time) - expect(subject.created_on).to eq(Time.parse("2002-09-29 22:00:00 UTC")) + expect(subject.created_on).to eq(DateTime.parse("2002-09-29 22:00:00 UTC")) end end describe "#updated_on" do it do expect(subject.updated_on).to be_a(Time) - expect(subject.updated_on).to eq(Time.parse("2013-12-05 07:16:04 UTC")) + expect(subject.updated_on).to eq(DateTime.parse("2013-12-05 07:16:04 UTC")) end end describe "#expires_on" do it do expect(subject.expires_on).to be_a(Time) - expect(subject.expires_on).to eq(Time.parse("2014-09-29 22:00:00 UTC")) + expect(subject.expires_on).to eq(DateTime.parse("2014-09-29 22:00:00 UTC")) end end describe "#registrar" do diff --git a/tasks/spec.rake b/tasks/spec.rake index c60d85ee..66f2150a 100644 --- a/tasks/spec.rake +++ b/tasks/spec.rake @@ -156,9 +156,11 @@ end when c =~ /^%CLASS\{(.+)\}$/ c = "be_a(#{_build_condition_typeof($1)})" - # %s %TIME{...} -> %s Time.parse(...) + # DateTime is better than Time here because it doesn't take local timezone into account (UTC by default) + # and also parses timezones better (e.g. CET, JST, BST, etc..) at the end of the string + # %s %TIME{...} -> %s DateTime.parse(...) when c =~ /^%TIME\{(.+)\}$/ - c = "eq(Time.parse(\"#{$1}\"))" + c = "eq(DateTime.parse(\"#{$1}\"))" # %s %ERROR{...} -> %s raise_error(...) when c =~ /^%ERROR\{(.+)\}$/ From 4a7a81e617dcab844869b238903915ddca0f6b41 Mon Sep 17 00:00:00 2001 From: Adrien Rey-Jarthon Date: Tue, 16 Nov 2021 15:17:47 +0100 Subject: [PATCH 06/29] Fix throttled response detection for .CO.UK, .ME, .INFO, .MOBI (and most other Afilias based) --- CHANGELOG.md | 1 + lib/whois/parsers/whois.nic.uk.rb | 2 +- lib/whois/scanners/base_afilias.rb | 2 +- .../info/response_throttled.expected | 2 ++ .../info/response_throttled.txt | 1 + .../mobi/response_throttled.expected | 2 ++ .../mobi/response_throttled.txt | 1 + .../me/response_throttled.expected | 2 ++ .../whois.nic.me/me/response_throttled.txt | 1 + .../whois.nic.uk/uk/response_throttled.txt | 21 ++++++++++---- .../info/response_throttled_spec.rb | 29 +++++++++++++++++++ .../mobi/response_throttled_spec.rb | 29 +++++++++++++++++++ .../me/response_throttled_spec.rb | 29 +++++++++++++++++++ 13 files changed, 115 insertions(+), 7 deletions(-) create mode 100644 spec/fixtures/responses/whois.afilias.net/info/response_throttled.expected create mode 100644 spec/fixtures/responses/whois.afilias.net/info/response_throttled.txt create mode 100644 spec/fixtures/responses/whois.dotmobiregistry.net/mobi/response_throttled.expected create mode 100644 spec/fixtures/responses/whois.dotmobiregistry.net/mobi/response_throttled.txt create mode 100644 spec/fixtures/responses/whois.nic.me/me/response_throttled.expected create mode 100644 spec/fixtures/responses/whois.nic.me/me/response_throttled.txt create mode 100644 spec/whois/parsers/responses/whois.afilias.net/info/response_throttled_spec.rb create mode 100644 spec/whois/parsers/responses/whois.dotmobiregistry.net/mobi/response_throttled_spec.rb create mode 100644 spec/whois/parsers/responses/whois.nic.me/me/response_throttled_spec.rb diff --git a/CHANGELOG.md b/CHANGELOG.md index 3aa094f4..cd78345f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,7 @@ This project uses [Semantic Versioning 2.0.0](http://semver.org/). #### master +- FIX: Fix throttled response detection for .CO.UK, .ME, .INFO, .MOBI (and most other Afilias based) - CHANGED: Make sure times are parsed as UTC when no zone is specified (instead of using machine timezone) + improve parsing of some timezone when present and set japanese timezone. - FIX: Big update and refactoring of all the Afilias based parser format, fixing broken parsing for .ME, .ORG, .INFO, .PRO, .BZ, .GI, .LC, .MN, .SC, .VC, .AG, .IN, .AERO, .ASIA, .MOBI, .POST, .XXX. (based on #34) Thanks @raszi and @jarthod - CHANGED: Standardize a bit more the Registar object by always filling the name first (instead of sometimes filling organisation instead and sometimes duplicate both). Only fill "organization" when it's a real different property provided by the whois server. diff --git a/lib/whois/parsers/whois.nic.uk.rb b/lib/whois/parsers/whois.nic.uk.rb index 0907f652..75f46da9 100644 --- a/lib/whois/parsers/whois.nic.uk.rb +++ b/lib/whois/parsers/whois.nic.uk.rb @@ -149,7 +149,7 @@ class WhoisNicUk < Base # and will be replenished in 50 seconds. # def response_throttled? - !!(content_for_scanner =~ /The WHOIS query quota for .+ has been exceeded/) + !!(content_for_scanner =~ /the WHOIS query quota for .+ has been exceeded/i) end diff --git a/lib/whois/scanners/base_afilias.rb b/lib/whois/scanners/base_afilias.rb index b037a065..f0827dc1 100644 --- a/lib/whois/scanners/base_afilias.rb +++ b/lib/whois/scanners/base_afilias.rb @@ -30,7 +30,7 @@ class BaseAfilias < Base # .ORG tokenizer :scan_throttled do - if @input.match?(/^WHOIS LIMIT EXCEEDED/) + if @input.match?(/.*LIMIT EXCEEDED/) @ast["response:throttled"] = true @input.skip(/^.+\n/) end diff --git a/spec/fixtures/responses/whois.afilias.net/info/response_throttled.expected b/spec/fixtures/responses/whois.afilias.net/info/response_throttled.expected new file mode 100644 index 00000000..4302c673 --- /dev/null +++ b/spec/fixtures/responses/whois.afilias.net/info/response_throttled.expected @@ -0,0 +1,2 @@ +#response_throttled? + %s == true diff --git a/spec/fixtures/responses/whois.afilias.net/info/response_throttled.txt b/spec/fixtures/responses/whois.afilias.net/info/response_throttled.txt new file mode 100644 index 00000000..4cad7291 --- /dev/null +++ b/spec/fixtures/responses/whois.afilias.net/info/response_throttled.txt @@ -0,0 +1 @@ +LIMIT EXCEEDED diff --git a/spec/fixtures/responses/whois.dotmobiregistry.net/mobi/response_throttled.expected b/spec/fixtures/responses/whois.dotmobiregistry.net/mobi/response_throttled.expected new file mode 100644 index 00000000..4302c673 --- /dev/null +++ b/spec/fixtures/responses/whois.dotmobiregistry.net/mobi/response_throttled.expected @@ -0,0 +1,2 @@ +#response_throttled? + %s == true diff --git a/spec/fixtures/responses/whois.dotmobiregistry.net/mobi/response_throttled.txt b/spec/fixtures/responses/whois.dotmobiregistry.net/mobi/response_throttled.txt new file mode 100644 index 00000000..4cad7291 --- /dev/null +++ b/spec/fixtures/responses/whois.dotmobiregistry.net/mobi/response_throttled.txt @@ -0,0 +1 @@ +LIMIT EXCEEDED diff --git a/spec/fixtures/responses/whois.nic.me/me/response_throttled.expected b/spec/fixtures/responses/whois.nic.me/me/response_throttled.expected new file mode 100644 index 00000000..4302c673 --- /dev/null +++ b/spec/fixtures/responses/whois.nic.me/me/response_throttled.expected @@ -0,0 +1,2 @@ +#response_throttled? + %s == true diff --git a/spec/fixtures/responses/whois.nic.me/me/response_throttled.txt b/spec/fixtures/responses/whois.nic.me/me/response_throttled.txt new file mode 100644 index 00000000..f35717cd --- /dev/null +++ b/spec/fixtures/responses/whois.nic.me/me/response_throttled.txt @@ -0,0 +1 @@ +WHOIS QUERY RATE LIMIT EXCEEDED. PLEASE WAIT AND TRY AGAIN. diff --git a/spec/fixtures/responses/whois.nic.uk/uk/response_throttled.txt b/spec/fixtures/responses/whois.nic.uk/uk/response_throttled.txt index e567c804..68f54363 100644 --- a/spec/fixtures/responses/whois.nic.uk/uk/response_throttled.txt +++ b/spec/fixtures/responses/whois.nic.uk/uk/response_throttled.txt @@ -1,9 +1,20 @@ - Error for "google.co.uk". +Error for "google.co.uk". - The WHOIS query quota for 127.0.0.1 has been exceeded - and will be replenished in 50 seconds. +the WHOIS query quota for 127.0.0.1 has been exceeded +and will be replenished in 0.61 seconds - WHOIS lookup made at 20:30:08 08-Jan-2010 +WHOIS lookup made at 13:11:09 16-Nov-2021 -- - \ No newline at end of file +This WHOIS information is provided for free by Nominet UK the central registry +for .uk domain names. This information and the .uk WHOIS are: + + Copyright Nominet UK 1996 - 2021. + +You may not access the .uk WHOIS or use any data from it except as permitted +by the terms of use available in full at https://www.nominet.uk/whoisterms, +which includes restrictions on: (A) use of the data for advertising, or its +repackaging, recompilation, redistribution or reuse (B) obscuring, removing +or hiding any or all of this notice and (C) exceeding query rate or volume +limits. The data is provided on an 'as-is' basis and may lag behind the +register. Access may be withdrawn or restricted at any time. \ No newline at end of file diff --git a/spec/whois/parsers/responses/whois.afilias.net/info/response_throttled_spec.rb b/spec/whois/parsers/responses/whois.afilias.net/info/response_throttled_spec.rb new file mode 100644 index 00000000..b780c5ca --- /dev/null +++ b/spec/whois/parsers/responses/whois.afilias.net/info/response_throttled_spec.rb @@ -0,0 +1,29 @@ +# encoding: utf-8 + +# This file is autogenerated. Do not edit it manually. +# If you want change the content of this file, edit +# +# /spec/fixtures/responses/whois.afilias.net/info/response_throttled.expected +# +# and regenerate the tests with the following rake task +# +# $ rake spec:generate +# + +require 'spec_helper' +require 'whois/parsers/whois.afilias.net.rb' + +describe Whois::Parsers::WhoisAfiliasNet, "response_throttled.expected" do + + subject do + file = fixture("responses", "whois.afilias.net/info/response_throttled.txt") + part = Whois::Record::Part.new(body: File.read(file)) + described_class.new(part) + end + + describe "#response_throttled?" do + it do + expect(subject.response_throttled?).to eq(true) + end + end +end diff --git a/spec/whois/parsers/responses/whois.dotmobiregistry.net/mobi/response_throttled_spec.rb b/spec/whois/parsers/responses/whois.dotmobiregistry.net/mobi/response_throttled_spec.rb new file mode 100644 index 00000000..a1d64142 --- /dev/null +++ b/spec/whois/parsers/responses/whois.dotmobiregistry.net/mobi/response_throttled_spec.rb @@ -0,0 +1,29 @@ +# encoding: utf-8 + +# This file is autogenerated. Do not edit it manually. +# If you want change the content of this file, edit +# +# /spec/fixtures/responses/whois.dotmobiregistry.net/mobi/response_throttled.expected +# +# and regenerate the tests with the following rake task +# +# $ rake spec:generate +# + +require 'spec_helper' +require 'whois/parsers/whois.dotmobiregistry.net.rb' + +describe Whois::Parsers::WhoisDotmobiregistryNet, "response_throttled.expected" do + + subject do + file = fixture("responses", "whois.dotmobiregistry.net/mobi/response_throttled.txt") + part = Whois::Record::Part.new(body: File.read(file)) + described_class.new(part) + end + + describe "#response_throttled?" do + it do + expect(subject.response_throttled?).to eq(true) + end + end +end diff --git a/spec/whois/parsers/responses/whois.nic.me/me/response_throttled_spec.rb b/spec/whois/parsers/responses/whois.nic.me/me/response_throttled_spec.rb new file mode 100644 index 00000000..f1fc3296 --- /dev/null +++ b/spec/whois/parsers/responses/whois.nic.me/me/response_throttled_spec.rb @@ -0,0 +1,29 @@ +# encoding: utf-8 + +# This file is autogenerated. Do not edit it manually. +# If you want change the content of this file, edit +# +# /spec/fixtures/responses/whois.nic.me/me/response_throttled.expected +# +# and regenerate the tests with the following rake task +# +# $ rake spec:generate +# + +require 'spec_helper' +require 'whois/parsers/whois.nic.me.rb' + +describe Whois::Parsers::WhoisNicMe, "response_throttled.expected" do + + subject do + file = fixture("responses", "whois.nic.me/me/response_throttled.txt") + part = Whois::Record::Part.new(body: File.read(file)) + described_class.new(part) + end + + describe "#response_throttled?" do + it do + expect(subject.response_throttled?).to eq(true) + end + end +end From a5b0f63506671aa8b36798ebca0abb16bc0ed8eb Mon Sep 17 00:00:00 2001 From: Petri Salminen Date: Wed, 11 Mar 2020 18:16:54 +0200 Subject: [PATCH 07/29] Fix the parser for the .fi TLD (Closes: #42) The whole response format was changed in 2016, this commit changes the tests, the scanner and the parser in order to respond to the change. --- CHANGELOG.md | 1 + lib/whois/parsers/whois.fi.rb | 53 ++++++++----- lib/whois/scanners/whois.fi.rb | 43 +++++++++-- .../fi/property_status_graceperiod.expected | 64 ++++++++++------ .../fi/property_status_graceperiod.txt | 64 +++++++++++----- .../whois.fi/fi/status_available.expected | 14 ++-- .../whois.fi/fi/status_available.txt | 3 +- .../whois.fi/fi/status_registered.expected | 64 ++++++++++------ .../whois.fi/fi/status_registered.txt | 65 +++++++++++----- .../whois.fi/fi/status_reserved.expected | 13 ++-- .../responses/whois.fi/fi/status_reserved.txt | 3 +- .../fi/property_status_graceperiod_spec.rb | 76 ++++++++++++------- .../whois.fi/fi/status_available_spec.rb | 13 ++-- .../whois.fi/fi/status_registered_spec.rb | 75 +++++++++++------- .../whois.fi/fi/status_reserved_spec.rb | 13 ++-- 15 files changed, 370 insertions(+), 194 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index cd78345f..0270be18 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,7 @@ This project uses [Semantic Versioning 2.0.0](http://semver.org/). #### master +- FIX: Updated parser for .FI tld (based on #133) Thanks @elguitar - FIX: Fix throttled response detection for .CO.UK, .ME, .INFO, .MOBI (and most other Afilias based) - CHANGED: Make sure times are parsed as UTC when no zone is specified (instead of using machine timezone) + improve parsing of some timezone when present and set japanese timezone. - FIX: Big update and refactoring of all the Afilias based parser format, fixing broken parsing for .ME, .ORG, .INFO, .PRO, .BZ, .GI, .LC, .MN, .SC, .VC, .AG, .IN, .AERO, .ASIA, .MOBI, .POST, .XXX. (based on #34) Thanks @raszi and @jarthod diff --git a/lib/whois/parsers/whois.fi.rb b/lib/whois/parsers/whois.fi.rb index 2543bb7a..07d6b326 100644 --- a/lib/whois/parsers/whois.fi.rb +++ b/lib/whois/parsers/whois.fi.rb @@ -42,6 +42,8 @@ class WhoisFi < Base :reserved elsif registered? case node("status", &:downcase) + when "registered" + :registered when "granted" :registered when "grace period" @@ -76,33 +78,50 @@ class WhoisFi < Base end - property_not_supported :registrar + property_supported :registrar do + node("Registrar") do |hash| + Parser::Registrar.new( + name: hash['registrar'], + url: hash['www'] + ) + end + end - property_supported :registrant_contacts do - node("descr") do |array| - address = node("address") + property_not_supported :registrant_contacts do + end + property_supported :admin_contacts do + node("Holder") do |hash| Parser::Contact.new( - type: Parser::Contact::TYPE_REGISTRANT, - id: array[1], - name: address[0], - organization: array[0], - address: address[1], - zip: address[2], - city: address[3], - phone: node("phone") + type: Parser::Contact::TYPE_ADMINISTRATIVE, + id: hash['register number'], + name: hash['name'], + address: hash['address'][0], + zip: hash['address'][1], + city: hash['address'][2], + country: hash['country'], + phone: hash['phone'], + email: hash['holder email'] ) end end - property_not_supported :admin_contacts - - property_not_supported :technical_contacts + property_supported :technical_contacts do + node("Tech") do |hash| + Parser::Contact.new( + type: Parser::Contact::TYPE_TECHNICAL, + name: hash['name'], + email: hash['email'] + ) + end + end property_supported :nameservers do - Array.wrap(node("nserver")).map do |line| - Parser::Nameserver.new(name: line.split(" ").first) + node('Nameservers') do |hash| + Array.wrap(hash['nserver']).map do |line| + Parser::Nameserver.new(name: line.split(" ").first) + end end end diff --git a/lib/whois/scanners/whois.fi.rb b/lib/whois/scanners/whois.fi.rb index c68c0d15..a1fa4566 100644 --- a/lib/whois/scanners/whois.fi.rb +++ b/lib/whois/scanners/whois.fi.rb @@ -9,12 +9,14 @@ class WhoisFi < Base self.tokenizers += [ :skip_empty_line, :scan_available, - :scan_disclaimer, :scan_keyvalue, - :scan_reserved + :scan_reserved, + :scan_section, + :scan_keyvalue, + :skip_last_update, + :scan_disclaimer ] - tokenizer :scan_available do if @input.skip(/^Domain not found/) @ast["status:available"] = true @@ -27,13 +29,40 @@ class WhoisFi < Base end end - tokenizer :scan_disclaimer do - if @input.match?(/^More information/) - @ast["field:disclaimer"] = @input.scan_until(/(.*)\n\n/).strip + tokenizer :scan_section do + if @input.scan(/^(Nameservers|DNSSEC|Holder|Registrar|Tech)\n\n/) + @tmp['_section'] = @input[1] + while scan_keyvalue + end + @tmp.delete('_section') end end - end + # Override scan_keyvalue to match the weird + # key.........: value -format + tokenizer :scan_keyvalue do + if @input.scan(/(.+?)(\.+):(.*?)(\n|\z)/) + key, value = @input[1].strip, @input[3].strip + target = @tmp['_section'] ? (@ast[@tmp['_section']] ||= {}) : @ast + + if target[key].nil? + target[key] = value + else + target[key] = Array.wrap(target[key]) + target[key] << value + end + end + end + tokenizer :skip_last_update do + @input.skip(/^>>> Last update.*<<<\n\n/) + end + + tokenizer :scan_disclaimer do + @input.skip_until(/^(Copyright \(c\) Finnish Transport and Communications Agency Traficom)/) + @ast["field:disclaimer"] = @input[1] + end + + end end end diff --git a/spec/fixtures/responses/whois.fi/fi/property_status_graceperiod.expected b/spec/fixtures/responses/whois.fi/fi/property_status_graceperiod.expected index 6e0a0db4..5f1ae17b 100644 --- a/spec/fixtures/responses/whois.fi/fi/property_status_graceperiod.expected +++ b/spec/fixtures/responses/whois.fi/fi/property_status_graceperiod.expected @@ -1,9 +1,9 @@ #disclaimer - %s == "More information is available at https://domain.fi/\nCopyright (c) Finnish Communications Regulatory Authority" + %s == "Copyright (c) Finnish Transport and Communications Agency Traficom" #domain - %s == "oogle.fi" + %s == "kalatalousministeri.fi" #domain_id %s %ERROR{AttributeNotSupported} @@ -21,51 +21,69 @@ #created_on %s %CLASS{time} - %s %TIME{2012-06-21} + %s %TIME{2018-03-14 17:47:42} #updated_on %s %CLASS{time} - %s %TIME{2013-06-22} + %s %TIME{2019-11-06} #expires_on %s %CLASS{time} - %s %TIME{2013-06-21} + %s %TIME{2020-03-14 17:47:42} #registrar - %s %ERROR{AttributeNotSupported} + %s.name == "Gandi SAS" + %s.url == "www.gandi.net" #registrant_contacts + %s %ERROR{AttributeNotSupported} + +#admin_contacts %s %CLASS{array} %s %SIZE{1} %s[0] %CLASS{contact} - %s[0].type == Whois::Parser::Contact::TYPE_REGISTRANT - %s[0].id == "NURMI" - %s[0].name == "-" - %s[0].organization == "Minna" - %s[0].address == "Huovitie 3" - %s[0].city == "HELSINKI" - %s[0].zip == "00400" + %s[0].type == Whois::Parser::Contact::TYPE_ADMINISTRATIVE + %s[0].id == "2823344-7" + %s[0].name == "Digiteam Oy" + %s[0].address == "Myllyniityntie 71" + %s[0].city == "Lohja" + %s[0].zip == "08100" %s[0].state == nil - %s[0].country == nil + %s[0].country == "Finland" %s[0].country_code == nil - %s[0].phone == "+358201599789" + %s[0].phone == "+358.503716096" %s[0].fax == nil - %s[0].email == nil + %s[0].email == "" %s[0].created_on == nil %s[0].updated_on == nil -#admin_contacts - %s %ERROR{AttributeNotSupported} - #technical_contacts - %s %ERROR{AttributeNotSupported} + %s %CLASS{array} + %s %SIZE{1} + %s[0] %CLASS{contact} + %s[0].type == Whois::Parser::Contact::TYPE_TECHNICAL + %s[0].id == nil + %s[0].name == "Seravo Oy" + %s[0].address == nil + %s[0].city == nil + %s[0].zip == nil + %s[0].state == nil + %s[0].country == nil + %s[0].country_code == nil + %s[0].phone == nil + %s[0].fax == nil + %s[0].email == "hostmaster@seravo.com" + %s[0].created_on == nil + %s[0].updated_on == nil #nameservers %s %CLASS{array} - %s %SIZE{2} + %s %SIZE{3} %s[0] %CLASS{nameserver} - %s[0].name == "a.ns.netim.net" + %s[0].name == "ns-184-c.gandi.net" %s[1] %CLASS{nameserver} - %s[1].name == "b.ns.netim.net" + %s[1].name == "ns-196-a.gandi.net" + %s[2] %CLASS{nameserver} + %s[2].name == "ns-73-b.gandi.net" diff --git a/spec/fixtures/responses/whois.fi/fi/property_status_graceperiod.txt b/spec/fixtures/responses/whois.fi/fi/property_status_graceperiod.txt index 115737dc..9ae61183 100644 --- a/spec/fixtures/responses/whois.fi/fi/property_status_graceperiod.txt +++ b/spec/fixtures/responses/whois.fi/fi/property_status_graceperiod.txt @@ -1,21 +1,45 @@ -IP: UNABLE TO RESOLVE - -domain: oogle.fi -descr: Minna -descr: NURMI -address: - -address: Huovitie 3 -address: 00400 -address: HELSINKI -phone: +358201599789 -status: Grace Period -created: 21.6.2012 -modified: 22.6.2013 -expires: 21.6.2013 -nserver: a.ns.netim.net [Ok] -nserver: b.ns.netim.net [Ok] -dnssec: no - -More information is available at https://domain.fi/ -Copyright (c) Finnish Communications Regulatory Authority + +domain.............: kalatalousministeri.fi +status.............: Grace Period +created............: 14.3.2018 17:47:42 +expires............: 14.3.2020 17:47:42 +available..........: 14.4.2020 17:47:42 +modified...........: 6.11.2019 +RegistryLock.......: no + +Nameservers + +nserver............: ns-184-c.gandi.net [OK] +nserver............: ns-196-a.gandi.net [OK] +nserver............: ns-73-b.gandi.net [OK] + +DNSSEC + +dnssec.............: no + +Holder + +name...............: Digiteam Oy +register number....: 2823344-7 +address............: Myllyniityntie 71 +address............: 08100 +address............: Lohja +country............: Finland +phone..............: +358.503716096 +holder email.......: + +Registrar + +registrar..........: Gandi SAS +www................: www.gandi.net + +Tech + +name...............: Seravo Oy +email..............: hostmaster@seravo.com + +>>> Last update of WHOIS database: 22.3.2020 13:47:27 (EET) <<< + + +Copyright (c) Finnish Transport and Communications Agency Traficom diff --git a/spec/fixtures/responses/whois.fi/fi/status_available.expected b/spec/fixtures/responses/whois.fi/fi/status_available.expected index 76acacb4..7a7183ac 100644 --- a/spec/fixtures/responses/whois.fi/fi/status_available.expected +++ b/spec/fixtures/responses/whois.fi/fi/status_available.expected @@ -1,5 +1,5 @@ #disclaimer - %s == "More information is available at https://domain.fi/\nCopyright (c) Finnish Communications Regulatory Authority" + %s == "Copyright (c) Finnish Transport and Communications Agency Traficom" #domain @@ -30,17 +30,19 @@ #registrar - %s %ERROR{AttributeNotSupported} + %s == nil #registrant_contacts - %s %CLASS{array} - %s == [] + %s %ERROR{AttributeNotSupported} #admin_contacts - %s %ERROR{AttributeNotSupported} + %s %CLASS{array} + %s == [] #technical_contacts - %s %ERROR{AttributeNotSupported} + %s %CLASS{array} + %s == [] + #nameservers diff --git a/spec/fixtures/responses/whois.fi/fi/status_available.txt b/spec/fixtures/responses/whois.fi/fi/status_available.txt index d0e3510d..d1af02bf 100644 --- a/spec/fixtures/responses/whois.fi/fi/status_available.txt +++ b/spec/fixtures/responses/whois.fi/fi/status_available.txt @@ -1,6 +1,5 @@ Domain not found -More information is available at https://domain.fi/ -Copyright (c) Finnish Communications Regulatory Authority +Copyright (c) Finnish Transport and Communications Agency Traficom diff --git a/spec/fixtures/responses/whois.fi/fi/status_registered.expected b/spec/fixtures/responses/whois.fi/fi/status_registered.expected index 503af845..b64ec7df 100644 --- a/spec/fixtures/responses/whois.fi/fi/status_registered.expected +++ b/spec/fixtures/responses/whois.fi/fi/status_registered.expected @@ -1,5 +1,5 @@ #disclaimer - %s == "More information is available at https://domain.fi/\nCopyright (c) Finnish Communications Regulatory Authority" + %s == "Copyright (c) Finnish Transport and Communications Agency Traficom" #domain @@ -25,51 +25,71 @@ #updated_on %s %CLASS{time} - %s %TIME{2013-06-07} + %s %TIME{2019-06-02} #expires_on %s %CLASS{time} - %s %TIME{2014-07-04} + %s %TIME{2020-07-04 10:15:55} #registrar - %s %ERROR{AttributeNotSupported} + %s.id == nil + %s.name == "MarkMonitor Inc." + %s.url == "www.markmonitor.com" #registrant_contacts + %s %ERROR{AttributeNotSupported} + + +#admin_contacts %s %CLASS{array} %s %SIZE{1} %s[0] %CLASS{contact} - %s[0].type == Whois::Parser::Contact::TYPE_REGISTRANT - %s[0].id == "09073468" - %s[0].name == "Domain Administrator" - %s[0].organization == "Google Finland Oy" - %s[0].address == "Mannerheimintie 12 B" - %s[0].city == "HELSINKI" - %s[0].zip == "00100" + %s[0].type == Whois::Parser::Contact::TYPE_ADMINISTRATIVE + %s[0].id == "3582691" + %s[0].name == "Google LLC" + %s[0].organization == nil + %s[0].address == "1600 Amphitheatre Parkway" + %s[0].zip == "94043" + %s[0].city == "Mountain View" %s[0].state == nil - %s[0].country == nil + %s[0].country == "United States of America" %s[0].country_code == nil - %s[0].phone == "35896966890" + %s[0].phone == "+1.6502530000" %s[0].fax == nil - %s[0].email == nil + %s[0].email == "" %s[0].created_on == nil %s[0].updated_on == nil -#admin_contacts - %s %ERROR{AttributeNotSupported} - #technical_contacts - %s %ERROR{AttributeNotSupported} + %s %CLASS{array} + %s %SIZE{1} + %s[0] %CLASS{contact} + %s[0].type == Whois::Parser::Contact::TYPE_TECHNICAL + %s[0].id == nil + %s[0].name == "Google LLC" + %s[0].organization == nil + %s[0].address == nil + %s[0].city == nil + %s[0].zip == nil + %s[0].state == nil + %s[0].country == nil + %s[0].country_code == nil + %s[0].phone == nil + %s[0].fax == nil + %s[0].email == "ccops@markmonitor.com" + %s[0].created_on == nil + %s[0].updated_on == nil #nameservers %s %CLASS{array} %s %SIZE{4} %s[0] %CLASS{nameserver} - %s[0].name == "ns1.google.com" + %s[0].name == "ns3.google.com" %s[1] %CLASS{nameserver} - %s[1].name == "ns2.google.com" + %s[1].name == "ns4.google.com" %s[2] %CLASS{nameserver} - %s[2].name == "ns3.google.com" + %s[2].name == "ns1.google.com" %s[3] %CLASS{nameserver} - %s[3].name == "ns4.google.com" + %s[3].name == "ns2.google.com" diff --git a/spec/fixtures/responses/whois.fi/fi/status_registered.txt b/spec/fixtures/responses/whois.fi/fi/status_registered.txt index 22f4d792..aa97cedf 100644 --- a/spec/fixtures/responses/whois.fi/fi/status_registered.txt +++ b/spec/fixtures/responses/whois.fi/fi/status_registered.txt @@ -1,22 +1,47 @@ -domain: google.fi -descr: Google Finland Oy -descr: 09073468 -address: Domain Administrator -address: Mannerheimintie 12 B -address: 00100 -address: HELSINKI -phone: 35896966890 -status: Granted -created: 30.6.2006 -modified: 7.6.2013 -expires: 4.7.2014 -nserver: ns1.google.com [Ok] -nserver: ns2.google.com [Ok] -nserver: ns3.google.com [Ok] -nserver: ns4.google.com [Ok] -dnssec: no - -More information is available at https://domain.fi/ -Copyright (c) Finnish Communications Regulatory Authority +domain.............: google.fi +status.............: Registered +created............: 30.6.2006 00:00:00 +expires............: 4.7.2020 10:15:55 +available..........: 4.8.2020 10:15:55 +modified...........: 2.6.2019 +holder transfer....: 20.11.2018 +RegistryLock.......: locked + +Nameservers + +nserver............: ns3.google.com [OK] +nserver............: ns4.google.com [Technical Error] +nserver............: ns1.google.com [OK] +nserver............: ns2.google.com [OK] + +DNSSEC + +dnssec.............: no + +Holder + +name...............: Google LLC +register number....: 3582691 +address............: 1600 Amphitheatre Parkway +address............: 94043 +address............: Mountain View +country............: United States of America +phone..............: +1.6502530000 +holder email.......: + +Registrar + +registrar..........: MarkMonitor Inc. +www................: www.markmonitor.com + +Tech + +name...............: Google LLC +email..............: ccops@markmonitor.com + +>>> Last update of WHOIS database: 11.3.2020 19:45:14 (EET) <<< + + +Copyright (c) Finnish Transport and Communications Agency Traficom diff --git a/spec/fixtures/responses/whois.fi/fi/status_reserved.expected b/spec/fixtures/responses/whois.fi/fi/status_reserved.expected index facca0df..9e723ffe 100644 --- a/spec/fixtures/responses/whois.fi/fi/status_reserved.expected +++ b/spec/fixtures/responses/whois.fi/fi/status_reserved.expected @@ -1,5 +1,5 @@ #disclaimer - %s == "More information is available at https://domain.fi/\nCopyright (c) Finnish Communications Regulatory Authority" + %s == "Copyright (c) Finnish Transport and Communications Agency Traficom" #domain @@ -30,17 +30,18 @@ #registrar - %s %ERROR{AttributeNotSupported} + %s == nil #registrant_contacts - %s %CLASS{array} - %s == [] + %s %ERROR{AttributeNotSupported} #admin_contacts - %s %ERROR{AttributeNotSupported} + %s %CLASS{array} + %s == [] #technical_contacts - %s %ERROR{AttributeNotSupported} + %s %CLASS{array} + %s == [] #nameservers diff --git a/spec/fixtures/responses/whois.fi/fi/status_reserved.txt b/spec/fixtures/responses/whois.fi/fi/status_reserved.txt index d49a0e24..73a0e9a2 100644 --- a/spec/fixtures/responses/whois.fi/fi/status_reserved.txt +++ b/spec/fixtures/responses/whois.fi/fi/status_reserved.txt @@ -1,6 +1,5 @@ Domain not available -More information is available at https://domain.fi/ -Copyright (c) Finnish Communications Regulatory Authority +Copyright (c) Finnish Transport and Communications Agency Traficom diff --git a/spec/whois/parsers/responses/whois.fi/fi/property_status_graceperiod_spec.rb b/spec/whois/parsers/responses/whois.fi/fi/property_status_graceperiod_spec.rb index c6d1d8c5..b6319884 100644 --- a/spec/whois/parsers/responses/whois.fi/fi/property_status_graceperiod_spec.rb +++ b/spec/whois/parsers/responses/whois.fi/fi/property_status_graceperiod_spec.rb @@ -23,12 +23,12 @@ describe "#disclaimer" do it do - expect(subject.disclaimer).to eq("More information is available at https://domain.fi/\nCopyright (c) Finnish Communications Regulatory Authority") + expect(subject.disclaimer).to eq("Copyright (c) Finnish Transport and Communications Agency Traficom") end end describe "#domain" do it do - expect(subject.domain).to eq("oogle.fi") + expect(subject.domain).to eq("kalatalousministeri.fi") end end describe "#domain_id" do @@ -54,66 +54,84 @@ describe "#created_on" do it do expect(subject.created_on).to be_a(Time) - expect(subject.created_on).to eq(DateTime.parse("2012-06-21")) + expect(subject.created_on).to eq(DateTime.parse("2018-03-14 17:47:42")) end end describe "#updated_on" do it do expect(subject.updated_on).to be_a(Time) - expect(subject.updated_on).to eq(DateTime.parse("2013-06-22")) + expect(subject.updated_on).to eq(DateTime.parse("2019-11-06")) end end describe "#expires_on" do it do expect(subject.expires_on).to be_a(Time) - expect(subject.expires_on).to eq(DateTime.parse("2013-06-21")) + expect(subject.expires_on).to eq(DateTime.parse("2020-03-14 17:47:42")) end end describe "#registrar" do it do - expect { subject.registrar }.to raise_error(Whois::AttributeNotSupported) + expect(subject.registrar.name).to eq("Gandi SAS") + expect(subject.registrar.url).to eq("www.gandi.net") end end describe "#registrant_contacts" do it do - expect(subject.registrant_contacts).to be_a(Array) - expect(subject.registrant_contacts.size).to eq(1) - expect(subject.registrant_contacts[0]).to be_a(Whois::Parser::Contact) - expect(subject.registrant_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_REGISTRANT) - expect(subject.registrant_contacts[0].id).to eq("NURMI") - expect(subject.registrant_contacts[0].name).to eq("-") - expect(subject.registrant_contacts[0].organization).to eq("Minna") - expect(subject.registrant_contacts[0].address).to eq("Huovitie 3") - expect(subject.registrant_contacts[0].city).to eq("HELSINKI") - expect(subject.registrant_contacts[0].zip).to eq("00400") - expect(subject.registrant_contacts[0].state).to eq(nil) - expect(subject.registrant_contacts[0].country).to eq(nil) - expect(subject.registrant_contacts[0].country_code).to eq(nil) - expect(subject.registrant_contacts[0].phone).to eq("+358201599789") - expect(subject.registrant_contacts[0].fax).to eq(nil) - expect(subject.registrant_contacts[0].email).to eq(nil) - expect(subject.registrant_contacts[0].created_on).to eq(nil) - expect(subject.registrant_contacts[0].updated_on).to eq(nil) + expect { subject.registrant_contacts }.to raise_error(Whois::AttributeNotSupported) end end describe "#admin_contacts" do it do - expect { subject.admin_contacts }.to raise_error(Whois::AttributeNotSupported) + expect(subject.admin_contacts).to be_a(Array) + expect(subject.admin_contacts.size).to eq(1) + expect(subject.admin_contacts[0]).to be_a(Whois::Parser::Contact) + expect(subject.admin_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_ADMINISTRATIVE) + expect(subject.admin_contacts[0].id).to eq("2823344-7") + expect(subject.admin_contacts[0].name).to eq("Digiteam Oy") + expect(subject.admin_contacts[0].address).to eq("Myllyniityntie 71") + expect(subject.admin_contacts[0].city).to eq("Lohja") + expect(subject.admin_contacts[0].zip).to eq("08100") + expect(subject.admin_contacts[0].state).to eq(nil) + expect(subject.admin_contacts[0].country).to eq("Finland") + expect(subject.admin_contacts[0].country_code).to eq(nil) + expect(subject.admin_contacts[0].phone).to eq("+358.503716096") + expect(subject.admin_contacts[0].fax).to eq(nil) + expect(subject.admin_contacts[0].email).to eq("") + expect(subject.admin_contacts[0].created_on).to eq(nil) + expect(subject.admin_contacts[0].updated_on).to eq(nil) end end describe "#technical_contacts" do it do - expect { subject.technical_contacts }.to raise_error(Whois::AttributeNotSupported) + expect(subject.technical_contacts).to be_a(Array) + expect(subject.technical_contacts.size).to eq(1) + expect(subject.technical_contacts[0]).to be_a(Whois::Parser::Contact) + expect(subject.technical_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_TECHNICAL) + expect(subject.technical_contacts[0].id).to eq(nil) + expect(subject.technical_contacts[0].name).to eq("Seravo Oy") + expect(subject.technical_contacts[0].address).to eq(nil) + expect(subject.technical_contacts[0].city).to eq(nil) + expect(subject.technical_contacts[0].zip).to eq(nil) + expect(subject.technical_contacts[0].state).to eq(nil) + expect(subject.technical_contacts[0].country).to eq(nil) + expect(subject.technical_contacts[0].country_code).to eq(nil) + expect(subject.technical_contacts[0].phone).to eq(nil) + expect(subject.technical_contacts[0].fax).to eq(nil) + expect(subject.technical_contacts[0].email).to eq("hostmaster@seravo.com") + expect(subject.technical_contacts[0].created_on).to eq(nil) + expect(subject.technical_contacts[0].updated_on).to eq(nil) end end describe "#nameservers" do it do expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers.size).to eq(2) + expect(subject.nameservers.size).to eq(3) expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[0].name).to eq("a.ns.netim.net") + expect(subject.nameservers[0].name).to eq("ns-184-c.gandi.net") expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[1].name).to eq("b.ns.netim.net") + expect(subject.nameservers[1].name).to eq("ns-196-a.gandi.net") + expect(subject.nameservers[2]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[2].name).to eq("ns-73-b.gandi.net") end end end diff --git a/spec/whois/parsers/responses/whois.fi/fi/status_available_spec.rb b/spec/whois/parsers/responses/whois.fi/fi/status_available_spec.rb index 19cbf934..95033b32 100644 --- a/spec/whois/parsers/responses/whois.fi/fi/status_available_spec.rb +++ b/spec/whois/parsers/responses/whois.fi/fi/status_available_spec.rb @@ -23,7 +23,7 @@ describe "#disclaimer" do it do - expect(subject.disclaimer).to eq("More information is available at https://domain.fi/\nCopyright (c) Finnish Communications Regulatory Authority") + expect(subject.disclaimer).to eq("Copyright (c) Finnish Transport and Communications Agency Traficom") end end describe "#domain" do @@ -68,23 +68,24 @@ end describe "#registrar" do it do - expect { subject.registrar }.to raise_error(Whois::AttributeNotSupported) + expect(subject.registrar).to eq(nil) end end describe "#registrant_contacts" do it do - expect(subject.registrant_contacts).to be_a(Array) - expect(subject.registrant_contacts).to eq([]) + expect { subject.registrant_contacts }.to raise_error(Whois::AttributeNotSupported) end end describe "#admin_contacts" do it do - expect { subject.admin_contacts }.to raise_error(Whois::AttributeNotSupported) + expect(subject.admin_contacts).to be_a(Array) + expect(subject.admin_contacts).to eq([]) end end describe "#technical_contacts" do it do - expect { subject.technical_contacts }.to raise_error(Whois::AttributeNotSupported) + expect(subject.technical_contacts).to be_a(Array) + expect(subject.technical_contacts).to eq([]) end end describe "#nameservers" do diff --git a/spec/whois/parsers/responses/whois.fi/fi/status_registered_spec.rb b/spec/whois/parsers/responses/whois.fi/fi/status_registered_spec.rb index 871d6736..8c88c11d 100644 --- a/spec/whois/parsers/responses/whois.fi/fi/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.fi/fi/status_registered_spec.rb @@ -23,7 +23,7 @@ describe "#disclaimer" do it do - expect(subject.disclaimer).to eq("More information is available at https://domain.fi/\nCopyright (c) Finnish Communications Regulatory Authority") + expect(subject.disclaimer).to eq("Copyright (c) Finnish Transport and Communications Agency Traficom") end end describe "#domain" do @@ -60,50 +60,69 @@ describe "#updated_on" do it do expect(subject.updated_on).to be_a(Time) - expect(subject.updated_on).to eq(DateTime.parse("2013-06-07")) + expect(subject.updated_on).to eq(DateTime.parse("2019-06-02")) end end describe "#expires_on" do it do expect(subject.expires_on).to be_a(Time) - expect(subject.expires_on).to eq(DateTime.parse("2014-07-04")) + expect(subject.expires_on).to eq(DateTime.parse("2020-07-04 10:15:55")) end end describe "#registrar" do it do - expect { subject.registrar }.to raise_error(Whois::AttributeNotSupported) + expect(subject.registrar.id).to eq(nil) + expect(subject.registrar.name).to eq("MarkMonitor Inc.") + expect(subject.registrar.url).to eq("www.markmonitor.com") end end describe "#registrant_contacts" do it do - expect(subject.registrant_contacts).to be_a(Array) - expect(subject.registrant_contacts.size).to eq(1) - expect(subject.registrant_contacts[0]).to be_a(Whois::Parser::Contact) - expect(subject.registrant_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_REGISTRANT) - expect(subject.registrant_contacts[0].id).to eq("09073468") - expect(subject.registrant_contacts[0].name).to eq("Domain Administrator") - expect(subject.registrant_contacts[0].organization).to eq("Google Finland Oy") - expect(subject.registrant_contacts[0].address).to eq("Mannerheimintie 12 B") - expect(subject.registrant_contacts[0].city).to eq("HELSINKI") - expect(subject.registrant_contacts[0].zip).to eq("00100") - expect(subject.registrant_contacts[0].state).to eq(nil) - expect(subject.registrant_contacts[0].country).to eq(nil) - expect(subject.registrant_contacts[0].country_code).to eq(nil) - expect(subject.registrant_contacts[0].phone).to eq("35896966890") - expect(subject.registrant_contacts[0].fax).to eq(nil) - expect(subject.registrant_contacts[0].email).to eq(nil) - expect(subject.registrant_contacts[0].created_on).to eq(nil) - expect(subject.registrant_contacts[0].updated_on).to eq(nil) + expect { subject.registrant_contacts }.to raise_error(Whois::AttributeNotSupported) end end describe "#admin_contacts" do it do - expect { subject.admin_contacts }.to raise_error(Whois::AttributeNotSupported) + expect(subject.admin_contacts).to be_a(Array) + expect(subject.admin_contacts.size).to eq(1) + expect(subject.admin_contacts[0]).to be_a(Whois::Parser::Contact) + expect(subject.admin_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_ADMINISTRATIVE) + expect(subject.admin_contacts[0].id).to eq("3582691") + expect(subject.admin_contacts[0].name).to eq("Google LLC") + expect(subject.admin_contacts[0].organization).to eq(nil) + expect(subject.admin_contacts[0].address).to eq("1600 Amphitheatre Parkway") + expect(subject.admin_contacts[0].zip).to eq("94043") + expect(subject.admin_contacts[0].city).to eq("Mountain View") + expect(subject.admin_contacts[0].state).to eq(nil) + expect(subject.admin_contacts[0].country).to eq("United States of America") + expect(subject.admin_contacts[0].country_code).to eq(nil) + expect(subject.admin_contacts[0].phone).to eq("+1.6502530000") + expect(subject.admin_contacts[0].fax).to eq(nil) + expect(subject.admin_contacts[0].email).to eq("") + expect(subject.admin_contacts[0].created_on).to eq(nil) + expect(subject.admin_contacts[0].updated_on).to eq(nil) end end describe "#technical_contacts" do it do - expect { subject.technical_contacts }.to raise_error(Whois::AttributeNotSupported) + expect(subject.technical_contacts).to be_a(Array) + expect(subject.technical_contacts.size).to eq(1) + expect(subject.technical_contacts[0]).to be_a(Whois::Parser::Contact) + expect(subject.technical_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_TECHNICAL) + expect(subject.technical_contacts[0].id).to eq(nil) + expect(subject.technical_contacts[0].name).to eq("Google LLC") + expect(subject.technical_contacts[0].organization).to eq(nil) + expect(subject.technical_contacts[0].address).to eq(nil) + expect(subject.technical_contacts[0].city).to eq(nil) + expect(subject.technical_contacts[0].zip).to eq(nil) + expect(subject.technical_contacts[0].state).to eq(nil) + expect(subject.technical_contacts[0].country).to eq(nil) + expect(subject.technical_contacts[0].country_code).to eq(nil) + expect(subject.technical_contacts[0].phone).to eq(nil) + expect(subject.technical_contacts[0].fax).to eq(nil) + expect(subject.technical_contacts[0].email).to eq("ccops@markmonitor.com") + expect(subject.technical_contacts[0].created_on).to eq(nil) + expect(subject.technical_contacts[0].updated_on).to eq(nil) end end describe "#nameservers" do @@ -111,13 +130,13 @@ expect(subject.nameservers).to be_a(Array) expect(subject.nameservers.size).to eq(4) expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[0].name).to eq("ns1.google.com") + expect(subject.nameservers[0].name).to eq("ns3.google.com") expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[1].name).to eq("ns2.google.com") + expect(subject.nameservers[1].name).to eq("ns4.google.com") expect(subject.nameservers[2]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[2].name).to eq("ns3.google.com") + expect(subject.nameservers[2].name).to eq("ns1.google.com") expect(subject.nameservers[3]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[3].name).to eq("ns4.google.com") + expect(subject.nameservers[3].name).to eq("ns2.google.com") end end end diff --git a/spec/whois/parsers/responses/whois.fi/fi/status_reserved_spec.rb b/spec/whois/parsers/responses/whois.fi/fi/status_reserved_spec.rb index 13f797a8..81e934ec 100644 --- a/spec/whois/parsers/responses/whois.fi/fi/status_reserved_spec.rb +++ b/spec/whois/parsers/responses/whois.fi/fi/status_reserved_spec.rb @@ -23,7 +23,7 @@ describe "#disclaimer" do it do - expect(subject.disclaimer).to eq("More information is available at https://domain.fi/\nCopyright (c) Finnish Communications Regulatory Authority") + expect(subject.disclaimer).to eq("Copyright (c) Finnish Transport and Communications Agency Traficom") end end describe "#domain" do @@ -68,23 +68,24 @@ end describe "#registrar" do it do - expect { subject.registrar }.to raise_error(Whois::AttributeNotSupported) + expect(subject.registrar).to eq(nil) end end describe "#registrant_contacts" do it do - expect(subject.registrant_contacts).to be_a(Array) - expect(subject.registrant_contacts).to eq([]) + expect { subject.registrant_contacts }.to raise_error(Whois::AttributeNotSupported) end end describe "#admin_contacts" do it do - expect { subject.admin_contacts }.to raise_error(Whois::AttributeNotSupported) + expect(subject.admin_contacts).to be_a(Array) + expect(subject.admin_contacts).to eq([]) end end describe "#technical_contacts" do it do - expect { subject.technical_contacts }.to raise_error(Whois::AttributeNotSupported) + expect(subject.technical_contacts).to be_a(Array) + expect(subject.technical_contacts).to eq([]) end end describe "#nameservers" do From 481c1bb2f12e2e2e3835db6466798b731d04b2a6 Mon Sep 17 00:00:00 2001 From: Adrien Rey-Jarthon Date: Sun, 21 Nov 2021 11:27:39 +0100 Subject: [PATCH 08/29] Updated parser for .CO tld --- CHANGELOG.md | 1 + lib/whois/parsers/base_icann_compliant.rb | 4 +- lib/whois/parsers/whois.biz.rb | 3 - lib/whois/parsers/whois.nic.co.rb | 4 +- .../whois.nic.co/co/status_available.expected | 4 +- .../whois.nic.co/co/status_available.txt | 49 ++--- .../co/status_registered.expected | 89 +++++---- .../whois.nic.co/co/status_registered.txt | 183 ++++++++---------- .../whois.nic.co/co/status_available_spec.rb | 4 +- .../whois.nic.co/co/status_registered_spec.rb | 89 +++++---- 10 files changed, 196 insertions(+), 234 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 0270be18..631cfd25 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,7 @@ This project uses [Semantic Versioning 2.0.0](http://semver.org/). #### master +- FIX: Updated parser for .CO tld - FIX: Updated parser for .FI tld (based on #133) Thanks @elguitar - FIX: Fix throttled response detection for .CO.UK, .ME, .INFO, .MOBI (and most other Afilias based) - CHANGED: Make sure times are parsed as UTC when no zone is specified (instead of using machine timezone) + improve parsing of some timezone when present and set japanese timezone. diff --git a/lib/whois/parsers/base_icann_compliant.rb b/lib/whois/parsers/base_icann_compliant.rb index 44686095..fe9bb110 100644 --- a/lib/whois/parsers/base_icann_compliant.rb +++ b/lib/whois/parsers/base_icann_compliant.rb @@ -21,7 +21,9 @@ class Parsers class BaseIcannCompliant < Base include Scanners::Scannable - self.scanner = Scanners::BaseIcannCompliant + self.scanner = Scanners::BaseIcannCompliant, { + pattern_available: /^No Data Found/ + } property_supported :disclaimer do node("field:disclaimer") diff --git a/lib/whois/parsers/whois.biz.rb b/lib/whois/parsers/whois.biz.rb index e02f0bef..999b5e77 100644 --- a/lib/whois/parsers/whois.biz.rb +++ b/lib/whois/parsers/whois.biz.rb @@ -19,9 +19,6 @@ class Parsers # The Example parser for the list of all available methods. # class WhoisBiz < BaseIcannCompliant - self.scanner = Scanners::BaseIcannCompliant, { - pattern_available: /^No Data Found\n/ - } end end diff --git a/lib/whois/parsers/whois.nic.co.rb b/lib/whois/parsers/whois.nic.co.rb index d903ee0e..ede7ff48 100644 --- a/lib/whois/parsers/whois.nic.co.rb +++ b/lib/whois/parsers/whois.nic.co.rb @@ -7,7 +7,7 @@ #++ -require_relative 'base_shared2' +require_relative 'base_icann_compliant' module Whois @@ -18,7 +18,7 @@ class Parsers # @see Whois::Parsers::Example # The Example parser for the list of all available methods. # - class WhoisNicCo < BaseShared2 + class WhoisNicCo < BaseIcannCompliant end end diff --git a/spec/fixtures/responses/whois.nic.co/co/status_available.expected b/spec/fixtures/responses/whois.nic.co/co/status_available.expected index d1a29220..9f23516a 100644 --- a/spec/fixtures/responses/whois.nic.co/co/status_available.expected +++ b/spec/fixtures/responses/whois.nic.co/co/status_available.expected @@ -1,12 +1,12 @@ #domain - %s == "u34jedzcq.co" + %s == nil #domain_id %s == nil #status - %s == nil + %s == :available #available? %s == true diff --git a/spec/fixtures/responses/whois.nic.co/co/status_available.txt b/spec/fixtures/responses/whois.nic.co/co/status_available.txt index 7970c40b..9ab7fc4d 100644 --- a/spec/fixtures/responses/whois.nic.co/co/status_available.txt +++ b/spec/fixtures/responses/whois.nic.co/co/status_available.txt @@ -1,38 +1,13 @@ -Not found: u34jedzcq.co +No Data Found +URL of the ICANN Whois Inaccuracy Complaint Form: https://www.icann.org/wicf/ +>>> Last update of WHOIS database: 2021-11-21T10:15:18Z <<< ->>>> Whois database was last updated on: Wed Jan 22 22:07:33 GMT 2014 <<<< -.CO Internet, S.A.S., the Administrator for .CO, has collected this -information for the WHOIS database through Accredited Registrars. -This information is provided to you for informational purposes only -and is designed to assist persons in determining contents of a domain -name registration record in the .CO Internet registry database. .CO -Internet makes this information available to you "as is" and does not -guarantee its accuracy. - -By submitting a WHOIS query, you agree that you will use this data -only for lawful purposes and that, under no circumstances will you -use this data: (1) to allow, enable, or otherwise support the transmission -of mass unsolicited, commercial advertising or solicitations via direct -mail, electronic mail, or by telephone; (2) in contravention of any -applicable data and privacy protection laws; or (3) to enable high volume, -automated, electronic processes that apply to the registry (or its systems). -Compilation, repackaging, dissemination, or other use of the WHOIS -database in its entirety, or of a substantial portion thereof, is not allowed -without .CO Internet's prior written permission. .CO Internet reserves the -right to modify or change these conditions at any time without prior or -subsequent notification of any kind. By executing this query, in any manner -whatsoever, you agree to abide by these terms. In some limited cases, -domains that might appear as available in whois might not actually be -available as they could be already registered and the whois not yet updated -and/or they could be part of the Restricted list. In this cases, performing a -check through your Registrar's (EPP check) will give you the actual status -of the domain. Additionally, domains currently or previously used as -extensions in 3rd level domains will not be available for registration in the -2nd level. For example, org.co,mil.co,edu.co,com.co,net.co,nom.co,arts.co, -firm.co,info.co,int.co,web.co,rec.co,co.co. - -NOTE: FAILURE TO LOCATE A RECORD IN THE WHOIS DATABASE IS NOT -INDICATIVE OF THE AVAILABILITY OF A DOMAIN NAME. - -All domain names are subject to certain additional domain name registration -rules. For details, please visit our site at www.cointernet.co . +For more information on Whois status codes, please visit https://icann.org/epp + +The above WHOIS results have been redacted to remove potential personal data. The full WHOIS output may be available to individuals and organisations with a legitimate interest in accessing this data not outweighed by the fundamental privacy rights of the data subject. To find out more, or to make a request for access, please visit: RDDSrequest.nic.co. + +.CO Internet, S.A.S., the Administrator for .CO, has collected this information for the WHOIS database through Accredited Registrars. This information is provided to you for informational purposes only and is designed to assist persons in determining contents of a domain name registration record in the .CO Internet registry database. .CO Internet makes this information available to you "as is" and does not guarantee its accuracy. + +By submitting a WHOIS query, you agree that you will use this data only for lawful purposes and that, under no circumstances will you use this data: (1) to allow, enable, or otherwise support the transmission of mass unsolicited, commercial advertising or solicitations via direct mail, electronic mail, or by telephone; (2) in contravention of any applicable data and privacy protection laws; or (3) to enable high volume, automated, electronic processes that apply to the registry (or its systems). Compilation, repackaging, dissemination, or other use of the WHOIS database in its entirety, or of a substantial portion thereof, is not allowed without .CO Internet's prior written permission. .CO Internet reserves the right to modify or change these conditions at any time without prior or subsequent notification of any kind. By executing this query, in any manner whatsoever, you agree to abide by these terms. In some limited cases, domains that might appear as available in whois might not actually be available as they could be already registered and the whois not yet updated and/or they could be part of the Restricted list. In this cases, performing a check through your Registrar's (EPP check) will give you the actual status of the domain. Additionally, domains currently or previously used as extensions in 3rd level domains will not be available for registration in the 2nd level. For example, org.co, mil.co, edu.co, com.co, net.co, nom.co, arts.co, firm.co, info.co, int.co, web.co, rec.co, co.co. + +NOTE: FAILURE TO LOCATE A RECORD IN THE WHOIS DATABASE IS NOT INDICATIVE OF THE AVAILABILITY OF A DOMAIN NAME. All domain names are subject to certain additional domain name registration rules. For details, please visit our site at www.cointernet.co . diff --git a/spec/fixtures/responses/whois.nic.co/co/status_registered.expected b/spec/fixtures/responses/whois.nic.co/co/status_registered.expected index 64845955..e4cb3d21 100644 --- a/spec/fixtures/responses/whois.nic.co/co/status_registered.expected +++ b/spec/fixtures/responses/whois.nic.co/co/status_registered.expected @@ -6,7 +6,7 @@ #status - %s == ["clientTransferProhibited"] + %s == :registered #available? %s == false @@ -21,81 +21,86 @@ #updated_on %s %CLASS{time} - %s %TIME{2013-10-14 13:03:24 GMT} + %s %TIME{2021-04-26 05:09:40 GMT} #expires_on %s %CLASS{time} - %s %TIME{2016-04-25 23:59:59 GMT} + %s %TIME{2022-04-25 23:59:59 GMT} #registrar %s %CLASS{registrar} %s.id == "299" - %s.name == "CSC CORPORATE DOMAINS" + %s.name == "CSC Corporate Domains, Inc." #registrant_contacts %s %CLASS{array} %s %SIZE{1} %s[0] %CLASS{contact} %s[0].type == Whois::Parser::Contact::TYPE_REGISTRANT - %s[0].id == "365684910586C791" - %s[0].name == "Twitter, Inc." + %s[0].id == "REDACTED FOR PRIVACY" + %s[0].name == "REDACTED FOR PRIVACY" %s[0].organization == "Twitter, Inc." - %s[0].address == "1355 Market Street\nSuite 900" - %s[0].city == "San Francisco" - %s[0].zip == "94103" + %s[0].address == "REDACTED FOR PRIVACY, REDACTED FOR PRIVACY, REDACTED FOR PRIVACY" + %s[0].city == "REDACTED FOR PRIVACY" + %s[0].zip == "REDACTED FOR PRIVACY" %s[0].state == "CA" - %s[0].country == "United States" %s[0].country_code == "US" - %s[0].phone == "+1.4152229670" - %s[0].fax == "+1.4152220922" - %s[0].email == "domains@twitter.com" + %s[0].phone == "REDACTED FOR PRIVACY ext: REDACTED FOR PRIVACY" + %s[0].fax == "REDACTED FOR PRIVACY ext: REDACTED FOR PRIVACY" + %s[0].email == "Please query the RDDS service of the Registrar of Record identified in this output for information on how to contact the Registrant, Admin, or Tech contact of the queried domain name." #admin_contacts %s %CLASS{array} %s %SIZE{1} %s[0] %CLASS{contact} %s[0].type == Whois::Parser::Contact::TYPE_ADMINISTRATIVE - %s[0].id == "868543810568A633" - %s[0].name == "Domain Admin" - %s[0].organization == "Twitter, Inc." - %s[0].address == "1355 Market Street\nSuite 900" - %s[0].city == "San Francisco" - %s[0].zip == "94103" - %s[0].state == "California" - %s[0].country == "United States" - %s[0].country_code == "US" - %s[0].phone == "+1.4152229670" - %s[0].fax == "+1.4152220922" - %s[0].email == "domains@twitter.com" + %s[0].id == "REDACTED FOR PRIVACY" + %s[0].name == "REDACTED FOR PRIVACY" + %s[0].organization == "REDACTED FOR PRIVACY" + %s[0].address == "REDACTED FOR PRIVACY, REDACTED FOR PRIVACY, REDACTED FOR PRIVACY" + %s[0].city == "REDACTED FOR PRIVACY" + %s[0].zip == "REDACTED FOR PRIVACY" + %s[0].state == "REDACTED FOR PRIVACY" + %s[0].country_code == "REDACTED FOR PRIVACY" + %s[0].phone == "REDACTED FOR PRIVACY ext: REDACTED FOR PRIVACY" + %s[0].fax == "REDACTED FOR PRIVACY ext: REDACTED FOR PRIVACY" + %s[0].email == "Please query the RDDS service of the Registrar of Record identified in this output for information on how to contact the Registrant, Admin, or Tech contact of the queried domain name." #technical_contacts %s %CLASS{array} %s %SIZE{1} %s[0] %CLASS{contact} %s[0].type == Whois::Parser::Contact::TYPE_TECHNICAL - %s[0].id == "42101611057C7478" - %s[0].name == "Tech Admin" - %s[0].organization == "Twitter, Inc." - %s[0].address == "1355 Market Street\nSuite 900" - %s[0].city == "San Francisco" - %s[0].zip == "94103" - %s[0].state == "California" - %s[0].country == "United States" - %s[0].country_code == "US" - %s[0].phone == "+1.4152229670" - %s[0].fax == "+1.4152220922" - %s[0].email == "domains-tech@twitter.com" + %s[0].id == "REDACTED FOR PRIVACY" + %s[0].name == "REDACTED FOR PRIVACY" + %s[0].organization == "REDACTED FOR PRIVACY" + %s[0].address == "REDACTED FOR PRIVACY, REDACTED FOR PRIVACY, REDACTED FOR PRIVACY" + %s[0].city == "REDACTED FOR PRIVACY" + %s[0].zip == "REDACTED FOR PRIVACY" + %s[0].state == "REDACTED FOR PRIVACY" + %s[0].country_code == "REDACTED FOR PRIVACY" + %s[0].phone == "REDACTED FOR PRIVACY ext: REDACTED FOR PRIVACY" + %s[0].fax == "REDACTED FOR PRIVACY ext: REDACTED FOR PRIVACY" + %s[0].email == "Please query the RDDS service of the Registrar of Record identified in this output for information on how to contact the Registrant, Admin, or Tech contact of the queried domain name." #nameservers %s %CLASS{array} - %s %SIZE{4} + %s %SIZE{8} %s[0] %CLASS{nameserver} - %s[0].name == "ns1.p34.dynect.net" + %s[0].name == "ns3.p34.dynect.net" %s[1] %CLASS{nameserver} - %s[1].name == "ns2.p34.dynect.net" + %s[1].name == "ns4.p34.dynect.net" %s[2] %CLASS{nameserver} - %s[2].name == "ns3.p34.dynect.net" + %s[2].name == "d01-01.ns.twtrdns.net" %s[3] %CLASS{nameserver} - %s[3].name == "ns4.p34.dynect.net" + %s[3].name == "d01-02.ns.twtrdns.net" + %s[4] %CLASS{nameserver} + %s[4].name == "a.r06.twtrdns.net" + %s[5] %CLASS{nameserver} + %s[5].name == "b.r06.twtrdns.net" + %s[6] %CLASS{nameserver} + %s[6].name == "c.r06.twtrdns.net" + %s[7] %CLASS{nameserver} + %s[7].name == "d.r06.twtrdns.net" diff --git a/spec/fixtures/responses/whois.nic.co/co/status_registered.txt b/spec/fixtures/responses/whois.nic.co/co/status_registered.txt index 4fb9aea8..4dfcd5c5 100644 --- a/spec/fixtures/responses/whois.nic.co/co/status_registered.txt +++ b/spec/fixtures/responses/whois.nic.co/co/status_registered.txt @@ -1,104 +1,81 @@ -Domain Name: T.CO -Domain ID: D740225-CO -Sponsoring Registrar: CSC CORPORATE DOMAINS -Sponsoring Registrar IANA ID: 299 -Registrar URL (registration services): whois.corporatedomains.com -Domain Status: clientTransferProhibited -Registrant ID: 365684910586C791 -Registrant Name: Twitter, Inc. -Registrant Organization: Twitter, Inc. -Registrant Address1: 1355 Market Street -Registrant Address2: Suite 900 -Registrant City: San Francisco -Registrant State/Province: CA -Registrant Postal Code: 94103 -Registrant Country: United States -Registrant Country Code: US -Registrant Phone Number: +1.4152229670 -Registrant Facsimile Number: +1.4152220922 -Registrant Email: domains@twitter.com -Administrative Contact ID: 868543810568A633 -Administrative Contact Name: Domain Admin -Administrative Contact Organization: Twitter, Inc. -Administrative Contact Address1: 1355 Market Street -Administrative Contact Address2: Suite 900 -Administrative Contact City: San Francisco -Administrative Contact State/Province: California -Administrative Contact Postal Code: 94103 -Administrative Contact Country: United States -Administrative Contact Country Code: US -Administrative Contact Phone Number: +1.4152229670 -Administrative Contact Facsimile Number: +1.4152220922 -Administrative Contact Email: domains@twitter.com -Billing Contact ID: 341112710590A136 -Billing Contact Name: ccTLD Billing -Billing Contact Organization: CSC Corporate Domains, Inc. -Billing Contact Address1: 2711 Centerville Rd. -Billing Contact City: Wilmington -Billing Contact State/Province: DE -Billing Contact Postal Code: 19808 -Billing Contact Country: United States -Billing Contact Country Code: US -Billing Contact Phone Number: +1.3026365400 -Billing Contact Facsimile Number: +1.3026365454 -Billing Contact Email: ccTLD-billing@cscinfo.com -Technical Contact ID: 42101611057C7478 -Technical Contact Name: Tech Admin -Technical Contact Organization: Twitter, Inc. -Technical Contact Address1: 1355 Market Street -Technical Contact Address2: Suite 900 -Technical Contact City: San Francisco -Technical Contact State/Province: California -Technical Contact Postal Code: 94103 -Technical Contact Country: United States -Technical Contact Country Code: US -Technical Contact Phone Number: +1.4152229670 -Technical Contact Facsimile Number: +1.4152220922 -Technical Contact Email: domains-tech@twitter.com -Name Server: NS1.P34.DYNECT.NET -Name Server: NS2.P34.DYNECT.NET -Name Server: NS3.P34.DYNECT.NET -Name Server: NS4.P34.DYNECT.NET -Created by Registrar: INJECTCSR -Last Updated by Registrar: CSC CORPORATE DOMAINS -Last Transferred Date: Sun Oct 13 16:51:10 GMT 2013 -Domain Registration Date: Mon Apr 26 07:50:40 GMT 2010 -Domain Expiration Date: Mon Apr 25 23:59:59 GMT 2016 -Domain Last Updated Date: Mon Oct 14 13:03:24 GMT 2013 +Domain Name: t.co +Registry Domain ID: D740225-CO +Registrar WHOIS Server: whois.corporatedomains.com +Registrar URL: whois.corporatedomains.com +Updated Date: 2021-04-26T05:09:40Z +Creation Date: 2010-04-26T07:50:40Z +Registry Expiry Date: 2022-04-25T23:59:59Z +Registrar: CSC Corporate Domains, Inc. +Registrar IANA ID: 299 +Registrar Abuse Contact Email: domainabuse@cscglobal.com +Registrar Abuse Contact Phone: +1.8887802723 +Domain Status: clientTransferProhibited https://icann.org/epp#clientTransferProhibited +Domain Status: serverDeleteProhibited https://icann.org/epp#serverDeleteProhibited +Domain Status: serverTransferProhibited https://icann.org/epp#serverTransferProhibited +Domain Status: serverUpdateProhibited https://icann.org/epp#serverUpdateProhibited +Registry Registrant ID: REDACTED FOR PRIVACY +Registrant Name: REDACTED FOR PRIVACY +Registrant Organization: Twitter, Inc. +Registrant Street: REDACTED FOR PRIVACY +Registrant Street: REDACTED FOR PRIVACY +Registrant Street: REDACTED FOR PRIVACY +Registrant City: REDACTED FOR PRIVACY +Registrant State/Province: CA +Registrant Postal Code: REDACTED FOR PRIVACY +Registrant Country: US +Registrant Phone: REDACTED FOR PRIVACY +Registrant Phone Ext: REDACTED FOR PRIVACY +Registrant Fax: REDACTED FOR PRIVACY +Registrant Fax Ext: REDACTED FOR PRIVACY +Registrant Email: Please query the RDDS service of the Registrar of Record identified in this output for information on how to contact the Registrant, Admin, or Tech contact of the queried domain name. +Registry Admin ID: REDACTED FOR PRIVACY +Admin Name: REDACTED FOR PRIVACY +Admin Organization: REDACTED FOR PRIVACY +Admin Street: REDACTED FOR PRIVACY +Admin Street: REDACTED FOR PRIVACY +Admin Street: REDACTED FOR PRIVACY +Admin City: REDACTED FOR PRIVACY +Admin State/Province: REDACTED FOR PRIVACY +Admin Postal Code: REDACTED FOR PRIVACY +Admin Country: REDACTED FOR PRIVACY +Admin Phone: REDACTED FOR PRIVACY +Admin Phone Ext: REDACTED FOR PRIVACY +Admin Fax: REDACTED FOR PRIVACY +Admin Fax Ext: REDACTED FOR PRIVACY +Admin Email: Please query the RDDS service of the Registrar of Record identified in this output for information on how to contact the Registrant, Admin, or Tech contact of the queried domain name. +Registry Tech ID: REDACTED FOR PRIVACY +Tech Name: REDACTED FOR PRIVACY +Tech Organization: REDACTED FOR PRIVACY +Tech Street: REDACTED FOR PRIVACY +Tech Street: REDACTED FOR PRIVACY +Tech Street: REDACTED FOR PRIVACY +Tech City: REDACTED FOR PRIVACY +Tech State/Province: REDACTED FOR PRIVACY +Tech Postal Code: REDACTED FOR PRIVACY +Tech Country: REDACTED FOR PRIVACY +Tech Phone: REDACTED FOR PRIVACY +Tech Phone Ext: REDACTED FOR PRIVACY +Tech Fax: REDACTED FOR PRIVACY +Tech Fax Ext: REDACTED FOR PRIVACY +Tech Email: Please query the RDDS service of the Registrar of Record identified in this output for information on how to contact the Registrant, Admin, or Tech contact of the queried domain name. +Name Server: ns3.p34.dynect.net +Name Server: ns4.p34.dynect.net +Name Server: d01-01.ns.twtrdns.net +Name Server: d01-02.ns.twtrdns.net +Name Server: a.r06.twtrdns.net +Name Server: b.r06.twtrdns.net +Name Server: c.r06.twtrdns.net +Name Server: d.r06.twtrdns.net +DNSSEC: unsigned +URL of the ICANN Whois Inaccuracy Complaint Form: https://www.icann.org/wicf/ +>>> Last update of WHOIS database: 2021-11-21T10:15:42Z <<< ->>>> Whois database was last updated on: Tue Feb 18 20:39:30 GMT 2014 <<<< -.CO Internet, S.A.S., the Administrator for .CO, has collected this -information for the WHOIS database through Accredited Registrars. -This information is provided to you for informational purposes only -and is designed to assist persons in determining contents of a domain -name registration record in the .CO Internet registry database. .CO -Internet makes this information available to you "as is" and does not -guarantee its accuracy. - -By submitting a WHOIS query, you agree that you will use this data -only for lawful purposes and that, under no circumstances will you -use this data: (1) to allow, enable, or otherwise support the transmission -of mass unsolicited, commercial advertising or solicitations via direct -mail, electronic mail, or by telephone; (2) in contravention of any -applicable data and privacy protection laws; or (3) to enable high volume, -automated, electronic processes that apply to the registry (or its systems). -Compilation, repackaging, dissemination, or other use of the WHOIS -database in its entirety, or of a substantial portion thereof, is not allowed -without .CO Internet's prior written permission. .CO Internet reserves the -right to modify or change these conditions at any time without prior or -subsequent notification of any kind. By executing this query, in any manner -whatsoever, you agree to abide by these terms. In some limited cases, -domains that might appear as available in whois might not actually be -available as they could be already registered and the whois not yet updated -and/or they could be part of the Restricted list. In this cases, performing a -check through your Registrar's (EPP check) will give you the actual status -of the domain. Additionally, domains currently or previously used as -extensions in 3rd level domains will not be available for registration in the -2nd level. For example, org.co,mil.co,edu.co,com.co,net.co,nom.co,arts.co, -firm.co,info.co,int.co,web.co,rec.co,co.co. - -NOTE: FAILURE TO LOCATE A RECORD IN THE WHOIS DATABASE IS NOT -INDICATIVE OF THE AVAILABILITY OF A DOMAIN NAME. - -All domain names are subject to certain additional domain name registration -rules. For details, please visit our site at www.cointernet.co . +For more information on Whois status codes, please visit https://icann.org/epp + +The above WHOIS results have been redacted to remove potential personal data. The full WHOIS output may be available to individuals and organisations with a legitimate interest in accessing this data not outweighed by the fundamental privacy rights of the data subject. To find out more, or to make a request for access, please visit: RDDSrequest.nic.co. + +.CO Internet, S.A.S., the Administrator for .CO, has collected this information for the WHOIS database through Accredited Registrars. This information is provided to you for informational purposes only and is designed to assist persons in determining contents of a domain name registration record in the .CO Internet registry database. .CO Internet makes this information available to you "as is" and does not guarantee its accuracy. + +By submitting a WHOIS query, you agree that you will use this data only for lawful purposes and that, under no circumstances will you use this data: (1) to allow, enable, or otherwise support the transmission of mass unsolicited, commercial advertising or solicitations via direct mail, electronic mail, or by telephone; (2) in contravention of any applicable data and privacy protection laws; or (3) to enable high volume, automated, electronic processes that apply to the registry (or its systems). Compilation, repackaging, dissemination, or other use of the WHOIS database in its entirety, or of a substantial portion thereof, is not allowed without .CO Internet's prior written permission. .CO Internet reserves the right to modify or change these conditions at any time without prior or subsequent notification of any kind. By executing this query, in any manner whatsoever, you agree to abide by these terms. In some limited cases, domains that might appear as available in whois might not actually be available as they could be already registered and the whois not yet updated and/or they could be part of the Restricted list. In this cases, performing a check through your Registrar's (EPP check) will give you the actual status of the domain. Additionally, domains currently or previously used as extensions in 3rd level domains will not be available for registration in the 2nd level. For example, org.co, mil.co, edu.co, com.co, net.co, nom.co, arts.co, firm.co, info.co, int.co, web.co, rec.co, co.co. + +NOTE: FAILURE TO LOCATE A RECORD IN THE WHOIS DATABASE IS NOT INDICATIVE OF THE AVAILABILITY OF A DOMAIN NAME. All domain names are subject to certain additional domain name registration rules. For details, please visit our site at www.cointernet.co . diff --git a/spec/whois/parsers/responses/whois.nic.co/co/status_available_spec.rb b/spec/whois/parsers/responses/whois.nic.co/co/status_available_spec.rb index 30f092de..2e81d1a4 100644 --- a/spec/whois/parsers/responses/whois.nic.co/co/status_available_spec.rb +++ b/spec/whois/parsers/responses/whois.nic.co/co/status_available_spec.rb @@ -23,7 +23,7 @@ describe "#domain" do it do - expect(subject.domain).to eq("u34jedzcq.co") + expect(subject.domain).to eq(nil) end end describe "#domain_id" do @@ -33,7 +33,7 @@ end describe "#status" do it do - expect(subject.status).to eq(nil) + expect(subject.status).to eq(:available) end end describe "#available?" do diff --git a/spec/whois/parsers/responses/whois.nic.co/co/status_registered_spec.rb b/spec/whois/parsers/responses/whois.nic.co/co/status_registered_spec.rb index bac8c78c..bced7e70 100644 --- a/spec/whois/parsers/responses/whois.nic.co/co/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.nic.co/co/status_registered_spec.rb @@ -33,7 +33,7 @@ end describe "#status" do it do - expect(subject.status).to eq(["clientTransferProhibited"]) + expect(subject.status).to eq(:registered) end end describe "#available?" do @@ -55,20 +55,20 @@ describe "#updated_on" do it do expect(subject.updated_on).to be_a(Time) - expect(subject.updated_on).to eq(DateTime.parse("2013-10-14 13:03:24 GMT")) + expect(subject.updated_on).to eq(DateTime.parse("2021-04-26 05:09:40 GMT")) end end describe "#expires_on" do it do expect(subject.expires_on).to be_a(Time) - expect(subject.expires_on).to eq(DateTime.parse("2016-04-25 23:59:59 GMT")) + expect(subject.expires_on).to eq(DateTime.parse("2022-04-25 23:59:59 GMT")) end end describe "#registrar" do it do expect(subject.registrar).to be_a(Whois::Parser::Registrar) expect(subject.registrar.id).to eq("299") - expect(subject.registrar.name).to eq("CSC CORPORATE DOMAINS") + expect(subject.registrar.name).to eq("CSC Corporate Domains, Inc.") end end describe "#registrant_contacts" do @@ -77,18 +77,17 @@ expect(subject.registrant_contacts.size).to eq(1) expect(subject.registrant_contacts[0]).to be_a(Whois::Parser::Contact) expect(subject.registrant_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_REGISTRANT) - expect(subject.registrant_contacts[0].id).to eq("365684910586C791") - expect(subject.registrant_contacts[0].name).to eq("Twitter, Inc.") + expect(subject.registrant_contacts[0].id).to eq("REDACTED FOR PRIVACY") + expect(subject.registrant_contacts[0].name).to eq("REDACTED FOR PRIVACY") expect(subject.registrant_contacts[0].organization).to eq("Twitter, Inc.") - expect(subject.registrant_contacts[0].address).to eq("1355 Market Street\nSuite 900") - expect(subject.registrant_contacts[0].city).to eq("San Francisco") - expect(subject.registrant_contacts[0].zip).to eq("94103") + expect(subject.registrant_contacts[0].address).to eq("REDACTED FOR PRIVACY, REDACTED FOR PRIVACY, REDACTED FOR PRIVACY") + expect(subject.registrant_contacts[0].city).to eq("REDACTED FOR PRIVACY") + expect(subject.registrant_contacts[0].zip).to eq("REDACTED FOR PRIVACY") expect(subject.registrant_contacts[0].state).to eq("CA") - expect(subject.registrant_contacts[0].country).to eq("United States") expect(subject.registrant_contacts[0].country_code).to eq("US") - expect(subject.registrant_contacts[0].phone).to eq("+1.4152229670") - expect(subject.registrant_contacts[0].fax).to eq("+1.4152220922") - expect(subject.registrant_contacts[0].email).to eq("domains@twitter.com") + expect(subject.registrant_contacts[0].phone).to eq("REDACTED FOR PRIVACY ext: REDACTED FOR PRIVACY") + expect(subject.registrant_contacts[0].fax).to eq("REDACTED FOR PRIVACY ext: REDACTED FOR PRIVACY") + expect(subject.registrant_contacts[0].email).to eq("Please query the RDDS service of the Registrar of Record identified in this output for information on how to contact the Registrant, Admin, or Tech contact of the queried domain name.") end end describe "#admin_contacts" do @@ -97,18 +96,17 @@ expect(subject.admin_contacts.size).to eq(1) expect(subject.admin_contacts[0]).to be_a(Whois::Parser::Contact) expect(subject.admin_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_ADMINISTRATIVE) - expect(subject.admin_contacts[0].id).to eq("868543810568A633") - expect(subject.admin_contacts[0].name).to eq("Domain Admin") - expect(subject.admin_contacts[0].organization).to eq("Twitter, Inc.") - expect(subject.admin_contacts[0].address).to eq("1355 Market Street\nSuite 900") - expect(subject.admin_contacts[0].city).to eq("San Francisco") - expect(subject.admin_contacts[0].zip).to eq("94103") - expect(subject.admin_contacts[0].state).to eq("California") - expect(subject.admin_contacts[0].country).to eq("United States") - expect(subject.admin_contacts[0].country_code).to eq("US") - expect(subject.admin_contacts[0].phone).to eq("+1.4152229670") - expect(subject.admin_contacts[0].fax).to eq("+1.4152220922") - expect(subject.admin_contacts[0].email).to eq("domains@twitter.com") + expect(subject.admin_contacts[0].id).to eq("REDACTED FOR PRIVACY") + expect(subject.admin_contacts[0].name).to eq("REDACTED FOR PRIVACY") + expect(subject.admin_contacts[0].organization).to eq("REDACTED FOR PRIVACY") + expect(subject.admin_contacts[0].address).to eq("REDACTED FOR PRIVACY, REDACTED FOR PRIVACY, REDACTED FOR PRIVACY") + expect(subject.admin_contacts[0].city).to eq("REDACTED FOR PRIVACY") + expect(subject.admin_contacts[0].zip).to eq("REDACTED FOR PRIVACY") + expect(subject.admin_contacts[0].state).to eq("REDACTED FOR PRIVACY") + expect(subject.admin_contacts[0].country_code).to eq("REDACTED FOR PRIVACY") + expect(subject.admin_contacts[0].phone).to eq("REDACTED FOR PRIVACY ext: REDACTED FOR PRIVACY") + expect(subject.admin_contacts[0].fax).to eq("REDACTED FOR PRIVACY ext: REDACTED FOR PRIVACY") + expect(subject.admin_contacts[0].email).to eq("Please query the RDDS service of the Registrar of Record identified in this output for information on how to contact the Registrant, Admin, or Tech contact of the queried domain name.") end end describe "#technical_contacts" do @@ -117,32 +115,39 @@ expect(subject.technical_contacts.size).to eq(1) expect(subject.technical_contacts[0]).to be_a(Whois::Parser::Contact) expect(subject.technical_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_TECHNICAL) - expect(subject.technical_contacts[0].id).to eq("42101611057C7478") - expect(subject.technical_contacts[0].name).to eq("Tech Admin") - expect(subject.technical_contacts[0].organization).to eq("Twitter, Inc.") - expect(subject.technical_contacts[0].address).to eq("1355 Market Street\nSuite 900") - expect(subject.technical_contacts[0].city).to eq("San Francisco") - expect(subject.technical_contacts[0].zip).to eq("94103") - expect(subject.technical_contacts[0].state).to eq("California") - expect(subject.technical_contacts[0].country).to eq("United States") - expect(subject.technical_contacts[0].country_code).to eq("US") - expect(subject.technical_contacts[0].phone).to eq("+1.4152229670") - expect(subject.technical_contacts[0].fax).to eq("+1.4152220922") - expect(subject.technical_contacts[0].email).to eq("domains-tech@twitter.com") + expect(subject.technical_contacts[0].id).to eq("REDACTED FOR PRIVACY") + expect(subject.technical_contacts[0].name).to eq("REDACTED FOR PRIVACY") + expect(subject.technical_contacts[0].organization).to eq("REDACTED FOR PRIVACY") + expect(subject.technical_contacts[0].address).to eq("REDACTED FOR PRIVACY, REDACTED FOR PRIVACY, REDACTED FOR PRIVACY") + expect(subject.technical_contacts[0].city).to eq("REDACTED FOR PRIVACY") + expect(subject.technical_contacts[0].zip).to eq("REDACTED FOR PRIVACY") + expect(subject.technical_contacts[0].state).to eq("REDACTED FOR PRIVACY") + expect(subject.technical_contacts[0].country_code).to eq("REDACTED FOR PRIVACY") + expect(subject.technical_contacts[0].phone).to eq("REDACTED FOR PRIVACY ext: REDACTED FOR PRIVACY") + expect(subject.technical_contacts[0].fax).to eq("REDACTED FOR PRIVACY ext: REDACTED FOR PRIVACY") + expect(subject.technical_contacts[0].email).to eq("Please query the RDDS service of the Registrar of Record identified in this output for information on how to contact the Registrant, Admin, or Tech contact of the queried domain name.") end end describe "#nameservers" do it do expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers.size).to eq(4) + expect(subject.nameservers.size).to eq(8) expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[0].name).to eq("ns1.p34.dynect.net") + expect(subject.nameservers[0].name).to eq("ns3.p34.dynect.net") expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[1].name).to eq("ns2.p34.dynect.net") + expect(subject.nameservers[1].name).to eq("ns4.p34.dynect.net") expect(subject.nameservers[2]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[2].name).to eq("ns3.p34.dynect.net") + expect(subject.nameservers[2].name).to eq("d01-01.ns.twtrdns.net") expect(subject.nameservers[3]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[3].name).to eq("ns4.p34.dynect.net") + expect(subject.nameservers[3].name).to eq("d01-02.ns.twtrdns.net") + expect(subject.nameservers[4]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[4].name).to eq("a.r06.twtrdns.net") + expect(subject.nameservers[5]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[5].name).to eq("b.r06.twtrdns.net") + expect(subject.nameservers[6]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[6].name).to eq("c.r06.twtrdns.net") + expect(subject.nameservers[7]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[7].name).to eq("d.r06.twtrdns.net") end end end From cbdfb219065e37fcbdd990857e3cb5d311e6e31c Mon Sep 17 00:00:00 2001 From: Adrien Rey-Jarthon Date: Sun, 21 Nov 2021 12:29:12 +0100 Subject: [PATCH 09/29] Added parser for .CLOUD tld --- CHANGELOG.md | 1 + lib/whois/parsers/whois.nic.cloud.rb | 25 +++ .../cloud/status_available.expected | 46 ++++++ .../cloud/status_available.txt | 26 ++++ .../cloud/status_registered.expected | 99 ++++++++++++ .../cloud/status_registered.txt | 89 +++++++++++ .../cloud/status_available_spec.rb | 93 +++++++++++ .../cloud/status_registered_spec.rb | 146 ++++++++++++++++++ 8 files changed, 525 insertions(+) create mode 100644 lib/whois/parsers/whois.nic.cloud.rb create mode 100644 spec/fixtures/responses/whois.nic.cloud/cloud/status_available.expected create mode 100644 spec/fixtures/responses/whois.nic.cloud/cloud/status_available.txt create mode 100644 spec/fixtures/responses/whois.nic.cloud/cloud/status_registered.expected create mode 100644 spec/fixtures/responses/whois.nic.cloud/cloud/status_registered.txt create mode 100644 spec/whois/parsers/responses/whois.nic.cloud/cloud/status_available_spec.rb create mode 100644 spec/whois/parsers/responses/whois.nic.cloud/cloud/status_registered_spec.rb diff --git a/CHANGELOG.md b/CHANGELOG.md index 631cfd25..f1f6d0d3 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,7 @@ This project uses [Semantic Versioning 2.0.0](http://semver.org/). #### master +- NEW: Added parser for .CLOUD tld - FIX: Updated parser for .CO tld - FIX: Updated parser for .FI tld (based on #133) Thanks @elguitar - FIX: Fix throttled response detection for .CO.UK, .ME, .INFO, .MOBI (and most other Afilias based) diff --git a/lib/whois/parsers/whois.nic.cloud.rb b/lib/whois/parsers/whois.nic.cloud.rb new file mode 100644 index 00000000..1fceb33d --- /dev/null +++ b/lib/whois/parsers/whois.nic.cloud.rb @@ -0,0 +1,25 @@ +#-- +# Ruby Whois +# +# An intelligent pure Ruby WHOIS client and parser. +# +# Copyright (c) 2009-2018 Simone Carletti +#++ + + +require_relative 'base_icann_compliant' + + +module Whois + class Parsers + + # Parser for the whois.nic.cloud server. + # + # @see Whois::Parsers::Example + # The Example parser for the list of all available methods. + # + class WhoisNicCloud < BaseIcannCompliant + end + + end +end diff --git a/spec/fixtures/responses/whois.nic.cloud/cloud/status_available.expected b/spec/fixtures/responses/whois.nic.cloud/cloud/status_available.expected new file mode 100644 index 00000000..9f23516a --- /dev/null +++ b/spec/fixtures/responses/whois.nic.cloud/cloud/status_available.expected @@ -0,0 +1,46 @@ +#domain + %s == nil + +#domain_id + %s == nil + + +#status + %s == :available + +#available? + %s == true + +#registered? + %s == false + + +#created_on + %s == nil + +#updated_on + %s == nil + +#expires_on + %s == nil + + +#registrar + %s == nil + +#registrant_contacts + %s %CLASS{array} + %s == [] + +#admin_contacts + %s %CLASS{array} + %s == [] + +#technical_contacts + %s %CLASS{array} + %s == [] + + +#nameservers + %s %CLASS{array} + %s == [] diff --git a/spec/fixtures/responses/whois.nic.cloud/cloud/status_available.txt b/spec/fixtures/responses/whois.nic.cloud/cloud/status_available.txt new file mode 100644 index 00000000..5cb43c43 --- /dev/null +++ b/spec/fixtures/responses/whois.nic.cloud/cloud/status_available.txt @@ -0,0 +1,26 @@ +No Data Found +URL of the ICANN Whois Inaccuracy Complaint Form: https://www.icann.org/wicf/ +>>> Last update of WHOIS database: 2021-11-21T11:19:42Z <<< + +For more information on Whois status codes, please visit https://icann.org/epp + +The Service is provided so that you may look up certain information in relation to domain names that we store in our database. + +Use of the Service is subject to our policies, in particular you should familiarise yourself with our Acceptable Use Policy and our Privacy Policy. + +The information provided by this Service is 'as is' and we make no guarantee of it its accuracy. + +You agree that by your use of the Service you will not use the information provided by us in a way which is: +* inconsistent with any applicable laws, +* inconsistent with any policy issued by us, +* to generate, distribute, or facilitate unsolicited mass email, promotions, advertisings or other solicitations, or +* to enable high volume, automated, electronic processes that apply to the Service. + +You acknowledge that: +* a response from the Service that a domain name is 'available', does not guarantee that is able to be registered, +* we may restrict, suspend or terminate your access to the Service at any time, and +* the copying, compilation, repackaging, dissemination or other use of the information provided by the Service is not permitted, without our express written consent. + +This information has been prepared and published in order to represent administrative and technical management of the TLD. + +We may discontinue or amend any part or the whole of these Terms of Service from time to time at our absolute discretion. diff --git a/spec/fixtures/responses/whois.nic.cloud/cloud/status_registered.expected b/spec/fixtures/responses/whois.nic.cloud/cloud/status_registered.expected new file mode 100644 index 00000000..ff58d283 --- /dev/null +++ b/spec/fixtures/responses/whois.nic.cloud/cloud/status_registered.expected @@ -0,0 +1,99 @@ +#domain + %s == "google.cloud" + +#domain_id + %s == "DDDAA72F4F319486082E1B91922F2483D-ARI" + + +#status + %s == :registered + +#available? + %s == false + +#registered? + %s == true + + +#created_on + %s %CLASS{time} + %s %TIME{2016-01-27 01:19:35 GMT} + +#updated_on + %s %CLASS{time} + %s %TIME{2020-12-31 10:38:20 GMT} + +#expires_on + %s %CLASS{time} + %s %TIME{2022-01-27 01:19:35 GMT} + + +#registrar + %s %CLASS{registrar} + %s.id == "292" + %s.name == "MarkMonitor, Inc." + %s.url == "www.markmonitor.com" + +#registrant_contacts + %s %CLASS{array} + %s %SIZE{1} + %s[0] %CLASS{contact} + %s[0].type == Whois::Parser::Contact::TYPE_REGISTRANT + %s[0].id == "REDACTED FOR PRIVACY" + %s[0].name == "REDACTED FOR PRIVACY" + %s[0].organization == "Google LLC" + %s[0].address == "REDACTED FOR PRIVACY, REDACTED FOR PRIVACY, REDACTED FOR PRIVACY" + %s[0].city == "REDACTED FOR PRIVACY" + %s[0].zip == "REDACTED FOR PRIVACY" + %s[0].state == "CA" + %s[0].country_code == "US" + %s[0].phone == "REDACTED FOR PRIVACY ext: REDACTED FOR PRIVACY" + %s[0].fax == "REDACTED FOR PRIVACY ext: REDACTED FOR PRIVACY" + %s[0].email == "Please query the RDDS service of the Registrar of Record identified in this output for information on how to contact the Registrant, Admin, or Tech contact of the queried domain name." + +#admin_contacts + %s %CLASS{array} + %s %SIZE{1} + %s[0] %CLASS{contact} + %s[0].type == Whois::Parser::Contact::TYPE_ADMINISTRATIVE + %s[0].id == "REDACTED FOR PRIVACY" + %s[0].name == "REDACTED FOR PRIVACY" + %s[0].organization == "REDACTED FOR PRIVACY" + %s[0].address == "REDACTED FOR PRIVACY, REDACTED FOR PRIVACY, REDACTED FOR PRIVACY" + %s[0].city == "REDACTED FOR PRIVACY" + %s[0].zip == "REDACTED FOR PRIVACY" + %s[0].state == "REDACTED FOR PRIVACY" + %s[0].country_code == "REDACTED FOR PRIVACY" + %s[0].phone == "REDACTED FOR PRIVACY ext: REDACTED FOR PRIVACY" + %s[0].fax == "REDACTED FOR PRIVACY ext: REDACTED FOR PRIVACY" + %s[0].email == "Please query the RDDS service of the Registrar of Record identified in this output for information on how to contact the Registrant, Admin, or Tech contact of the queried domain name." + +#technical_contacts + %s %CLASS{array} + %s %SIZE{1} + %s[0] %CLASS{contact} + %s[0].type == Whois::Parser::Contact::TYPE_TECHNICAL + %s[0].id == "REDACTED FOR PRIVACY" + %s[0].name == "REDACTED FOR PRIVACY" + %s[0].organization == "REDACTED FOR PRIVACY" + %s[0].address == "REDACTED FOR PRIVACY, REDACTED FOR PRIVACY, REDACTED FOR PRIVACY" + %s[0].city == "REDACTED FOR PRIVACY" + %s[0].zip == "REDACTED FOR PRIVACY" + %s[0].state == "REDACTED FOR PRIVACY" + %s[0].country_code == "REDACTED FOR PRIVACY" + %s[0].phone == "REDACTED FOR PRIVACY ext: REDACTED FOR PRIVACY" + %s[0].fax == "REDACTED FOR PRIVACY ext: REDACTED FOR PRIVACY" + %s[0].email == "Please query the RDDS service of the Registrar of Record identified in this output for information on how to contact the Registrant, Admin, or Tech contact of the queried domain name." + + +#nameservers + %s %CLASS{array} + %s %SIZE{4} + %s[0] %CLASS{nameserver} + %s[0].name == "ns1.google.com" + %s[1] %CLASS{nameserver} + %s[1].name == "ns2.google.com" + %s[2] %CLASS{nameserver} + %s[2].name == "ns3.google.com" + %s[3] %CLASS{nameserver} + %s[3].name == "ns4.google.com" diff --git a/spec/fixtures/responses/whois.nic.cloud/cloud/status_registered.txt b/spec/fixtures/responses/whois.nic.cloud/cloud/status_registered.txt new file mode 100644 index 00000000..401fb68f --- /dev/null +++ b/spec/fixtures/responses/whois.nic.cloud/cloud/status_registered.txt @@ -0,0 +1,89 @@ +Domain Name: google.cloud +Registry Domain ID: DDDAA72F4F319486082E1B91922F2483D-ARI +Registrar WHOIS Server: whois.markmonitor.com +Registrar URL: www.markmonitor.com +Updated Date: 2020-12-31T10:38:20Z +Creation Date: 2016-01-27T01:19:35Z +Registry Expiry Date: 2022-01-27T01:19:35Z +Registrar: MarkMonitor, Inc. +Registrar IANA ID: 292 +Registrar Abuse Contact Email: abusecomplaints@markmonitor.com +Registrar Abuse Contact Phone: +1.2083895740 +Domain Status: clientTransferProhibited https://icann.org/epp#clientTransferProhibited +Domain Status: clientUpdateProhibited https://icann.org/epp#clientUpdateProhibited +Domain Status: clientDeleteProhibited https://icann.org/epp#clientDeleteProhibited +Registry Registrant ID: REDACTED FOR PRIVACY +Registrant Name: REDACTED FOR PRIVACY +Registrant Organization: Google LLC +Registrant Street: REDACTED FOR PRIVACY +Registrant Street: REDACTED FOR PRIVACY +Registrant Street: REDACTED FOR PRIVACY +Registrant City: REDACTED FOR PRIVACY +Registrant State/Province: CA +Registrant Postal Code: REDACTED FOR PRIVACY +Registrant Country: US +Registrant Phone: REDACTED FOR PRIVACY +Registrant Phone Ext: REDACTED FOR PRIVACY +Registrant Fax: REDACTED FOR PRIVACY +Registrant Fax Ext: REDACTED FOR PRIVACY +Registrant Email: Please query the RDDS service of the Registrar of Record identified in this output for information on how to contact the Registrant, Admin, or Tech contact of the queried domain name. +Registry Admin ID: REDACTED FOR PRIVACY +Admin Name: REDACTED FOR PRIVACY +Admin Organization: REDACTED FOR PRIVACY +Admin Street: REDACTED FOR PRIVACY +Admin Street: REDACTED FOR PRIVACY +Admin Street: REDACTED FOR PRIVACY +Admin City: REDACTED FOR PRIVACY +Admin State/Province: REDACTED FOR PRIVACY +Admin Postal Code: REDACTED FOR PRIVACY +Admin Country: REDACTED FOR PRIVACY +Admin Phone: REDACTED FOR PRIVACY +Admin Phone Ext: REDACTED FOR PRIVACY +Admin Fax: REDACTED FOR PRIVACY +Admin Fax Ext: REDACTED FOR PRIVACY +Admin Email: Please query the RDDS service of the Registrar of Record identified in this output for information on how to contact the Registrant, Admin, or Tech contact of the queried domain name. +Registry Tech ID: REDACTED FOR PRIVACY +Tech Name: REDACTED FOR PRIVACY +Tech Organization: REDACTED FOR PRIVACY +Tech Street: REDACTED FOR PRIVACY +Tech Street: REDACTED FOR PRIVACY +Tech Street: REDACTED FOR PRIVACY +Tech City: REDACTED FOR PRIVACY +Tech State/Province: REDACTED FOR PRIVACY +Tech Postal Code: REDACTED FOR PRIVACY +Tech Country: REDACTED FOR PRIVACY +Tech Phone: REDACTED FOR PRIVACY +Tech Phone Ext: REDACTED FOR PRIVACY +Tech Fax: REDACTED FOR PRIVACY +Tech Fax Ext: REDACTED FOR PRIVACY +Tech Email: Please query the RDDS service of the Registrar of Record identified in this output for information on how to contact the Registrant, Admin, or Tech contact of the queried domain name. +Name Server: ns1.google.com +Name Server: ns2.google.com +Name Server: ns3.google.com +Name Server: ns4.google.com +DNSSEC: unsigned +URL of the ICANN Whois Inaccuracy Complaint Form: https://www.icann.org/wicf/ +>>> Last update of WHOIS database: 2021-11-21T11:19:46Z <<< + +For more information on Whois status codes, please visit https://icann.org/epp + +The Service is provided so that you may look up certain information in relation to domain names that we store in our database. + +Use of the Service is subject to our policies, in particular you should familiarise yourself with our Acceptable Use Policy and our Privacy Policy. + +The information provided by this Service is 'as is' and we make no guarantee of it its accuracy. + +You agree that by your use of the Service you will not use the information provided by us in a way which is: +* inconsistent with any applicable laws, +* inconsistent with any policy issued by us, +* to generate, distribute, or facilitate unsolicited mass email, promotions, advertisings or other solicitations, or +* to enable high volume, automated, electronic processes that apply to the Service. + +You acknowledge that: +* a response from the Service that a domain name is 'available', does not guarantee that is able to be registered, +* we may restrict, suspend or terminate your access to the Service at any time, and +* the copying, compilation, repackaging, dissemination or other use of the information provided by the Service is not permitted, without our express written consent. + +This information has been prepared and published in order to represent administrative and technical management of the TLD. + +We may discontinue or amend any part or the whole of these Terms of Service from time to time at our absolute discretion. diff --git a/spec/whois/parsers/responses/whois.nic.cloud/cloud/status_available_spec.rb b/spec/whois/parsers/responses/whois.nic.cloud/cloud/status_available_spec.rb new file mode 100644 index 00000000..1bfe126f --- /dev/null +++ b/spec/whois/parsers/responses/whois.nic.cloud/cloud/status_available_spec.rb @@ -0,0 +1,93 @@ +# encoding: utf-8 + +# This file is autogenerated. Do not edit it manually. +# If you want change the content of this file, edit +# +# /spec/fixtures/responses/whois.nic.cloud/cloud/status_available.expected +# +# and regenerate the tests with the following rake task +# +# $ rake spec:generate +# + +require 'spec_helper' +require 'whois/parsers/whois.nic.cloud.rb' + +describe Whois::Parsers::WhoisNicCloud, "status_available.expected" do + + subject do + file = fixture("responses", "whois.nic.cloud/cloud/status_available.txt") + part = Whois::Record::Part.new(body: File.read(file)) + described_class.new(part) + end + + describe "#domain" do + it do + expect(subject.domain).to eq(nil) + end + end + describe "#domain_id" do + it do + expect(subject.domain_id).to eq(nil) + end + end + describe "#status" do + it do + expect(subject.status).to eq(:available) + end + end + describe "#available?" do + it do + expect(subject.available?).to eq(true) + end + end + describe "#registered?" do + it do + expect(subject.registered?).to eq(false) + end + end + describe "#created_on" do + it do + expect(subject.created_on).to eq(nil) + end + end + describe "#updated_on" do + it do + expect(subject.updated_on).to eq(nil) + end + end + describe "#expires_on" do + it do + expect(subject.expires_on).to eq(nil) + end + end + describe "#registrar" do + it do + expect(subject.registrar).to eq(nil) + end + end + describe "#registrant_contacts" do + it do + expect(subject.registrant_contacts).to be_a(Array) + expect(subject.registrant_contacts).to eq([]) + end + end + describe "#admin_contacts" do + it do + expect(subject.admin_contacts).to be_a(Array) + expect(subject.admin_contacts).to eq([]) + end + end + describe "#technical_contacts" do + it do + expect(subject.technical_contacts).to be_a(Array) + expect(subject.technical_contacts).to eq([]) + end + end + describe "#nameservers" do + it do + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers).to eq([]) + end + end +end diff --git a/spec/whois/parsers/responses/whois.nic.cloud/cloud/status_registered_spec.rb b/spec/whois/parsers/responses/whois.nic.cloud/cloud/status_registered_spec.rb new file mode 100644 index 00000000..b7f2c7f5 --- /dev/null +++ b/spec/whois/parsers/responses/whois.nic.cloud/cloud/status_registered_spec.rb @@ -0,0 +1,146 @@ +# encoding: utf-8 + +# This file is autogenerated. Do not edit it manually. +# If you want change the content of this file, edit +# +# /spec/fixtures/responses/whois.nic.cloud/cloud/status_registered.expected +# +# and regenerate the tests with the following rake task +# +# $ rake spec:generate +# + +require 'spec_helper' +require 'whois/parsers/whois.nic.cloud.rb' + +describe Whois::Parsers::WhoisNicCloud, "status_registered.expected" do + + subject do + file = fixture("responses", "whois.nic.cloud/cloud/status_registered.txt") + part = Whois::Record::Part.new(body: File.read(file)) + described_class.new(part) + end + + describe "#domain" do + it do + expect(subject.domain).to eq("google.cloud") + end + end + describe "#domain_id" do + it do + expect(subject.domain_id).to eq("DDDAA72F4F319486082E1B91922F2483D-ARI") + end + end + describe "#status" do + it do + expect(subject.status).to eq(:registered) + end + end + describe "#available?" do + it do + expect(subject.available?).to eq(false) + end + end + describe "#registered?" do + it do + expect(subject.registered?).to eq(true) + end + end + describe "#created_on" do + it do + expect(subject.created_on).to be_a(Time) + expect(subject.created_on).to eq(DateTime.parse("2016-01-27 01:19:35 GMT")) + end + end + describe "#updated_on" do + it do + expect(subject.updated_on).to be_a(Time) + expect(subject.updated_on).to eq(DateTime.parse("2020-12-31 10:38:20 GMT")) + end + end + describe "#expires_on" do + it do + expect(subject.expires_on).to be_a(Time) + expect(subject.expires_on).to eq(DateTime.parse("2022-01-27 01:19:35 GMT")) + end + end + describe "#registrar" do + it do + expect(subject.registrar).to be_a(Whois::Parser::Registrar) + expect(subject.registrar.id).to eq("292") + expect(subject.registrar.name).to eq("MarkMonitor, Inc.") + expect(subject.registrar.url).to eq("www.markmonitor.com") + end + end + describe "#registrant_contacts" do + it do + expect(subject.registrant_contacts).to be_a(Array) + expect(subject.registrant_contacts.size).to eq(1) + expect(subject.registrant_contacts[0]).to be_a(Whois::Parser::Contact) + expect(subject.registrant_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_REGISTRANT) + expect(subject.registrant_contacts[0].id).to eq("REDACTED FOR PRIVACY") + expect(subject.registrant_contacts[0].name).to eq("REDACTED FOR PRIVACY") + expect(subject.registrant_contacts[0].organization).to eq("Google LLC") + expect(subject.registrant_contacts[0].address).to eq("REDACTED FOR PRIVACY, REDACTED FOR PRIVACY, REDACTED FOR PRIVACY") + expect(subject.registrant_contacts[0].city).to eq("REDACTED FOR PRIVACY") + expect(subject.registrant_contacts[0].zip).to eq("REDACTED FOR PRIVACY") + expect(subject.registrant_contacts[0].state).to eq("CA") + expect(subject.registrant_contacts[0].country_code).to eq("US") + expect(subject.registrant_contacts[0].phone).to eq("REDACTED FOR PRIVACY ext: REDACTED FOR PRIVACY") + expect(subject.registrant_contacts[0].fax).to eq("REDACTED FOR PRIVACY ext: REDACTED FOR PRIVACY") + expect(subject.registrant_contacts[0].email).to eq("Please query the RDDS service of the Registrar of Record identified in this output for information on how to contact the Registrant, Admin, or Tech contact of the queried domain name.") + end + end + describe "#admin_contacts" do + it do + expect(subject.admin_contacts).to be_a(Array) + expect(subject.admin_contacts.size).to eq(1) + expect(subject.admin_contacts[0]).to be_a(Whois::Parser::Contact) + expect(subject.admin_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_ADMINISTRATIVE) + expect(subject.admin_contacts[0].id).to eq("REDACTED FOR PRIVACY") + expect(subject.admin_contacts[0].name).to eq("REDACTED FOR PRIVACY") + expect(subject.admin_contacts[0].organization).to eq("REDACTED FOR PRIVACY") + expect(subject.admin_contacts[0].address).to eq("REDACTED FOR PRIVACY, REDACTED FOR PRIVACY, REDACTED FOR PRIVACY") + expect(subject.admin_contacts[0].city).to eq("REDACTED FOR PRIVACY") + expect(subject.admin_contacts[0].zip).to eq("REDACTED FOR PRIVACY") + expect(subject.admin_contacts[0].state).to eq("REDACTED FOR PRIVACY") + expect(subject.admin_contacts[0].country_code).to eq("REDACTED FOR PRIVACY") + expect(subject.admin_contacts[0].phone).to eq("REDACTED FOR PRIVACY ext: REDACTED FOR PRIVACY") + expect(subject.admin_contacts[0].fax).to eq("REDACTED FOR PRIVACY ext: REDACTED FOR PRIVACY") + expect(subject.admin_contacts[0].email).to eq("Please query the RDDS service of the Registrar of Record identified in this output for information on how to contact the Registrant, Admin, or Tech contact of the queried domain name.") + end + end + describe "#technical_contacts" do + it do + expect(subject.technical_contacts).to be_a(Array) + expect(subject.technical_contacts.size).to eq(1) + expect(subject.technical_contacts[0]).to be_a(Whois::Parser::Contact) + expect(subject.technical_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_TECHNICAL) + expect(subject.technical_contacts[0].id).to eq("REDACTED FOR PRIVACY") + expect(subject.technical_contacts[0].name).to eq("REDACTED FOR PRIVACY") + expect(subject.technical_contacts[0].organization).to eq("REDACTED FOR PRIVACY") + expect(subject.technical_contacts[0].address).to eq("REDACTED FOR PRIVACY, REDACTED FOR PRIVACY, REDACTED FOR PRIVACY") + expect(subject.technical_contacts[0].city).to eq("REDACTED FOR PRIVACY") + expect(subject.technical_contacts[0].zip).to eq("REDACTED FOR PRIVACY") + expect(subject.technical_contacts[0].state).to eq("REDACTED FOR PRIVACY") + expect(subject.technical_contacts[0].country_code).to eq("REDACTED FOR PRIVACY") + expect(subject.technical_contacts[0].phone).to eq("REDACTED FOR PRIVACY ext: REDACTED FOR PRIVACY") + expect(subject.technical_contacts[0].fax).to eq("REDACTED FOR PRIVACY ext: REDACTED FOR PRIVACY") + expect(subject.technical_contacts[0].email).to eq("Please query the RDDS service of the Registrar of Record identified in this output for information on how to contact the Registrant, Admin, or Tech contact of the queried domain name.") + end + end + describe "#nameservers" do + it do + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers.size).to eq(4) + expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[0].name).to eq("ns1.google.com") + expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[1].name).to eq("ns2.google.com") + expect(subject.nameservers[2]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[2].name).to eq("ns3.google.com") + expect(subject.nameservers[3]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[3].name).to eq("ns4.google.com") + end + end +end From 5c9737182ea481f89820938bd8ea58001dd08753 Mon Sep 17 00:00:00 2001 From: Derek Cordeiro Date: Sat, 29 Jun 2019 03:10:47 +0530 Subject: [PATCH 10/29] Add whois.nic.google MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Add support for .app, .dev, .how, .page, .soy * Update xn--q9jyb4c (.みんな) to use whois.nic.google --- CHANGELOG.md | 1 + Rakefile | 2 +- lib/whois/parsers/whois.nic.google.rb | 12 +++ .../app/status_available.expected | 46 +++++++++ .../whois.nic.google/app/status_available.txt | 22 +++++ .../app/status_registered.expected | 52 ++++++++++ .../app/status_registered.txt | 87 ++++++++++++++++ .../dev/status_available.expected | 46 +++++++++ .../whois.nic.google/dev/status_available.txt | 22 +++++ .../dev/status_registered.expected | 52 ++++++++++ .../dev/status_registered.txt | 78 +++++++++++++++ .../how/status_available.expected | 46 +++++++++ .../whois.nic.google/how/status_available.txt | 22 +++++ .../how/status_registered.expected | 52 ++++++++++ .../how/status_registered.txt | 87 ++++++++++++++++ .../page/status_available.expected | 46 +++++++++ .../page/status_available.txt | 22 +++++ .../page/status_registered.expected | 37 +++++++ .../page/status_registered.txt | 72 ++++++++++++++ .../soy/status_available.expected | 46 +++++++++ .../whois.nic.google/soy/status_available.txt | 22 +++++ .../soy/status_registered.expected | 52 ++++++++++ .../soy/status_registered.txt | 87 ++++++++++++++++ .../xn--q9jyb4c/status_available.expected | 46 +++++++++ .../xn--q9jyb4c/status_available.txt | 22 +++++ .../xn--q9jyb4c/status_registered.expected | 52 ++++++++++ .../xn--q9jyb4c/status_registered.txt | 76 ++++++++++++++ spec/tlds.yml | 34 ++++++- .../app/status_available_spec.rb | 93 ++++++++++++++++++ .../app/status_registered_spec.rb | 98 +++++++++++++++++++ .../dev/status_available_spec.rb | 93 ++++++++++++++++++ .../dev/status_registered_spec.rb | 98 +++++++++++++++++++ .../how/status_available_spec.rb | 93 ++++++++++++++++++ .../how/status_registered_spec.rb | 98 +++++++++++++++++++ .../page/status_available_spec.rb | 93 ++++++++++++++++++ .../page/status_registered_spec.rb | 78 +++++++++++++++ .../soy/status_available_spec.rb | 93 ++++++++++++++++++ .../soy/status_registered_spec.rb | 98 +++++++++++++++++++ .../xn--q9jyb4c/status_available_spec.rb | 93 ++++++++++++++++++ .../xn--q9jyb4c/status_registered_spec.rb | 98 +++++++++++++++++++ 40 files changed, 2365 insertions(+), 2 deletions(-) create mode 100644 lib/whois/parsers/whois.nic.google.rb create mode 100644 spec/fixtures/responses/whois.nic.google/app/status_available.expected create mode 100644 spec/fixtures/responses/whois.nic.google/app/status_available.txt create mode 100644 spec/fixtures/responses/whois.nic.google/app/status_registered.expected create mode 100644 spec/fixtures/responses/whois.nic.google/app/status_registered.txt create mode 100644 spec/fixtures/responses/whois.nic.google/dev/status_available.expected create mode 100644 spec/fixtures/responses/whois.nic.google/dev/status_available.txt create mode 100644 spec/fixtures/responses/whois.nic.google/dev/status_registered.expected create mode 100644 spec/fixtures/responses/whois.nic.google/dev/status_registered.txt create mode 100644 spec/fixtures/responses/whois.nic.google/how/status_available.expected create mode 100644 spec/fixtures/responses/whois.nic.google/how/status_available.txt create mode 100644 spec/fixtures/responses/whois.nic.google/how/status_registered.expected create mode 100644 spec/fixtures/responses/whois.nic.google/how/status_registered.txt create mode 100644 spec/fixtures/responses/whois.nic.google/page/status_available.expected create mode 100644 spec/fixtures/responses/whois.nic.google/page/status_available.txt create mode 100644 spec/fixtures/responses/whois.nic.google/page/status_registered.expected create mode 100644 spec/fixtures/responses/whois.nic.google/page/status_registered.txt create mode 100644 spec/fixtures/responses/whois.nic.google/soy/status_available.expected create mode 100644 spec/fixtures/responses/whois.nic.google/soy/status_available.txt create mode 100644 spec/fixtures/responses/whois.nic.google/soy/status_registered.expected create mode 100644 spec/fixtures/responses/whois.nic.google/soy/status_registered.txt create mode 100644 spec/fixtures/responses/whois.nic.google/xn--q9jyb4c/status_available.expected create mode 100644 spec/fixtures/responses/whois.nic.google/xn--q9jyb4c/status_available.txt create mode 100644 spec/fixtures/responses/whois.nic.google/xn--q9jyb4c/status_registered.expected create mode 100644 spec/fixtures/responses/whois.nic.google/xn--q9jyb4c/status_registered.txt create mode 100644 spec/whois/parsers/responses/whois.nic.google/app/status_available_spec.rb create mode 100644 spec/whois/parsers/responses/whois.nic.google/app/status_registered_spec.rb create mode 100644 spec/whois/parsers/responses/whois.nic.google/dev/status_available_spec.rb create mode 100644 spec/whois/parsers/responses/whois.nic.google/dev/status_registered_spec.rb create mode 100644 spec/whois/parsers/responses/whois.nic.google/how/status_available_spec.rb create mode 100644 spec/whois/parsers/responses/whois.nic.google/how/status_registered_spec.rb create mode 100644 spec/whois/parsers/responses/whois.nic.google/page/status_available_spec.rb create mode 100644 spec/whois/parsers/responses/whois.nic.google/page/status_registered_spec.rb create mode 100644 spec/whois/parsers/responses/whois.nic.google/soy/status_available_spec.rb create mode 100644 spec/whois/parsers/responses/whois.nic.google/soy/status_registered_spec.rb create mode 100644 spec/whois/parsers/responses/whois.nic.google/xn--q9jyb4c/status_available_spec.rb create mode 100644 spec/whois/parsers/responses/whois.nic.google/xn--q9jyb4c/status_registered_spec.rb diff --git a/CHANGELOG.md b/CHANGELOG.md index f1f6d0d3..26d9f24c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,7 @@ This project uses [Semantic Versioning 2.0.0](http://semver.org/). #### master +- NEW: Add whois.nic.google (support for .APP, .DEV, .HOW, .PAGE, .SOY) and update xn--q9jyb4c (.みんな) to use whois.nic.google (based on #124) Thanks @derekjc - NEW: Added parser for .CLOUD tld - FIX: Updated parser for .CO tld - FIX: Updated parser for .FI tld (based on #133) Thanks @elguitar diff --git a/Rakefile b/Rakefile index 39669660..329ef852 100644 --- a/Rakefile +++ b/Rakefile @@ -33,5 +33,5 @@ Dir["tasks/**/*.rake"].each do |file| end task :console do - sh "irb -r rubygems -I lib -r whois-parser.rb" + system "irb -r rubygems -I lib -r whois-parser.rb" end \ No newline at end of file diff --git a/lib/whois/parsers/whois.nic.google.rb b/lib/whois/parsers/whois.nic.google.rb new file mode 100644 index 00000000..93871af2 --- /dev/null +++ b/lib/whois/parsers/whois.nic.google.rb @@ -0,0 +1,12 @@ +require_relative 'base_icann_compliant' + +module Whois + class Parsers + + class WhoisNicGoogle < BaseIcannCompliant + self.scanner = Scanners::BaseIcannCompliant, { + pattern_available: /Domain not found.\n/ + } + end + end +end diff --git a/spec/fixtures/responses/whois.nic.google/app/status_available.expected b/spec/fixtures/responses/whois.nic.google/app/status_available.expected new file mode 100644 index 00000000..9f23516a --- /dev/null +++ b/spec/fixtures/responses/whois.nic.google/app/status_available.expected @@ -0,0 +1,46 @@ +#domain + %s == nil + +#domain_id + %s == nil + + +#status + %s == :available + +#available? + %s == true + +#registered? + %s == false + + +#created_on + %s == nil + +#updated_on + %s == nil + +#expires_on + %s == nil + + +#registrar + %s == nil + +#registrant_contacts + %s %CLASS{array} + %s == [] + +#admin_contacts + %s %CLASS{array} + %s == [] + +#technical_contacts + %s %CLASS{array} + %s == [] + + +#nameservers + %s %CLASS{array} + %s == [] diff --git a/spec/fixtures/responses/whois.nic.google/app/status_available.txt b/spec/fixtures/responses/whois.nic.google/app/status_available.txt new file mode 100644 index 00000000..0b1adc23 --- /dev/null +++ b/spec/fixtures/responses/whois.nic.google/app/status_available.txt @@ -0,0 +1,22 @@ +Domain not found. +>>> Last update of WHOIS database: 2019-06-28T20:37:28Z <<< + +Please query the WHOIS server of the owning registrar identified in this +output for information on how to contact the Registrant, Admin, or Tech +contact of the queried domain name. + +WHOIS information is provided by Charleston Road Registry Inc. (CRR) solely +for query-based, informational purposes. By querying our WHOIS database, you +are agreeing to comply with these terms +(https://www.registry.google/about/whois-disclaimer.html) and acknowledge +that your information will be used in accordance with CRR's Privacy Policy +(https://www.registry.google/about/privacy.html), so please read those +documents carefully. Any information provided is "as is" without any +guarantee of accuracy. You may not use such information to (a) allow, +enable, or otherwise support the transmission of mass unsolicited, +commercial advertising or solicitations; (b) enable high volume, automated, +electronic processes that access the systems of CRR or any ICANN-Accredited +Registrar, except as reasonably necessary to register domain names or modify +existing registrations; or (c) engage in or support unlawful behavior. CRR +reserves the right to restrict or deny your access to the Whois database, +and may modify these terms at any time. diff --git a/spec/fixtures/responses/whois.nic.google/app/status_registered.expected b/spec/fixtures/responses/whois.nic.google/app/status_registered.expected new file mode 100644 index 00000000..b213f094 --- /dev/null +++ b/spec/fixtures/responses/whois.nic.google/app/status_registered.expected @@ -0,0 +1,52 @@ +#domain + %s == "google.app" + +#domain_id + %s == "2C5A4BAFF-APP" + +#status + %s == :registered + +#available? + %s == false + +#registered? + %s == true + + +#created_on + %s %CLASS{time} + %s %TIME{2018-03-29T16:02:13Z} + +#updated_on + %s %CLASS{time} + %s %TIME{2019-03-03T10:46:31Z} + +#expires_on + %s %CLASS{time} + %s %TIME{2020-03-29T16:02:13Z} + +#registrar + %s %CLASS{registrar} + %s.id == "292" + %s.name == "MarkMonitor Inc." + +#registrant_contacts + %s %CLASS{array} + %s %SIZE{1} + %s[0] %CLASS{contact} + %s[0].organization == "Google LLC" + %s[0].state == "CA" + %s[0].country_code == "US" + +#nameservers + %s %CLASS{array} + %s %SIZE{4} + %s[0] %CLASS{nameserver} + %s[0].name == "ns1.googledomains.com" + %s[1] %CLASS{nameserver} + %s[1].name == "ns2.googledomains.com" + %s[2] %CLASS{nameserver} + %s[2].name == "ns3.googledomains.com" + %s[3] %CLASS{nameserver} + %s[3].name == "ns4.googledomains.com" diff --git a/spec/fixtures/responses/whois.nic.google/app/status_registered.txt b/spec/fixtures/responses/whois.nic.google/app/status_registered.txt new file mode 100644 index 00000000..8e4bd7e5 --- /dev/null +++ b/spec/fixtures/responses/whois.nic.google/app/status_registered.txt @@ -0,0 +1,87 @@ +Domain Name: google.app +Registry Domain ID: 2C5A4BAFF-APP +Registrar WHOIS Server: whois.nic.google +Registrar URL: http://www.markmonitor.com +Updated Date: 2019-03-03T10:46:31Z +Creation Date: 2018-03-29T16:02:13Z +Registry Expiry Date: 2020-03-29T16:02:13Z +Registrar: MarkMonitor Inc. +Registrar IANA ID: 292 +Registrar Abuse Contact Email: abusecomplaints@markmonitor.com +Registrar Abuse Contact Phone: +1.2083895740 +Domain Status: clientDeleteProhibited https://icann.org/epp#clientDeleteProhibited +Domain Status: clientTransferProhibited https://icann.org/epp#clientTransferProhibited +Domain Status: clientUpdateProhibited https://icann.org/epp#clientUpdateProhibited +Registry Registrant ID: REDACTED FOR PRIVACY +Registrant Name: REDACTED FOR PRIVACY +Registrant Organization: Google LLC +Registrant Street: REDACTED FOR PRIVACY +Registrant City: REDACTED FOR PRIVACY +Registrant State/Province: CA +Registrant Postal Code: REDACTED FOR PRIVACY +Registrant Country: US +Registrant Phone: REDACTED FOR PRIVACY +Registrant Fax: REDACTED FOR PRIVACY +Registrant Email: Please query the WHOIS server of the owning registrar identified in this output for information on how to contact the Registrant, Admin, or Tech contact of the queried domain name. +Registry Admin ID: REDACTED FOR PRIVACY +Admin Name: REDACTED FOR PRIVACY +Admin Organization: REDACTED FOR PRIVACY +Admin Street: REDACTED FOR PRIVACY +Admin City: REDACTED FOR PRIVACY +Admin State/Province: REDACTED FOR PRIVACY +Admin Postal Code: REDACTED FOR PRIVACY +Admin Country: REDACTED FOR PRIVACY +Admin Phone: REDACTED FOR PRIVACY +Admin Fax: REDACTED FOR PRIVACY +Admin Email: Please query the WHOIS server of the owning registrar identified in this output for information on how to contact the Registrant, Admin, or Tech contact of the queried domain name. +Registry Tech ID: REDACTED FOR PRIVACY +Tech Name: REDACTED FOR PRIVACY +Tech Organization: REDACTED FOR PRIVACY +Tech Street: REDACTED FOR PRIVACY +Tech City: REDACTED FOR PRIVACY +Tech State/Province: REDACTED FOR PRIVACY +Tech Postal Code: REDACTED FOR PRIVACY +Tech Country: REDACTED FOR PRIVACY +Tech Phone: REDACTED FOR PRIVACY +Tech Fax: REDACTED FOR PRIVACY +Tech Email: Please query the WHOIS server of the owning registrar identified in this output for information on how to contact the Registrant, Admin, or Tech contact of the queried domain name. +Registry Billing ID: REDACTED FOR PRIVACY +Billing Name: REDACTED FOR PRIVACY +Billing Organization: REDACTED FOR PRIVACY +Billing Street: REDACTED FOR PRIVACY +Billing City: REDACTED FOR PRIVACY +Billing State/Province: REDACTED FOR PRIVACY +Billing Postal Code: REDACTED FOR PRIVACY +Billing Country: REDACTED FOR PRIVACY +Billing Phone: REDACTED FOR PRIVACY +Billing Fax: REDACTED FOR PRIVACY +Billing Email: Please query the WHOIS server of the owning registrar identified in this output for information on how to contact the Registrant, Admin, or Tech contact of the queried domain name. +Name Server: ns1.googledomains.com +Name Server: ns2.googledomains.com +Name Server: ns3.googledomains.com +Name Server: ns4.googledomains.com +DNSSEC: unsigned +URL of the ICANN Whois Inaccuracy Complaint Form: https://www.icann.org/wicf/ +>>> Last update of WHOIS database: 2019-06-28T20:28:47Z <<< + +For more information on Whois status codes, please visit https://icann.org/epp + +Please query the WHOIS server of the owning registrar identified in this +output for information on how to contact the Registrant, Admin, or Tech +contact of the queried domain name. + +WHOIS information is provided by Charleston Road Registry Inc. (CRR) solely +for query-based, informational purposes. By querying our WHOIS database, you +are agreeing to comply with these terms +(https://www.registry.google/about/whois-disclaimer.html) and acknowledge +that your information will be used in accordance with CRR's Privacy Policy +(https://www.registry.google/about/privacy.html), so please read those +documents carefully. Any information provided is "as is" without any +guarantee of accuracy. You may not use such information to (a) allow, +enable, or otherwise support the transmission of mass unsolicited, +commercial advertising or solicitations; (b) enable high volume, automated, +electronic processes that access the systems of CRR or any ICANN-Accredited +Registrar, except as reasonably necessary to register domain names or modify +existing registrations; or (c) engage in or support unlawful behavior. CRR +reserves the right to restrict or deny your access to the Whois database, +and may modify these terms at any time. diff --git a/spec/fixtures/responses/whois.nic.google/dev/status_available.expected b/spec/fixtures/responses/whois.nic.google/dev/status_available.expected new file mode 100644 index 00000000..9f23516a --- /dev/null +++ b/spec/fixtures/responses/whois.nic.google/dev/status_available.expected @@ -0,0 +1,46 @@ +#domain + %s == nil + +#domain_id + %s == nil + + +#status + %s == :available + +#available? + %s == true + +#registered? + %s == false + + +#created_on + %s == nil + +#updated_on + %s == nil + +#expires_on + %s == nil + + +#registrar + %s == nil + +#registrant_contacts + %s %CLASS{array} + %s == [] + +#admin_contacts + %s %CLASS{array} + %s == [] + +#technical_contacts + %s %CLASS{array} + %s == [] + + +#nameservers + %s %CLASS{array} + %s == [] diff --git a/spec/fixtures/responses/whois.nic.google/dev/status_available.txt b/spec/fixtures/responses/whois.nic.google/dev/status_available.txt new file mode 100644 index 00000000..5dc1a798 --- /dev/null +++ b/spec/fixtures/responses/whois.nic.google/dev/status_available.txt @@ -0,0 +1,22 @@ +Domain not found. +>>> Last update of WHOIS database: 2019-06-28T20:37:41Z <<< + +Please query the WHOIS server of the owning registrar identified in this +output for information on how to contact the Registrant, Admin, or Tech +contact of the queried domain name. + +WHOIS information is provided by Charleston Road Registry Inc. (CRR) solely +for query-based, informational purposes. By querying our WHOIS database, you +are agreeing to comply with these terms +(https://www.registry.google/about/whois-disclaimer.html) and acknowledge +that your information will be used in accordance with CRR's Privacy Policy +(https://www.registry.google/about/privacy.html), so please read those +documents carefully. Any information provided is "as is" without any +guarantee of accuracy. You may not use such information to (a) allow, +enable, or otherwise support the transmission of mass unsolicited, +commercial advertising or solicitations; (b) enable high volume, automated, +electronic processes that access the systems of CRR or any ICANN-Accredited +Registrar, except as reasonably necessary to register domain names or modify +existing registrations; or (c) engage in or support unlawful behavior. CRR +reserves the right to restrict or deny your access to the Whois database, +and may modify these terms at any time. diff --git a/spec/fixtures/responses/whois.nic.google/dev/status_registered.expected b/spec/fixtures/responses/whois.nic.google/dev/status_registered.expected new file mode 100644 index 00000000..d6a29d7f --- /dev/null +++ b/spec/fixtures/responses/whois.nic.google/dev/status_registered.expected @@ -0,0 +1,52 @@ +#domain + %s == "google.dev" + +#domain_id + %s == "2CF25B78E-DEV" + +#status + %s == :registered + +#available? + %s == false + +#registered? + %s == true + + +#created_on + %s %CLASS{time} + %s %TIME{2018-06-13T22:30:20Z} + +#updated_on + %s %CLASS{time} + %s %TIME{2019-06-13T22:30:20Z} + +#expires_on + %s %CLASS{time} + %s %TIME{2020-06-13T22:30:20Z} + +#registrar + %s %CLASS{registrar} + %s.id == "9998" + %s.name == "Charleston Road Registry Billable" + +#registrant_contacts + %s %CLASS{array} + %s %SIZE{1} + %s[0] %CLASS{contact} + %s[0].organization == "Charleston Road Registry, Inc." + %s[0].state == "CA" + %s[0].country_code == "US" + +#nameservers + %s %CLASS{array} + %s %SIZE{4} + %s[0] %CLASS{nameserver} + %s[0].name == "ns1.googledomains.com" + %s[1] %CLASS{nameserver} + %s[1].name == "ns2.googledomains.com" + %s[2] %CLASS{nameserver} + %s[2].name == "ns3.googledomains.com" + %s[3] %CLASS{nameserver} + %s[3].name == "ns4.googledomains.com" diff --git a/spec/fixtures/responses/whois.nic.google/dev/status_registered.txt b/spec/fixtures/responses/whois.nic.google/dev/status_registered.txt new file mode 100644 index 00000000..6fefba88 --- /dev/null +++ b/spec/fixtures/responses/whois.nic.google/dev/status_registered.txt @@ -0,0 +1,78 @@ +Domain Name: google.dev +Registry Domain ID: 2CF25B78E-DEV +Registrar WHOIS Server: whois.nic.google +Registrar URL: http://www.charlestonroadregistry.com +Updated Date: 2019-06-13T22:30:20Z +Creation Date: 2018-06-13T22:30:20Z +Registry Expiry Date: 2020-06-13T22:30:20Z +Registrar: Charleston Road Registry Billable +Registrar IANA ID: 9998 +Registrar Abuse Contact Email: registry-abuse-support@google.com +Registrar Abuse Contact Phone: +1.2125652632 +Domain Status: autoRenewPeriod https://icann.org/epp#autoRenewPeriod +Domain Status: ok https://icann.org/epp#ok +Registry Registrant ID: REDACTED FOR PRIVACY +Registrant Name: REDACTED FOR PRIVACY +Registrant Organization: Charleston Road Registry, Inc. +Registrant Street: REDACTED FOR PRIVACY +Registrant Street: +Registrant City: REDACTED FOR PRIVACY +Registrant State/Province: CA +Registrant Postal Code: REDACTED FOR PRIVACY +Registrant Country: US +Registrant Phone: REDACTED FOR PRIVACY +Registrant Fax: REDACTED FOR PRIVACY +Registrant Email: Please query the WHOIS server of the owning registrar identified in this output for information on how to contact the Registrant, Admin, or Tech contact of the queried domain name. +Registry Admin ID: REDACTED FOR PRIVACY +Admin Name: REDACTED FOR PRIVACY +Admin Organization: REDACTED FOR PRIVACY +Admin Street: REDACTED FOR PRIVACY +Admin Street: +Admin City: REDACTED FOR PRIVACY +Admin State/Province: REDACTED FOR PRIVACY +Admin Postal Code: REDACTED FOR PRIVACY +Admin Country: REDACTED FOR PRIVACY +Admin Phone: REDACTED FOR PRIVACY +Admin Fax: REDACTED FOR PRIVACY +Admin Email: Please query the WHOIS server of the owning registrar identified in this output for information on how to contact the Registrant, Admin, or Tech contact of the queried domain name. +Registry Tech ID: REDACTED FOR PRIVACY +Tech Name: REDACTED FOR PRIVACY +Tech Organization: REDACTED FOR PRIVACY +Tech Street: REDACTED FOR PRIVACY +Tech Street: +Tech City: REDACTED FOR PRIVACY +Tech State/Province: REDACTED FOR PRIVACY +Tech Postal Code: REDACTED FOR PRIVACY +Tech Country: REDACTED FOR PRIVACY +Tech Phone: REDACTED FOR PRIVACY +Tech Fax: REDACTED FOR PRIVACY +Tech Email: Please query the WHOIS server of the owning registrar identified in this output for information on how to contact the Registrant, Admin, or Tech contact of the queried domain name. +Name Server: ns1.googledomains.com +Name Server: ns2.googledomains.com +Name Server: ns3.googledomains.com +Name Server: ns4.googledomains.com +DNSSEC: unsigned +URL of the ICANN Whois Inaccuracy Complaint Form: https://www.icann.org/wicf/ +>>> Last update of WHOIS database: 2019-06-28T20:29:01Z <<< + +For more information on Whois status codes, please visit https://icann.org/epp + +Please query the WHOIS server of the owning registrar identified in this +output for information on how to contact the Registrant, Admin, or Tech +contact of the queried domain name. + +WHOIS information is provided by Charleston Road Registry Inc. (CRR) solely +for query-based, informational purposes. By querying our WHOIS database, you +are agreeing to comply with these terms +(https://www.registry.google/about/whois-disclaimer.html) and acknowledge +that your information will be used in accordance with CRR's Privacy Policy +(https://www.registry.google/about/privacy.html), so please read those +documents carefully. Any information provided is "as is" without any +guarantee of accuracy. You may not use such information to (a) allow, +enable, or otherwise support the transmission of mass unsolicited, +commercial advertising or solicitations; (b) enable high volume, automated, +electronic processes that access the systems of CRR or any ICANN-Accredited +Registrar, except as reasonably necessary to register domain names or modify +existing registrations; or (c) engage in or support unlawful behavior. CRR +reserves the right to restrict or deny your access to the Whois database, +and may modify these terms at any time. diff --git a/spec/fixtures/responses/whois.nic.google/how/status_available.expected b/spec/fixtures/responses/whois.nic.google/how/status_available.expected new file mode 100644 index 00000000..9f23516a --- /dev/null +++ b/spec/fixtures/responses/whois.nic.google/how/status_available.expected @@ -0,0 +1,46 @@ +#domain + %s == nil + +#domain_id + %s == nil + + +#status + %s == :available + +#available? + %s == true + +#registered? + %s == false + + +#created_on + %s == nil + +#updated_on + %s == nil + +#expires_on + %s == nil + + +#registrar + %s == nil + +#registrant_contacts + %s %CLASS{array} + %s == [] + +#admin_contacts + %s %CLASS{array} + %s == [] + +#technical_contacts + %s %CLASS{array} + %s == [] + + +#nameservers + %s %CLASS{array} + %s == [] diff --git a/spec/fixtures/responses/whois.nic.google/how/status_available.txt b/spec/fixtures/responses/whois.nic.google/how/status_available.txt new file mode 100644 index 00000000..e269e4ef --- /dev/null +++ b/spec/fixtures/responses/whois.nic.google/how/status_available.txt @@ -0,0 +1,22 @@ +Domain not found. +>>> Last update of WHOIS database: 2019-06-28T20:37:51Z <<< + +Please query the WHOIS server of the owning registrar identified in this +output for information on how to contact the Registrant, Admin, or Tech +contact of the queried domain name. + +WHOIS information is provided by Charleston Road Registry Inc. (CRR) solely +for query-based, informational purposes. By querying our WHOIS database, you +are agreeing to comply with these terms +(https://www.registry.google/about/whois-disclaimer.html) and acknowledge +that your information will be used in accordance with CRR's Privacy Policy +(https://www.registry.google/about/privacy.html), so please read those +documents carefully. Any information provided is "as is" without any +guarantee of accuracy. You may not use such information to (a) allow, +enable, or otherwise support the transmission of mass unsolicited, +commercial advertising or solicitations; (b) enable high volume, automated, +electronic processes that access the systems of CRR or any ICANN-Accredited +Registrar, except as reasonably necessary to register domain names or modify +existing registrations; or (c) engage in or support unlawful behavior. CRR +reserves the right to restrict or deny your access to the Whois database, +and may modify these terms at any time. diff --git a/spec/fixtures/responses/whois.nic.google/how/status_registered.expected b/spec/fixtures/responses/whois.nic.google/how/status_registered.expected new file mode 100644 index 00000000..0de60816 --- /dev/null +++ b/spec/fixtures/responses/whois.nic.google/how/status_registered.expected @@ -0,0 +1,52 @@ +#domain + %s == "google.how" + +#domain_id + %s == "62CF6AF-HOW" + +#status + %s == :registered + +#available? + %s == false + +#registered? + %s == true + + +#created_on + %s %CLASS{time} + %s %TIME{2015-01-12T16:14:39Z} + +#updated_on + %s %CLASS{time} + %s %TIME{2019-02-14T19:53:11Z} + +#expires_on + %s %CLASS{time} + %s %TIME{2020-01-12T16:14:39Z} + +#registrar + %s %CLASS{registrar} + %s.id == "292" + %s.name == "MarkMonitor Inc." + +#registrant_contacts + %s %CLASS{array} + %s %SIZE{1} + %s[0] %CLASS{contact} + %s[0].organization == "Google LLC" + %s[0].state == "CA" + %s[0].country_code == "US" + +#nameservers + %s %CLASS{array} + %s %SIZE{4} + %s[0] %CLASS{nameserver} + %s[0].name == "ns1.googledomains.com" + %s[1] %CLASS{nameserver} + %s[1].name == "ns2.googledomains.com" + %s[2] %CLASS{nameserver} + %s[2].name == "ns3.googledomains.com" + %s[3] %CLASS{nameserver} + %s[3].name == "ns4.googledomains.com" diff --git a/spec/fixtures/responses/whois.nic.google/how/status_registered.txt b/spec/fixtures/responses/whois.nic.google/how/status_registered.txt new file mode 100644 index 00000000..30e9d01c --- /dev/null +++ b/spec/fixtures/responses/whois.nic.google/how/status_registered.txt @@ -0,0 +1,87 @@ +Domain Name: google.how +Registry Domain ID: 62CF6AF-HOW +Registrar WHOIS Server: whois.nic.google +Registrar URL: http://www.markmonitor.com +Updated Date: 2019-02-14T19:53:11Z +Creation Date: 2015-01-12T16:14:39Z +Registry Expiry Date: 2020-01-12T16:14:39Z +Registrar: MarkMonitor Inc. +Registrar IANA ID: 292 +Registrar Abuse Contact Email: abusecomplaints@markmonitor.com +Registrar Abuse Contact Phone: +1.2083895740 +Domain Status: clientDeleteProhibited https://icann.org/epp#clientDeleteProhibited +Domain Status: clientTransferProhibited https://icann.org/epp#clientTransferProhibited +Domain Status: clientUpdateProhibited https://icann.org/epp#clientUpdateProhibited +Registry Registrant ID: REDACTED FOR PRIVACY +Registrant Name: REDACTED FOR PRIVACY +Registrant Organization: Google LLC +Registrant Street: REDACTED FOR PRIVACY +Registrant City: REDACTED FOR PRIVACY +Registrant State/Province: CA +Registrant Postal Code: REDACTED FOR PRIVACY +Registrant Country: US +Registrant Phone: REDACTED FOR PRIVACY +Registrant Fax: REDACTED FOR PRIVACY +Registrant Email: Please query the WHOIS server of the owning registrar identified in this output for information on how to contact the Registrant, Admin, or Tech contact of the queried domain name. +Registry Admin ID: REDACTED FOR PRIVACY +Admin Name: REDACTED FOR PRIVACY +Admin Organization: REDACTED FOR PRIVACY +Admin Street: REDACTED FOR PRIVACY +Admin City: REDACTED FOR PRIVACY +Admin State/Province: REDACTED FOR PRIVACY +Admin Postal Code: REDACTED FOR PRIVACY +Admin Country: REDACTED FOR PRIVACY +Admin Phone: REDACTED FOR PRIVACY +Admin Fax: REDACTED FOR PRIVACY +Admin Email: Please query the WHOIS server of the owning registrar identified in this output for information on how to contact the Registrant, Admin, or Tech contact of the queried domain name. +Registry Tech ID: REDACTED FOR PRIVACY +Tech Name: REDACTED FOR PRIVACY +Tech Organization: REDACTED FOR PRIVACY +Tech Street: REDACTED FOR PRIVACY +Tech City: REDACTED FOR PRIVACY +Tech State/Province: REDACTED FOR PRIVACY +Tech Postal Code: REDACTED FOR PRIVACY +Tech Country: REDACTED FOR PRIVACY +Tech Phone: REDACTED FOR PRIVACY +Tech Fax: REDACTED FOR PRIVACY +Tech Email: Please query the WHOIS server of the owning registrar identified in this output for information on how to contact the Registrant, Admin, or Tech contact of the queried domain name. +Registry Billing ID: REDACTED FOR PRIVACY +Billing Name: REDACTED FOR PRIVACY +Billing Organization: REDACTED FOR PRIVACY +Billing Street: REDACTED FOR PRIVACY +Billing City: REDACTED FOR PRIVACY +Billing State/Province: REDACTED FOR PRIVACY +Billing Postal Code: REDACTED FOR PRIVACY +Billing Country: REDACTED FOR PRIVACY +Billing Phone: REDACTED FOR PRIVACY +Billing Fax: REDACTED FOR PRIVACY +Billing Email: Please query the WHOIS server of the owning registrar identified in this output for information on how to contact the Registrant, Admin, or Tech contact of the queried domain name. +Name Server: ns1.googledomains.com +Name Server: ns2.googledomains.com +Name Server: ns3.googledomains.com +Name Server: ns4.googledomains.com +DNSSEC: unsigned +URL of the ICANN Whois Inaccuracy Complaint Form: https://www.icann.org/wicf/ +>>> Last update of WHOIS database: 2019-06-28T20:29:12Z <<< + +For more information on Whois status codes, please visit https://icann.org/epp + +Please query the WHOIS server of the owning registrar identified in this +output for information on how to contact the Registrant, Admin, or Tech +contact of the queried domain name. + +WHOIS information is provided by Charleston Road Registry Inc. (CRR) solely +for query-based, informational purposes. By querying our WHOIS database, you +are agreeing to comply with these terms +(https://www.registry.google/about/whois-disclaimer.html) and acknowledge +that your information will be used in accordance with CRR's Privacy Policy +(https://www.registry.google/about/privacy.html), so please read those +documents carefully. Any information provided is "as is" without any +guarantee of accuracy. You may not use such information to (a) allow, +enable, or otherwise support the transmission of mass unsolicited, +commercial advertising or solicitations; (b) enable high volume, automated, +electronic processes that access the systems of CRR or any ICANN-Accredited +Registrar, except as reasonably necessary to register domain names or modify +existing registrations; or (c) engage in or support unlawful behavior. CRR +reserves the right to restrict or deny your access to the Whois database, +and may modify these terms at any time. diff --git a/spec/fixtures/responses/whois.nic.google/page/status_available.expected b/spec/fixtures/responses/whois.nic.google/page/status_available.expected new file mode 100644 index 00000000..9f23516a --- /dev/null +++ b/spec/fixtures/responses/whois.nic.google/page/status_available.expected @@ -0,0 +1,46 @@ +#domain + %s == nil + +#domain_id + %s == nil + + +#status + %s == :available + +#available? + %s == true + +#registered? + %s == false + + +#created_on + %s == nil + +#updated_on + %s == nil + +#expires_on + %s == nil + + +#registrar + %s == nil + +#registrant_contacts + %s %CLASS{array} + %s == [] + +#admin_contacts + %s %CLASS{array} + %s == [] + +#technical_contacts + %s %CLASS{array} + %s == [] + + +#nameservers + %s %CLASS{array} + %s == [] diff --git a/spec/fixtures/responses/whois.nic.google/page/status_available.txt b/spec/fixtures/responses/whois.nic.google/page/status_available.txt new file mode 100644 index 00000000..5ed9bd13 --- /dev/null +++ b/spec/fixtures/responses/whois.nic.google/page/status_available.txt @@ -0,0 +1,22 @@ +Domain not found. +>>> Last update of WHOIS database: 2019-06-28T20:38:01Z <<< + +Please query the WHOIS server of the owning registrar identified in this +output for information on how to contact the Registrant, Admin, or Tech +contact of the queried domain name. + +WHOIS information is provided by Charleston Road Registry Inc. (CRR) solely +for query-based, informational purposes. By querying our WHOIS database, you +are agreeing to comply with these terms +(https://www.registry.google/about/whois-disclaimer.html) and acknowledge +that your information will be used in accordance with CRR's Privacy Policy +(https://www.registry.google/about/privacy.html), so please read those +documents carefully. Any information provided is "as is" without any +guarantee of accuracy. You may not use such information to (a) allow, +enable, or otherwise support the transmission of mass unsolicited, +commercial advertising or solicitations; (b) enable high volume, automated, +electronic processes that access the systems of CRR or any ICANN-Accredited +Registrar, except as reasonably necessary to register domain names or modify +existing registrations; or (c) engage in or support unlawful behavior. CRR +reserves the right to restrict or deny your access to the Whois database, +and may modify these terms at any time. diff --git a/spec/fixtures/responses/whois.nic.google/page/status_registered.expected b/spec/fixtures/responses/whois.nic.google/page/status_registered.expected new file mode 100644 index 00000000..67a5c670 --- /dev/null +++ b/spec/fixtures/responses/whois.nic.google/page/status_registered.expected @@ -0,0 +1,37 @@ +#domain + %s == "google.page" + +#domain_id + %s == "2D55CC686-PAGE" + +#status + %s == :registered + +#available? + %s == false + +#registered? + %s == true + + +#created_on + %s %CLASS{time} + %s %TIME{2018-08-13T21:29:41Z} + +#expires_on + %s %CLASS{time} + %s %TIME{2019-08-13T21:29:41Z} + +#registrar + %s %CLASS{registrar} + %s.id == "9998" + %s.name == "Charleston Road Registry Billable" + +#registrant_contacts + %s %CLASS{array} + %s %SIZE{1} + %s[0] %CLASS{contact} + %s[0].organization == "Charleston Road Registry, Inc." + %s[0].state == "CA" + %s[0].country_code == "US" + diff --git a/spec/fixtures/responses/whois.nic.google/page/status_registered.txt b/spec/fixtures/responses/whois.nic.google/page/status_registered.txt new file mode 100644 index 00000000..2ca2f9bc --- /dev/null +++ b/spec/fixtures/responses/whois.nic.google/page/status_registered.txt @@ -0,0 +1,72 @@ +Domain Name: google.page +Registry Domain ID: 2D55CC686-PAGE +Registrar WHOIS Server: whois.nic.google +Registrar URL: http://www.charlestonroadregistry.com +Creation Date: 2018-08-13T21:29:41Z +Registry Expiry Date: 2019-08-13T21:29:41Z +Registrar: Charleston Road Registry Billable +Registrar IANA ID: 9998 +Registrar Abuse Contact Email: registry-abuse-support@google.com +Registrar Abuse Contact Phone: +1.2125652632 +Domain Status: inactive https://icann.org/epp#inactive +Registry Registrant ID: REDACTED FOR PRIVACY +Registrant Name: REDACTED FOR PRIVACY +Registrant Organization: Charleston Road Registry, Inc. +Registrant Street: REDACTED FOR PRIVACY +Registrant Street: +Registrant City: REDACTED FOR PRIVACY +Registrant State/Province: CA +Registrant Postal Code: REDACTED FOR PRIVACY +Registrant Country: US +Registrant Phone: REDACTED FOR PRIVACY +Registrant Fax: REDACTED FOR PRIVACY +Registrant Email: Please query the WHOIS server of the owning registrar identified in this output for information on how to contact the Registrant, Admin, or Tech contact of the queried domain name. +Registry Admin ID: REDACTED FOR PRIVACY +Admin Name: REDACTED FOR PRIVACY +Admin Organization: REDACTED FOR PRIVACY +Admin Street: REDACTED FOR PRIVACY +Admin Street: +Admin City: REDACTED FOR PRIVACY +Admin State/Province: REDACTED FOR PRIVACY +Admin Postal Code: REDACTED FOR PRIVACY +Admin Country: REDACTED FOR PRIVACY +Admin Phone: REDACTED FOR PRIVACY +Admin Fax: REDACTED FOR PRIVACY +Admin Email: Please query the WHOIS server of the owning registrar identified in this output for information on how to contact the Registrant, Admin, or Tech contact of the queried domain name. +Registry Tech ID: REDACTED FOR PRIVACY +Tech Name: REDACTED FOR PRIVACY +Tech Organization: REDACTED FOR PRIVACY +Tech Street: REDACTED FOR PRIVACY +Tech Street: +Tech City: REDACTED FOR PRIVACY +Tech State/Province: REDACTED FOR PRIVACY +Tech Postal Code: REDACTED FOR PRIVACY +Tech Country: REDACTED FOR PRIVACY +Tech Phone: REDACTED FOR PRIVACY +Tech Fax: REDACTED FOR PRIVACY +Tech Email: Please query the WHOIS server of the owning registrar identified in this output for information on how to contact the Registrant, Admin, or Tech contact of the queried domain name. +DNSSEC: unsigned +URL of the ICANN Whois Inaccuracy Complaint Form: https://www.icann.org/wicf/ +>>> Last update of WHOIS database: 2019-06-28T20:29:24Z <<< + +For more information on Whois status codes, please visit https://icann.org/epp + +Please query the WHOIS server of the owning registrar identified in this +output for information on how to contact the Registrant, Admin, or Tech +contact of the queried domain name. + +WHOIS information is provided by Charleston Road Registry Inc. (CRR) solely +for query-based, informational purposes. By querying our WHOIS database, you +are agreeing to comply with these terms +(https://www.registry.google/about/whois-disclaimer.html) and acknowledge +that your information will be used in accordance with CRR's Privacy Policy +(https://www.registry.google/about/privacy.html), so please read those +documents carefully. Any information provided is "as is" without any +guarantee of accuracy. You may not use such information to (a) allow, +enable, or otherwise support the transmission of mass unsolicited, +commercial advertising or solicitations; (b) enable high volume, automated, +electronic processes that access the systems of CRR or any ICANN-Accredited +Registrar, except as reasonably necessary to register domain names or modify +existing registrations; or (c) engage in or support unlawful behavior. CRR +reserves the right to restrict or deny your access to the Whois database, +and may modify these terms at any time. diff --git a/spec/fixtures/responses/whois.nic.google/soy/status_available.expected b/spec/fixtures/responses/whois.nic.google/soy/status_available.expected new file mode 100644 index 00000000..9f23516a --- /dev/null +++ b/spec/fixtures/responses/whois.nic.google/soy/status_available.expected @@ -0,0 +1,46 @@ +#domain + %s == nil + +#domain_id + %s == nil + + +#status + %s == :available + +#available? + %s == true + +#registered? + %s == false + + +#created_on + %s == nil + +#updated_on + %s == nil + +#expires_on + %s == nil + + +#registrar + %s == nil + +#registrant_contacts + %s %CLASS{array} + %s == [] + +#admin_contacts + %s %CLASS{array} + %s == [] + +#technical_contacts + %s %CLASS{array} + %s == [] + + +#nameservers + %s %CLASS{array} + %s == [] diff --git a/spec/fixtures/responses/whois.nic.google/soy/status_available.txt b/spec/fixtures/responses/whois.nic.google/soy/status_available.txt new file mode 100644 index 00000000..2394e205 --- /dev/null +++ b/spec/fixtures/responses/whois.nic.google/soy/status_available.txt @@ -0,0 +1,22 @@ +Domain not found. +>>> Last update of WHOIS database: 2019-06-28T20:38:12Z <<< + +Please query the WHOIS server of the owning registrar identified in this +output for information on how to contact the Registrant, Admin, or Tech +contact of the queried domain name. + +WHOIS information is provided by Charleston Road Registry Inc. (CRR) solely +for query-based, informational purposes. By querying our WHOIS database, you +are agreeing to comply with these terms +(https://www.registry.google/about/whois-disclaimer.html) and acknowledge +that your information will be used in accordance with CRR's Privacy Policy +(https://www.registry.google/about/privacy.html), so please read those +documents carefully. Any information provided is "as is" without any +guarantee of accuracy. You may not use such information to (a) allow, +enable, or otherwise support the transmission of mass unsolicited, +commercial advertising or solicitations; (b) enable high volume, automated, +electronic processes that access the systems of CRR or any ICANN-Accredited +Registrar, except as reasonably necessary to register domain names or modify +existing registrations; or (c) engage in or support unlawful behavior. CRR +reserves the right to restrict or deny your access to the Whois database, +and may modify these terms at any time. diff --git a/spec/fixtures/responses/whois.nic.google/soy/status_registered.expected b/spec/fixtures/responses/whois.nic.google/soy/status_registered.expected new file mode 100644 index 00000000..9f33c16d --- /dev/null +++ b/spec/fixtures/responses/whois.nic.google/soy/status_registered.expected @@ -0,0 +1,52 @@ +#domain + %s == "google.soy" + +#domain_id + %s == "88628D1-SOY" + +#status + %s == :registered + +#available? + %s == false + +#registered? + %s == true + + +#created_on + %s %CLASS{time} + %s %TIME{2014-12-01T21:58:34Z} + +#updated_on + %s %CLASS{time} + %s %TIME{2019-02-14T19:53:13Z} + +#expires_on + %s %CLASS{time} + %s %TIME{2019-12-01T21:58:34Z} + +#registrar + %s %CLASS{registrar} + %s.id == "292" + %s.name == "MarkMonitor Inc." + +#registrant_contacts + %s %CLASS{array} + %s %SIZE{1} + %s[0] %CLASS{contact} + %s[0].organization == "Google LLC" + %s[0].state == "CA" + %s[0].country_code == "US" + +#nameservers + %s %CLASS{array} + %s %SIZE{4} + %s[0] %CLASS{nameserver} + %s[0].name == "ns1.googledomains.com" + %s[1] %CLASS{nameserver} + %s[1].name == "ns2.googledomains.com" + %s[2] %CLASS{nameserver} + %s[2].name == "ns3.googledomains.com" + %s[3] %CLASS{nameserver} + %s[3].name == "ns4.googledomains.com" diff --git a/spec/fixtures/responses/whois.nic.google/soy/status_registered.txt b/spec/fixtures/responses/whois.nic.google/soy/status_registered.txt new file mode 100644 index 00000000..4c01b26f --- /dev/null +++ b/spec/fixtures/responses/whois.nic.google/soy/status_registered.txt @@ -0,0 +1,87 @@ +Domain Name: google.soy +Registry Domain ID: 88628D1-SOY +Registrar WHOIS Server: whois.nic.google +Registrar URL: http://www.markmonitor.com +Updated Date: 2019-02-14T19:53:13Z +Creation Date: 2014-12-01T21:58:34Z +Registry Expiry Date: 2019-12-01T21:58:34Z +Registrar: MarkMonitor Inc. +Registrar IANA ID: 292 +Registrar Abuse Contact Email: abusecomplaints@markmonitor.com +Registrar Abuse Contact Phone: +1.2083895740 +Domain Status: clientDeleteProhibited https://icann.org/epp#clientDeleteProhibited +Domain Status: clientTransferProhibited https://icann.org/epp#clientTransferProhibited +Domain Status: clientUpdateProhibited https://icann.org/epp#clientUpdateProhibited +Registry Registrant ID: REDACTED FOR PRIVACY +Registrant Name: REDACTED FOR PRIVACY +Registrant Organization: Google LLC +Registrant Street: REDACTED FOR PRIVACY +Registrant City: REDACTED FOR PRIVACY +Registrant State/Province: CA +Registrant Postal Code: REDACTED FOR PRIVACY +Registrant Country: US +Registrant Phone: REDACTED FOR PRIVACY +Registrant Fax: REDACTED FOR PRIVACY +Registrant Email: Please query the WHOIS server of the owning registrar identified in this output for information on how to contact the Registrant, Admin, or Tech contact of the queried domain name. +Registry Admin ID: REDACTED FOR PRIVACY +Admin Name: REDACTED FOR PRIVACY +Admin Organization: REDACTED FOR PRIVACY +Admin Street: REDACTED FOR PRIVACY +Admin City: REDACTED FOR PRIVACY +Admin State/Province: REDACTED FOR PRIVACY +Admin Postal Code: REDACTED FOR PRIVACY +Admin Country: REDACTED FOR PRIVACY +Admin Phone: REDACTED FOR PRIVACY +Admin Fax: REDACTED FOR PRIVACY +Admin Email: Please query the WHOIS server of the owning registrar identified in this output for information on how to contact the Registrant, Admin, or Tech contact of the queried domain name. +Registry Tech ID: REDACTED FOR PRIVACY +Tech Name: REDACTED FOR PRIVACY +Tech Organization: REDACTED FOR PRIVACY +Tech Street: REDACTED FOR PRIVACY +Tech City: REDACTED FOR PRIVACY +Tech State/Province: REDACTED FOR PRIVACY +Tech Postal Code: REDACTED FOR PRIVACY +Tech Country: REDACTED FOR PRIVACY +Tech Phone: REDACTED FOR PRIVACY +Tech Fax: REDACTED FOR PRIVACY +Tech Email: Please query the WHOIS server of the owning registrar identified in this output for information on how to contact the Registrant, Admin, or Tech contact of the queried domain name. +Registry Billing ID: REDACTED FOR PRIVACY +Billing Name: REDACTED FOR PRIVACY +Billing Organization: REDACTED FOR PRIVACY +Billing Street: REDACTED FOR PRIVACY +Billing City: REDACTED FOR PRIVACY +Billing State/Province: REDACTED FOR PRIVACY +Billing Postal Code: REDACTED FOR PRIVACY +Billing Country: REDACTED FOR PRIVACY +Billing Phone: REDACTED FOR PRIVACY +Billing Fax: REDACTED FOR PRIVACY +Billing Email: Please query the WHOIS server of the owning registrar identified in this output for information on how to contact the Registrant, Admin, or Tech contact of the queried domain name. +Name Server: ns1.googledomains.com +Name Server: ns2.googledomains.com +Name Server: ns3.googledomains.com +Name Server: ns4.googledomains.com +DNSSEC: unsigned +URL of the ICANN Whois Inaccuracy Complaint Form: https://www.icann.org/wicf/ +>>> Last update of WHOIS database: 2019-06-28T20:29:35Z <<< + +For more information on Whois status codes, please visit https://icann.org/epp + +Please query the WHOIS server of the owning registrar identified in this +output for information on how to contact the Registrant, Admin, or Tech +contact of the queried domain name. + +WHOIS information is provided by Charleston Road Registry Inc. (CRR) solely +for query-based, informational purposes. By querying our WHOIS database, you +are agreeing to comply with these terms +(https://www.registry.google/about/whois-disclaimer.html) and acknowledge +that your information will be used in accordance with CRR's Privacy Policy +(https://www.registry.google/about/privacy.html), so please read those +documents carefully. Any information provided is "as is" without any +guarantee of accuracy. You may not use such information to (a) allow, +enable, or otherwise support the transmission of mass unsolicited, +commercial advertising or solicitations; (b) enable high volume, automated, +electronic processes that access the systems of CRR or any ICANN-Accredited +Registrar, except as reasonably necessary to register domain names or modify +existing registrations; or (c) engage in or support unlawful behavior. CRR +reserves the right to restrict or deny your access to the Whois database, +and may modify these terms at any time. diff --git a/spec/fixtures/responses/whois.nic.google/xn--q9jyb4c/status_available.expected b/spec/fixtures/responses/whois.nic.google/xn--q9jyb4c/status_available.expected new file mode 100644 index 00000000..9f23516a --- /dev/null +++ b/spec/fixtures/responses/whois.nic.google/xn--q9jyb4c/status_available.expected @@ -0,0 +1,46 @@ +#domain + %s == nil + +#domain_id + %s == nil + + +#status + %s == :available + +#available? + %s == true + +#registered? + %s == false + + +#created_on + %s == nil + +#updated_on + %s == nil + +#expires_on + %s == nil + + +#registrar + %s == nil + +#registrant_contacts + %s %CLASS{array} + %s == [] + +#admin_contacts + %s %CLASS{array} + %s == [] + +#technical_contacts + %s %CLASS{array} + %s == [] + + +#nameservers + %s %CLASS{array} + %s == [] diff --git a/spec/fixtures/responses/whois.nic.google/xn--q9jyb4c/status_available.txt b/spec/fixtures/responses/whois.nic.google/xn--q9jyb4c/status_available.txt new file mode 100644 index 00000000..78d2edfd --- /dev/null +++ b/spec/fixtures/responses/whois.nic.google/xn--q9jyb4c/status_available.txt @@ -0,0 +1,22 @@ +Domain not found. +>>> Last update of WHOIS database: 2019-06-28T20:38:53Z <<< + +Please query the WHOIS server of the owning registrar identified in this +output for information on how to contact the Registrant, Admin, or Tech +contact of the queried domain name. + +WHOIS information is provided by Charleston Road Registry Inc. (CRR) solely +for query-based, informational purposes. By querying our WHOIS database, you +are agreeing to comply with these terms +(https://www.registry.google/about/whois-disclaimer.html) and acknowledge +that your information will be used in accordance with CRR's Privacy Policy +(https://www.registry.google/about/privacy.html), so please read those +documents carefully. Any information provided is "as is" without any +guarantee of accuracy. You may not use such information to (a) allow, +enable, or otherwise support the transmission of mass unsolicited, +commercial advertising or solicitations; (b) enable high volume, automated, +electronic processes that access the systems of CRR or any ICANN-Accredited +Registrar, except as reasonably necessary to register domain names or modify +existing registrations; or (c) engage in or support unlawful behavior. CRR +reserves the right to restrict or deny your access to the Whois database, +and may modify these terms at any time. diff --git a/spec/fixtures/responses/whois.nic.google/xn--q9jyb4c/status_registered.expected b/spec/fixtures/responses/whois.nic.google/xn--q9jyb4c/status_registered.expected new file mode 100644 index 00000000..b3969f16 --- /dev/null +++ b/spec/fixtures/responses/whois.nic.google/xn--q9jyb4c/status_registered.expected @@ -0,0 +1,52 @@ +#domain + %s == "google.xn--q9jyb4c" + +#domain_id + %s == "C176ED-Q9JYB4C" + +#status + %s == :registered + +#available? + %s == false + +#registered? + %s == true + + +#created_on + %s %CLASS{time} + %s %TIME{2014-03-04T19:45:32Z} + +#updated_on + %s %CLASS{time} + %s %TIME{2019-02-05T10:39:55Z} + +#expires_on + %s %CLASS{time} + %s %TIME{2020-03-04T19:45:32Z} + +#registrar + %s %CLASS{registrar} + %s.id == "292" + %s.name == "MarkMonitor Inc." + +#registrant_contacts + %s %CLASS{array} + %s %SIZE{1} + %s[0] %CLASS{contact} + %s[0].organization == "Google Inc." + %s[0].state == "CA" + %s[0].country_code == "US" + +#nameservers + %s %CLASS{array} + %s %SIZE{4} + %s[0] %CLASS{nameserver} + %s[0].name == "ns1.googledomains.com" + %s[1] %CLASS{nameserver} + %s[1].name == "ns2.googledomains.com" + %s[2] %CLASS{nameserver} + %s[2].name == "ns3.googledomains.com" + %s[3] %CLASS{nameserver} + %s[3].name == "ns4.googledomains.com" diff --git a/spec/fixtures/responses/whois.nic.google/xn--q9jyb4c/status_registered.txt b/spec/fixtures/responses/whois.nic.google/xn--q9jyb4c/status_registered.txt new file mode 100644 index 00000000..13c3ea0e --- /dev/null +++ b/spec/fixtures/responses/whois.nic.google/xn--q9jyb4c/status_registered.txt @@ -0,0 +1,76 @@ +Domain Name: google.xn--q9jyb4c +Registry Domain ID: C176ED-Q9JYB4C +Registrar WHOIS Server: whois.nic.google +Registrar URL: http://www.markmonitor.com +Updated Date: 2019-02-05T10:39:55Z +Creation Date: 2014-03-04T19:45:32Z +Registry Expiry Date: 2020-03-04T19:45:32Z +Registrar: MarkMonitor Inc. +Registrar IANA ID: 292 +Registrar Abuse Contact Email: abusecomplaints@markmonitor.com +Registrar Abuse Contact Phone: +1.2083895740 +Domain Status: clientDeleteProhibited https://icann.org/epp#clientDeleteProhibited +Domain Status: clientTransferProhibited https://icann.org/epp#clientTransferProhibited +Domain Status: clientUpdateProhibited https://icann.org/epp#clientUpdateProhibited +Registry Registrant ID: REDACTED FOR PRIVACY +Registrant Name: REDACTED FOR PRIVACY +Registrant Organization: Google Inc. +Registrant Street: REDACTED FOR PRIVACY +Registrant City: REDACTED FOR PRIVACY +Registrant State/Province: CA +Registrant Postal Code: REDACTED FOR PRIVACY +Registrant Country: US +Registrant Phone: REDACTED FOR PRIVACY +Registrant Fax: REDACTED FOR PRIVACY +Registrant Email: Please query the WHOIS server of the owning registrar identified in this output for information on how to contact the Registrant, Admin, or Tech contact of the queried domain name. +Registry Admin ID: REDACTED FOR PRIVACY +Admin Name: REDACTED FOR PRIVACY +Admin Organization: REDACTED FOR PRIVACY +Admin Street: REDACTED FOR PRIVACY +Admin City: REDACTED FOR PRIVACY +Admin State/Province: REDACTED FOR PRIVACY +Admin Postal Code: REDACTED FOR PRIVACY +Admin Country: REDACTED FOR PRIVACY +Admin Phone: REDACTED FOR PRIVACY +Admin Fax: REDACTED FOR PRIVACY +Admin Email: Please query the WHOIS server of the owning registrar identified in this output for information on how to contact the Registrant, Admin, or Tech contact of the queried domain name. +Registry Tech ID: REDACTED FOR PRIVACY +Tech Name: REDACTED FOR PRIVACY +Tech Organization: REDACTED FOR PRIVACY +Tech Street: REDACTED FOR PRIVACY +Tech City: REDACTED FOR PRIVACY +Tech State/Province: REDACTED FOR PRIVACY +Tech Postal Code: REDACTED FOR PRIVACY +Tech Country: REDACTED FOR PRIVACY +Tech Phone: REDACTED FOR PRIVACY +Tech Fax: REDACTED FOR PRIVACY +Tech Email: Please query the WHOIS server of the owning registrar identified in this output for information on how to contact the Registrant, Admin, or Tech contact of the queried domain name. +Name Server: ns1.googledomains.com +Name Server: ns2.googledomains.com +Name Server: ns3.googledomains.com +Name Server: ns4.googledomains.com +DNSSEC: unsigned +URL of the ICANN Whois Inaccuracy Complaint Form: https://www.icann.org/wicf/ +>>> Last update of WHOIS database: 2019-06-28T20:28:31Z <<< + +For more information on Whois status codes, please visit https://icann.org/epp + +Please query the WHOIS server of the owning registrar identified in this +output for information on how to contact the Registrant, Admin, or Tech +contact of the queried domain name. + +WHOIS information is provided by Charleston Road Registry Inc. (CRR) solely +for query-based, informational purposes. By querying our WHOIS database, you +are agreeing to comply with these terms +(https://www.registry.google/about/whois-disclaimer.html) and acknowledge +that your information will be used in accordance with CRR's Privacy Policy +(https://www.registry.google/about/privacy.html), so please read those +documents carefully. Any information provided is "as is" without any +guarantee of accuracy. You may not use such information to (a) allow, +enable, or otherwise support the transmission of mass unsolicited, +commercial advertising or solicitations; (b) enable high volume, automated, +electronic processes that access the systems of CRR or any ICANN-Accredited +Registrar, except as reasonably necessary to register domain names or modify +existing registrations; or (c) engage in or support unlawful behavior. CRR +reserves the right to restrict or deny your access to the Whois database, +and may modify these terms at any time. diff --git a/spec/tlds.yml b/spec/tlds.yml index 8363b810..dc14d873 100644 --- a/spec/tlds.yml +++ b/spec/tlds.yml @@ -1394,7 +1394,39 @@ xn--ngbc5azd: _server: whois.nic.xn--ngbc5azd _subdir: xn--ngbc5azd +app: + _server: whois.nic.google + _subdir: app + status_available: u34jedzcq.app + status_registered: google.app + +dev: + _server: whois.nic.google + _subdir: dev + status_available: u34jedzcq.dev + status_registered: google.dev + +how: + _server: whois.nic.google + _subdir: how + status_available: u34jedzcq.how + status_registered: google.how + +page: + _server: whois.nic.google + _subdir: page + status_available: u34jedzcq.page + status_registered: google.page + +soy: + _server: whois.nic.google + _subdir: soy + status_available: u34jedzcq.soy + status_registered: google.soy + // .みんな xn--q9jyb4c: - _server: domain-registry-whois.l.google.com + _server: whois.nic.google _subdir: xn--q9jyb4c + status_available: u34jedzcq.xn--q9jyb4c + status_registered: google.xn--q9jyb4c diff --git a/spec/whois/parsers/responses/whois.nic.google/app/status_available_spec.rb b/spec/whois/parsers/responses/whois.nic.google/app/status_available_spec.rb new file mode 100644 index 00000000..6f01ffb2 --- /dev/null +++ b/spec/whois/parsers/responses/whois.nic.google/app/status_available_spec.rb @@ -0,0 +1,93 @@ +# encoding: utf-8 + +# This file is autogenerated. Do not edit it manually. +# If you want change the content of this file, edit +# +# /spec/fixtures/responses/whois.nic.google/app/status_available.expected +# +# and regenerate the tests with the following rake task +# +# $ rake spec:generate +# + +require 'spec_helper' +require 'whois/parsers/whois.nic.google.rb' + +describe Whois::Parsers::WhoisNicGoogle, "status_available.expected" do + + subject do + file = fixture("responses", "whois.nic.google/app/status_available.txt") + part = Whois::Record::Part.new(body: File.read(file)) + described_class.new(part) + end + + describe "#domain" do + it do + expect(subject.domain).to eq(nil) + end + end + describe "#domain_id" do + it do + expect(subject.domain_id).to eq(nil) + end + end + describe "#status" do + it do + expect(subject.status).to eq(:available) + end + end + describe "#available?" do + it do + expect(subject.available?).to eq(true) + end + end + describe "#registered?" do + it do + expect(subject.registered?).to eq(false) + end + end + describe "#created_on" do + it do + expect(subject.created_on).to eq(nil) + end + end + describe "#updated_on" do + it do + expect(subject.updated_on).to eq(nil) + end + end + describe "#expires_on" do + it do + expect(subject.expires_on).to eq(nil) + end + end + describe "#registrar" do + it do + expect(subject.registrar).to eq(nil) + end + end + describe "#registrant_contacts" do + it do + expect(subject.registrant_contacts).to be_a(Array) + expect(subject.registrant_contacts).to eq([]) + end + end + describe "#admin_contacts" do + it do + expect(subject.admin_contacts).to be_a(Array) + expect(subject.admin_contacts).to eq([]) + end + end + describe "#technical_contacts" do + it do + expect(subject.technical_contacts).to be_a(Array) + expect(subject.technical_contacts).to eq([]) + end + end + describe "#nameservers" do + it do + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers).to eq([]) + end + end +end diff --git a/spec/whois/parsers/responses/whois.nic.google/app/status_registered_spec.rb b/spec/whois/parsers/responses/whois.nic.google/app/status_registered_spec.rb new file mode 100644 index 00000000..6bcee07f --- /dev/null +++ b/spec/whois/parsers/responses/whois.nic.google/app/status_registered_spec.rb @@ -0,0 +1,98 @@ +# encoding: utf-8 + +# This file is autogenerated. Do not edit it manually. +# If you want change the content of this file, edit +# +# /spec/fixtures/responses/whois.nic.google/app/status_registered.expected +# +# and regenerate the tests with the following rake task +# +# $ rake spec:generate +# + +require 'spec_helper' +require 'whois/parsers/whois.nic.google.rb' + +describe Whois::Parsers::WhoisNicGoogle, "status_registered.expected" do + + subject do + file = fixture("responses", "whois.nic.google/app/status_registered.txt") + part = Whois::Record::Part.new(body: File.read(file)) + described_class.new(part) + end + + describe "#domain" do + it do + expect(subject.domain).to eq("google.app") + end + end + describe "#domain_id" do + it do + expect(subject.domain_id).to eq("2C5A4BAFF-APP") + end + end + describe "#status" do + it do + expect(subject.status).to eq(:registered) + end + end + describe "#available?" do + it do + expect(subject.available?).to eq(false) + end + end + describe "#registered?" do + it do + expect(subject.registered?).to eq(true) + end + end + describe "#created_on" do + it do + expect(subject.created_on).to be_a(Time) + expect(subject.created_on).to eq(DateTime.parse("2018-03-29T16:02:13Z")) + end + end + describe "#updated_on" do + it do + expect(subject.updated_on).to be_a(Time) + expect(subject.updated_on).to eq(DateTime.parse("2019-03-03T10:46:31Z")) + end + end + describe "#expires_on" do + it do + expect(subject.expires_on).to be_a(Time) + expect(subject.expires_on).to eq(DateTime.parse("2020-03-29T16:02:13Z")) + end + end + describe "#registrar" do + it do + expect(subject.registrar).to be_a(Whois::Parser::Registrar) + expect(subject.registrar.id).to eq("292") + expect(subject.registrar.name).to eq("MarkMonitor Inc.") + end + end + describe "#registrant_contacts" do + it do + expect(subject.registrant_contacts).to be_a(Array) + expect(subject.registrant_contacts.size).to eq(1) + expect(subject.registrant_contacts[0]).to be_a(Whois::Parser::Contact) + expect(subject.registrant_contacts[0].organization).to eq("Google LLC") + expect(subject.registrant_contacts[0].state).to eq("CA") + expect(subject.registrant_contacts[0].country_code).to eq("US") + end + end + describe "#nameservers" do + it do + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers.size).to eq(4) + expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[0].name).to eq("ns1.googledomains.com") + expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[1].name).to eq("ns2.googledomains.com") + expect(subject.nameservers[2]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[2].name).to eq("ns3.googledomains.com") + expect(subject.nameservers[3]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[3].name).to eq("ns4.googledomains.com") + end + end +end diff --git a/spec/whois/parsers/responses/whois.nic.google/dev/status_available_spec.rb b/spec/whois/parsers/responses/whois.nic.google/dev/status_available_spec.rb new file mode 100644 index 00000000..a31ecab3 --- /dev/null +++ b/spec/whois/parsers/responses/whois.nic.google/dev/status_available_spec.rb @@ -0,0 +1,93 @@ +# encoding: utf-8 + +# This file is autogenerated. Do not edit it manually. +# If you want change the content of this file, edit +# +# /spec/fixtures/responses/whois.nic.google/dev/status_available.expected +# +# and regenerate the tests with the following rake task +# +# $ rake spec:generate +# + +require 'spec_helper' +require 'whois/parsers/whois.nic.google.rb' + +describe Whois::Parsers::WhoisNicGoogle, "status_available.expected" do + + subject do + file = fixture("responses", "whois.nic.google/dev/status_available.txt") + part = Whois::Record::Part.new(body: File.read(file)) + described_class.new(part) + end + + describe "#domain" do + it do + expect(subject.domain).to eq(nil) + end + end + describe "#domain_id" do + it do + expect(subject.domain_id).to eq(nil) + end + end + describe "#status" do + it do + expect(subject.status).to eq(:available) + end + end + describe "#available?" do + it do + expect(subject.available?).to eq(true) + end + end + describe "#registered?" do + it do + expect(subject.registered?).to eq(false) + end + end + describe "#created_on" do + it do + expect(subject.created_on).to eq(nil) + end + end + describe "#updated_on" do + it do + expect(subject.updated_on).to eq(nil) + end + end + describe "#expires_on" do + it do + expect(subject.expires_on).to eq(nil) + end + end + describe "#registrar" do + it do + expect(subject.registrar).to eq(nil) + end + end + describe "#registrant_contacts" do + it do + expect(subject.registrant_contacts).to be_a(Array) + expect(subject.registrant_contacts).to eq([]) + end + end + describe "#admin_contacts" do + it do + expect(subject.admin_contacts).to be_a(Array) + expect(subject.admin_contacts).to eq([]) + end + end + describe "#technical_contacts" do + it do + expect(subject.technical_contacts).to be_a(Array) + expect(subject.technical_contacts).to eq([]) + end + end + describe "#nameservers" do + it do + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers).to eq([]) + end + end +end diff --git a/spec/whois/parsers/responses/whois.nic.google/dev/status_registered_spec.rb b/spec/whois/parsers/responses/whois.nic.google/dev/status_registered_spec.rb new file mode 100644 index 00000000..e2a0161b --- /dev/null +++ b/spec/whois/parsers/responses/whois.nic.google/dev/status_registered_spec.rb @@ -0,0 +1,98 @@ +# encoding: utf-8 + +# This file is autogenerated. Do not edit it manually. +# If you want change the content of this file, edit +# +# /spec/fixtures/responses/whois.nic.google/dev/status_registered.expected +# +# and regenerate the tests with the following rake task +# +# $ rake spec:generate +# + +require 'spec_helper' +require 'whois/parsers/whois.nic.google.rb' + +describe Whois::Parsers::WhoisNicGoogle, "status_registered.expected" do + + subject do + file = fixture("responses", "whois.nic.google/dev/status_registered.txt") + part = Whois::Record::Part.new(body: File.read(file)) + described_class.new(part) + end + + describe "#domain" do + it do + expect(subject.domain).to eq("google.dev") + end + end + describe "#domain_id" do + it do + expect(subject.domain_id).to eq("2CF25B78E-DEV") + end + end + describe "#status" do + it do + expect(subject.status).to eq(:registered) + end + end + describe "#available?" do + it do + expect(subject.available?).to eq(false) + end + end + describe "#registered?" do + it do + expect(subject.registered?).to eq(true) + end + end + describe "#created_on" do + it do + expect(subject.created_on).to be_a(Time) + expect(subject.created_on).to eq(DateTime.parse("2018-06-13T22:30:20Z")) + end + end + describe "#updated_on" do + it do + expect(subject.updated_on).to be_a(Time) + expect(subject.updated_on).to eq(DateTime.parse("2019-06-13T22:30:20Z")) + end + end + describe "#expires_on" do + it do + expect(subject.expires_on).to be_a(Time) + expect(subject.expires_on).to eq(DateTime.parse("2020-06-13T22:30:20Z")) + end + end + describe "#registrar" do + it do + expect(subject.registrar).to be_a(Whois::Parser::Registrar) + expect(subject.registrar.id).to eq("9998") + expect(subject.registrar.name).to eq("Charleston Road Registry Billable") + end + end + describe "#registrant_contacts" do + it do + expect(subject.registrant_contacts).to be_a(Array) + expect(subject.registrant_contacts.size).to eq(1) + expect(subject.registrant_contacts[0]).to be_a(Whois::Parser::Contact) + expect(subject.registrant_contacts[0].organization).to eq("Charleston Road Registry, Inc.") + expect(subject.registrant_contacts[0].state).to eq("CA") + expect(subject.registrant_contacts[0].country_code).to eq("US") + end + end + describe "#nameservers" do + it do + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers.size).to eq(4) + expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[0].name).to eq("ns1.googledomains.com") + expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[1].name).to eq("ns2.googledomains.com") + expect(subject.nameservers[2]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[2].name).to eq("ns3.googledomains.com") + expect(subject.nameservers[3]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[3].name).to eq("ns4.googledomains.com") + end + end +end diff --git a/spec/whois/parsers/responses/whois.nic.google/how/status_available_spec.rb b/spec/whois/parsers/responses/whois.nic.google/how/status_available_spec.rb new file mode 100644 index 00000000..d13f36c6 --- /dev/null +++ b/spec/whois/parsers/responses/whois.nic.google/how/status_available_spec.rb @@ -0,0 +1,93 @@ +# encoding: utf-8 + +# This file is autogenerated. Do not edit it manually. +# If you want change the content of this file, edit +# +# /spec/fixtures/responses/whois.nic.google/how/status_available.expected +# +# and regenerate the tests with the following rake task +# +# $ rake spec:generate +# + +require 'spec_helper' +require 'whois/parsers/whois.nic.google.rb' + +describe Whois::Parsers::WhoisNicGoogle, "status_available.expected" do + + subject do + file = fixture("responses", "whois.nic.google/how/status_available.txt") + part = Whois::Record::Part.new(body: File.read(file)) + described_class.new(part) + end + + describe "#domain" do + it do + expect(subject.domain).to eq(nil) + end + end + describe "#domain_id" do + it do + expect(subject.domain_id).to eq(nil) + end + end + describe "#status" do + it do + expect(subject.status).to eq(:available) + end + end + describe "#available?" do + it do + expect(subject.available?).to eq(true) + end + end + describe "#registered?" do + it do + expect(subject.registered?).to eq(false) + end + end + describe "#created_on" do + it do + expect(subject.created_on).to eq(nil) + end + end + describe "#updated_on" do + it do + expect(subject.updated_on).to eq(nil) + end + end + describe "#expires_on" do + it do + expect(subject.expires_on).to eq(nil) + end + end + describe "#registrar" do + it do + expect(subject.registrar).to eq(nil) + end + end + describe "#registrant_contacts" do + it do + expect(subject.registrant_contacts).to be_a(Array) + expect(subject.registrant_contacts).to eq([]) + end + end + describe "#admin_contacts" do + it do + expect(subject.admin_contacts).to be_a(Array) + expect(subject.admin_contacts).to eq([]) + end + end + describe "#technical_contacts" do + it do + expect(subject.technical_contacts).to be_a(Array) + expect(subject.technical_contacts).to eq([]) + end + end + describe "#nameservers" do + it do + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers).to eq([]) + end + end +end diff --git a/spec/whois/parsers/responses/whois.nic.google/how/status_registered_spec.rb b/spec/whois/parsers/responses/whois.nic.google/how/status_registered_spec.rb new file mode 100644 index 00000000..b449aeae --- /dev/null +++ b/spec/whois/parsers/responses/whois.nic.google/how/status_registered_spec.rb @@ -0,0 +1,98 @@ +# encoding: utf-8 + +# This file is autogenerated. Do not edit it manually. +# If you want change the content of this file, edit +# +# /spec/fixtures/responses/whois.nic.google/how/status_registered.expected +# +# and regenerate the tests with the following rake task +# +# $ rake spec:generate +# + +require 'spec_helper' +require 'whois/parsers/whois.nic.google.rb' + +describe Whois::Parsers::WhoisNicGoogle, "status_registered.expected" do + + subject do + file = fixture("responses", "whois.nic.google/how/status_registered.txt") + part = Whois::Record::Part.new(body: File.read(file)) + described_class.new(part) + end + + describe "#domain" do + it do + expect(subject.domain).to eq("google.how") + end + end + describe "#domain_id" do + it do + expect(subject.domain_id).to eq("62CF6AF-HOW") + end + end + describe "#status" do + it do + expect(subject.status).to eq(:registered) + end + end + describe "#available?" do + it do + expect(subject.available?).to eq(false) + end + end + describe "#registered?" do + it do + expect(subject.registered?).to eq(true) + end + end + describe "#created_on" do + it do + expect(subject.created_on).to be_a(Time) + expect(subject.created_on).to eq(DateTime.parse("2015-01-12T16:14:39Z")) + end + end + describe "#updated_on" do + it do + expect(subject.updated_on).to be_a(Time) + expect(subject.updated_on).to eq(DateTime.parse("2019-02-14T19:53:11Z")) + end + end + describe "#expires_on" do + it do + expect(subject.expires_on).to be_a(Time) + expect(subject.expires_on).to eq(DateTime.parse("2020-01-12T16:14:39Z")) + end + end + describe "#registrar" do + it do + expect(subject.registrar).to be_a(Whois::Parser::Registrar) + expect(subject.registrar.id).to eq("292") + expect(subject.registrar.name).to eq("MarkMonitor Inc.") + end + end + describe "#registrant_contacts" do + it do + expect(subject.registrant_contacts).to be_a(Array) + expect(subject.registrant_contacts.size).to eq(1) + expect(subject.registrant_contacts[0]).to be_a(Whois::Parser::Contact) + expect(subject.registrant_contacts[0].organization).to eq("Google LLC") + expect(subject.registrant_contacts[0].state).to eq("CA") + expect(subject.registrant_contacts[0].country_code).to eq("US") + end + end + describe "#nameservers" do + it do + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers.size).to eq(4) + expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[0].name).to eq("ns1.googledomains.com") + expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[1].name).to eq("ns2.googledomains.com") + expect(subject.nameservers[2]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[2].name).to eq("ns3.googledomains.com") + expect(subject.nameservers[3]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[3].name).to eq("ns4.googledomains.com") + end + end +end diff --git a/spec/whois/parsers/responses/whois.nic.google/page/status_available_spec.rb b/spec/whois/parsers/responses/whois.nic.google/page/status_available_spec.rb new file mode 100644 index 00000000..bf8d58ba --- /dev/null +++ b/spec/whois/parsers/responses/whois.nic.google/page/status_available_spec.rb @@ -0,0 +1,93 @@ +# encoding: utf-8 + +# This file is autogenerated. Do not edit it manually. +# If you want change the content of this file, edit +# +# /spec/fixtures/responses/whois.nic.google/page/status_available.expected +# +# and regenerate the tests with the following rake task +# +# $ rake spec:generate +# + +require 'spec_helper' +require 'whois/parsers/whois.nic.google.rb' + +describe Whois::Parsers::WhoisNicGoogle, "status_available.expected" do + + subject do + file = fixture("responses", "whois.nic.google/page/status_available.txt") + part = Whois::Record::Part.new(body: File.read(file)) + described_class.new(part) + end + + describe "#domain" do + it do + expect(subject.domain).to eq(nil) + end + end + describe "#domain_id" do + it do + expect(subject.domain_id).to eq(nil) + end + end + describe "#status" do + it do + expect(subject.status).to eq(:available) + end + end + describe "#available?" do + it do + expect(subject.available?).to eq(true) + end + end + describe "#registered?" do + it do + expect(subject.registered?).to eq(false) + end + end + describe "#created_on" do + it do + expect(subject.created_on).to eq(nil) + end + end + describe "#updated_on" do + it do + expect(subject.updated_on).to eq(nil) + end + end + describe "#expires_on" do + it do + expect(subject.expires_on).to eq(nil) + end + end + describe "#registrar" do + it do + expect(subject.registrar).to eq(nil) + end + end + describe "#registrant_contacts" do + it do + expect(subject.registrant_contacts).to be_a(Array) + expect(subject.registrant_contacts).to eq([]) + end + end + describe "#admin_contacts" do + it do + expect(subject.admin_contacts).to be_a(Array) + expect(subject.admin_contacts).to eq([]) + end + end + describe "#technical_contacts" do + it do + expect(subject.technical_contacts).to be_a(Array) + expect(subject.technical_contacts).to eq([]) + end + end + describe "#nameservers" do + it do + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers).to eq([]) + end + end +end diff --git a/spec/whois/parsers/responses/whois.nic.google/page/status_registered_spec.rb b/spec/whois/parsers/responses/whois.nic.google/page/status_registered_spec.rb new file mode 100644 index 00000000..48f086aa --- /dev/null +++ b/spec/whois/parsers/responses/whois.nic.google/page/status_registered_spec.rb @@ -0,0 +1,78 @@ +# encoding: utf-8 + +# This file is autogenerated. Do not edit it manually. +# If you want change the content of this file, edit +# +# /spec/fixtures/responses/whois.nic.google/page/status_registered.expected +# +# and regenerate the tests with the following rake task +# +# $ rake spec:generate +# + +require 'spec_helper' +require 'whois/parsers/whois.nic.google.rb' + +describe Whois::Parsers::WhoisNicGoogle, "status_registered.expected" do + + subject do + file = fixture("responses", "whois.nic.google/page/status_registered.txt") + part = Whois::Record::Part.new(body: File.read(file)) + described_class.new(part) + end + + describe "#domain" do + it do + expect(subject.domain).to eq("google.page") + end + end + describe "#domain_id" do + it do + expect(subject.domain_id).to eq("2D55CC686-PAGE") + end + end + describe "#status" do + it do + expect(subject.status).to eq(:registered) + end + end + describe "#available?" do + it do + expect(subject.available?).to eq(false) + end + end + describe "#registered?" do + it do + expect(subject.registered?).to eq(true) + end + end + describe "#created_on" do + it do + expect(subject.created_on).to be_a(Time) + expect(subject.created_on).to eq(DateTime.parse("2018-08-13T21:29:41Z")) + end + end + describe "#expires_on" do + it do + expect(subject.expires_on).to be_a(Time) + expect(subject.expires_on).to eq(DateTime.parse("2019-08-13T21:29:41Z")) + end + end + describe "#registrar" do + it do + expect(subject.registrar).to be_a(Whois::Parser::Registrar) + expect(subject.registrar.id).to eq("9998") + expect(subject.registrar.name).to eq("Charleston Road Registry Billable") + end + end + describe "#registrant_contacts" do + it do + expect(subject.registrant_contacts).to be_a(Array) + expect(subject.registrant_contacts.size).to eq(1) + expect(subject.registrant_contacts[0]).to be_a(Whois::Parser::Contact) + expect(subject.registrant_contacts[0].organization).to eq("Charleston Road Registry, Inc.") + expect(subject.registrant_contacts[0].state).to eq("CA") + expect(subject.registrant_contacts[0].country_code).to eq("US") + end + end +end diff --git a/spec/whois/parsers/responses/whois.nic.google/soy/status_available_spec.rb b/spec/whois/parsers/responses/whois.nic.google/soy/status_available_spec.rb new file mode 100644 index 00000000..14943ef5 --- /dev/null +++ b/spec/whois/parsers/responses/whois.nic.google/soy/status_available_spec.rb @@ -0,0 +1,93 @@ +# encoding: utf-8 + +# This file is autogenerated. Do not edit it manually. +# If you want change the content of this file, edit +# +# /spec/fixtures/responses/whois.nic.google/soy/status_available.expected +# +# and regenerate the tests with the following rake task +# +# $ rake spec:generate +# + +require 'spec_helper' +require 'whois/parsers/whois.nic.google.rb' + +describe Whois::Parsers::WhoisNicGoogle, "status_available.expected" do + + subject do + file = fixture("responses", "whois.nic.google/soy/status_available.txt") + part = Whois::Record::Part.new(body: File.read(file)) + described_class.new(part) + end + + describe "#domain" do + it do + expect(subject.domain).to eq(nil) + end + end + describe "#domain_id" do + it do + expect(subject.domain_id).to eq(nil) + end + end + describe "#status" do + it do + expect(subject.status).to eq(:available) + end + end + describe "#available?" do + it do + expect(subject.available?).to eq(true) + end + end + describe "#registered?" do + it do + expect(subject.registered?).to eq(false) + end + end + describe "#created_on" do + it do + expect(subject.created_on).to eq(nil) + end + end + describe "#updated_on" do + it do + expect(subject.updated_on).to eq(nil) + end + end + describe "#expires_on" do + it do + expect(subject.expires_on).to eq(nil) + end + end + describe "#registrar" do + it do + expect(subject.registrar).to eq(nil) + end + end + describe "#registrant_contacts" do + it do + expect(subject.registrant_contacts).to be_a(Array) + expect(subject.registrant_contacts).to eq([]) + end + end + describe "#admin_contacts" do + it do + expect(subject.admin_contacts).to be_a(Array) + expect(subject.admin_contacts).to eq([]) + end + end + describe "#technical_contacts" do + it do + expect(subject.technical_contacts).to be_a(Array) + expect(subject.technical_contacts).to eq([]) + end + end + describe "#nameservers" do + it do + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers).to eq([]) + end + end +end diff --git a/spec/whois/parsers/responses/whois.nic.google/soy/status_registered_spec.rb b/spec/whois/parsers/responses/whois.nic.google/soy/status_registered_spec.rb new file mode 100644 index 00000000..fbb14569 --- /dev/null +++ b/spec/whois/parsers/responses/whois.nic.google/soy/status_registered_spec.rb @@ -0,0 +1,98 @@ +# encoding: utf-8 + +# This file is autogenerated. Do not edit it manually. +# If you want change the content of this file, edit +# +# /spec/fixtures/responses/whois.nic.google/soy/status_registered.expected +# +# and regenerate the tests with the following rake task +# +# $ rake spec:generate +# + +require 'spec_helper' +require 'whois/parsers/whois.nic.google.rb' + +describe Whois::Parsers::WhoisNicGoogle, "status_registered.expected" do + + subject do + file = fixture("responses", "whois.nic.google/soy/status_registered.txt") + part = Whois::Record::Part.new(body: File.read(file)) + described_class.new(part) + end + + describe "#domain" do + it do + expect(subject.domain).to eq("google.soy") + end + end + describe "#domain_id" do + it do + expect(subject.domain_id).to eq("88628D1-SOY") + end + end + describe "#status" do + it do + expect(subject.status).to eq(:registered) + end + end + describe "#available?" do + it do + expect(subject.available?).to eq(false) + end + end + describe "#registered?" do + it do + expect(subject.registered?).to eq(true) + end + end + describe "#created_on" do + it do + expect(subject.created_on).to be_a(Time) + expect(subject.created_on).to eq(DateTime.parse("2014-12-01T21:58:34Z")) + end + end + describe "#updated_on" do + it do + expect(subject.updated_on).to be_a(Time) + expect(subject.updated_on).to eq(DateTime.parse("2019-02-14T19:53:13Z")) + end + end + describe "#expires_on" do + it do + expect(subject.expires_on).to be_a(Time) + expect(subject.expires_on).to eq(DateTime.parse("2019-12-01T21:58:34Z")) + end + end + describe "#registrar" do + it do + expect(subject.registrar).to be_a(Whois::Parser::Registrar) + expect(subject.registrar.id).to eq("292") + expect(subject.registrar.name).to eq("MarkMonitor Inc.") + end + end + describe "#registrant_contacts" do + it do + expect(subject.registrant_contacts).to be_a(Array) + expect(subject.registrant_contacts.size).to eq(1) + expect(subject.registrant_contacts[0]).to be_a(Whois::Parser::Contact) + expect(subject.registrant_contacts[0].organization).to eq("Google LLC") + expect(subject.registrant_contacts[0].state).to eq("CA") + expect(subject.registrant_contacts[0].country_code).to eq("US") + end + end + describe "#nameservers" do + it do + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers.size).to eq(4) + expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[0].name).to eq("ns1.googledomains.com") + expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[1].name).to eq("ns2.googledomains.com") + expect(subject.nameservers[2]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[2].name).to eq("ns3.googledomains.com") + expect(subject.nameservers[3]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[3].name).to eq("ns4.googledomains.com") + end + end +end diff --git a/spec/whois/parsers/responses/whois.nic.google/xn--q9jyb4c/status_available_spec.rb b/spec/whois/parsers/responses/whois.nic.google/xn--q9jyb4c/status_available_spec.rb new file mode 100644 index 00000000..9a88dace --- /dev/null +++ b/spec/whois/parsers/responses/whois.nic.google/xn--q9jyb4c/status_available_spec.rb @@ -0,0 +1,93 @@ +# encoding: utf-8 + +# This file is autogenerated. Do not edit it manually. +# If you want change the content of this file, edit +# +# /spec/fixtures/responses/whois.nic.google/xn--q9jyb4c/status_available.expected +# +# and regenerate the tests with the following rake task +# +# $ rake spec:generate +# + +require 'spec_helper' +require 'whois/parsers/whois.nic.google.rb' + +describe Whois::Parsers::WhoisNicGoogle, "status_available.expected" do + + subject do + file = fixture("responses", "whois.nic.google/xn--q9jyb4c/status_available.txt") + part = Whois::Record::Part.new(body: File.read(file)) + described_class.new(part) + end + + describe "#domain" do + it do + expect(subject.domain).to eq(nil) + end + end + describe "#domain_id" do + it do + expect(subject.domain_id).to eq(nil) + end + end + describe "#status" do + it do + expect(subject.status).to eq(:available) + end + end + describe "#available?" do + it do + expect(subject.available?).to eq(true) + end + end + describe "#registered?" do + it do + expect(subject.registered?).to eq(false) + end + end + describe "#created_on" do + it do + expect(subject.created_on).to eq(nil) + end + end + describe "#updated_on" do + it do + expect(subject.updated_on).to eq(nil) + end + end + describe "#expires_on" do + it do + expect(subject.expires_on).to eq(nil) + end + end + describe "#registrar" do + it do + expect(subject.registrar).to eq(nil) + end + end + describe "#registrant_contacts" do + it do + expect(subject.registrant_contacts).to be_a(Array) + expect(subject.registrant_contacts).to eq([]) + end + end + describe "#admin_contacts" do + it do + expect(subject.admin_contacts).to be_a(Array) + expect(subject.admin_contacts).to eq([]) + end + end + describe "#technical_contacts" do + it do + expect(subject.technical_contacts).to be_a(Array) + expect(subject.technical_contacts).to eq([]) + end + end + describe "#nameservers" do + it do + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers).to eq([]) + end + end +end diff --git a/spec/whois/parsers/responses/whois.nic.google/xn--q9jyb4c/status_registered_spec.rb b/spec/whois/parsers/responses/whois.nic.google/xn--q9jyb4c/status_registered_spec.rb new file mode 100644 index 00000000..fabf1336 --- /dev/null +++ b/spec/whois/parsers/responses/whois.nic.google/xn--q9jyb4c/status_registered_spec.rb @@ -0,0 +1,98 @@ +# encoding: utf-8 + +# This file is autogenerated. Do not edit it manually. +# If you want change the content of this file, edit +# +# /spec/fixtures/responses/whois.nic.google/xn--q9jyb4c/status_registered.expected +# +# and regenerate the tests with the following rake task +# +# $ rake spec:generate +# + +require 'spec_helper' +require 'whois/parsers/whois.nic.google.rb' + +describe Whois::Parsers::WhoisNicGoogle, "status_registered.expected" do + + subject do + file = fixture("responses", "whois.nic.google/xn--q9jyb4c/status_registered.txt") + part = Whois::Record::Part.new(body: File.read(file)) + described_class.new(part) + end + + describe "#domain" do + it do + expect(subject.domain).to eq("google.xn--q9jyb4c") + end + end + describe "#domain_id" do + it do + expect(subject.domain_id).to eq("C176ED-Q9JYB4C") + end + end + describe "#status" do + it do + expect(subject.status).to eq(:registered) + end + end + describe "#available?" do + it do + expect(subject.available?).to eq(false) + end + end + describe "#registered?" do + it do + expect(subject.registered?).to eq(true) + end + end + describe "#created_on" do + it do + expect(subject.created_on).to be_a(Time) + expect(subject.created_on).to eq(DateTime.parse("2014-03-04T19:45:32Z")) + end + end + describe "#updated_on" do + it do + expect(subject.updated_on).to be_a(Time) + expect(subject.updated_on).to eq(DateTime.parse("2019-02-05T10:39:55Z")) + end + end + describe "#expires_on" do + it do + expect(subject.expires_on).to be_a(Time) + expect(subject.expires_on).to eq(DateTime.parse("2020-03-04T19:45:32Z")) + end + end + describe "#registrar" do + it do + expect(subject.registrar).to be_a(Whois::Parser::Registrar) + expect(subject.registrar.id).to eq("292") + expect(subject.registrar.name).to eq("MarkMonitor Inc.") + end + end + describe "#registrant_contacts" do + it do + expect(subject.registrant_contacts).to be_a(Array) + expect(subject.registrant_contacts.size).to eq(1) + expect(subject.registrant_contacts[0]).to be_a(Whois::Parser::Contact) + expect(subject.registrant_contacts[0].organization).to eq("Google Inc.") + expect(subject.registrant_contacts[0].state).to eq("CA") + expect(subject.registrant_contacts[0].country_code).to eq("US") + end + end + describe "#nameservers" do + it do + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers.size).to eq(4) + expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[0].name).to eq("ns1.googledomains.com") + expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[1].name).to eq("ns2.googledomains.com") + expect(subject.nameservers[2]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[2].name).to eq("ns3.googledomains.com") + expect(subject.nameservers[3]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[3].name).to eq("ns4.googledomains.com") + end + end +end From bbc440138da94fce799cef86a586965ad0f7da13 Mon Sep 17 00:00:00 2001 From: Adrien Rey-Jarthon Date: Tue, 23 Nov 2021 15:43:44 +0100 Subject: [PATCH 11/29] Added parser for .WORLD tld --- CHANGELOG.md | 1 + lib/whois/parsers/whois.nic.world.rb | 28 ++++ .../world/status_available.expected | 46 ++++++ .../world/status_available.txt | 3 + .../world/status_registered.expected | 95 ++++++++++++ .../world/status_registered.txt | 61 ++++++++ .../world/status_available_spec.rb | 93 ++++++++++++ .../world/status_registered_spec.rb | 142 ++++++++++++++++++ 8 files changed, 469 insertions(+) create mode 100644 lib/whois/parsers/whois.nic.world.rb create mode 100644 spec/fixtures/responses/whois.nic.world/world/status_available.expected create mode 100644 spec/fixtures/responses/whois.nic.world/world/status_available.txt create mode 100644 spec/fixtures/responses/whois.nic.world/world/status_registered.expected create mode 100644 spec/fixtures/responses/whois.nic.world/world/status_registered.txt create mode 100644 spec/whois/parsers/responses/whois.nic.world/world/status_available_spec.rb create mode 100644 spec/whois/parsers/responses/whois.nic.world/world/status_registered_spec.rb diff --git a/CHANGELOG.md b/CHANGELOG.md index 26d9f24c..581086f0 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,7 @@ This project uses [Semantic Versioning 2.0.0](http://semver.org/). #### master +- NEW: Added parser for .WORLD tld - NEW: Add whois.nic.google (support for .APP, .DEV, .HOW, .PAGE, .SOY) and update xn--q9jyb4c (.みんな) to use whois.nic.google (based on #124) Thanks @derekjc - NEW: Added parser for .CLOUD tld - FIX: Updated parser for .CO tld diff --git a/lib/whois/parsers/whois.nic.world.rb b/lib/whois/parsers/whois.nic.world.rb new file mode 100644 index 00000000..a5613ab8 --- /dev/null +++ b/lib/whois/parsers/whois.nic.world.rb @@ -0,0 +1,28 @@ +#-- +# Ruby Whois +# +# An intelligent pure Ruby WHOIS client and parser. +# +# Copyright (c) 2009-2018 Simone Carletti +#++ + + +require_relative 'base_icann_compliant' + + +module Whois + class Parsers + + # Parser for the whois.nic.cloud server. + # + # @see Whois::Parsers::Example + # The Example parser for the list of all available methods. + # + class WhoisNicWorld < BaseIcannCompliant + self.scanner = Scanners::BaseIcannCompliant, { + pattern_available: /^Domain not found\./ + } + end + + end +end diff --git a/spec/fixtures/responses/whois.nic.world/world/status_available.expected b/spec/fixtures/responses/whois.nic.world/world/status_available.expected new file mode 100644 index 00000000..9f23516a --- /dev/null +++ b/spec/fixtures/responses/whois.nic.world/world/status_available.expected @@ -0,0 +1,46 @@ +#domain + %s == nil + +#domain_id + %s == nil + + +#status + %s == :available + +#available? + %s == true + +#registered? + %s == false + + +#created_on + %s == nil + +#updated_on + %s == nil + +#expires_on + %s == nil + + +#registrar + %s == nil + +#registrant_contacts + %s %CLASS{array} + %s == [] + +#admin_contacts + %s %CLASS{array} + %s == [] + +#technical_contacts + %s %CLASS{array} + %s == [] + + +#nameservers + %s %CLASS{array} + %s == [] diff --git a/spec/fixtures/responses/whois.nic.world/world/status_available.txt b/spec/fixtures/responses/whois.nic.world/world/status_available.txt new file mode 100644 index 00000000..12727db3 --- /dev/null +++ b/spec/fixtures/responses/whois.nic.world/world/status_available.txt @@ -0,0 +1,3 @@ +Domain not found. + +Terms of Use: Donuts Inc. provides this Whois service for information purposes, and to assist persons in obtaining information about or related to a domain name registration record. Donuts does not guarantee its accuracy. Users accessing the Donuts Whois service agree to use the data only for lawful purposes, and under no circumstances may this data be used 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 registrar's own existing customers and b) enable high volume, automated, electronic processes that send queries or data to the systems of Donuts or any ICANN-accredited registrar, except as reasonably necessary to register domain names or modify existing registrations. When using the Donuts Whois service, please consider the following: The Whois service is not a replacement for standard EPP commands to the SRS service. Whois is not considered authoritative for registered domain objects. The Whois service may be scheduled for downtime during production or OT&E maintenance periods. Queries to the Whois services are throttled. If too many queries are received from a single IP address within a specified time, the service will begin to reject further queries for a period of time to prevent disruption of Whois service access. Abuse of the Whois system through data mining is mitigated by detecting and limiting bulk query access from single sources. Where applicable, the presence of a [Non-Public Data] tag indicates that such data is not made publicly available due to applicable data privacy laws or requirements. Should you wish to contact the registrant, please refer to the Whois records available through the registrar URL listed above. Access to non-public data may be provided, upon request, where it can be reasonably confirmed that the requester holds a specific legitimate interest and a proper legal basis for accessing the withheld data. Access to this data can be requested by submitting a request via the form found at https://donuts.domains/about/policies/whois-layered-access/ Donuts Inc. reserves the right to modify these terms at any time. By submitting this query, you agree to abide by this policy. diff --git a/spec/fixtures/responses/whois.nic.world/world/status_registered.expected b/spec/fixtures/responses/whois.nic.world/world/status_registered.expected new file mode 100644 index 00000000..bd139933 --- /dev/null +++ b/spec/fixtures/responses/whois.nic.world/world/status_registered.expected @@ -0,0 +1,95 @@ +#domain + %s == "solex.world" + +#domain_id + %s == "0bd73f47b47f436cac3ee5b20df18ef5-DONUTS" + + +#status + %s == :registered + +#available? + %s == false + +#registered? + %s == true + + +#created_on + %s %CLASS{time} + %s %TIME{2017-10-03 11:12:14 GMT} + +#updated_on + %s %CLASS{time} + %s %TIME{2021-10-06 14:58:38 GMT} + +#expires_on + %s %CLASS{time} + %s %TIME{2022-10-03 11:12:14 GMT} + + +#registrar + %s %CLASS{registrar} + %s.id == "433" + %s.name == "OVH SAS" + %s.url == "http://www.ovh.com" + +#registrant_contacts + %s %CLASS{array} + %s %SIZE{1} + %s[0] %CLASS{contact} + %s[0].type == Whois::Parser::Contact::TYPE_REGISTRANT + %s[0].id == "REDACTED FOR PRIVACY" + %s[0].name == "REDACTED FOR PRIVACY" + %s[0].organization == "" + %s[0].address == "REDACTED FOR PRIVACY" + %s[0].city == "REDACTED FOR PRIVACY" + %s[0].zip == "REDACTED FOR PRIVACY" + %s[0].state == "" + %s[0].country_code == "FR" + %s[0].phone == "REDACTED FOR PRIVACY ext: REDACTED FOR PRIVACY" + %s[0].fax == "REDACTED FOR PRIVACY ext: REDACTED FOR PRIVACY" + %s[0].email == "Please query the RDDS service of the Registrar of Record identified in this output for information on how to contact the Registrant, Admin, or Tech contact of the queried domain name." + +#admin_contacts + %s %CLASS{array} + %s %SIZE{1} + %s[0] %CLASS{contact} + %s[0].type == Whois::Parser::Contact::TYPE_ADMINISTRATIVE + %s[0].id == "REDACTED FOR PRIVACY" + %s[0].name == "REDACTED FOR PRIVACY" + %s[0].organization == "REDACTED FOR PRIVACY" + %s[0].address == "REDACTED FOR PRIVACY" + %s[0].city == "REDACTED FOR PRIVACY" + %s[0].zip == "REDACTED FOR PRIVACY" + %s[0].state == "REDACTED FOR PRIVACY" + %s[0].country_code == "REDACTED FOR PRIVACY" + %s[0].phone == "REDACTED FOR PRIVACY ext: REDACTED FOR PRIVACY" + %s[0].fax == "REDACTED FOR PRIVACY ext: REDACTED FOR PRIVACY" + %s[0].email == "Please query the RDDS service of the Registrar of Record identified in this output for information on how to contact the Registrant, Admin, or Tech contact of the queried domain name." + +#technical_contacts + %s %CLASS{array} + %s %SIZE{1} + %s[0] %CLASS{contact} + %s[0].type == Whois::Parser::Contact::TYPE_TECHNICAL + %s[0].id == "REDACTED FOR PRIVACY" + %s[0].name == "REDACTED FOR PRIVACY" + %s[0].organization == "REDACTED FOR PRIVACY" + %s[0].address == "REDACTED FOR PRIVACY" + %s[0].city == "REDACTED FOR PRIVACY" + %s[0].zip == "REDACTED FOR PRIVACY" + %s[0].state == "REDACTED FOR PRIVACY" + %s[0].country_code == "REDACTED FOR PRIVACY" + %s[0].phone == "REDACTED FOR PRIVACY ext: REDACTED FOR PRIVACY" + %s[0].fax == "REDACTED FOR PRIVACY ext: REDACTED FOR PRIVACY" + %s[0].email == "Please query the RDDS service of the Registrar of Record identified in this output for information on how to contact the Registrant, Admin, or Tech contact of the queried domain name." + + +#nameservers + %s %CLASS{array} + %s %SIZE{2} + %s[0] %CLASS{nameserver} + %s[0].name == "dns104.ovh.net" + %s[1] %CLASS{nameserver} + %s[1].name == "ns104.ovh.net" diff --git a/spec/fixtures/responses/whois.nic.world/world/status_registered.txt b/spec/fixtures/responses/whois.nic.world/world/status_registered.txt new file mode 100644 index 00000000..13a74a8a --- /dev/null +++ b/spec/fixtures/responses/whois.nic.world/world/status_registered.txt @@ -0,0 +1,61 @@ +Domain Name: solex.world +Registry Domain ID: 0bd73f47b47f436cac3ee5b20df18ef5-DONUTS +Registrar WHOIS Server: whois.ovh.com +Registrar URL: http://www.ovh.com +Updated Date: 2021-10-06T14:58:38Z +Creation Date: 2017-10-03T11:12:14Z +Registry Expiry Date: 2022-10-03T11:12:14Z +Registrar: OVH SAS +Registrar IANA ID: 433 +Registrar Abuse Contact Email: abuse@ovh.net +Registrar Abuse Contact Phone: +Domain Status: clientDeleteProhibited https://icann.org/epp#clientDeleteProhibited +Domain Status: clientTransferProhibited https://icann.org/epp#clientTransferProhibited +Registry Registrant ID: REDACTED FOR PRIVACY +Registrant Name: REDACTED FOR PRIVACY +Registrant Organization: +Registrant Street: REDACTED FOR PRIVACY +Registrant City: REDACTED FOR PRIVACY +Registrant State/Province: +Registrant Postal Code: REDACTED FOR PRIVACY +Registrant Country: FR +Registrant Phone: REDACTED FOR PRIVACY +Registrant Phone Ext: REDACTED FOR PRIVACY +Registrant Fax: REDACTED FOR PRIVACY +Registrant Fax Ext: REDACTED FOR PRIVACY +Registrant Email: Please query the RDDS service of the Registrar of Record identified in this output for information on how to contact the Registrant, Admin, or Tech contact of the queried domain name. +Registry Admin ID: REDACTED FOR PRIVACY +Admin Name: REDACTED FOR PRIVACY +Admin Organization: REDACTED FOR PRIVACY +Admin Street: REDACTED FOR PRIVACY +Admin City: REDACTED FOR PRIVACY +Admin State/Province: REDACTED FOR PRIVACY +Admin Postal Code: REDACTED FOR PRIVACY +Admin Country: REDACTED FOR PRIVACY +Admin Phone: REDACTED FOR PRIVACY +Admin Phone Ext: REDACTED FOR PRIVACY +Admin Fax: REDACTED FOR PRIVACY +Admin Fax Ext: REDACTED FOR PRIVACY +Admin Email: Please query the RDDS service of the Registrar of Record identified in this output for information on how to contact the Registrant, Admin, or Tech contact of the queried domain name. +Registry Tech ID: REDACTED FOR PRIVACY +Tech Name: REDACTED FOR PRIVACY +Tech Organization: REDACTED FOR PRIVACY +Tech Street: REDACTED FOR PRIVACY +Tech City: REDACTED FOR PRIVACY +Tech State/Province: REDACTED FOR PRIVACY +Tech Postal Code: REDACTED FOR PRIVACY +Tech Country: REDACTED FOR PRIVACY +Tech Phone: REDACTED FOR PRIVACY +Tech Phone Ext: REDACTED FOR PRIVACY +Tech Fax: REDACTED FOR PRIVACY +Tech Fax Ext: REDACTED FOR PRIVACY +Tech Email: Please query the RDDS service of the Registrar of Record identified in this output for information on how to contact the Registrant, Admin, or Tech contact of the queried domain name. +Name Server: dns104.ovh.net +Name Server: ns104.ovh.net +DNSSEC: unsigned +URL of the ICANN Whois Inaccuracy Complaint Form: https://www.icann.org/wicf/ +>>> Last update of WHOIS database: 2021-11-23T14:30:35Z <<< + +For more information on Whois status codes, please visit https://icann.org/epp + +Terms of Use: Donuts Inc. provides this Whois service for information purposes, and to assist persons in obtaining information about or related to a domain name registration record. Donuts does not guarantee its accuracy. Users accessing the Donuts Whois service agree to use the data only for lawful purposes, and under no circumstances may this data be used 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 registrar's own existing customers and b) enable high volume, automated, electronic processes that send queries or data to the systems of Donuts or any ICANN-accredited registrar, except as reasonably necessary to register domain names or modify existing registrations. When using the Donuts Whois service, please consider the following: The Whois service is not a replacement for standard EPP commands to the SRS service. Whois is not considered authoritative for registered domain objects. The Whois service may be scheduled for downtime during production or OT&E maintenance periods. Queries to the Whois services are throttled. If too many queries are received from a single IP address within a specified time, the service will begin to reject further queries for a period of time to prevent disruption of Whois service access. Abuse of the Whois system through data mining is mitigated by detecting and limiting bulk query access from single sources. Where applicable, the presence of a [Non-Public Data] tag indicates that such data is not made publicly available due to applicable data privacy laws or requirements. Should you wish to contact the registrant, please refer to the Whois records available through the registrar URL listed above. Access to non-public data may be provided, upon request, where it can be reasonably confirmed that the requester holds a specific legitimate interest and a proper legal basis for accessing the withheld data. Access to this data can be requested by submitting a request via the form found at https://donuts.domains/about/policies/whois-layered-access/ Donuts Inc. reserves the right to modify these terms at any time. By submitting this query, you agree to abide by this policy. diff --git a/spec/whois/parsers/responses/whois.nic.world/world/status_available_spec.rb b/spec/whois/parsers/responses/whois.nic.world/world/status_available_spec.rb new file mode 100644 index 00000000..812fb7cb --- /dev/null +++ b/spec/whois/parsers/responses/whois.nic.world/world/status_available_spec.rb @@ -0,0 +1,93 @@ +# encoding: utf-8 + +# This file is autogenerated. Do not edit it manually. +# If you want change the content of this file, edit +# +# /spec/fixtures/responses/whois.nic.world/world/status_available.expected +# +# and regenerate the tests with the following rake task +# +# $ rake spec:generate +# + +require 'spec_helper' +require 'whois/parsers/whois.nic.world.rb' + +describe Whois::Parsers::WhoisNicWorld, "status_available.expected" do + + subject do + file = fixture("responses", "whois.nic.world/world/status_available.txt") + part = Whois::Record::Part.new(body: File.read(file)) + described_class.new(part) + end + + describe "#domain" do + it do + expect(subject.domain).to eq(nil) + end + end + describe "#domain_id" do + it do + expect(subject.domain_id).to eq(nil) + end + end + describe "#status" do + it do + expect(subject.status).to eq(:available) + end + end + describe "#available?" do + it do + expect(subject.available?).to eq(true) + end + end + describe "#registered?" do + it do + expect(subject.registered?).to eq(false) + end + end + describe "#created_on" do + it do + expect(subject.created_on).to eq(nil) + end + end + describe "#updated_on" do + it do + expect(subject.updated_on).to eq(nil) + end + end + describe "#expires_on" do + it do + expect(subject.expires_on).to eq(nil) + end + end + describe "#registrar" do + it do + expect(subject.registrar).to eq(nil) + end + end + describe "#registrant_contacts" do + it do + expect(subject.registrant_contacts).to be_a(Array) + expect(subject.registrant_contacts).to eq([]) + end + end + describe "#admin_contacts" do + it do + expect(subject.admin_contacts).to be_a(Array) + expect(subject.admin_contacts).to eq([]) + end + end + describe "#technical_contacts" do + it do + expect(subject.technical_contacts).to be_a(Array) + expect(subject.technical_contacts).to eq([]) + end + end + describe "#nameservers" do + it do + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers).to eq([]) + end + end +end diff --git a/spec/whois/parsers/responses/whois.nic.world/world/status_registered_spec.rb b/spec/whois/parsers/responses/whois.nic.world/world/status_registered_spec.rb new file mode 100644 index 00000000..ccb7872f --- /dev/null +++ b/spec/whois/parsers/responses/whois.nic.world/world/status_registered_spec.rb @@ -0,0 +1,142 @@ +# encoding: utf-8 + +# This file is autogenerated. Do not edit it manually. +# If you want change the content of this file, edit +# +# /spec/fixtures/responses/whois.nic.world/world/status_registered.expected +# +# and regenerate the tests with the following rake task +# +# $ rake spec:generate +# + +require 'spec_helper' +require 'whois/parsers/whois.nic.world.rb' + +describe Whois::Parsers::WhoisNicWorld, "status_registered.expected" do + + subject do + file = fixture("responses", "whois.nic.world/world/status_registered.txt") + part = Whois::Record::Part.new(body: File.read(file)) + described_class.new(part) + end + + describe "#domain" do + it do + expect(subject.domain).to eq("solex.world") + end + end + describe "#domain_id" do + it do + expect(subject.domain_id).to eq("0bd73f47b47f436cac3ee5b20df18ef5-DONUTS") + end + end + describe "#status" do + it do + expect(subject.status).to eq(:registered) + end + end + describe "#available?" do + it do + expect(subject.available?).to eq(false) + end + end + describe "#registered?" do + it do + expect(subject.registered?).to eq(true) + end + end + describe "#created_on" do + it do + expect(subject.created_on).to be_a(Time) + expect(subject.created_on).to eq(DateTime.parse("2017-10-03 11:12:14 GMT")) + end + end + describe "#updated_on" do + it do + expect(subject.updated_on).to be_a(Time) + expect(subject.updated_on).to eq(DateTime.parse("2021-10-06 14:58:38 GMT")) + end + end + describe "#expires_on" do + it do + expect(subject.expires_on).to be_a(Time) + expect(subject.expires_on).to eq(DateTime.parse("2022-10-03 11:12:14 GMT")) + end + end + describe "#registrar" do + it do + expect(subject.registrar).to be_a(Whois::Parser::Registrar) + expect(subject.registrar.id).to eq("433") + expect(subject.registrar.name).to eq("OVH SAS") + expect(subject.registrar.url).to eq("http://www.ovh.com") + end + end + describe "#registrant_contacts" do + it do + expect(subject.registrant_contacts).to be_a(Array) + expect(subject.registrant_contacts.size).to eq(1) + expect(subject.registrant_contacts[0]).to be_a(Whois::Parser::Contact) + expect(subject.registrant_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_REGISTRANT) + expect(subject.registrant_contacts[0].id).to eq("REDACTED FOR PRIVACY") + expect(subject.registrant_contacts[0].name).to eq("REDACTED FOR PRIVACY") + expect(subject.registrant_contacts[0].organization).to eq("") + expect(subject.registrant_contacts[0].address).to eq("REDACTED FOR PRIVACY") + expect(subject.registrant_contacts[0].city).to eq("REDACTED FOR PRIVACY") + expect(subject.registrant_contacts[0].zip).to eq("REDACTED FOR PRIVACY") + expect(subject.registrant_contacts[0].state).to eq("") + expect(subject.registrant_contacts[0].country_code).to eq("FR") + expect(subject.registrant_contacts[0].phone).to eq("REDACTED FOR PRIVACY ext: REDACTED FOR PRIVACY") + expect(subject.registrant_contacts[0].fax).to eq("REDACTED FOR PRIVACY ext: REDACTED FOR PRIVACY") + expect(subject.registrant_contacts[0].email).to eq("Please query the RDDS service of the Registrar of Record identified in this output for information on how to contact the Registrant, Admin, or Tech contact of the queried domain name.") + end + end + describe "#admin_contacts" do + it do + expect(subject.admin_contacts).to be_a(Array) + expect(subject.admin_contacts.size).to eq(1) + expect(subject.admin_contacts[0]).to be_a(Whois::Parser::Contact) + expect(subject.admin_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_ADMINISTRATIVE) + expect(subject.admin_contacts[0].id).to eq("REDACTED FOR PRIVACY") + expect(subject.admin_contacts[0].name).to eq("REDACTED FOR PRIVACY") + expect(subject.admin_contacts[0].organization).to eq("REDACTED FOR PRIVACY") + expect(subject.admin_contacts[0].address).to eq("REDACTED FOR PRIVACY") + expect(subject.admin_contacts[0].city).to eq("REDACTED FOR PRIVACY") + expect(subject.admin_contacts[0].zip).to eq("REDACTED FOR PRIVACY") + expect(subject.admin_contacts[0].state).to eq("REDACTED FOR PRIVACY") + expect(subject.admin_contacts[0].country_code).to eq("REDACTED FOR PRIVACY") + expect(subject.admin_contacts[0].phone).to eq("REDACTED FOR PRIVACY ext: REDACTED FOR PRIVACY") + expect(subject.admin_contacts[0].fax).to eq("REDACTED FOR PRIVACY ext: REDACTED FOR PRIVACY") + expect(subject.admin_contacts[0].email).to eq("Please query the RDDS service of the Registrar of Record identified in this output for information on how to contact the Registrant, Admin, or Tech contact of the queried domain name.") + end + end + describe "#technical_contacts" do + it do + expect(subject.technical_contacts).to be_a(Array) + expect(subject.technical_contacts.size).to eq(1) + expect(subject.technical_contacts[0]).to be_a(Whois::Parser::Contact) + expect(subject.technical_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_TECHNICAL) + expect(subject.technical_contacts[0].id).to eq("REDACTED FOR PRIVACY") + expect(subject.technical_contacts[0].name).to eq("REDACTED FOR PRIVACY") + expect(subject.technical_contacts[0].organization).to eq("REDACTED FOR PRIVACY") + expect(subject.technical_contacts[0].address).to eq("REDACTED FOR PRIVACY") + expect(subject.technical_contacts[0].city).to eq("REDACTED FOR PRIVACY") + expect(subject.technical_contacts[0].zip).to eq("REDACTED FOR PRIVACY") + expect(subject.technical_contacts[0].state).to eq("REDACTED FOR PRIVACY") + expect(subject.technical_contacts[0].country_code).to eq("REDACTED FOR PRIVACY") + expect(subject.technical_contacts[0].phone).to eq("REDACTED FOR PRIVACY ext: REDACTED FOR PRIVACY") + expect(subject.technical_contacts[0].fax).to eq("REDACTED FOR PRIVACY ext: REDACTED FOR PRIVACY") + expect(subject.technical_contacts[0].email).to eq("Please query the RDDS service of the Registrar of Record identified in this output for information on how to contact the Registrant, Admin, or Tech contact of the queried domain name.") + end + end + describe "#nameservers" do + it do + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers.size).to eq(2) + expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[0].name).to eq("dns104.ovh.net") + expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[1].name).to eq("ns104.ovh.net") + end + end +end From ed7068c39a9821b084eb59416e49d3f0a7567d83 Mon Sep 17 00:00:00 2001 From: Adrien Rey-Jarthon Date: Thu, 25 Nov 2021 14:44:09 +0100 Subject: [PATCH 12/29] Updated parser for .CA tld --- CHANGELOG.md | 1 + lib/whois/parsers/whois.cira.ca.rb | 173 +----------------- lib/whois/scanners/base_icann_compliant.rb | 10 +- lib/whois/scanners/whois.cira.ca.rb | 72 -------- .../status_available.expected | 2 +- .../ca/field_without_value.expected | 16 -- .../whois.cira.ca/ca/field_without_value.txt | 40 ---- .../property_status_autorenew_grace.expected | 8 - .../ca/property_status_autorenew_grace.txt | 43 ----- .../ca/property_status_available.expected | 8 - .../ca/property_status_available.txt | 9 - .../ca/property_status_pendingdelete.expected | 8 - .../ca/property_status_pendingdelete.txt | 20 -- .../ca/property_status_redemption.expected | 8 - .../ca/property_status_redemption.txt | 40 ---- .../ca/property_status_registered.expected | 8 - .../ca/property_status_registered.txt | 40 ---- .../ca/property_status_tobereleased.expected | 8 - .../ca/property_status_tobereleased.txt | 10 - .../ca/property_status_unavailable.txt | 11 -- .../ca/status_available.expected | 11 +- .../whois.cira.ca/ca/status_available.txt | 16 +- .../whois.cira.ca/ca/status_invalid.expected | 9 - .../whois.cira.ca/ca/status_invalid.txt | 11 -- .../ca/status_registered.expected | 87 ++++----- .../whois.cira.ca/ca/status_registered.txt | 125 ++++++++----- .../whois.cira.ca/ca/status_reserved.expected | 49 +++++ .../whois.cira.ca/ca/status_reserved.txt | 8 + .../status_available.expected | 2 +- spec/tlds.yml | 1 + .../whois.1und1.info/status_available_spec.rb | 2 +- .../ca/field_without_value_spec.rb | 43 ----- .../property_status_autorenew_grace_spec.rb | 39 ---- .../ca/property_status_available_spec.rb | 39 ---- .../ca/property_status_pendingdelete_spec.rb | 39 ---- .../ca/property_status_redemption_spec.rb | 39 ---- .../ca/property_status_registered_spec.rb | 39 ---- .../ca/property_status_tobereleased_spec.rb | 39 ---- .../whois.cira.ca/ca/status_available_spec.rb | 14 +- .../whois.cira.ca/ca/status_invalid_spec.rb | 39 ---- .../ca/status_registered_spec.rb | 88 ++++----- .../whois.cira.ca/ca/status_reserved_spec.rb | 98 ++++++++++ .../status_available_spec.rb | 2 +- 43 files changed, 347 insertions(+), 1027 deletions(-) delete mode 100644 lib/whois/scanners/whois.cira.ca.rb delete mode 100644 spec/fixtures/responses/whois.cira.ca/ca/field_without_value.expected delete mode 100644 spec/fixtures/responses/whois.cira.ca/ca/field_without_value.txt delete mode 100644 spec/fixtures/responses/whois.cira.ca/ca/property_status_autorenew_grace.expected delete mode 100644 spec/fixtures/responses/whois.cira.ca/ca/property_status_autorenew_grace.txt delete mode 100644 spec/fixtures/responses/whois.cira.ca/ca/property_status_available.expected delete mode 100644 spec/fixtures/responses/whois.cira.ca/ca/property_status_available.txt delete mode 100644 spec/fixtures/responses/whois.cira.ca/ca/property_status_pendingdelete.expected delete mode 100644 spec/fixtures/responses/whois.cira.ca/ca/property_status_pendingdelete.txt delete mode 100644 spec/fixtures/responses/whois.cira.ca/ca/property_status_redemption.expected delete mode 100644 spec/fixtures/responses/whois.cira.ca/ca/property_status_redemption.txt delete mode 100644 spec/fixtures/responses/whois.cira.ca/ca/property_status_registered.expected delete mode 100644 spec/fixtures/responses/whois.cira.ca/ca/property_status_registered.txt delete mode 100644 spec/fixtures/responses/whois.cira.ca/ca/property_status_tobereleased.expected delete mode 100644 spec/fixtures/responses/whois.cira.ca/ca/property_status_tobereleased.txt delete mode 100644 spec/fixtures/responses/whois.cira.ca/ca/property_status_unavailable.txt delete mode 100644 spec/fixtures/responses/whois.cira.ca/ca/status_invalid.expected delete mode 100644 spec/fixtures/responses/whois.cira.ca/ca/status_invalid.txt create mode 100644 spec/fixtures/responses/whois.cira.ca/ca/status_reserved.expected create mode 100644 spec/fixtures/responses/whois.cira.ca/ca/status_reserved.txt delete mode 100644 spec/whois/parsers/responses/whois.cira.ca/ca/field_without_value_spec.rb delete mode 100644 spec/whois/parsers/responses/whois.cira.ca/ca/property_status_autorenew_grace_spec.rb delete mode 100644 spec/whois/parsers/responses/whois.cira.ca/ca/property_status_available_spec.rb delete mode 100644 spec/whois/parsers/responses/whois.cira.ca/ca/property_status_pendingdelete_spec.rb delete mode 100644 spec/whois/parsers/responses/whois.cira.ca/ca/property_status_redemption_spec.rb delete mode 100644 spec/whois/parsers/responses/whois.cira.ca/ca/property_status_registered_spec.rb delete mode 100644 spec/whois/parsers/responses/whois.cira.ca/ca/property_status_tobereleased_spec.rb delete mode 100644 spec/whois/parsers/responses/whois.cira.ca/ca/status_invalid_spec.rb create mode 100644 spec/whois/parsers/responses/whois.cira.ca/ca/status_reserved_spec.rb diff --git a/CHANGELOG.md b/CHANGELOG.md index 581086f0..67f5e209 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,7 @@ This project uses [Semantic Versioning 2.0.0](http://semver.org/). #### master +- FIX: Updated parser for .CA tld - NEW: Added parser for .WORLD tld - NEW: Add whois.nic.google (support for .APP, .DEV, .HOW, .PAGE, .SOY) and update xn--q9jyb4c (.みんな) to use whois.nic.google (based on #124) Thanks @derekjc - NEW: Added parser for .CLOUD tld diff --git a/lib/whois/parsers/whois.cira.ca.rb b/lib/whois/parsers/whois.cira.ca.rb index c3e50d64..00cf35a5 100644 --- a/lib/whois/parsers/whois.cira.ca.rb +++ b/lib/whois/parsers/whois.cira.ca.rb @@ -7,8 +7,7 @@ #++ -require_relative 'base' -require 'whois/scanners/whois.cira.ca.rb' +require_relative 'base_icann_compliant' module Whois @@ -19,172 +18,16 @@ class Parsers # @see Whois::Parsers::Example # The Example parser for the list of all available methods. # - class WhoisCiraCa < Base - include Scanners::Scannable - - self.scanner = Scanners::WhoisCiraCa - + class WhoisCiraCa < BaseIcannCompliant + self.scanner = Scanners::BaseIcannCompliant, { + pattern_available: /^Not found: (.+)\n/, + pattern_reserved: /The domain name requested has usage restrictions applied to it.+\n/, + pattern_disclaimer: /^(%\n)*% Use of CIRA/ + } property_supported :disclaimer do - node("field:disclaimer") - end - - - property_supported :domain do - node("Domain name") - end - - property_not_supported :domain_id - - - property_supported :status do - if content_for_scanner =~ /Domain status:\s+(.+?)\n/ - case node("Domain status", &:downcase) - when "registered" - :registered - when "redemption" - :registered - when "auto-renew grace" - :registered - when "to be released" - :registered - when "pending delete" - :registered - when "available" - :available - when "unavailable" - :invalid - else - Whois::Parser.bug!(ParserError, "Unknown status `#{$1}'.") - end - else - Whois::Parser.bug!(ParserError, "Unable to parse status.") - end - end - - property_supported :available? do - status == :available - end - - property_supported :registered? do - !available? - end - - - property_supported :created_on do - node("Creation date") { |str| parse_time(str) } - end - - property_supported :updated_on do - node("Updated date") { |str| parse_time(str) } - end - - property_supported :expires_on do - node("Expiry date") { |str| parse_time(str) } - end - - - property_supported :registrar do - node("Registrar") do |hash| - Parser::Registrar.new( - id: hash["Number"], - name: hash["Name"], - ) - end - end - - - property_supported :registrant_contacts do - build_contact("Registrant", Parser::Contact::TYPE_REGISTRANT) - end - - property_supported :admin_contacts do - build_contact("Administrative contact", Parser::Contact::TYPE_ADMINISTRATIVE) - end - - property_supported :technical_contacts do - build_contact("Technical contact", Parser::Contact::TYPE_TECHNICAL) - end - - - property_supported :nameservers do - Array.wrap(node("nserver")).map do |line| - name, ipv4 = line.split(/\s+/) - Parser::Nameserver.new(:name => name, :ipv4 => ipv4) - end - end - - - # Nameservers are listed in the following formats: - # - # ns1.google.com - # ns2.google.com - # - # ns1.google.com 216.239.32.10 - # ns2.google.com 216.239.34.10 - # - property_supported :nameservers do - Array.wrap(node("field:nameservers")).map do |line| - name, ipv4 = line.strip.split(/\s+/) - Parser::Nameserver.new(:name => name, :ipv4 => ipv4) - end + node("field:disclaimer").gsub(/%\s/, '') # remove the "% " prefix in the disclaimer end - - - # Attempts to detect and returns the version. - # - # TODO: This is very empiric. - # Use the available status in combination with the creation date label. - # - # NEWPROPERTY - def version - cached_properties_fetch :version do - version = if content_for_scanner =~ /^% \(c\) (.+?) Canadian Internet Registration Authority/ - case $1 - when "2007" then "1" - when "2010" then "2" - end - end - version || Whois::Parser.bug!(ParserError, "Unable to detect version.") - end - end - - # NEWPROPERTY - def valid? - cached_properties_fetch(:valid?) do - !invalid? - end - end - - # NEWPROPERTY - def invalid? - cached_properties_fetch(:invalid?) do - status == :invalid - end - end - - - private - - def build_contact(element, type) - node(element) do |hash| - Parser::Contact.new( - :type => type, - :id => nil, - :name => hash["Name"], - :organization => nil, - :address => hash["Postal address"], - :city => nil, - :zip => nil, - :state => nil, - :country => nil, - :phone => hash["Phone"], - :fax => hash["Fax"], - :email => hash["Email"] - ) - end - end - end end diff --git a/lib/whois/scanners/base_icann_compliant.rb b/lib/whois/scanners/base_icann_compliant.rb index 67ca41e9..5b3ce189 100644 --- a/lib/whois/scanners/base_icann_compliant.rb +++ b/lib/whois/scanners/base_icann_compliant.rb @@ -11,16 +11,16 @@ class BaseIcannCompliant < Base :scan_available, :scan_reserved, :scan_throttled, - :scan_disclaimer, - :skip_empty_line, - :skip_blank_line, :scan_keyvalue, + :skip_blank_line, + :scan_disclaimer, :skip_end, ] tokenizer :scan_available do if settings[:pattern_available] && @input.skip_until(settings[:pattern_available]) @ast['status:available'] = true + @ast["Domain Name"] ||= @input[1] # Regexp first capture group if any end end @@ -31,7 +31,7 @@ class BaseIcannCompliant < Base end tokenizer :scan_reserved do - if settings[:pattern_reserved] && @input.scan(settings[:pattern_reserved]) + if settings[:pattern_reserved] && @input.skip_until(settings[:pattern_reserved]) @ast["status:reserved"] = true end end @@ -48,7 +48,7 @@ class BaseIcannCompliant < Base end tokenizer :scan_disclaimer do - if @input.match?(/^The Service is provided/) + if @input.match?(settings[:pattern_disclaimer] || /^The Service is provided/) @ast["field:disclaimer"] = _scan_lines_to_array(/^(.+)\n+/).join(" ") end end diff --git a/lib/whois/scanners/whois.cira.ca.rb b/lib/whois/scanners/whois.cira.ca.rb deleted file mode 100644 index 35396265..00000000 --- a/lib/whois/scanners/whois.cira.ca.rb +++ /dev/null @@ -1,72 +0,0 @@ -require_relative 'base' - -module Whois - module Scanners - - # Scanner for the whois.cira.ca record. - class WhoisCiraCa < Base - - self.tokenizers += [ - :skip_empty_line, - :scan_disclaimer, - :skip_comment, - :scan_header, - :scan_keyvalue, - :scan_nameserver, - ] - - - tokenizer :scan_disclaimer do - if @input.match?(/^% Use of CIRA/) - @ast["field:disclaimer"] = _scan_lines_to_array(/^%(.*)\n/).join("\n") - end - end - - tokenizer :scan_header do - if !@input.match?(/^\s/) && @input.scan(/^(.+?):\n/) - @tmp["group"] = @input[1] - end - end - - tokenizer :scan_keyvalue do - if @input.scan(/^(.+?):(.*?)\n/) - start = @input[1] - key, value = start.strip, @input[2].strip - - # This is a nested key - target = if start.index(" ") == 0 - error!("Expected group.") if @tmp["group"].nil? - @ast[@tmp["group"]] ||= {} - @ast[@tmp["group"]] - else - @tmp.delete("group") - @ast - end - - more = _scan_lines_to_array(/^\s{#{start.size}}(.+)\n/) - value = more.unshift(value).join("\n") unless more.empty? - - if target[key].nil? - target[key] = value - else - target[key] = Array.wrap(target[key]) - target[key] << value - end - end - end - - tokenizer :scan_nameserver do - if @input.scan(/^\s+(.+?)\n/) && @tmp["group"] == "Name servers" - @ast["field:nameservers"] ||= [] - @ast["field:nameservers"] << @input[1].strip - end - end - - tokenizer :skip_comment do - @input.skip(/^%.*\n/) - end - - end - - end -end diff --git a/spec/fixtures/responses/whois.1und1.info/status_available.expected b/spec/fixtures/responses/whois.1und1.info/status_available.expected index 6bbcc28c..5202198d 100644 --- a/spec/fixtures/responses/whois.1und1.info/status_available.expected +++ b/spec/fixtures/responses/whois.1und1.info/status_available.expected @@ -1,5 +1,5 @@ #domain - %s == nil + %s == "u34jedzcq.com" #domain_id %s == nil diff --git a/spec/fixtures/responses/whois.cira.ca/ca/field_without_value.expected b/spec/fixtures/responses/whois.cira.ca/ca/field_without_value.expected deleted file mode 100644 index b65d0629..00000000 --- a/spec/fixtures/responses/whois.cira.ca/ca/field_without_value.expected +++ /dev/null @@ -1,16 +0,0 @@ -#technical_contacts - %s %CLASS{array} - %s %SIZE{1} - %s[0] %CLASS{contact} - %s[0].type == Whois::Parser::Contact::TYPE_TECHNICAL - %s[0].id == nil - %s[0].name == "Ross Vito" - %s[0].organization == nil - %s[0].address == "405 Queen Street South, P.O. Box 75004\nBolton ON L7E2B5 Canada" - %s[0].city == nil - %s[0].zip == nil - %s[0].state == nil - %s[0].country_code == nil - %s[0].phone == "1 (647) 964-4544" - %s[0].fax == "" - %s[0].email == "mail@sanamato.com" diff --git a/spec/fixtures/responses/whois.cira.ca/ca/field_without_value.txt b/spec/fixtures/responses/whois.cira.ca/ca/field_without_value.txt deleted file mode 100644 index 5b4ace4b..00000000 --- a/spec/fixtures/responses/whois.cira.ca/ca/field_without_value.txt +++ /dev/null @@ -1,40 +0,0 @@ -Domain name: glu.ca -Domain status: redemption -Creation date: 2004/10/30 -Expiry date: 2010/10/29 -Updated date: 2010/12/04 - -Registrar: - Name: Webnames.ca Inc. - Number: 70 - -Registrant: - Name: Sanamato Inc. - -Administrative contact: - Name: Ross Vito - Postal address: 405 Queen Street South, P.O. Box 75004 - Bolton ON L7E2B5 Canada - Phone: 1 (647) 964-4544 - Fax: - Email: mail@sanamato.com - -Technical contact: - Name: Ross Vito - Postal address: 405 Queen Street South, P.O. Box 75004 - Bolton ON L7E2B5 Canada - Phone: 1 (647) 964-4544 - Fax: - Email: mail@sanamato.com - -Name servers: - ns1.webnames.ca 65.39.140.92 - ns2.webnames.ca 64.85.60.137 - ns3.webnames.ca 64.34.130.218 - -% WHOIS look-up made at 2010-12-07 21:24:18 (GMT) -% -% Use of CIRA's WHOIS service is governed by the Terms of Use in its Legal -% Notice, available at http://www.cira.ca/legal-notice/?lang=en -% -% (c) 2010 Canadian Internet Registration Authority, (http://www.cira.ca/) diff --git a/spec/fixtures/responses/whois.cira.ca/ca/property_status_autorenew_grace.expected b/spec/fixtures/responses/whois.cira.ca/ca/property_status_autorenew_grace.expected deleted file mode 100644 index 3f198701..00000000 --- a/spec/fixtures/responses/whois.cira.ca/ca/property_status_autorenew_grace.expected +++ /dev/null @@ -1,8 +0,0 @@ -#status - %s == :registered - -#available? - %s == false - -#registered? - %s == true diff --git a/spec/fixtures/responses/whois.cira.ca/ca/property_status_autorenew_grace.txt b/spec/fixtures/responses/whois.cira.ca/ca/property_status_autorenew_grace.txt deleted file mode 100644 index 33b79391..00000000 --- a/spec/fixtures/responses/whois.cira.ca/ca/property_status_autorenew_grace.txt +++ /dev/null @@ -1,43 +0,0 @@ -Domain name: abbylane.pe.ca -Domain status: auto-renew grace -Creation date: 2000/10/26 -Expiry date: 2011/11/30 - -Registrar: - Name: easyDNS Technologies Inc. - Number: 88 - -Registrant: - Name: Abbylane Summer Homes - -Administrative contact: - Name: Jeff Carmody - Postal address: Abbylane Summer Homes - 8 Birchill Drive - Ch-town PE C1A 6W5 Canada - Phone: +1 902-621-0244 - Fax: +1 902-566-0823 - Email: jeff@abbylane.pe.ca - -Technical contact: - Name: Jeff Carmody - Postal address: 550 University Ave - Charlottetown PE C1A4p3 Canada - Phone: +1 902 566 0829 - Fax: +1 902-628-4355 - Email: jeff@abbylane.pe.ca - -Name servers: - ns1.easydns.com - ns2.easydns.com - ns3.easydns.org - ns6.easydns.net - remote1.easydns.com - remote2.easydns.com - -% WHOIS look-up made at 2010-12-10 22:01:40 (GMT) -% -% Use of CIRA's WHOIS service is governed by the Terms of Use in its Legal -% Notice, available at http://www.cira.ca/legal-notice/?lang=en -% -% (c) 2010 Canadian Internet Registration Authority, (http://www.cira.ca/) diff --git a/spec/fixtures/responses/whois.cira.ca/ca/property_status_available.expected b/spec/fixtures/responses/whois.cira.ca/ca/property_status_available.expected deleted file mode 100644 index 0a5c9d4a..00000000 --- a/spec/fixtures/responses/whois.cira.ca/ca/property_status_available.expected +++ /dev/null @@ -1,8 +0,0 @@ -#status - %s == :available - -#available? - %s == true - -#registered? - %s == false diff --git a/spec/fixtures/responses/whois.cira.ca/ca/property_status_available.txt b/spec/fixtures/responses/whois.cira.ca/ca/property_status_available.txt deleted file mode 100644 index 2cdde6b0..00000000 --- a/spec/fixtures/responses/whois.cira.ca/ca/property_status_available.txt +++ /dev/null @@ -1,9 +0,0 @@ -Domain name: u34jedzcq.ca -Domain status: available - -% WHOIS look-up made at 2010-10-13 18:32:55 (GMT) -% -% Use of CIRA's WHOIS service is governed by the Terms of Use in its Legal -% Notice, available at http://www.cira.ca/legal-notice/?lang=en -% -% (c) 2010 Canadian Internet Registration Authority, (http://www.cira.ca/) diff --git a/spec/fixtures/responses/whois.cira.ca/ca/property_status_pendingdelete.expected b/spec/fixtures/responses/whois.cira.ca/ca/property_status_pendingdelete.expected deleted file mode 100644 index 3f198701..00000000 --- a/spec/fixtures/responses/whois.cira.ca/ca/property_status_pendingdelete.expected +++ /dev/null @@ -1,8 +0,0 @@ -#status - %s == :registered - -#available? - %s == false - -#registered? - %s == true diff --git a/spec/fixtures/responses/whois.cira.ca/ca/property_status_pendingdelete.txt b/spec/fixtures/responses/whois.cira.ca/ca/property_status_pendingdelete.txt deleted file mode 100644 index df1632ac..00000000 --- a/spec/fixtures/responses/whois.cira.ca/ca/property_status_pendingdelete.txt +++ /dev/null @@ -1,20 +0,0 @@ -Domain name: sagespa.ca -Domain status: pending delete -Creation date: 2011/05/12 -Expiry date: 2013/05/12 -Updated date: 2013/07/31 - -Registrar: - Name: Go Daddy Domains Canada, Inc - Number: 2316042 - -Name servers: - ns75.domaincontrol.com - ns76.domaincontrol.com - -% WHOIS look-up made at 2013-08-01 17:51:03 (GMT) -% -% Use of CIRA's WHOIS service is governed by the Terms of Use in its Legal -% Notice, available at http://www.cira.ca/legal-notice/?lang=en -% -% (c) 2013 Canadian Internet Registration Authority, (http://www.cira.ca/) diff --git a/spec/fixtures/responses/whois.cira.ca/ca/property_status_redemption.expected b/spec/fixtures/responses/whois.cira.ca/ca/property_status_redemption.expected deleted file mode 100644 index 3f198701..00000000 --- a/spec/fixtures/responses/whois.cira.ca/ca/property_status_redemption.expected +++ /dev/null @@ -1,8 +0,0 @@ -#status - %s == :registered - -#available? - %s == false - -#registered? - %s == true diff --git a/spec/fixtures/responses/whois.cira.ca/ca/property_status_redemption.txt b/spec/fixtures/responses/whois.cira.ca/ca/property_status_redemption.txt deleted file mode 100644 index 5b4ace4b..00000000 --- a/spec/fixtures/responses/whois.cira.ca/ca/property_status_redemption.txt +++ /dev/null @@ -1,40 +0,0 @@ -Domain name: glu.ca -Domain status: redemption -Creation date: 2004/10/30 -Expiry date: 2010/10/29 -Updated date: 2010/12/04 - -Registrar: - Name: Webnames.ca Inc. - Number: 70 - -Registrant: - Name: Sanamato Inc. - -Administrative contact: - Name: Ross Vito - Postal address: 405 Queen Street South, P.O. Box 75004 - Bolton ON L7E2B5 Canada - Phone: 1 (647) 964-4544 - Fax: - Email: mail@sanamato.com - -Technical contact: - Name: Ross Vito - Postal address: 405 Queen Street South, P.O. Box 75004 - Bolton ON L7E2B5 Canada - Phone: 1 (647) 964-4544 - Fax: - Email: mail@sanamato.com - -Name servers: - ns1.webnames.ca 65.39.140.92 - ns2.webnames.ca 64.85.60.137 - ns3.webnames.ca 64.34.130.218 - -% WHOIS look-up made at 2010-12-07 21:24:18 (GMT) -% -% Use of CIRA's WHOIS service is governed by the Terms of Use in its Legal -% Notice, available at http://www.cira.ca/legal-notice/?lang=en -% -% (c) 2010 Canadian Internet Registration Authority, (http://www.cira.ca/) diff --git a/spec/fixtures/responses/whois.cira.ca/ca/property_status_registered.expected b/spec/fixtures/responses/whois.cira.ca/ca/property_status_registered.expected deleted file mode 100644 index 3f198701..00000000 --- a/spec/fixtures/responses/whois.cira.ca/ca/property_status_registered.expected +++ /dev/null @@ -1,8 +0,0 @@ -#status - %s == :registered - -#available? - %s == false - -#registered? - %s == true diff --git a/spec/fixtures/responses/whois.cira.ca/ca/property_status_registered.txt b/spec/fixtures/responses/whois.cira.ca/ca/property_status_registered.txt deleted file mode 100644 index dd1e7e02..00000000 --- a/spec/fixtures/responses/whois.cira.ca/ca/property_status_registered.txt +++ /dev/null @@ -1,40 +0,0 @@ -Domain name: google.ca -Domain status: registered -Creation date: 2000/10/03 -Expiry date: 2011/04/28 - -Registrar: - Name: Webnames.ca Inc. - Number: 70 - -Registrant: - Name: Google Inc. - -Administrative contact: - Name: Rose Hagan - Postal address: 130 King St. W., Suite 1800 - Toronto ON M5X 1E3 Canada - Phone: 1 416 8653361 - Fax: 1 416 9456616 - Email: dns-admin@google.com - -Technical contact: - Name: Matt Serlin - Postal address: Domain Provisioning,10400 Overland Rd. PMB 155 - Boise ID 83709 United States - Phone: 1.2083895740 - Fax: 1.2083895771 - Email: ccops@markmonitor.com - -Name servers: - ns1.google.com - ns2.google.com - ns3.google.com - ns4.google.com - -% WHOIS look-up made at 2010-10-13 18:32:42 (GMT) -% -% Use of CIRA's WHOIS service is governed by the Terms of Use in its Legal -% Notice, available at http://www.cira.ca/legal-notice/?lang=en -% -% (c) 2010 Canadian Internet Registration Authority, (http://www.cira.ca/) diff --git a/spec/fixtures/responses/whois.cira.ca/ca/property_status_tobereleased.expected b/spec/fixtures/responses/whois.cira.ca/ca/property_status_tobereleased.expected deleted file mode 100644 index 3f198701..00000000 --- a/spec/fixtures/responses/whois.cira.ca/ca/property_status_tobereleased.expected +++ /dev/null @@ -1,8 +0,0 @@ -#status - %s == :registered - -#available? - %s == false - -#registered? - %s == true diff --git a/spec/fixtures/responses/whois.cira.ca/ca/property_status_tobereleased.txt b/spec/fixtures/responses/whois.cira.ca/ca/property_status_tobereleased.txt deleted file mode 100644 index bd4199d1..00000000 --- a/spec/fixtures/responses/whois.cira.ca/ca/property_status_tobereleased.txt +++ /dev/null @@ -1,10 +0,0 @@ -Domain name: thomascraft.ca -Domain status: to be released -TBR Release date: 2011/03/02 - -% WHOIS look-up made at 2011-03-01 21:56:25 (GMT) -% -% Use of CIRA's WHOIS service is governed by the Terms of Use in its Legal -% Notice, available at http://www.cira.ca/legal-notice/?lang=en -% -% (c) 2010 Canadian Internet Registration Authority, (http://www.cira.ca/) diff --git a/spec/fixtures/responses/whois.cira.ca/ca/property_status_unavailable.txt b/spec/fixtures/responses/whois.cira.ca/ca/property_status_unavailable.txt deleted file mode 100644 index 91345419..00000000 --- a/spec/fixtures/responses/whois.cira.ca/ca/property_status_unavailable.txt +++ /dev/null @@ -1,11 +0,0 @@ -Domain name: mediom.ca -Domain status: unavailable -Error code: 01114 -Error message: The domain name provided conflicts with at least one other registered domain name and as a result is not available for registration (e.g. xyz.ca conflicts with xyz.on.ca). - -% WHOIS look-up made at 2011-08-04 16:46:53 (GMT) -% -% Use of CIRA's WHOIS service is governed by the Terms of Use in its Legal -% Notice, available at http://www.cira.ca/legal-notice/?lang=en -% -% (c) 2010 Canadian Internet Registration Authority, (http://www.cira.ca/) diff --git a/spec/fixtures/responses/whois.cira.ca/ca/status_available.expected b/spec/fixtures/responses/whois.cira.ca/ca/status_available.expected index 0f63c05a..5972cfeb 100644 --- a/spec/fixtures/responses/whois.cira.ca/ca/status_available.expected +++ b/spec/fixtures/responses/whois.cira.ca/ca/status_available.expected @@ -1,12 +1,12 @@ #disclaimer - %s == "Use of CIRA's WHOIS service is governed by the Terms of Use in its Legal\nNotice, available at http://www.cira.ca/legal-notice/?lang=en\n\n(c) 2014 Canadian Internet Registration Authority, (http://www.cira.ca/)" + %s == "Use of CIRA's WHOIS service is governed by the Terms of Use in its Legal Notice, available at http://www.cira.ca/legal-notice/?lang=en (c) 2021 Canadian Internet Registration Authority, (http://www.cira.ca/)" #domain %s == "u34jedzcq.ca" #domain_id - %s %ERROR{AttributeNotSupported} + %s == nil #status @@ -48,10 +48,3 @@ #nameservers %s %CLASS{array} %s == [] - - -#valid? - %s == true - -#invalid? - %s == false diff --git a/spec/fixtures/responses/whois.cira.ca/ca/status_available.txt b/spec/fixtures/responses/whois.cira.ca/ca/status_available.txt index 00690e0e..1b560eab 100644 --- a/spec/fixtures/responses/whois.cira.ca/ca/status_available.txt +++ b/spec/fixtures/responses/whois.cira.ca/ca/status_available.txt @@ -1,9 +1,7 @@ -Domain name: u34jedzcq.ca -Domain status: available - -% WHOIS look-up made at 2014-01-22 22:10:48 (GMT) -% -% Use of CIRA's WHOIS service is governed by the Terms of Use in its Legal -% Notice, available at http://www.cira.ca/legal-notice/?lang=en -% -% (c) 2014 Canadian Internet Registration Authority, (http://www.cira.ca/) +Not found: u34jedzcq.ca + +% +% Use of CIRA's WHOIS service is governed by the Terms of Use in its Legal +% Notice, available at http://www.cira.ca/legal-notice/?lang=en +% +% (c) 2021 Canadian Internet Registration Authority, (http://www.cira.ca/) diff --git a/spec/fixtures/responses/whois.cira.ca/ca/status_invalid.expected b/spec/fixtures/responses/whois.cira.ca/ca/status_invalid.expected deleted file mode 100644 index 9acbbaea..00000000 --- a/spec/fixtures/responses/whois.cira.ca/ca/status_invalid.expected +++ /dev/null @@ -1,9 +0,0 @@ -#status - %s == :invalid - - -#valid? - %s == false - -#invalid? - %s == true diff --git a/spec/fixtures/responses/whois.cira.ca/ca/status_invalid.txt b/spec/fixtures/responses/whois.cira.ca/ca/status_invalid.txt deleted file mode 100644 index 91345419..00000000 --- a/spec/fixtures/responses/whois.cira.ca/ca/status_invalid.txt +++ /dev/null @@ -1,11 +0,0 @@ -Domain name: mediom.ca -Domain status: unavailable -Error code: 01114 -Error message: The domain name provided conflicts with at least one other registered domain name and as a result is not available for registration (e.g. xyz.ca conflicts with xyz.on.ca). - -% WHOIS look-up made at 2011-08-04 16:46:53 (GMT) -% -% Use of CIRA's WHOIS service is governed by the Terms of Use in its Legal -% Notice, available at http://www.cira.ca/legal-notice/?lang=en -% -% (c) 2010 Canadian Internet Registration Authority, (http://www.cira.ca/) diff --git a/spec/fixtures/responses/whois.cira.ca/ca/status_registered.expected b/spec/fixtures/responses/whois.cira.ca/ca/status_registered.expected index ac4ab60e..048f3d3c 100644 --- a/spec/fixtures/responses/whois.cira.ca/ca/status_registered.expected +++ b/spec/fixtures/responses/whois.cira.ca/ca/status_registered.expected @@ -1,13 +1,11 @@ #disclaimer - %s == "Use of CIRA's WHOIS service is governed by the Terms of Use in its Legal\nNotice, available at http://www.cira.ca/legal-notice/?lang=en\n\n(c) 2014 Canadian Internet Registration Authority, (http://www.cira.ca/)" - + %s == "Use of CIRA's WHOIS service is governed by the Terms of Use in its Legal Notice, available at http://www.cira.ca/legal-notice/?lang=en (c) 2021 Canadian Internet Registration Authority, (http://www.cira.ca/)" #domain %s == "google.ca" #domain_id - %s %ERROR{AttributeNotSupported} - + %s == "D73081-CIRA" #status %s == :registered @@ -21,55 +19,55 @@ #created_on %s %CLASS{time} - %s %TIME{2000-10-03 00:00:00} + %s %TIME{2000-10-04 02:21:23 UTC} #updated_on %s %CLASS{time} - %s %TIME{2014-02-13 00:00:00} + %s %TIME{2021-04-28 04:04:12 UTC} #expires_on %s %CLASS{time} - %s %TIME{2015-04-28 00:00:00} + %s %TIME{2022-04-28 04:00:00 UTC} #registrar %s %CLASS{registrar} - %s.id == "5000040" + %s.id == "not applicable" %s.name == "MarkMonitor International Canada Ltd." - %s.url == nil + %s.url == "Markmonitor.com" #registrant_contacts %s %CLASS{array} %s %SIZE{1} %s[0] %CLASS{contact} %s[0].type == Whois::Parser::Contact::TYPE_REGISTRANT - %s[0].id == nil - %s[0].name == "Google Inc." - %s[0].organization == nil - %s[0].address == nil - %s[0].city == nil - %s[0].zip == nil - %s[0].state == nil - %s[0].country_code == nil - %s[0].phone == nil - %s[0].fax == nil - %s[0].email == nil + %s[0].id == "59969059-CIRA" + %s[0].name == "Google LLC - TMA868122" + %s[0].organization == "" + %s[0].address == "1600 Amphitheatre Parkway" + %s[0].city == "Mountain View" + %s[0].zip == "94043" + %s[0].state == "CA" + %s[0].country_code == "US" + %s[0].phone == "+1.6502530000" + %s[0].fax == "" + %s[0].email == "dns-admin@google.com" #admin_contacts %s %CLASS{array} %s %SIZE{1} %s[0] %CLASS{contact} %s[0].type == Whois::Parser::Contact::TYPE_ADMINISTRATIVE - %s[0].id == nil - %s[0].name == "Christina Chiou" - %s[0].organization == nil - %s[0].address == "130 King St. W., Suite 1800,\nToronto ON M5X1E3 Canada" - %s[0].city == nil - %s[0].zip == nil - %s[0].state == nil - %s[0].country_code == nil - %s[0].phone == "+1.4168653361x" - %s[0].fax == "+1.4169456616" + %s[0].id == "59969161-CIRA" + %s[0].name == "Lauren Johnston" + %s[0].organization == "Google LLC" + %s[0].address == "1600 Amphitheatre Parkway" + %s[0].city == "Mountain View" + %s[0].zip == "94043" + %s[0].state == "CA" + %s[0].country_code == "US" + %s[0].phone == "+1.6502530000" + %s[0].fax == "" %s[0].email == "dns-admin@google.com" #technical_contacts @@ -77,17 +75,17 @@ %s %SIZE{1} %s[0] %CLASS{contact} %s[0].type == Whois::Parser::Contact::TYPE_TECHNICAL - %s[0].id == nil - %s[0].name == "Matt Serlin" - %s[0].organization == nil - %s[0].address == "Domain Provisioning,10400 Overland Rd. PMB 155\nBoise ID 83709 United States" - %s[0].city == nil - %s[0].zip == nil - %s[0].state == nil - %s[0].country_code == nil - %s[0].phone == "+1.2083895740x" - %s[0].fax == "+1.2083895771" - %s[0].email == "ccops@markmonitor.com" + %s[0].id == "59969161-CIRA" + %s[0].name == "Lauren Johnston" + %s[0].organization == "Google LLC" + %s[0].address == "1600 Amphitheatre Parkway" + %s[0].city == "Mountain View" + %s[0].zip == "94043" + %s[0].state == "CA" + %s[0].country_code == "US" + %s[0].phone == "+1.6502530000" + %s[0].fax == "" + %s[0].email == "dns-admin@google.com" #nameservers @@ -101,10 +99,3 @@ %s[2].name == "ns3.google.com" %s[3] %CLASS{nameserver} %s[3].name == "ns4.google.com" - - -#valid? - %s == true - -#invalid? - %s == false diff --git a/spec/fixtures/responses/whois.cira.ca/ca/status_registered.txt b/spec/fixtures/responses/whois.cira.ca/ca/status_registered.txt index 4ba8e306..2dcf6e92 100644 --- a/spec/fixtures/responses/whois.cira.ca/ca/status_registered.txt +++ b/spec/fixtures/responses/whois.cira.ca/ca/status_registered.txt @@ -1,41 +1,84 @@ -Domain name: google.ca -Domain status: registered -Creation date: 2000/10/03 -Expiry date: 2015/04/28 -Updated date: 2014/02/13 - -Registrar: - Name: MarkMonitor International Canada Ltd. - Number: 5000040 - -Registrant: - Name: Google Inc. - -Administrative contact: - Name: Christina Chiou - Postal address: 130 King St. W., Suite 1800, - Toronto ON M5X1E3 Canada - Phone: +1.4168653361x - Fax: +1.4169456616 - Email: dns-admin@google.com - -Technical contact: - Name: Matt Serlin - Postal address: Domain Provisioning,10400 Overland Rd. PMB 155 - Boise ID 83709 United States - Phone: +1.2083895740x - Fax: +1.2083895771 - Email: ccops@markmonitor.com - -Name servers: - ns1.google.com - ns2.google.com - ns3.google.com - ns4.google.com - -% WHOIS look-up made at 2014-02-18 20:39:15 (GMT) -% -% Use of CIRA's WHOIS service is governed by the Terms of Use in its Legal -% Notice, available at http://www.cira.ca/legal-notice/?lang=en -% -% (c) 2014 Canadian Internet Registration Authority, (http://www.cira.ca/) +Domain Name: google.ca +Registry Domain ID: D73081-CIRA +Registrar WHOIS Server: whois.ca.fury.ca +Registrar URL: Markmonitor.com +Updated Date: 2021-04-28T04:04:12Z +Creation Date: 2000-10-04T02:21:23Z +Registry Expiry Date: 2022-04-28T04:00:00Z +Registrar: MarkMonitor International Canada Ltd. +Registrar IANA ID: not applicable +Registrar Abuse Contact Email: +Registrar Abuse Contact Phone: +Domain Status: clientDeleteProhibited https://icann.org/epp#clientDeleteProhibited +Domain Status: clientTransferProhibited https://icann.org/epp#clientTransferProhibited +Domain Status: clientUpdateProhibited https://icann.org/epp#clientUpdateProhibited +Domain Status: serverDeleteProhibited https://icann.org/epp#serverDeleteProhibited +Domain Status: serverTransferProhibited https://icann.org/epp#serverTransferProhibited +Domain Status: serverUpdateProhibited https://icann.org/epp#serverUpdateProhibited +Registry Registrant ID: 59969059-CIRA +Registrant Name: Google LLC - TMA868122 +Registrant Organization: +Registrant Street: 1600 Amphitheatre Parkway +Registrant City: Mountain View +Registrant State/Province: CA +Registrant Postal Code: 94043 +Registrant Country: US +Registrant Phone: +1.6502530000 +Registrant Phone Ext: +Registrant Fax: +Registrant Fax Ext: +Registrant Email: dns-admin@google.com +Registry Admin ID: 59969161-CIRA +Admin Name: Lauren Johnston +Admin Organization: Google LLC +Admin Street: 1600 Amphitheatre Parkway +Admin City: Mountain View +Admin State/Province: CA +Admin Postal Code: 94043 +Admin Country: US +Admin Phone: +1.6502530000 +Admin Phone Ext: +Admin Fax: +Admin Fax Ext: +Admin Email: dns-admin@google.com +Registry Tech ID: 59969161-CIRA +Tech Name: Lauren Johnston +Tech Organization: Google LLC +Tech Street: 1600 Amphitheatre Parkway +Tech City: Mountain View +Tech State/Province: CA +Tech Postal Code: 94043 +Tech Country: US +Tech Phone: +1.6502530000 +Tech Phone Ext: +Tech Fax: +Tech Fax Ext: +Tech Email: dns-admin@google.com +Registry Billing ID: +Billing Name: +Billing Organization: +Billing Street: +Billing City: +Billing State/Province: +Billing Postal Code: +Billing Country: +Billing Phone: +Billing Phone Ext: +Billing Fax: +Billing Fax Ext: +Billing Email: +Name Server: ns1.google.com +Name Server: ns2.google.com +Name Server: ns3.google.com +Name Server: ns4.google.com +DNSSEC: unsigned +URL of the ICANN Whois Inaccuracy Complaint Form: https://www.icann.org/wicf/ +>>> Last update of WHOIS database: 2021-11-25T11:24:22Z <<< + +For more information on Whois status codes, please visit https://icann.org/epp + +% +% Use of CIRA's WHOIS service is governed by the Terms of Use in its Legal +% Notice, available at http://www.cira.ca/legal-notice/?lang=en +% +% (c) 2021 Canadian Internet Registration Authority, (http://www.cira.ca/) diff --git a/spec/fixtures/responses/whois.cira.ca/ca/status_reserved.expected b/spec/fixtures/responses/whois.cira.ca/ca/status_reserved.expected new file mode 100644 index 00000000..3f9fdb58 --- /dev/null +++ b/spec/fixtures/responses/whois.cira.ca/ca/status_reserved.expected @@ -0,0 +1,49 @@ +#disclaimer + %s == "Use of CIRA's WHOIS service is governed by the Terms of Use in its Legal Notice, available at http://www.cira.ca/legal-notice/?lang=en (c) 2021 Canadian Internet Registration Authority, (http://www.cira.ca/)" + +#domain + %s == nil + +#domain_id + %s == nil + + +#status + %s == :reserved + +#available? + %s == false + +#registered? + %s == true + + +#created_on + %s == nil + +#updated_on + %s == nil + +#expires_on + %s == nil + + +#registrar + %s == nil + +#registrant_contacts + %s %CLASS{array} + %s == [] + +#admin_contacts + %s %CLASS{array} + %s == [] + +#technical_contacts + %s %CLASS{array} + %s == [] + + +#nameservers + %s %CLASS{array} + %s == [] diff --git a/spec/fixtures/responses/whois.cira.ca/ca/status_reserved.txt b/spec/fixtures/responses/whois.cira.ca/ca/status_reserved.txt new file mode 100644 index 00000000..e90e450b --- /dev/null +++ b/spec/fixtures/responses/whois.cira.ca/ca/status_reserved.txt @@ -0,0 +1,8 @@ +Error code: 01044 +Error message: The domain name requested has usage restrictions applied to it. Please see your Registrar for more details. + +% +% Use of CIRA's WHOIS service is governed by the Terms of Use in its Legal +% Notice, available at http://www.cira.ca/legal-notice/?lang=en +% +% (c) 2021 Canadian Internet Registration Authority, (http://www.cira.ca/) diff --git a/spec/fixtures/responses/whois.wildwestdomains.com/status_available.expected b/spec/fixtures/responses/whois.wildwestdomains.com/status_available.expected index 6bbcc28c..b74f7760 100644 --- a/spec/fixtures/responses/whois.wildwestdomains.com/status_available.expected +++ b/spec/fixtures/responses/whois.wildwestdomains.com/status_available.expected @@ -1,5 +1,5 @@ #domain - %s == nil + %s == "sadasdsa.com" #domain_id %s == nil diff --git a/spec/tlds.yml b/spec/tlds.yml index dc14d873..e0187f1d 100644 --- a/spec/tlds.yml +++ b/spec/tlds.yml @@ -386,6 +386,7 @@ ca: _server: whois.cira.ca status_available: u34jedzcq.ca status_registered: google.ca + status_invalid: mediom.ca _status_available_skipdiff: - 4 _status_registered_skipdiff: diff --git a/spec/whois/parsers/responses/whois.1und1.info/status_available_spec.rb b/spec/whois/parsers/responses/whois.1und1.info/status_available_spec.rb index c898c1e1..f1e1cd8a 100644 --- a/spec/whois/parsers/responses/whois.1und1.info/status_available_spec.rb +++ b/spec/whois/parsers/responses/whois.1und1.info/status_available_spec.rb @@ -23,7 +23,7 @@ describe "#domain" do it do - expect(subject.domain).to eq(nil) + expect(subject.domain).to eq("u34jedzcq.com") end end describe "#domain_id" do diff --git a/spec/whois/parsers/responses/whois.cira.ca/ca/field_without_value_spec.rb b/spec/whois/parsers/responses/whois.cira.ca/ca/field_without_value_spec.rb deleted file mode 100644 index e769d2a3..00000000 --- a/spec/whois/parsers/responses/whois.cira.ca/ca/field_without_value_spec.rb +++ /dev/null @@ -1,43 +0,0 @@ -# encoding: utf-8 - -# This file is autogenerated. Do not edit it manually. -# If you want change the content of this file, edit -# -# /spec/fixtures/responses/whois.cira.ca/ca/field_without_value.expected -# -# and regenerate the tests with the following rake task -# -# $ rake spec:generate -# - -require 'spec_helper' -require 'whois/parsers/whois.cira.ca.rb' - -describe Whois::Parsers::WhoisCiraCa, "field_without_value.expected" do - - subject do - file = fixture("responses", "whois.cira.ca/ca/field_without_value.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) - end - - describe "#technical_contacts" do - it do - expect(subject.technical_contacts).to be_a(Array) - expect(subject.technical_contacts.size).to eq(1) - expect(subject.technical_contacts[0]).to be_a(Whois::Parser::Contact) - expect(subject.technical_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_TECHNICAL) - expect(subject.technical_contacts[0].id).to eq(nil) - expect(subject.technical_contacts[0].name).to eq("Ross Vito") - expect(subject.technical_contacts[0].organization).to eq(nil) - expect(subject.technical_contacts[0].address).to eq("405 Queen Street South, P.O. Box 75004\nBolton ON L7E2B5 Canada") - expect(subject.technical_contacts[0].city).to eq(nil) - expect(subject.technical_contacts[0].zip).to eq(nil) - expect(subject.technical_contacts[0].state).to eq(nil) - expect(subject.technical_contacts[0].country_code).to eq(nil) - expect(subject.technical_contacts[0].phone).to eq("1 (647) 964-4544") - expect(subject.technical_contacts[0].fax).to eq("") - expect(subject.technical_contacts[0].email).to eq("mail@sanamato.com") - end - end -end diff --git a/spec/whois/parsers/responses/whois.cira.ca/ca/property_status_autorenew_grace_spec.rb b/spec/whois/parsers/responses/whois.cira.ca/ca/property_status_autorenew_grace_spec.rb deleted file mode 100644 index bc2e2674..00000000 --- a/spec/whois/parsers/responses/whois.cira.ca/ca/property_status_autorenew_grace_spec.rb +++ /dev/null @@ -1,39 +0,0 @@ -# encoding: utf-8 - -# This file is autogenerated. Do not edit it manually. -# If you want change the content of this file, edit -# -# /spec/fixtures/responses/whois.cira.ca/ca/property_status_autorenew_grace.expected -# -# and regenerate the tests with the following rake task -# -# $ rake spec:generate -# - -require 'spec_helper' -require 'whois/parsers/whois.cira.ca.rb' - -describe Whois::Parsers::WhoisCiraCa, "property_status_autorenew_grace.expected" do - - subject do - file = fixture("responses", "whois.cira.ca/ca/property_status_autorenew_grace.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) - end - - describe "#status" do - it do - expect(subject.status).to eq(:registered) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(false) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(true) - end - end -end diff --git a/spec/whois/parsers/responses/whois.cira.ca/ca/property_status_available_spec.rb b/spec/whois/parsers/responses/whois.cira.ca/ca/property_status_available_spec.rb deleted file mode 100644 index 3d109746..00000000 --- a/spec/whois/parsers/responses/whois.cira.ca/ca/property_status_available_spec.rb +++ /dev/null @@ -1,39 +0,0 @@ -# encoding: utf-8 - -# This file is autogenerated. Do not edit it manually. -# If you want change the content of this file, edit -# -# /spec/fixtures/responses/whois.cira.ca/ca/property_status_available.expected -# -# and regenerate the tests with the following rake task -# -# $ rake spec:generate -# - -require 'spec_helper' -require 'whois/parsers/whois.cira.ca.rb' - -describe Whois::Parsers::WhoisCiraCa, "property_status_available.expected" do - - subject do - file = fixture("responses", "whois.cira.ca/ca/property_status_available.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) - end - - describe "#status" do - it do - expect(subject.status).to eq(:available) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(true) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(false) - end - end -end diff --git a/spec/whois/parsers/responses/whois.cira.ca/ca/property_status_pendingdelete_spec.rb b/spec/whois/parsers/responses/whois.cira.ca/ca/property_status_pendingdelete_spec.rb deleted file mode 100644 index b66a88b8..00000000 --- a/spec/whois/parsers/responses/whois.cira.ca/ca/property_status_pendingdelete_spec.rb +++ /dev/null @@ -1,39 +0,0 @@ -# encoding: utf-8 - -# This file is autogenerated. Do not edit it manually. -# If you want change the content of this file, edit -# -# /spec/fixtures/responses/whois.cira.ca/ca/property_status_pendingdelete.expected -# -# and regenerate the tests with the following rake task -# -# $ rake spec:generate -# - -require 'spec_helper' -require 'whois/parsers/whois.cira.ca.rb' - -describe Whois::Parsers::WhoisCiraCa, "property_status_pendingdelete.expected" do - - subject do - file = fixture("responses", "whois.cira.ca/ca/property_status_pendingdelete.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) - end - - describe "#status" do - it do - expect(subject.status).to eq(:registered) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(false) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(true) - end - end -end diff --git a/spec/whois/parsers/responses/whois.cira.ca/ca/property_status_redemption_spec.rb b/spec/whois/parsers/responses/whois.cira.ca/ca/property_status_redemption_spec.rb deleted file mode 100644 index 20c1136e..00000000 --- a/spec/whois/parsers/responses/whois.cira.ca/ca/property_status_redemption_spec.rb +++ /dev/null @@ -1,39 +0,0 @@ -# encoding: utf-8 - -# This file is autogenerated. Do not edit it manually. -# If you want change the content of this file, edit -# -# /spec/fixtures/responses/whois.cira.ca/ca/property_status_redemption.expected -# -# and regenerate the tests with the following rake task -# -# $ rake spec:generate -# - -require 'spec_helper' -require 'whois/parsers/whois.cira.ca.rb' - -describe Whois::Parsers::WhoisCiraCa, "property_status_redemption.expected" do - - subject do - file = fixture("responses", "whois.cira.ca/ca/property_status_redemption.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) - end - - describe "#status" do - it do - expect(subject.status).to eq(:registered) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(false) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(true) - end - end -end diff --git a/spec/whois/parsers/responses/whois.cira.ca/ca/property_status_registered_spec.rb b/spec/whois/parsers/responses/whois.cira.ca/ca/property_status_registered_spec.rb deleted file mode 100644 index 9fe49c11..00000000 --- a/spec/whois/parsers/responses/whois.cira.ca/ca/property_status_registered_spec.rb +++ /dev/null @@ -1,39 +0,0 @@ -# encoding: utf-8 - -# This file is autogenerated. Do not edit it manually. -# If you want change the content of this file, edit -# -# /spec/fixtures/responses/whois.cira.ca/ca/property_status_registered.expected -# -# and regenerate the tests with the following rake task -# -# $ rake spec:generate -# - -require 'spec_helper' -require 'whois/parsers/whois.cira.ca.rb' - -describe Whois::Parsers::WhoisCiraCa, "property_status_registered.expected" do - - subject do - file = fixture("responses", "whois.cira.ca/ca/property_status_registered.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) - end - - describe "#status" do - it do - expect(subject.status).to eq(:registered) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(false) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(true) - end - end -end diff --git a/spec/whois/parsers/responses/whois.cira.ca/ca/property_status_tobereleased_spec.rb b/spec/whois/parsers/responses/whois.cira.ca/ca/property_status_tobereleased_spec.rb deleted file mode 100644 index 851a7073..00000000 --- a/spec/whois/parsers/responses/whois.cira.ca/ca/property_status_tobereleased_spec.rb +++ /dev/null @@ -1,39 +0,0 @@ -# encoding: utf-8 - -# This file is autogenerated. Do not edit it manually. -# If you want change the content of this file, edit -# -# /spec/fixtures/responses/whois.cira.ca/ca/property_status_tobereleased.expected -# -# and regenerate the tests with the following rake task -# -# $ rake spec:generate -# - -require 'spec_helper' -require 'whois/parsers/whois.cira.ca.rb' - -describe Whois::Parsers::WhoisCiraCa, "property_status_tobereleased.expected" do - - subject do - file = fixture("responses", "whois.cira.ca/ca/property_status_tobereleased.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) - end - - describe "#status" do - it do - expect(subject.status).to eq(:registered) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(false) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(true) - end - end -end diff --git a/spec/whois/parsers/responses/whois.cira.ca/ca/status_available_spec.rb b/spec/whois/parsers/responses/whois.cira.ca/ca/status_available_spec.rb index bbdb8b4b..0d097b3a 100644 --- a/spec/whois/parsers/responses/whois.cira.ca/ca/status_available_spec.rb +++ b/spec/whois/parsers/responses/whois.cira.ca/ca/status_available_spec.rb @@ -23,7 +23,7 @@ describe "#disclaimer" do it do - expect(subject.disclaimer).to eq("Use of CIRA's WHOIS service is governed by the Terms of Use in its Legal\nNotice, available at http://www.cira.ca/legal-notice/?lang=en\n\n(c) 2014 Canadian Internet Registration Authority, (http://www.cira.ca/)") + expect(subject.disclaimer).to eq("Use of CIRA's WHOIS service is governed by the Terms of Use in its Legal Notice, available at http://www.cira.ca/legal-notice/?lang=en (c) 2021 Canadian Internet Registration Authority, (http://www.cira.ca/)") end end describe "#domain" do @@ -33,7 +33,7 @@ end describe "#domain_id" do it do - expect { subject.domain_id }.to raise_error(Whois::AttributeNotSupported) + expect(subject.domain_id).to eq(nil) end end describe "#status" do @@ -95,14 +95,4 @@ expect(subject.nameservers).to eq([]) end end - describe "#valid?" do - it do - expect(subject.valid?).to eq(true) - end - end - describe "#invalid?" do - it do - expect(subject.invalid?).to eq(false) - end - end end diff --git a/spec/whois/parsers/responses/whois.cira.ca/ca/status_invalid_spec.rb b/spec/whois/parsers/responses/whois.cira.ca/ca/status_invalid_spec.rb deleted file mode 100644 index 9d65bd04..00000000 --- a/spec/whois/parsers/responses/whois.cira.ca/ca/status_invalid_spec.rb +++ /dev/null @@ -1,39 +0,0 @@ -# encoding: utf-8 - -# This file is autogenerated. Do not edit it manually. -# If you want change the content of this file, edit -# -# /spec/fixtures/responses/whois.cira.ca/ca/status_invalid.expected -# -# and regenerate the tests with the following rake task -# -# $ rake spec:generate -# - -require 'spec_helper' -require 'whois/parsers/whois.cira.ca.rb' - -describe Whois::Parsers::WhoisCiraCa, "status_invalid.expected" do - - subject do - file = fixture("responses", "whois.cira.ca/ca/status_invalid.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) - end - - describe "#status" do - it do - expect(subject.status).to eq(:invalid) - end - end - describe "#valid?" do - it do - expect(subject.valid?).to eq(false) - end - end - describe "#invalid?" do - it do - expect(subject.invalid?).to eq(true) - end - end -end diff --git a/spec/whois/parsers/responses/whois.cira.ca/ca/status_registered_spec.rb b/spec/whois/parsers/responses/whois.cira.ca/ca/status_registered_spec.rb index 9b2c1926..bfacaf43 100644 --- a/spec/whois/parsers/responses/whois.cira.ca/ca/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.cira.ca/ca/status_registered_spec.rb @@ -23,7 +23,7 @@ describe "#disclaimer" do it do - expect(subject.disclaimer).to eq("Use of CIRA's WHOIS service is governed by the Terms of Use in its Legal\nNotice, available at http://www.cira.ca/legal-notice/?lang=en\n\n(c) 2014 Canadian Internet Registration Authority, (http://www.cira.ca/)") + expect(subject.disclaimer).to eq("Use of CIRA's WHOIS service is governed by the Terms of Use in its Legal Notice, available at http://www.cira.ca/legal-notice/?lang=en (c) 2021 Canadian Internet Registration Authority, (http://www.cira.ca/)") end end describe "#domain" do @@ -33,7 +33,7 @@ end describe "#domain_id" do it do - expect { subject.domain_id }.to raise_error(Whois::AttributeNotSupported) + expect(subject.domain_id).to eq("D73081-CIRA") end end describe "#status" do @@ -54,27 +54,27 @@ describe "#created_on" do it do expect(subject.created_on).to be_a(Time) - expect(subject.created_on).to eq(DateTime.parse("2000-10-03 00:00:00")) + expect(subject.created_on).to eq(DateTime.parse("2000-10-04 02:21:23 UTC")) end end describe "#updated_on" do it do expect(subject.updated_on).to be_a(Time) - expect(subject.updated_on).to eq(DateTime.parse("2014-02-13 00:00:00")) + expect(subject.updated_on).to eq(DateTime.parse("2021-04-28 04:04:12 UTC")) end end describe "#expires_on" do it do expect(subject.expires_on).to be_a(Time) - expect(subject.expires_on).to eq(DateTime.parse("2015-04-28 00:00:00")) + expect(subject.expires_on).to eq(DateTime.parse("2022-04-28 04:00:00 UTC")) end end describe "#registrar" do it do expect(subject.registrar).to be_a(Whois::Parser::Registrar) - expect(subject.registrar.id).to eq("5000040") + expect(subject.registrar.id).to eq("not applicable") expect(subject.registrar.name).to eq("MarkMonitor International Canada Ltd.") - expect(subject.registrar.url).to eq(nil) + expect(subject.registrar.url).to eq("Markmonitor.com") end end describe "#registrant_contacts" do @@ -83,17 +83,17 @@ expect(subject.registrant_contacts.size).to eq(1) expect(subject.registrant_contacts[0]).to be_a(Whois::Parser::Contact) expect(subject.registrant_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_REGISTRANT) - expect(subject.registrant_contacts[0].id).to eq(nil) - expect(subject.registrant_contacts[0].name).to eq("Google Inc.") - expect(subject.registrant_contacts[0].organization).to eq(nil) - expect(subject.registrant_contacts[0].address).to eq(nil) - expect(subject.registrant_contacts[0].city).to eq(nil) - expect(subject.registrant_contacts[0].zip).to eq(nil) - expect(subject.registrant_contacts[0].state).to eq(nil) - expect(subject.registrant_contacts[0].country_code).to eq(nil) - expect(subject.registrant_contacts[0].phone).to eq(nil) - expect(subject.registrant_contacts[0].fax).to eq(nil) - expect(subject.registrant_contacts[0].email).to eq(nil) + expect(subject.registrant_contacts[0].id).to eq("59969059-CIRA") + expect(subject.registrant_contacts[0].name).to eq("Google LLC - TMA868122") + expect(subject.registrant_contacts[0].organization).to eq("") + expect(subject.registrant_contacts[0].address).to eq("1600 Amphitheatre Parkway") + expect(subject.registrant_contacts[0].city).to eq("Mountain View") + expect(subject.registrant_contacts[0].zip).to eq("94043") + expect(subject.registrant_contacts[0].state).to eq("CA") + expect(subject.registrant_contacts[0].country_code).to eq("US") + expect(subject.registrant_contacts[0].phone).to eq("+1.6502530000") + expect(subject.registrant_contacts[0].fax).to eq("") + expect(subject.registrant_contacts[0].email).to eq("dns-admin@google.com") end end describe "#admin_contacts" do @@ -102,16 +102,16 @@ expect(subject.admin_contacts.size).to eq(1) expect(subject.admin_contacts[0]).to be_a(Whois::Parser::Contact) expect(subject.admin_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_ADMINISTRATIVE) - expect(subject.admin_contacts[0].id).to eq(nil) - expect(subject.admin_contacts[0].name).to eq("Christina Chiou") - expect(subject.admin_contacts[0].organization).to eq(nil) - expect(subject.admin_contacts[0].address).to eq("130 King St. W., Suite 1800,\nToronto ON M5X1E3 Canada") - expect(subject.admin_contacts[0].city).to eq(nil) - expect(subject.admin_contacts[0].zip).to eq(nil) - expect(subject.admin_contacts[0].state).to eq(nil) - expect(subject.admin_contacts[0].country_code).to eq(nil) - expect(subject.admin_contacts[0].phone).to eq("+1.4168653361x") - expect(subject.admin_contacts[0].fax).to eq("+1.4169456616") + expect(subject.admin_contacts[0].id).to eq("59969161-CIRA") + expect(subject.admin_contacts[0].name).to eq("Lauren Johnston") + expect(subject.admin_contacts[0].organization).to eq("Google LLC") + expect(subject.admin_contacts[0].address).to eq("1600 Amphitheatre Parkway") + expect(subject.admin_contacts[0].city).to eq("Mountain View") + expect(subject.admin_contacts[0].zip).to eq("94043") + expect(subject.admin_contacts[0].state).to eq("CA") + expect(subject.admin_contacts[0].country_code).to eq("US") + expect(subject.admin_contacts[0].phone).to eq("+1.6502530000") + expect(subject.admin_contacts[0].fax).to eq("") expect(subject.admin_contacts[0].email).to eq("dns-admin@google.com") end end @@ -121,17 +121,17 @@ expect(subject.technical_contacts.size).to eq(1) expect(subject.technical_contacts[0]).to be_a(Whois::Parser::Contact) expect(subject.technical_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_TECHNICAL) - expect(subject.technical_contacts[0].id).to eq(nil) - expect(subject.technical_contacts[0].name).to eq("Matt Serlin") - expect(subject.technical_contacts[0].organization).to eq(nil) - expect(subject.technical_contacts[0].address).to eq("Domain Provisioning,10400 Overland Rd. PMB 155\nBoise ID 83709 United States") - expect(subject.technical_contacts[0].city).to eq(nil) - expect(subject.technical_contacts[0].zip).to eq(nil) - expect(subject.technical_contacts[0].state).to eq(nil) - expect(subject.technical_contacts[0].country_code).to eq(nil) - expect(subject.technical_contacts[0].phone).to eq("+1.2083895740x") - expect(subject.technical_contacts[0].fax).to eq("+1.2083895771") - expect(subject.technical_contacts[0].email).to eq("ccops@markmonitor.com") + expect(subject.technical_contacts[0].id).to eq("59969161-CIRA") + expect(subject.technical_contacts[0].name).to eq("Lauren Johnston") + expect(subject.technical_contacts[0].organization).to eq("Google LLC") + expect(subject.technical_contacts[0].address).to eq("1600 Amphitheatre Parkway") + expect(subject.technical_contacts[0].city).to eq("Mountain View") + expect(subject.technical_contacts[0].zip).to eq("94043") + expect(subject.technical_contacts[0].state).to eq("CA") + expect(subject.technical_contacts[0].country_code).to eq("US") + expect(subject.technical_contacts[0].phone).to eq("+1.6502530000") + expect(subject.technical_contacts[0].fax).to eq("") + expect(subject.technical_contacts[0].email).to eq("dns-admin@google.com") end end describe "#nameservers" do @@ -148,14 +148,4 @@ expect(subject.nameservers[3].name).to eq("ns4.google.com") end end - describe "#valid?" do - it do - expect(subject.valid?).to eq(true) - end - end - describe "#invalid?" do - it do - expect(subject.invalid?).to eq(false) - end - end end diff --git a/spec/whois/parsers/responses/whois.cira.ca/ca/status_reserved_spec.rb b/spec/whois/parsers/responses/whois.cira.ca/ca/status_reserved_spec.rb new file mode 100644 index 00000000..9ccbd9ba --- /dev/null +++ b/spec/whois/parsers/responses/whois.cira.ca/ca/status_reserved_spec.rb @@ -0,0 +1,98 @@ +# encoding: utf-8 + +# This file is autogenerated. Do not edit it manually. +# If you want change the content of this file, edit +# +# /spec/fixtures/responses/whois.cira.ca/ca/status_reserved.expected +# +# and regenerate the tests with the following rake task +# +# $ rake spec:generate +# + +require 'spec_helper' +require 'whois/parsers/whois.cira.ca.rb' + +describe Whois::Parsers::WhoisCiraCa, "status_reserved.expected" do + + subject do + file = fixture("responses", "whois.cira.ca/ca/status_reserved.txt") + part = Whois::Record::Part.new(body: File.read(file)) + described_class.new(part) + end + + describe "#disclaimer" do + it do + expect(subject.disclaimer).to eq("Use of CIRA's WHOIS service is governed by the Terms of Use in its Legal Notice, available at http://www.cira.ca/legal-notice/?lang=en (c) 2021 Canadian Internet Registration Authority, (http://www.cira.ca/)") + end + end + describe "#domain" do + it do + expect(subject.domain).to eq(nil) + end + end + describe "#domain_id" do + it do + expect(subject.domain_id).to eq(nil) + end + end + describe "#status" do + it do + expect(subject.status).to eq(:reserved) + end + end + describe "#available?" do + it do + expect(subject.available?).to eq(false) + end + end + describe "#registered?" do + it do + expect(subject.registered?).to eq(true) + end + end + describe "#created_on" do + it do + expect(subject.created_on).to eq(nil) + end + end + describe "#updated_on" do + it do + expect(subject.updated_on).to eq(nil) + end + end + describe "#expires_on" do + it do + expect(subject.expires_on).to eq(nil) + end + end + describe "#registrar" do + it do + expect(subject.registrar).to eq(nil) + end + end + describe "#registrant_contacts" do + it do + expect(subject.registrant_contacts).to be_a(Array) + expect(subject.registrant_contacts).to eq([]) + end + end + describe "#admin_contacts" do + it do + expect(subject.admin_contacts).to be_a(Array) + expect(subject.admin_contacts).to eq([]) + end + end + describe "#technical_contacts" do + it do + expect(subject.technical_contacts).to be_a(Array) + expect(subject.technical_contacts).to eq([]) + end + end + describe "#nameservers" do + it do + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers).to eq([]) + end + end +end diff --git a/spec/whois/parsers/responses/whois.wildwestdomains.com/status_available_spec.rb b/spec/whois/parsers/responses/whois.wildwestdomains.com/status_available_spec.rb index a6dc7192..c63d3e21 100644 --- a/spec/whois/parsers/responses/whois.wildwestdomains.com/status_available_spec.rb +++ b/spec/whois/parsers/responses/whois.wildwestdomains.com/status_available_spec.rb @@ -23,7 +23,7 @@ describe "#domain" do it do - expect(subject.domain).to eq(nil) + expect(subject.domain).to eq("sadasdsa.com") end end describe "#domain_id" do From 6354c4ead61afce8f0a92449ddef10dc3e2655ae Mon Sep 17 00:00:00 2001 From: Adrien Rey-Jarthon Date: Tue, 7 Dec 2021 11:05:35 +0100 Subject: [PATCH 13/29] =?UTF-8?q?Added=20support=20for=20all=20DonutsInc?= =?UTF-8?q?=20TLDs=20(241=20at=20the=20time:=20.ACADEMY,=20.ACCOUNTANTS,?= =?UTF-8?q?=20.ACTOR,=20.AGENCY,=20.AIRFORCE,=20.APARTMENTS,=20.ARMY,=20.A?= =?UTF-8?q?SSOCIATES,=20.ATTORNEY,=20.AUCTION,=20.BAND,=20.BARGAINS,=20.BI?= =?UTF-8?q?KE,=20.BINGO,=20.BOUTIQUE,=20.BUILDERS,=20.BUSINESS,=20.CAB,=20?= =?UTF-8?q?.CAFE,=20.CAMERA,=20.CAMP,=20.CAPITAL,=20.CARDS,=20.CARE,=20.CA?= =?UTF-8?q?REERS,=20.CASH,=20.CASINO,=20.CATERING,=20.CENTER,=20.CHARITY,?= =?UTF-8?q?=20.CHAT,=20.CHEAP,=20.CHURCH,=20.CITY,=20.CLAIMS,=20.CLEANING,?= =?UTF-8?q?=20.CLINIC,=20.CLOTHING,=20.COACH,=20.CODES,=20.COFFEE,=20.COMM?= =?UTF-8?q?UNITY,=20.COMPANY,=20.COMPUTER,=20.CONDOS,=20.CONSTRUCTION,=20.?= =?UTF-8?q?CONTACT,=20.CONTRACTORS,=20.COOL,=20.COUPONS,=20.CREDIT,=20.CRE?= =?UTF-8?q?DITCARD,=20.CRUISES,=20.DANCE,=20.DATING,=20.DEALS,=20.DEGREE,?= =?UTF-8?q?=20.DELIVERY,=20.DEMOCRAT,=20.DENTAL,=20.DENTIST,=20.DIAMONDS,?= =?UTF-8?q?=20.DIGITAL,=20.DIRECT,=20.DIRECTORY,=20.DISCOUNT,=20.DOCTOR,?= =?UTF-8?q?=20.DOG,=20.DOMAINS,=20.EDUCATION,=20.EMAIL,=20.ENERGY,=20.ENGI?= =?UTF-8?q?NEER,=20.ENGINEERING,=20.ENTERPRISES,=20.EQUIPMENT,=20.ESTATE,?= =?UTF-8?q?=20.EVENTS,=20.EXCHANGE,=20.EXPERT,=20.EXPOSED,=20.EXPRESS,=20.?= =?UTF-8?q?FAIL,=20.FAMILY,=20.FAN,=20.FARM,=20.FINANCE,=20.FINANCIAL,=20.?= =?UTF-8?q?FISH,=20.FITNESS,=20.FLIGHTS,=20.FLORIST,=20.FOOTBALL,=20.FORSA?= =?UTF-8?q?LE,=20.FOUNDATION,=20.FUND,=20.FURNITURE,=20.FUTBOL,=20.FYI,=20?= =?UTF-8?q?.GALLERY,=20.GAMES,=20.GIFTS,=20.GIVES,=20.GLASS,=20.GMBH,=20.G?= =?UTF-8?q?OLD,=20.GOLF,=20.GRAPHICS,=20.GRATIS,=20.GRIPE,=20.GROUP,=20.GU?= =?UTF-8?q?IDE,=20.GURU,=20.HAUS,=20.HEALTHCARE,=20.HOCKEY,=20.HOLDINGS,?= =?UTF-8?q?=20.HOLIDAY,=20.HOSPITAL,=20.HOUSE,=20.IMMO,=20.IMMOBILIEN,=20.?= =?UTF-8?q?INDUSTRIES,=20.INSTITUTE,=20.INSURE,=20.INTERNATIONAL,=20.INVES?= =?UTF-8?q?TMENTS,=20.IRISH,=20.JETZT,=20.JEWELRY,=20.KAUFEN,=20.KITCHEN,?= =?UTF-8?q?=20.LAND,=20.LAWYER,=20.LEASE,=20.LEGAL,=20.LIFE,=20.LIGHTING,?= =?UTF-8?q?=20.LIMITED,=20.LIMO,=20.LIVE,=20.LOANS,=20.LTD,=20.MAISON,=20.?= =?UTF-8?q?MANAGEMENT,=20.MARKET,=20.MARKETING,=20.MBA,=20.MEDIA,=20.MEMOR?= =?UTF-8?q?IAL,=20.MODA,=20.MONEY,=20.MORTGAGE,=20.MOVIE,=20.NAVY,=20.NETW?= =?UTF-8?q?ORK,=20.NEWS,=20.NINJA,=20.PARTNERS,=20.PARTS,=20.PHOTOGRAPHY,?= =?UTF-8?q?=20.PHOTOS,=20.PICTURES,=20.PIZZA,=20.PLACE,=20.PLUMBING,=20.PL?= =?UTF-8?q?US,=20.PRODUCTIONS,=20.PROPERTIES,=20.PUB,=20.RECIPES,=20.REHAB?= =?UTF-8?q?,=20.REISE,=20.REISEN,=20.RENTALS,=20.REPAIR,=20.REPORT,=20.REP?= =?UTF-8?q?UBLICAN,=20.RESTAURANT,=20.REVIEWS,=20.RIP,=20.ROCKS,=20.RUN,?= =?UTF-8?q?=20.SALE,=20.SALON,=20.SARL,=20.SCHOOL,=20.SCHULE,=20.SERVICES,?= =?UTF-8?q?=20.SHOES,=20.SHOPPING,=20.SHOW,=20.SINGLES,=20.SOCCER,=20.SOCI?= =?UTF-8?q?AL,=20.SOFTWARE,=20.SOLAR,=20.SOLUTIONS,=20.STUDIO,=20.STYLE,?= =?UTF-8?q?=20.SUPPLIES,=20.SUPPLY,=20.SUPPORT,=20.SURGERY,=20.SYSTEMS,=20?= =?UTF-8?q?.TAX,=20.TAXI,=20.TEAM,=20.TECHNOLOGY,=20.TENNIS,=20.THEATER,?= =?UTF-8?q?=20.TIENDA,=20.TIPS,=20.TIRES,=20.TODAY,=20.TOOLS,=20.TOURS,=20?= =?UTF-8?q?.TOWN,=20.TOYS,=20.TRAINING,=20.TRAVEL,=20.UNIVERSITY,=20.VACAT?= =?UTF-8?q?IONS,=20.VENTURES,=20.VET,=20.VIAJES,=20.VIDEO,=20.VILLAS,=20.V?= =?UTF-8?q?IN,=20.VISION,=20.VOYAGE,=20.WATCH,=20.WINE,=20.WORKS,=20.WORLD?= =?UTF-8?q?,=20.WTF,=20.ZONE,=20.=E4=BC=81=E4=B8=9A,=20.=E5=A8=B1=E4=B9=90?= =?UTF-8?q?,=20.=E6=B8=B8=E6=88=8F,=20.=E5=95=86=E5=BA=97)=20+=20support?= =?UTF-8?q?=20for=20body=20guessing=20of=20the=20parser=20+=20refactor=20s?= =?UTF-8?q?pecs=20to=20be=20shorter=20and=20quicker?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- CHANGELOG.md | 1 + lib/whois/parser.rb | 39 +-- .../{whois.donuts.co.rb => donuts_inc.rb} | 5 +- lib/whois/parsers/whois.nic.travel.rb | 25 -- lib/whois/parsers/whois.nic.world.rb | 28 -- .../whois.donuts.co/bike/status_available.txt | 3 - .../bike/status_registered.expected | 109 ------- .../bike/status_registered.txt | 63 ---- .../bike/status_available.expected | 0 .../whois.nic.bike/bike/status_available.txt | 4 + .../bike/status_registered.expected | 96 ++++++ .../whois.nic.bike/bike/status_registered.txt | 64 ++++ .../systems/status_available.expected | 46 +++ .../systems/status_available.txt | 3 + .../systems/status_available_premium.expected | 46 +++ .../systems/status_available_premium.txt | 5 + .../systems/status_registered.expected | 99 +++++++ .../systems/status_registered.txt | 62 ++++ .../systems/status_reserved.expected | 46 +++ .../systems/status_reserved.txt | 3 + .../travel/property_status_multiple.expected | 2 - .../travel/property_status_multiple.txt | 83 ------ .../travel/property_status_single.expected | 2 - .../travel/property_status_single.txt | 75 ----- .../travel/status_available.expected | 4 +- .../travel/status_available.txt | 27 +- .../travel/status_registered.expected | 93 +++--- .../travel/status_registered.txt | 135 ++++----- spec/tlds.yml | 9 +- spec/whois/parser_spec.rb | 21 +- .../capetown/status_available_spec.rb | 93 ++---- .../capetown/status_registered_spec.rb | 211 +++++-------- .../vg/status_available_spec.rb | 99 ++----- .../vg/status_registered_spec.rb | 223 ++++++-------- .../property_nameserver_no_nameserver_spec.rb | 15 +- .../cc/status_available_spec.rb | 87 ++---- .../cc/status_registered_spec.rb | 131 +++----- .../co.za/property_contact_fax_empty_spec.rb | 43 ++- .../co.za/response_throttled_spec.rb | 13 +- .../co.za/status_available_spec.rb | 93 ++---- .../co.za/status_registered_spec.rb | 221 ++++++-------- .../durban/status_available_spec.rb | 93 ++---- .../durban/status_registered_spec.rb | 217 ++++++-------- .../joburg/status_available_spec.rb | 93 ++---- .../joburg/status_registered_spec.rb | 219 ++++++-------- .../pe/response_throttled_spec.rb | 13 +- .../pe/status_available_spec.rb | 57 +--- .../kero.yachay.pe/pe/status_inactive_spec.rb | 59 +--- .../pe/status_registered_spec.rb | 73 ++--- .../pe/status_suspended_spec.rb | 57 +--- .../org.za/status_available_spec.rb | 93 ++---- .../org.za/status_registered_spec.rb | 221 ++++++-------- .../property_nameserver_no_nameserver_spec.rb | 15 +- .../tv/status_available_spec.rb | 87 ++---- .../tv/status_registered_spec.rb | 123 +++----- .../whois.1und1.info/status_available_spec.rb | 93 ++---- .../status_registered_spec.rb | 199 +++++-------- .../whois.35.com/status_registered_spec.rb | 193 +++++------- .../ae/status_available_spec.rb | 51 +--- .../ae/status_registered_spec.rb | 59 +--- .../whois.aero/status_available_spec.rb | 105 ++----- .../whois.aero/status_registered_spec.rb | 159 ++++------ .../whois.aero/status_reserved_spec.rb | 105 ++----- .../bz/status_available_spec.rb | 99 ++----- .../bz/status_registered_spec.rb | 127 +++----- .../gi/status_available_spec.rb | 99 ++----- .../gi/status_registered_spec.rb | 145 +++------ .../lc/status_available_spec.rb | 99 ++----- .../lc/status_registered_spec.rb | 145 +++------ .../mn/status_available_spec.rb | 99 ++----- .../mn/status_registered_spec.rb | 205 +++++-------- .../sc/status_available_spec.rb | 99 ++----- .../sc/status_registered_spec.rb | 145 +++------ .../vc/status_available_spec.rb | 99 ++----- .../vc/status_registered_spec.rb | 153 +++------- .../info/response_throttled_spec.rb | 13 +- .../info/status_available_spec.rb | 99 ++----- .../info/status_registered_spec.rb | 153 +++------- .../info/status_reserved_spec.rb | 19 +- .../pro/status_available_spec.rb | 99 ++----- .../pro/status_registered_spec.rb | 153 +++------- .../pro/status_reserved_spec.rb | 19 +- .../am/status_available_spec.rb | 51 +--- .../am/status_registered_spec.rb | 73 ++--- .../whois.ascio.com/status_available_spec.rb | 93 ++---- .../whois.ascio.com/status_registered_spec.rb | 193 +++++------- .../tn/property_contact_updated_none_spec.rb | 25 +- .../whois.ati.tn/tn/status_available_spec.rb | 99 ++----- .../whois.ati.tn/tn/status_registered_spec.rb | 227 ++++++-------- .../au/property_status_with_multiple_spec.rb | 13 +- .../au/status_available_spec.rb | 97 ++---- .../au/status_registered_spec.rb | 183 ++++-------- .../whois.ax/ax/status_available_spec.rb | 51 +--- .../whois.ax/ax/status_registered_spec.rb | 69 ++--- .../whois.biz/biz/status_available_spec.rb | 93 ++---- .../whois.biz/biz/status_registered_spec.rb | 203 +++++-------- .../bn/status_available_spec.rb | 51 +--- .../bn/status_registered_spec.rb | 89 ++---- .../cat/property_status_missing_spec.rb | 13 +- .../cat/property_status_multiple_spec.rb | 13 +- .../whois.cat/cat/property_status_ok_spec.rb | 13 +- .../whois.cat/cat/status_available_spec.rb | 51 +--- .../whois.cat/cat/status_registered_spec.rb | 73 ++--- .../by/status_available_spec.rb | 93 ++---- .../by/status_registered_spec.rb | 111 ++----- .../uz/property_expires_on_dash_spec.rb | 13 +- .../uz/property_status_reserved_spec.rb | 25 +- .../uz/status_available_spec.rb | 51 +--- .../uz/status_registered_spec.rb | 65 ++-- .../com/status_registered_spec.rb | 195 +++++------- .../ae.org/status_available_spec.rb | 99 ++----- .../ae.org/status_registered_spec.rb | 211 +++++-------- .../ar.com/status_available_spec.rb | 99 ++----- .../ar.com/status_registered_spec.rb | 219 +++++--------- .../br.com/status_available_spec.rb | 99 ++----- .../br.com/status_registered_spec.rb | 211 +++++-------- .../cn.com/status_available_spec.rb | 99 ++----- .../cn.com/status_registered_spec.rb | 203 +++++-------- .../de.com/status_available_spec.rb | 99 ++----- .../de.com/status_registered_spec.rb | 211 +++++-------- .../eu.com/status_available_spec.rb | 99 ++----- .../eu.com/status_registered_spec.rb | 223 ++++++-------- .../gb.com/status_available_spec.rb | 99 ++----- .../gb.com/status_registered_spec.rb | 219 +++++--------- .../gb.net/status_available_spec.rb | 99 ++----- .../gb.net/status_registered_spec.rb | 231 ++++++--------- .../gr.com/status_available_spec.rb | 99 ++----- .../gr.com/status_registered_spec.rb | 169 ++++------- .../hu.com/status_available_spec.rb | 99 ++----- .../hu.com/status_registered_spec.rb | 203 +++++-------- .../jp.net/status_available_spec.rb | 99 ++----- .../jp.net/status_registered_spec.rb | 203 +++++-------- .../jpn.com/status_available_spec.rb | 99 ++----- .../jpn.com/status_registered_spec.rb | 211 +++++-------- .../kr.com/status_available_spec.rb | 99 ++----- .../kr.com/status_registered_spec.rb | 235 ++++++--------- .../no.com/status_available_spec.rb | 99 ++----- .../qc.com/status_available_spec.rb | 99 ++----- .../qc.com/status_registered_spec.rb | 211 +++++-------- .../ru.com/status_available_spec.rb | 99 ++----- .../ru.com/status_registered_spec.rb | 197 +++++-------- .../sa.com/status_available_spec.rb | 99 ++----- .../sa.com/status_registered_spec.rb | 203 +++++-------- .../se.com/status_available_spec.rb | 99 ++----- .../se.com/status_registered_spec.rb | 219 +++++--------- .../se.net/status_available_spec.rb | 99 ++----- .../se.net/status_registered_spec.rb | 223 ++++++-------- .../uk.com/status_available_spec.rb | 99 ++----- .../uk.com/status_registered_spec.rb | 211 +++++-------- .../uk.net/status_available_spec.rb | 99 ++----- .../uk.net/status_registered_spec.rb | 211 +++++-------- .../us.com/status_available_spec.rb | 99 ++----- .../us.com/status_registered_spec.rb | 221 ++++++-------- .../us.org/status_available_spec.rb | 99 ++----- .../uy.com/status_available_spec.rb | 99 ++----- .../uy.com/status_registered_spec.rb | 203 +++++-------- .../za.com/status_available_spec.rb | 99 ++----- .../za.com/status_registered_spec.rb | 203 +++++-------- .../whois.cira.ca/ca/status_available_spec.rb | 99 ++----- .../ca/status_registered_spec.rb | 205 +++++-------- .../whois.cira.ca/ca/status_reserved_spec.rb | 99 ++----- .../whois.cmc.iq/iq/status_available_spec.rb | 69 +---- .../whois.cmc.iq/iq/status_registered_spec.rb | 113 +++---- .../cn/property_status_ok_spec.rb | 25 +- .../cn/property_status_reserved_list_spec.rb | 31 +- .../cn/status_available_spec.rb | 103 ++----- .../cn/status_registered_spec.rb | 137 +++------ .../whois.cnnic.cn/cn/status_reserved_spec.rb | 31 +- .../co.ca/status_available_spec.rb | 57 +--- .../co.ca/status_registered_spec.rb | 69 ++--- .../whois.co.ca/co.ca/status_reserved_spec.rb | 31 +- .../co.pl/status_available_spec.rb | 93 ++---- .../co.pl/status_registered_spec.rb | 103 ++----- .../ug/property_status_active_spec.rb | 25 +- .../ug/property_status_unconfirmed_spec.rb | 25 +- .../whois.co.ug/ug/status_available_spec.rb | 51 +--- .../whois.co.ug/ug/status_registered_spec.rb | 69 ++--- .../status_registered_spec.rb | 179 +++++------ .../status_available_spec.rb | 93 ++---- .../status_registered_spec.rb | 221 ++++++-------- .../de/property_nameservers_with_ip_spec.rb | 55 ++-- .../de/response_error_55000000010_spec.rb | 25 +- .../de/response_throttled_spec.rb | 13 +- .../de/status_available_spec.rb | 99 ++----- .../de/status_failed_ace_spec.rb | 25 +- .../whois.denic.de/de/status_failed_spec.rb | 25 +- .../whois.denic.de/de/status_invalid_spec.rb | 99 ++----- .../de/status_registered_spec.rb | 155 +++------- .../dk/property_status_deactivated_spec.rb | 25 +- .../dk/property_status_reserved_spec.rb | 25 +- .../dk/status_available_spec.rb | 57 +--- .../dk/status_registered_spec.rb | 77 ++--- .../be/property_nameservers_with_ip_spec.rb | 33 +-- .../be/property_status_available_spec.rb | 25 +- .../be/property_status_not_available_spec.rb | 25 +- .../be/property_status_notallowed_spec.rb | 25 +- .../be/property_status_outofservice_spec.rb | 25 +- .../be/property_status_quarantine_spec.rb | 25 +- .../whois.dns.be/be/response_blocked_spec.rb | 19 +- .../be/response_throttled_hourly_spec.rb | 13 +- .../be/response_throttled_limit_spec.rb | 13 +- .../whois.dns.be/be/status_available_spec.rb | 75 +---- .../whois.dns.be/be/status_invalid_spec.rb | 75 +---- .../whois.dns.be/be/status_registered_spec.rb | 99 ++----- .../whois.dns.hr/hr/status_available_spec.rb | 93 ++---- .../whois.dns.hr/hr/status_registered_spec.rb | 123 +++----- .../lu/property_nameservers_with_ip_spec.rb | 33 +-- .../whois.dns.lu/lu/status_available_spec.rb | 81 ++--- .../whois.dns.lu/lu/status_registered_spec.rb | 149 ++++------ .../property_expires_on_not_defined_spec.rb | 13 +- .../pl/property_nameservers_with_ip_spec.rb | 27 +- .../pl/response_throttled_spec.rb | 13 +- .../whois.dns.pl/pl/status_available_spec.rb | 89 ++---- .../whois.dns.pl/pl/status_registered_spec.rb | 143 +++------ .../pt/property_nameservers_spec.rb | 31 +- .../pt/property_status_techpro_spec.rb | 25 +- .../whois.dns.pt/pt/status_available_spec.rb | 51 +--- .../whois.dns.pt/pt/status_inactive_spec.rb | 55 +--- .../whois.dns.pt/pt/status_registered_spec.rb | 71 ++--- .../whois.dns.pt/pt/status_reserved_spec.rb | 53 +--- .../nl/property_nameservers_with_ip_spec.rb | 27 +- .../nl/property_status_inactive_spec.rb | 25 +- .../nl/response_throttled_daily_spec.rb | 13 +- .../nl/response_throttled_spec.rb | 13 +- .../nl/response_unavailable_spec.rb | 13 +- .../nl/status_available_spec.rb | 63 +--- .../nl/status_redemption_spec.rb | 63 +--- .../nl/status_registered_spec.rb | 83 ++---- .../ie/case_token_application_pending_spec.rb | 13 +- .../ie/property_contacts_multiple_spec.rb | 47 ++- .../property_contacts_not_matching_id_spec.rb | 23 +- .../ie/property_nameservers_with_ip_spec.rb | 51 ++-- .../ie/status_available_spec.rb | 99 ++----- .../ie/status_registered_spec.rb | 139 +++------ .../lt/property_nameservers_with_ip_spec.rb | 39 ++- .../lt/status_available_spec.rb | 51 +--- .../lt/status_registered_spec.rb | 65 ++-- .../bike/status_available_spec.rb | 93 ------ .../bike/status_registered_spec.rb | 155 ---------- .../cf/property_expires_on_blank_spec.rb | 13 +- .../whois.dot.cf/cf/status_available_spec.rb | 51 +--- .../whois.dot.cf/cf/status_registered_spec.rb | 73 ++--- .../whois.dot.tk/tk/status_available_spec.rb | 51 +--- .../whois.dot.tk/tk/status_registered_spec.rb | 71 ++--- .../gov/status_available_spec.rb | 49 +-- .../gov/status_registered_spec.rb | 49 +-- .../mobi/response_throttled_spec.rb | 13 +- .../mobi/status_available_spec.rb | 99 ++----- .../mobi/status_registered_spec.rb | 153 +++------- .../post/status_available_spec.rb | 99 ++----- .../post/status_registered_spec.rb | 197 +++++-------- .../property_contact_private_spec.rb | 103 +++---- .../status_registered_spec.rb | 177 +++++------ .../edu/property_contact_registrant_spec.rb | 43 ++- ...trant_with_additional_organization_spec.rb | 43 ++- ...contact_registrant_without_address_spec.rb | 43 ++- ...rty_contact_registrant_without_zip_spec.rb | 43 ++- .../edu/property_contacts_case1_spec.rb | 41 ++- .../edu/property_contacts_case2_spec.rb | 41 ++- .../edu/property_contacts_case3_spec.rb | 41 ++- .../edu/property_contacts_case4_spec.rb | 41 ++- .../edu/property_contacts_spec.rb | 41 ++- .../edu/property_updated_on_unknown_spec.rb | 13 +- .../edu/status_available_spec.rb | 99 ++----- .../edu/status_registered_spec.rb | 205 +++++-------- .../ee/status_available_spec.rb | 51 +--- .../ee/status_registered_spec.rb | 63 ++-- .../whois.enom.com/status_available_spec.rb | 93 ++---- .../whois.enom.com/status_registered_spec.rb | 221 ++++++-------- ...registered_with_blank_updated_date_spec.rb | 13 +- .../eu.org/status_available_spec.rb | 49 +-- .../eu.org/status_registered_spec.rb | 49 +-- .../whois.eu/eu/property_nameservers_spec.rb | 43 ++- .../whois.eu/eu/response_throttled_spec.rb | 13 +- .../whois.eu/eu/status_available_spec.rb | 95 ++---- .../whois.eu/eu/status_registered_spec.rb | 133 +++------ .../fi/property_status_graceperiod_spec.rb | 177 ++++------- .../whois.fi/fi/status_available_spec.rb | 97 ++---- .../whois.fi/fi/status_registered_spec.rb | 187 +++++------- .../whois.fi/fi/status_reserved_spec.rb | 97 ++---- .../whois.gandi.net/status_available_spec.rb | 93 ++---- .../whois.gandi.net/status_registered_spec.rb | 227 ++++++-------- .../whois.gg/gg/status_available_spec.rb | 69 +---- .../whois.gg/gg/status_registered_spec.rb | 81 ++--- .../status_registered_spec.rb | 279 +++++++----------- .../gov.za/status_available_spec.rb | 49 +-- .../gov.za/status_registered_spec.rb | 51 +--- .../hk/property_expires_on_null_spec.rb | 13 +- .../hk/status_available_spec.rb | 51 +--- .../hk/status_registered_spec.rb | 71 ++--- .../int/status_available_spec.rb | 75 ++--- .../int/status_registered_spec.rb | 211 ++++++------- .../tld/status_not_assigned_spec.rb | 77 ++--- .../whois.iis.nu/nu/status_available_spec.rb | 99 ++----- .../whois.iis.nu/nu/status_registered_spec.rb | 149 +++------- .../se/property_datetime_is_dash_spec.rb | 29 +- .../se/property_nameservers_single_spec.rb | 23 +- .../se/property_nameservers_with_ip_spec.rb | 39 ++- .../se/property_status_inactive_spec.rb | 75 ++--- .../se/property_status_ok_spec.rb | 25 +- .../se/property_status_serverhold_spec.rb | 25 +- .../whois.iis.se/se/status_available_spec.rb | 99 ++----- .../whois.iis.se/se/status_registered_spec.rb | 149 +++------- .../in.ua/status_available_spec.rb | 51 +--- .../in.ua/status_registered_spec.rb | 69 ++--- .../in/status_available_spec.rb | 99 ++----- .../in/status_registered_spec.rb | 207 +++++-------- .../is/status_available_spec.rb | 51 +--- .../is/status_registered_spec.rb | 63 ++-- .../il/property_status_missing_spec.rb | 25 +- .../property_status_transfer_allowed_spec.rb | 25 +- .../property_status_transfer_locked_spec.rb | 25 +- .../il/status_available_spec.rb | 51 +--- .../il/status_registered_spec.rb | 77 ++--- .../ac.uk/status_available_spec.rb | 51 +--- .../ac.uk/status_registered_spec.rb | 81 ++--- .../gov.uk/status_available_spec.rb | 51 +--- .../gov.uk/status_registered_spec.rb | 89 ++---- .../whois.je/je/status_available_spec.rb | 69 +---- .../whois.je/je/status_registered_spec.rb | 81 ++--- .../co.jp/property_state_deleted_spec.rb | 25 +- .../co.jp/property_state_registered_spec.rb | 25 +- .../jp/property_status_suspended_spec.rb | 25 +- .../property_status_to_be_suspended_spec.rb | 25 +- ...erty_updates_on_error_out-of-range_spec.rb | 15 +- .../whois.jprs.jp/jp/status_available_spec.rb | 51 +--- .../jp/status_registered_spec.rb | 73 ++--- .../whois.jprs.jp/jp/status_reserved_spec.rb | 53 +--- .../ne.jp/property_created_on_missing_spec.rb | 13 +- .../ne.jp/property_state_reserved_spec.rb | 31 +- .../ne.jp/status_available_spec.rb | 51 +--- .../ne.jp/status_registered_spec.rb | 73 ++--- .../ne.jp/status_reserved_spec.rb | 31 +- .../ke/status_available_spec.rb | 51 +--- .../ke/status_invalid_spec.rb | 57 +--- .../ke/status_registered_spec.rb | 73 ++--- .../whois.kg/kg/status_available_spec.rb | 51 +--- .../whois.kg/kg/status_registered_spec.rb | 81 ++--- .../kr/property_nameservers_with_ip_spec.rb | 27 +- .../whois.kr/kr/status_available_spec.rb | 51 +--- .../whois.kr/kr/status_registered_spec.rb | 65 ++-- .../response_throttled_spec.rb | 13 +- .../status_available_spec.rb | 93 ++---- .../status_registered_spec.rb | 221 ++++++-------- .../mo/status_available_spec.rb | 93 ++---- .../mo/status_registered_spec.rb | 107 ++----- .../museum/status_available_spec.rb | 51 +--- .../museum/status_registered_spec.rb | 73 ++--- .../my/status_available_spec.rb | 51 +--- .../my/status_registered_spec.rb | 69 ++--- .../na/status_available_spec.rb | 69 +---- .../na/status_registered_spec.rb | 89 ++---- ..._contact_without_state_and_address_spec.rb | 39 ++- .../nc/property_contact_without_state_spec.rb | 39 ++- .../whois.nc/nc/status_available_spec.rb | 95 ++---- .../whois.nc/nc/status_registered_spec.rb | 137 +++------ .../cm/status_available_spec.rb | 69 +---- .../cm/status_registered_spec.rb | 97 ++---- .../cm/status_suspended_spec.rb | 89 ++---- .../status_available_spec.rb | 93 ++---- .../status_registered_spec.rb | 213 +++++-------- .../whois.nic.ac/ac/status_available_spec.rb | 95 ++---- .../whois.nic.ac/ac/status_registered_spec.rb | 155 ++++------ .../whois.nic.af/af/status_available_spec.rb | 69 +---- .../whois.nic.af/af/status_registered_spec.rb | 97 ++---- .../whois.nic.ag/ag/status_available_spec.rb | 99 ++----- .../whois.nic.ag/ag/status_registered_spec.rb | 153 +++------- .../whois.nic.ai/ai/status_available_spec.rb | 51 +--- .../whois.nic.ai/ai/status_registered_spec.rb | 67 ++--- .../whois.nic.as/as/status_available_spec.rb | 51 +--- .../whois.nic.as/as/status_registered_spec.rb | 75 ++--- .../asia/property_status_multiple_spec.rb | 25 +- .../asia/status_available_spec.rb | 105 ++----- .../asia/status_registered_spec.rb | 167 ++++------- .../asia/status_reserved_spec.rb | 99 ++----- .../whois.nic.at/at/status_available_spec.rb | 51 +--- .../whois.nic.at/at/status_registered_spec.rb | 69 ++--- .../bike/status_available_spec.rb | 42 +++ .../bike/status_registered_spec.rb | 91 ++++++ .../whois.nic.bj/bj/status_available_spec.rb | 95 ++---- .../whois.nic.bj/bj/status_registered_spec.rb | 137 +++------ .../whois.nic.bo/bo/status_available_spec.rb | 61 +--- .../whois.nic.bo/bo/status_registered_spec.rb | 65 +--- .../whois.nic.cd/cd/status_available_spec.rb | 69 +---- .../whois.nic.cd/cd/status_registered_spec.rb | 75 ++--- .../whois.nic.ch/ch/property_contacts_spec.rb | 41 +-- .../ch/property_nameservers_with_ip_spec.rb | 31 +- .../whois.nic.ch/ch/status_available_spec.rb | 73 ++--- .../whois.nic.ch/ch/status_registered_spec.rb | 101 ++----- .../whois.nic.ci/ci/status_available_spec.rb | 51 +--- .../whois.nic.ci/ci/status_registered_spec.rb | 71 ++--- .../whois.nic.cl/cl/status_available_spec.rb | 45 +-- .../whois.nic.cl/cl/status_registered_spec.rb | 69 ++--- .../cloud/status_available_spec.rb | 93 ++---- .../cloud/status_registered_spec.rb | 199 +++++-------- .../whois.nic.co/co/status_available_spec.rb | 93 ++---- .../whois.nic.co/co/status_registered_spec.rb | 213 +++++-------- .../college/status_available_spec.rb | 99 ++----- .../college/status_registered_spec.rb | 243 ++++++--------- .../coop/property_status_multiple_spec.rb | 13 +- .../coop/property_status_single_spec.rb | 13 +- .../coop/status_available_spec.rb | 51 +--- .../coop/status_registered_spec.rb | 65 ++-- .../cx/property_updated_on_empty_spec.rb | 13 +- .../whois.nic.cx/cx/status_available_spec.rb | 69 +---- .../whois.nic.cx/cx/status_registered_spec.rb | 97 ++---- .../cz/case_nset_contact_same_name_spec.rb | 43 ++- .../cz/response_throttled_spec.rb | 13 +- .../cz/response_with_keyset_spec.rb | 31 +- .../whois.nic.cz/cz/status_available_spec.rb | 93 ++---- .../whois.nic.cz/cz/status_registered_spec.rb | 209 +++++-------- .../design/status_available_spec.rb | 99 ++----- .../design/status_registered_spec.rb | 227 ++++++-------- .../whois.nic.dm/dm/status_available_spec.rb | 99 ++----- .../whois.nic.dm/dm/status_registered_spec.rb | 205 +++++-------- .../whois.nic.dz/dz/status_available_spec.rb | 49 +-- .../whois.nic.dz/dz/status_registered_spec.rb | 49 +-- .../whois.nic.ec/ex/status_available_spec.rb | 69 +---- .../whois.nic.ec/ex/status_registered_spec.rb | 113 +++---- .../whois.nic.es/es/status_available_spec.rb | 95 ++---- .../whois.nic.es/es/status_registered_spec.rb | 113 ++----- .../whois.nic.fm/fm/status_available_spec.rb | 93 ++---- .../whois.nic.fm/fm/status_registered_spec.rb | 193 +++++------- .../whois.nic.fo/fo/status_available_spec.rb | 93 ++---- .../whois.nic.fo/fo/status_registered_spec.rb | 177 ++++------- .../property_contact_without_changed_spec.rb | 45 ++- ...property_nameservers_multiple_ipv4_spec.rb | 31 +- .../fr/property_nameservers_spec.rb | 31 +- ...ameservers_with_ipv4_and_some_ipv6_spec.rb | 63 ++-- .../fr/property_status_active_spec.rb | 25 +- .../fr/property_status_blocked_spec.rb | 25 +- .../fr/property_status_missing_spec.rb | 25 +- .../fr/property_status_not_open_spec.rb | 25 +- .../fr/property_status_redemption_spec.rb | 25 +- .../fr/property_status_registered_spec.rb | 25 +- .../fr/response_throttled_spec.rb | 13 +- .../whois.nic.fr/fr/status_available_spec.rb | 75 ++--- .../whois.nic.fr/fr/status_registered_spec.rb | 179 +++++------ .../tf/property_status_frozen_spec.rb | 25 +- .../tf/response_throttled_spec.rb | 13 +- .../whois.nic.fr/tf/status_available_spec.rb | 75 ++--- .../whois.nic.fr/tf/status_registered_spec.rb | 183 +++++------- .../whois.nic.gd/gd/status_available_spec.rb | 99 ++----- .../whois.nic.gd/gd/status_registered_spec.rb | 215 +++++--------- .../whois.nic.gd/gd/status_reserved_spec.rb | 31 +- .../whois.nic.gl/gl/status_available_spec.rb | 69 +---- .../whois.nic.gl/gl/status_registered_spec.rb | 97 ++---- .../app/status_available_spec.rb | 93 ++---- .../app/status_registered_spec.rb | 111 +++---- .../dev/status_available_spec.rb | 93 ++---- .../dev/status_registered_spec.rb | 111 +++---- .../how/status_available_spec.rb | 93 ++---- .../how/status_registered_spec.rb | 111 +++---- .../page/status_available_spec.rb | 93 ++---- .../page/status_registered_spec.rb | 79 ++--- .../soy/status_available_spec.rb | 93 ++---- .../soy/status_registered_spec.rb | 111 +++---- .../xn--q9jyb4c/status_available_spec.rb | 93 ++---- .../xn--q9jyb4c/status_registered_spec.rb | 111 +++---- .../gs/property_status_available_spec.rb | 25 +- .../gs/property_status_ok_spec.rb | 25 +- .../whois.nic.gs/gs/status_available_spec.rb | 69 +---- .../whois.nic.gs/gs/status_registered_spec.rb | 89 ++---- .../whois.nic.hn/hn/status_available_spec.rb | 69 +---- .../whois.nic.hn/hn/status_registered_spec.rb | 89 ++---- .../whois.nic.ht/ht/status_available_spec.rb | 69 +---- .../whois.nic.ht/ht/status_registered_spec.rb | 97 ++---- .../whois.nic.hu/hu/status_available_spec.rb | 91 ++---- .../whois.nic.hu/hu/status_registered_spec.rb | 93 ++---- .../whois.nic.im/im/status_available_spec.rb | 51 +--- .../whois.nic.im/im/status_registered_spec.rb | 69 ++--- .../whois.nic.io/io/status_available_spec.rb | 101 ++----- .../whois.nic.io/io/status_registered_spec.rb | 161 ++++------ .../whois.nic.io/io/status_reserved_spec.rb | 101 ++----- .../whois.nic.ir/ir/status_available_spec.rb | 51 +--- .../whois.nic.ir/ir/status_registered_spec.rb | 69 ++--- .../it/property_contact_province_spec.rb | 39 ++- ...ty_contact_with_company_in_address_spec.rb | 39 ++- ...property_contact_with_organization_spec.rb | 39 ++- .../it/property_status_available_spec.rb | 25 +- .../it/property_status_client_spec.rb | 25 +- .../it/property_status_graceperiod_spec.rb | 25 +- ...operty_status_inactive_noregistrar_spec.rb | 25 +- .../it/property_status_no_provider_spec.rb | 25 +- .../it/property_status_ok_autorenew_spec.rb | 25 +- .../it/property_status_ok_spec.rb | 25 +- .../it/property_status_pending-delete_spec.rb | 25 +- ...status_pendingdelete_pendingdelete_spec.rb | 25 +- ...tus_pendingdelete_redemptionperiod_spec.rb | 25 +- ...us_pendingtransfer_autorenewperiod_spec.rb | 25 +- .../property_status_pendingtransfer_spec.rb | 25 +- ...atus_pendingupdate_autorenewperiod_spec.rb | 25 +- .../it/property_status_pendingupdate_spec.rb | 25 +- ...erty_status_redemption_no_provider_spec.rb | 25 +- .../it/property_status_reserved_spec.rb | 25 +- .../it/property_status_unassignable_spec.rb | 25 +- .../it/property_technical_contact_spec.rb | 23 +- .../it/response_unavailable_spec.rb | 13 +- .../whois.nic.it/it/status_available_spec.rb | 105 ++----- .../whois.nic.it/it/status_registered_spec.rb | 223 +++++--------- .../it/status_unavailable_spec.rb | 25 +- .../property_nameserver_no_nameserver_spec.rb | 15 +- .../jobs/status_available_spec.rb | 87 ++---- .../jobs/status_registered_spec.rb | 115 ++------ .../whois.nic.ki/ki/status_available_spec.rb | 69 +---- .../whois.nic.ki/ki/status_registered_spec.rb | 97 ++---- .../kz/property_status_missing_spec.rb | 25 +- .../kz/property_status_multiple_spec.rb | 25 +- .../kz/property_status_ok_spec.rb | 25 +- .../kz/property_updated_on_blank_spec.rb | 13 +- .../whois.nic.kz/kz/status_available_spec.rb | 51 +--- .../whois.nic.kz/kz/status_registered_spec.rb | 63 ++-- .../la/property_status_multiple_spec.rb | 13 +- .../la/property_status_single_spec.rb | 13 +- .../whois.nic.la/la/status_available_spec.rb | 99 ++----- .../whois.nic.la/la/status_registered_spec.rb | 211 +++++-------- .../whois.nic.li/li/status_available_spec.rb | 51 +--- .../whois.nic.li/li/status_registered_spec.rb | 67 ++--- .../lk/property_created_on_null_spec.rb | 13 +- .../lk/property_updated_on_null_spec.rb | 13 +- .../whois.nic.lk/lk/status_available_spec.rb | 95 ++---- .../whois.nic.lk/lk/status_registered_spec.rb | 125 +++----- .../whois.nic.lv/lv/status_available_spec.rb | 51 +--- .../whois.nic.lv/lv/status_registered_spec.rb | 69 ++--- .../whois.nic.ly/ly/status_available_spec.rb | 51 +--- .../whois.nic.ly/ly/status_registered_spec.rb | 73 ++--- .../whois.nic.md/md/status_available_spec.rb | 95 ++---- .../whois.nic.md/md/status_registered_spec.rb | 119 ++------ .../me/property_nameservers_is_blank_spec.rb | 15 +- .../me/property_updated_on_is_blank_spec.rb | 13 +- .../me/response_throttled_spec.rb | 13 +- .../whois.nic.me/me/status_available_spec.rb | 99 ++----- .../whois.nic.me/me/status_registered_spec.rb | 153 +++------- .../whois.nic.mg/mg/status_available_spec.rb | 69 +---- .../whois.nic.mg/mg/status_registered_spec.rb | 97 ++---- .../whois.nic.ms/ms/status_available_spec.rb | 69 +---- .../whois.nic.ms/ms/status_registered_spec.rb | 89 ++---- .../whois.nic.mu/mu/status_available_spec.rb | 69 +---- .../whois.nic.mu/mu/status_registered_spec.rb | 97 ++---- .../mx/property_nameservers_with_ip_spec.rb | 27 +- .../whois.nic.mx/mx/status_available_spec.rb | 45 +-- .../whois.nic.mx/mx/status_registered_spec.rb | 81 ++--- .../name/status_available_spec.rb | 51 +--- .../name/status_registered_spec.rb | 89 ++---- .../ng/property_status_available_spec.rb | 25 +- .../ng/property_status_ok_spec.rb | 25 +- .../ng/status_available_spec.rb | 69 +---- .../ng/status_registered_spec.rb | 97 ++---- .../sa/status_available_spec.rb | 51 +--- .../sa/status_registered_spec.rb | 71 ++--- .../sb/property_status_available_spec.rb | 25 +- .../sb/property_status_ok_spec.rb | 25 +- .../sb/status_available_spec.rb | 69 +---- .../sb/status_registered_spec.rb | 89 ++---- .../whois.nic.nf/nf/status_available_spec.rb | 69 +---- .../whois.nic.nf/nf/status_registered_spec.rb | 97 ++---- .../uy/property_updated_on_empty_spec.rb | 13 +- .../uy/status_available_spec.rb | 51 +--- .../uy/status_registered_spec.rb | 71 ++--- ...rty_nameservers_with_ipv4_and_ipv6_spec.rb | 39 ++- .../pm/response_throttled_spec.rb | 13 +- .../whois.nic.pm/pm/status_available_spec.rb | 75 ++--- .../whois.nic.pm/pm/status_registered_spec.rb | 183 +++++------- .../whois.nic.pr/pr/status_available_spec.rb | 87 ++---- .../whois.nic.pr/pr/status_registered_spec.rb | 107 ++----- .../at/status_available_spec.rb | 49 +-- .../at/status_registered_spec.rb | 51 +--- .../whois.nic.pw/pw/status_available_spec.rb | 99 ++----- .../whois.nic.pw/pw/status_registered_spec.rb | 251 ++++++---------- ...rty_nameservers_with_ipv4_and_ipv6_spec.rb | 39 ++- .../re/response_throttled_spec.rb | 13 +- .../whois.nic.re/re/status_available_spec.rb | 75 ++--- .../whois.nic.re/re/status_registered_spec.rb | 183 +++++------- .../whois.nic.sh/sh/status_available_spec.rb | 95 ++---- .../whois.nic.sh/sh/status_registered_spec.rb | 147 +++------ .../whois.nic.sl/sl/status_available_spec.rb | 51 +--- .../whois.nic.sl/sl/status_registered_spec.rb | 71 ++--- .../whois.nic.sm/sm/status_available_spec.rb | 51 +--- .../whois.nic.sm/sm/status_registered_spec.rb | 71 ++--- .../whois.nic.sn/sn/status_available_spec.rb | 99 ++----- .../whois.nic.sn/sn/status_registered_spec.rb | 145 +++------ .../whois.nic.so/so/status_available_spec.rb | 51 +--- .../whois.nic.so/so/status_registered_spec.rb | 73 ++--- .../space/status_available_spec.rb | 99 ++----- .../space/status_registered_spec.rb | 231 ++++++--------- .../whois.nic.st/st/status_available_spec.rb | 51 +--- .../whois.nic.st/st/status_registered_spec.rb | 73 ++--- .../systems/status_available_premium_spec.rb | 42 +++ .../systems/status_available_spec.rb | 42 +++ .../systems/status_registered_spec.rb | 95 ++++++ .../systems/status_reserved_spec.rb | 42 +++ .../whois.nic.tc/tc/status_available_spec.rb | 69 +---- .../whois.nic.tc/tc/status_registered_spec.rb | 95 ++---- .../tech/status_available_spec.rb | 99 ++----- .../tech/status_registered_spec.rb | 227 ++++++-------- .../tel/status_available_spec.rb | 93 ++---- .../tel/status_registered_spec.rb | 207 +++++-------- .../whois.nic.tl/tl/status_available_spec.rb | 69 +---- .../whois.nic.tl/tl/status_registered_spec.rb | 89 ++---- .../whois.nic.tm/tm/status_available_spec.rb | 95 ++---- .../whois.nic.tm/tm/status_registered_spec.rb | 113 ++----- .../tr/property_nameservers_with_ip_spec.rb | 33 +-- ...ty_nameservers_with_trailing_space_spec.rb | 23 +- ...rant_contact_outside_cityinoneline_spec.rb | 43 ++- ...trant_contact_outside_citynextline_spec.rb | 43 ++- ...property_registrant_contact_turkey_spec.rb | 43 ++- .../tr/response_error_invalid_input_spec.rb | 25 +- .../whois.nic.tr/tr/status_available_spec.rb | 99 ++----- .../whois.nic.tr/tr/status_invalid_spec.rb | 99 ++----- .../whois.nic.tr/tr/status_registered_spec.rb | 203 +++++-------- .../travel/property_status_multiple_spec.rb | 29 -- .../travel/property_status_single_spec.rb | 29 -- .../travel/status_available_spec.rb | 93 ++---- .../travel/status_registered_spec.rb | 197 +++++-------- .../uk/property_nameservers_with_ip_spec.rb | 27 +- .../uk/property_registrar_godaddy_spec.rb | 21 +- ...rty_registrar_without_trading_name_spec.rb | 21 +- .../uk/property_status_missing_spec.rb | 25 +- ...property_status_no_longer_required_spec.rb | 25 +- .../property_status_no_status_listed_spec.rb | 25 +- ...rty_status_processing_registration_spec.rb | 25 +- ...property_status_processing_renewal_spec.rb | 25 +- ...tatus_registered_until_expiry_date_spec.rb | 25 +- .../uk/property_status_suspended_spec.rb | 25 +- .../uk/response_throttled_spec.rb | 13 +- .../whois.nic.uk/uk/status_available_spec.rb | 75 +---- .../whois.nic.uk/uk/status_invalid_spec.rb | 25 +- .../whois.nic.uk/uk/status_registered_spec.rb | 133 +++------ .../whois.nic.uk/uk/status_reserved_spec.rb | 139 +++------ .../whois.nic.uk/uk/status_suspended_spec.rb | 71 ++--- .../whois.nic.us/us/status_available_spec.rb | 93 ++---- .../whois.nic.us/us/status_registered_spec.rb | 203 +++++-------- .../ve/property_expires_on_missing_spec.rb | 13 +- .../ve/property_nameservers_missing_spec.rb | 15 +- .../ve/property_nameservers_spec.rb | 23 +- .../ve/property_status_activo_spec.rb | 25 +- .../ve/property_status_missing_spec.rb | 25 +- .../ve/property_status_suspendido_spec.rb | 25 +- .../ve/property_updated_on_blank_spec.rb | 13 +- .../ve/property_updated_on_spec.rb | 15 +- .../whois.nic.ve/ve/status_available_spec.rb | 51 +--- .../whois.nic.ve/ve/status_inactive_spec.rb | 65 ++-- .../whois.nic.ve/ve/status_registered_spec.rb | 55 +--- .../wf/response_throttled_spec.rb | 13 +- .../whois.nic.wf/wf/status_available_spec.rb | 75 ++--- .../whois.nic.wf/wf/status_registered_spec.rb | 183 +++++------- .../world/status_available_spec.rb | 93 ++---- .../world/status_registered_spec.rb | 191 +++++------- .../xxx/status_available_spec.rb | 105 ++----- .../xxx/status_registered_spec.rb | 217 +++++--------- .../whois.nic.xxx/xxx/status_reserved_spec.rb | 31 +- .../xyz/status_available_spec.rb | 99 ++----- .../xyz/status_registered_spec.rb | 245 ++++++--------- .../yt/response_throttled_spec.rb | 13 +- .../whois.nic.yt/yt/status_available_spec.rb | 75 ++--- .../whois.nic.yt/yt/status_registered_spec.rb | 183 +++++------- .../no/status_available_spec.rb | 43 +-- .../no/status_registered_spec.rb | 47 +-- .../status_available_spec.rb | 93 ++---- .../status_registered_spec.rb | 191 +++++------- .../id/status_available_spec.rb | 99 ++----- .../id/status_registered_spec.rb | 227 ++++++-------- .../org/response_throttled_spec.rb | 13 +- .../org/status_available_spec.rb | 99 ++----- .../org/status_registered_spec.rb | 159 ++++------ .../ps/status_available_spec.rb | 69 +---- .../ps/status_registered_spec.rb | 103 ++----- .../bg/property_nameservers_with_ip_spec.rb | 27 +- .../bg/status_available_spec.rb | 51 +--- .../bg/status_registered_spec.rb | 71 ++--- .../registered_without_updated_on_spec.rb | 13 +- .../status_registered_spec.rb | 201 +++++-------- .../si/status_available_spec.rb | 51 +--- .../si/status_registered_spec.rb | 71 ++--- .../ma/status_available_spec.rb | 43 +-- .../ma/status_registered_spec.rb | 47 +-- .../br/property_nameservers_with_ip_spec.rb | 39 ++- .../br/status_available_limited_spec.rb | 19 +- .../br/status_available_spec.rb | 57 +--- .../br/status_registered_limited_spec.rb | 19 +- .../br/status_registered_spec.rb | 199 +++++-------- .../gy/status_available_spec.rb | 69 +---- .../gy/status_registered_spec.rb | 97 ++---- .../hm/status_available_spec.rb | 51 +--- .../hm/status_registered_spec.rb | 63 ++-- .../om/status_available_spec.rb | 97 ++---- .../om/status_registered_spec.rb | 185 ++++-------- .../om/status_reserved_spec.rb | 31 +- .../property_nameservers_without_ips_spec.rb | 33 +-- .../qa/status_available_spec.rb | 97 ++---- .../qa/status_registered_spec.rb | 165 ++++------- .../rs/case_token_whois_privacy_spec.rb | 31 +- .../property_nameservers_hyphenated_spec.rb | 27 +- .../rs/property_status_expired_spec.rb | 25 +- .../rs/property_status_in_transfer_spec.rb | 25 +- .../rs/property_status_locked_spec.rb | 25 +- .../rs/status_available_spec.rb | 99 ++----- .../rs/status_registered_spec.rb | 171 ++++------- .../property_status_updateprohibited_spec.rb | 25 +- .../ro/status_available_spec.rb | 51 +--- .../ro/status_registered_spec.rb | 83 ++---- .../status_available_spec.rb | 93 ++---- .../status_registered_spec.rb | 215 +++++--------- .../status_registered_spec.rb | 209 +++++-------- .../registered_without_update_on_spec.rb | 13 +- .../status_available_spec.rb | 93 ++---- .../status_registered_spec.rb | 199 +++++-------- .../sg/property_nameservers_schema_1_spec.rb | 31 +- ...perty_nameservers_schema_1_with_ip_spec.rb | 33 +-- .../sg/property_nameservers_schema_2_spec.rb | 31 +- .../sg/status_available_spec.rb | 51 +--- .../sg/status_registered_spec.rb | 71 ++--- .../sk/property_status_dom_dakt_spec.rb | 25 +- .../sk/property_status_dom_exp_spec.rb | 25 +- .../sk/property_status_dom_held_spec.rb | 25 +- .../sk/property_status_dom_lnot_spec.rb | 25 +- .../sk/property_status_dom_ok_spec.rb | 25 +- .../sk/property_status_dom_ta_spec.rb | 25 +- .../sk/property_status_dom_warn_spec.rb | 25 +- .../sk/status_available_spec.rb | 51 +--- .../sk/status_registered_spec.rb | 71 ++--- .../status_available_spec.rb | 99 ++----- .../status_registered_spec.rb | 179 ++++------- .../nz/property_status_pendingrelease_spec.rb | 25 +- .../nz/response_throttled_spec.rb | 13 +- .../nz/status_available_spec.rb | 99 ++----- .../nz/status_invalid_spec.rb | 69 +---- .../nz/status_registered_spec.rb | 223 ++++++-------- .../sx/property_status_premium_name_spec.rb | 25 +- .../whois.sx/sx/status_available_spec.rb | 99 ++----- .../whois.sx/sx/status_registered_spec.rb | 219 +++++--------- .../whois.sx/sx/status_unavailable_spec.rb | 25 +- .../ru/property_nameservers_with_ip_spec.rb | 33 +-- .../ru/status_available_spec.rb | 89 ++---- .../ru/status_registered_spec.rb | 119 +++----- .../su/status_available_spec.rb | 89 ++---- .../su/status_registered_spec.rb | 119 +++----- .../xn--p1ai/status_available_spec.rb | 89 ++---- .../xn--p1ai/status_registered_spec.rb | 125 +++----- .../th/status_available_spec.rb | 51 +--- .../th/status_registered_spec.rb | 73 ++--- .../ee/property_status_serverhold_spec.rb | 253 +++++++--------- .../whois.tld.ee/ee/status_available_spec.rb | 99 ++----- .../whois.tld.ee/ee/status_expired_spec.rb | 223 ++++++-------- .../whois.tld.ee/ee/status_registered_spec.rb | 237 ++++++--------- .../whois.tld.sy/sy/status_available_spec.rb | 69 +---- .../whois.tld.sy/sy/status_registered_spec.rb | 87 ++---- .../to/response_incomplete_spec.rb | 19 +- .../to/status_available_spec.rb | 97 ++---- .../to/status_registered_spec.rb | 97 ++---- .../whois.tucows.com/status_available_spec.rb | 93 ++---- .../status_registered_spec.rb | 195 +++++------- .../tw/status_available_spec.rb | 51 +--- .../tw/status_registered_spec.rb | 71 ++--- .../tz/property_status_expired_spec.rb | 25 +- .../tz/status_available_spec.rb | 93 ++---- .../tz/status_registered_spec.rb | 203 +++++-------- .../uaepp/property_status_clienthold_spec.rb | 25 +- ...ty_status_clienttransferprohibited_spec.rb | 25 +- .../uaepp/property_status_graceperiod_spec.rb | 25 +- .../ua/uaepp/property_status_ok_spec.rb | 25 +- .../property_status_pendingdelete_spec.rb | 25 +- .../property_status_redemptionperiod_spec.rb | 25 +- .../ua/uaepp/status_available_spec.rb | 93 ++---- .../ua/uaepp/status_registered_spec.rb | 211 +++++-------- .../uanic/property_contacts_multiple_spec.rb | 79 +++-- .../ua/uanic/status_registered_spec.rb | 171 ++++------- .../whois.udag.net/status_available_spec.rb | 93 ++---- .../whois.udag.net/status_registered_spec.rb | 213 +++++-------- .../tattoo/status_available_spec.rb | 93 ++---- .../tattoo/status_registered_spec.rb | 233 ++++++--------- .../fj/status_available_spec.rb | 51 +--- .../fj/status_registered_spec.rb | 69 ++--- .../property_nameserver_no_nameserver_spec.rb | 15 +- .../com/status_available_spec.rb | 87 ++---- .../com/status_registered_spec.rb | 131 +++----- .../net/status_available_spec.rb | 87 ++---- .../net/status_registered_spec.rb | 131 +++----- .../response_unavailable_spec.rb | 13 +- .../ws/status_available_spec.rb | 51 +--- .../ws/status_registered_spec.rb | 73 ++--- .../status_available_spec.rb | 93 ++---- .../status_registered_spec.rb | 225 ++++++-------- .../status_available_spec.rb | 93 ++---- .../status_registered_spec.rb | 191 +++++------- ...us_registered_with_no_last_updated_spec.rb | 13 +- .../za.net/status_available_spec.rb | 51 +--- .../za.net/status_registered_spec.rb | 63 ++-- .../za.org/status_available_spec.rb | 51 +--- .../za.org/status_registered_spec.rb | 67 ++--- .../whois1.nic.bi/bi/status_available_spec.rb | 69 +---- .../bi/status_registered_spec.rb | 97 ++---- tasks/spec.rake | 36 +-- 793 files changed, 20245 insertions(+), 44543 deletions(-) rename lib/whois/parsers/{whois.donuts.co.rb => donuts_inc.rb} (73%) delete mode 100644 lib/whois/parsers/whois.nic.travel.rb delete mode 100644 lib/whois/parsers/whois.nic.world.rb delete mode 100644 spec/fixtures/responses/whois.donuts.co/bike/status_available.txt delete mode 100644 spec/fixtures/responses/whois.donuts.co/bike/status_registered.expected delete mode 100644 spec/fixtures/responses/whois.donuts.co/bike/status_registered.txt rename spec/fixtures/responses/{whois.donuts.co => whois.nic.bike}/bike/status_available.expected (100%) create mode 100644 spec/fixtures/responses/whois.nic.bike/bike/status_available.txt create mode 100644 spec/fixtures/responses/whois.nic.bike/bike/status_registered.expected create mode 100644 spec/fixtures/responses/whois.nic.bike/bike/status_registered.txt create mode 100644 spec/fixtures/responses/whois.nic.systems/systems/status_available.expected create mode 100644 spec/fixtures/responses/whois.nic.systems/systems/status_available.txt create mode 100644 spec/fixtures/responses/whois.nic.systems/systems/status_available_premium.expected create mode 100644 spec/fixtures/responses/whois.nic.systems/systems/status_available_premium.txt create mode 100644 spec/fixtures/responses/whois.nic.systems/systems/status_registered.expected create mode 100644 spec/fixtures/responses/whois.nic.systems/systems/status_registered.txt create mode 100644 spec/fixtures/responses/whois.nic.systems/systems/status_reserved.expected create mode 100644 spec/fixtures/responses/whois.nic.systems/systems/status_reserved.txt delete mode 100644 spec/fixtures/responses/whois.nic.travel/travel/property_status_multiple.expected delete mode 100644 spec/fixtures/responses/whois.nic.travel/travel/property_status_multiple.txt delete mode 100644 spec/fixtures/responses/whois.nic.travel/travel/property_status_single.expected delete mode 100644 spec/fixtures/responses/whois.nic.travel/travel/property_status_single.txt delete mode 100644 spec/whois/parsers/responses/whois.donuts.co/bike/status_available_spec.rb delete mode 100644 spec/whois/parsers/responses/whois.donuts.co/bike/status_registered_spec.rb create mode 100644 spec/whois/parsers/responses/whois.nic.bike/bike/status_available_spec.rb create mode 100644 spec/whois/parsers/responses/whois.nic.bike/bike/status_registered_spec.rb create mode 100644 spec/whois/parsers/responses/whois.nic.systems/systems/status_available_premium_spec.rb create mode 100644 spec/whois/parsers/responses/whois.nic.systems/systems/status_available_spec.rb create mode 100644 spec/whois/parsers/responses/whois.nic.systems/systems/status_registered_spec.rb create mode 100644 spec/whois/parsers/responses/whois.nic.systems/systems/status_reserved_spec.rb delete mode 100644 spec/whois/parsers/responses/whois.nic.travel/travel/property_status_multiple_spec.rb delete mode 100644 spec/whois/parsers/responses/whois.nic.travel/travel/property_status_single_spec.rb diff --git a/CHANGELOG.md b/CHANGELOG.md index 67f5e209..946c0d9a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,7 @@ This project uses [Semantic Versioning 2.0.0](http://semver.org/). #### master +- NEW: Added support for all DonutsInc TLDs (241 at the time: .ACADEMY, .ACCOUNTANTS, .ACTOR, .AGENCY, .AIRFORCE, .APARTMENTS, .ARMY, .ASSOCIATES, .ATTORNEY, .AUCTION, .BAND, .BARGAINS, .BIKE, .BINGO, .BOUTIQUE, .BUILDERS, .BUSINESS, .CAB, .CAFE, .CAMERA, .CAMP, .CAPITAL, .CARDS, .CARE, .CAREERS, .CASH, .CASINO, .CATERING, .CENTER, .CHARITY, .CHAT, .CHEAP, .CHURCH, .CITY, .CLAIMS, .CLEANING, .CLINIC, .CLOTHING, .COACH, .CODES, .COFFEE, .COMMUNITY, .COMPANY, .COMPUTER, .CONDOS, .CONSTRUCTION, .CONTACT, .CONTRACTORS, .COOL, .COUPONS, .CREDIT, .CREDITCARD, .CRUISES, .DANCE, .DATING, .DEALS, .DEGREE, .DELIVERY, .DEMOCRAT, .DENTAL, .DENTIST, .DIAMONDS, .DIGITAL, .DIRECT, .DIRECTORY, .DISCOUNT, .DOCTOR, .DOG, .DOMAINS, .EDUCATION, .EMAIL, .ENERGY, .ENGINEER, .ENGINEERING, .ENTERPRISES, .EQUIPMENT, .ESTATE, .EVENTS, .EXCHANGE, .EXPERT, .EXPOSED, .EXPRESS, .FAIL, .FAMILY, .FAN, .FARM, .FINANCE, .FINANCIAL, .FISH, .FITNESS, .FLIGHTS, .FLORIST, .FOOTBALL, .FORSALE, .FOUNDATION, .FUND, .FURNITURE, .FUTBOL, .FYI, .GALLERY, .GAMES, .GIFTS, .GIVES, .GLASS, .GMBH, .GOLD, .GOLF, .GRAPHICS, .GRATIS, .GRIPE, .GROUP, .GUIDE, .GURU, .HAUS, .HEALTHCARE, .HOCKEY, .HOLDINGS, .HOLIDAY, .HOSPITAL, .HOUSE, .IMMO, .IMMOBILIEN, .INDUSTRIES, .INSTITUTE, .INSURE, .INTERNATIONAL, .INVESTMENTS, .IRISH, .JETZT, .JEWELRY, .KAUFEN, .KITCHEN, .LAND, .LAWYER, .LEASE, .LEGAL, .LIFE, .LIGHTING, .LIMITED, .LIMO, .LIVE, .LOANS, .LTD, .MAISON, .MANAGEMENT, .MARKET, .MARKETING, .MBA, .MEDIA, .MEMORIAL, .MODA, .MONEY, .MORTGAGE, .MOVIE, .NAVY, .NETWORK, .NEWS, .NINJA, .PARTNERS, .PARTS, .PHOTOGRAPHY, .PHOTOS, .PICTURES, .PIZZA, .PLACE, .PLUMBING, .PLUS, .PRODUCTIONS, .PROPERTIES, .PUB, .RECIPES, .REHAB, .REISE, .REISEN, .RENTALS, .REPAIR, .REPORT, .REPUBLICAN, .RESTAURANT, .REVIEWS, .RIP, .ROCKS, .RUN, .SALE, .SALON, .SARL, .SCHOOL, .SCHULE, .SERVICES, .SHOES, .SHOPPING, .SHOW, .SINGLES, .SOCCER, .SOCIAL, .SOFTWARE, .SOLAR, .SOLUTIONS, .STUDIO, .STYLE, .SUPPLIES, .SUPPLY, .SUPPORT, .SURGERY, .SYSTEMS, .TAX, .TAXI, .TEAM, .TECHNOLOGY, .TENNIS, .THEATER, .TIENDA, .TIPS, .TIRES, .TODAY, .TOOLS, .TOURS, .TOWN, .TOYS, .TRAINING, .TRAVEL, .UNIVERSITY, .VACATIONS, .VENTURES, .VET, .VIAJES, .VIDEO, .VILLAS, .VIN, .VISION, .VOYAGE, .WATCH, .WINE, .WORKS, .WORLD, .WTF, .ZONE, .企业, .娱乐, .游戏, .商店) - FIX: Updated parser for .CA tld - NEW: Added parser for .WORLD tld - NEW: Add whois.nic.google (support for .APP, .DEV, .HOW, .PAGE, .SOY) and update xn--q9jyb4c (.みんな) to use whois.nic.google (based on #124) Thanks @derekjc diff --git a/lib/whois/parser.rb b/lib/whois/parser.rb index 4fc47367..22a36bfd 100644 --- a/lib/whois/parser.rb +++ b/lib/whois/parser.rb @@ -91,9 +91,8 @@ def self.bug!(error, message) PROPERTY_STATE_SUPPORTED = :supported - # Returns the proper parser instance for given part. - # The parser class is selected according to the - # value of the #host attribute for given part. + # Instanciate the proper parser instance for given part. + # The parser class is determined using .parser_for # # @param [Whois::Record::Part] part The part to get the parser for. # @@ -112,37 +111,41 @@ def self.bug!(error, message) # # => # # def self.parser_for(part) - parser_klass(part.host).new(part) - rescue LoadError - Parsers.const_defined?("Blank") || autoload("blank") - Parsers::Blank.new(part) + parser_klass(part).new(part) end - # Detects the proper parser class according to given host + # Detects the proper parser class according to given part # and returns the class constant. + # The parser class is selected according to the values of the + # #host and #body attributes for given part. # # This method autoloads missing parser classes. If you want to define # a custom parser, simple make sure the class is loaded in the Ruby # environment before this method is called. # - # @param [String] host The server host. + # @param [Whois::Record::Part] part The part to get the parser for. # # @return [Class] The instance of Class representing the parser Class - # corresponding to host. If host doesn't have + # corresponding to part. If part doesn't have # a specific parser implementation, then returns # the {Whois::Parsers::Blank} {Class}. # The {Class} is expected to be a child of {Whois::Parsers::Base}. - # @raises LoadError If the class is not found. # # @example # - # Parser.parser_klass("whois.example.com") + # Parser.parser_klass(Whois::Record::Part.new(host: "whois.example.com")) # # => Whois::Parsers::WhoisExampleCom # - def self.parser_klass(host) - name = host_to_parser(host) - Parsers.const_defined?(name) || autoload(host) - Parsers.const_get(name) + def self.parser_klass(part) + autoload(part.host) + rescue LoadError + # Some WHOIS services like Donuts Inc covers hundred of TLDs (https://donuts.domains/what-we-do/top-level-domain-portfolio/) + # But using one host per TLD, so in this case it's easier to match on the disclaimer directly to cover all hosts + if part.body&.include?("Terms of Use: Donuts Inc.") + autoload("donuts_inc") + else + autoload("blank") + end end # Converts host to the corresponding parser class name. @@ -172,7 +175,9 @@ def self.host_to_parser(host) # @return [void] # def self.autoload(name) - require "whois/parsers/#{name}" + class_name = host_to_parser(name) + require_relative "parsers/#{name}" unless Parsers.const_defined?(class_name) + Parsers.const_get(class_name) end diff --git a/lib/whois/parsers/whois.donuts.co.rb b/lib/whois/parsers/donuts_inc.rb similarity index 73% rename from lib/whois/parsers/whois.donuts.co.rb rename to lib/whois/parsers/donuts_inc.rb index 3f08ba1b..4daf60ed 100644 --- a/lib/whois/parsers/whois.donuts.co.rb +++ b/lib/whois/parsers/donuts_inc.rb @@ -18,10 +18,11 @@ class Parsers # @see Whois::Parsers::Example # The Example parser for the list of all available methods. # - class WhoisDonutsCo < BaseIcannCompliant + class DonutsInc < BaseIcannCompliant self.scanner = Scanners::BaseIcannCompliant, { - pattern_available: /^Domain not found\./ + pattern_available: /^Domain not found\./, + pattern_reserved: /^The registration of this domain is restricted/ } end diff --git a/lib/whois/parsers/whois.nic.travel.rb b/lib/whois/parsers/whois.nic.travel.rb deleted file mode 100644 index e5306dbf..00000000 --- a/lib/whois/parsers/whois.nic.travel.rb +++ /dev/null @@ -1,25 +0,0 @@ -#-- -# Ruby Whois -# -# An intelligent pure Ruby WHOIS client and parser. -# -# Copyright (c) 2009-2018 Simone Carletti -#++ - - -require_relative 'base_shared2' - - -module Whois - class Parsers - - # Parser for the whois.nic.travel server. - # - # @see Whois::Parsers::Example - # The Example parser for the list of all available methods. - # - class WhoisNicTravel < BaseShared2 - end - - end -end diff --git a/lib/whois/parsers/whois.nic.world.rb b/lib/whois/parsers/whois.nic.world.rb deleted file mode 100644 index a5613ab8..00000000 --- a/lib/whois/parsers/whois.nic.world.rb +++ /dev/null @@ -1,28 +0,0 @@ -#-- -# Ruby Whois -# -# An intelligent pure Ruby WHOIS client and parser. -# -# Copyright (c) 2009-2018 Simone Carletti -#++ - - -require_relative 'base_icann_compliant' - - -module Whois - class Parsers - - # Parser for the whois.nic.cloud server. - # - # @see Whois::Parsers::Example - # The Example parser for the list of all available methods. - # - class WhoisNicWorld < BaseIcannCompliant - self.scanner = Scanners::BaseIcannCompliant, { - pattern_available: /^Domain not found\./ - } - end - - end -end diff --git a/spec/fixtures/responses/whois.donuts.co/bike/status_available.txt b/spec/fixtures/responses/whois.donuts.co/bike/status_available.txt deleted file mode 100644 index b7682e13..00000000 --- a/spec/fixtures/responses/whois.donuts.co/bike/status_available.txt +++ /dev/null @@ -1,3 +0,0 @@ -Domain not found. - -Terms of Use: Users accessing the Donuts WHOIS service must agree to use the data only for lawful purposes, and under under no circumstances use the data to: 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 registrar's own existing customers. Enable high volume, automated, electronic processes that send queries or data to the systems of Donuts or any ICANN-accredited registrar, except as reasonably necessary to register domain names or modify existing registrations. When using the Donuts Whois service, please consider the following: The Whois service is not a replacement for standard EPP commands to the SRS service. Whois is not considered authoritative for registered domain objects. The Whois service may be scheduled for downtime during production or OT&E maintenance periods. Queries to the Whois services are throttled. If too many queries are received from a single IP address within a specified time, the service will begin to reject further queries for a period of time to prevent disruption of Whois service access. diff --git a/spec/fixtures/responses/whois.donuts.co/bike/status_registered.expected b/spec/fixtures/responses/whois.donuts.co/bike/status_registered.expected deleted file mode 100644 index 33f87c16..00000000 --- a/spec/fixtures/responses/whois.donuts.co/bike/status_registered.expected +++ /dev/null @@ -1,109 +0,0 @@ -#domain - %s == "whereismy.bike" - -#domain_id - %s == "e25432d5c94440c4a8ca0e5ecbc13904-DONUTS" - - -#status - %s == :registered - -#available? - %s == false - -#registered? - %s == true - - -#created_on - %s %CLASS{time} - %s %TIME{2016-02-26 16:49:10 UTC} - -#updated_on - %s %CLASS{time} - %s %TIME{2017-04-12 16:49:41 UTC} - -#expires_on - %s %CLASS{time} - %s %TIME{2018-02-26 16:49:10 UTC} - - -#registrar - %s %CLASS{registrar} - %s.id == "146" - %s.name == "GoDaddy.com, LLC" - %s.url == "http://www.godaddy.com/domains/search.aspx?ci=8990" - - -#registrant_contacts - %s %CLASS{array} - %s %SIZE{1} - %s[0] %CLASS{contact} - %s[0].type == Whois::Parser::Contact::TYPE_REGISTRANT - %s[0].id == "2a94fd50b2ca42c685828dfa8c07e23d-DONUTS" - %s[0].name == "Marko Matenda" - %s[0].organization == "" - %s[0].address == "Ante Starcevica 9." - %s[0].city == "Bjelovar" - %s[0].zip == "43000" - %s[0].state == "Croatia" - %s[0].country == nil - %s[0].country_code == "HR" - %s[0].phone == "+385.916283632" - %s[0].fax == "" - %s[0].email == "marko.matenda@gmail.com" - %s[0].created_on == nil - %s[0].updated_on == nil - -#admin_contacts - %s %CLASS{array} - %s %SIZE{1} - %s[0] %CLASS{contact} - %s[0].type == Whois::Parser::Contact::TYPE_ADMINISTRATIVE - %s[0].id == "a627ad7dc57343858c4397b9e3f9a530-DONUTS" - %s[0].name == "Marko Matenda" - %s[0].organization == "" - %s[0].address == "Ante Starcevica 9." - %s[0].city == "Bjelovar" - %s[0].zip == "43000" - %s[0].state == "Croatia" - %s[0].country == nil - %s[0].country_code == "HR" - %s[0].phone == "+385.916283632" - %s[0].fax == "" - %s[0].email == "marko.matenda@gmail.com" - %s[0].created_on == nil - %s[0].updated_on == nil - -#technical_contacts - %s %CLASS{array} - %s %SIZE{1} - %s[0] %CLASS{contact} - %s[0].type == Whois::Parser::Contact::TYPE_TECHNICAL - %s[0].id == "08094e7dd78143d6b83338c5c59a8160-DONUTS" - %s[0].name == "Marko Matenda" - %s[0].organization == "" - %s[0].address == "Ante Starcevica 9." - %s[0].city == "Bjelovar" - %s[0].zip == "43000" - %s[0].state == "Croatia" - %s[0].country == nil - %s[0].country_code == "HR" - %s[0].phone == "+385.916283632" - %s[0].fax == "" - %s[0].email == "marko.matenda@gmail.com" - %s[0].created_on == nil - %s[0].updated_on == nil - - -#nameservers - %s %CLASS{array} - %s %SIZE{2} - %s[0] %CLASS{nameserver} - %s[0].name == "ns68.domaincontrol.com" - %s[0].ipv4 == nil - %s[0].ipv6 == nil - %s[1] %CLASS{nameserver} - %s[1].name == "ns67.domaincontrol.com" - %s[1].ipv4 == nil - %s[1].ipv6 == nil diff --git a/spec/fixtures/responses/whois.donuts.co/bike/status_registered.txt b/spec/fixtures/responses/whois.donuts.co/bike/status_registered.txt deleted file mode 100644 index 2609c9e4..00000000 --- a/spec/fixtures/responses/whois.donuts.co/bike/status_registered.txt +++ /dev/null @@ -1,63 +0,0 @@ -Domain Name: whereismy.bike -Registry Domain ID: e25432d5c94440c4a8ca0e5ecbc13904-DONUTS -Registrar WHOIS Server: who.godaddy.com/ -Registrar URL: http://www.godaddy.com/domains/search.aspx?ci=8990 -Updated Date: 2017-04-12T16:49:41Z -Creation Date: 2016-02-26T16:49:10Z -Registry Expiry Date: 2018-02-26T16:49:10Z -Registrar: GoDaddy.com, LLC -Registrar IANA ID: 146 -Registrar Abuse Contact Email: abuse@godaddy.com -Registrar Abuse Contact Phone: +1.4806242505 -Domain Status: clientDeleteProhibited https://icann.org/epp#clientDeleteProhibited -Domain Status: clientRenewProhibited https://icann.org/epp#clientRenewProhibited -Domain Status: clientTransferProhibited https://icann.org/epp#clientTransferProhibited -Domain Status: clientUpdateProhibited https://icann.org/epp#clientUpdateProhibited -Registry Registrant ID: 2a94fd50b2ca42c685828dfa8c07e23d-DONUTS -Registrant Name: Marko Matenda -Registrant Organization: -Registrant Street: Ante Starcevica 9. -Registrant City: Bjelovar -Registrant State/Province: Croatia -Registrant Postal Code: 43000 -Registrant Country: HR -Registrant Phone: +385.916283632 -Registrant Phone Ext: -Registrant Fax: -Registrant Fax Ext: -Registrant Email: marko.matenda@gmail.com -Registry Admin ID: a627ad7dc57343858c4397b9e3f9a530-DONUTS -Admin Name: Marko Matenda -Admin Organization: -Admin Street: Ante Starcevica 9. -Admin City: Bjelovar -Admin State/Province: Croatia -Admin Postal Code: 43000 -Admin Country: HR -Admin Phone: +385.916283632 -Admin Phone Ext: -Admin Fax: -Admin Fax Ext: -Admin Email: marko.matenda@gmail.com -Registry Tech ID: 08094e7dd78143d6b83338c5c59a8160-DONUTS -Tech Name: Marko Matenda -Tech Organization: -Tech Street: Ante Starcevica 9. -Tech City: Bjelovar -Tech State/Province: Croatia -Tech Postal Code: 43000 -Tech Country: HR -Tech Phone: +385.916283632 -Tech Phone Ext: -Tech Fax: -Tech Fax Ext: -Tech Email: marko.matenda@gmail.com -Name Server: ns68.domaincontrol.com -Name Server: ns67.domaincontrol.com -DNSSEC: unsigned -URL of the ICANN Whois Inaccuracy Complaint Form: https://www.icann.org/wicf/ ->>> Last update of WHOIS database: 2017-08-03T10:21:19Z <<< - -For more information on Whois status codes, please visit https://icann.org/epp - -Terms of Use: Users accessing the Donuts WHOIS service must agree to use the data only for lawful purposes, and under under no circumstances use the data to: 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 registrar's own existing customers. Enable high volume, automated, electronic processes that send queries or data to the systems of Donuts or any ICANN-accredited registrar, except as reasonably necessary to register domain names or modify existing registrations. When using the Donuts Whois service, please consider the following: The Whois service is not a replacement for standard EPP commands to the SRS service. Whois is not considered authoritative for registered domain objects. The Whois service may be scheduled for downtime during production or OT&E maintenance periods. Queries to the Whois services are throttled. If too many queries are received from a single IP address within a specified time, the service will begin to reject further queries for a period of time to prevent disruption of Whois service access. diff --git a/spec/fixtures/responses/whois.donuts.co/bike/status_available.expected b/spec/fixtures/responses/whois.nic.bike/bike/status_available.expected similarity index 100% rename from spec/fixtures/responses/whois.donuts.co/bike/status_available.expected rename to spec/fixtures/responses/whois.nic.bike/bike/status_available.expected diff --git a/spec/fixtures/responses/whois.nic.bike/bike/status_available.txt b/spec/fixtures/responses/whois.nic.bike/bike/status_available.txt new file mode 100644 index 00000000..f017fcc4 --- /dev/null +++ b/spec/fixtures/responses/whois.nic.bike/bike/status_available.txt @@ -0,0 +1,4 @@ +Domain not found. + +Terms of Use: Donuts Inc. provides this Whois service for information purposes, and to assist persons in obtaining information about or related to a domain name registration record. Donuts does not guarantee its accuracy. Users accessing the Donuts Whois service agree to use the data only for lawful purposes, and under no circumstances may this data be used 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 registrar's own existing customers and b) enable high volume, automated, electronic processes that send queries or data to the systems of Donuts or any ICANN-accredited registrar, except as reasonably necessary to register domain names or modify existing registrations. When using the Donuts Whois service, please consider the following: The Whois service is not a replacement for standard EPP commands to the SRS service. Whois is not considered authoritative for registered domain objects. The Whois service may be scheduled for downtime during production or OT&E maintenance periods. Queries to the Whois services are throttled. If too many queries are received from a single IP address within a specified time, the service will begin to reject further queries for a period of time to prevent disruption of Whois service access. Abuse of the Whois system through data mining is mitigated by detecting and limiting bulk query access from single sources. Where applicable, the presence of a [Non-Public Data] tag indicates that such data is not made publicly available due to applicable data privacy laws or requirements. Should you wish to contact the registrant, please refer to the Whois records available through the registrar URL listed above. Access to non-public data may be provided, upon request, where it can be reasonably confirmed that the requester holds a specific legitimate interest and a proper legal basis for accessing the withheld data +. Access to this data can be requested by submitting a request via the form found at https://donuts.domains/about/policies/whois-layered-access/ Donuts Inc. reserves the right to modify these terms at any time. By submitting this query, you agree to abide by this policy. diff --git a/spec/fixtures/responses/whois.nic.bike/bike/status_registered.expected b/spec/fixtures/responses/whois.nic.bike/bike/status_registered.expected new file mode 100644 index 00000000..41bf01c5 --- /dev/null +++ b/spec/fixtures/responses/whois.nic.bike/bike/status_registered.expected @@ -0,0 +1,96 @@ +#domain + %s == "whereismy.bike" + +#domain_id + %s == "e25432d5c94440c4a8ca0e5ecbc13904-DONUTS" + + +#status + %s == :registered + +#available? + %s == false + +#registered? + %s == true + + +#created_on + %s %CLASS{time} + %s %TIME{2016-02-26 16:49:10 UTC} + +#updated_on + %s %CLASS{time} + %s %TIME{2021-04-12 16:49:14 UTC} + +#expires_on + %s %CLASS{time} + %s %TIME{2022-02-26 16:49:10 UTC} + + +#registrar + %s %CLASS{registrar} + %s.id == "146" + %s.name == "GoDaddy.com, LLC" + %s.url == "http://www.godaddy.com/domains/search.aspx?ci=8990" + + +#registrant_contacts + %s %CLASS{array} + %s %SIZE{1} + %s[0] %CLASS{contact} + %s[0].type == Whois::Parser::Contact::TYPE_REGISTRANT + %s[0].id == "REDACTED FOR PRIVACY" + %s[0].name == "REDACTED FOR PRIVACY" + %s[0].organization == "" + %s[0].address == "REDACTED FOR PRIVACY" + %s[0].city == "REDACTED FOR PRIVACY" + %s[0].zip == "REDACTED FOR PRIVACY" + %s[0].state == "Croatia" + %s[0].country_code == "HR" + %s[0].phone == "REDACTED FOR PRIVACY ext: REDACTED FOR PRIVACY" + %s[0].fax == "REDACTED FOR PRIVACY ext: REDACTED FOR PRIVACY" + %s[0].email == "Please query the RDDS service of the Registrar of Record identified in this output for information on how to contact the Registrant, Admin, or Tech contact of the queried domain name." + +#admin_contacts + %s %CLASS{array} + %s %SIZE{1} + %s[0] %CLASS{contact} + %s[0].type == Whois::Parser::Contact::TYPE_ADMINISTRATIVE + %s[0].id == "REDACTED FOR PRIVACY" + %s[0].name == "REDACTED FOR PRIVACY" + %s[0].organization == "REDACTED FOR PRIVACY" + %s[0].address == "REDACTED FOR PRIVACY" + %s[0].city == "REDACTED FOR PRIVACY" + %s[0].zip == "REDACTED FOR PRIVACY" + %s[0].state == "REDACTED FOR PRIVACY" + %s[0].country_code == "REDACTED FOR PRIVACY" + %s[0].phone == "REDACTED FOR PRIVACY ext: REDACTED FOR PRIVACY" + %s[0].fax == "REDACTED FOR PRIVACY ext: REDACTED FOR PRIVACY" + %s[0].email == "Please query the RDDS service of the Registrar of Record identified in this output for information on how to contact the Registrant, Admin, or Tech contact of the queried domain name." + +#technical_contacts + %s %CLASS{array} + %s %SIZE{1} + %s[0] %CLASS{contact} + %s[0].type == Whois::Parser::Contact::TYPE_TECHNICAL + %s[0].id == "REDACTED FOR PRIVACY" + %s[0].name == "REDACTED FOR PRIVACY" + %s[0].organization == "REDACTED FOR PRIVACY" + %s[0].address == "REDACTED FOR PRIVACY" + %s[0].city == "REDACTED FOR PRIVACY" + %s[0].zip == "REDACTED FOR PRIVACY" + %s[0].state == "REDACTED FOR PRIVACY" + %s[0].country_code == "REDACTED FOR PRIVACY" + %s[0].phone == "REDACTED FOR PRIVACY ext: REDACTED FOR PRIVACY" + %s[0].fax == "REDACTED FOR PRIVACY ext: REDACTED FOR PRIVACY" + %s[0].email == "Please query the RDDS service of the Registrar of Record identified in this output for information on how to contact the Registrant, Admin, or Tech contact of the queried domain name." + + +#nameservers + %s %CLASS{array} + %s %SIZE{2} + %s[0] %CLASS{nameserver} + %s[0].name == "ns67.domaincontrol.com" + %s[1] %CLASS{nameserver} + %s[1].name == "ns68.domaincontrol.com" diff --git a/spec/fixtures/responses/whois.nic.bike/bike/status_registered.txt b/spec/fixtures/responses/whois.nic.bike/bike/status_registered.txt new file mode 100644 index 00000000..d8ea350d --- /dev/null +++ b/spec/fixtures/responses/whois.nic.bike/bike/status_registered.txt @@ -0,0 +1,64 @@ +Domain Name: whereismy.bike +Registry Domain ID: e25432d5c94440c4a8ca0e5ecbc13904-DONUTS +Registrar WHOIS Server: whois.godaddy.com/ +Registrar URL: http://www.godaddy.com/domains/search.aspx?ci=8990 +Updated Date: 2021-04-12T16:49:14Z +Creation Date: 2016-02-26T16:49:10Z +Registry Expiry Date: 2022-02-26T16:49:10Z +Registrar: GoDaddy.com, LLC +Registrar IANA ID: 146 +Registrar Abuse Contact Email: abuse@godaddy.com +Registrar Abuse Contact Phone: +1.4806242505 +Domain Status: clientDeleteProhibited https://icann.org/epp#clientDeleteProhibited +Domain Status: clientRenewProhibited https://icann.org/epp#clientRenewProhibited +Domain Status: clientTransferProhibited https://icann.org/epp#clientTransferProhibited +Domain Status: clientUpdateProhibited https://icann.org/epp#clientUpdateProhibited +Registry Registrant ID: REDACTED FOR PRIVACY +Registrant Name: REDACTED FOR PRIVACY +Registrant Organization: +Registrant Street: REDACTED FOR PRIVACY +Registrant City: REDACTED FOR PRIVACY +Registrant State/Province: Croatia +Registrant Postal Code: REDACTED FOR PRIVACY +Registrant Country: HR +Registrant Phone: REDACTED FOR PRIVACY +Registrant Phone Ext: REDACTED FOR PRIVACY +Registrant Fax: REDACTED FOR PRIVACY +Registrant Fax Ext: REDACTED FOR PRIVACY +Registrant Email: Please query the RDDS service of the Registrar of Record identified in this output for information on how to contact the Registrant, Admin, or Tech contact of the queried domain name. +Registry Admin ID: REDACTED FOR PRIVACY +Admin Name: REDACTED FOR PRIVACY +Admin Organization: REDACTED FOR PRIVACY +Admin Street: REDACTED FOR PRIVACY +Admin City: REDACTED FOR PRIVACY +Admin State/Province: REDACTED FOR PRIVACY +Admin Postal Code: REDACTED FOR PRIVACY +Admin Country: REDACTED FOR PRIVACY +Admin Phone: REDACTED FOR PRIVACY +Admin Phone Ext: REDACTED FOR PRIVACY +Admin Fax: REDACTED FOR PRIVACY +Admin Fax Ext: REDACTED FOR PRIVACY +Admin Email: Please query the RDDS service of the Registrar of Record identified in this output for information on how to contact the Registrant, Admin, or Tech contact of the queried domain name. +Registry Tech ID: REDACTED FOR PRIVACY +Tech Name: REDACTED FOR PRIVACY +Tech Organization: REDACTED FOR PRIVACY +Tech Street: REDACTED FOR PRIVACY +Tech City: REDACTED FOR PRIVACY +Tech State/Province: REDACTED FOR PRIVACY +Tech Postal Code: REDACTED FOR PRIVACY +Tech Country: REDACTED FOR PRIVACY +Tech Phone: REDACTED FOR PRIVACY +Tech Phone Ext: REDACTED FOR PRIVACY +Tech Fax: REDACTED FOR PRIVACY +Tech Fax Ext: REDACTED FOR PRIVACY +Tech Email: Please query the RDDS service of the Registrar of Record identified in this output for information on how to contact the Registrant, Admin, or Tech contact of the queried domain name. +Name Server: ns67.domaincontrol.com +Name Server: ns68.domaincontrol.com +DNSSEC: unsigned +URL of the ICANN Whois Inaccuracy Complaint Form: https://www.icann.org/wicf/ +>>> Last update of WHOIS database: 2021-12-06T16:26:41Z <<< + +For more information on Whois status codes, please visit https://icann.org/epp + +Terms of Use: Donuts Inc. provides this Whois service for information purposes, and to assist persons in obtaining information about or related to a domain name registration record. Donuts does not guarantee its accuracy. Users accessing the Donuts Whois service agree to use the data only for lawful purposes, and under no circumstances may this data be used 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 registrar's own existing customers and b) enable high volume, automated, electronic processes that send queries or data to the systems of Donuts or any ICANN-accredited registrar, except as reasonably necessary to register domain names or modify existing registrations. When using the Donuts Whois service, please consider the following: The Whois service is not a replacement for standard EPP commands to the SRS service. Whois is not considered authoritative for registered domain objects. The Whois service may be scheduled for downtime during production or OT&E maintenance periods. Queries to the Whois services are throttled. If too many queries are received from a single IP address within a specified time, the service will begin to reject further queries for a period of time to prevent disruption of Whois service access. Abuse of the Whois system through data mining is mitigated by detecting and limiting bulk query access from single sources. Where applicable, the presence of a [Non-Public Data] tag indicates that such data is not made publicly available due to applicable data privacy laws or requirements. Should you wish to contact the registrant, please refer to the Whois records available through the registrar URL listed above. Access to non-public data may be provided, upon request, where it can be reasonably confirmed that the requester holds a specific legitimate interest and a proper legal basis for accessing the withheld data +. Access to this data can be requested by submitting a request via the form found at https://donuts.domains/about/policies/whois-layered-access/ Donuts Inc. reserves the right to modify these terms at any time. By submitting this query, you agree to abide by this policy. diff --git a/spec/fixtures/responses/whois.nic.systems/systems/status_available.expected b/spec/fixtures/responses/whois.nic.systems/systems/status_available.expected new file mode 100644 index 00000000..9f23516a --- /dev/null +++ b/spec/fixtures/responses/whois.nic.systems/systems/status_available.expected @@ -0,0 +1,46 @@ +#domain + %s == nil + +#domain_id + %s == nil + + +#status + %s == :available + +#available? + %s == true + +#registered? + %s == false + + +#created_on + %s == nil + +#updated_on + %s == nil + +#expires_on + %s == nil + + +#registrar + %s == nil + +#registrant_contacts + %s %CLASS{array} + %s == [] + +#admin_contacts + %s %CLASS{array} + %s == [] + +#technical_contacts + %s %CLASS{array} + %s == [] + + +#nameservers + %s %CLASS{array} + %s == [] diff --git a/spec/fixtures/responses/whois.nic.systems/systems/status_available.txt b/spec/fixtures/responses/whois.nic.systems/systems/status_available.txt new file mode 100644 index 00000000..12727db3 --- /dev/null +++ b/spec/fixtures/responses/whois.nic.systems/systems/status_available.txt @@ -0,0 +1,3 @@ +Domain not found. + +Terms of Use: Donuts Inc. provides this Whois service for information purposes, and to assist persons in obtaining information about or related to a domain name registration record. Donuts does not guarantee its accuracy. Users accessing the Donuts Whois service agree to use the data only for lawful purposes, and under no circumstances may this data be used 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 registrar's own existing customers and b) enable high volume, automated, electronic processes that send queries or data to the systems of Donuts or any ICANN-accredited registrar, except as reasonably necessary to register domain names or modify existing registrations. When using the Donuts Whois service, please consider the following: The Whois service is not a replacement for standard EPP commands to the SRS service. Whois is not considered authoritative for registered domain objects. The Whois service may be scheduled for downtime during production or OT&E maintenance periods. Queries to the Whois services are throttled. If too many queries are received from a single IP address within a specified time, the service will begin to reject further queries for a period of time to prevent disruption of Whois service access. Abuse of the Whois system through data mining is mitigated by detecting and limiting bulk query access from single sources. Where applicable, the presence of a [Non-Public Data] tag indicates that such data is not made publicly available due to applicable data privacy laws or requirements. Should you wish to contact the registrant, please refer to the Whois records available through the registrar URL listed above. Access to non-public data may be provided, upon request, where it can be reasonably confirmed that the requester holds a specific legitimate interest and a proper legal basis for accessing the withheld data. Access to this data can be requested by submitting a request via the form found at https://donuts.domains/about/policies/whois-layered-access/ Donuts Inc. reserves the right to modify these terms at any time. By submitting this query, you agree to abide by this policy. diff --git a/spec/fixtures/responses/whois.nic.systems/systems/status_available_premium.expected b/spec/fixtures/responses/whois.nic.systems/systems/status_available_premium.expected new file mode 100644 index 00000000..9f23516a --- /dev/null +++ b/spec/fixtures/responses/whois.nic.systems/systems/status_available_premium.expected @@ -0,0 +1,46 @@ +#domain + %s == nil + +#domain_id + %s == nil + + +#status + %s == :available + +#available? + %s == true + +#registered? + %s == false + + +#created_on + %s == nil + +#updated_on + %s == nil + +#expires_on + %s == nil + + +#registrar + %s == nil + +#registrant_contacts + %s %CLASS{array} + %s == [] + +#admin_contacts + %s %CLASS{array} + %s == [] + +#technical_contacts + %s %CLASS{array} + %s == [] + + +#nameservers + %s %CLASS{array} + %s == [] diff --git a/spec/fixtures/responses/whois.nic.systems/systems/status_available_premium.txt b/spec/fixtures/responses/whois.nic.systems/systems/status_available_premium.txt new file mode 100644 index 00000000..875b4662 --- /dev/null +++ b/spec/fixtures/responses/whois.nic.systems/systems/status_available_premium.txt @@ -0,0 +1,5 @@ +Domain not found. +This premium domain is available for purchase. If you would like to make an offer, please contact platinums@donuts.email. +>>> Last update of WHOIS database: 2021-12-06T14:45:13Z <<< + +Terms of Use: Donuts Inc. provides this Whois service for information purposes, and to assist persons in obtaining information about or related to a domain name registration record. Donuts does not guarantee its accuracy. Users accessing the Donuts Whois service agree to use the data only for lawful purposes, and under no circumstances may this data be used 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 registrar's own existing customers and b) enable high volume, automated, electronic processes that send queries or data to the systems of Donuts or any ICANN-accredited registrar, except as reasonably necessary to register domain names or modify existing registrations. When using the Donuts Whois service, please consider the following: The Whois service is not a replacement for standard EPP commands to the SRS service. Whois is not considered authoritative for registered domain objects. The Whois service may be scheduled for downtime during production or OT&E maintenance periods. Queries to the Whois services are throttled. If too many queries are received from a single IP address within a specified time, the service will begin to reject further queries for a period of time to prevent disruption of Whois service access. Abuse of the Whois system through data mining is mitigated by detecting and limiting bulk query access from single sources. Where applicable, the presence of a [Non-Public Data] tag indicates that such data is not made publicly available due to applicable data privacy laws or requirements. Should you wish to contact the registrant, please refer to the Whois records available through the registrar URL listed above. Access to non-public data may be provided, upon request, where it can be reasonably confirmed that the requester holds a specific legitimate interest and a proper legal basis for accessing the withheld data. Access to this data can be requested by submitting a request via the form found at https://donuts.domains/about/policies/whois-layered-access/ Donuts Inc. reserves the right to modify these terms at any time. By submitting this query, you agree to abide by this policy. diff --git a/spec/fixtures/responses/whois.nic.systems/systems/status_registered.expected b/spec/fixtures/responses/whois.nic.systems/systems/status_registered.expected new file mode 100644 index 00000000..03023ff0 --- /dev/null +++ b/spec/fixtures/responses/whois.nic.systems/systems/status_registered.expected @@ -0,0 +1,99 @@ +#domain + %s == "donuts.systems" + +#domain_id + %s == "c73f4743486e4a1d8cb725fe0b0d26d7-DONUTS" + + +#status + %s == :registered + +#available? + %s == false + +#registered? + %s == true + + +#created_on + %s %CLASS{time} + %s %TIME{2014-02-28 17:19:53 GMT} + +#updated_on + %s %CLASS{time} + %s %TIME{2018-02-07 18:00:53 GMT} + +#expires_on + %s %CLASS{time} + %s %TIME{2024-02-28 17:19:53 GMT} + + +#registrar + %s %CLASS{registrar} + %s.id == "9998" + %s.name == "Donuts Internal (9998)" + %s.url == "http://www.donuts.co" + +#registrant_contacts + %s %CLASS{array} + %s %SIZE{1} + %s[0] %CLASS{contact} + %s[0].type == Whois::Parser::Contact::TYPE_REGISTRANT + %s[0].id == "REDACTED FOR PRIVACY" + %s[0].name == "REDACTED FOR PRIVACY" + %s[0].organization == "Donuts Inc." + %s[0].address == "REDACTED FOR PRIVACY" + %s[0].city == "REDACTED FOR PRIVACY" + %s[0].zip == "REDACTED FOR PRIVACY" + %s[0].state == "WA" + %s[0].country_code == "US" + %s[0].phone == "REDACTED FOR PRIVACY ext: REDACTED FOR PRIVACY" + %s[0].fax == "REDACTED FOR PRIVACY ext: REDACTED FOR PRIVACY" + %s[0].email == "Please query the RDDS service of the Registrar of Record identified in this output for information on how to contact the Registrant, Admin, or Tech contact of the queried domain name." + +#admin_contacts + %s %CLASS{array} + %s %SIZE{1} + %s[0] %CLASS{contact} + %s[0].type == Whois::Parser::Contact::TYPE_ADMINISTRATIVE + %s[0].id == "REDACTED FOR PRIVACY" + %s[0].name == "REDACTED FOR PRIVACY" + %s[0].organization == "REDACTED FOR PRIVACY" + %s[0].address == "REDACTED FOR PRIVACY" + %s[0].city == "REDACTED FOR PRIVACY" + %s[0].zip == "REDACTED FOR PRIVACY" + %s[0].state == "REDACTED FOR PRIVACY" + %s[0].country_code == "REDACTED FOR PRIVACY" + %s[0].phone == "REDACTED FOR PRIVACY ext: REDACTED FOR PRIVACY" + %s[0].fax == "REDACTED FOR PRIVACY ext: REDACTED FOR PRIVACY" + %s[0].email == "Please query the RDDS service of the Registrar of Record identified in this output for information on how to contact the Registrant, Admin, or Tech contact of the queried domain name." + +#technical_contacts + %s %CLASS{array} + %s %SIZE{1} + %s[0] %CLASS{contact} + %s[0].type == Whois::Parser::Contact::TYPE_TECHNICAL + %s[0].id == "REDACTED FOR PRIVACY" + %s[0].name == "REDACTED FOR PRIVACY" + %s[0].organization == "REDACTED FOR PRIVACY" + %s[0].address == "REDACTED FOR PRIVACY" + %s[0].city == "REDACTED FOR PRIVACY" + %s[0].zip == "REDACTED FOR PRIVACY" + %s[0].state == "REDACTED FOR PRIVACY" + %s[0].country_code == "REDACTED FOR PRIVACY" + %s[0].phone == "REDACTED FOR PRIVACY ext: REDACTED FOR PRIVACY" + %s[0].fax == "REDACTED FOR PRIVACY ext: REDACTED FOR PRIVACY" + %s[0].email == "Please query the RDDS service of the Registrar of Record identified in this output for information on how to contact the Registrant, Admin, or Tech contact of the queried domain name." + + +#nameservers + %s %CLASS{array} + %s %SIZE{4} + %s[0] %CLASS{nameserver} + %s[0].name == "ns-1501.awsdns-59.org" + %s[1] %CLASS{nameserver} + %s[1].name == "ns-380.awsdns-47.com" + %s[2] %CLASS{nameserver} + %s[2].name == "ns-811.awsdns-37.net" + %s[3] %CLASS{nameserver} + %s[3].name == "ns-1597.awsdns-07.co.uk" diff --git a/spec/fixtures/responses/whois.nic.systems/systems/status_registered.txt b/spec/fixtures/responses/whois.nic.systems/systems/status_registered.txt new file mode 100644 index 00000000..2df735a1 --- /dev/null +++ b/spec/fixtures/responses/whois.nic.systems/systems/status_registered.txt @@ -0,0 +1,62 @@ +Domain Name: donuts.systems +Registry Domain ID: c73f4743486e4a1d8cb725fe0b0d26d7-DONUTS +Registrar WHOIS Server: http://www.donuts.co +Registrar URL: http://www.donuts.co +Updated Date: 2018-02-07T18:00:53Z +Creation Date: 2014-02-28T17:19:53Z +Registry Expiry Date: 2024-02-28T17:19:53Z +Registrar: Donuts Internal (9998) +Registrar IANA ID: 9998 +Registrar Abuse Contact Email: +Registrar Abuse Contact Phone: +Domain Status: serverTransferProhibited https://icann.org/epp#serverTransferProhibited +Registry Registrant ID: REDACTED FOR PRIVACY +Registrant Name: REDACTED FOR PRIVACY +Registrant Organization: Donuts Inc. +Registrant Street: REDACTED FOR PRIVACY +Registrant City: REDACTED FOR PRIVACY +Registrant State/Province: WA +Registrant Postal Code: REDACTED FOR PRIVACY +Registrant Country: US +Registrant Phone: REDACTED FOR PRIVACY +Registrant Phone Ext: REDACTED FOR PRIVACY +Registrant Fax: REDACTED FOR PRIVACY +Registrant Fax Ext: REDACTED FOR PRIVACY +Registrant Email: Please query the RDDS service of the Registrar of Record identified in this output for information on how to contact the Registrant, Admin, or Tech contact of the queried domain name. +Registry Admin ID: REDACTED FOR PRIVACY +Admin Name: REDACTED FOR PRIVACY +Admin Organization: REDACTED FOR PRIVACY +Admin Street: REDACTED FOR PRIVACY +Admin City: REDACTED FOR PRIVACY +Admin State/Province: REDACTED FOR PRIVACY +Admin Postal Code: REDACTED FOR PRIVACY +Admin Country: REDACTED FOR PRIVACY +Admin Phone: REDACTED FOR PRIVACY +Admin Phone Ext: REDACTED FOR PRIVACY +Admin Fax: REDACTED FOR PRIVACY +Admin Fax Ext: REDACTED FOR PRIVACY +Admin Email: Please query the RDDS service of the Registrar of Record identified in this output for information on how to contact the Registrant, Admin, or Tech contact of the queried domain name. +Registry Tech ID: REDACTED FOR PRIVACY +Tech Name: REDACTED FOR PRIVACY +Tech Organization: REDACTED FOR PRIVACY +Tech Street: REDACTED FOR PRIVACY +Tech City: REDACTED FOR PRIVACY +Tech State/Province: REDACTED FOR PRIVACY +Tech Postal Code: REDACTED FOR PRIVACY +Tech Country: REDACTED FOR PRIVACY +Tech Phone: REDACTED FOR PRIVACY +Tech Phone Ext: REDACTED FOR PRIVACY +Tech Fax: REDACTED FOR PRIVACY +Tech Fax Ext: REDACTED FOR PRIVACY +Tech Email: Please query the RDDS service of the Registrar of Record identified in this output for information on how to contact the Registrant, Admin, or Tech contact of the queried domain name. +Name Server: ns-1501.awsdns-59.org +Name Server: ns-380.awsdns-47.com +Name Server: ns-811.awsdns-37.net +Name Server: ns-1597.awsdns-07.co.uk +DNSSEC: unsigned +URL of the ICANN Whois Inaccuracy Complaint Form: https://www.icann.org/wicf/ +>>> Last update of WHOIS database: 2021-12-06T14:44:44Z <<< + +For more information on Whois status codes, please visit https://icann.org/epp + +Terms of Use: Donuts Inc. provides this Whois service for information purposes, and to assist persons in obtaining information about or related to a domain name registration record. Donuts does not guarantee its accuracy. Users accessing the Donuts Whois service agree to use the data only for lawful purposes, and under no circumstances may this data be used 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 registrar's own existing customers and b) enable high volume, automated, electronic processes that send queries or data to the systems of Donuts or any ICANN-accredited registrar, except as reasonably necessary to register domain names or modify existing registrations. When using the Donuts Whois service, please consider the following: The Whois service is not a replacement for standard EPP commands to the SRS service. Whois is not considered authoritative for registered domain objects. The Whois service may be scheduled for downtime during production or OT&E maintenance periods. Queries to the Whois services are throttled. If too many queries are received from a single IP address within a specified time, the service will begin to reject further queries for a period of time to prevent disruption of Whois service access. Abuse of the Whois system through data mining is mitigated by detecting and limiting bulk query access from single sources. Where applicable, the presence of a [Non-Public Data] tag indicates that such data is not made publicly available due to applicable data privacy laws or requirements. Should you wish to contact the registrant, please refer to the Whois records available through the registrar URL listed above. Access to non-public data may be provided, upon request, where it can be reasonably confirmed that the requester holds a specific legitimate interest and a proper legal basis for accessing the withheld data. Access to this data can be requested by submitting a request via the form found at https://donuts.domains/about/policies/whois-layered-access/ Donuts Inc. reserves the right to modify these terms at any time. By submitting this query, you agree to abide by this policy. diff --git a/spec/fixtures/responses/whois.nic.systems/systems/status_reserved.expected b/spec/fixtures/responses/whois.nic.systems/systems/status_reserved.expected new file mode 100644 index 00000000..c446a92b --- /dev/null +++ b/spec/fixtures/responses/whois.nic.systems/systems/status_reserved.expected @@ -0,0 +1,46 @@ +#domain + %s == nil + +#domain_id + %s == nil + + +#status + %s == :reserved + +#available? + %s == false + +#registered? + %s == true + + +#created_on + %s == nil + +#updated_on + %s == nil + +#expires_on + %s == nil + + +#registrar + %s == nil + +#registrant_contacts + %s %CLASS{array} + %s == [] + +#admin_contacts + %s %CLASS{array} + %s == [] + +#technical_contacts + %s %CLASS{array} + %s == [] + + +#nameservers + %s %CLASS{array} + %s == [] diff --git a/spec/fixtures/responses/whois.nic.systems/systems/status_reserved.txt b/spec/fixtures/responses/whois.nic.systems/systems/status_reserved.txt new file mode 100644 index 00000000..18cacacb --- /dev/null +++ b/spec/fixtures/responses/whois.nic.systems/systems/status_reserved.txt @@ -0,0 +1,3 @@ +The registration of this domain is restricted, as it is protected by the Donuts DPML Brand Protection policy. Additional information can be found at https://donuts.domains/what-we-do/brand-protection. + +Terms of Use: Donuts Inc. provides this Whois service for information purposes, and to assist persons in obtaining information about or related to a domain name registration record. Donuts does not guarantee its accuracy. Users accessing the Donuts Whois service agree to use the data only for lawful purposes, and under no circumstances may this data be used 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 registrar's own existing customers and b) enable high volume, automated, electronic processes that send queries or data to the systems of Donuts or any ICANN-accredited registrar, except as reasonably necessary to register domain names or modify existing registrations. When using the Donuts Whois service, please consider the following: The Whois service is not a replacement for standard EPP commands to the SRS service. Whois is not considered authoritative for registered domain objects. The Whois service may be scheduled for downtime during production or OT&E maintenance periods. Queries to the Whois services are throttled. If too many queries are received from a single IP address within a specified time, the service will begin to reject further queries for a period of time to prevent disruption of Whois service access. Abuse of the Whois system through data mining is mitigated by detecting and limiting bulk query access from single sources. Where applicable, the presence of a [Non-Public Data] tag indicates that such data is not made publicly available due to applicable data privacy laws or requirements. Should you wish to contact the registrant, please refer to the Whois records available through the registrar URL listed above. Access to non-public data may be provided, upon request, where it can be reasonably confirmed that the requester holds a specific legitimate interest and a proper legal basis for accessing the withheld data. Access to this data can be requested by submitting a request via the form found at https://donuts.domains/about/policies/whois-layered-access/ Donuts Inc. reserves the right to modify these terms at any time. By submitting this query, you agree to abide by this policy. diff --git a/spec/fixtures/responses/whois.nic.travel/travel/property_status_multiple.expected b/spec/fixtures/responses/whois.nic.travel/travel/property_status_multiple.expected deleted file mode 100644 index acf90754..00000000 --- a/spec/fixtures/responses/whois.nic.travel/travel/property_status_multiple.expected +++ /dev/null @@ -1,2 +0,0 @@ -#status - %s == ["clientDeleteProhibited", "clientTransferProhibited"] diff --git a/spec/fixtures/responses/whois.nic.travel/travel/property_status_multiple.txt b/spec/fixtures/responses/whois.nic.travel/travel/property_status_multiple.txt deleted file mode 100644 index cdd5698e..00000000 --- a/spec/fixtures/responses/whois.nic.travel/travel/property_status_multiple.txt +++ /dev/null @@ -1,83 +0,0 @@ -Domain Name: WEBCAMS.TRAVEL -Domain ID: D108042-TRAVEL -Sponsoring Registrar: SECURA GMBH -Sponsoring Registrar IANA ID: 111 -Domain Status: clientDeleteProhibited -Domain Status: clientTransferProhibited -Registrant ID: P-IRO86-YIHZ -Registrant Name: Ingo Oppermann -Registrant Organization: OPAG Online Promotion AG -Registrant Address1: Austr.37 -Registrant City: Vaduz -Registrant Postal Code: 9490 -Registrant Country: Liechtenstein -Registrant Country Code: LI -Registrant Phone Number: +41.442777501 -Registrant Facsimile Number: +41.763770216 -Registrant Email: ingo.oppermann@topin.travel -Administrative Contact ID: P-IRO86-YIHZ -Administrative Contact Name: Ingo Oppermann -Administrative Contact Organization: OPAG Online Promotion AG -Administrative Contact Address1: Austr.37 -Administrative Contact City: Vaduz -Administrative Contact Postal Code: 9490 -Administrative Contact Country: Liechtenstein -Administrative Contact Country Code: LI -Administrative Contact Phone Number: +41.442777501 -Administrative Contact Facsimile Number: +41.763770216 -Administrative Contact Email: ingo.oppermann@topin.travel -Billing Contact ID: P-HVO132-PVII -Billing Contact Name: Hans-Peter Oswald -Billing Contact Organization: Secura GmbH -Billing Contact Address1: Frohnhofweg 18 -Billing Contact City: Koeln -Billing Contact State/Province: NRW -Billing Contact Postal Code: 50858 -Billing Contact Country: Germany -Billing Contact Country Code: DE -Billing Contact Phone Number: +49.2212571213 -Billing Contact Facsimile Number: +49.221925227 -Billing Contact Email: secura@domainregistry.de -Technical Contact ID: P-HVO132-PVII -Technical Contact Name: Hans-Peter Oswald -Technical Contact Organization: Secura GmbH -Technical Contact Address1: Frohnhofweg 18 -Technical Contact City: Koeln -Technical Contact State/Province: NRW -Technical Contact Postal Code: 50858 -Technical Contact Country: Germany -Technical Contact Country Code: DE -Technical Contact Phone Number: +49.2212571213 -Technical Contact Facsimile Number: +49.221925227 -Technical Contact Email: secura@domainregistry.de -Name Server: FINKPLOYD.NRG4U.COM -Name Server: C00L3R.NETWORX.CH -Created by Registrar: SECURA GMBH -Last Updated by Registrar: SECURA GMBH -Domain Registration Date: Tue Aug 01 12:39:21 GMT 2006 -Domain Expiration Date: Tue Jul 31 23:59:59 GMT 2012 -Domain Last Updated Date: Mon Aug 30 12:52:13 GMT 2010 - ->>>> Whois database was last updated on: Tue Aug 23 16:43:08 GMT 2011 <<<< - -Tralliance, Inc., the Registry Operator for .travel, has collected this information -for the WHOIS database through an ICANN-Accredited Registrar. This information -is provided to you for informational purposes only and is designed to assist -persons in determining contents of a domain name registration record in the -Tralliance registry database. Tralliance makes this information available to you -"as is" and does not guarantee its accuracy. By submitting a WHOIS query, you -agree that you will use this data only for lawful purposes and that, under no -circumstances will you use this data: (1) to allow, enable, or otherwise -support the transmission of mass unsolicited, commercial advertising or -solicitations via direct mail, electronic mail, or by telephone; (2) in -contravention of any applicable data and privacy protection acts; or (3) to -enable high volume, automated, electronic processes that apply to the registry -(or its systems). Compilation, repackaging, dissemination, or other use of the -WHOIS database in its entirety, or of a substantial portion thereof, is not -allowed without Tralliance's prior written permission. Tralliance reserves the -right to modify or change these conditions at any time without prior or -subsequent notification of any kind. By executing this query, in any manner -whatsoever, you agree to abide by these terms. - -NOTE: FAILURE TO LOCATE A RECORD IN THE WHOIS DATABASE IS NOT INDICATIVE -OF THE AVAILABILITY OF A DOMAIN NAME. diff --git a/spec/fixtures/responses/whois.nic.travel/travel/property_status_single.expected b/spec/fixtures/responses/whois.nic.travel/travel/property_status_single.expected deleted file mode 100644 index ff6bdbc8..00000000 --- a/spec/fixtures/responses/whois.nic.travel/travel/property_status_single.expected +++ /dev/null @@ -1,2 +0,0 @@ -#status - %s == ["ok"] diff --git a/spec/fixtures/responses/whois.nic.travel/travel/property_status_single.txt b/spec/fixtures/responses/whois.nic.travel/travel/property_status_single.txt deleted file mode 100644 index c1874f58..00000000 --- a/spec/fixtures/responses/whois.nic.travel/travel/property_status_single.txt +++ /dev/null @@ -1,75 +0,0 @@ -Domain Name: TRAVEL.TRAVEL -Domain ID: D24096-TRAVEL -Sponsoring Registrar: NEUSTAR GATEWAY -Domain Status: ok -Registrant ID: TRALLIANCE -Registrant Name: Tralliance Corporation -Registrant Address1: 110 East Broward Blvd, 14th floor -Registrant City: Fort Lauderdale -Registrant State/Province: FL -Registrant Postal Code: 33301 -Registrant Country: United States -Registrant Country Code: US -Registrant Phone Number: +1.9547695999 -Registrant Email: info@tralliance.travel -Administrative Contact ID: TRALLIANCE -Administrative Contact Name: Tralliance Corporation -Administrative Contact Address1: 110 East Broward Blvd, 14th floor -Administrative Contact City: Fort Lauderdale -Administrative Contact State/Province: FL -Administrative Contact Postal Code: 33301 -Administrative Contact Country: United States -Administrative Contact Country Code: US -Administrative Contact Phone Number: +1.9547695999 -Administrative Contact Email: info@tralliance.travel -Billing Contact ID: TRALLIANCE -Billing Contact Name: Tralliance Corporation -Billing Contact Address1: 110 East Broward Blvd, 14th floor -Billing Contact City: Fort Lauderdale -Billing Contact State/Province: FL -Billing Contact Postal Code: 33301 -Billing Contact Country: United States -Billing Contact Country Code: US -Billing Contact Phone Number: +1.9547695999 -Billing Contact Email: info@tralliance.travel -Technical Contact ID: TRALLIANCE -Technical Contact Name: Tralliance Corporation -Technical Contact Address1: 110 East Broward Blvd, 14th floor -Technical Contact City: Fort Lauderdale -Technical Contact State/Province: FL -Technical Contact Postal Code: 33301 -Technical Contact Country: United States -Technical Contact Country Code: US -Technical Contact Phone Number: +1.9547695999 -Technical Contact Email: info@tralliance.travel -Name Server: NETSYS.COM -Name Server: NS01-MIA.THEGLOBE.COM -Created by Registrar: NEUSTAR GATEWAY -Last Updated by Registrar: NMUTONYI -Domain Registration Date: Tue Oct 04 21:44:27 GMT 2005 -Domain Expiration Date: Sun Oct 03 23:59:59 GMT 2010 -Domain Last Updated Date: Sun Jul 23 16:08:37 GMT 2006 - ->>>> Whois database was last updated on: Fri Dec 25 21:30:26 GMT 2009 <<<< - -Tralliance, Inc., the Registry Operator for .travel, has collected this information -for the WHOIS database through an ICANN-Accredited Registrar. This information -is provided to you for informational purposes only and is designed to assist -persons in determining contents of a domain name registration record in the -Tralliance registry database. Tralliance makes this information available to you -"as is" and does not guarantee its accuracy. By submitting a WHOIS query, you -agree that you will use this data only for lawful purposes and that, under no -circumstances will you use this data: (1) to allow, enable, or otherwise -support the transmission of mass unsolicited, commercial advertising or -solicitations via direct mail, electronic mail, or by telephone; (2) in -contravention of any applicable data and privacy protection acts; or (3) to -enable high volume, automated, electronic processes that apply to the registry -(or its systems). Compilation, repackaging, dissemination, or other use of the -WHOIS database in its entirety, or of a substantial portion thereof, is not -allowed without Tralliance's prior written permission. Tralliance reserves the -right to modify or change these conditions at any time without prior or -subsequent notification of any kind. By executing this query, in any manner -whatsoever, you agree to abide by these terms. - -NOTE: FAILURE TO LOCATE A RECORD IN THE WHOIS DATABASE IS NOT INDICATIVE -OF THE AVAILABILITY OF A DOMAIN NAME. diff --git a/spec/fixtures/responses/whois.nic.travel/travel/status_available.expected b/spec/fixtures/responses/whois.nic.travel/travel/status_available.expected index 9e655088..6bbcc28c 100644 --- a/spec/fixtures/responses/whois.nic.travel/travel/status_available.expected +++ b/spec/fixtures/responses/whois.nic.travel/travel/status_available.expected @@ -1,12 +1,12 @@ #domain - %s == "u34jedzcq.travel" + %s == nil #domain_id %s == nil #status - %s == nil + %s == :available #available? %s == true diff --git a/spec/fixtures/responses/whois.nic.travel/travel/status_available.txt b/spec/fixtures/responses/whois.nic.travel/travel/status_available.txt index eaf12066..b04ddd66 100644 --- a/spec/fixtures/responses/whois.nic.travel/travel/status_available.txt +++ b/spec/fixtures/responses/whois.nic.travel/travel/status_available.txt @@ -1,25 +1,4 @@ -Not found: u34jedzcq.travel +Domain not found. ->>>> Whois database was last updated on: Wed Jan 22 22:06:14 GMT 2014 <<<< - -Tralliance, Inc., the Registry Operator for .travel, has collected this information -for the WHOIS database through an ICANN-Accredited Registrar. This information -is provided to you for informational purposes only and is designed to assist -persons in determining contents of a domain name registration record in the -Tralliance registry database. Tralliance makes this information available to you -"as is" and does not guarantee its accuracy. By submitting a WHOIS query, you -agree that you will use this data only for lawful purposes and that, under no -circumstances will you use this data: (1) to allow, enable, or otherwise -support the transmission of mass unsolicited, commercial advertising or -solicitations via direct mail, electronic mail, or by telephone; (2) in -contravention of any applicable data and privacy protection acts; or (3) to -enable high volume, automated, electronic processes that apply to the registry -(or its systems). Compilation, repackaging, dissemination, or other use of the -WHOIS database in its entirety, or of a substantial portion thereof, is not -allowed without Tralliance's prior written permission. Tralliance reserves the -right to modify or change these conditions at any time without prior or -subsequent notification of any kind. By executing this query, in any manner -whatsoever, you agree to abide by these terms. - -NOTE: FAILURE TO LOCATE A RECORD IN THE WHOIS DATABASE IS NOT INDICATIVE -OF THE AVAILABILITY OF A DOMAIN NAME. +Terms of Use: Donuts Inc. provides this Whois service for information purposes, and to assist persons in obtaining information about or related to a domain name registration record. Donuts does not guarantee its accuracy. Users accessing the Donuts Whois service agree to use the data only for lawful purposes, and under no circumstances may this data be used 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 registrar's own existing customers and b) enable high volume, automated, electronic processes that send queries or data to the systems of Donuts or any ICANN-accredited registrar, except as reasonably necessary to register domain names or modify existing registrations. When using the Donuts Whois service, please consider the following: The Whois service is not a replacement for standard EPP commands to the SRS service. Whois is not considered authoritative for registered domain objects. The Whois service may be scheduled for downtime during production or OT&E maintenance periods. Queries to the Whois services are throttled. If too many queries are received from a single IP address within a specified time, the service will begin to reject further queries for a period of time to prevent disruption of Whois service access. Abuse of the Whois system through data mining is mitigated by detecting and limiting bulk query access from single sources. Where applicable, the presence of a [Non-Public Data] tag indicates that such data is not made publicly available due to applicable data privacy laws or requirements. Should you wish to contact the registrant, please refer to the Whois records available through the registrar URL listed above. Access to non-public data may be provided, upon request, where it can be reasonably confirmed that the requester holds a specific legitimate interest and a proper legal basis for accessing the withheld data +. Access to this data can be requested by submitting a request via the form found at https://donuts.domains/about/policies/whois-layered-access/ Donuts Inc. reserves the right to modify these terms at any time. By submitting this query, you agree to abide by this policy. diff --git a/spec/fixtures/responses/whois.nic.travel/travel/status_registered.expected b/spec/fixtures/responses/whois.nic.travel/travel/status_registered.expected index 11a8815f..b78ea076 100644 --- a/spec/fixtures/responses/whois.nic.travel/travel/status_registered.expected +++ b/spec/fixtures/responses/whois.nic.travel/travel/status_registered.expected @@ -2,11 +2,11 @@ %s == "travel.travel" #domain_id - %s == "D24096-TRAVEL" + %s == "ff0390f7114c4ad99ac46ae56c00300f-DONUTS" #status - %s == ["ok"] + %s == :registered #available? %s == false @@ -21,78 +21,79 @@ #updated_on %s %CLASS{time} - %s %TIME{2013-09-18 15:13:32 GMT} + %s %TIME{2018-05-25 19:29:32 GMT} #expires_on %s %CLASS{time} - %s %TIME{2021-10-03 23:59:59 GMT} + %s %TIME{2022-10-03 23:59:59 GMT} #registrar %s %CLASS{registrar} - %s.id == nil - %s.name == "NEUSTAR GATEWAY" - + %s.id == "9998" + %s.name == "Donuts Internal (9998)" + %s.url == "http://www.donuts.co" #registrant_contacts %s %CLASS{array} %s %SIZE{1} %s[0] %CLASS{contact} %s[0].type == Whois::Parser::Contact::TYPE_REGISTRANT - %s[0].id == "TRALLIANCE" - %s[0].name == "Tralliance Corporation" - %s[0].organization == nil - %s[0].address == "110 East Broward Blvd, 14th floor" - %s[0].city == "Fort Lauderdale" - %s[0].zip == "33301" - %s[0].state == "FL" - %s[0].country == "United States" - %s[0].country_code == "US" - %s[0].phone == "+1.9547695999" - %s[0].fax == nil - %s[0].email == "info@tralliance.travel" + %s[0].id == "REDACTED FOR PRIVACY" + %s[0].name == "REDACTED FOR PRIVACY" + %s[0].organization == "Donuts Inc." + %s[0].address == "REDACTED FOR PRIVACY" + %s[0].city == "REDACTED FOR PRIVACY" + %s[0].zip == "REDACTED FOR PRIVACY" + %s[0].state == "WA" + %s[0].country_code == "us" + %s[0].phone == "REDACTED FOR PRIVACY ext: REDACTED FOR PRIVACY" + %s[0].fax == "REDACTED FOR PRIVACY ext: REDACTED FOR PRIVACY" + %s[0].email == "Please query the RDDS service of the Registrar of Record identified in this output for information on how to contact the Registrant, Admin, or Tech contact of the queried domain name." #admin_contacts %s %CLASS{array} %s %SIZE{1} %s[0] %CLASS{contact} %s[0].type == Whois::Parser::Contact::TYPE_ADMINISTRATIVE - %s[0].id == "TRALLIANCE" - %s[0].name == "Tralliance Corporation" - %s[0].organization == nil - %s[0].address == "110 East Broward Blvd, 14th floor" - %s[0].city == "Fort Lauderdale" - %s[0].zip == "33301" - %s[0].state == "FL" - %s[0].country == "United States" - %s[0].country_code == "US" - %s[0].phone == "+1.9547695999" - %s[0].fax == nil - %s[0].email == "info@tralliance.travel" + %s[0].id == "REDACTED FOR PRIVACY" + %s[0].name == "REDACTED FOR PRIVACY" + %s[0].organization == "REDACTED FOR PRIVACY" + %s[0].address == "REDACTED FOR PRIVACY" + %s[0].city == "REDACTED FOR PRIVACY" + %s[0].zip == "REDACTED FOR PRIVACY" + %s[0].state == "REDACTED FOR PRIVACY" + %s[0].country_code == "REDACTED FOR PRIVACY" + %s[0].phone == "REDACTED FOR PRIVACY ext: REDACTED FOR PRIVACY" + %s[0].fax == "REDACTED FOR PRIVACY ext: REDACTED FOR PRIVACY" + %s[0].email == "Please query the RDDS service of the Registrar of Record identified in this output for information on how to contact the Registrant, Admin, or Tech contact of the queried domain name." #technical_contacts %s %CLASS{array} %s %SIZE{1} %s[0] %CLASS{contact} %s[0].type == Whois::Parser::Contact::TYPE_TECHNICAL - %s[0].id == "TRALLIANCE" - %s[0].name == "Tralliance Corporation" - %s[0].organization == nil - %s[0].address == "110 East Broward Blvd, 14th floor" - %s[0].city == "Fort Lauderdale" - %s[0].zip == "33301" - %s[0].state == "FL" - %s[0].country == "United States" - %s[0].country_code == "US" - %s[0].phone == "+1.9547695999" - %s[0].fax == nil - %s[0].email == "info@tralliance.travel" + %s[0].id == "REDACTED FOR PRIVACY" + %s[0].name == "REDACTED FOR PRIVACY" + %s[0].organization == "REDACTED FOR PRIVACY" + %s[0].address == "REDACTED FOR PRIVACY" + %s[0].city == "REDACTED FOR PRIVACY" + %s[0].zip == "REDACTED FOR PRIVACY" + %s[0].state == "REDACTED FOR PRIVACY" + %s[0].country_code == "REDACTED FOR PRIVACY" + %s[0].phone == "REDACTED FOR PRIVACY ext: REDACTED FOR PRIVACY" + %s[0].fax == "REDACTED FOR PRIVACY ext: REDACTED FOR PRIVACY" + %s[0].email == "Please query the RDDS service of the Registrar of Record identified in this output for information on how to contact the Registrant, Admin, or Tech contact of the queried domain name." #nameservers %s %CLASS{array} - %s %SIZE{2} + %s %SIZE{4} %s[0] %CLASS{nameserver} - %s[0].name == "ns01-mia.theglobe.com" + %s[0].name == "ns-1812.awsdns-34.co.uk" %s[1] %CLASS{nameserver} - %s[1].name == "netsys.com" + %s[1].name == "ns-458.awsdns-57.com" + %s[2] %CLASS{nameserver} + %s[2].name == "ns-935.awsdns-52.net" + %s[3] %CLASS{nameserver} + %s[3].name == "ns-1480.awsdns-57.org" diff --git a/spec/fixtures/responses/whois.nic.travel/travel/status_registered.txt b/spec/fixtures/responses/whois.nic.travel/travel/status_registered.txt index d94bb85d..8afebd69 100644 --- a/spec/fixtures/responses/whois.nic.travel/travel/status_registered.txt +++ b/spec/fixtures/responses/whois.nic.travel/travel/status_registered.txt @@ -1,76 +1,63 @@ -Domain Name: TRAVEL.TRAVEL -Domain ID: D24096-TRAVEL -Sponsoring Registrar: NEUSTAR GATEWAY -Registrar URL (registration services): whois.neustar.us -Domain Status: ok -Registrant ID: TRALLIANCE -Registrant Name: Tralliance Corporation -Registrant Address1: 110 East Broward Blvd, 14th floor -Registrant City: Fort Lauderdale -Registrant State/Province: FL -Registrant Postal Code: 33301 -Registrant Country: United States -Registrant Country Code: US -Registrant Phone Number: +1.9547695999 -Registrant Email: info@tralliance.travel -Administrative Contact ID: TRALLIANCE -Administrative Contact Name: Tralliance Corporation -Administrative Contact Address1: 110 East Broward Blvd, 14th floor -Administrative Contact City: Fort Lauderdale -Administrative Contact State/Province: FL -Administrative Contact Postal Code: 33301 -Administrative Contact Country: United States -Administrative Contact Country Code: US -Administrative Contact Phone Number: +1.9547695999 -Administrative Contact Email: info@tralliance.travel -Billing Contact ID: TRALLIANCE -Billing Contact Name: Tralliance Corporation -Billing Contact Address1: 110 East Broward Blvd, 14th floor -Billing Contact City: Fort Lauderdale -Billing Contact State/Province: FL -Billing Contact Postal Code: 33301 -Billing Contact Country: United States -Billing Contact Country Code: US -Billing Contact Phone Number: +1.9547695999 -Billing Contact Email: info@tralliance.travel -Technical Contact ID: TRALLIANCE -Technical Contact Name: Tralliance Corporation -Technical Contact Address1: 110 East Broward Blvd, 14th floor -Technical Contact City: Fort Lauderdale -Technical Contact State/Province: FL -Technical Contact Postal Code: 33301 -Technical Contact Country: United States -Technical Contact Country Code: US -Technical Contact Phone Number: +1.9547695999 -Technical Contact Email: info@tralliance.travel -Name Server: NS01-MIA.THEGLOBE.COM -Name Server: NETSYS.COM -Created by Registrar: NEUSTAR GATEWAY -Last Updated by Registrar: AHANACEK -Domain Registration Date: Tue Oct 04 21:44:27 GMT 2005 -Domain Expiration Date: Sun Oct 03 23:59:59 GMT 2021 -Domain Last Updated Date: Wed Sep 18 15:13:32 GMT 2013 +Domain Name: travel.travel +Registry Domain ID: ff0390f7114c4ad99ac46ae56c00300f-DONUTS +Registrar WHOIS Server: http://www.donuts.co +Registrar URL: http://www.donuts.co +Updated Date: 2018-05-25T19:29:32Z +Creation Date: 2005-10-04T21:44:27Z +Registry Expiry Date: 2022-10-03T23:59:59Z +Registrar: Donuts Internal (9998) +Registrar IANA ID: 9998 +Registrar Abuse Contact Email: +Registrar Abuse Contact Phone: +Domain Status: ok https://icann.org/epp#ok +Registry Registrant ID: REDACTED FOR PRIVACY +Registrant Name: REDACTED FOR PRIVACY +Registrant Organization: Donuts Inc. +Registrant Street: REDACTED FOR PRIVACY +Registrant City: REDACTED FOR PRIVACY +Registrant State/Province: WA +Registrant Postal Code: REDACTED FOR PRIVACY +Registrant Country: us +Registrant Phone: REDACTED FOR PRIVACY +Registrant Phone Ext: REDACTED FOR PRIVACY +Registrant Fax: REDACTED FOR PRIVACY +Registrant Fax Ext: REDACTED FOR PRIVACY +Registrant Email: Please query the RDDS service of the Registrar of Record identified in this output for information on how to contact the Registrant, Admin, or Tech contact of the queried domain name. +Registry Admin ID: REDACTED FOR PRIVACY +Admin Name: REDACTED FOR PRIVACY +Admin Organization: REDACTED FOR PRIVACY +Admin Street: REDACTED FOR PRIVACY +Admin City: REDACTED FOR PRIVACY +Admin State/Province: REDACTED FOR PRIVACY +Admin Postal Code: REDACTED FOR PRIVACY +Admin Country: REDACTED FOR PRIVACY +Admin Phone: REDACTED FOR PRIVACY +Admin Phone Ext: REDACTED FOR PRIVACY +Admin Fax: REDACTED FOR PRIVACY +Admin Fax Ext: REDACTED FOR PRIVACY +Admin Email: Please query the RDDS service of the Registrar of Record identified in this output for information on how to contact the Registrant, Admin, or Tech contact of the queried domain name. +Registry Tech ID: REDACTED FOR PRIVACY +Tech Name: REDACTED FOR PRIVACY +Tech Organization: REDACTED FOR PRIVACY +Tech Street: REDACTED FOR PRIVACY +Tech City: REDACTED FOR PRIVACY +Tech State/Province: REDACTED FOR PRIVACY +Tech Postal Code: REDACTED FOR PRIVACY +Tech Country: REDACTED FOR PRIVACY +Tech Phone: REDACTED FOR PRIVACY +Tech Phone Ext: REDACTED FOR PRIVACY +Tech Fax: REDACTED FOR PRIVACY +Tech Fax Ext: REDACTED FOR PRIVACY +Tech Email: Please query the RDDS service of the Registrar of Record identified in this output for information on how to contact the Registrant, Admin, or Tech contact of the queried domain name. +Name Server: ns-1812.awsdns-34.co.uk +Name Server: ns-458.awsdns-57.com +Name Server: ns-935.awsdns-52.net +Name Server: ns-1480.awsdns-57.org +DNSSEC: unsigned +URL of the ICANN Whois Inaccuracy Complaint Form: https://www.icann.org/wicf/ +>>> Last update of WHOIS database: 2021-12-06T22:42:44Z <<< ->>>> Whois database was last updated on: Tue Feb 18 20:31:29 GMT 2014 <<<< +For more information on Whois status codes, please visit https://icann.org/epp -Tralliance, Inc., the Registry Operator for .travel, has collected this information -for the WHOIS database through an ICANN-Accredited Registrar. This information -is provided to you for informational purposes only and is designed to assist -persons in determining contents of a domain name registration record in the -Tralliance registry database. Tralliance makes this information available to you -"as is" and does not guarantee its accuracy. By submitting a WHOIS query, you -agree that you will use this data only for lawful purposes and that, under no -circumstances will you use this data: (1) to allow, enable, or otherwise -support the transmission of mass unsolicited, commercial advertising or -solicitations via direct mail, electronic mail, or by telephone; (2) in -contravention of any applicable data and privacy protection acts; or (3) to -enable high volume, automated, electronic processes that apply to the registry -(or its systems). Compilation, repackaging, dissemination, or other use of the -WHOIS database in its entirety, or of a substantial portion thereof, is not -allowed without Tralliance's prior written permission. Tralliance reserves the -right to modify or change these conditions at any time without prior or -subsequent notification of any kind. By executing this query, in any manner -whatsoever, you agree to abide by these terms. - -NOTE: FAILURE TO LOCATE A RECORD IN THE WHOIS DATABASE IS NOT INDICATIVE -OF THE AVAILABILITY OF A DOMAIN NAME. +Terms of Use: Donuts Inc. provides this Whois service for information purposes, and to assist persons in obtaining information about or related to a domain name registration record. Donuts does not guarantee its accuracy. Users accessing the Donuts Whois service agree to use the data only for lawful purposes, and under no circumstances may this data be used 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 registrar's own existing customers and b) enable high volume, automated, electronic processes that send queries or data to the systems of Donuts or any ICANN-accredited registrar, except as reasonably necessary to register domain names or modify existing registrations. When using the Donuts Whois service, please consider the following: The Whois service is not a replacement for standard EPP commands to the SRS service. Whois is not considered authoritative for registered domain objects. The Whois service may be scheduled for downtime during production or OT&E maintenance periods. Queries to the Whois services are throttled. If too many queries are received from a single IP address within a specified time, the service will begin to reject further queries for a period of time to prevent disruption of Whois service access. Abuse of the Whois system through data mining is mitigated by detecting and limiting bulk query access from single sources. Where applicable, the presence of a [Non-Public Data] tag indicates that such data is not made publicly available due to applicable data privacy laws or requirements. Should you wish to contact the registrant, please refer to the Whois records available through the registrar URL listed above. Access to non-public data may be provided, upon request, where it can be reasonably confirmed that the requester holds a specific legitimate interest and a proper legal basis for accessing the withheld data +. Access to this data can be requested by submitting a request via the form found at https://donuts.domains/about/policies/whois-layered-access/ Donuts Inc. reserves the right to modify these terms at any time. By submitting this query, you agree to abide by this policy. diff --git a/spec/tlds.yml b/spec/tlds.yml index e0187f1d..0fccf0be 100644 --- a/spec/tlds.yml +++ b/spec/tlds.yml @@ -1246,7 +1246,7 @@ zw: # status_registered: nic.wed bike: - _server: whois.donuts.co + _server: whois.nic.bike _subdir: bike status_available: u34jedzcq.bike status_registered: whereismy.bike @@ -1431,3 +1431,10 @@ xn--q9jyb4c: _subdir: xn--q9jyb4c status_available: u34jedzcq.xn--q9jyb4c status_registered: google.xn--q9jyb4c + +systems: + _server: whois.nic.systems + status_available: u34jedzcq.systems + status_available_premium: tld.systems + status_registered: donuts.systems + status_reserved: google.systems diff --git a/spec/whois/parser_spec.rb b/spec/whois/parser_spec.rb index 1ae0fa8c..f8dfded1 100644 --- a/spec/whois/parser_spec.rb +++ b/spec/whois/parser_spec.rb @@ -8,19 +8,20 @@ describe ".parser_for" do - it "returns the blank parser if the parser doesn't exist" do - expect(described_class.parser_for(Whois::Record::Part.new(host: "whois.missing.test")).class.name).to eq("Whois::Parsers::Blank") - expect(described_class.parser_for(Whois::Record::Part.new(host: "216.157.192.3")).class.name).to eq("Whois::Parsers::Blank") + it "simply instanciate the parser class returned by .parser_klass" do + expect(described_class.parser_for(Whois::Record::Part.new(host: "whois.missing.test"))).to be_a(Whois::Parsers::Blank) + expect(described_class.parser_for(Whois::Record::Part.new(host: "216.157.192.3"))).to be_a(Whois::Parsers::Blank) + expect(described_class.parser_for(Whois::Record::Part.new(host: "whois.nic.it"))).to be_a(Whois::Parsers::WhoisNicIt) end end describe ".parser_klass" do it "returns the parser hostname converted into a class" do - expect(described_class.parser_klass("whois.verisign-grs.com").name).to eq("Whois::Parsers::WhoisVerisignGrsCom") + expect(described_class.parser_klass(Whois::Record::Part.new(host: "whois.verisign-grs.com")).name).to eq("Whois::Parsers::WhoisVerisignGrsCom") end it "recognizes and lazy-loads classes" do - expect(described_class.parser_klass("whois.nic.it").name).to eq("Whois::Parsers::WhoisNicIt") + expect(described_class.parser_klass(Whois::Record::Part.new(host: "whois.nic.it"))).to eq(Whois::Parsers::WhoisNicIt) end it "recognizes preloaded classes" do @@ -28,11 +29,15 @@ class PreloadedParserTest end RUBY - expect(described_class.parser_klass("preloaded.parser.test").name).to eq("Whois::Parsers::PreloadedParserTest") + expect(described_class.parser_klass(Whois::Record::Part.new(host: "preloaded.parser.test"))).to eq(Whois::Parsers::PreloadedParserTest) + end + + it "returns the DonutsInc parser if the parser doesn't exist and the body contains Donuts disclaimer" do + expect(described_class.parser_klass(Whois::Record::Part.new(host: "whois.nic.domains", body: "Terms of Use: Donuts Inc."))).to eq(Whois::Parsers::DonutsInc) end - it "raises LoadError if the parser doesn't exist" do - expect { described_class.parser_klass("whois.missing.test") }.to raise_error(LoadError) + it "returns the blank parser if the parser doesn't exist" do + expect(described_class.parser_klass(Whois::Record::Part.new(host: "whois.missing.test"))).to eq(Whois::Parsers::Blank) end end diff --git a/spec/whois/parsers/responses/capetown-whois.registry.net.za/capetown/status_available_spec.rb b/spec/whois/parsers/responses/capetown-whois.registry.net.za/capetown/status_available_spec.rb index fc94ef3e..1d1be10f 100644 --- a/spec/whois/parsers/responses/capetown-whois.registry.net.za/capetown/status_available_spec.rb +++ b/spec/whois/parsers/responses/capetown-whois.registry.net.za/capetown/status_available_spec.rb @@ -11,83 +11,32 @@ # require 'spec_helper' -require 'whois/parsers/capetown-whois.registry.net.za.rb' -describe Whois::Parsers::CapetownWhoisRegistryNetZa, "status_available.expected" do +describe "capetown-whois.registry.net.za", :aggregate_failures do subject do file = fixture("responses", "capetown-whois.registry.net.za/capetown/status_available.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "capetown-whois.registry.net.za") + Whois::Parser.parser_for(part) end - describe "#domain" do - it do - expect(subject.domain).to eq(nil) - end - end - describe "#domain_id" do - it do - expect(subject.domain_id).to eq(nil) - end - end - describe "#status" do - it do - expect(subject.status).to eq(:available) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(true) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(false) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to eq(nil) - end - end - describe "#updated_on" do - it do - expect(subject.updated_on).to eq(nil) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to eq(nil) - end - end - describe "#registrar" do - it do - expect(subject.registrar).to eq(nil) - end - end - describe "#registrant_contacts" do - it do - expect(subject.registrant_contacts).to be_a(Array) - expect(subject.registrant_contacts).to eq([]) - end - end - describe "#admin_contacts" do - it do - expect(subject.admin_contacts).to be_a(Array) - expect(subject.admin_contacts).to eq([]) - end - end - describe "#technical_contacts" do - it do - expect(subject.technical_contacts).to be_a(Array) - expect(subject.technical_contacts).to eq([]) - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers).to eq([]) - end + it "matches status_available.expected" do + expect(subject.domain).to eq(nil) + expect(subject.domain_id).to eq(nil) + expect(subject.status).to eq(:available) + expect(subject.available?).to eq(true) + expect(subject.registered?).to eq(false) + expect(subject.created_on).to eq(nil) + expect(subject.updated_on).to eq(nil) + expect(subject.expires_on).to eq(nil) + expect(subject.registrar).to eq(nil) + expect(subject.registrant_contacts).to be_a(Array) + expect(subject.registrant_contacts).to eq([]) + expect(subject.admin_contacts).to be_a(Array) + expect(subject.admin_contacts).to eq([]) + expect(subject.technical_contacts).to be_a(Array) + expect(subject.technical_contacts).to eq([]) + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers).to eq([]) end end diff --git a/spec/whois/parsers/responses/capetown-whois.registry.net.za/capetown/status_registered_spec.rb b/spec/whois/parsers/responses/capetown-whois.registry.net.za/capetown/status_registered_spec.rb index 96294351..0137adc0 100644 --- a/spec/whois/parsers/responses/capetown-whois.registry.net.za/capetown/status_registered_spec.rb +++ b/spec/whois/parsers/responses/capetown-whois.registry.net.za/capetown/status_registered_spec.rb @@ -11,142 +11,91 @@ # require 'spec_helper' -require 'whois/parsers/capetown-whois.registry.net.za.rb' -describe Whois::Parsers::CapetownWhoisRegistryNetZa, "status_registered.expected" do +describe "capetown-whois.registry.net.za", :aggregate_failures do subject do file = fixture("responses", "capetown-whois.registry.net.za/capetown/status_registered.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "capetown-whois.registry.net.za") + Whois::Parser.parser_for(part) end - describe "#domain" do - it do - expect(subject.domain).to eq("registry.capetown") - end - end - describe "#domain_id" do - it do - expect(subject.domain_id).to eq("dom_3K3-9999") - end - end - describe "#status" do - it do - expect(subject.status).to eq(:registered) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(false) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(true) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to be_a(Time) - expect(subject.created_on).to eq(DateTime.parse("2015-04-01 07:41:59 UTC")) - end - end - describe "#updated_on" do - it do - expect(subject.updated_on).to be_a(Time) - expect(subject.updated_on).to eq(DateTime.parse("2015-05-30 09:21:00 UTC")) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to be_a(Time) - expect(subject.expires_on).to eq(DateTime.parse("2016-04-01 07:41:59 UTC")) - end - end - describe "#registrar" do - it do - expect(subject.registrar).to be_a(Whois::Parser::Registrar) - expect(subject.registrar.id).to eq("1466") - expect(subject.registrar.name).to eq("Lexsynergy") - expect(subject.registrar.url).to eq(nil) - end - end - describe "#registrant_contacts" do - it do - expect(subject.registrant_contacts).to be_a(Array) - expect(subject.registrant_contacts.size).to eq(1) - expect(subject.registrant_contacts[0]).to be_a(Whois::Parser::Contact) - expect(subject.registrant_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_REGISTRANT) - expect(subject.registrant_contacts[0].id).to eq("LEX-7IC-235J") - expect(subject.registrant_contacts[0].name).to eq("Lucky Mokgabudi Masilela") - expect(subject.registrant_contacts[0].organization).to eq("ZA Central Registry") - expect(subject.registrant_contacts[0].address).to eq("COZA House, Gazelle Close Corporate Park South") - expect(subject.registrant_contacts[0].city).to eq("Midrand") - expect(subject.registrant_contacts[0].zip).to eq("1685") - expect(subject.registrant_contacts[0].country).to eq(nil) - expect(subject.registrant_contacts[0].country_code).to eq("ZA") - expect(subject.registrant_contacts[0].phone).to eq("+27.113140077") - expect(subject.registrant_contacts[0].fax).to eq("+27.113140088") - expect(subject.registrant_contacts[0].email).to eq("legal@co.za") - expect(subject.registrant_contacts[0].created_on).to eq(nil) - expect(subject.registrant_contacts[0].updated_on).to eq(nil) - end - end - describe "#admin_contacts" do - it do - expect(subject.admin_contacts).to be_a(Array) - expect(subject.admin_contacts.size).to eq(1) - expect(subject.admin_contacts[0]).to be_a(Whois::Parser::Contact) - expect(subject.admin_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_ADMINISTRATIVE) - expect(subject.admin_contacts[0].id).to eq("LEX-7IC-235J") - expect(subject.admin_contacts[0].name).to eq("Lucky Mokgabudi Masilela") - expect(subject.admin_contacts[0].organization).to eq("ZA Central Registry") - expect(subject.admin_contacts[0].address).to eq("COZA House, Gazelle Close Corporate Park South") - expect(subject.admin_contacts[0].city).to eq("Midrand") - expect(subject.admin_contacts[0].zip).to eq("1685") - expect(subject.admin_contacts[0].country).to eq(nil) - expect(subject.admin_contacts[0].country_code).to eq("ZA") - expect(subject.admin_contacts[0].phone).to eq("+27.113140077") - expect(subject.admin_contacts[0].fax).to eq("+27.113140088") - expect(subject.admin_contacts[0].email).to eq("legal@co.za") - expect(subject.admin_contacts[0].created_on).to eq(nil) - expect(subject.admin_contacts[0].updated_on).to eq(nil) - end - end - describe "#technical_contacts" do - it do - expect(subject.technical_contacts).to be_a(Array) - expect(subject.technical_contacts.size).to eq(1) - expect(subject.technical_contacts[0]).to be_a(Whois::Parser::Contact) - expect(subject.technical_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_TECHNICAL) - expect(subject.technical_contacts[0].id).to eq("LEX-7IC-235J") - expect(subject.technical_contacts[0].name).to eq("Lucky Mokgabudi Masilela") - expect(subject.technical_contacts[0].organization).to eq("ZA Central Registry") - expect(subject.technical_contacts[0].address).to eq("COZA House, Gazelle Close Corporate Park South") - expect(subject.technical_contacts[0].city).to eq("Midrand") - expect(subject.technical_contacts[0].zip).to eq("1685") - expect(subject.technical_contacts[0].country).to eq(nil) - expect(subject.technical_contacts[0].country_code).to eq("ZA") - expect(subject.technical_contacts[0].phone).to eq("+27.113140077") - expect(subject.technical_contacts[0].fax).to eq("+27.113140088") - expect(subject.technical_contacts[0].email).to eq("legal@co.za") - expect(subject.technical_contacts[0].created_on).to eq(nil) - expect(subject.technical_contacts[0].updated_on).to eq(nil) - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers.size).to eq(2) - expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[0].name).to eq("ns1.nic.capetown") - expect(subject.nameservers[0].ipv4).to eq(nil) - expect(subject.nameservers[0].ipv6).to eq(nil) - expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[1].name).to eq("ns1.dnservices.co.za") - expect(subject.nameservers[1].ipv4).to eq(nil) - expect(subject.nameservers[1].ipv6).to eq(nil) - end + it "matches status_registered.expected" do + expect(subject.domain).to eq("registry.capetown") + expect(subject.domain_id).to eq("dom_3K3-9999") + expect(subject.status).to eq(:registered) + expect(subject.available?).to eq(false) + expect(subject.registered?).to eq(true) + expect(subject.created_on).to be_a(Time) + expect(subject.created_on).to eq(DateTime.parse("2015-04-01 07:41:59 UTC")) + expect(subject.updated_on).to be_a(Time) + expect(subject.updated_on).to eq(DateTime.parse("2015-05-30 09:21:00 UTC")) + expect(subject.expires_on).to be_a(Time) + expect(subject.expires_on).to eq(DateTime.parse("2016-04-01 07:41:59 UTC")) + expect(subject.registrar).to be_a(Whois::Parser::Registrar) + expect(subject.registrar.id).to eq("1466") + expect(subject.registrar.name).to eq("Lexsynergy") + expect(subject.registrar.url).to eq(nil) + expect(subject.registrant_contacts).to be_a(Array) + expect(subject.registrant_contacts.size).to eq(1) + expect(subject.registrant_contacts[0]).to be_a(Whois::Parser::Contact) + expect(subject.registrant_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_REGISTRANT) + expect(subject.registrant_contacts[0].id).to eq("LEX-7IC-235J") + expect(subject.registrant_contacts[0].name).to eq("Lucky Mokgabudi Masilela") + expect(subject.registrant_contacts[0].organization).to eq("ZA Central Registry") + expect(subject.registrant_contacts[0].address).to eq("COZA House, Gazelle Close Corporate Park South") + expect(subject.registrant_contacts[0].city).to eq("Midrand") + expect(subject.registrant_contacts[0].zip).to eq("1685") + expect(subject.registrant_contacts[0].country).to eq(nil) + expect(subject.registrant_contacts[0].country_code).to eq("ZA") + expect(subject.registrant_contacts[0].phone).to eq("+27.113140077") + expect(subject.registrant_contacts[0].fax).to eq("+27.113140088") + expect(subject.registrant_contacts[0].email).to eq("legal@co.za") + expect(subject.registrant_contacts[0].created_on).to eq(nil) + expect(subject.registrant_contacts[0].updated_on).to eq(nil) + expect(subject.admin_contacts).to be_a(Array) + expect(subject.admin_contacts.size).to eq(1) + expect(subject.admin_contacts[0]).to be_a(Whois::Parser::Contact) + expect(subject.admin_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_ADMINISTRATIVE) + expect(subject.admin_contacts[0].id).to eq("LEX-7IC-235J") + expect(subject.admin_contacts[0].name).to eq("Lucky Mokgabudi Masilela") + expect(subject.admin_contacts[0].organization).to eq("ZA Central Registry") + expect(subject.admin_contacts[0].address).to eq("COZA House, Gazelle Close Corporate Park South") + expect(subject.admin_contacts[0].city).to eq("Midrand") + expect(subject.admin_contacts[0].zip).to eq("1685") + expect(subject.admin_contacts[0].country).to eq(nil) + expect(subject.admin_contacts[0].country_code).to eq("ZA") + expect(subject.admin_contacts[0].phone).to eq("+27.113140077") + expect(subject.admin_contacts[0].fax).to eq("+27.113140088") + expect(subject.admin_contacts[0].email).to eq("legal@co.za") + expect(subject.admin_contacts[0].created_on).to eq(nil) + expect(subject.admin_contacts[0].updated_on).to eq(nil) + expect(subject.technical_contacts).to be_a(Array) + expect(subject.technical_contacts.size).to eq(1) + expect(subject.technical_contacts[0]).to be_a(Whois::Parser::Contact) + expect(subject.technical_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_TECHNICAL) + expect(subject.technical_contacts[0].id).to eq("LEX-7IC-235J") + expect(subject.technical_contacts[0].name).to eq("Lucky Mokgabudi Masilela") + expect(subject.technical_contacts[0].organization).to eq("ZA Central Registry") + expect(subject.technical_contacts[0].address).to eq("COZA House, Gazelle Close Corporate Park South") + expect(subject.technical_contacts[0].city).to eq("Midrand") + expect(subject.technical_contacts[0].zip).to eq("1685") + expect(subject.technical_contacts[0].country).to eq(nil) + expect(subject.technical_contacts[0].country_code).to eq("ZA") + expect(subject.technical_contacts[0].phone).to eq("+27.113140077") + expect(subject.technical_contacts[0].fax).to eq("+27.113140088") + expect(subject.technical_contacts[0].email).to eq("legal@co.za") + expect(subject.technical_contacts[0].created_on).to eq(nil) + expect(subject.technical_contacts[0].updated_on).to eq(nil) + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers.size).to eq(2) + expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[0].name).to eq("ns1.nic.capetown") + expect(subject.nameservers[0].ipv4).to eq(nil) + expect(subject.nameservers[0].ipv6).to eq(nil) + expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[1].name).to eq("ns1.dnservices.co.za") + expect(subject.nameservers[1].ipv4).to eq(nil) + expect(subject.nameservers[1].ipv6).to eq(nil) end end diff --git a/spec/whois/parsers/responses/ccwhois.ksregistry.net/vg/status_available_spec.rb b/spec/whois/parsers/responses/ccwhois.ksregistry.net/vg/status_available_spec.rb index c4bfe6b0..3b8df6cb 100644 --- a/spec/whois/parsers/responses/ccwhois.ksregistry.net/vg/status_available_spec.rb +++ b/spec/whois/parsers/responses/ccwhois.ksregistry.net/vg/status_available_spec.rb @@ -11,88 +11,33 @@ # require 'spec_helper' -require 'whois/parsers/ccwhois.ksregistry.net.rb' -describe Whois::Parsers::CcwhoisKsregistryNet, "status_available.expected" do +describe "ccwhois.ksregistry.net", :aggregate_failures do subject do file = fixture("responses", "ccwhois.ksregistry.net/vg/status_available.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "ccwhois.ksregistry.net") + Whois::Parser.parser_for(part) end - describe "#disclaimer" do - it do - expect(subject.disclaimer).to eq(nil) - end - end - describe "#domain" do - it do - expect(subject.domain).to eq(nil) - end - end - describe "#domain_id" do - it do - expect { subject.domain_id }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#status" do - it do - expect(subject.status).to eq(:available) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(true) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(false) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to eq(nil) - end - end - describe "#updated_on" do - it do - expect(subject.updated_on).to eq(nil) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to eq(nil) - end - end - describe "#registrar" do - it do - expect(subject.registrar).to eq(nil) - end - end - describe "#registrant_contacts" do - it do - expect(subject.registrant_contacts).to be_a(Array) - expect(subject.registrant_contacts).to eq([]) - end - end - describe "#admin_contacts" do - it do - expect(subject.admin_contacts).to be_a(Array) - expect(subject.admin_contacts).to eq([]) - end - end - describe "#technical_contacts" do - it do - expect(subject.technical_contacts).to be_a(Array) - expect(subject.technical_contacts).to eq([]) - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers).to eq([]) - end + it "matches status_available.expected" do + expect(subject.disclaimer).to eq(nil) + expect(subject.domain).to eq(nil) + expect { subject.domain_id }.to raise_error(Whois::AttributeNotSupported) + expect(subject.status).to eq(:available) + expect(subject.available?).to eq(true) + expect(subject.registered?).to eq(false) + expect(subject.created_on).to eq(nil) + expect(subject.updated_on).to eq(nil) + expect(subject.expires_on).to eq(nil) + expect(subject.registrar).to eq(nil) + expect(subject.registrant_contacts).to be_a(Array) + expect(subject.registrant_contacts).to eq([]) + expect(subject.admin_contacts).to be_a(Array) + expect(subject.admin_contacts).to eq([]) + expect(subject.technical_contacts).to be_a(Array) + expect(subject.technical_contacts).to eq([]) + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers).to eq([]) end end diff --git a/spec/whois/parsers/responses/ccwhois.ksregistry.net/vg/status_registered_spec.rb b/spec/whois/parsers/responses/ccwhois.ksregistry.net/vg/status_registered_spec.rb index 194f0888..975f7a39 100644 --- a/spec/whois/parsers/responses/ccwhois.ksregistry.net/vg/status_registered_spec.rb +++ b/spec/whois/parsers/responses/ccwhois.ksregistry.net/vg/status_registered_spec.rb @@ -11,150 +11,95 @@ # require 'spec_helper' -require 'whois/parsers/ccwhois.ksregistry.net.rb' -describe Whois::Parsers::CcwhoisKsregistryNet, "status_registered.expected" do +describe "ccwhois.ksregistry.net", :aggregate_failures do subject do file = fixture("responses", "ccwhois.ksregistry.net/vg/status_registered.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "ccwhois.ksregistry.net") + Whois::Parser.parser_for(part) end - describe "#disclaimer" do - it do - expect(subject.disclaimer).to eq("The data in the WHOIS database of KSregistry GmbH is provided by KSregistry GmbH for information purposes, and to assist persons in obtaining information about or related to domain name registration records. KSregistry GmbH does not guarantee its accuracy. By submitting a WHOIS query, you agree that you will use this data only for lawful purposes and that, under no circumstances, you will use this data to 1) allow, enable, or otherwise support the transmission of mass unsolicited, commercial advertising or solicitations via E-mail (spam); or 2) enable high volume, automated, electronic processes that apply to KSregistry GmbH or its systems. KSregistry GmbH reserves the right to modify these terms. By submitting this query, you agree to abide by this policy.") - end - end - describe "#domain" do - it do - expect(subject.domain).to eq("google.vg") - end - end - describe "#domain_id" do - it do - expect { subject.domain_id }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#status" do - it do - expect(subject.status).to eq(:registered) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(false) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(true) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to be_a(Time) - expect(subject.created_on).to eq(DateTime.parse("1999-06-05 00:00:00")) - end - end - describe "#updated_on" do - it do - expect(subject.updated_on).to be_a(Time) - expect(subject.updated_on).to eq(DateTime.parse("2013-03-01 00:02:14")) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to be_a(Time) - expect(subject.expires_on).to eq(DateTime.parse("2013-06-05 00:00:00")) - end - end - describe "#registrar" do - it do - expect(subject.registrar).to be_a(Whois::Parser::Registrar) - expect(subject.registrar.id).to eq(nil) - expect(subject.registrar.name).to eq("MarkMonitor Inc.") - expect(subject.registrar.url).to eq("www.markmonitor.com") - end - end - describe "#registrant_contacts" do - it do - expect(subject.registrant_contacts).to be_a(Array) - expect(subject.registrant_contacts.size).to eq(1) - expect(subject.registrant_contacts[0]).to be_a(Whois::Parser::Contact) - expect(subject.registrant_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_REGISTRANT) - expect(subject.registrant_contacts[0].id).to eq("P-GFI26") - expect(subject.registrant_contacts[0].name).to eq("Google, Inc.") - expect(subject.registrant_contacts[0].organization).to eq("Google, Inc.") - expect(subject.registrant_contacts[0].address).to eq("1600 Amphitheatre Parkway") - expect(subject.registrant_contacts[0].city).to eq("Mountain View") - expect(subject.registrant_contacts[0].zip).to eq("94043") - expect(subject.registrant_contacts[0].state).to eq(nil) - expect(subject.registrant_contacts[0].country).to eq(nil) - expect(subject.registrant_contacts[0].country_code).to eq("US") - expect(subject.registrant_contacts[0].phone).to eq("+1.6503300100") - expect(subject.registrant_contacts[0].fax).to eq("+1.6506181499") - expect(subject.registrant_contacts[0].email).to eq("dns-admin@google.com") - expect(subject.registrant_contacts[0].created_on).to eq(nil) - expect(subject.registrant_contacts[0].updated_on).to eq(nil) - end - end - describe "#admin_contacts" do - it do - expect(subject.admin_contacts).to be_a(Array) - expect(subject.admin_contacts.size).to eq(1) - expect(subject.admin_contacts[0]).to be_a(Whois::Parser::Contact) - expect(subject.admin_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_ADMINISTRATIVE) - expect(subject.admin_contacts[0].id).to eq("P-GFI26") - expect(subject.admin_contacts[0].name).to eq("Google, Inc.") - expect(subject.admin_contacts[0].organization).to eq("Google, Inc.") - expect(subject.admin_contacts[0].address).to eq("1600 Amphitheatre Parkway") - expect(subject.admin_contacts[0].city).to eq("Mountain View") - expect(subject.admin_contacts[0].zip).to eq("94043") - expect(subject.admin_contacts[0].state).to eq(nil) - expect(subject.admin_contacts[0].country).to eq(nil) - expect(subject.admin_contacts[0].country_code).to eq("US") - expect(subject.admin_contacts[0].phone).to eq("+1.6503300100") - expect(subject.admin_contacts[0].fax).to eq("+1.6506181499") - expect(subject.admin_contacts[0].email).to eq("dns-admin@google.com") - expect(subject.admin_contacts[0].created_on).to eq(nil) - expect(subject.admin_contacts[0].updated_on).to eq(nil) - end - end - describe "#technical_contacts" do - it do - expect(subject.technical_contacts).to be_a(Array) - expect(subject.technical_contacts.size).to eq(1) - expect(subject.technical_contacts[0]).to be_a(Whois::Parser::Contact) - expect(subject.technical_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_TECHNICAL) - expect(subject.technical_contacts[0].id).to eq("P-GFI26") - expect(subject.technical_contacts[0].name).to eq("Google, Inc.") - expect(subject.technical_contacts[0].organization).to eq("Google, Inc.") - expect(subject.technical_contacts[0].address).to eq("1600 Amphitheatre Parkway") - expect(subject.technical_contacts[0].city).to eq("Mountain View") - expect(subject.technical_contacts[0].zip).to eq("94043") - expect(subject.technical_contacts[0].state).to eq(nil) - expect(subject.technical_contacts[0].country).to eq(nil) - expect(subject.technical_contacts[0].country_code).to eq("US") - expect(subject.technical_contacts[0].phone).to eq("+1.6503300100") - expect(subject.technical_contacts[0].fax).to eq("+1.6506181499") - expect(subject.technical_contacts[0].email).to eq("dns-admin@google.com") - expect(subject.technical_contacts[0].created_on).to eq(nil) - expect(subject.technical_contacts[0].updated_on).to eq(nil) - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers.size).to eq(4) - expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[0].name).to eq("ns1.google.com") - expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[1].name).to eq("ns2.google.com") - expect(subject.nameservers[2]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[2].name).to eq("ns3.google.com") - expect(subject.nameservers[3]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[3].name).to eq("ns4.google.com") - end + it "matches status_registered.expected" do + expect(subject.disclaimer).to eq("The data in the WHOIS database of KSregistry GmbH is provided by KSregistry GmbH for information purposes, and to assist persons in obtaining information about or related to domain name registration records. KSregistry GmbH does not guarantee its accuracy. By submitting a WHOIS query, you agree that you will use this data only for lawful purposes and that, under no circumstances, you will use this data to 1) allow, enable, or otherwise support the transmission of mass unsolicited, commercial advertising or solicitations via E-mail (spam); or 2) enable high volume, automated, electronic processes that apply to KSregistry GmbH or its systems. KSregistry GmbH reserves the right to modify these terms. By submitting this query, you agree to abide by this policy.") + expect(subject.domain).to eq("google.vg") + expect { subject.domain_id }.to raise_error(Whois::AttributeNotSupported) + expect(subject.status).to eq(:registered) + expect(subject.available?).to eq(false) + expect(subject.registered?).to eq(true) + expect(subject.created_on).to be_a(Time) + expect(subject.created_on).to eq(DateTime.parse("1999-06-05 00:00:00")) + expect(subject.updated_on).to be_a(Time) + expect(subject.updated_on).to eq(DateTime.parse("2013-03-01 00:02:14")) + expect(subject.expires_on).to be_a(Time) + expect(subject.expires_on).to eq(DateTime.parse("2013-06-05 00:00:00")) + expect(subject.registrar).to be_a(Whois::Parser::Registrar) + expect(subject.registrar.id).to eq(nil) + expect(subject.registrar.name).to eq("MarkMonitor Inc.") + expect(subject.registrar.url).to eq("www.markmonitor.com") + expect(subject.registrant_contacts).to be_a(Array) + expect(subject.registrant_contacts.size).to eq(1) + expect(subject.registrant_contacts[0]).to be_a(Whois::Parser::Contact) + expect(subject.registrant_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_REGISTRANT) + expect(subject.registrant_contacts[0].id).to eq("P-GFI26") + expect(subject.registrant_contacts[0].name).to eq("Google, Inc.") + expect(subject.registrant_contacts[0].organization).to eq("Google, Inc.") + expect(subject.registrant_contacts[0].address).to eq("1600 Amphitheatre Parkway") + expect(subject.registrant_contacts[0].city).to eq("Mountain View") + expect(subject.registrant_contacts[0].zip).to eq("94043") + expect(subject.registrant_contacts[0].state).to eq(nil) + expect(subject.registrant_contacts[0].country).to eq(nil) + expect(subject.registrant_contacts[0].country_code).to eq("US") + expect(subject.registrant_contacts[0].phone).to eq("+1.6503300100") + expect(subject.registrant_contacts[0].fax).to eq("+1.6506181499") + expect(subject.registrant_contacts[0].email).to eq("dns-admin@google.com") + expect(subject.registrant_contacts[0].created_on).to eq(nil) + expect(subject.registrant_contacts[0].updated_on).to eq(nil) + expect(subject.admin_contacts).to be_a(Array) + expect(subject.admin_contacts.size).to eq(1) + expect(subject.admin_contacts[0]).to be_a(Whois::Parser::Contact) + expect(subject.admin_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_ADMINISTRATIVE) + expect(subject.admin_contacts[0].id).to eq("P-GFI26") + expect(subject.admin_contacts[0].name).to eq("Google, Inc.") + expect(subject.admin_contacts[0].organization).to eq("Google, Inc.") + expect(subject.admin_contacts[0].address).to eq("1600 Amphitheatre Parkway") + expect(subject.admin_contacts[0].city).to eq("Mountain View") + expect(subject.admin_contacts[0].zip).to eq("94043") + expect(subject.admin_contacts[0].state).to eq(nil) + expect(subject.admin_contacts[0].country).to eq(nil) + expect(subject.admin_contacts[0].country_code).to eq("US") + expect(subject.admin_contacts[0].phone).to eq("+1.6503300100") + expect(subject.admin_contacts[0].fax).to eq("+1.6506181499") + expect(subject.admin_contacts[0].email).to eq("dns-admin@google.com") + expect(subject.admin_contacts[0].created_on).to eq(nil) + expect(subject.admin_contacts[0].updated_on).to eq(nil) + expect(subject.technical_contacts).to be_a(Array) + expect(subject.technical_contacts.size).to eq(1) + expect(subject.technical_contacts[0]).to be_a(Whois::Parser::Contact) + expect(subject.technical_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_TECHNICAL) + expect(subject.technical_contacts[0].id).to eq("P-GFI26") + expect(subject.technical_contacts[0].name).to eq("Google, Inc.") + expect(subject.technical_contacts[0].organization).to eq("Google, Inc.") + expect(subject.technical_contacts[0].address).to eq("1600 Amphitheatre Parkway") + expect(subject.technical_contacts[0].city).to eq("Mountain View") + expect(subject.technical_contacts[0].zip).to eq("94043") + expect(subject.technical_contacts[0].state).to eq(nil) + expect(subject.technical_contacts[0].country).to eq(nil) + expect(subject.technical_contacts[0].country_code).to eq("US") + expect(subject.technical_contacts[0].phone).to eq("+1.6503300100") + expect(subject.technical_contacts[0].fax).to eq("+1.6506181499") + expect(subject.technical_contacts[0].email).to eq("dns-admin@google.com") + expect(subject.technical_contacts[0].created_on).to eq(nil) + expect(subject.technical_contacts[0].updated_on).to eq(nil) + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers.size).to eq(4) + expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[0].name).to eq("ns1.google.com") + expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[1].name).to eq("ns2.google.com") + expect(subject.nameservers[2]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[2].name).to eq("ns3.google.com") + expect(subject.nameservers[3]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[3].name).to eq("ns4.google.com") end end diff --git a/spec/whois/parsers/responses/ccwhois.verisign-grs.com/cc/property_nameserver_no_nameserver_spec.rb b/spec/whois/parsers/responses/ccwhois.verisign-grs.com/cc/property_nameserver_no_nameserver_spec.rb index 7775d1bf..9d8ca7c8 100644 --- a/spec/whois/parsers/responses/ccwhois.verisign-grs.com/cc/property_nameserver_no_nameserver_spec.rb +++ b/spec/whois/parsers/responses/ccwhois.verisign-grs.com/cc/property_nameserver_no_nameserver_spec.rb @@ -11,20 +11,17 @@ # require 'spec_helper' -require 'whois/parsers/ccwhois.verisign-grs.com.rb' -describe Whois::Parsers::CcwhoisVerisignGrsCom, "property_nameserver_no_nameserver.expected" do +describe "ccwhois.verisign-grs.com", :aggregate_failures do subject do file = fixture("responses", "ccwhois.verisign-grs.com/cc/property_nameserver_no_nameserver.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "ccwhois.verisign-grs.com") + Whois::Parser.parser_for(part) end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers).to eq([]) - end + it "matches property_nameserver_no_nameserver.expected" do + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers).to eq([]) end end diff --git a/spec/whois/parsers/responses/ccwhois.verisign-grs.com/cc/status_available_spec.rb b/spec/whois/parsers/responses/ccwhois.verisign-grs.com/cc/status_available_spec.rb index 42e36199..6e1a925f 100644 --- a/spec/whois/parsers/responses/ccwhois.verisign-grs.com/cc/status_available_spec.rb +++ b/spec/whois/parsers/responses/ccwhois.verisign-grs.com/cc/status_available_spec.rb @@ -11,80 +11,29 @@ # require 'spec_helper' -require 'whois/parsers/ccwhois.verisign-grs.com.rb' -describe Whois::Parsers::CcwhoisVerisignGrsCom, "status_available.expected" do +describe "ccwhois.verisign-grs.com", :aggregate_failures do subject do file = fixture("responses", "ccwhois.verisign-grs.com/cc/status_available.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "ccwhois.verisign-grs.com") + Whois::Parser.parser_for(part) end - describe "#disclaimer" do - it do - expect(subject.disclaimer).to eq("TERMS OF USE: You are not authorized to access or query our Whois database through the use of electronic processes that are high-volume and automated except as reasonably necessary to register domain names or modify existing registrations; the Data in VeriSign's (\"VeriSign\") Whois database is provided by VeriSign for information purposes only, and to assist persons in obtaining information about or related to a domain name registration record. VeriSign does not guarantee its accuracy. By submitting a Whois query, you agree to abide by the following terms of use: You agree that you may use this Data only for lawful purposes and that under no circumstances will you use this Data to: (1) allow, enable, or otherwise support the transmission of mass unsolicited, commercial advertising or solicitations via e-mail, telephone, or facsimile; or (2) enable high volume, automated, electronic processes that apply to VeriSign (or its computer systems). The compilation, repackaging, dissemination or other use of this Data is expressly prohibited without the prior written consent of VeriSign. You agree not to use electronic processes that are automated and high-volume to access or query the Whois database except as reasonably necessary to register domain names or modify existing registrations. VeriSign reserves the right to restrict your access to the Whois database in its sole discretion to ensure operational stability. VeriSign may restrict or terminate your access to the Whois database for failure to abide by these terms of use. VeriSign reserves the right to modify these terms at any time.") - end - end - describe "#domain" do - it do - expect(subject.domain).to eq("u34jedzcq.cc") - end - end - describe "#domain_id" do - it do - expect(subject.domain_id).to eq(nil) - end - end - describe "#status" do - it do - expect(subject.status).to eq(:available) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(true) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(false) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to eq(nil) - end - end - describe "#updated_on" do - it do - expect(subject.updated_on).to eq(nil) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to eq(nil) - end - end - describe "#registrar" do - it do - expect(subject.registrar).to eq(nil) - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers).to eq([]) - end - end - describe "#referral_whois" do - it do - expect(subject.referral_whois).to eq(nil) - end - end - describe "#referral_url" do - it do - expect(subject.referral_url).to eq(nil) - end + it "matches status_available.expected" do + expect(subject.disclaimer).to eq("TERMS OF USE: You are not authorized to access or query our Whois database through the use of electronic processes that are high-volume and automated except as reasonably necessary to register domain names or modify existing registrations; the Data in VeriSign's (\"VeriSign\") Whois database is provided by VeriSign for information purposes only, and to assist persons in obtaining information about or related to a domain name registration record. VeriSign does not guarantee its accuracy. By submitting a Whois query, you agree to abide by the following terms of use: You agree that you may use this Data only for lawful purposes and that under no circumstances will you use this Data to: (1) allow, enable, or otherwise support the transmission of mass unsolicited, commercial advertising or solicitations via e-mail, telephone, or facsimile; or (2) enable high volume, automated, electronic processes that apply to VeriSign (or its computer systems). The compilation, repackaging, dissemination or other use of this Data is expressly prohibited without the prior written consent of VeriSign. You agree not to use electronic processes that are automated and high-volume to access or query the Whois database except as reasonably necessary to register domain names or modify existing registrations. VeriSign reserves the right to restrict your access to the Whois database in its sole discretion to ensure operational stability. VeriSign may restrict or terminate your access to the Whois database for failure to abide by these terms of use. VeriSign reserves the right to modify these terms at any time.") + expect(subject.domain).to eq("u34jedzcq.cc") + expect(subject.domain_id).to eq(nil) + expect(subject.status).to eq(:available) + expect(subject.available?).to eq(true) + expect(subject.registered?).to eq(false) + expect(subject.created_on).to eq(nil) + expect(subject.updated_on).to eq(nil) + expect(subject.expires_on).to eq(nil) + expect(subject.registrar).to eq(nil) + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers).to eq([]) + expect(subject.referral_whois).to eq(nil) + expect(subject.referral_url).to eq(nil) end end diff --git a/spec/whois/parsers/responses/ccwhois.verisign-grs.com/cc/status_registered_spec.rb b/spec/whois/parsers/responses/ccwhois.verisign-grs.com/cc/status_registered_spec.rb index ddd8512c..71d92978 100644 --- a/spec/whois/parsers/responses/ccwhois.verisign-grs.com/cc/status_registered_spec.rb +++ b/spec/whois/parsers/responses/ccwhois.verisign-grs.com/cc/status_registered_spec.rb @@ -11,102 +11,51 @@ # require 'spec_helper' -require 'whois/parsers/ccwhois.verisign-grs.com.rb' -describe Whois::Parsers::CcwhoisVerisignGrsCom, "status_registered.expected" do +describe "ccwhois.verisign-grs.com", :aggregate_failures do subject do file = fixture("responses", "ccwhois.verisign-grs.com/cc/status_registered.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "ccwhois.verisign-grs.com") + Whois::Parser.parser_for(part) end - describe "#disclaimer" do - it do - expect(subject.disclaimer).to eq("TERMS OF USE: You are not authorized to access or query our Whois database through the use of electronic processes that are high-volume and automated except as reasonably necessary to register domain names or modify existing registrations; the Data in VeriSign's (\"VeriSign\") Whois database is provided by VeriSign for information purposes only, and to assist persons in obtaining information about or related to a domain name registration record. VeriSign does not guarantee its accuracy. By submitting a Whois query, you agree to abide by the following terms of use: You agree that you may use this Data only for lawful purposes and that under no circumstances will you use this Data to: (1) allow, enable, or otherwise support the transmission of mass unsolicited, commercial advertising or solicitations via e-mail, telephone, or facsimile; or (2) enable high volume, automated, electronic processes that apply to VeriSign (or its computer systems). The compilation, repackaging, dissemination or other use of this Data is expressly prohibited without the prior written consent of VeriSign. You agree not to use electronic processes that are automated and high-volume to access or query the Whois database except as reasonably necessary to register domain names or modify existing registrations. VeriSign reserves the right to restrict your access to the Whois database in its sole discretion to ensure operational stability. VeriSign may restrict or terminate your access to the Whois database for failure to abide by these terms of use. VeriSign reserves the right to modify these terms at any time.") - end - end - describe "#domain" do - it do - expect(subject.domain).to eq("google.cc") - end - end - describe "#domain_id" do - it do - expect(subject.domain_id).to eq("86420657_DOMAIN_CC-VRSN") - end - end - describe "#status" do - it do - expect(subject.status).to eq(:registered) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(false) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(true) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to be_a(Time) - expect(subject.created_on).to eq(DateTime.parse("1999-06-07 04:00:00 UTC")) - end - end - describe "#updated_on" do - it do - expect(subject.updated_on).to be_a(Time) - expect(subject.updated_on).to eq(DateTime.parse("2017-05-06 09:28:40 UTC")) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to be_a(Time) - expect(subject.expires_on).to eq(DateTime.parse("2018-06-07 04:00:00 UTC")) - end - end - describe "#registrar" do - it do - expect(subject.registrar).to be_a(Whois::Parser::Registrar) - expect(subject.registrar.id).to eq("292") - expect(subject.registrar.name).to eq("MARKMONITOR INC.") - expect(subject.registrar.url).to eq("http://www.markmonitor.com") - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers.size).to eq(4) - expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[0].name).to eq("ns1.google.com") - expect(subject.nameservers[0].ipv4).to eq(nil) - expect(subject.nameservers[0].ipv6).to eq(nil) - expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[1].name).to eq("ns2.google.com") - expect(subject.nameservers[1].ipv4).to eq(nil) - expect(subject.nameservers[1].ipv6).to eq(nil) - expect(subject.nameservers[2]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[2].name).to eq("ns3.google.com") - expect(subject.nameservers[2].ipv4).to eq(nil) - expect(subject.nameservers[2].ipv6).to eq(nil) - expect(subject.nameservers[3]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[3].name).to eq("ns4.google.com") - expect(subject.nameservers[3].ipv4).to eq(nil) - expect(subject.nameservers[3].ipv6).to eq(nil) - end - end - describe "#referral_whois" do - it do - expect(subject.referral_whois).to eq("whois.markmonitor.com") - end - end - describe "#referral_url" do - it do - expect(subject.referral_url).to eq("http://www.markmonitor.com") - end + it "matches status_registered.expected" do + expect(subject.disclaimer).to eq("TERMS OF USE: You are not authorized to access or query our Whois database through the use of electronic processes that are high-volume and automated except as reasonably necessary to register domain names or modify existing registrations; the Data in VeriSign's (\"VeriSign\") Whois database is provided by VeriSign for information purposes only, and to assist persons in obtaining information about or related to a domain name registration record. VeriSign does not guarantee its accuracy. By submitting a Whois query, you agree to abide by the following terms of use: You agree that you may use this Data only for lawful purposes and that under no circumstances will you use this Data to: (1) allow, enable, or otherwise support the transmission of mass unsolicited, commercial advertising or solicitations via e-mail, telephone, or facsimile; or (2) enable high volume, automated, electronic processes that apply to VeriSign (or its computer systems). The compilation, repackaging, dissemination or other use of this Data is expressly prohibited without the prior written consent of VeriSign. You agree not to use electronic processes that are automated and high-volume to access or query the Whois database except as reasonably necessary to register domain names or modify existing registrations. VeriSign reserves the right to restrict your access to the Whois database in its sole discretion to ensure operational stability. VeriSign may restrict or terminate your access to the Whois database for failure to abide by these terms of use. VeriSign reserves the right to modify these terms at any time.") + expect(subject.domain).to eq("google.cc") + expect(subject.domain_id).to eq("86420657_DOMAIN_CC-VRSN") + expect(subject.status).to eq(:registered) + expect(subject.available?).to eq(false) + expect(subject.registered?).to eq(true) + expect(subject.created_on).to be_a(Time) + expect(subject.created_on).to eq(DateTime.parse("1999-06-07 04:00:00 UTC")) + expect(subject.updated_on).to be_a(Time) + expect(subject.updated_on).to eq(DateTime.parse("2017-05-06 09:28:40 UTC")) + expect(subject.expires_on).to be_a(Time) + expect(subject.expires_on).to eq(DateTime.parse("2018-06-07 04:00:00 UTC")) + expect(subject.registrar).to be_a(Whois::Parser::Registrar) + expect(subject.registrar.id).to eq("292") + expect(subject.registrar.name).to eq("MARKMONITOR INC.") + expect(subject.registrar.url).to eq("http://www.markmonitor.com") + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers.size).to eq(4) + expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[0].name).to eq("ns1.google.com") + expect(subject.nameservers[0].ipv4).to eq(nil) + expect(subject.nameservers[0].ipv6).to eq(nil) + expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[1].name).to eq("ns2.google.com") + expect(subject.nameservers[1].ipv4).to eq(nil) + expect(subject.nameservers[1].ipv6).to eq(nil) + expect(subject.nameservers[2]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[2].name).to eq("ns3.google.com") + expect(subject.nameservers[2].ipv4).to eq(nil) + expect(subject.nameservers[2].ipv6).to eq(nil) + expect(subject.nameservers[3]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[3].name).to eq("ns4.google.com") + expect(subject.nameservers[3].ipv4).to eq(nil) + expect(subject.nameservers[3].ipv6).to eq(nil) + expect(subject.referral_whois).to eq("whois.markmonitor.com") + expect(subject.referral_url).to eq("http://www.markmonitor.com") end end diff --git a/spec/whois/parsers/responses/coza-whois.registry.net.za/co.za/property_contact_fax_empty_spec.rb b/spec/whois/parsers/responses/coza-whois.registry.net.za/co.za/property_contact_fax_empty_spec.rb index f407a41e..676d51b7 100644 --- a/spec/whois/parsers/responses/coza-whois.registry.net.za/co.za/property_contact_fax_empty_spec.rb +++ b/spec/whois/parsers/responses/coza-whois.registry.net.za/co.za/property_contact_fax_empty_spec.rb @@ -11,34 +11,31 @@ # require 'spec_helper' -require 'whois/parsers/coza-whois.registry.net.za.rb' -describe Whois::Parsers::CozaWhoisRegistryNetZa, "property_contact_fax_empty.expected" do +describe "coza-whois.registry.net.za", :aggregate_failures do subject do file = fixture("responses", "coza-whois.registry.net.za/co.za/property_contact_fax_empty.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "coza-whois.registry.net.za") + Whois::Parser.parser_for(part) end - describe "#registrant_contacts" do - it do - expect(subject.registrant_contacts).to be_a(Array) - expect(subject.registrant_contacts.size).to eq(1) - expect(subject.registrant_contacts[0]).to be_a(Whois::Parser::Contact) - expect(subject.registrant_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_REGISTRANT) - expect(subject.registrant_contacts[0].name).to eq("FirstRand Bank Limited") - expect(subject.registrant_contacts[0].organization).to eq("FirstRand Bank Limited") - expect(subject.registrant_contacts[0].address).to eq("2nd floor 4 Merchant Place Cnr Rivonia and Sandton Drive") - expect(subject.registrant_contacts[0].city).to eq("Sandton") - expect(subject.registrant_contacts[0].zip).to eq("2196") - expect(subject.registrant_contacts[0].state).to eq("Gauteng") - expect(subject.registrant_contacts[0].country_code).to eq("ZA") - expect(subject.registrant_contacts[0].phone).to eq("+27.112828000") - expect(subject.registrant_contacts[0].fax).to eq("") - expect(subject.registrant_contacts[0].email).to eq("domreg.admins@firstrand.co.za") - expect(subject.registrant_contacts[0].created_on).to eq(nil) - expect(subject.registrant_contacts[0].updated_on).to eq(nil) - end + it "matches property_contact_fax_empty.expected" do + expect(subject.registrant_contacts).to be_a(Array) + expect(subject.registrant_contacts.size).to eq(1) + expect(subject.registrant_contacts[0]).to be_a(Whois::Parser::Contact) + expect(subject.registrant_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_REGISTRANT) + expect(subject.registrant_contacts[0].name).to eq("FirstRand Bank Limited") + expect(subject.registrant_contacts[0].organization).to eq("FirstRand Bank Limited") + expect(subject.registrant_contacts[0].address).to eq("2nd floor 4 Merchant Place Cnr Rivonia and Sandton Drive") + expect(subject.registrant_contacts[0].city).to eq("Sandton") + expect(subject.registrant_contacts[0].zip).to eq("2196") + expect(subject.registrant_contacts[0].state).to eq("Gauteng") + expect(subject.registrant_contacts[0].country_code).to eq("ZA") + expect(subject.registrant_contacts[0].phone).to eq("+27.112828000") + expect(subject.registrant_contacts[0].fax).to eq("") + expect(subject.registrant_contacts[0].email).to eq("domreg.admins@firstrand.co.za") + expect(subject.registrant_contacts[0].created_on).to eq(nil) + expect(subject.registrant_contacts[0].updated_on).to eq(nil) end end diff --git a/spec/whois/parsers/responses/coza-whois.registry.net.za/co.za/response_throttled_spec.rb b/spec/whois/parsers/responses/coza-whois.registry.net.za/co.za/response_throttled_spec.rb index dd2a8431..bdca2a33 100644 --- a/spec/whois/parsers/responses/coza-whois.registry.net.za/co.za/response_throttled_spec.rb +++ b/spec/whois/parsers/responses/coza-whois.registry.net.za/co.za/response_throttled_spec.rb @@ -11,19 +11,16 @@ # require 'spec_helper' -require 'whois/parsers/coza-whois.registry.net.za.rb' -describe Whois::Parsers::CozaWhoisRegistryNetZa, "response_throttled.expected" do +describe "coza-whois.registry.net.za", :aggregate_failures do subject do file = fixture("responses", "coza-whois.registry.net.za/co.za/response_throttled.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "coza-whois.registry.net.za") + Whois::Parser.parser_for(part) end - describe "#response_throttled?" do - it do - expect(subject.response_throttled?).to eq(true) - end + it "matches response_throttled.expected" do + expect(subject.response_throttled?).to eq(true) end end diff --git a/spec/whois/parsers/responses/coza-whois.registry.net.za/co.za/status_available_spec.rb b/spec/whois/parsers/responses/coza-whois.registry.net.za/co.za/status_available_spec.rb index 4219dbed..a9cff5a6 100644 --- a/spec/whois/parsers/responses/coza-whois.registry.net.za/co.za/status_available_spec.rb +++ b/spec/whois/parsers/responses/coza-whois.registry.net.za/co.za/status_available_spec.rb @@ -11,83 +11,32 @@ # require 'spec_helper' -require 'whois/parsers/coza-whois.registry.net.za.rb' -describe Whois::Parsers::CozaWhoisRegistryNetZa, "status_available.expected" do +describe "coza-whois.registry.net.za", :aggregate_failures do subject do file = fixture("responses", "coza-whois.registry.net.za/co.za/status_available.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "coza-whois.registry.net.za") + Whois::Parser.parser_for(part) end - describe "#domain" do - it do - expect(subject.domain).to eq(nil) - end - end - describe "#domain_id" do - it do - expect(subject.domain_id).to eq(nil) - end - end - describe "#status" do - it do - expect(subject.status).to eq(:available) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(true) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(false) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to eq(nil) - end - end - describe "#updated_on" do - it do - expect(subject.updated_on).to eq(nil) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to eq(nil) - end - end - describe "#registrar" do - it do - expect(subject.registrar).to eq(nil) - end - end - describe "#registrant_contacts" do - it do - expect(subject.registrant_contacts).to be_a(Array) - expect(subject.registrant_contacts).to eq([]) - end - end - describe "#admin_contacts" do - it do - expect(subject.admin_contacts).to be_a(Array) - expect(subject.admin_contacts).to eq([]) - end - end - describe "#technical_contacts" do - it do - expect(subject.technical_contacts).to be_a(Array) - expect(subject.technical_contacts).to eq([]) - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers).to eq([]) - end + it "matches status_available.expected" do + expect(subject.domain).to eq(nil) + expect(subject.domain_id).to eq(nil) + expect(subject.status).to eq(:available) + expect(subject.available?).to eq(true) + expect(subject.registered?).to eq(false) + expect(subject.created_on).to eq(nil) + expect(subject.updated_on).to eq(nil) + expect(subject.expires_on).to eq(nil) + expect(subject.registrar).to eq(nil) + expect(subject.registrant_contacts).to be_a(Array) + expect(subject.registrant_contacts).to eq([]) + expect(subject.admin_contacts).to be_a(Array) + expect(subject.admin_contacts).to eq([]) + expect(subject.technical_contacts).to be_a(Array) + expect(subject.technical_contacts).to eq([]) + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers).to eq([]) end end diff --git a/spec/whois/parsers/responses/coza-whois.registry.net.za/co.za/status_registered_spec.rb b/spec/whois/parsers/responses/coza-whois.registry.net.za/co.za/status_registered_spec.rb index 35438af0..a3f1110e 100644 --- a/spec/whois/parsers/responses/coza-whois.registry.net.za/co.za/status_registered_spec.rb +++ b/spec/whois/parsers/responses/coza-whois.registry.net.za/co.za/status_registered_spec.rb @@ -11,147 +11,96 @@ # require 'spec_helper' -require 'whois/parsers/coza-whois.registry.net.za.rb' -describe Whois::Parsers::CozaWhoisRegistryNetZa, "status_registered.expected" do +describe "coza-whois.registry.net.za", :aggregate_failures do subject do file = fixture("responses", "coza-whois.registry.net.za/co.za/status_registered.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "coza-whois.registry.net.za") + Whois::Parser.parser_for(part) end - describe "#domain" do - it do - expect(subject.domain).to eq("google.co.za") - end - end - describe "#domain_id" do - it do - expect(subject.domain_id).to eq("dom_1SZMF--1") - end - end - describe "#status" do - it do - expect(subject.status).to eq(:registered) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(false) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(true) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to be_a(Time) - expect(subject.created_on).to eq(DateTime.parse("2001-06-25 20:37:59 UTC")) - end - end - describe "#updated_on" do - it do - expect(subject.updated_on).to be_a(Time) - expect(subject.updated_on).to eq(DateTime.parse("2016-09-24 16:20:09 UTC")) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to be_a(Time) - expect(subject.expires_on).to eq(DateTime.parse("2017-06-25 20:37:59 UTC")) - end - end - describe "#registrar" do - it do - expect(subject.registrar).to be_a(Whois::Parser::Registrar) - expect(subject.registrar.id).to eq(nil) - expect(subject.registrar.name).to eq("MarkMonitor") - expect(subject.registrar.url).to eq(nil) - end - end - describe "#registrant_contacts" do - it do - expect(subject.registrant_contacts).to be_a(Array) - expect(subject.registrant_contacts.size).to eq(1) - expect(subject.registrant_contacts[0]).to be_a(Whois::Parser::Contact) - expect(subject.registrant_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_REGISTRANT) - expect(subject.registrant_contacts[0].name).to eq("Google Inc.") - expect(subject.registrant_contacts[0].organization).to eq("") - expect(subject.registrant_contacts[0].address).to eq("1600 Amphitheatre Parkway") - expect(subject.registrant_contacts[0].city).to eq("Mountain View") - expect(subject.registrant_contacts[0].zip).to eq("94043") - expect(subject.registrant_contacts[0].state).to eq("CA") - expect(subject.registrant_contacts[0].country_code).to eq("US") - expect(subject.registrant_contacts[0].phone).to eq("+1.6502530000") - expect(subject.registrant_contacts[0].fax).to eq("+1.6506188571") - expect(subject.registrant_contacts[0].email).to eq("dns-admin@google.com") - expect(subject.registrant_contacts[0].created_on).to eq(nil) - expect(subject.registrant_contacts[0].updated_on).to eq(nil) - end - end - describe "#admin_contacts" do - it do - expect(subject.admin_contacts).to be_a(Array) - expect(subject.admin_contacts.size).to eq(1) - expect(subject.admin_contacts[0]).to be_a(Whois::Parser::Contact) - expect(subject.admin_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_ADMINISTRATIVE) - expect(subject.admin_contacts[0].name).to eq("Google Inc.") - expect(subject.admin_contacts[0].organization).to eq("") - expect(subject.admin_contacts[0].address).to eq("1600 Amphitheatre Parkway") - expect(subject.admin_contacts[0].city).to eq("Mountain View") - expect(subject.admin_contacts[0].zip).to eq("94043") - expect(subject.admin_contacts[0].state).to eq("CA") - expect(subject.admin_contacts[0].country_code).to eq("US") - expect(subject.admin_contacts[0].phone).to eq("+1.6502530000") - expect(subject.admin_contacts[0].fax).to eq("+1.6506188571") - expect(subject.admin_contacts[0].email).to eq("dns-admin@google.com") - expect(subject.admin_contacts[0].created_on).to eq(nil) - expect(subject.admin_contacts[0].updated_on).to eq(nil) - end - end - describe "#technical_contacts" do - it do - expect(subject.technical_contacts).to be_a(Array) - expect(subject.technical_contacts.size).to eq(1) - expect(subject.technical_contacts[0]).to be_a(Whois::Parser::Contact) - expect(subject.technical_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_TECHNICAL) - expect(subject.technical_contacts[0].name).to eq("Google Inc.") - expect(subject.technical_contacts[0].organization).to eq("") - expect(subject.technical_contacts[0].address).to eq("1600 Amphitheatre Parkway") - expect(subject.technical_contacts[0].city).to eq("Mountain View") - expect(subject.technical_contacts[0].zip).to eq("94043") - expect(subject.technical_contacts[0].state).to eq("CA") - expect(subject.technical_contacts[0].country_code).to eq("US") - expect(subject.technical_contacts[0].phone).to eq("+1.6502530000") - expect(subject.technical_contacts[0].fax).to eq("+1.6506188571") - expect(subject.technical_contacts[0].email).to eq("dns-admin@google.com") - expect(subject.technical_contacts[0].created_on).to eq(nil) - expect(subject.technical_contacts[0].updated_on).to eq(nil) - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers.size).to eq(4) - expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[0].name).to eq("ns1.google.com") - expect(subject.nameservers[0].ipv4).to eq(nil) - expect(subject.nameservers[0].ipv6).to eq(nil) - expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[1].name).to eq("ns2.google.com") - expect(subject.nameservers[1].ipv4).to eq(nil) - expect(subject.nameservers[1].ipv6).to eq(nil) - expect(subject.nameservers[2]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[2].name).to eq("ns3.google.com") - expect(subject.nameservers[2].ipv4).to eq(nil) - expect(subject.nameservers[2].ipv6).to eq(nil) - expect(subject.nameservers[3]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[3].name).to eq("ns4.google.com") - expect(subject.nameservers[3].ipv4).to eq(nil) - expect(subject.nameservers[3].ipv6).to eq(nil) - end + it "matches status_registered.expected" do + expect(subject.domain).to eq("google.co.za") + expect(subject.domain_id).to eq("dom_1SZMF--1") + expect(subject.status).to eq(:registered) + expect(subject.available?).to eq(false) + expect(subject.registered?).to eq(true) + expect(subject.created_on).to be_a(Time) + expect(subject.created_on).to eq(DateTime.parse("2001-06-25 20:37:59 UTC")) + expect(subject.updated_on).to be_a(Time) + expect(subject.updated_on).to eq(DateTime.parse("2016-09-24 16:20:09 UTC")) + expect(subject.expires_on).to be_a(Time) + expect(subject.expires_on).to eq(DateTime.parse("2017-06-25 20:37:59 UTC")) + expect(subject.registrar).to be_a(Whois::Parser::Registrar) + expect(subject.registrar.id).to eq(nil) + expect(subject.registrar.name).to eq("MarkMonitor") + expect(subject.registrar.url).to eq(nil) + expect(subject.registrant_contacts).to be_a(Array) + expect(subject.registrant_contacts.size).to eq(1) + expect(subject.registrant_contacts[0]).to be_a(Whois::Parser::Contact) + expect(subject.registrant_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_REGISTRANT) + expect(subject.registrant_contacts[0].name).to eq("Google Inc.") + expect(subject.registrant_contacts[0].organization).to eq("") + expect(subject.registrant_contacts[0].address).to eq("1600 Amphitheatre Parkway") + expect(subject.registrant_contacts[0].city).to eq("Mountain View") + expect(subject.registrant_contacts[0].zip).to eq("94043") + expect(subject.registrant_contacts[0].state).to eq("CA") + expect(subject.registrant_contacts[0].country_code).to eq("US") + expect(subject.registrant_contacts[0].phone).to eq("+1.6502530000") + expect(subject.registrant_contacts[0].fax).to eq("+1.6506188571") + expect(subject.registrant_contacts[0].email).to eq("dns-admin@google.com") + expect(subject.registrant_contacts[0].created_on).to eq(nil) + expect(subject.registrant_contacts[0].updated_on).to eq(nil) + expect(subject.admin_contacts).to be_a(Array) + expect(subject.admin_contacts.size).to eq(1) + expect(subject.admin_contacts[0]).to be_a(Whois::Parser::Contact) + expect(subject.admin_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_ADMINISTRATIVE) + expect(subject.admin_contacts[0].name).to eq("Google Inc.") + expect(subject.admin_contacts[0].organization).to eq("") + expect(subject.admin_contacts[0].address).to eq("1600 Amphitheatre Parkway") + expect(subject.admin_contacts[0].city).to eq("Mountain View") + expect(subject.admin_contacts[0].zip).to eq("94043") + expect(subject.admin_contacts[0].state).to eq("CA") + expect(subject.admin_contacts[0].country_code).to eq("US") + expect(subject.admin_contacts[0].phone).to eq("+1.6502530000") + expect(subject.admin_contacts[0].fax).to eq("+1.6506188571") + expect(subject.admin_contacts[0].email).to eq("dns-admin@google.com") + expect(subject.admin_contacts[0].created_on).to eq(nil) + expect(subject.admin_contacts[0].updated_on).to eq(nil) + expect(subject.technical_contacts).to be_a(Array) + expect(subject.technical_contacts.size).to eq(1) + expect(subject.technical_contacts[0]).to be_a(Whois::Parser::Contact) + expect(subject.technical_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_TECHNICAL) + expect(subject.technical_contacts[0].name).to eq("Google Inc.") + expect(subject.technical_contacts[0].organization).to eq("") + expect(subject.technical_contacts[0].address).to eq("1600 Amphitheatre Parkway") + expect(subject.technical_contacts[0].city).to eq("Mountain View") + expect(subject.technical_contacts[0].zip).to eq("94043") + expect(subject.technical_contacts[0].state).to eq("CA") + expect(subject.technical_contacts[0].country_code).to eq("US") + expect(subject.technical_contacts[0].phone).to eq("+1.6502530000") + expect(subject.technical_contacts[0].fax).to eq("+1.6506188571") + expect(subject.technical_contacts[0].email).to eq("dns-admin@google.com") + expect(subject.technical_contacts[0].created_on).to eq(nil) + expect(subject.technical_contacts[0].updated_on).to eq(nil) + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers.size).to eq(4) + expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[0].name).to eq("ns1.google.com") + expect(subject.nameservers[0].ipv4).to eq(nil) + expect(subject.nameservers[0].ipv6).to eq(nil) + expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[1].name).to eq("ns2.google.com") + expect(subject.nameservers[1].ipv4).to eq(nil) + expect(subject.nameservers[1].ipv6).to eq(nil) + expect(subject.nameservers[2]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[2].name).to eq("ns3.google.com") + expect(subject.nameservers[2].ipv4).to eq(nil) + expect(subject.nameservers[2].ipv6).to eq(nil) + expect(subject.nameservers[3]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[3].name).to eq("ns4.google.com") + expect(subject.nameservers[3].ipv4).to eq(nil) + expect(subject.nameservers[3].ipv6).to eq(nil) end end diff --git a/spec/whois/parsers/responses/durban-whois.registry.net.za/durban/status_available_spec.rb b/spec/whois/parsers/responses/durban-whois.registry.net.za/durban/status_available_spec.rb index a36a3649..2af63fd4 100644 --- a/spec/whois/parsers/responses/durban-whois.registry.net.za/durban/status_available_spec.rb +++ b/spec/whois/parsers/responses/durban-whois.registry.net.za/durban/status_available_spec.rb @@ -11,83 +11,32 @@ # require 'spec_helper' -require 'whois/parsers/durban-whois.registry.net.za.rb' -describe Whois::Parsers::DurbanWhoisRegistryNetZa, "status_available.expected" do +describe "durban-whois.registry.net.za", :aggregate_failures do subject do file = fixture("responses", "durban-whois.registry.net.za/durban/status_available.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "durban-whois.registry.net.za") + Whois::Parser.parser_for(part) end - describe "#domain" do - it do - expect(subject.domain).to eq(nil) - end - end - describe "#domain_id" do - it do - expect(subject.domain_id).to eq(nil) - end - end - describe "#status" do - it do - expect(subject.status).to eq(:available) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(true) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(false) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to eq(nil) - end - end - describe "#updated_on" do - it do - expect(subject.updated_on).to eq(nil) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to eq(nil) - end - end - describe "#registrar" do - it do - expect(subject.registrar).to eq(nil) - end - end - describe "#registrant_contacts" do - it do - expect(subject.registrant_contacts).to be_a(Array) - expect(subject.registrant_contacts).to eq([]) - end - end - describe "#admin_contacts" do - it do - expect(subject.admin_contacts).to be_a(Array) - expect(subject.admin_contacts).to eq([]) - end - end - describe "#technical_contacts" do - it do - expect(subject.technical_contacts).to be_a(Array) - expect(subject.technical_contacts).to eq([]) - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers).to eq([]) - end + it "matches status_available.expected" do + expect(subject.domain).to eq(nil) + expect(subject.domain_id).to eq(nil) + expect(subject.status).to eq(:available) + expect(subject.available?).to eq(true) + expect(subject.registered?).to eq(false) + expect(subject.created_on).to eq(nil) + expect(subject.updated_on).to eq(nil) + expect(subject.expires_on).to eq(nil) + expect(subject.registrar).to eq(nil) + expect(subject.registrant_contacts).to be_a(Array) + expect(subject.registrant_contacts).to eq([]) + expect(subject.admin_contacts).to be_a(Array) + expect(subject.admin_contacts).to eq([]) + expect(subject.technical_contacts).to be_a(Array) + expect(subject.technical_contacts).to eq([]) + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers).to eq([]) end end diff --git a/spec/whois/parsers/responses/durban-whois.registry.net.za/durban/status_registered_spec.rb b/spec/whois/parsers/responses/durban-whois.registry.net.za/durban/status_registered_spec.rb index c6cf2162..4346c777 100644 --- a/spec/whois/parsers/responses/durban-whois.registry.net.za/durban/status_registered_spec.rb +++ b/spec/whois/parsers/responses/durban-whois.registry.net.za/durban/status_registered_spec.rb @@ -11,145 +11,94 @@ # require 'spec_helper' -require 'whois/parsers/durban-whois.registry.net.za.rb' -describe Whois::Parsers::DurbanWhoisRegistryNetZa, "status_registered.expected" do +describe "durban-whois.registry.net.za", :aggregate_failures do subject do file = fixture("responses", "durban-whois.registry.net.za/durban/status_registered.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "durban-whois.registry.net.za") + Whois::Parser.parser_for(part) end - describe "#domain" do - it do - expect(subject.domain).to eq("wordpress.durban") - end - end - describe "#domain_id" do - it do - expect(subject.domain_id).to eq("dom_7G-9999") - end - end - describe "#status" do - it do - expect(subject.status).to eq(:registered) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(false) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(true) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to be_a(Time) - expect(subject.created_on).to eq(DateTime.parse("2014-11-04T06:00:01Z")) - end - end - describe "#updated_on" do - it do - expect(subject.updated_on).to be_a(Time) - expect(subject.updated_on).to eq(DateTime.parse("2014-11-11T06:00:03Z")) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to be_a(Time) - expect(subject.expires_on).to eq(DateTime.parse("2016-11-04T06:00:01Z")) - end - end - describe "#registrar" do - it do - expect(subject.registrar).to be_a(Whois::Parser::Registrar) - expect(subject.registrar.id).to eq("292") - expect(subject.registrar.name).to eq("MarkMonitor") - expect(subject.registrar.url).to eq(nil) - end - end - describe "#registrant_contacts" do - it do - expect(subject.registrant_contacts).to be_a(Array) - expect(subject.registrant_contacts.size).to eq(1) - expect(subject.registrant_contacts[0]).to be_a(Whois::Parser::Contact) - expect(subject.registrant_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_REGISTRANT) - expect(subject.registrant_contacts[0].id).to eq("mmr-132163") - expect(subject.registrant_contacts[0].name).to eq("DNStination Inc.") - expect(subject.registrant_contacts[0].organization).to eq("") - expect(subject.registrant_contacts[0].address).to eq("425 Market St 5th Floor") - expect(subject.registrant_contacts[0].city).to eq("San Francisco") - expect(subject.registrant_contacts[0].state).to eq("CA") - expect(subject.registrant_contacts[0].zip).to eq("94105") - expect(subject.registrant_contacts[0].country).to eq(nil) - expect(subject.registrant_contacts[0].country_code).to eq("US") - expect(subject.registrant_contacts[0].phone).to eq("+1.4155319335") - expect(subject.registrant_contacts[0].fax).to eq("+1.4155319336") - expect(subject.registrant_contacts[0].email).to eq("admin@dnstinations.com") - expect(subject.registrant_contacts[0].created_on).to eq(nil) - expect(subject.registrant_contacts[0].updated_on).to eq(nil) - end - end - describe "#admin_contacts" do - it do - expect(subject.admin_contacts).to be_a(Array) - expect(subject.admin_contacts.size).to eq(1) - expect(subject.admin_contacts[0]).to be_a(Whois::Parser::Contact) - expect(subject.admin_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_ADMINISTRATIVE) - expect(subject.admin_contacts[0].id).to eq("mmr-132163") - expect(subject.admin_contacts[0].name).to eq("DNStination Inc.") - expect(subject.admin_contacts[0].organization).to eq("") - expect(subject.admin_contacts[0].address).to eq("425 Market St 5th Floor") - expect(subject.admin_contacts[0].city).to eq("San Francisco") - expect(subject.admin_contacts[0].state).to eq("CA") - expect(subject.admin_contacts[0].zip).to eq("94105") - expect(subject.admin_contacts[0].country).to eq(nil) - expect(subject.admin_contacts[0].country_code).to eq("US") - expect(subject.admin_contacts[0].phone).to eq("+1.4155319335") - expect(subject.admin_contacts[0].fax).to eq("+1.4155319336") - expect(subject.admin_contacts[0].email).to eq("admin@dnstinations.com") - expect(subject.admin_contacts[0].created_on).to eq(nil) - expect(subject.admin_contacts[0].updated_on).to eq(nil) - end - end - describe "#technical_contacts" do - it do - expect(subject.technical_contacts).to be_a(Array) - expect(subject.technical_contacts.size).to eq(1) - expect(subject.technical_contacts[0]).to be_a(Whois::Parser::Contact) - expect(subject.technical_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_TECHNICAL) - expect(subject.technical_contacts[0].id).to eq("mmr-132163") - expect(subject.technical_contacts[0].name).to eq("DNStination Inc.") - expect(subject.technical_contacts[0].organization).to eq("") - expect(subject.technical_contacts[0].address).to eq("425 Market St 5th Floor") - expect(subject.technical_contacts[0].city).to eq("San Francisco") - expect(subject.technical_contacts[0].state).to eq("CA") - expect(subject.technical_contacts[0].zip).to eq("94105") - expect(subject.technical_contacts[0].country).to eq(nil) - expect(subject.technical_contacts[0].country_code).to eq("US") - expect(subject.technical_contacts[0].phone).to eq("+1.4155319335") - expect(subject.technical_contacts[0].fax).to eq("+1.4155319336") - expect(subject.technical_contacts[0].email).to eq("admin@dnstinations.com") - expect(subject.technical_contacts[0].created_on).to eq(nil) - expect(subject.technical_contacts[0].updated_on).to eq(nil) - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers.size).to eq(2) - expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[0].name).to eq("ns3.markmonitor.com") - expect(subject.nameservers[0].ipv4).to eq(nil) - expect(subject.nameservers[0].ipv6).to eq(nil) - expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[1].name).to eq("ns1.markmonitor.com") - expect(subject.nameservers[1].ipv4).to eq(nil) - expect(subject.nameservers[1].ipv6).to eq(nil) - end + it "matches status_registered.expected" do + expect(subject.domain).to eq("wordpress.durban") + expect(subject.domain_id).to eq("dom_7G-9999") + expect(subject.status).to eq(:registered) + expect(subject.available?).to eq(false) + expect(subject.registered?).to eq(true) + expect(subject.created_on).to be_a(Time) + expect(subject.created_on).to eq(DateTime.parse("2014-11-04T06:00:01Z")) + expect(subject.updated_on).to be_a(Time) + expect(subject.updated_on).to eq(DateTime.parse("2014-11-11T06:00:03Z")) + expect(subject.expires_on).to be_a(Time) + expect(subject.expires_on).to eq(DateTime.parse("2016-11-04T06:00:01Z")) + expect(subject.registrar).to be_a(Whois::Parser::Registrar) + expect(subject.registrar.id).to eq("292") + expect(subject.registrar.name).to eq("MarkMonitor") + expect(subject.registrar.url).to eq(nil) + expect(subject.registrant_contacts).to be_a(Array) + expect(subject.registrant_contacts.size).to eq(1) + expect(subject.registrant_contacts[0]).to be_a(Whois::Parser::Contact) + expect(subject.registrant_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_REGISTRANT) + expect(subject.registrant_contacts[0].id).to eq("mmr-132163") + expect(subject.registrant_contacts[0].name).to eq("DNStination Inc.") + expect(subject.registrant_contacts[0].organization).to eq("") + expect(subject.registrant_contacts[0].address).to eq("425 Market St 5th Floor") + expect(subject.registrant_contacts[0].city).to eq("San Francisco") + expect(subject.registrant_contacts[0].state).to eq("CA") + expect(subject.registrant_contacts[0].zip).to eq("94105") + expect(subject.registrant_contacts[0].country).to eq(nil) + expect(subject.registrant_contacts[0].country_code).to eq("US") + expect(subject.registrant_contacts[0].phone).to eq("+1.4155319335") + expect(subject.registrant_contacts[0].fax).to eq("+1.4155319336") + expect(subject.registrant_contacts[0].email).to eq("admin@dnstinations.com") + expect(subject.registrant_contacts[0].created_on).to eq(nil) + expect(subject.registrant_contacts[0].updated_on).to eq(nil) + expect(subject.admin_contacts).to be_a(Array) + expect(subject.admin_contacts.size).to eq(1) + expect(subject.admin_contacts[0]).to be_a(Whois::Parser::Contact) + expect(subject.admin_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_ADMINISTRATIVE) + expect(subject.admin_contacts[0].id).to eq("mmr-132163") + expect(subject.admin_contacts[0].name).to eq("DNStination Inc.") + expect(subject.admin_contacts[0].organization).to eq("") + expect(subject.admin_contacts[0].address).to eq("425 Market St 5th Floor") + expect(subject.admin_contacts[0].city).to eq("San Francisco") + expect(subject.admin_contacts[0].state).to eq("CA") + expect(subject.admin_contacts[0].zip).to eq("94105") + expect(subject.admin_contacts[0].country).to eq(nil) + expect(subject.admin_contacts[0].country_code).to eq("US") + expect(subject.admin_contacts[0].phone).to eq("+1.4155319335") + expect(subject.admin_contacts[0].fax).to eq("+1.4155319336") + expect(subject.admin_contacts[0].email).to eq("admin@dnstinations.com") + expect(subject.admin_contacts[0].created_on).to eq(nil) + expect(subject.admin_contacts[0].updated_on).to eq(nil) + expect(subject.technical_contacts).to be_a(Array) + expect(subject.technical_contacts.size).to eq(1) + expect(subject.technical_contacts[0]).to be_a(Whois::Parser::Contact) + expect(subject.technical_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_TECHNICAL) + expect(subject.technical_contacts[0].id).to eq("mmr-132163") + expect(subject.technical_contacts[0].name).to eq("DNStination Inc.") + expect(subject.technical_contacts[0].organization).to eq("") + expect(subject.technical_contacts[0].address).to eq("425 Market St 5th Floor") + expect(subject.technical_contacts[0].city).to eq("San Francisco") + expect(subject.technical_contacts[0].state).to eq("CA") + expect(subject.technical_contacts[0].zip).to eq("94105") + expect(subject.technical_contacts[0].country).to eq(nil) + expect(subject.technical_contacts[0].country_code).to eq("US") + expect(subject.technical_contacts[0].phone).to eq("+1.4155319335") + expect(subject.technical_contacts[0].fax).to eq("+1.4155319336") + expect(subject.technical_contacts[0].email).to eq("admin@dnstinations.com") + expect(subject.technical_contacts[0].created_on).to eq(nil) + expect(subject.technical_contacts[0].updated_on).to eq(nil) + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers.size).to eq(2) + expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[0].name).to eq("ns3.markmonitor.com") + expect(subject.nameservers[0].ipv4).to eq(nil) + expect(subject.nameservers[0].ipv6).to eq(nil) + expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[1].name).to eq("ns1.markmonitor.com") + expect(subject.nameservers[1].ipv4).to eq(nil) + expect(subject.nameservers[1].ipv6).to eq(nil) end end diff --git a/spec/whois/parsers/responses/joburg-whois.registry.net.za/joburg/status_available_spec.rb b/spec/whois/parsers/responses/joburg-whois.registry.net.za/joburg/status_available_spec.rb index 0d9d3d62..94996eee 100644 --- a/spec/whois/parsers/responses/joburg-whois.registry.net.za/joburg/status_available_spec.rb +++ b/spec/whois/parsers/responses/joburg-whois.registry.net.za/joburg/status_available_spec.rb @@ -11,83 +11,32 @@ # require 'spec_helper' -require 'whois/parsers/joburg-whois.registry.net.za.rb' -describe Whois::Parsers::JoburgWhoisRegistryNetZa, "status_available.expected" do +describe "joburg-whois.registry.net.za", :aggregate_failures do subject do file = fixture("responses", "joburg-whois.registry.net.za/joburg/status_available.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "joburg-whois.registry.net.za") + Whois::Parser.parser_for(part) end - describe "#domain" do - it do - expect(subject.domain).to eq(nil) - end - end - describe "#domain_id" do - it do - expect(subject.domain_id).to eq(nil) - end - end - describe "#status" do - it do - expect(subject.status).to eq(:available) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(true) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(false) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to eq(nil) - end - end - describe "#updated_on" do - it do - expect(subject.updated_on).to eq(nil) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to eq(nil) - end - end - describe "#registrar" do - it do - expect(subject.registrar).to eq(nil) - end - end - describe "#registrant_contacts" do - it do - expect(subject.registrant_contacts).to be_a(Array) - expect(subject.registrant_contacts).to eq([]) - end - end - describe "#admin_contacts" do - it do - expect(subject.admin_contacts).to be_a(Array) - expect(subject.admin_contacts).to eq([]) - end - end - describe "#technical_contacts" do - it do - expect(subject.technical_contacts).to be_a(Array) - expect(subject.technical_contacts).to eq([]) - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers).to eq([]) - end + it "matches status_available.expected" do + expect(subject.domain).to eq(nil) + expect(subject.domain_id).to eq(nil) + expect(subject.status).to eq(:available) + expect(subject.available?).to eq(true) + expect(subject.registered?).to eq(false) + expect(subject.created_on).to eq(nil) + expect(subject.updated_on).to eq(nil) + expect(subject.expires_on).to eq(nil) + expect(subject.registrar).to eq(nil) + expect(subject.registrant_contacts).to be_a(Array) + expect(subject.registrant_contacts).to eq([]) + expect(subject.admin_contacts).to be_a(Array) + expect(subject.admin_contacts).to eq([]) + expect(subject.technical_contacts).to be_a(Array) + expect(subject.technical_contacts).to eq([]) + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers).to eq([]) end end diff --git a/spec/whois/parsers/responses/joburg-whois.registry.net.za/joburg/status_registered_spec.rb b/spec/whois/parsers/responses/joburg-whois.registry.net.za/joburg/status_registered_spec.rb index 6ad601a3..9ac94924 100644 --- a/spec/whois/parsers/responses/joburg-whois.registry.net.za/joburg/status_registered_spec.rb +++ b/spec/whois/parsers/responses/joburg-whois.registry.net.za/joburg/status_registered_spec.rb @@ -11,146 +11,95 @@ # require 'spec_helper' -require 'whois/parsers/joburg-whois.registry.net.za.rb' -describe Whois::Parsers::JoburgWhoisRegistryNetZa, "status_registered.expected" do +describe "joburg-whois.registry.net.za", :aggregate_failures do subject do file = fixture("responses", "joburg-whois.registry.net.za/joburg/status_registered.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "joburg-whois.registry.net.za") + Whois::Parser.parser_for(part) end - describe "#domain" do - it do - expect(subject.domain).to eq("usedautos.joburg") - end - end - describe "#domain_id" do - it do - expect(subject.domain_id).to eq("dom_7P-9999") - end - end - describe "#status" do - it do - expect(subject.status).to eq(:registered) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(false) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(true) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to be_a(Time) - expect(subject.created_on).to eq(DateTime.parse("2014-11-03 22:00:08 UTC")) - end - end - describe "#updated_on" do - it do - expect(subject.updated_on).to be_a(Time) - expect(subject.updated_on).to eq(DateTime.parse("2014-11-10 07:08:28 UTC")) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to be_a(Time) - expect(subject.expires_on).to eq(DateTime.parse("2015-11-03 22:00:08 UTC")) - end - end - describe "#registrar" do - it do - expect(subject.registrar).to be_a(Whois::Parser::Registrar) - expect(subject.registrar.id).to eq("1466") - expect(subject.registrar.name).to eq("Lexsynergy") - expect(subject.registrar.url).to eq(nil) - end - end - describe "#registrant_contacts" do - it do - expect(subject.registrant_contacts).to be_a(Array) - expect(subject.registrant_contacts.size).to eq(1) - expect(subject.registrant_contacts[0]).to be_a(Whois::Parser::Contact) - expect(subject.registrant_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_REGISTRANT) - expect(subject.registrant_contacts[0].id).to eq("LEX-5FP-22YL") - expect(subject.registrant_contacts[0].name).to eq("Domain Administrator") - expect(subject.registrant_contacts[0].organization).to eq("The Car Trader (Pty) Ltd") - expect(subject.registrant_contacts[0].address).to eq("154 Bram Fischer Drive Randburg") - expect(subject.registrant_contacts[0].city).to eq("Johannesburg") - expect(subject.registrant_contacts[0].zip).to eq("2194") - expect(subject.registrant_contacts[0].country).to eq(nil) - expect(subject.registrant_contacts[0].country_code).to eq("ZA") - expect(subject.registrant_contacts[0].phone).to eq("+27.116860900") - expect(subject.registrant_contacts[0].fax).to eq("+27.117896449") - expect(subject.registrant_contacts[0].email).to eq("domains@autotrader.co.za") - expect(subject.registrant_contacts[0].created_on).to eq(nil) - expect(subject.registrant_contacts[0].updated_on).to eq(nil) - end - end - describe "#admin_contacts" do - it do - expect(subject.admin_contacts).to be_a(Array) - expect(subject.admin_contacts.size).to eq(1) - expect(subject.admin_contacts[0]).to be_a(Whois::Parser::Contact) - expect(subject.admin_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_ADMINISTRATIVE) - expect(subject.admin_contacts[0].id).to eq("LEX-5FP-22YL") - expect(subject.admin_contacts[0].name).to eq("Domain Administrator") - expect(subject.admin_contacts[0].organization).to eq("The Car Trader (Pty) Ltd") - expect(subject.admin_contacts[0].address).to eq("154 Bram Fischer Drive Randburg") - expect(subject.admin_contacts[0].city).to eq("Johannesburg") - expect(subject.admin_contacts[0].zip).to eq("2194") - expect(subject.admin_contacts[0].country).to eq(nil) - expect(subject.admin_contacts[0].country_code).to eq("ZA") - expect(subject.admin_contacts[0].phone).to eq("+27.116860900") - expect(subject.admin_contacts[0].fax).to eq("+27.117896449") - expect(subject.admin_contacts[0].email).to eq("domains@autotrader.co.za") - expect(subject.admin_contacts[0].created_on).to eq(nil) - expect(subject.admin_contacts[0].updated_on).to eq(nil) - end - end - describe "#technical_contacts" do - it do - expect(subject.technical_contacts).to be_a(Array) - expect(subject.technical_contacts.size).to eq(1) - expect(subject.technical_contacts[0]).to be_a(Whois::Parser::Contact) - expect(subject.technical_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_TECHNICAL) - expect(subject.technical_contacts[0].id).to eq("LEX-5FP-22YL") - expect(subject.technical_contacts[0].name).to eq("Domain Administrator") - expect(subject.technical_contacts[0].organization).to eq("The Car Trader (Pty) Ltd") - expect(subject.technical_contacts[0].address).to eq("154 Bram Fischer Drive Randburg") - expect(subject.technical_contacts[0].city).to eq("Johannesburg") - expect(subject.technical_contacts[0].zip).to eq("2194") - expect(subject.technical_contacts[0].country).to eq(nil) - expect(subject.technical_contacts[0].country_code).to eq("ZA") - expect(subject.technical_contacts[0].phone).to eq("+27.116860900") - expect(subject.technical_contacts[0].fax).to eq("+27.117896449") - expect(subject.technical_contacts[0].email).to eq("domains@autotrader.co.za") - expect(subject.technical_contacts[0].created_on).to eq(nil) - expect(subject.technical_contacts[0].updated_on).to eq(nil) - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers.size).to eq(3) - expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[0].name).to eq("ns1.lexsynergy.net") - expect(subject.nameservers[0].ipv4).to eq(nil) - expect(subject.nameservers[0].ipv6).to eq(nil) - expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[1].name).to eq("ns2.lexsynergy.us") - expect(subject.nameservers[1].ipv4).to eq(nil) - expect(subject.nameservers[1].ipv6).to eq(nil) - expect(subject.nameservers[2]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[2].name).to eq("ns3.lexsynergy.info") - expect(subject.nameservers[2].ipv4).to eq(nil) - expect(subject.nameservers[2].ipv6).to eq(nil) - end + it "matches status_registered.expected" do + expect(subject.domain).to eq("usedautos.joburg") + expect(subject.domain_id).to eq("dom_7P-9999") + expect(subject.status).to eq(:registered) + expect(subject.available?).to eq(false) + expect(subject.registered?).to eq(true) + expect(subject.created_on).to be_a(Time) + expect(subject.created_on).to eq(DateTime.parse("2014-11-03 22:00:08 UTC")) + expect(subject.updated_on).to be_a(Time) + expect(subject.updated_on).to eq(DateTime.parse("2014-11-10 07:08:28 UTC")) + expect(subject.expires_on).to be_a(Time) + expect(subject.expires_on).to eq(DateTime.parse("2015-11-03 22:00:08 UTC")) + expect(subject.registrar).to be_a(Whois::Parser::Registrar) + expect(subject.registrar.id).to eq("1466") + expect(subject.registrar.name).to eq("Lexsynergy") + expect(subject.registrar.url).to eq(nil) + expect(subject.registrant_contacts).to be_a(Array) + expect(subject.registrant_contacts.size).to eq(1) + expect(subject.registrant_contacts[0]).to be_a(Whois::Parser::Contact) + expect(subject.registrant_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_REGISTRANT) + expect(subject.registrant_contacts[0].id).to eq("LEX-5FP-22YL") + expect(subject.registrant_contacts[0].name).to eq("Domain Administrator") + expect(subject.registrant_contacts[0].organization).to eq("The Car Trader (Pty) Ltd") + expect(subject.registrant_contacts[0].address).to eq("154 Bram Fischer Drive Randburg") + expect(subject.registrant_contacts[0].city).to eq("Johannesburg") + expect(subject.registrant_contacts[0].zip).to eq("2194") + expect(subject.registrant_contacts[0].country).to eq(nil) + expect(subject.registrant_contacts[0].country_code).to eq("ZA") + expect(subject.registrant_contacts[0].phone).to eq("+27.116860900") + expect(subject.registrant_contacts[0].fax).to eq("+27.117896449") + expect(subject.registrant_contacts[0].email).to eq("domains@autotrader.co.za") + expect(subject.registrant_contacts[0].created_on).to eq(nil) + expect(subject.registrant_contacts[0].updated_on).to eq(nil) + expect(subject.admin_contacts).to be_a(Array) + expect(subject.admin_contacts.size).to eq(1) + expect(subject.admin_contacts[0]).to be_a(Whois::Parser::Contact) + expect(subject.admin_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_ADMINISTRATIVE) + expect(subject.admin_contacts[0].id).to eq("LEX-5FP-22YL") + expect(subject.admin_contacts[0].name).to eq("Domain Administrator") + expect(subject.admin_contacts[0].organization).to eq("The Car Trader (Pty) Ltd") + expect(subject.admin_contacts[0].address).to eq("154 Bram Fischer Drive Randburg") + expect(subject.admin_contacts[0].city).to eq("Johannesburg") + expect(subject.admin_contacts[0].zip).to eq("2194") + expect(subject.admin_contacts[0].country).to eq(nil) + expect(subject.admin_contacts[0].country_code).to eq("ZA") + expect(subject.admin_contacts[0].phone).to eq("+27.116860900") + expect(subject.admin_contacts[0].fax).to eq("+27.117896449") + expect(subject.admin_contacts[0].email).to eq("domains@autotrader.co.za") + expect(subject.admin_contacts[0].created_on).to eq(nil) + expect(subject.admin_contacts[0].updated_on).to eq(nil) + expect(subject.technical_contacts).to be_a(Array) + expect(subject.technical_contacts.size).to eq(1) + expect(subject.technical_contacts[0]).to be_a(Whois::Parser::Contact) + expect(subject.technical_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_TECHNICAL) + expect(subject.technical_contacts[0].id).to eq("LEX-5FP-22YL") + expect(subject.technical_contacts[0].name).to eq("Domain Administrator") + expect(subject.technical_contacts[0].organization).to eq("The Car Trader (Pty) Ltd") + expect(subject.technical_contacts[0].address).to eq("154 Bram Fischer Drive Randburg") + expect(subject.technical_contacts[0].city).to eq("Johannesburg") + expect(subject.technical_contacts[0].zip).to eq("2194") + expect(subject.technical_contacts[0].country).to eq(nil) + expect(subject.technical_contacts[0].country_code).to eq("ZA") + expect(subject.technical_contacts[0].phone).to eq("+27.116860900") + expect(subject.technical_contacts[0].fax).to eq("+27.117896449") + expect(subject.technical_contacts[0].email).to eq("domains@autotrader.co.za") + expect(subject.technical_contacts[0].created_on).to eq(nil) + expect(subject.technical_contacts[0].updated_on).to eq(nil) + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers.size).to eq(3) + expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[0].name).to eq("ns1.lexsynergy.net") + expect(subject.nameservers[0].ipv4).to eq(nil) + expect(subject.nameservers[0].ipv6).to eq(nil) + expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[1].name).to eq("ns2.lexsynergy.us") + expect(subject.nameservers[1].ipv4).to eq(nil) + expect(subject.nameservers[1].ipv6).to eq(nil) + expect(subject.nameservers[2]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[2].name).to eq("ns3.lexsynergy.info") + expect(subject.nameservers[2].ipv4).to eq(nil) + expect(subject.nameservers[2].ipv6).to eq(nil) end end diff --git a/spec/whois/parsers/responses/kero.yachay.pe/pe/response_throttled_spec.rb b/spec/whois/parsers/responses/kero.yachay.pe/pe/response_throttled_spec.rb index 13a819e4..2063a36a 100644 --- a/spec/whois/parsers/responses/kero.yachay.pe/pe/response_throttled_spec.rb +++ b/spec/whois/parsers/responses/kero.yachay.pe/pe/response_throttled_spec.rb @@ -11,19 +11,16 @@ # require 'spec_helper' -require 'whois/parsers/kero.yachay.pe.rb' -describe Whois::Parsers::KeroYachayPe, "response_throttled.expected" do +describe "kero.yachay.pe", :aggregate_failures do subject do file = fixture("responses", "kero.yachay.pe/pe/response_throttled.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "kero.yachay.pe") + Whois::Parser.parser_for(part) end - describe "#response_throttled?" do - it do - expect(subject.response_throttled?).to eq(true) - end + it "matches response_throttled.expected" do + expect(subject.response_throttled?).to eq(true) end end diff --git a/spec/whois/parsers/responses/kero.yachay.pe/pe/status_available_spec.rb b/spec/whois/parsers/responses/kero.yachay.pe/pe/status_available_spec.rb index 16b804ee..3db4e1b7 100644 --- a/spec/whois/parsers/responses/kero.yachay.pe/pe/status_available_spec.rb +++ b/spec/whois/parsers/responses/kero.yachay.pe/pe/status_available_spec.rb @@ -11,55 +11,24 @@ # require 'spec_helper' -require 'whois/parsers/kero.yachay.pe.rb' -describe Whois::Parsers::KeroYachayPe, "status_available.expected" do +describe "kero.yachay.pe", :aggregate_failures do subject do file = fixture("responses", "kero.yachay.pe/pe/status_available.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "kero.yachay.pe") + Whois::Parser.parser_for(part) end - describe "#status" do - it do - expect(subject.status).to eq(:available) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(true) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(false) - end - end - describe "#created_on" do - it do - expect { subject.created_on }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#updated_on" do - it do - expect { subject.updated_on }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#expires_on" do - it do - expect { subject.expires_on }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers).to eq([]) - end - end - describe "#response_throttled?" do - it do - expect(subject.response_throttled?).to eq(false) - end + it "matches status_available.expected" do + expect(subject.status).to eq(:available) + expect(subject.available?).to eq(true) + expect(subject.registered?).to eq(false) + expect { subject.created_on }.to raise_error(Whois::AttributeNotSupported) + expect { subject.updated_on }.to raise_error(Whois::AttributeNotSupported) + expect { subject.expires_on }.to raise_error(Whois::AttributeNotSupported) + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers).to eq([]) + expect(subject.response_throttled?).to eq(false) end end diff --git a/spec/whois/parsers/responses/kero.yachay.pe/pe/status_inactive_spec.rb b/spec/whois/parsers/responses/kero.yachay.pe/pe/status_inactive_spec.rb index 1a5ea14b..c28c65de 100644 --- a/spec/whois/parsers/responses/kero.yachay.pe/pe/status_inactive_spec.rb +++ b/spec/whois/parsers/responses/kero.yachay.pe/pe/status_inactive_spec.rb @@ -11,56 +11,25 @@ # require 'spec_helper' -require 'whois/parsers/kero.yachay.pe.rb' -describe Whois::Parsers::KeroYachayPe, "status_inactive.expected" do +describe "kero.yachay.pe", :aggregate_failures do subject do file = fixture("responses", "kero.yachay.pe/pe/status_inactive.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "kero.yachay.pe") + Whois::Parser.parser_for(part) end - describe "#status" do - it do - expect(subject.status).to eq(:inactive) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(false) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(true) - end - end - describe "#created_on" do - it do - expect { subject.created_on }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#updated_on" do - it do - expect { subject.updated_on }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#expires_on" do - it do - expect { subject.expires_on }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers.size).to eq(0) - expect(subject.nameservers).to eq([]) - end - end - describe "#response_throttled?" do - it do - expect(subject.response_throttled?).to eq(false) - end + it "matches status_inactive.expected" do + expect(subject.status).to eq(:inactive) + expect(subject.available?).to eq(false) + expect(subject.registered?).to eq(true) + expect { subject.created_on }.to raise_error(Whois::AttributeNotSupported) + expect { subject.updated_on }.to raise_error(Whois::AttributeNotSupported) + expect { subject.expires_on }.to raise_error(Whois::AttributeNotSupported) + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers.size).to eq(0) + expect(subject.nameservers).to eq([]) + expect(subject.response_throttled?).to eq(false) end end diff --git a/spec/whois/parsers/responses/kero.yachay.pe/pe/status_registered_spec.rb b/spec/whois/parsers/responses/kero.yachay.pe/pe/status_registered_spec.rb index 9898737d..4b183088 100644 --- a/spec/whois/parsers/responses/kero.yachay.pe/pe/status_registered_spec.rb +++ b/spec/whois/parsers/responses/kero.yachay.pe/pe/status_registered_spec.rb @@ -11,63 +11,32 @@ # require 'spec_helper' -require 'whois/parsers/kero.yachay.pe.rb' -describe Whois::Parsers::KeroYachayPe, "status_registered.expected" do +describe "kero.yachay.pe", :aggregate_failures do subject do file = fixture("responses", "kero.yachay.pe/pe/status_registered.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "kero.yachay.pe") + Whois::Parser.parser_for(part) end - describe "#status" do - it do - expect(subject.status).to eq(:registered) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(false) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(true) - end - end - describe "#created_on" do - it do - expect { subject.created_on }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#updated_on" do - it do - expect { subject.updated_on }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#expires_on" do - it do - expect { subject.expires_on }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers.size).to eq(4) - expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[0].name).to eq("ns1.google.com") - expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[1].name).to eq("ns2.google.com") - expect(subject.nameservers[2]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[2].name).to eq("ns3.google.com") - expect(subject.nameservers[3]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[3].name).to eq("ns4.google.com") - end - end - describe "#response_throttled?" do - it do - expect(subject.response_throttled?).to eq(false) - end + it "matches status_registered.expected" do + expect(subject.status).to eq(:registered) + expect(subject.available?).to eq(false) + expect(subject.registered?).to eq(true) + expect { subject.created_on }.to raise_error(Whois::AttributeNotSupported) + expect { subject.updated_on }.to raise_error(Whois::AttributeNotSupported) + expect { subject.expires_on }.to raise_error(Whois::AttributeNotSupported) + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers.size).to eq(4) + expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[0].name).to eq("ns1.google.com") + expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[1].name).to eq("ns2.google.com") + expect(subject.nameservers[2]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[2].name).to eq("ns3.google.com") + expect(subject.nameservers[3]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[3].name).to eq("ns4.google.com") + expect(subject.response_throttled?).to eq(false) end end diff --git a/spec/whois/parsers/responses/kero.yachay.pe/pe/status_suspended_spec.rb b/spec/whois/parsers/responses/kero.yachay.pe/pe/status_suspended_spec.rb index 8ff01bf0..dd78a5c0 100644 --- a/spec/whois/parsers/responses/kero.yachay.pe/pe/status_suspended_spec.rb +++ b/spec/whois/parsers/responses/kero.yachay.pe/pe/status_suspended_spec.rb @@ -11,55 +11,24 @@ # require 'spec_helper' -require 'whois/parsers/kero.yachay.pe.rb' -describe Whois::Parsers::KeroYachayPe, "status_suspended.expected" do +describe "kero.yachay.pe", :aggregate_failures do subject do file = fixture("responses", "kero.yachay.pe/pe/status_suspended.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "kero.yachay.pe") + Whois::Parser.parser_for(part) end - describe "#status" do - it do - expect(subject.status).to eq(:registered) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(false) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(true) - end - end - describe "#created_on" do - it do - expect { subject.created_on }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#updated_on" do - it do - expect { subject.updated_on }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#expires_on" do - it do - expect { subject.expires_on }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers.size).to eq(4) - end - end - describe "#response_throttled?" do - it do - expect(subject.response_throttled?).to eq(false) - end + it "matches status_suspended.expected" do + expect(subject.status).to eq(:registered) + expect(subject.available?).to eq(false) + expect(subject.registered?).to eq(true) + expect { subject.created_on }.to raise_error(Whois::AttributeNotSupported) + expect { subject.updated_on }.to raise_error(Whois::AttributeNotSupported) + expect { subject.expires_on }.to raise_error(Whois::AttributeNotSupported) + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers.size).to eq(4) + expect(subject.response_throttled?).to eq(false) end end diff --git a/spec/whois/parsers/responses/org-whois.registry.net.za/org.za/status_available_spec.rb b/spec/whois/parsers/responses/org-whois.registry.net.za/org.za/status_available_spec.rb index 6d97791b..2820bda8 100644 --- a/spec/whois/parsers/responses/org-whois.registry.net.za/org.za/status_available_spec.rb +++ b/spec/whois/parsers/responses/org-whois.registry.net.za/org.za/status_available_spec.rb @@ -11,83 +11,32 @@ # require 'spec_helper' -require 'whois/parsers/org-whois.registry.net.za.rb' -describe Whois::Parsers::OrgWhoisRegistryNetZa, "status_available.expected" do +describe "org-whois.registry.net.za", :aggregate_failures do subject do file = fixture("responses", "org-whois.registry.net.za/org.za/status_available.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "org-whois.registry.net.za") + Whois::Parser.parser_for(part) end - describe "#domain" do - it do - expect(subject.domain).to eq(nil) - end - end - describe "#domain_id" do - it do - expect(subject.domain_id).to eq(nil) - end - end - describe "#status" do - it do - expect(subject.status).to eq(:available) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(true) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(false) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to eq(nil) - end - end - describe "#updated_on" do - it do - expect(subject.updated_on).to eq(nil) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to eq(nil) - end - end - describe "#registrar" do - it do - expect(subject.registrar).to eq(nil) - end - end - describe "#registrant_contacts" do - it do - expect(subject.registrant_contacts).to be_a(Array) - expect(subject.registrant_contacts).to eq([]) - end - end - describe "#admin_contacts" do - it do - expect(subject.admin_contacts).to be_a(Array) - expect(subject.admin_contacts).to eq([]) - end - end - describe "#technical_contacts" do - it do - expect(subject.technical_contacts).to be_a(Array) - expect(subject.technical_contacts).to eq([]) - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers).to eq([]) - end + it "matches status_available.expected" do + expect(subject.domain).to eq(nil) + expect(subject.domain_id).to eq(nil) + expect(subject.status).to eq(:available) + expect(subject.available?).to eq(true) + expect(subject.registered?).to eq(false) + expect(subject.created_on).to eq(nil) + expect(subject.updated_on).to eq(nil) + expect(subject.expires_on).to eq(nil) + expect(subject.registrar).to eq(nil) + expect(subject.registrant_contacts).to be_a(Array) + expect(subject.registrant_contacts).to eq([]) + expect(subject.admin_contacts).to be_a(Array) + expect(subject.admin_contacts).to eq([]) + expect(subject.technical_contacts).to be_a(Array) + expect(subject.technical_contacts).to eq([]) + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers).to eq([]) end end diff --git a/spec/whois/parsers/responses/org-whois.registry.net.za/org.za/status_registered_spec.rb b/spec/whois/parsers/responses/org-whois.registry.net.za/org.za/status_registered_spec.rb index 50e675a3..f1539140 100644 --- a/spec/whois/parsers/responses/org-whois.registry.net.za/org.za/status_registered_spec.rb +++ b/spec/whois/parsers/responses/org-whois.registry.net.za/org.za/status_registered_spec.rb @@ -11,147 +11,96 @@ # require 'spec_helper' -require 'whois/parsers/org-whois.registry.net.za.rb' -describe Whois::Parsers::OrgWhoisRegistryNetZa, "status_registered.expected" do +describe "org-whois.registry.net.za", :aggregate_failures do subject do file = fixture("responses", "org-whois.registry.net.za/org.za/status_registered.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "org-whois.registry.net.za") + Whois::Parser.parser_for(part) end - describe "#domain" do - it do - expect(subject.domain).to eq("joburg.org.za") - end - end - describe "#domain_id" do - it do - expect(subject.domain_id).to eq("dom_8VP-9999") - end - end - describe "#status" do - it do - expect(subject.status).to eq(:registered) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(false) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(true) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to be_a(Time) - expect(subject.created_on).to eq(DateTime.parse("1997-10-03 09:46:34 UTC")) - end - end - describe "#updated_on" do - it do - expect(subject.updated_on).to be_a(Time) - expect(subject.updated_on).to eq(DateTime.parse("2015-02-05 08:45:51 UTC")) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to be_a(Time) - expect(subject.expires_on).to eq(DateTime.parse("2999-12-31 21:59:59 UTC")) - end - end - describe "#registrar" do - it do - expect(subject.registrar).to be_a(Whois::Parser::Registrar) - expect(subject.registrar.id).to eq("9999") - expect(subject.registrar.name).to eq("ZA Central Registry") - expect(subject.registrar.url).to eq(nil) - end - end - describe "#registrant_contacts" do - it do - expect(subject.registrant_contacts).to be_a(Array) - expect(subject.registrant_contacts.size).to eq(1) - expect(subject.registrant_contacts[0]).to be_a(Whois::Parser::Contact) - expect(subject.registrant_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_REGISTRANT) - expect(subject.registrant_contacts[0].id).to eq("jobuRant") - expect(subject.registrant_contacts[0].name).to eq("City of Johannesburg Metropolitan Municipality") - expect(subject.registrant_contacts[0].organization).to eq("") - expect(subject.registrant_contacts[0].address).to eq("P.O. Box 30757") - expect(subject.registrant_contacts[0].city).to eq("Braamfontein") - expect(subject.registrant_contacts[0].state).to eq("Gauteng") - expect(subject.registrant_contacts[0].zip).to eq("2017") - expect(subject.registrant_contacts[0].country).to eq(nil) - expect(subject.registrant_contacts[0].country_code).to eq("ZA") - expect(subject.registrant_contacts[0].phone).to eq("+27.110186314") - expect(subject.registrant_contacts[0].fax).to eq("+27.113819583") - expect(subject.registrant_contacts[0].email).to eq("joelsonp@joburg.org.za") - expect(subject.registrant_contacts[0].created_on).to eq(nil) - expect(subject.registrant_contacts[0].updated_on).to eq(nil) - end - end - describe "#admin_contacts" do - it do - expect(subject.admin_contacts).to be_a(Array) - expect(subject.admin_contacts.size).to eq(1) - expect(subject.admin_contacts[0]).to be_a(Whois::Parser::Contact) - expect(subject.admin_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_ADMINISTRATIVE) - expect(subject.admin_contacts[0].id).to eq("zacr-a0c0379446") - expect(subject.admin_contacts[0].name).to eq("Joelson Pholoha") - expect(subject.admin_contacts[0].organization).to eq("") - expect(subject.admin_contacts[0].address).to eq("Private Bag X10013, Sandton, 2146") - expect(subject.admin_contacts[0].city).to eq("-") - expect(subject.admin_contacts[0].zip).to eq("") - expect(subject.admin_contacts[0].country).to eq(nil) - expect(subject.admin_contacts[0].country_code).to eq("--") - expect(subject.admin_contacts[0].phone).to eq("+27.110186314") - expect(subject.admin_contacts[0].fax).to eq("+27.113819583") - expect(subject.admin_contacts[0].email).to eq("Joelsonp@Joburg.org.za") - expect(subject.admin_contacts[0].created_on).to eq(nil) - expect(subject.admin_contacts[0].updated_on).to eq(nil) - end - end - describe "#technical_contacts" do - it do - expect(subject.technical_contacts).to be_a(Array) - expect(subject.technical_contacts.size).to eq(1) - expect(subject.technical_contacts[0]).to be_a(Whois::Parser::Contact) - expect(subject.technical_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_TECHNICAL) - expect(subject.technical_contacts[0].id).to eq("zacr-71fff5bce2") - expect(subject.technical_contacts[0].name).to eq("Eben Jacobs") - expect(subject.technical_contacts[0].organization).to eq("") - expect(subject.technical_contacts[0].address).to eq("Accounts Payable, Vida Building, Kabelweg 57, 1014 BA Amsterdam") - expect(subject.technical_contacts[0].city).to eq("-") - expect(subject.technical_contacts[0].zip).to eq("") - expect(subject.technical_contacts[0].country).to eq(nil) - expect(subject.technical_contacts[0].country_code).to eq("--") - expect(subject.technical_contacts[0].phone).to eq("+27.110186314") - expect(subject.technical_contacts[0].fax).to eq("+27.113819583") - expect(subject.technical_contacts[0].email).to eq("ebenj@joburg.org.za") - expect(subject.technical_contacts[0].created_on).to eq(nil) - expect(subject.technical_contacts[0].updated_on).to eq(nil) - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers.size).to eq(3) - expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[0].name).to eq("demeter.is.co.za") - expect(subject.nameservers[0].ipv4).to eq(nil) - expect(subject.nameservers[0].ipv6).to eq(nil) - expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[1].name).to eq("jupiter.is.co.za") - expect(subject.nameservers[1].ipv4).to eq(nil) - expect(subject.nameservers[1].ipv6).to eq(nil) - expect(subject.nameservers[2]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[2].name).to eq("titan.is.co.za") - expect(subject.nameservers[2].ipv4).to eq(nil) - expect(subject.nameservers[2].ipv6).to eq(nil) - end + it "matches status_registered.expected" do + expect(subject.domain).to eq("joburg.org.za") + expect(subject.domain_id).to eq("dom_8VP-9999") + expect(subject.status).to eq(:registered) + expect(subject.available?).to eq(false) + expect(subject.registered?).to eq(true) + expect(subject.created_on).to be_a(Time) + expect(subject.created_on).to eq(DateTime.parse("1997-10-03 09:46:34 UTC")) + expect(subject.updated_on).to be_a(Time) + expect(subject.updated_on).to eq(DateTime.parse("2015-02-05 08:45:51 UTC")) + expect(subject.expires_on).to be_a(Time) + expect(subject.expires_on).to eq(DateTime.parse("2999-12-31 21:59:59 UTC")) + expect(subject.registrar).to be_a(Whois::Parser::Registrar) + expect(subject.registrar.id).to eq("9999") + expect(subject.registrar.name).to eq("ZA Central Registry") + expect(subject.registrar.url).to eq(nil) + expect(subject.registrant_contacts).to be_a(Array) + expect(subject.registrant_contacts.size).to eq(1) + expect(subject.registrant_contacts[0]).to be_a(Whois::Parser::Contact) + expect(subject.registrant_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_REGISTRANT) + expect(subject.registrant_contacts[0].id).to eq("jobuRant") + expect(subject.registrant_contacts[0].name).to eq("City of Johannesburg Metropolitan Municipality") + expect(subject.registrant_contacts[0].organization).to eq("") + expect(subject.registrant_contacts[0].address).to eq("P.O. Box 30757") + expect(subject.registrant_contacts[0].city).to eq("Braamfontein") + expect(subject.registrant_contacts[0].state).to eq("Gauteng") + expect(subject.registrant_contacts[0].zip).to eq("2017") + expect(subject.registrant_contacts[0].country).to eq(nil) + expect(subject.registrant_contacts[0].country_code).to eq("ZA") + expect(subject.registrant_contacts[0].phone).to eq("+27.110186314") + expect(subject.registrant_contacts[0].fax).to eq("+27.113819583") + expect(subject.registrant_contacts[0].email).to eq("joelsonp@joburg.org.za") + expect(subject.registrant_contacts[0].created_on).to eq(nil) + expect(subject.registrant_contacts[0].updated_on).to eq(nil) + expect(subject.admin_contacts).to be_a(Array) + expect(subject.admin_contacts.size).to eq(1) + expect(subject.admin_contacts[0]).to be_a(Whois::Parser::Contact) + expect(subject.admin_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_ADMINISTRATIVE) + expect(subject.admin_contacts[0].id).to eq("zacr-a0c0379446") + expect(subject.admin_contacts[0].name).to eq("Joelson Pholoha") + expect(subject.admin_contacts[0].organization).to eq("") + expect(subject.admin_contacts[0].address).to eq("Private Bag X10013, Sandton, 2146") + expect(subject.admin_contacts[0].city).to eq("-") + expect(subject.admin_contacts[0].zip).to eq("") + expect(subject.admin_contacts[0].country).to eq(nil) + expect(subject.admin_contacts[0].country_code).to eq("--") + expect(subject.admin_contacts[0].phone).to eq("+27.110186314") + expect(subject.admin_contacts[0].fax).to eq("+27.113819583") + expect(subject.admin_contacts[0].email).to eq("Joelsonp@Joburg.org.za") + expect(subject.admin_contacts[0].created_on).to eq(nil) + expect(subject.admin_contacts[0].updated_on).to eq(nil) + expect(subject.technical_contacts).to be_a(Array) + expect(subject.technical_contacts.size).to eq(1) + expect(subject.technical_contacts[0]).to be_a(Whois::Parser::Contact) + expect(subject.technical_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_TECHNICAL) + expect(subject.technical_contacts[0].id).to eq("zacr-71fff5bce2") + expect(subject.technical_contacts[0].name).to eq("Eben Jacobs") + expect(subject.technical_contacts[0].organization).to eq("") + expect(subject.technical_contacts[0].address).to eq("Accounts Payable, Vida Building, Kabelweg 57, 1014 BA Amsterdam") + expect(subject.technical_contacts[0].city).to eq("-") + expect(subject.technical_contacts[0].zip).to eq("") + expect(subject.technical_contacts[0].country).to eq(nil) + expect(subject.technical_contacts[0].country_code).to eq("--") + expect(subject.technical_contacts[0].phone).to eq("+27.110186314") + expect(subject.technical_contacts[0].fax).to eq("+27.113819583") + expect(subject.technical_contacts[0].email).to eq("ebenj@joburg.org.za") + expect(subject.technical_contacts[0].created_on).to eq(nil) + expect(subject.technical_contacts[0].updated_on).to eq(nil) + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers.size).to eq(3) + expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[0].name).to eq("demeter.is.co.za") + expect(subject.nameservers[0].ipv4).to eq(nil) + expect(subject.nameservers[0].ipv6).to eq(nil) + expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[1].name).to eq("jupiter.is.co.za") + expect(subject.nameservers[1].ipv4).to eq(nil) + expect(subject.nameservers[1].ipv6).to eq(nil) + expect(subject.nameservers[2]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[2].name).to eq("titan.is.co.za") + expect(subject.nameservers[2].ipv4).to eq(nil) + expect(subject.nameservers[2].ipv6).to eq(nil) end end diff --git a/spec/whois/parsers/responses/tvwhois.verisign-grs.com/tv/property_nameserver_no_nameserver_spec.rb b/spec/whois/parsers/responses/tvwhois.verisign-grs.com/tv/property_nameserver_no_nameserver_spec.rb index b2aaa3ca..1150e89e 100644 --- a/spec/whois/parsers/responses/tvwhois.verisign-grs.com/tv/property_nameserver_no_nameserver_spec.rb +++ b/spec/whois/parsers/responses/tvwhois.verisign-grs.com/tv/property_nameserver_no_nameserver_spec.rb @@ -11,20 +11,17 @@ # require 'spec_helper' -require 'whois/parsers/tvwhois.verisign-grs.com.rb' -describe Whois::Parsers::TvwhoisVerisignGrsCom, "property_nameserver_no_nameserver.expected" do +describe "tvwhois.verisign-grs.com", :aggregate_failures do subject do file = fixture("responses", "tvwhois.verisign-grs.com/tv/property_nameserver_no_nameserver.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "tvwhois.verisign-grs.com") + Whois::Parser.parser_for(part) end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers).to eq([]) - end + it "matches property_nameserver_no_nameserver.expected" do + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers).to eq([]) end end diff --git a/spec/whois/parsers/responses/tvwhois.verisign-grs.com/tv/status_available_spec.rb b/spec/whois/parsers/responses/tvwhois.verisign-grs.com/tv/status_available_spec.rb index 75a19f61..5c5417f7 100644 --- a/spec/whois/parsers/responses/tvwhois.verisign-grs.com/tv/status_available_spec.rb +++ b/spec/whois/parsers/responses/tvwhois.verisign-grs.com/tv/status_available_spec.rb @@ -11,80 +11,29 @@ # require 'spec_helper' -require 'whois/parsers/tvwhois.verisign-grs.com.rb' -describe Whois::Parsers::TvwhoisVerisignGrsCom, "status_available.expected" do +describe "tvwhois.verisign-grs.com", :aggregate_failures do subject do file = fixture("responses", "tvwhois.verisign-grs.com/tv/status_available.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "tvwhois.verisign-grs.com") + Whois::Parser.parser_for(part) end - describe "#disclaimer" do - it do - expect(subject.disclaimer).to eq("TERMS OF USE: You are not authorized to access or query our Whois database through the use of electronic processes that are high-volume and automated except as reasonably necessary to register domain names or modify existing registrations; the Data in VeriSign's (\"VeriSign\") Whois database is provided by VeriSign for information purposes only, and to assist persons in obtaining information about or related to a domain name registration record. VeriSign does not guarantee its accuracy. By submitting a Whois query, you agree to abide by the following terms of use: You agree that you may use this Data only for lawful purposes and that under no circumstances will you use this Data to: (1) allow, enable, or otherwise support the transmission of mass unsolicited, commercial advertising or solicitations via e-mail, telephone, or facsimile; or (2) enable high volume, automated, electronic processes that apply to VeriSign (or its computer systems). The compilation, repackaging, dissemination or other use of this Data is expressly prohibited without the prior written consent of VeriSign. You agree not to use electronic processes that are automated and high-volume to access or query the Whois database except as reasonably necessary to register domain names or modify existing registrations. VeriSign reserves the right to restrict your access to the Whois database in its sole discretion to ensure operational stability. VeriSign may restrict or terminate your access to the Whois database for failure to abide by these terms of use. VeriSign reserves the right to modify these terms at any time.") - end - end - describe "#domain" do - it do - expect(subject.domain).to eq("u34jedzcq.tv") - end - end - describe "#domain_id" do - it do - expect(subject.domain_id).to eq(nil) - end - end - describe "#status" do - it do - expect(subject.status).to eq(:available) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(true) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(false) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to eq(nil) - end - end - describe "#updated_on" do - it do - expect(subject.updated_on).to eq(nil) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to eq(nil) - end - end - describe "#registrar" do - it do - expect(subject.registrar).to eq(nil) - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers).to eq([]) - end - end - describe "#referral_whois" do - it do - expect(subject.referral_whois).to eq(nil) - end - end - describe "#referral_url" do - it do - expect(subject.referral_url).to eq(nil) - end + it "matches status_available.expected" do + expect(subject.disclaimer).to eq("TERMS OF USE: You are not authorized to access or query our Whois database through the use of electronic processes that are high-volume and automated except as reasonably necessary to register domain names or modify existing registrations; the Data in VeriSign's (\"VeriSign\") Whois database is provided by VeriSign for information purposes only, and to assist persons in obtaining information about or related to a domain name registration record. VeriSign does not guarantee its accuracy. By submitting a Whois query, you agree to abide by the following terms of use: You agree that you may use this Data only for lawful purposes and that under no circumstances will you use this Data to: (1) allow, enable, or otherwise support the transmission of mass unsolicited, commercial advertising or solicitations via e-mail, telephone, or facsimile; or (2) enable high volume, automated, electronic processes that apply to VeriSign (or its computer systems). The compilation, repackaging, dissemination or other use of this Data is expressly prohibited without the prior written consent of VeriSign. You agree not to use electronic processes that are automated and high-volume to access or query the Whois database except as reasonably necessary to register domain names or modify existing registrations. VeriSign reserves the right to restrict your access to the Whois database in its sole discretion to ensure operational stability. VeriSign may restrict or terminate your access to the Whois database for failure to abide by these terms of use. VeriSign reserves the right to modify these terms at any time.") + expect(subject.domain).to eq("u34jedzcq.tv") + expect(subject.domain_id).to eq(nil) + expect(subject.status).to eq(:available) + expect(subject.available?).to eq(true) + expect(subject.registered?).to eq(false) + expect(subject.created_on).to eq(nil) + expect(subject.updated_on).to eq(nil) + expect(subject.expires_on).to eq(nil) + expect(subject.registrar).to eq(nil) + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers).to eq([]) + expect(subject.referral_whois).to eq(nil) + expect(subject.referral_url).to eq(nil) end end diff --git a/spec/whois/parsers/responses/tvwhois.verisign-grs.com/tv/status_registered_spec.rb b/spec/whois/parsers/responses/tvwhois.verisign-grs.com/tv/status_registered_spec.rb index e842ab20..04c50f0c 100644 --- a/spec/whois/parsers/responses/tvwhois.verisign-grs.com/tv/status_registered_spec.rb +++ b/spec/whois/parsers/responses/tvwhois.verisign-grs.com/tv/status_registered_spec.rb @@ -11,98 +11,47 @@ # require 'spec_helper' -require 'whois/parsers/tvwhois.verisign-grs.com.rb' -describe Whois::Parsers::TvwhoisVerisignGrsCom, "status_registered.expected" do +describe "tvwhois.verisign-grs.com", :aggregate_failures do subject do file = fixture("responses", "tvwhois.verisign-grs.com/tv/status_registered.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "tvwhois.verisign-grs.com") + Whois::Parser.parser_for(part) end - describe "#disclaimer" do - it do - expect(subject.disclaimer).to eq("TERMS OF USE: You are not authorized to access or query our Whois database through the use of electronic processes that are high-volume and automated except as reasonably necessary to register domain names or modify existing registrations; the Data in VeriSign's (\"VeriSign\") Whois database is provided by VeriSign for information purposes only, and to assist persons in obtaining information about or related to a domain name registration record. VeriSign does not guarantee its accuracy. By submitting a Whois query, you agree to abide by the following terms of use: You agree that you may use this Data only for lawful purposes and that under no circumstances will you use this Data to: (1) allow, enable, or otherwise support the transmission of mass unsolicited, commercial advertising or solicitations via e-mail, telephone, or facsimile; or (2) enable high volume, automated, electronic processes that apply to VeriSign (or its computer systems). The compilation, repackaging, dissemination or other use of this Data is expressly prohibited without the prior written consent of VeriSign. You agree not to use electronic processes that are automated and high-volume to access or query the Whois database except as reasonably necessary to register domain names or modify existing registrations. VeriSign reserves the right to restrict your access to the Whois database in its sole discretion to ensure operational stability. VeriSign may restrict or terminate your access to the Whois database for failure to abide by these terms of use. VeriSign reserves the right to modify these terms at any time.") - end - end - describe "#domain" do - it do - expect(subject.domain).to eq("google.tv") - end - end - describe "#domain_id" do - it do - expect(subject.domain_id).to eq("87196881_DOMAIN_TV-VRSN") - end - end - describe "#status" do - it do - expect(subject.status).to eq(:registered) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(false) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(true) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to be_a(Time) - expect(subject.created_on).to eq(DateTime.parse("2002-08-02 16:43:36 UTC")) - end - end - describe "#updated_on" do - it do - expect(subject.updated_on).to be_a(Time) - expect(subject.updated_on).to eq(DateTime.parse("2017-07-01 09:25:47 UTC")) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to be_a(Time) - expect(subject.expires_on).to eq(DateTime.parse("2018-08-02 16:43:36 UTC")) - end - end - describe "#registrar" do - it do - expect(subject.registrar).to be_a(Whois::Parser::Registrar) - expect(subject.registrar.id).to eq("292") - expect(subject.registrar.name).to eq("MARKMONITOR INC.") - expect(subject.registrar.url).to eq("http://www.markmonitor.com") - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers.size).to eq(3) - expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[0].name).to eq("ns1.google.com") - expect(subject.nameservers[0].ipv4).to eq(nil) - expect(subject.nameservers[0].ipv6).to eq(nil) - expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[1].name).to eq("ns2.google.com") - expect(subject.nameservers[1].ipv4).to eq(nil) - expect(subject.nameservers[1].ipv6).to eq(nil) - expect(subject.nameservers[2]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[2].name).to eq("ns3.google.com") - expect(subject.nameservers[2].ipv4).to eq(nil) - expect(subject.nameservers[2].ipv6).to eq(nil) - end - end - describe "#referral_whois" do - it do - expect(subject.referral_whois).to eq("whois.markmonitor.com") - end - end - describe "#referral_url" do - it do - expect(subject.referral_url).to eq("http://www.markmonitor.com") - end + it "matches status_registered.expected" do + expect(subject.disclaimer).to eq("TERMS OF USE: You are not authorized to access or query our Whois database through the use of electronic processes that are high-volume and automated except as reasonably necessary to register domain names or modify existing registrations; the Data in VeriSign's (\"VeriSign\") Whois database is provided by VeriSign for information purposes only, and to assist persons in obtaining information about or related to a domain name registration record. VeriSign does not guarantee its accuracy. By submitting a Whois query, you agree to abide by the following terms of use: You agree that you may use this Data only for lawful purposes and that under no circumstances will you use this Data to: (1) allow, enable, or otherwise support the transmission of mass unsolicited, commercial advertising or solicitations via e-mail, telephone, or facsimile; or (2) enable high volume, automated, electronic processes that apply to VeriSign (or its computer systems). The compilation, repackaging, dissemination or other use of this Data is expressly prohibited without the prior written consent of VeriSign. You agree not to use electronic processes that are automated and high-volume to access or query the Whois database except as reasonably necessary to register domain names or modify existing registrations. VeriSign reserves the right to restrict your access to the Whois database in its sole discretion to ensure operational stability. VeriSign may restrict or terminate your access to the Whois database for failure to abide by these terms of use. VeriSign reserves the right to modify these terms at any time.") + expect(subject.domain).to eq("google.tv") + expect(subject.domain_id).to eq("87196881_DOMAIN_TV-VRSN") + expect(subject.status).to eq(:registered) + expect(subject.available?).to eq(false) + expect(subject.registered?).to eq(true) + expect(subject.created_on).to be_a(Time) + expect(subject.created_on).to eq(DateTime.parse("2002-08-02 16:43:36 UTC")) + expect(subject.updated_on).to be_a(Time) + expect(subject.updated_on).to eq(DateTime.parse("2017-07-01 09:25:47 UTC")) + expect(subject.expires_on).to be_a(Time) + expect(subject.expires_on).to eq(DateTime.parse("2018-08-02 16:43:36 UTC")) + expect(subject.registrar).to be_a(Whois::Parser::Registrar) + expect(subject.registrar.id).to eq("292") + expect(subject.registrar.name).to eq("MARKMONITOR INC.") + expect(subject.registrar.url).to eq("http://www.markmonitor.com") + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers.size).to eq(3) + expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[0].name).to eq("ns1.google.com") + expect(subject.nameservers[0].ipv4).to eq(nil) + expect(subject.nameservers[0].ipv6).to eq(nil) + expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[1].name).to eq("ns2.google.com") + expect(subject.nameservers[1].ipv4).to eq(nil) + expect(subject.nameservers[1].ipv6).to eq(nil) + expect(subject.nameservers[2]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[2].name).to eq("ns3.google.com") + expect(subject.nameservers[2].ipv4).to eq(nil) + expect(subject.nameservers[2].ipv6).to eq(nil) + expect(subject.referral_whois).to eq("whois.markmonitor.com") + expect(subject.referral_url).to eq("http://www.markmonitor.com") end end diff --git a/spec/whois/parsers/responses/whois.1und1.info/status_available_spec.rb b/spec/whois/parsers/responses/whois.1und1.info/status_available_spec.rb index f1e1cd8a..177544d7 100644 --- a/spec/whois/parsers/responses/whois.1und1.info/status_available_spec.rb +++ b/spec/whois/parsers/responses/whois.1und1.info/status_available_spec.rb @@ -11,83 +11,32 @@ # require 'spec_helper' -require 'whois/parsers/whois.1und1.info.rb' -describe Whois::Parsers::Whois1und1Info, "status_available.expected" do +describe "whois.1und1.info", :aggregate_failures do subject do file = fixture("responses", "whois.1und1.info/status_available.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.1und1.info") + Whois::Parser.parser_for(part) end - describe "#domain" do - it do - expect(subject.domain).to eq("u34jedzcq.com") - end - end - describe "#domain_id" do - it do - expect(subject.domain_id).to eq(nil) - end - end - describe "#status" do - it do - expect(subject.status).to eq(:available) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(true) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(false) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to eq(nil) - end - end - describe "#updated_on" do - it do - expect(subject.updated_on).to eq(nil) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to eq(nil) - end - end - describe "#registrar" do - it do - expect(subject.registrar).to eq(nil) - end - end - describe "#registrant_contacts" do - it do - expect(subject.registrant_contacts).to be_a(Array) - expect(subject.registrant_contacts).to eq([]) - end - end - describe "#admin_contacts" do - it do - expect(subject.admin_contacts).to be_a(Array) - expect(subject.admin_contacts).to eq([]) - end - end - describe "#technical_contacts" do - it do - expect(subject.technical_contacts).to be_a(Array) - expect(subject.technical_contacts).to eq([]) - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers).to eq([]) - end + it "matches status_available.expected" do + expect(subject.domain).to eq("u34jedzcq.com") + expect(subject.domain_id).to eq(nil) + expect(subject.status).to eq(:available) + expect(subject.available?).to eq(true) + expect(subject.registered?).to eq(false) + expect(subject.created_on).to eq(nil) + expect(subject.updated_on).to eq(nil) + expect(subject.expires_on).to eq(nil) + expect(subject.registrar).to eq(nil) + expect(subject.registrant_contacts).to be_a(Array) + expect(subject.registrant_contacts).to eq([]) + expect(subject.admin_contacts).to be_a(Array) + expect(subject.admin_contacts).to eq([]) + expect(subject.technical_contacts).to be_a(Array) + expect(subject.technical_contacts).to eq([]) + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers).to eq([]) end end diff --git a/spec/whois/parsers/responses/whois.1und1.info/status_registered_spec.rb b/spec/whois/parsers/responses/whois.1und1.info/status_registered_spec.rb index 743a0fe1..3fa35fd3 100644 --- a/spec/whois/parsers/responses/whois.1und1.info/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.1und1.info/status_registered_spec.rb @@ -11,136 +11,85 @@ # require 'spec_helper' -require 'whois/parsers/whois.1und1.info.rb' -describe Whois::Parsers::Whois1und1Info, "status_registered.expected" do +describe "whois.1und1.info", :aggregate_failures do subject do file = fixture("responses", "whois.1und1.info/status_registered.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.1und1.info") + Whois::Parser.parser_for(part) end - describe "#domain" do - it do - expect(subject.domain).to eq("1und1.com") - end - end - describe "#domain_id" do - it do - expect(subject.domain_id).to eq(nil) - end - end - describe "#status" do - it do - expect(subject.status).to eq(:registered) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(false) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(true) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to be_a(Time) - expect(subject.created_on).to eq(DateTime.parse("1998-08-12 00:00:00")) - end - end - describe "#updated_on" do - it do - expect(subject.updated_on).to be_a(Time) - expect(subject.updated_on).to eq(DateTime.parse("2013-08-11 00:00:00")) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to be_a(Time) - expect(subject.expires_on).to eq(DateTime.parse("2014-08-11 00:00:00")) - end - end - describe "#registrar" do - it do - expect(subject.registrar).to be_a(Whois::Parser::Registrar) - expect(subject.registrar.id).to eq("83") - expect(subject.registrar.name).to eq("1&1 Internet AG") - expect(subject.registrar.url).to eq("http://1and1.com") - end - end - describe "#registrant_contacts" do - it do - expect(subject.registrant_contacts).to be_a(Array) - expect(subject.registrant_contacts.size).to eq(1) - expect(subject.registrant_contacts[0]).to be_a(Whois::Parser::Contact) - expect(subject.registrant_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_REGISTRANT) - expect(subject.registrant_contacts[0].id).to eq(nil) - expect(subject.registrant_contacts[0].name).to eq("Andreas Gauger") - expect(subject.registrant_contacts[0].organization).to eq("1&1 Internet AG") - expect(subject.registrant_contacts[0].address).to eq("Elgendorfer Strasse 57") - expect(subject.registrant_contacts[0].city).to eq("Montabaur") - expect(subject.registrant_contacts[0].zip).to eq("56410") - expect(subject.registrant_contacts[0].state).to eq("") - expect(subject.registrant_contacts[0].country_code).to eq("DE") - expect(subject.registrant_contacts[0].phone).to eq("+49.2602960") - expect(subject.registrant_contacts[0].fax).to eq("+49.72191374215") - expect(subject.registrant_contacts[0].email).to eq("hostmaster@1und1.com") - end - end - describe "#admin_contacts" do - it do - expect(subject.admin_contacts).to be_a(Array) - expect(subject.admin_contacts.size).to eq(1) - expect(subject.admin_contacts[0]).to be_a(Whois::Parser::Contact) - expect(subject.admin_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_ADMINISTRATIVE) - expect(subject.admin_contacts[0].id).to eq(nil) - expect(subject.admin_contacts[0].name).to eq("Andreas Gauger") - expect(subject.admin_contacts[0].organization).to eq("1&1 Internet AG") - expect(subject.admin_contacts[0].address).to eq("Elgendorfer Strasse 57") - expect(subject.admin_contacts[0].city).to eq("Montabaur") - expect(subject.admin_contacts[0].zip).to eq("56410") - expect(subject.admin_contacts[0].state).to eq("") - expect(subject.admin_contacts[0].country_code).to eq("DE") - expect(subject.admin_contacts[0].phone).to eq("+49.2602960") - expect(subject.admin_contacts[0].fax).to eq("+49.72191374215") - expect(subject.admin_contacts[0].email).to eq("hostmaster@1und1.com") - end - end - describe "#technical_contacts" do - it do - expect(subject.technical_contacts).to be_a(Array) - expect(subject.technical_contacts.size).to eq(1) - expect(subject.technical_contacts[0]).to be_a(Whois::Parser::Contact) - expect(subject.technical_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_TECHNICAL) - expect(subject.technical_contacts[0].id).to eq(nil) - expect(subject.technical_contacts[0].name).to eq("Andreas Gauger") - expect(subject.technical_contacts[0].organization).to eq("1&1 Internet AG") - expect(subject.technical_contacts[0].address).to eq("Elgendorfer Strasse 57") - expect(subject.technical_contacts[0].city).to eq("Montabaur") - expect(subject.technical_contacts[0].zip).to eq("56410") - expect(subject.technical_contacts[0].state).to eq("") - expect(subject.technical_contacts[0].country_code).to eq("DE") - expect(subject.technical_contacts[0].phone).to eq("+49.2602960") - expect(subject.technical_contacts[0].fax).to eq("+49.72191374215") - expect(subject.technical_contacts[0].email).to eq("hostmaster@1und1.com") - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers.size).to eq(4) - expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[0].name).to eq("ns-1and1.ui-dns.com") - expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[1].name).to eq("ns-1and1.ui-dns.org") - expect(subject.nameservers[2]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[2].name).to eq("ns-1and1.ui-dns.de") - expect(subject.nameservers[3]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[3].name).to eq("ns-1and1.ui-dns.biz") - end + it "matches status_registered.expected" do + expect(subject.domain).to eq("1und1.com") + expect(subject.domain_id).to eq(nil) + expect(subject.status).to eq(:registered) + expect(subject.available?).to eq(false) + expect(subject.registered?).to eq(true) + expect(subject.created_on).to be_a(Time) + expect(subject.created_on).to eq(DateTime.parse("1998-08-12 00:00:00")) + expect(subject.updated_on).to be_a(Time) + expect(subject.updated_on).to eq(DateTime.parse("2013-08-11 00:00:00")) + expect(subject.expires_on).to be_a(Time) + expect(subject.expires_on).to eq(DateTime.parse("2014-08-11 00:00:00")) + expect(subject.registrar).to be_a(Whois::Parser::Registrar) + expect(subject.registrar.id).to eq("83") + expect(subject.registrar.name).to eq("1&1 Internet AG") + expect(subject.registrar.url).to eq("http://1and1.com") + expect(subject.registrant_contacts).to be_a(Array) + expect(subject.registrant_contacts.size).to eq(1) + expect(subject.registrant_contacts[0]).to be_a(Whois::Parser::Contact) + expect(subject.registrant_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_REGISTRANT) + expect(subject.registrant_contacts[0].id).to eq(nil) + expect(subject.registrant_contacts[0].name).to eq("Andreas Gauger") + expect(subject.registrant_contacts[0].organization).to eq("1&1 Internet AG") + expect(subject.registrant_contacts[0].address).to eq("Elgendorfer Strasse 57") + expect(subject.registrant_contacts[0].city).to eq("Montabaur") + expect(subject.registrant_contacts[0].zip).to eq("56410") + expect(subject.registrant_contacts[0].state).to eq("") + expect(subject.registrant_contacts[0].country_code).to eq("DE") + expect(subject.registrant_contacts[0].phone).to eq("+49.2602960") + expect(subject.registrant_contacts[0].fax).to eq("+49.72191374215") + expect(subject.registrant_contacts[0].email).to eq("hostmaster@1und1.com") + expect(subject.admin_contacts).to be_a(Array) + expect(subject.admin_contacts.size).to eq(1) + expect(subject.admin_contacts[0]).to be_a(Whois::Parser::Contact) + expect(subject.admin_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_ADMINISTRATIVE) + expect(subject.admin_contacts[0].id).to eq(nil) + expect(subject.admin_contacts[0].name).to eq("Andreas Gauger") + expect(subject.admin_contacts[0].organization).to eq("1&1 Internet AG") + expect(subject.admin_contacts[0].address).to eq("Elgendorfer Strasse 57") + expect(subject.admin_contacts[0].city).to eq("Montabaur") + expect(subject.admin_contacts[0].zip).to eq("56410") + expect(subject.admin_contacts[0].state).to eq("") + expect(subject.admin_contacts[0].country_code).to eq("DE") + expect(subject.admin_contacts[0].phone).to eq("+49.2602960") + expect(subject.admin_contacts[0].fax).to eq("+49.72191374215") + expect(subject.admin_contacts[0].email).to eq("hostmaster@1und1.com") + expect(subject.technical_contacts).to be_a(Array) + expect(subject.technical_contacts.size).to eq(1) + expect(subject.technical_contacts[0]).to be_a(Whois::Parser::Contact) + expect(subject.technical_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_TECHNICAL) + expect(subject.technical_contacts[0].id).to eq(nil) + expect(subject.technical_contacts[0].name).to eq("Andreas Gauger") + expect(subject.technical_contacts[0].organization).to eq("1&1 Internet AG") + expect(subject.technical_contacts[0].address).to eq("Elgendorfer Strasse 57") + expect(subject.technical_contacts[0].city).to eq("Montabaur") + expect(subject.technical_contacts[0].zip).to eq("56410") + expect(subject.technical_contacts[0].state).to eq("") + expect(subject.technical_contacts[0].country_code).to eq("DE") + expect(subject.technical_contacts[0].phone).to eq("+49.2602960") + expect(subject.technical_contacts[0].fax).to eq("+49.72191374215") + expect(subject.technical_contacts[0].email).to eq("hostmaster@1und1.com") + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers.size).to eq(4) + expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[0].name).to eq("ns-1and1.ui-dns.com") + expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[1].name).to eq("ns-1and1.ui-dns.org") + expect(subject.nameservers[2]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[2].name).to eq("ns-1and1.ui-dns.de") + expect(subject.nameservers[3]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[3].name).to eq("ns-1and1.ui-dns.biz") end end diff --git a/spec/whois/parsers/responses/whois.35.com/status_registered_spec.rb b/spec/whois/parsers/responses/whois.35.com/status_registered_spec.rb index be781ac1..98ac6a4f 100644 --- a/spec/whois/parsers/responses/whois.35.com/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.35.com/status_registered_spec.rb @@ -11,129 +11,86 @@ # require 'spec_helper' -require 'whois/parsers/whois.35.com.rb' -describe Whois::Parsers::Whois35Com, "status_registered.expected" do +describe "whois.35.com", :aggregate_failures do subject do file = fixture("responses", "whois.35.com/status_registered.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.35.com") + Whois::Parser.parser_for(part) end - describe "#status" do - it do - expect(subject.status).to eq(:registered) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(false) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(true) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to be_a(Time) - expect(subject.created_on).to eq(DateTime.parse("2010-09-10")) - end - end - describe "#updated_on" do - it do - expect(subject.updated_on).to be_a(Time) - expect(subject.updated_on).to eq(DateTime.parse("2014-08-21 23:48:59")) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to be_a(Time) - expect(subject.expires_on).to eq(DateTime.parse("2015-09-10")) - end - end - describe "#registrar" do - it do - expect(subject.registrar).to be_a(Whois::Parser::Registrar) - expect(subject.registrar.id).to eq("1316") - expect(subject.registrar.name).to eq("35 Technology Co., Ltd.") - expect(subject.registrar.url).to eq("http://www.35.com") - end - end - describe "#registrant_contacts" do - it do - expect(subject.registrant_contacts).to be_a(Array) - expect(subject.registrant_contacts.size).to eq(1) - expect(subject.registrant_contacts[0]).to be_a(Whois::Parser::Contact) - expect(subject.registrant_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_REGISTRANT) - expect(subject.registrant_contacts[0].id).to eq(nil) - expect(subject.registrant_contacts[0].name).to eq("baolei") - expect(subject.registrant_contacts[0].organization).to eq("jiaxing zhongwang ad co.,ltd.") - expect(subject.registrant_contacts[0].address).to eq("126# jiyang rd.") - expect(subject.registrant_contacts[0].city).to eq("jiaxing") - expect(subject.registrant_contacts[0].zip).to eq("314000") - expect(subject.registrant_contacts[0].state).to eq("zhejiang") - expect(subject.registrant_contacts[0].country).to eq(nil) - expect(subject.registrant_contacts[0].country_code).to eq("CN") - expect(subject.registrant_contacts[0].phone).to eq("+86.57382033533") - expect(subject.registrant_contacts[0].fax).to eq("+86.57382033533") - expect(subject.registrant_contacts[0].email).to eq("aaa@zjcf.com") - end - end - describe "#admin_contacts" do - it do - expect(subject.admin_contacts).to be_a(Array) - expect(subject.admin_contacts.size).to eq(1) - expect(subject.admin_contacts[0]).to be_a(Whois::Parser::Contact) - expect(subject.admin_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_ADMINISTRATIVE) - expect(subject.admin_contacts[0].id).to eq(nil) - expect(subject.admin_contacts[0].name).to eq("baolei") - expect(subject.admin_contacts[0].organization).to eq("jiaxing zhongwang ad co.,ltd.") - expect(subject.admin_contacts[0].address).to eq("126# jiyang rd.") - expect(subject.admin_contacts[0].city).to eq("jiaxing") - expect(subject.admin_contacts[0].zip).to eq("314000") - expect(subject.admin_contacts[0].state).to eq("zhejiang") - expect(subject.admin_contacts[0].country).to eq(nil) - expect(subject.admin_contacts[0].country_code).to eq("CN") - expect(subject.admin_contacts[0].phone).to eq("+86.57382033533") - expect(subject.admin_contacts[0].fax).to eq("+86.57382033533") - expect(subject.admin_contacts[0].email).to eq("aaa@zjcf.com") - end - end - describe "#technical_contacts" do - it do - expect(subject.technical_contacts).to be_a(Array) - expect(subject.technical_contacts.size).to eq(1) - expect(subject.technical_contacts[0]).to be_a(Whois::Parser::Contact) - expect(subject.technical_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_TECHNICAL) - expect(subject.technical_contacts[0].id).to eq(nil) - expect(subject.technical_contacts[0].name).to eq("baolei") - expect(subject.technical_contacts[0].organization).to eq("jiaxing zhongwang ad co.,ltd.") - expect(subject.technical_contacts[0].address).to eq("126# jiyang rd.") - expect(subject.technical_contacts[0].city).to eq("jiaxing") - expect(subject.technical_contacts[0].zip).to eq("314000") - expect(subject.technical_contacts[0].state).to eq("zhejiang") - expect(subject.technical_contacts[0].country).to eq(nil) - expect(subject.technical_contacts[0].country_code).to eq("CN") - expect(subject.technical_contacts[0].phone).to eq("+86.57382033533") - expect(subject.technical_contacts[0].fax).to eq("+86.57382033533") - expect(subject.technical_contacts[0].email).to eq("aaa@zjcf.com") - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers.size).to eq(2) - expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[0].name).to eq("ns3.dns-diy.com") - expect(subject.nameservers[0].ipv4).to eq(nil) - expect(subject.nameservers[0].ipv6).to eq(nil) - expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[1].name).to eq("ns4.dns-diy.com") - expect(subject.nameservers[1].ipv4).to eq(nil) - expect(subject.nameservers[1].ipv6).to eq(nil) - end + it "matches status_registered.expected" do + expect(subject.status).to eq(:registered) + expect(subject.available?).to eq(false) + expect(subject.registered?).to eq(true) + expect(subject.created_on).to be_a(Time) + expect(subject.created_on).to eq(DateTime.parse("2010-09-10")) + expect(subject.updated_on).to be_a(Time) + expect(subject.updated_on).to eq(DateTime.parse("2014-08-21 23:48:59")) + expect(subject.expires_on).to be_a(Time) + expect(subject.expires_on).to eq(DateTime.parse("2015-09-10")) + expect(subject.registrar).to be_a(Whois::Parser::Registrar) + expect(subject.registrar.id).to eq("1316") + expect(subject.registrar.name).to eq("35 Technology Co., Ltd.") + expect(subject.registrar.url).to eq("http://www.35.com") + expect(subject.registrant_contacts).to be_a(Array) + expect(subject.registrant_contacts.size).to eq(1) + expect(subject.registrant_contacts[0]).to be_a(Whois::Parser::Contact) + expect(subject.registrant_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_REGISTRANT) + expect(subject.registrant_contacts[0].id).to eq(nil) + expect(subject.registrant_contacts[0].name).to eq("baolei") + expect(subject.registrant_contacts[0].organization).to eq("jiaxing zhongwang ad co.,ltd.") + expect(subject.registrant_contacts[0].address).to eq("126# jiyang rd.") + expect(subject.registrant_contacts[0].city).to eq("jiaxing") + expect(subject.registrant_contacts[0].zip).to eq("314000") + expect(subject.registrant_contacts[0].state).to eq("zhejiang") + expect(subject.registrant_contacts[0].country).to eq(nil) + expect(subject.registrant_contacts[0].country_code).to eq("CN") + expect(subject.registrant_contacts[0].phone).to eq("+86.57382033533") + expect(subject.registrant_contacts[0].fax).to eq("+86.57382033533") + expect(subject.registrant_contacts[0].email).to eq("aaa@zjcf.com") + expect(subject.admin_contacts).to be_a(Array) + expect(subject.admin_contacts.size).to eq(1) + expect(subject.admin_contacts[0]).to be_a(Whois::Parser::Contact) + expect(subject.admin_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_ADMINISTRATIVE) + expect(subject.admin_contacts[0].id).to eq(nil) + expect(subject.admin_contacts[0].name).to eq("baolei") + expect(subject.admin_contacts[0].organization).to eq("jiaxing zhongwang ad co.,ltd.") + expect(subject.admin_contacts[0].address).to eq("126# jiyang rd.") + expect(subject.admin_contacts[0].city).to eq("jiaxing") + expect(subject.admin_contacts[0].zip).to eq("314000") + expect(subject.admin_contacts[0].state).to eq("zhejiang") + expect(subject.admin_contacts[0].country).to eq(nil) + expect(subject.admin_contacts[0].country_code).to eq("CN") + expect(subject.admin_contacts[0].phone).to eq("+86.57382033533") + expect(subject.admin_contacts[0].fax).to eq("+86.57382033533") + expect(subject.admin_contacts[0].email).to eq("aaa@zjcf.com") + expect(subject.technical_contacts).to be_a(Array) + expect(subject.technical_contacts.size).to eq(1) + expect(subject.technical_contacts[0]).to be_a(Whois::Parser::Contact) + expect(subject.technical_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_TECHNICAL) + expect(subject.technical_contacts[0].id).to eq(nil) + expect(subject.technical_contacts[0].name).to eq("baolei") + expect(subject.technical_contacts[0].organization).to eq("jiaxing zhongwang ad co.,ltd.") + expect(subject.technical_contacts[0].address).to eq("126# jiyang rd.") + expect(subject.technical_contacts[0].city).to eq("jiaxing") + expect(subject.technical_contacts[0].zip).to eq("314000") + expect(subject.technical_contacts[0].state).to eq("zhejiang") + expect(subject.technical_contacts[0].country).to eq(nil) + expect(subject.technical_contacts[0].country_code).to eq("CN") + expect(subject.technical_contacts[0].phone).to eq("+86.57382033533") + expect(subject.technical_contacts[0].fax).to eq("+86.57382033533") + expect(subject.technical_contacts[0].email).to eq("aaa@zjcf.com") + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers.size).to eq(2) + expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[0].name).to eq("ns3.dns-diy.com") + expect(subject.nameservers[0].ipv4).to eq(nil) + expect(subject.nameservers[0].ipv6).to eq(nil) + expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[1].name).to eq("ns4.dns-diy.com") + expect(subject.nameservers[1].ipv4).to eq(nil) + expect(subject.nameservers[1].ipv6).to eq(nil) end end diff --git a/spec/whois/parsers/responses/whois.aeda.net.ae/ae/status_available_spec.rb b/spec/whois/parsers/responses/whois.aeda.net.ae/ae/status_available_spec.rb index a32d107c..37d56f73 100644 --- a/spec/whois/parsers/responses/whois.aeda.net.ae/ae/status_available_spec.rb +++ b/spec/whois/parsers/responses/whois.aeda.net.ae/ae/status_available_spec.rb @@ -11,50 +11,23 @@ # require 'spec_helper' -require 'whois/parsers/whois.aeda.net.ae.rb' -describe Whois::Parsers::WhoisAedaNetAe, "status_available.expected" do +describe "whois.aeda.net.ae", :aggregate_failures do subject do file = fixture("responses", "whois.aeda.net.ae/ae/status_available.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.aeda.net.ae") + Whois::Parser.parser_for(part) end - describe "#status" do - it do - expect(subject.status).to eq(:available) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(true) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(false) - end - end - describe "#created_on" do - it do - expect { subject.created_on }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#updated_on" do - it do - expect { subject.updated_on }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#expires_on" do - it do - expect { subject.expires_on }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers).to eq([]) - end + it "matches status_available.expected" do + expect(subject.status).to eq(:available) + expect(subject.available?).to eq(true) + expect(subject.registered?).to eq(false) + expect { subject.created_on }.to raise_error(Whois::AttributeNotSupported) + expect { subject.updated_on }.to raise_error(Whois::AttributeNotSupported) + expect { subject.expires_on }.to raise_error(Whois::AttributeNotSupported) + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers).to eq([]) end end diff --git a/spec/whois/parsers/responses/whois.aeda.net.ae/ae/status_registered_spec.rb b/spec/whois/parsers/responses/whois.aeda.net.ae/ae/status_registered_spec.rb index a4179bde..1788528b 100644 --- a/spec/whois/parsers/responses/whois.aeda.net.ae/ae/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.aeda.net.ae/ae/status_registered_spec.rb @@ -11,54 +11,27 @@ # require 'spec_helper' -require 'whois/parsers/whois.aeda.net.ae.rb' -describe Whois::Parsers::WhoisAedaNetAe, "status_registered.expected" do +describe "whois.aeda.net.ae", :aggregate_failures do subject do file = fixture("responses", "whois.aeda.net.ae/ae/status_registered.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.aeda.net.ae") + Whois::Parser.parser_for(part) end - describe "#status" do - it do - expect(subject.status).to eq(:registered) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(false) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(true) - end - end - describe "#created_on" do - it do - expect { subject.created_on }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#updated_on" do - it do - expect { subject.updated_on }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#expires_on" do - it do - expect { subject.expires_on }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers.size).to eq(2) - expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[0].name).to eq("ns1.google.com") - expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[1].name).to eq("ns2.google.com") - end + it "matches status_registered.expected" do + expect(subject.status).to eq(:registered) + expect(subject.available?).to eq(false) + expect(subject.registered?).to eq(true) + expect { subject.created_on }.to raise_error(Whois::AttributeNotSupported) + expect { subject.updated_on }.to raise_error(Whois::AttributeNotSupported) + expect { subject.expires_on }.to raise_error(Whois::AttributeNotSupported) + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers.size).to eq(2) + expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[0].name).to eq("ns1.google.com") + expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[1].name).to eq("ns2.google.com") end end diff --git a/spec/whois/parsers/responses/whois.aero/status_available_spec.rb b/spec/whois/parsers/responses/whois.aero/status_available_spec.rb index 36f4c8d7..23751ea0 100644 --- a/spec/whois/parsers/responses/whois.aero/status_available_spec.rb +++ b/spec/whois/parsers/responses/whois.aero/status_available_spec.rb @@ -11,93 +11,34 @@ # require 'spec_helper' -require 'whois/parsers/whois.aero.rb' -describe Whois::Parsers::WhoisAero, "status_available.expected" do +describe "whois.aero", :aggregate_failures do subject do file = fixture("responses", "whois.aero/status_available.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.aero") + Whois::Parser.parser_for(part) end - describe "#disclaimer" do - it do - expect(subject.disclaimer).to eq("Access to WHOIS information is provided to assist persons in determining the contents of a domain name registration record in the registry database. The data in this record is provided by The Registry Operator for informational purposes only, and accuracy is not guaranteed. 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. Registry Operator reserves the right to modify these terms at any time. By submitting this query, you agree to abide by this policy. The Registrar of Record identified in this output may have an RDDS service that can be queried for additional information on how to contact the Registrant, Admin, or Tech contact of the queried domain name.") - end - end - describe "#domain" do - it do - expect(subject.domain).to eq(nil) - end - end - describe "#domain_id" do - it do - expect(subject.domain_id).to eq(nil) - end - end - describe "#status" do - it do - expect(subject.status).to eq([]) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(true) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(false) - end - end - describe "#reserved?" do - it do - expect(subject.reserved?).to eq(false) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to eq(nil) - end - end - describe "#updated_on" do - it do - expect(subject.updated_on).to eq(nil) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to eq(nil) - end - end - describe "#registrar" do - it do - expect(subject.registrar).to eq(nil) - end - end - describe "#registrant_contacts" do - it do - expect(subject.registrant_contacts).to be_a(Array) - expect(subject.registrant_contacts).to eq([]) - end - end - describe "#admin_contacts" do - it do - expect(subject.admin_contacts).to be_a(Array) - expect(subject.admin_contacts).to eq([]) - end - end - describe "#technical_contacts" do - it do - expect(subject.technical_contacts).to be_a(Array) - expect(subject.technical_contacts).to eq([]) - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers).to eq([]) - end + it "matches status_available.expected" do + expect(subject.disclaimer).to eq("Access to WHOIS information is provided to assist persons in determining the contents of a domain name registration record in the registry database. The data in this record is provided by The Registry Operator for informational purposes only, and accuracy is not guaranteed. 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. Registry Operator reserves the right to modify these terms at any time. By submitting this query, you agree to abide by this policy. The Registrar of Record identified in this output may have an RDDS service that can be queried for additional information on how to contact the Registrant, Admin, or Tech contact of the queried domain name.") + expect(subject.domain).to eq(nil) + expect(subject.domain_id).to eq(nil) + expect(subject.status).to eq([]) + expect(subject.available?).to eq(true) + expect(subject.registered?).to eq(false) + expect(subject.reserved?).to eq(false) + expect(subject.created_on).to eq(nil) + expect(subject.updated_on).to eq(nil) + expect(subject.expires_on).to eq(nil) + expect(subject.registrar).to eq(nil) + expect(subject.registrant_contacts).to be_a(Array) + expect(subject.registrant_contacts).to eq([]) + expect(subject.admin_contacts).to be_a(Array) + expect(subject.admin_contacts).to eq([]) + expect(subject.technical_contacts).to be_a(Array) + expect(subject.technical_contacts).to eq([]) + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers).to eq([]) end end diff --git a/spec/whois/parsers/responses/whois.aero/status_registered_spec.rb b/spec/whois/parsers/responses/whois.aero/status_registered_spec.rb index 26c68bb2..d5f6a7db 100644 --- a/spec/whois/parsers/responses/whois.aero/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.aero/status_registered_spec.rb @@ -11,120 +11,61 @@ # require 'spec_helper' -require 'whois/parsers/whois.aero.rb' -describe Whois::Parsers::WhoisAero, "status_registered.expected" do +describe "whois.aero", :aggregate_failures do subject do file = fixture("responses", "whois.aero/status_registered.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.aero") + Whois::Parser.parser_for(part) end - describe "#disclaimer" do - it do - expect(subject.disclaimer).to eq("Access to WHOIS information is provided to assist persons in determining the contents of a domain name registration record in the registry database. The data in this record is provided by The Registry Operator for informational purposes only, and accuracy is not guaranteed. 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. Registry Operator reserves the right to modify these terms at any time. By submitting this query, you agree to abide by this policy. The Registrar of Record identified in this output may have an RDDS service that can be queried for additional information on how to contact the Registrant, Admin, or Tech contact of the queried domain name.") - end - end - describe "#domain" do - it do - expect(subject.domain).to eq("srilankan.aero") - end - end - describe "#domain_id" do - it do - expect(subject.domain_id).to eq("D108300000000000246-AGRS") - end - end - describe "#status" do - it do - expect(subject.status).to eq(["clientTransferProhibited https://icann.org/epp#clientTransferProhibited"]) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(false) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(true) - end - end - describe "#reserved?" do - it do - expect(subject.reserved?).to eq(false) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to be_a(Time) - expect(subject.created_on).to eq(DateTime.parse("2002-03-26 06:48:27 UTC")) - end - end - describe "#updated_on" do - it do - expect(subject.updated_on).to be_a(Time) - expect(subject.updated_on).to eq(DateTime.parse("2021-01-08 12:04:52 UTC")) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to be_a(Time) - expect(subject.expires_on).to eq(DateTime.parse("2022-03-26 06:48:27 UTC")) - end - end - describe "#registrar" do - it do - expect(subject.registrar).to be_a(Whois::Parser::Registrar) - expect(subject.registrar.id).to eq("380") - expect(subject.registrar.name).to eq("Tuonome.it.srl d/b/a APIsrs.com") - expect(subject.registrar.url).to eq("") - end - end - describe "#registrant_contacts" do - it do - expect(subject.registrant_contacts).to be_a(Array) - expect(subject.registrant_contacts.size).to eq(1) - expect(subject.registrant_contacts[0]).to be_a(Whois::Parser::Contact) - expect(subject.registrant_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_REGISTRANT) - expect(subject.registrant_contacts[0].id).to eq(nil) - expect(subject.registrant_contacts[0].name).to eq(nil) - expect(subject.registrant_contacts[0].organization).to eq("SriLankan Airlines Ltd") - expect(subject.registrant_contacts[0].address).to eq(nil) - expect(subject.registrant_contacts[0].city).to eq(nil) - expect(subject.registrant_contacts[0].zip).to eq(nil) - expect(subject.registrant_contacts[0].state).to eq("WP") - expect(subject.registrant_contacts[0].country_code).to eq("LK") - expect(subject.registrant_contacts[0].phone).to eq(nil) - expect(subject.registrant_contacts[0].fax).to eq(nil) - expect(subject.registrant_contacts[0].email).to eq(nil) - end - end - describe "#admin_contacts" do - it do - expect(subject.admin_contacts).to be_a(Array) - expect(subject.admin_contacts.size).to eq(0) - end - end - describe "#technical_contacts" do - it do - expect(subject.technical_contacts).to be_a(Array) - expect(subject.technical_contacts.size).to eq(0) - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers.size).to eq(4) - expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[0].name).to eq("ns-1046.awsdns-02.org") - expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[1].name).to eq("ns-2011.awsdns-59.co.uk") - expect(subject.nameservers[2]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[2].name).to eq("ns-133.awsdns-16.com") - expect(subject.nameservers[3]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[3].name).to eq("ns-877.awsdns-45.net") - end + it "matches status_registered.expected" do + expect(subject.disclaimer).to eq("Access to WHOIS information is provided to assist persons in determining the contents of a domain name registration record in the registry database. The data in this record is provided by The Registry Operator for informational purposes only, and accuracy is not guaranteed. 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. Registry Operator reserves the right to modify these terms at any time. By submitting this query, you agree to abide by this policy. The Registrar of Record identified in this output may have an RDDS service that can be queried for additional information on how to contact the Registrant, Admin, or Tech contact of the queried domain name.") + expect(subject.domain).to eq("srilankan.aero") + expect(subject.domain_id).to eq("D108300000000000246-AGRS") + expect(subject.status).to eq(["clientTransferProhibited https://icann.org/epp#clientTransferProhibited"]) + expect(subject.available?).to eq(false) + expect(subject.registered?).to eq(true) + expect(subject.reserved?).to eq(false) + expect(subject.created_on).to be_a(Time) + expect(subject.created_on).to eq(DateTime.parse("2002-03-26 06:48:27 UTC")) + expect(subject.updated_on).to be_a(Time) + expect(subject.updated_on).to eq(DateTime.parse("2021-01-08 12:04:52 UTC")) + expect(subject.expires_on).to be_a(Time) + expect(subject.expires_on).to eq(DateTime.parse("2022-03-26 06:48:27 UTC")) + expect(subject.registrar).to be_a(Whois::Parser::Registrar) + expect(subject.registrar.id).to eq("380") + expect(subject.registrar.name).to eq("Tuonome.it.srl d/b/a APIsrs.com") + expect(subject.registrar.url).to eq("") + expect(subject.registrant_contacts).to be_a(Array) + expect(subject.registrant_contacts.size).to eq(1) + expect(subject.registrant_contacts[0]).to be_a(Whois::Parser::Contact) + expect(subject.registrant_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_REGISTRANT) + expect(subject.registrant_contacts[0].id).to eq(nil) + expect(subject.registrant_contacts[0].name).to eq(nil) + expect(subject.registrant_contacts[0].organization).to eq("SriLankan Airlines Ltd") + expect(subject.registrant_contacts[0].address).to eq(nil) + expect(subject.registrant_contacts[0].city).to eq(nil) + expect(subject.registrant_contacts[0].zip).to eq(nil) + expect(subject.registrant_contacts[0].state).to eq("WP") + expect(subject.registrant_contacts[0].country_code).to eq("LK") + expect(subject.registrant_contacts[0].phone).to eq(nil) + expect(subject.registrant_contacts[0].fax).to eq(nil) + expect(subject.registrant_contacts[0].email).to eq(nil) + expect(subject.admin_contacts).to be_a(Array) + expect(subject.admin_contacts.size).to eq(0) + expect(subject.technical_contacts).to be_a(Array) + expect(subject.technical_contacts.size).to eq(0) + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers.size).to eq(4) + expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[0].name).to eq("ns-1046.awsdns-02.org") + expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[1].name).to eq("ns-2011.awsdns-59.co.uk") + expect(subject.nameservers[2]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[2].name).to eq("ns-133.awsdns-16.com") + expect(subject.nameservers[3]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[3].name).to eq("ns-877.awsdns-45.net") end end diff --git a/spec/whois/parsers/responses/whois.aero/status_reserved_spec.rb b/spec/whois/parsers/responses/whois.aero/status_reserved_spec.rb index ea3344f3..35c450c5 100644 --- a/spec/whois/parsers/responses/whois.aero/status_reserved_spec.rb +++ b/spec/whois/parsers/responses/whois.aero/status_reserved_spec.rb @@ -11,93 +11,34 @@ # require 'spec_helper' -require 'whois/parsers/whois.aero.rb' -describe Whois::Parsers::WhoisAero, "status_reserved.expected" do +describe "whois.aero", :aggregate_failures do subject do file = fixture("responses", "whois.aero/status_reserved.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.aero") + Whois::Parser.parser_for(part) end - describe "#disclaimer" do - it do - expect(subject.disclaimer).to eq("Access to WHOIS information is provided to assist persons in determining the contents of a domain name registration record in the registry database. The data in this record is provided by The Registry Operator for informational purposes only, and accuracy is not guaranteed. 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. Registry Operator reserves the right to modify these terms at any time. By submitting this query, you agree to abide by this policy. The Registrar of Record identified in this output may have an RDDS service that can be queried for additional information on how to contact the Registrant, Admin, or Tech contact of the queried domain name.") - end - end - describe "#domain" do - it do - expect(subject.domain).to eq(nil) - end - end - describe "#domain_id" do - it do - expect(subject.domain_id).to eq(nil) - end - end - describe "#status" do - it do - expect(subject.status).to eq(:reserved) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(false) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(true) - end - end - describe "#reserved?" do - it do - expect(subject.reserved?).to eq(true) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to eq(nil) - end - end - describe "#updated_on" do - it do - expect(subject.updated_on).to eq(nil) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to eq(nil) - end - end - describe "#registrar" do - it do - expect(subject.registrar).to eq(nil) - end - end - describe "#registrant_contacts" do - it do - expect(subject.registrant_contacts).to be_a(Array) - expect(subject.registrant_contacts).to eq([]) - end - end - describe "#admin_contacts" do - it do - expect(subject.admin_contacts).to be_a(Array) - expect(subject.admin_contacts).to eq([]) - end - end - describe "#technical_contacts" do - it do - expect(subject.technical_contacts).to be_a(Array) - expect(subject.technical_contacts).to eq([]) - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers).to eq([]) - end + it "matches status_reserved.expected" do + expect(subject.disclaimer).to eq("Access to WHOIS information is provided to assist persons in determining the contents of a domain name registration record in the registry database. The data in this record is provided by The Registry Operator for informational purposes only, and accuracy is not guaranteed. 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. Registry Operator reserves the right to modify these terms at any time. By submitting this query, you agree to abide by this policy. The Registrar of Record identified in this output may have an RDDS service that can be queried for additional information on how to contact the Registrant, Admin, or Tech contact of the queried domain name.") + expect(subject.domain).to eq(nil) + expect(subject.domain_id).to eq(nil) + expect(subject.status).to eq(:reserved) + expect(subject.available?).to eq(false) + expect(subject.registered?).to eq(true) + expect(subject.reserved?).to eq(true) + expect(subject.created_on).to eq(nil) + expect(subject.updated_on).to eq(nil) + expect(subject.expires_on).to eq(nil) + expect(subject.registrar).to eq(nil) + expect(subject.registrant_contacts).to be_a(Array) + expect(subject.registrant_contacts).to eq([]) + expect(subject.admin_contacts).to be_a(Array) + expect(subject.admin_contacts).to eq([]) + expect(subject.technical_contacts).to be_a(Array) + expect(subject.technical_contacts).to eq([]) + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers).to eq([]) end end diff --git a/spec/whois/parsers/responses/whois.afilias-grs.info/bz/status_available_spec.rb b/spec/whois/parsers/responses/whois.afilias-grs.info/bz/status_available_spec.rb index 4d847d1a..6206e3a2 100644 --- a/spec/whois/parsers/responses/whois.afilias-grs.info/bz/status_available_spec.rb +++ b/spec/whois/parsers/responses/whois.afilias-grs.info/bz/status_available_spec.rb @@ -11,88 +11,33 @@ # require 'spec_helper' -require 'whois/parsers/whois.afilias-grs.info.rb' -describe Whois::Parsers::WhoisAfiliasGrsInfo, "status_available.expected" do +describe "whois.afilias-grs.info", :aggregate_failures do subject do file = fixture("responses", "whois.afilias-grs.info/bz/status_available.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.afilias-grs.info") + Whois::Parser.parser_for(part) end - describe "#disclaimer" do - it do - expect(subject.disclaimer).to eq(nil) - end - end - describe "#domain" do - it do - expect(subject.domain).to eq(nil) - end - end - describe "#domain_id" do - it do - expect(subject.domain_id).to eq(nil) - end - end - describe "#status" do - it do - expect(subject.status).to eq([]) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(true) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(false) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to eq(nil) - end - end - describe "#updated_on" do - it do - expect(subject.updated_on).to eq(nil) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to eq(nil) - end - end - describe "#registrar" do - it do - expect(subject.registrar).to eq(nil) - end - end - describe "#registrant_contacts" do - it do - expect(subject.registrant_contacts).to be_a(Array) - expect(subject.registrant_contacts).to eq([]) - end - end - describe "#admin_contacts" do - it do - expect(subject.admin_contacts).to be_a(Array) - expect(subject.admin_contacts).to eq([]) - end - end - describe "#technical_contacts" do - it do - expect(subject.technical_contacts).to be_a(Array) - expect(subject.technical_contacts).to eq([]) - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers).to eq([]) - end + it "matches status_available.expected" do + expect(subject.disclaimer).to eq(nil) + expect(subject.domain).to eq(nil) + expect(subject.domain_id).to eq(nil) + expect(subject.status).to eq([]) + expect(subject.available?).to eq(true) + expect(subject.registered?).to eq(false) + expect(subject.created_on).to eq(nil) + expect(subject.updated_on).to eq(nil) + expect(subject.expires_on).to eq(nil) + expect(subject.registrar).to eq(nil) + expect(subject.registrant_contacts).to be_a(Array) + expect(subject.registrant_contacts).to eq([]) + expect(subject.admin_contacts).to be_a(Array) + expect(subject.admin_contacts).to eq([]) + expect(subject.technical_contacts).to be_a(Array) + expect(subject.technical_contacts).to eq([]) + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers).to eq([]) end end diff --git a/spec/whois/parsers/responses/whois.afilias-grs.info/bz/status_registered_spec.rb b/spec/whois/parsers/responses/whois.afilias-grs.info/bz/status_registered_spec.rb index ce5c6df0..d6d9778f 100644 --- a/spec/whois/parsers/responses/whois.afilias-grs.info/bz/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.afilias-grs.info/bz/status_registered_spec.rb @@ -11,102 +11,47 @@ # require 'spec_helper' -require 'whois/parsers/whois.afilias-grs.info.rb' -describe Whois::Parsers::WhoisAfiliasGrsInfo, "status_registered.expected" do +describe "whois.afilias-grs.info", :aggregate_failures do subject do file = fixture("responses", "whois.afilias-grs.info/bz/status_registered.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.afilias-grs.info") + Whois::Parser.parser_for(part) end - describe "#disclaimer" do - it do - expect(subject.disclaimer).to eq("Access to WHOIS information is provided to assist persons in determining the contents of a domain name registration record in the registry database. The data in this record is provided by The Registry Operator for informational purposes only, and accuracy is not guaranteed. 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. Registry Operator reserves the right to modify these terms at any time. By submitting this query, you agree to abide by this policy. The Registrar of Record identified in this output may have an RDDS service that can be queried for additional information on how to contact the Registrant, Admin, or Tech contact of the queried domain name.") - end - end - describe "#domain" do - it do - expect(subject.domain).to eq("google.bz") - end - end - describe "#domain_id" do - it do - expect(subject.domain_id).to eq("D105800000000354967-AGRS") - end - end - describe "#status" do - it do - expect(subject.status).to eq(["clientDeleteProhibited https://icann.org/epp#clientDeleteProhibited", "clientTransferProhibited https://icann.org/epp#clientTransferProhibited", "clientUpdateProhibited https://icann.org/epp#clientUpdateProhibited"]) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(false) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(true) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to be_a(Time) - expect(subject.created_on).to eq(DateTime.parse("2006-02-12 18:08:52 UTC")) - end - end - describe "#updated_on" do - it do - expect(subject.updated_on).to be_a(Time) - expect(subject.updated_on).to eq(DateTime.parse("2021-01-11 10:34:48 UTC")) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to be_a(Time) - expect(subject.expires_on).to eq(DateTime.parse("2022-02-12 18:08:52 UTC")) - end - end - describe "#registrar" do - it do - expect(subject.registrar).to be_a(Whois::Parser::Registrar) - expect(subject.registrar.id).to eq("292") - expect(subject.registrar.name).to eq("MarkMonitor Inc.") - expect(subject.registrar.url).to eq("http://www.markmonitor.com") - end - end - describe "#registrant_contacts" do - it do - expect(subject.registrant_contacts).to be_a(Array) - expect(subject.registrant_contacts.size).to eq(0) - end - end - describe "#admin_contacts" do - it do - expect(subject.admin_contacts).to be_a(Array) - expect(subject.admin_contacts.size).to eq(0) - end - end - describe "#technical_contacts" do - it do - expect(subject.technical_contacts).to be_a(Array) - expect(subject.technical_contacts.size).to eq(0) - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers.size).to eq(4) - expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[0].name).to eq("ns1.google.com") - expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[1].name).to eq("ns2.google.com") - expect(subject.nameservers[2]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[2].name).to eq("ns4.google.com") - expect(subject.nameservers[3]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[3].name).to eq("ns3.google.com") - end + it "matches status_registered.expected" do + expect(subject.disclaimer).to eq("Access to WHOIS information is provided to assist persons in determining the contents of a domain name registration record in the registry database. The data in this record is provided by The Registry Operator for informational purposes only, and accuracy is not guaranteed. 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. Registry Operator reserves the right to modify these terms at any time. By submitting this query, you agree to abide by this policy. The Registrar of Record identified in this output may have an RDDS service that can be queried for additional information on how to contact the Registrant, Admin, or Tech contact of the queried domain name.") + expect(subject.domain).to eq("google.bz") + expect(subject.domain_id).to eq("D105800000000354967-AGRS") + expect(subject.status).to eq(["clientDeleteProhibited https://icann.org/epp#clientDeleteProhibited", "clientTransferProhibited https://icann.org/epp#clientTransferProhibited", "clientUpdateProhibited https://icann.org/epp#clientUpdateProhibited"]) + expect(subject.available?).to eq(false) + expect(subject.registered?).to eq(true) + expect(subject.created_on).to be_a(Time) + expect(subject.created_on).to eq(DateTime.parse("2006-02-12 18:08:52 UTC")) + expect(subject.updated_on).to be_a(Time) + expect(subject.updated_on).to eq(DateTime.parse("2021-01-11 10:34:48 UTC")) + expect(subject.expires_on).to be_a(Time) + expect(subject.expires_on).to eq(DateTime.parse("2022-02-12 18:08:52 UTC")) + expect(subject.registrar).to be_a(Whois::Parser::Registrar) + expect(subject.registrar.id).to eq("292") + expect(subject.registrar.name).to eq("MarkMonitor Inc.") + expect(subject.registrar.url).to eq("http://www.markmonitor.com") + expect(subject.registrant_contacts).to be_a(Array) + expect(subject.registrant_contacts.size).to eq(0) + expect(subject.admin_contacts).to be_a(Array) + expect(subject.admin_contacts.size).to eq(0) + expect(subject.technical_contacts).to be_a(Array) + expect(subject.technical_contacts.size).to eq(0) + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers.size).to eq(4) + expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[0].name).to eq("ns1.google.com") + expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[1].name).to eq("ns2.google.com") + expect(subject.nameservers[2]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[2].name).to eq("ns4.google.com") + expect(subject.nameservers[3]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[3].name).to eq("ns3.google.com") end end diff --git a/spec/whois/parsers/responses/whois.afilias-grs.info/gi/status_available_spec.rb b/spec/whois/parsers/responses/whois.afilias-grs.info/gi/status_available_spec.rb index 09eddf05..d0318936 100644 --- a/spec/whois/parsers/responses/whois.afilias-grs.info/gi/status_available_spec.rb +++ b/spec/whois/parsers/responses/whois.afilias-grs.info/gi/status_available_spec.rb @@ -11,88 +11,33 @@ # require 'spec_helper' -require 'whois/parsers/whois.afilias-grs.info.rb' -describe Whois::Parsers::WhoisAfiliasGrsInfo, "status_available.expected" do +describe "whois.afilias-grs.info", :aggregate_failures do subject do file = fixture("responses", "whois.afilias-grs.info/gi/status_available.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.afilias-grs.info") + Whois::Parser.parser_for(part) end - describe "#disclaimer" do - it do - expect(subject.disclaimer).to eq("Access to WHOIS information is provided to assist persons in determining the contents of a domain name registration record in the registry database. The data in this record is provided by The Registry Operator for informational purposes only, and accuracy is not guaranteed. 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. Registry Operator reserves the right to modify these terms at any time. By submitting this query, you agree to abide by this policy. The Registrar of Record identified in this output may have an RDDS service that can be queried for additional information on how to contact the Registrant, Admin, or Tech contact of the queried domain name.") - end - end - describe "#domain" do - it do - expect(subject.domain).to eq(nil) - end - end - describe "#domain_id" do - it do - expect(subject.domain_id).to eq(nil) - end - end - describe "#status" do - it do - expect(subject.status).to eq([]) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(true) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(false) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to eq(nil) - end - end - describe "#updated_on" do - it do - expect(subject.updated_on).to eq(nil) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to eq(nil) - end - end - describe "#registrar" do - it do - expect(subject.registrar).to eq(nil) - end - end - describe "#registrant_contacts" do - it do - expect(subject.registrant_contacts).to be_a(Array) - expect(subject.registrant_contacts).to eq([]) - end - end - describe "#admin_contacts" do - it do - expect(subject.admin_contacts).to be_a(Array) - expect(subject.admin_contacts).to eq([]) - end - end - describe "#technical_contacts" do - it do - expect(subject.technical_contacts).to be_a(Array) - expect(subject.technical_contacts).to eq([]) - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers).to eq([]) - end + it "matches status_available.expected" do + expect(subject.disclaimer).to eq("Access to WHOIS information is provided to assist persons in determining the contents of a domain name registration record in the registry database. The data in this record is provided by The Registry Operator for informational purposes only, and accuracy is not guaranteed. 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. Registry Operator reserves the right to modify these terms at any time. By submitting this query, you agree to abide by this policy. The Registrar of Record identified in this output may have an RDDS service that can be queried for additional information on how to contact the Registrant, Admin, or Tech contact of the queried domain name.") + expect(subject.domain).to eq(nil) + expect(subject.domain_id).to eq(nil) + expect(subject.status).to eq([]) + expect(subject.available?).to eq(true) + expect(subject.registered?).to eq(false) + expect(subject.created_on).to eq(nil) + expect(subject.updated_on).to eq(nil) + expect(subject.expires_on).to eq(nil) + expect(subject.registrar).to eq(nil) + expect(subject.registrant_contacts).to be_a(Array) + expect(subject.registrant_contacts).to eq([]) + expect(subject.admin_contacts).to be_a(Array) + expect(subject.admin_contacts).to eq([]) + expect(subject.technical_contacts).to be_a(Array) + expect(subject.technical_contacts).to eq([]) + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers).to eq([]) end end diff --git a/spec/whois/parsers/responses/whois.afilias-grs.info/gi/status_registered_spec.rb b/spec/whois/parsers/responses/whois.afilias-grs.info/gi/status_registered_spec.rb index e17598eb..1d09e041 100644 --- a/spec/whois/parsers/responses/whois.afilias-grs.info/gi/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.afilias-grs.info/gi/status_registered_spec.rb @@ -11,111 +11,56 @@ # require 'spec_helper' -require 'whois/parsers/whois.afilias-grs.info.rb' -describe Whois::Parsers::WhoisAfiliasGrsInfo, "status_registered.expected" do +describe "whois.afilias-grs.info", :aggregate_failures do subject do file = fixture("responses", "whois.afilias-grs.info/gi/status_registered.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.afilias-grs.info") + Whois::Parser.parser_for(part) end - describe "#disclaimer" do - it do - expect(subject.disclaimer).to eq("Access to WHOIS information is provided to assist persons in determining the contents of a domain name registration record in the registry database. The data in this record is provided by The Registry Operator for informational purposes only, and accuracy is not guaranteed. 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. Registry Operator reserves the right to modify these terms at any time. By submitting this query, you agree to abide by this policy. The Registrar of Record identified in this output may have an RDDS service that can be queried for additional information on how to contact the Registrant, Admin, or Tech contact of the queried domain name.") - end - end - describe "#domain" do - it do - expect(subject.domain).to eq("sapphire.gi") - end - end - describe "#domain_id" do - it do - expect(subject.domain_id).to eq("D105800000000068296-AGRS") - end - end - describe "#status" do - it do - expect(subject.status).to eq(["ok https://icann.org/epp#ok"]) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(false) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(true) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to be_a(Time) - expect(subject.created_on).to eq(DateTime.parse("2004-12-20 13:34:34 UTC")) - end - end - describe "#updated_on" do - it do - expect(subject.updated_on).to be_a(Time) - expect(subject.updated_on).to eq(DateTime.parse("2017-12-05 13:07:12 UTC")) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to be_a(Time) - expect(subject.expires_on).to eq(DateTime.parse("2022-12-20 13:34:34 UTC")) - end - end - describe "#registrar" do - it do - expect(subject.registrar).to be_a(Whois::Parser::Registrar) - expect(subject.registrar.id).to eq("119") - expect(subject.registrar.name).to eq("GibNet Registrar") - expect(subject.registrar.url).to eq("") - end - end - describe "#registrant_contacts" do - it do - expect(subject.registrant_contacts).to be_a(Array) - expect(subject.registrant_contacts.size).to eq(1) - expect(subject.registrant_contacts[0]).to be_a(Whois::Parser::Contact) - expect(subject.registrant_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_REGISTRANT) - expect(subject.registrant_contacts[0].id).to eq(nil) - expect(subject.registrant_contacts[0].name).to eq(nil) - expect(subject.registrant_contacts[0].organization).to eq("Broadband Gibraltar Limited") - expect(subject.registrant_contacts[0].address).to eq(nil) - expect(subject.registrant_contacts[0].city).to eq(nil) - expect(subject.registrant_contacts[0].zip).to eq(nil) - expect(subject.registrant_contacts[0].state).to eq("Not Available") - expect(subject.registrant_contacts[0].country_code).to eq("GI") - expect(subject.registrant_contacts[0].phone).to eq(nil) - expect(subject.registrant_contacts[0].fax).to eq(nil) - expect(subject.registrant_contacts[0].email).to eq(nil) - end - end - describe "#admin_contacts" do - it do - expect(subject.admin_contacts).to be_a(Array) - expect(subject.admin_contacts.size).to eq(0) - end - end - describe "#technical_contacts" do - it do - expect(subject.technical_contacts).to be_a(Array) - expect(subject.technical_contacts.size).to eq(0) - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers.size).to eq(2) - expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[0].name).to eq("ns1-a.sapphire.gi") - expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[1].name).to eq("ns2-a.sapphire.gi") - end + it "matches status_registered.expected" do + expect(subject.disclaimer).to eq("Access to WHOIS information is provided to assist persons in determining the contents of a domain name registration record in the registry database. The data in this record is provided by The Registry Operator for informational purposes only, and accuracy is not guaranteed. 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. Registry Operator reserves the right to modify these terms at any time. By submitting this query, you agree to abide by this policy. The Registrar of Record identified in this output may have an RDDS service that can be queried for additional information on how to contact the Registrant, Admin, or Tech contact of the queried domain name.") + expect(subject.domain).to eq("sapphire.gi") + expect(subject.domain_id).to eq("D105800000000068296-AGRS") + expect(subject.status).to eq(["ok https://icann.org/epp#ok"]) + expect(subject.available?).to eq(false) + expect(subject.registered?).to eq(true) + expect(subject.created_on).to be_a(Time) + expect(subject.created_on).to eq(DateTime.parse("2004-12-20 13:34:34 UTC")) + expect(subject.updated_on).to be_a(Time) + expect(subject.updated_on).to eq(DateTime.parse("2017-12-05 13:07:12 UTC")) + expect(subject.expires_on).to be_a(Time) + expect(subject.expires_on).to eq(DateTime.parse("2022-12-20 13:34:34 UTC")) + expect(subject.registrar).to be_a(Whois::Parser::Registrar) + expect(subject.registrar.id).to eq("119") + expect(subject.registrar.name).to eq("GibNet Registrar") + expect(subject.registrar.url).to eq("") + expect(subject.registrant_contacts).to be_a(Array) + expect(subject.registrant_contacts.size).to eq(1) + expect(subject.registrant_contacts[0]).to be_a(Whois::Parser::Contact) + expect(subject.registrant_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_REGISTRANT) + expect(subject.registrant_contacts[0].id).to eq(nil) + expect(subject.registrant_contacts[0].name).to eq(nil) + expect(subject.registrant_contacts[0].organization).to eq("Broadband Gibraltar Limited") + expect(subject.registrant_contacts[0].address).to eq(nil) + expect(subject.registrant_contacts[0].city).to eq(nil) + expect(subject.registrant_contacts[0].zip).to eq(nil) + expect(subject.registrant_contacts[0].state).to eq("Not Available") + expect(subject.registrant_contacts[0].country_code).to eq("GI") + expect(subject.registrant_contacts[0].phone).to eq(nil) + expect(subject.registrant_contacts[0].fax).to eq(nil) + expect(subject.registrant_contacts[0].email).to eq(nil) + expect(subject.admin_contacts).to be_a(Array) + expect(subject.admin_contacts.size).to eq(0) + expect(subject.technical_contacts).to be_a(Array) + expect(subject.technical_contacts.size).to eq(0) + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers.size).to eq(2) + expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[0].name).to eq("ns1-a.sapphire.gi") + expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[1].name).to eq("ns2-a.sapphire.gi") end end diff --git a/spec/whois/parsers/responses/whois.afilias-grs.info/lc/status_available_spec.rb b/spec/whois/parsers/responses/whois.afilias-grs.info/lc/status_available_spec.rb index 2066d950..494294ac 100644 --- a/spec/whois/parsers/responses/whois.afilias-grs.info/lc/status_available_spec.rb +++ b/spec/whois/parsers/responses/whois.afilias-grs.info/lc/status_available_spec.rb @@ -11,88 +11,33 @@ # require 'spec_helper' -require 'whois/parsers/whois.afilias-grs.info.rb' -describe Whois::Parsers::WhoisAfiliasGrsInfo, "status_available.expected" do +describe "whois.afilias-grs.info", :aggregate_failures do subject do file = fixture("responses", "whois.afilias-grs.info/lc/status_available.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.afilias-grs.info") + Whois::Parser.parser_for(part) end - describe "#disclaimer" do - it do - expect(subject.disclaimer).to eq("Access to WHOIS information is provided to assist persons in determining the contents of a domain name registration record in the registry database. The data in this record is provided by The Registry Operator for informational purposes only, and accuracy is not guaranteed. 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. Registry Operator reserves the right to modify these terms at any time. By submitting this query, you agree to abide by this policy. The Registrar of Record identified in this output may have an RDDS service that can be queried for additional information on how to contact the Registrant, Admin, or Tech contact of the queried domain name.") - end - end - describe "#domain" do - it do - expect(subject.domain).to eq(nil) - end - end - describe "#domain_id" do - it do - expect(subject.domain_id).to eq(nil) - end - end - describe "#status" do - it do - expect(subject.status).to eq([]) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(true) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(false) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to eq(nil) - end - end - describe "#updated_on" do - it do - expect(subject.updated_on).to eq(nil) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to eq(nil) - end - end - describe "#registrar" do - it do - expect(subject.registrar).to eq(nil) - end - end - describe "#registrant_contacts" do - it do - expect(subject.registrant_contacts).to be_a(Array) - expect(subject.registrant_contacts).to eq([]) - end - end - describe "#admin_contacts" do - it do - expect(subject.admin_contacts).to be_a(Array) - expect(subject.admin_contacts).to eq([]) - end - end - describe "#technical_contacts" do - it do - expect(subject.technical_contacts).to be_a(Array) - expect(subject.technical_contacts).to eq([]) - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers).to eq([]) - end + it "matches status_available.expected" do + expect(subject.disclaimer).to eq("Access to WHOIS information is provided to assist persons in determining the contents of a domain name registration record in the registry database. The data in this record is provided by The Registry Operator for informational purposes only, and accuracy is not guaranteed. 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. Registry Operator reserves the right to modify these terms at any time. By submitting this query, you agree to abide by this policy. The Registrar of Record identified in this output may have an RDDS service that can be queried for additional information on how to contact the Registrant, Admin, or Tech contact of the queried domain name.") + expect(subject.domain).to eq(nil) + expect(subject.domain_id).to eq(nil) + expect(subject.status).to eq([]) + expect(subject.available?).to eq(true) + expect(subject.registered?).to eq(false) + expect(subject.created_on).to eq(nil) + expect(subject.updated_on).to eq(nil) + expect(subject.expires_on).to eq(nil) + expect(subject.registrar).to eq(nil) + expect(subject.registrant_contacts).to be_a(Array) + expect(subject.registrant_contacts).to eq([]) + expect(subject.admin_contacts).to be_a(Array) + expect(subject.admin_contacts).to eq([]) + expect(subject.technical_contacts).to be_a(Array) + expect(subject.technical_contacts).to eq([]) + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers).to eq([]) end end diff --git a/spec/whois/parsers/responses/whois.afilias-grs.info/lc/status_registered_spec.rb b/spec/whois/parsers/responses/whois.afilias-grs.info/lc/status_registered_spec.rb index 4c552708..4537b7ea 100644 --- a/spec/whois/parsers/responses/whois.afilias-grs.info/lc/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.afilias-grs.info/lc/status_registered_spec.rb @@ -11,111 +11,56 @@ # require 'spec_helper' -require 'whois/parsers/whois.afilias-grs.info.rb' -describe Whois::Parsers::WhoisAfiliasGrsInfo, "status_registered.expected" do +describe "whois.afilias-grs.info", :aggregate_failures do subject do file = fixture("responses", "whois.afilias-grs.info/lc/status_registered.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.afilias-grs.info") + Whois::Parser.parser_for(part) end - describe "#disclaimer" do - it do - expect(subject.disclaimer).to eq("Access to WHOIS information is provided to assist persons in determining the contents of a domain name registration record in the registry database. The data in this record is provided by The Registry Operator for informational purposes only, and accuracy is not guaranteed. 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. Registry Operator reserves the right to modify these terms at any time. By submitting this query, you agree to abide by this policy. The Registrar of Record identified in this output may have an RDDS service that can be queried for additional information on how to contact the Registrant, Admin, or Tech contact of the queried domain name.") - end - end - describe "#domain" do - it do - expect(subject.domain).to eq("nic.lc") - end - end - describe "#domain_id" do - it do - expect(subject.domain_id).to eq("D105800000000946482-AGRS") - end - end - describe "#status" do - it do - expect(subject.status).to eq(["ok https://icann.org/epp#ok"]) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(false) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(true) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to be_a(Time) - expect(subject.created_on).to eq(DateTime.parse("2002-12-08 00:00:00 UTC")) - end - end - describe "#updated_on" do - it do - expect(subject.updated_on).to be_a(Time) - expect(subject.updated_on).to eq(DateTime.parse("2020-12-08 22:22:29 UTC")) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to be_a(Time) - expect(subject.expires_on).to eq(DateTime.parse("2021-12-08 00:00:00 UTC")) - end - end - describe "#registrar" do - it do - expect(subject.registrar).to be_a(Whois::Parser::Registrar) - expect(subject.registrar.id).to eq("119") - expect(subject.registrar.name).to eq("NicLc Registrar") - expect(subject.registrar.url).to eq("") - end - end - describe "#registrant_contacts" do - it do - expect(subject.registrant_contacts).to be_a(Array) - expect(subject.registrant_contacts.size).to eq(1) - expect(subject.registrant_contacts[0]).to be_a(Whois::Parser::Contact) - expect(subject.registrant_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_REGISTRANT) - expect(subject.registrant_contacts[0].id).to eq(nil) - expect(subject.registrant_contacts[0].name).to eq(nil) - expect(subject.registrant_contacts[0].organization).to eq("Nic LC") - expect(subject.registrant_contacts[0].address).to eq(nil) - expect(subject.registrant_contacts[0].city).to eq(nil) - expect(subject.registrant_contacts[0].zip).to eq(nil) - expect(subject.registrant_contacts[0].state).to eq("Not Provided") - expect(subject.registrant_contacts[0].country_code).to eq("LC") - expect(subject.registrant_contacts[0].phone).to eq(nil) - expect(subject.registrant_contacts[0].fax).to eq(nil) - expect(subject.registrant_contacts[0].email).to eq(nil) - end - end - describe "#admin_contacts" do - it do - expect(subject.admin_contacts).to be_a(Array) - expect(subject.admin_contacts.size).to eq(0) - end - end - describe "#technical_contacts" do - it do - expect(subject.technical_contacts).to be_a(Array) - expect(subject.technical_contacts.size).to eq(0) - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers.size).to eq(2) - expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[0].name).to eq("ns1.nic.ag") - expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[1].name).to eq("ns.patricklay.com") - end + it "matches status_registered.expected" do + expect(subject.disclaimer).to eq("Access to WHOIS information is provided to assist persons in determining the contents of a domain name registration record in the registry database. The data in this record is provided by The Registry Operator for informational purposes only, and accuracy is not guaranteed. 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. Registry Operator reserves the right to modify these terms at any time. By submitting this query, you agree to abide by this policy. The Registrar of Record identified in this output may have an RDDS service that can be queried for additional information on how to contact the Registrant, Admin, or Tech contact of the queried domain name.") + expect(subject.domain).to eq("nic.lc") + expect(subject.domain_id).to eq("D105800000000946482-AGRS") + expect(subject.status).to eq(["ok https://icann.org/epp#ok"]) + expect(subject.available?).to eq(false) + expect(subject.registered?).to eq(true) + expect(subject.created_on).to be_a(Time) + expect(subject.created_on).to eq(DateTime.parse("2002-12-08 00:00:00 UTC")) + expect(subject.updated_on).to be_a(Time) + expect(subject.updated_on).to eq(DateTime.parse("2020-12-08 22:22:29 UTC")) + expect(subject.expires_on).to be_a(Time) + expect(subject.expires_on).to eq(DateTime.parse("2021-12-08 00:00:00 UTC")) + expect(subject.registrar).to be_a(Whois::Parser::Registrar) + expect(subject.registrar.id).to eq("119") + expect(subject.registrar.name).to eq("NicLc Registrar") + expect(subject.registrar.url).to eq("") + expect(subject.registrant_contacts).to be_a(Array) + expect(subject.registrant_contacts.size).to eq(1) + expect(subject.registrant_contacts[0]).to be_a(Whois::Parser::Contact) + expect(subject.registrant_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_REGISTRANT) + expect(subject.registrant_contacts[0].id).to eq(nil) + expect(subject.registrant_contacts[0].name).to eq(nil) + expect(subject.registrant_contacts[0].organization).to eq("Nic LC") + expect(subject.registrant_contacts[0].address).to eq(nil) + expect(subject.registrant_contacts[0].city).to eq(nil) + expect(subject.registrant_contacts[0].zip).to eq(nil) + expect(subject.registrant_contacts[0].state).to eq("Not Provided") + expect(subject.registrant_contacts[0].country_code).to eq("LC") + expect(subject.registrant_contacts[0].phone).to eq(nil) + expect(subject.registrant_contacts[0].fax).to eq(nil) + expect(subject.registrant_contacts[0].email).to eq(nil) + expect(subject.admin_contacts).to be_a(Array) + expect(subject.admin_contacts.size).to eq(0) + expect(subject.technical_contacts).to be_a(Array) + expect(subject.technical_contacts.size).to eq(0) + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers.size).to eq(2) + expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[0].name).to eq("ns1.nic.ag") + expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[1].name).to eq("ns.patricklay.com") end end diff --git a/spec/whois/parsers/responses/whois.afilias-grs.info/mn/status_available_spec.rb b/spec/whois/parsers/responses/whois.afilias-grs.info/mn/status_available_spec.rb index 013ee323..ae2c18eb 100644 --- a/spec/whois/parsers/responses/whois.afilias-grs.info/mn/status_available_spec.rb +++ b/spec/whois/parsers/responses/whois.afilias-grs.info/mn/status_available_spec.rb @@ -11,88 +11,33 @@ # require 'spec_helper' -require 'whois/parsers/whois.afilias-grs.info.rb' -describe Whois::Parsers::WhoisAfiliasGrsInfo, "status_available.expected" do +describe "whois.afilias-grs.info", :aggregate_failures do subject do file = fixture("responses", "whois.afilias-grs.info/mn/status_available.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.afilias-grs.info") + Whois::Parser.parser_for(part) end - describe "#disclaimer" do - it do - expect(subject.disclaimer).to eq("Access to WHOIS information is provided to assist persons in determining the contents of a domain name registration record in the registry database. The data in this record is provided by The Registry Operator for informational purposes only, and accuracy is not guaranteed. 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. Registry Operator reserves the right to modify these terms at any time. By submitting this query, you agree to abide by this policy. The Registrar of Record identified in this output may have an RDDS service that can be queried for additional information on how to contact the Registrant, Admin, or Tech contact of the queried domain name.") - end - end - describe "#domain" do - it do - expect(subject.domain).to eq(nil) - end - end - describe "#domain_id" do - it do - expect(subject.domain_id).to eq(nil) - end - end - describe "#status" do - it do - expect(subject.status).to eq([]) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(true) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(false) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to eq(nil) - end - end - describe "#updated_on" do - it do - expect(subject.updated_on).to eq(nil) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to eq(nil) - end - end - describe "#registrar" do - it do - expect(subject.registrar).to eq(nil) - end - end - describe "#registrant_contacts" do - it do - expect(subject.registrant_contacts).to be_a(Array) - expect(subject.registrant_contacts).to eq([]) - end - end - describe "#admin_contacts" do - it do - expect(subject.admin_contacts).to be_a(Array) - expect(subject.admin_contacts).to eq([]) - end - end - describe "#technical_contacts" do - it do - expect(subject.technical_contacts).to be_a(Array) - expect(subject.technical_contacts).to eq([]) - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers).to eq([]) - end + it "matches status_available.expected" do + expect(subject.disclaimer).to eq("Access to WHOIS information is provided to assist persons in determining the contents of a domain name registration record in the registry database. The data in this record is provided by The Registry Operator for informational purposes only, and accuracy is not guaranteed. 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. Registry Operator reserves the right to modify these terms at any time. By submitting this query, you agree to abide by this policy. The Registrar of Record identified in this output may have an RDDS service that can be queried for additional information on how to contact the Registrant, Admin, or Tech contact of the queried domain name.") + expect(subject.domain).to eq(nil) + expect(subject.domain_id).to eq(nil) + expect(subject.status).to eq([]) + expect(subject.available?).to eq(true) + expect(subject.registered?).to eq(false) + expect(subject.created_on).to eq(nil) + expect(subject.updated_on).to eq(nil) + expect(subject.expires_on).to eq(nil) + expect(subject.registrar).to eq(nil) + expect(subject.registrant_contacts).to be_a(Array) + expect(subject.registrant_contacts).to eq([]) + expect(subject.admin_contacts).to be_a(Array) + expect(subject.admin_contacts).to eq([]) + expect(subject.technical_contacts).to be_a(Array) + expect(subject.technical_contacts).to eq([]) + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers).to eq([]) end end diff --git a/spec/whois/parsers/responses/whois.afilias-grs.info/mn/status_registered_spec.rb b/spec/whois/parsers/responses/whois.afilias-grs.info/mn/status_registered_spec.rb index 17523c6d..ec1ba40e 100644 --- a/spec/whois/parsers/responses/whois.afilias-grs.info/mn/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.afilias-grs.info/mn/status_registered_spec.rb @@ -11,141 +11,86 @@ # require 'spec_helper' -require 'whois/parsers/whois.afilias-grs.info.rb' -describe Whois::Parsers::WhoisAfiliasGrsInfo, "status_registered.expected" do +describe "whois.afilias-grs.info", :aggregate_failures do subject do file = fixture("responses", "whois.afilias-grs.info/mn/status_registered.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.afilias-grs.info") + Whois::Parser.parser_for(part) end - describe "#disclaimer" do - it do - expect(subject.disclaimer).to eq("Access to WHOIS information is provided to assist persons in determining the contents of a domain name registration record in the registry database. The data in this record is provided by The Registry Operator for informational purposes only, and accuracy is not guaranteed. 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. Registry Operator reserves the right to modify these terms at any time. By submitting this query, you agree to abide by this policy. The Registrar of Record identified in this output may have an RDDS service that can be queried for additional information on how to contact the Registrant, Admin, or Tech contact of the queried domain name.") - end - end - describe "#domain" do - it do - expect(subject.domain).to eq("google.mn") - end - end - describe "#domain_id" do - it do - expect(subject.domain_id).to eq("D105800000000444956-AGRS") - end - end - describe "#status" do - it do - expect(subject.status).to eq(["clientDeleteProhibited https://icann.org/epp#clientDeleteProhibited", "clientTransferProhibited https://icann.org/epp#clientTransferProhibited", "clientUpdateProhibited https://icann.org/epp#clientUpdateProhibited"]) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(false) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(true) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to be_a(Time) - expect(subject.created_on).to eq(DateTime.parse("2003-04-07 00:00:00 UTC")) - end - end - describe "#updated_on" do - it do - expect(subject.updated_on).to be_a(Time) - expect(subject.updated_on).to eq(DateTime.parse("2021-03-06 10:38:48 UTC")) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to be_a(Time) - expect(subject.expires_on).to eq(DateTime.parse("2022-04-07 00:00:00 UTC")) - end - end - describe "#registrar" do - it do - expect(subject.registrar).to be_a(Whois::Parser::Registrar) - expect(subject.registrar.id).to eq("292") - expect(subject.registrar.name).to eq("MarkMonitor Inc.") - expect(subject.registrar.url).to eq("http://www.markmonitor.com") - end - end - describe "#registrant_contacts" do - it do - expect(subject.registrant_contacts).to be_a(Array) - expect(subject.registrant_contacts.size).to eq(1) - expect(subject.registrant_contacts[0]).to be_a(Whois::Parser::Contact) - expect(subject.registrant_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_REGISTRANT) - expect(subject.registrant_contacts[0].id).to eq("C40795-AGRS") - expect(subject.registrant_contacts[0].name).to eq("DNS Admin") - expect(subject.registrant_contacts[0].organization).to eq("Google Inc.") - expect(subject.registrant_contacts[0].address).to eq("1600 Amphitheatre Parkway") - expect(subject.registrant_contacts[0].city).to eq("Mountain View") - expect(subject.registrant_contacts[0].zip).to eq("94043") - expect(subject.registrant_contacts[0].state).to eq("CA") - expect(subject.registrant_contacts[0].country_code).to eq("US") - expect(subject.registrant_contacts[0].phone).to eq("+1.6502530000") - expect(subject.registrant_contacts[0].fax).to eq("+1.6502530001") - expect(subject.registrant_contacts[0].email).to eq("dns-admin@google.com") - end - end - describe "#admin_contacts" do - it do - expect(subject.admin_contacts).to be_a(Array) - expect(subject.admin_contacts.size).to eq(1) - expect(subject.admin_contacts[0]).to be_a(Whois::Parser::Contact) - expect(subject.admin_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_ADMINISTRATIVE) - expect(subject.admin_contacts[0].id).to eq("C40795-AGRS") - expect(subject.admin_contacts[0].name).to eq("DNS Admin") - expect(subject.admin_contacts[0].organization).to eq("Google Inc.") - expect(subject.admin_contacts[0].address).to eq("1600 Amphitheatre Parkway") - expect(subject.admin_contacts[0].city).to eq("Mountain View") - expect(subject.admin_contacts[0].zip).to eq("94043") - expect(subject.admin_contacts[0].state).to eq("CA") - expect(subject.admin_contacts[0].country_code).to eq("US") - expect(subject.admin_contacts[0].phone).to eq("+1.6502530000") - expect(subject.admin_contacts[0].fax).to eq("+1.6502530001") - expect(subject.admin_contacts[0].email).to eq("dns-admin@google.com") - end - end - describe "#technical_contacts" do - it do - expect(subject.technical_contacts).to be_a(Array) - expect(subject.technical_contacts.size).to eq(1) - expect(subject.technical_contacts[0]).to be_a(Whois::Parser::Contact) - expect(subject.technical_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_TECHNICAL) - expect(subject.technical_contacts[0].id).to eq("C40795-AGRS") - expect(subject.technical_contacts[0].name).to eq("DNS Admin") - expect(subject.technical_contacts[0].organization).to eq("Google Inc.") - expect(subject.technical_contacts[0].address).to eq("1600 Amphitheatre Parkway") - expect(subject.technical_contacts[0].city).to eq("Mountain View") - expect(subject.technical_contacts[0].zip).to eq("94043") - expect(subject.technical_contacts[0].state).to eq("CA") - expect(subject.technical_contacts[0].country_code).to eq("US") - expect(subject.technical_contacts[0].phone).to eq("+1.6502530000") - expect(subject.technical_contacts[0].fax).to eq("+1.6502530001") - expect(subject.technical_contacts[0].email).to eq("dns-admin@google.com") - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers.size).to eq(4) - expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[0].name).to eq("ns1.google.com") - expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[1].name).to eq("ns2.google.com") - expect(subject.nameservers[2]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[2].name).to eq("ns4.google.com") - expect(subject.nameservers[3]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[3].name).to eq("ns3.google.com") - end + it "matches status_registered.expected" do + expect(subject.disclaimer).to eq("Access to WHOIS information is provided to assist persons in determining the contents of a domain name registration record in the registry database. The data in this record is provided by The Registry Operator for informational purposes only, and accuracy is not guaranteed. 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. Registry Operator reserves the right to modify these terms at any time. By submitting this query, you agree to abide by this policy. The Registrar of Record identified in this output may have an RDDS service that can be queried for additional information on how to contact the Registrant, Admin, or Tech contact of the queried domain name.") + expect(subject.domain).to eq("google.mn") + expect(subject.domain_id).to eq("D105800000000444956-AGRS") + expect(subject.status).to eq(["clientDeleteProhibited https://icann.org/epp#clientDeleteProhibited", "clientTransferProhibited https://icann.org/epp#clientTransferProhibited", "clientUpdateProhibited https://icann.org/epp#clientUpdateProhibited"]) + expect(subject.available?).to eq(false) + expect(subject.registered?).to eq(true) + expect(subject.created_on).to be_a(Time) + expect(subject.created_on).to eq(DateTime.parse("2003-04-07 00:00:00 UTC")) + expect(subject.updated_on).to be_a(Time) + expect(subject.updated_on).to eq(DateTime.parse("2021-03-06 10:38:48 UTC")) + expect(subject.expires_on).to be_a(Time) + expect(subject.expires_on).to eq(DateTime.parse("2022-04-07 00:00:00 UTC")) + expect(subject.registrar).to be_a(Whois::Parser::Registrar) + expect(subject.registrar.id).to eq("292") + expect(subject.registrar.name).to eq("MarkMonitor Inc.") + expect(subject.registrar.url).to eq("http://www.markmonitor.com") + expect(subject.registrant_contacts).to be_a(Array) + expect(subject.registrant_contacts.size).to eq(1) + expect(subject.registrant_contacts[0]).to be_a(Whois::Parser::Contact) + expect(subject.registrant_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_REGISTRANT) + expect(subject.registrant_contacts[0].id).to eq("C40795-AGRS") + expect(subject.registrant_contacts[0].name).to eq("DNS Admin") + expect(subject.registrant_contacts[0].organization).to eq("Google Inc.") + expect(subject.registrant_contacts[0].address).to eq("1600 Amphitheatre Parkway") + expect(subject.registrant_contacts[0].city).to eq("Mountain View") + expect(subject.registrant_contacts[0].zip).to eq("94043") + expect(subject.registrant_contacts[0].state).to eq("CA") + expect(subject.registrant_contacts[0].country_code).to eq("US") + expect(subject.registrant_contacts[0].phone).to eq("+1.6502530000") + expect(subject.registrant_contacts[0].fax).to eq("+1.6502530001") + expect(subject.registrant_contacts[0].email).to eq("dns-admin@google.com") + expect(subject.admin_contacts).to be_a(Array) + expect(subject.admin_contacts.size).to eq(1) + expect(subject.admin_contacts[0]).to be_a(Whois::Parser::Contact) + expect(subject.admin_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_ADMINISTRATIVE) + expect(subject.admin_contacts[0].id).to eq("C40795-AGRS") + expect(subject.admin_contacts[0].name).to eq("DNS Admin") + expect(subject.admin_contacts[0].organization).to eq("Google Inc.") + expect(subject.admin_contacts[0].address).to eq("1600 Amphitheatre Parkway") + expect(subject.admin_contacts[0].city).to eq("Mountain View") + expect(subject.admin_contacts[0].zip).to eq("94043") + expect(subject.admin_contacts[0].state).to eq("CA") + expect(subject.admin_contacts[0].country_code).to eq("US") + expect(subject.admin_contacts[0].phone).to eq("+1.6502530000") + expect(subject.admin_contacts[0].fax).to eq("+1.6502530001") + expect(subject.admin_contacts[0].email).to eq("dns-admin@google.com") + expect(subject.technical_contacts).to be_a(Array) + expect(subject.technical_contacts.size).to eq(1) + expect(subject.technical_contacts[0]).to be_a(Whois::Parser::Contact) + expect(subject.technical_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_TECHNICAL) + expect(subject.technical_contacts[0].id).to eq("C40795-AGRS") + expect(subject.technical_contacts[0].name).to eq("DNS Admin") + expect(subject.technical_contacts[0].organization).to eq("Google Inc.") + expect(subject.technical_contacts[0].address).to eq("1600 Amphitheatre Parkway") + expect(subject.technical_contacts[0].city).to eq("Mountain View") + expect(subject.technical_contacts[0].zip).to eq("94043") + expect(subject.technical_contacts[0].state).to eq("CA") + expect(subject.technical_contacts[0].country_code).to eq("US") + expect(subject.technical_contacts[0].phone).to eq("+1.6502530000") + expect(subject.technical_contacts[0].fax).to eq("+1.6502530001") + expect(subject.technical_contacts[0].email).to eq("dns-admin@google.com") + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers.size).to eq(4) + expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[0].name).to eq("ns1.google.com") + expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[1].name).to eq("ns2.google.com") + expect(subject.nameservers[2]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[2].name).to eq("ns4.google.com") + expect(subject.nameservers[3]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[3].name).to eq("ns3.google.com") end end diff --git a/spec/whois/parsers/responses/whois.afilias-grs.info/sc/status_available_spec.rb b/spec/whois/parsers/responses/whois.afilias-grs.info/sc/status_available_spec.rb index 3a4fc0fd..04089eab 100644 --- a/spec/whois/parsers/responses/whois.afilias-grs.info/sc/status_available_spec.rb +++ b/spec/whois/parsers/responses/whois.afilias-grs.info/sc/status_available_spec.rb @@ -11,88 +11,33 @@ # require 'spec_helper' -require 'whois/parsers/whois.afilias-grs.info.rb' -describe Whois::Parsers::WhoisAfiliasGrsInfo, "status_available.expected" do +describe "whois.afilias-grs.info", :aggregate_failures do subject do file = fixture("responses", "whois.afilias-grs.info/sc/status_available.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.afilias-grs.info") + Whois::Parser.parser_for(part) end - describe "#disclaimer" do - it do - expect(subject.disclaimer).to eq("Access to WHOIS information is provided to assist persons in determining the contents of a domain name registration record in the registry database. The data in this record is provided by The Registry Operator for informational purposes only, and accuracy is not guaranteed. 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. Registry Operator reserves the right to modify these terms at any time. By submitting this query, you agree to abide by this policy. The Registrar of Record identified in this output may have an RDDS service that can be queried for additional information on how to contact the Registrant, Admin, or Tech contact of the queried domain name.") - end - end - describe "#domain" do - it do - expect(subject.domain).to eq(nil) - end - end - describe "#domain_id" do - it do - expect(subject.domain_id).to eq(nil) - end - end - describe "#status" do - it do - expect(subject.status).to eq([]) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(true) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(false) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to eq(nil) - end - end - describe "#updated_on" do - it do - expect(subject.updated_on).to eq(nil) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to eq(nil) - end - end - describe "#registrar" do - it do - expect(subject.registrar).to eq(nil) - end - end - describe "#registrant_contacts" do - it do - expect(subject.registrant_contacts).to be_a(Array) - expect(subject.registrant_contacts).to eq([]) - end - end - describe "#admin_contacts" do - it do - expect(subject.admin_contacts).to be_a(Array) - expect(subject.admin_contacts).to eq([]) - end - end - describe "#technical_contacts" do - it do - expect(subject.technical_contacts).to be_a(Array) - expect(subject.technical_contacts).to eq([]) - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers).to eq([]) - end + it "matches status_available.expected" do + expect(subject.disclaimer).to eq("Access to WHOIS information is provided to assist persons in determining the contents of a domain name registration record in the registry database. The data in this record is provided by The Registry Operator for informational purposes only, and accuracy is not guaranteed. 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. Registry Operator reserves the right to modify these terms at any time. By submitting this query, you agree to abide by this policy. The Registrar of Record identified in this output may have an RDDS service that can be queried for additional information on how to contact the Registrant, Admin, or Tech contact of the queried domain name.") + expect(subject.domain).to eq(nil) + expect(subject.domain_id).to eq(nil) + expect(subject.status).to eq([]) + expect(subject.available?).to eq(true) + expect(subject.registered?).to eq(false) + expect(subject.created_on).to eq(nil) + expect(subject.updated_on).to eq(nil) + expect(subject.expires_on).to eq(nil) + expect(subject.registrar).to eq(nil) + expect(subject.registrant_contacts).to be_a(Array) + expect(subject.registrant_contacts).to eq([]) + expect(subject.admin_contacts).to be_a(Array) + expect(subject.admin_contacts).to eq([]) + expect(subject.technical_contacts).to be_a(Array) + expect(subject.technical_contacts).to eq([]) + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers).to eq([]) end end diff --git a/spec/whois/parsers/responses/whois.afilias-grs.info/sc/status_registered_spec.rb b/spec/whois/parsers/responses/whois.afilias-grs.info/sc/status_registered_spec.rb index 8ac1589f..5af2534f 100644 --- a/spec/whois/parsers/responses/whois.afilias-grs.info/sc/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.afilias-grs.info/sc/status_registered_spec.rb @@ -11,111 +11,56 @@ # require 'spec_helper' -require 'whois/parsers/whois.afilias-grs.info.rb' -describe Whois::Parsers::WhoisAfiliasGrsInfo, "status_registered.expected" do +describe "whois.afilias-grs.info", :aggregate_failures do subject do file = fixture("responses", "whois.afilias-grs.info/sc/status_registered.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.afilias-grs.info") + Whois::Parser.parser_for(part) end - describe "#disclaimer" do - it do - expect(subject.disclaimer).to eq("Access to WHOIS information is provided to assist persons in determining the contents of a domain name registration record in the registry database. The data in this record is provided by The Registry Operator for informational purposes only, and accuracy is not guaranteed. 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. Registry Operator reserves the right to modify these terms at any time. By submitting this query, you agree to abide by this policy. The Registrar of Record identified in this output may have an RDDS service that can be queried for additional information on how to contact the Registrant, Admin, or Tech contact of the queried domain name.") - end - end - describe "#domain" do - it do - expect(subject.domain).to eq("google.sc") - end - end - describe "#domain_id" do - it do - expect(subject.domain_id).to eq("D105800000000047234-AGRS") - end - end - describe "#status" do - it do - expect(subject.status).to eq(["clientDeleteProhibited https://icann.org/epp#clientDeleteProhibited", "clientTransferProhibited https://icann.org/epp#clientTransferProhibited", "clientUpdateProhibited https://icann.org/epp#clientUpdateProhibited"]) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(false) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(true) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to be_a(Time) - expect(subject.created_on).to eq(DateTime.parse("2004-02-03 19:19:12 UTC")) - end - end - describe "#updated_on" do - it do - expect(subject.updated_on).to be_a(Time) - expect(subject.updated_on).to eq(DateTime.parse("2021-01-02 10:34:05 UTC")) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to be_a(Time) - expect(subject.expires_on).to eq(DateTime.parse("2022-02-03 19:19:12 UTC")) - end - end - describe "#registrar" do - it do - expect(subject.registrar).to be_a(Whois::Parser::Registrar) - expect(subject.registrar.id).to eq("292") - expect(subject.registrar.name).to eq("MarkMonitor Inc.") - expect(subject.registrar.url).to eq("http://www.markmonitor.com") - end - end - describe "#registrant_contacts" do - it do - expect(subject.registrant_contacts).to be_a(Array) - expect(subject.registrant_contacts.size).to eq(1) - expect(subject.registrant_contacts[0]).to be_a(Whois::Parser::Contact) - expect(subject.registrant_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_REGISTRANT) - expect(subject.registrant_contacts[0].id).to eq(nil) - expect(subject.registrant_contacts[0].name).to eq(nil) - expect(subject.registrant_contacts[0].organization).to eq("Google Inc.") - expect(subject.registrant_contacts[0].address).to eq(nil) - expect(subject.registrant_contacts[0].city).to eq(nil) - expect(subject.registrant_contacts[0].zip).to eq(nil) - expect(subject.registrant_contacts[0].state).to eq("CA") - expect(subject.registrant_contacts[0].country_code).to eq("US") - expect(subject.registrant_contacts[0].phone).to eq(nil) - expect(subject.registrant_contacts[0].fax).to eq(nil) - expect(subject.registrant_contacts[0].email).to eq(nil) - end - end - describe "#admin_contacts" do - it do - expect(subject.admin_contacts).to be_a(Array) - expect(subject.admin_contacts.size).to eq(0) - end - end - describe "#technical_contacts" do - it do - expect(subject.technical_contacts).to be_a(Array) - expect(subject.technical_contacts.size).to eq(0) - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers.size).to eq(2) - expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[0].name).to eq("ns1.google.com") - expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[1].name).to eq("ns2.google.com") - end + it "matches status_registered.expected" do + expect(subject.disclaimer).to eq("Access to WHOIS information is provided to assist persons in determining the contents of a domain name registration record in the registry database. The data in this record is provided by The Registry Operator for informational purposes only, and accuracy is not guaranteed. 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. Registry Operator reserves the right to modify these terms at any time. By submitting this query, you agree to abide by this policy. The Registrar of Record identified in this output may have an RDDS service that can be queried for additional information on how to contact the Registrant, Admin, or Tech contact of the queried domain name.") + expect(subject.domain).to eq("google.sc") + expect(subject.domain_id).to eq("D105800000000047234-AGRS") + expect(subject.status).to eq(["clientDeleteProhibited https://icann.org/epp#clientDeleteProhibited", "clientTransferProhibited https://icann.org/epp#clientTransferProhibited", "clientUpdateProhibited https://icann.org/epp#clientUpdateProhibited"]) + expect(subject.available?).to eq(false) + expect(subject.registered?).to eq(true) + expect(subject.created_on).to be_a(Time) + expect(subject.created_on).to eq(DateTime.parse("2004-02-03 19:19:12 UTC")) + expect(subject.updated_on).to be_a(Time) + expect(subject.updated_on).to eq(DateTime.parse("2021-01-02 10:34:05 UTC")) + expect(subject.expires_on).to be_a(Time) + expect(subject.expires_on).to eq(DateTime.parse("2022-02-03 19:19:12 UTC")) + expect(subject.registrar).to be_a(Whois::Parser::Registrar) + expect(subject.registrar.id).to eq("292") + expect(subject.registrar.name).to eq("MarkMonitor Inc.") + expect(subject.registrar.url).to eq("http://www.markmonitor.com") + expect(subject.registrant_contacts).to be_a(Array) + expect(subject.registrant_contacts.size).to eq(1) + expect(subject.registrant_contacts[0]).to be_a(Whois::Parser::Contact) + expect(subject.registrant_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_REGISTRANT) + expect(subject.registrant_contacts[0].id).to eq(nil) + expect(subject.registrant_contacts[0].name).to eq(nil) + expect(subject.registrant_contacts[0].organization).to eq("Google Inc.") + expect(subject.registrant_contacts[0].address).to eq(nil) + expect(subject.registrant_contacts[0].city).to eq(nil) + expect(subject.registrant_contacts[0].zip).to eq(nil) + expect(subject.registrant_contacts[0].state).to eq("CA") + expect(subject.registrant_contacts[0].country_code).to eq("US") + expect(subject.registrant_contacts[0].phone).to eq(nil) + expect(subject.registrant_contacts[0].fax).to eq(nil) + expect(subject.registrant_contacts[0].email).to eq(nil) + expect(subject.admin_contacts).to be_a(Array) + expect(subject.admin_contacts.size).to eq(0) + expect(subject.technical_contacts).to be_a(Array) + expect(subject.technical_contacts.size).to eq(0) + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers.size).to eq(2) + expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[0].name).to eq("ns1.google.com") + expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[1].name).to eq("ns2.google.com") end end diff --git a/spec/whois/parsers/responses/whois.afilias-grs.info/vc/status_available_spec.rb b/spec/whois/parsers/responses/whois.afilias-grs.info/vc/status_available_spec.rb index 2ff98b2f..a28874dc 100644 --- a/spec/whois/parsers/responses/whois.afilias-grs.info/vc/status_available_spec.rb +++ b/spec/whois/parsers/responses/whois.afilias-grs.info/vc/status_available_spec.rb @@ -11,88 +11,33 @@ # require 'spec_helper' -require 'whois/parsers/whois.afilias-grs.info.rb' -describe Whois::Parsers::WhoisAfiliasGrsInfo, "status_available.expected" do +describe "whois.afilias-grs.info", :aggregate_failures do subject do file = fixture("responses", "whois.afilias-grs.info/vc/status_available.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.afilias-grs.info") + Whois::Parser.parser_for(part) end - describe "#disclaimer" do - it do - expect(subject.disclaimer).to eq("Access to WHOIS information is provided to assist persons in determining the contents of a domain name registration record in the registry database. The data in this record is provided by The Registry Operator for informational purposes only, and accuracy is not guaranteed. 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. Registry Operator reserves the right to modify these terms at any time. By submitting this query, you agree to abide by this policy. The Registrar of Record identified in this output may have an RDDS service that can be queried for additional information on how to contact the Registrant, Admin, or Tech contact of the queried domain name.") - end - end - describe "#domain" do - it do - expect(subject.domain).to eq(nil) - end - end - describe "#domain_id" do - it do - expect(subject.domain_id).to eq(nil) - end - end - describe "#status" do - it do - expect(subject.status).to eq([]) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(true) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(false) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to eq(nil) - end - end - describe "#updated_on" do - it do - expect(subject.updated_on).to eq(nil) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to eq(nil) - end - end - describe "#registrar" do - it do - expect(subject.registrar).to eq(nil) - end - end - describe "#registrant_contacts" do - it do - expect(subject.registrant_contacts).to be_a(Array) - expect(subject.registrant_contacts).to eq([]) - end - end - describe "#admin_contacts" do - it do - expect(subject.admin_contacts).to be_a(Array) - expect(subject.admin_contacts).to eq([]) - end - end - describe "#technical_contacts" do - it do - expect(subject.technical_contacts).to be_a(Array) - expect(subject.technical_contacts).to eq([]) - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers).to eq([]) - end + it "matches status_available.expected" do + expect(subject.disclaimer).to eq("Access to WHOIS information is provided to assist persons in determining the contents of a domain name registration record in the registry database. The data in this record is provided by The Registry Operator for informational purposes only, and accuracy is not guaranteed. 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. Registry Operator reserves the right to modify these terms at any time. By submitting this query, you agree to abide by this policy. The Registrar of Record identified in this output may have an RDDS service that can be queried for additional information on how to contact the Registrant, Admin, or Tech contact of the queried domain name.") + expect(subject.domain).to eq(nil) + expect(subject.domain_id).to eq(nil) + expect(subject.status).to eq([]) + expect(subject.available?).to eq(true) + expect(subject.registered?).to eq(false) + expect(subject.created_on).to eq(nil) + expect(subject.updated_on).to eq(nil) + expect(subject.expires_on).to eq(nil) + expect(subject.registrar).to eq(nil) + expect(subject.registrant_contacts).to be_a(Array) + expect(subject.registrant_contacts).to eq([]) + expect(subject.admin_contacts).to be_a(Array) + expect(subject.admin_contacts).to eq([]) + expect(subject.technical_contacts).to be_a(Array) + expect(subject.technical_contacts).to eq([]) + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers).to eq([]) end end diff --git a/spec/whois/parsers/responses/whois.afilias-grs.info/vc/status_registered_spec.rb b/spec/whois/parsers/responses/whois.afilias-grs.info/vc/status_registered_spec.rb index 7c5c994e..3b2394f0 100644 --- a/spec/whois/parsers/responses/whois.afilias-grs.info/vc/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.afilias-grs.info/vc/status_registered_spec.rb @@ -11,115 +11,60 @@ # require 'spec_helper' -require 'whois/parsers/whois.afilias-grs.info.rb' -describe Whois::Parsers::WhoisAfiliasGrsInfo, "status_registered.expected" do +describe "whois.afilias-grs.info", :aggregate_failures do subject do file = fixture("responses", "whois.afilias-grs.info/vc/status_registered.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.afilias-grs.info") + Whois::Parser.parser_for(part) end - describe "#disclaimer" do - it do - expect(subject.disclaimer).to eq("Access to WHOIS information is provided to assist persons in determining the contents of a domain name registration record in the registry database. The data in this record is provided by The Registry Operator for informational purposes only, and accuracy is not guaranteed. 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. Registry Operator reserves the right to modify these terms at any time. By submitting this query, you agree to abide by this policy. The Registrar of Record identified in this output may have an RDDS service that can be queried for additional information on how to contact the Registrant, Admin, or Tech contact of the queried domain name.") - end - end - describe "#domain" do - it do - expect(subject.domain).to eq("google.vc") - end - end - describe "#domain_id" do - it do - expect(subject.domain_id).to eq("D105800000000133753-AGRS") - end - end - describe "#status" do - it do - expect(subject.status).to eq(["clientDeleteProhibited https://icann.org/epp#clientDeleteProhibited", "clientTransferProhibited https://icann.org/epp#clientTransferProhibited", "clientUpdateProhibited https://icann.org/epp#clientUpdateProhibited"]) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(false) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(true) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to be_a(Time) - expect(subject.created_on).to eq(DateTime.parse("2005-06-29 00:58:18 UTC")) - end - end - describe "#updated_on" do - it do - expect(subject.updated_on).to be_a(Time) - expect(subject.updated_on).to eq(DateTime.parse("2021-05-28 09:37:54 UTC")) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to be_a(Time) - expect(subject.expires_on).to eq(DateTime.parse("2022-06-29 00:58:18 UTC")) - end - end - describe "#registrar" do - it do - expect(subject.registrar).to be_a(Whois::Parser::Registrar) - expect(subject.registrar.id).to eq("292") - expect(subject.registrar.name).to eq("MarkMonitor Inc.") - expect(subject.registrar.url).to eq("http://www.markmonitor.com") - end - end - describe "#registrant_contacts" do - it do - expect(subject.registrant_contacts).to be_a(Array) - expect(subject.registrant_contacts.size).to eq(1) - expect(subject.registrant_contacts[0]).to be_a(Whois::Parser::Contact) - expect(subject.registrant_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_REGISTRANT) - expect(subject.registrant_contacts[0].id).to eq(nil) - expect(subject.registrant_contacts[0].name).to eq(nil) - expect(subject.registrant_contacts[0].organization).to eq("Google Inc.") - expect(subject.registrant_contacts[0].address).to eq(nil) - expect(subject.registrant_contacts[0].city).to eq(nil) - expect(subject.registrant_contacts[0].zip).to eq(nil) - expect(subject.registrant_contacts[0].state).to eq("CA") - expect(subject.registrant_contacts[0].country_code).to eq("US") - expect(subject.registrant_contacts[0].phone).to eq(nil) - expect(subject.registrant_contacts[0].fax).to eq(nil) - expect(subject.registrant_contacts[0].email).to eq(nil) - end - end - describe "#admin_contacts" do - it do - expect(subject.admin_contacts).to be_a(Array) - expect(subject.admin_contacts.size).to eq(0) - end - end - describe "#technical_contacts" do - it do - expect(subject.technical_contacts).to be_a(Array) - expect(subject.technical_contacts.size).to eq(0) - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers.size).to eq(4) - expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[0].name).to eq("ns1.google.com") - expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[1].name).to eq("ns2.google.com") - expect(subject.nameservers[2]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[2].name).to eq("ns4.google.com") - expect(subject.nameservers[3]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[3].name).to eq("ns3.google.com") - end + it "matches status_registered.expected" do + expect(subject.disclaimer).to eq("Access to WHOIS information is provided to assist persons in determining the contents of a domain name registration record in the registry database. The data in this record is provided by The Registry Operator for informational purposes only, and accuracy is not guaranteed. 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. Registry Operator reserves the right to modify these terms at any time. By submitting this query, you agree to abide by this policy. The Registrar of Record identified in this output may have an RDDS service that can be queried for additional information on how to contact the Registrant, Admin, or Tech contact of the queried domain name.") + expect(subject.domain).to eq("google.vc") + expect(subject.domain_id).to eq("D105800000000133753-AGRS") + expect(subject.status).to eq(["clientDeleteProhibited https://icann.org/epp#clientDeleteProhibited", "clientTransferProhibited https://icann.org/epp#clientTransferProhibited", "clientUpdateProhibited https://icann.org/epp#clientUpdateProhibited"]) + expect(subject.available?).to eq(false) + expect(subject.registered?).to eq(true) + expect(subject.created_on).to be_a(Time) + expect(subject.created_on).to eq(DateTime.parse("2005-06-29 00:58:18 UTC")) + expect(subject.updated_on).to be_a(Time) + expect(subject.updated_on).to eq(DateTime.parse("2021-05-28 09:37:54 UTC")) + expect(subject.expires_on).to be_a(Time) + expect(subject.expires_on).to eq(DateTime.parse("2022-06-29 00:58:18 UTC")) + expect(subject.registrar).to be_a(Whois::Parser::Registrar) + expect(subject.registrar.id).to eq("292") + expect(subject.registrar.name).to eq("MarkMonitor Inc.") + expect(subject.registrar.url).to eq("http://www.markmonitor.com") + expect(subject.registrant_contacts).to be_a(Array) + expect(subject.registrant_contacts.size).to eq(1) + expect(subject.registrant_contacts[0]).to be_a(Whois::Parser::Contact) + expect(subject.registrant_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_REGISTRANT) + expect(subject.registrant_contacts[0].id).to eq(nil) + expect(subject.registrant_contacts[0].name).to eq(nil) + expect(subject.registrant_contacts[0].organization).to eq("Google Inc.") + expect(subject.registrant_contacts[0].address).to eq(nil) + expect(subject.registrant_contacts[0].city).to eq(nil) + expect(subject.registrant_contacts[0].zip).to eq(nil) + expect(subject.registrant_contacts[0].state).to eq("CA") + expect(subject.registrant_contacts[0].country_code).to eq("US") + expect(subject.registrant_contacts[0].phone).to eq(nil) + expect(subject.registrant_contacts[0].fax).to eq(nil) + expect(subject.registrant_contacts[0].email).to eq(nil) + expect(subject.admin_contacts).to be_a(Array) + expect(subject.admin_contacts.size).to eq(0) + expect(subject.technical_contacts).to be_a(Array) + expect(subject.technical_contacts.size).to eq(0) + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers.size).to eq(4) + expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[0].name).to eq("ns1.google.com") + expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[1].name).to eq("ns2.google.com") + expect(subject.nameservers[2]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[2].name).to eq("ns4.google.com") + expect(subject.nameservers[3]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[3].name).to eq("ns3.google.com") end end diff --git a/spec/whois/parsers/responses/whois.afilias.net/info/response_throttled_spec.rb b/spec/whois/parsers/responses/whois.afilias.net/info/response_throttled_spec.rb index b780c5ca..79d3571c 100644 --- a/spec/whois/parsers/responses/whois.afilias.net/info/response_throttled_spec.rb +++ b/spec/whois/parsers/responses/whois.afilias.net/info/response_throttled_spec.rb @@ -11,19 +11,16 @@ # require 'spec_helper' -require 'whois/parsers/whois.afilias.net.rb' -describe Whois::Parsers::WhoisAfiliasNet, "response_throttled.expected" do +describe "whois.afilias.net", :aggregate_failures do subject do file = fixture("responses", "whois.afilias.net/info/response_throttled.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.afilias.net") + Whois::Parser.parser_for(part) end - describe "#response_throttled?" do - it do - expect(subject.response_throttled?).to eq(true) - end + it "matches response_throttled.expected" do + expect(subject.response_throttled?).to eq(true) end end diff --git a/spec/whois/parsers/responses/whois.afilias.net/info/status_available_spec.rb b/spec/whois/parsers/responses/whois.afilias.net/info/status_available_spec.rb index 51521dc9..5bddde43 100644 --- a/spec/whois/parsers/responses/whois.afilias.net/info/status_available_spec.rb +++ b/spec/whois/parsers/responses/whois.afilias.net/info/status_available_spec.rb @@ -11,88 +11,33 @@ # require 'spec_helper' -require 'whois/parsers/whois.afilias.net.rb' -describe Whois::Parsers::WhoisAfiliasNet, "status_available.expected" do +describe "whois.afilias.net", :aggregate_failures do subject do file = fixture("responses", "whois.afilias.net/info/status_available.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.afilias.net") + Whois::Parser.parser_for(part) end - describe "#disclaimer" do - it do - expect(subject.disclaimer).to eq("Access to AFILIAS WHOIS information is provided to assist persons in determining the contents of a domain name registration record in the Afilias registry database. The data in this record is provided by Afilias Limited for informational purposes only, and Afilias 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. Afilias reserves the right to modify these terms at any time. By submitting this query, you agree to abide by this policy. The Registrar of Record identified in this output may have an RDDS service that can be queried for additional information on how to contact the Registrant, Admin, or Tech contact of the queried domain name.") - end - end - describe "#domain" do - it do - expect(subject.domain).to eq(nil) - end - end - describe "#domain_id" do - it do - expect(subject.domain_id).to eq(nil) - end - end - describe "#status" do - it do - expect(subject.status).to eq([]) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(true) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(false) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to eq(nil) - end - end - describe "#updated_on" do - it do - expect(subject.updated_on).to eq(nil) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to eq(nil) - end - end - describe "#registrar" do - it do - expect(subject.registrar).to eq(nil) - end - end - describe "#registrant_contacts" do - it do - expect(subject.registrant_contacts).to be_a(Array) - expect(subject.registrant_contacts).to eq([]) - end - end - describe "#admin_contacts" do - it do - expect(subject.admin_contacts).to be_a(Array) - expect(subject.admin_contacts).to eq([]) - end - end - describe "#technical_contacts" do - it do - expect(subject.technical_contacts).to be_a(Array) - expect(subject.technical_contacts).to eq([]) - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers).to eq([]) - end + it "matches status_available.expected" do + expect(subject.disclaimer).to eq("Access to AFILIAS WHOIS information is provided to assist persons in determining the contents of a domain name registration record in the Afilias registry database. The data in this record is provided by Afilias Limited for informational purposes only, and Afilias 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. Afilias reserves the right to modify these terms at any time. By submitting this query, you agree to abide by this policy. The Registrar of Record identified in this output may have an RDDS service that can be queried for additional information on how to contact the Registrant, Admin, or Tech contact of the queried domain name.") + expect(subject.domain).to eq(nil) + expect(subject.domain_id).to eq(nil) + expect(subject.status).to eq([]) + expect(subject.available?).to eq(true) + expect(subject.registered?).to eq(false) + expect(subject.created_on).to eq(nil) + expect(subject.updated_on).to eq(nil) + expect(subject.expires_on).to eq(nil) + expect(subject.registrar).to eq(nil) + expect(subject.registrant_contacts).to be_a(Array) + expect(subject.registrant_contacts).to eq([]) + expect(subject.admin_contacts).to be_a(Array) + expect(subject.admin_contacts).to eq([]) + expect(subject.technical_contacts).to be_a(Array) + expect(subject.technical_contacts).to eq([]) + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers).to eq([]) end end diff --git a/spec/whois/parsers/responses/whois.afilias.net/info/status_registered_spec.rb b/spec/whois/parsers/responses/whois.afilias.net/info/status_registered_spec.rb index f8ea4812..b8baa369 100644 --- a/spec/whois/parsers/responses/whois.afilias.net/info/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.afilias.net/info/status_registered_spec.rb @@ -11,115 +11,60 @@ # require 'spec_helper' -require 'whois/parsers/whois.afilias.net.rb' -describe Whois::Parsers::WhoisAfiliasNet, "status_registered.expected" do +describe "whois.afilias.net", :aggregate_failures do subject do file = fixture("responses", "whois.afilias.net/info/status_registered.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.afilias.net") + Whois::Parser.parser_for(part) end - describe "#disclaimer" do - it do - expect(subject.disclaimer).to eq("Access to AFILIAS WHOIS information is provided to assist persons in determining the contents of a domain name registration record in the Afilias registry database. The data in this record is provided by Afilias Limited for informational purposes only, and Afilias 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. Afilias reserves the right to modify these terms at any time. By submitting this query, you agree to abide by this policy. The Registrar of Record identified in this output may have an RDDS service that can be queried for additional information on how to contact the Registrant, Admin, or Tech contact of the queried domain name.") - end - end - describe "#domain" do - it do - expect(subject.domain).to eq("google.info") - end - end - describe "#domain_id" do - it do - expect(subject.domain_id).to eq("D37288-LRMS") - end - end - describe "#status" do - it do - expect(subject.status).to eq(["clientDeleteProhibited https://icann.org/epp#clientDeleteProhibited", "clientTransferProhibited https://icann.org/epp#clientTransferProhibited", "clientUpdateProhibited https://icann.org/epp#clientUpdateProhibited", "serverDeleteProhibited https://icann.org/epp#serverDeleteProhibited", "serverTransferProhibited https://icann.org/epp#serverTransferProhibited", "serverUpdateProhibited https://icann.org/epp#serverUpdateProhibited"]) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(false) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(true) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to be_a(Time) - expect(subject.created_on).to eq(DateTime.parse("2001-07-31 23:57:50 UTC")) - end - end - describe "#updated_on" do - it do - expect(subject.updated_on).to be_a(Time) - expect(subject.updated_on).to eq(DateTime.parse("2021-06-29 09:31:10 UTC")) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to be_a(Time) - expect(subject.expires_on).to eq(DateTime.parse("2022-07-31 23:57:50 UTC")) - end - end - describe "#registrar" do - it do - expect(subject.registrar).to be_a(Whois::Parser::Registrar) - expect(subject.registrar.id).to eq("292") - expect(subject.registrar.name).to eq("MarkMonitor Inc.") - expect(subject.registrar.url).to eq("http://www.markmonitor.com") - end - end - describe "#registrant_contacts" do - it do - expect(subject.registrant_contacts).to be_a(Array) - expect(subject.registrant_contacts.size).to eq(1) - expect(subject.registrant_contacts[0]).to be_a(Whois::Parser::Contact) - expect(subject.registrant_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_REGISTRANT) - expect(subject.registrant_contacts[0].id).to eq(nil) - expect(subject.registrant_contacts[0].name).to eq(nil) - expect(subject.registrant_contacts[0].organization).to eq("Google LLC") - expect(subject.registrant_contacts[0].address).to eq(nil) - expect(subject.registrant_contacts[0].city).to eq(nil) - expect(subject.registrant_contacts[0].zip).to eq(nil) - expect(subject.registrant_contacts[0].state).to eq("CA") - expect(subject.registrant_contacts[0].country_code).to eq("US") - expect(subject.registrant_contacts[0].phone).to eq(nil) - expect(subject.registrant_contacts[0].fax).to eq(nil) - expect(subject.registrant_contacts[0].email).to eq(nil) - end - end - describe "#admin_contacts" do - it do - expect(subject.admin_contacts).to be_a(Array) - expect(subject.admin_contacts.size).to eq(0) - end - end - describe "#technical_contacts" do - it do - expect(subject.technical_contacts).to be_a(Array) - expect(subject.technical_contacts.size).to eq(0) - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers.size).to eq(4) - expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[0].name).to eq("ns1.google.com") - expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[1].name).to eq("ns2.google.com") - expect(subject.nameservers[2]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[2].name).to eq("ns3.google.com") - expect(subject.nameservers[3]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[3].name).to eq("ns4.google.com") - end + it "matches status_registered.expected" do + expect(subject.disclaimer).to eq("Access to AFILIAS WHOIS information is provided to assist persons in determining the contents of a domain name registration record in the Afilias registry database. The data in this record is provided by Afilias Limited for informational purposes only, and Afilias 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. Afilias reserves the right to modify these terms at any time. By submitting this query, you agree to abide by this policy. The Registrar of Record identified in this output may have an RDDS service that can be queried for additional information on how to contact the Registrant, Admin, or Tech contact of the queried domain name.") + expect(subject.domain).to eq("google.info") + expect(subject.domain_id).to eq("D37288-LRMS") + expect(subject.status).to eq(["clientDeleteProhibited https://icann.org/epp#clientDeleteProhibited", "clientTransferProhibited https://icann.org/epp#clientTransferProhibited", "clientUpdateProhibited https://icann.org/epp#clientUpdateProhibited", "serverDeleteProhibited https://icann.org/epp#serverDeleteProhibited", "serverTransferProhibited https://icann.org/epp#serverTransferProhibited", "serverUpdateProhibited https://icann.org/epp#serverUpdateProhibited"]) + expect(subject.available?).to eq(false) + expect(subject.registered?).to eq(true) + expect(subject.created_on).to be_a(Time) + expect(subject.created_on).to eq(DateTime.parse("2001-07-31 23:57:50 UTC")) + expect(subject.updated_on).to be_a(Time) + expect(subject.updated_on).to eq(DateTime.parse("2021-06-29 09:31:10 UTC")) + expect(subject.expires_on).to be_a(Time) + expect(subject.expires_on).to eq(DateTime.parse("2022-07-31 23:57:50 UTC")) + expect(subject.registrar).to be_a(Whois::Parser::Registrar) + expect(subject.registrar.id).to eq("292") + expect(subject.registrar.name).to eq("MarkMonitor Inc.") + expect(subject.registrar.url).to eq("http://www.markmonitor.com") + expect(subject.registrant_contacts).to be_a(Array) + expect(subject.registrant_contacts.size).to eq(1) + expect(subject.registrant_contacts[0]).to be_a(Whois::Parser::Contact) + expect(subject.registrant_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_REGISTRANT) + expect(subject.registrant_contacts[0].id).to eq(nil) + expect(subject.registrant_contacts[0].name).to eq(nil) + expect(subject.registrant_contacts[0].organization).to eq("Google LLC") + expect(subject.registrant_contacts[0].address).to eq(nil) + expect(subject.registrant_contacts[0].city).to eq(nil) + expect(subject.registrant_contacts[0].zip).to eq(nil) + expect(subject.registrant_contacts[0].state).to eq("CA") + expect(subject.registrant_contacts[0].country_code).to eq("US") + expect(subject.registrant_contacts[0].phone).to eq(nil) + expect(subject.registrant_contacts[0].fax).to eq(nil) + expect(subject.registrant_contacts[0].email).to eq(nil) + expect(subject.admin_contacts).to be_a(Array) + expect(subject.admin_contacts.size).to eq(0) + expect(subject.technical_contacts).to be_a(Array) + expect(subject.technical_contacts.size).to eq(0) + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers.size).to eq(4) + expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[0].name).to eq("ns1.google.com") + expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[1].name).to eq("ns2.google.com") + expect(subject.nameservers[2]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[2].name).to eq("ns3.google.com") + expect(subject.nameservers[3]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[3].name).to eq("ns4.google.com") end end diff --git a/spec/whois/parsers/responses/whois.afilias.net/info/status_reserved_spec.rb b/spec/whois/parsers/responses/whois.afilias.net/info/status_reserved_spec.rb index 3f47a3a6..ae11d83e 100644 --- a/spec/whois/parsers/responses/whois.afilias.net/info/status_reserved_spec.rb +++ b/spec/whois/parsers/responses/whois.afilias.net/info/status_reserved_spec.rb @@ -11,24 +11,17 @@ # require 'spec_helper' -require 'whois/parsers/whois.afilias.net.rb' -describe Whois::Parsers::WhoisAfiliasNet, "status_reserved.expected" do +describe "whois.afilias.net", :aggregate_failures do subject do file = fixture("responses", "whois.afilias.net/info/status_reserved.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.afilias.net") + Whois::Parser.parser_for(part) end - describe "#status" do - it do - expect(subject.status).to eq(:reserved) - end - end - describe "#reserved?" do - it do - expect(subject.reserved?).to eq(true) - end + it "matches status_reserved.expected" do + expect(subject.status).to eq(:reserved) + expect(subject.reserved?).to eq(true) end end diff --git a/spec/whois/parsers/responses/whois.afilias.net/pro/status_available_spec.rb b/spec/whois/parsers/responses/whois.afilias.net/pro/status_available_spec.rb index 92d47356..c9d2bbcc 100644 --- a/spec/whois/parsers/responses/whois.afilias.net/pro/status_available_spec.rb +++ b/spec/whois/parsers/responses/whois.afilias.net/pro/status_available_spec.rb @@ -11,88 +11,33 @@ # require 'spec_helper' -require 'whois/parsers/whois.afilias.net.rb' -describe Whois::Parsers::WhoisAfiliasNet, "status_available.expected" do +describe "whois.afilias.net", :aggregate_failures do subject do file = fixture("responses", "whois.afilias.net/pro/status_available.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.afilias.net") + Whois::Parser.parser_for(part) end - describe "#disclaimer" do - it do - expect(subject.disclaimer).to eq("Access to AFILIAS WHOIS information is provided to assist persons in determining the contents of a domain name registration record in the Afilias registry database. The data in this record is provided by Afilias Limited for informational purposes only, and Afilias 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. Afilias reserves the right to modify these terms at any time. By submitting this query, you agree to abide by this policy. The Registrar of Record identified in this output may have an RDDS service that can be queried for additional information on how to contact the Registrant, Admin, or Tech contact of the queried domain name.") - end - end - describe "#domain" do - it do - expect(subject.domain).to eq(nil) - end - end - describe "#domain_id" do - it do - expect(subject.domain_id).to eq(nil) - end - end - describe "#status" do - it do - expect(subject.status).to eq([]) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(true) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(false) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to eq(nil) - end - end - describe "#updated_on" do - it do - expect(subject.updated_on).to eq(nil) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to eq(nil) - end - end - describe "#registrar" do - it do - expect(subject.registrar).to eq(nil) - end - end - describe "#registrant_contacts" do - it do - expect(subject.registrant_contacts).to be_a(Array) - expect(subject.registrant_contacts).to eq([]) - end - end - describe "#admin_contacts" do - it do - expect(subject.admin_contacts).to be_a(Array) - expect(subject.admin_contacts).to eq([]) - end - end - describe "#technical_contacts" do - it do - expect(subject.technical_contacts).to be_a(Array) - expect(subject.technical_contacts).to eq([]) - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers).to eq([]) - end + it "matches status_available.expected" do + expect(subject.disclaimer).to eq("Access to AFILIAS WHOIS information is provided to assist persons in determining the contents of a domain name registration record in the Afilias registry database. The data in this record is provided by Afilias Limited for informational purposes only, and Afilias 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. Afilias reserves the right to modify these terms at any time. By submitting this query, you agree to abide by this policy. The Registrar of Record identified in this output may have an RDDS service that can be queried for additional information on how to contact the Registrant, Admin, or Tech contact of the queried domain name.") + expect(subject.domain).to eq(nil) + expect(subject.domain_id).to eq(nil) + expect(subject.status).to eq([]) + expect(subject.available?).to eq(true) + expect(subject.registered?).to eq(false) + expect(subject.created_on).to eq(nil) + expect(subject.updated_on).to eq(nil) + expect(subject.expires_on).to eq(nil) + expect(subject.registrar).to eq(nil) + expect(subject.registrant_contacts).to be_a(Array) + expect(subject.registrant_contacts).to eq([]) + expect(subject.admin_contacts).to be_a(Array) + expect(subject.admin_contacts).to eq([]) + expect(subject.technical_contacts).to be_a(Array) + expect(subject.technical_contacts).to eq([]) + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers).to eq([]) end end diff --git a/spec/whois/parsers/responses/whois.afilias.net/pro/status_registered_spec.rb b/spec/whois/parsers/responses/whois.afilias.net/pro/status_registered_spec.rb index e16e0800..901e98ed 100644 --- a/spec/whois/parsers/responses/whois.afilias.net/pro/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.afilias.net/pro/status_registered_spec.rb @@ -11,115 +11,60 @@ # require 'spec_helper' -require 'whois/parsers/whois.afilias.net.rb' -describe Whois::Parsers::WhoisAfiliasNet, "status_registered.expected" do +describe "whois.afilias.net", :aggregate_failures do subject do file = fixture("responses", "whois.afilias.net/pro/status_registered.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.afilias.net") + Whois::Parser.parser_for(part) end - describe "#disclaimer" do - it do - expect(subject.disclaimer).to eq("Access to AFILIAS WHOIS information is provided to assist persons in determining the contents of a domain name registration record in the Afilias registry database. The data in this record is provided by Afilias Limited for informational purposes only, and Afilias 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. Afilias reserves the right to modify these terms at any time. By submitting this query, you agree to abide by this policy. The Registrar of Record identified in this output may have an RDDS service that can be queried for additional information on how to contact the Registrant, Admin, or Tech contact of the queried domain name.") - end - end - describe "#domain" do - it do - expect(subject.domain).to eq("google.pro") - end - end - describe "#domain_id" do - it do - expect(subject.domain_id).to eq("D107300000000011545-LRMS") - end - end - describe "#status" do - it do - expect(subject.status).to eq(["clientDeleteProhibited https://icann.org/epp#clientDeleteProhibited", "clientTransferProhibited https://icann.org/epp#clientTransferProhibited", "clientUpdateProhibited https://icann.org/epp#clientUpdateProhibited"]) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(false) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(true) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to be_a(Time) - expect(subject.created_on).to eq(DateTime.parse("2008-07-22 00:00:00 UTC")) - end - end - describe "#updated_on" do - it do - expect(subject.updated_on).to be_a(Time) - expect(subject.updated_on).to eq(DateTime.parse("2021-08-07 09:34:10 UTC")) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to be_a(Time) - expect(subject.expires_on).to eq(DateTime.parse("2022-09-08 00:00:00 UTC")) - end - end - describe "#registrar" do - it do - expect(subject.registrar).to be_a(Whois::Parser::Registrar) - expect(subject.registrar.id).to eq("292") - expect(subject.registrar.name).to eq("MarkMonitor Inc.") - expect(subject.registrar.url).to eq("http://www.markmonitor.com") - end - end - describe "#registrant_contacts" do - it do - expect(subject.registrant_contacts).to be_a(Array) - expect(subject.registrant_contacts.size).to eq(1) - expect(subject.registrant_contacts[0]).to be_a(Whois::Parser::Contact) - expect(subject.registrant_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_REGISTRANT) - expect(subject.registrant_contacts[0].id).to eq(nil) - expect(subject.registrant_contacts[0].name).to eq(nil) - expect(subject.registrant_contacts[0].organization).to eq("Google Inc.") - expect(subject.registrant_contacts[0].address).to eq(nil) - expect(subject.registrant_contacts[0].city).to eq(nil) - expect(subject.registrant_contacts[0].zip).to eq(nil) - expect(subject.registrant_contacts[0].state).to eq("CA") - expect(subject.registrant_contacts[0].country_code).to eq("US") - expect(subject.registrant_contacts[0].phone).to eq(nil) - expect(subject.registrant_contacts[0].fax).to eq(nil) - expect(subject.registrant_contacts[0].email).to eq(nil) - end - end - describe "#admin_contacts" do - it do - expect(subject.admin_contacts).to be_a(Array) - expect(subject.admin_contacts.size).to eq(0) - end - end - describe "#technical_contacts" do - it do - expect(subject.technical_contacts).to be_a(Array) - expect(subject.technical_contacts.size).to eq(0) - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers.size).to eq(2) - expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[0].name).to eq("ns1.google.com") - expect(subject.nameservers[0].ipv4).to eq(nil) - expect(subject.nameservers[0].ipv6).to eq(nil) - expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[1].name).to eq("ns2.google.com") - expect(subject.nameservers[1].ipv4).to eq(nil) - expect(subject.nameservers[1].ipv6).to eq(nil) - end + it "matches status_registered.expected" do + expect(subject.disclaimer).to eq("Access to AFILIAS WHOIS information is provided to assist persons in determining the contents of a domain name registration record in the Afilias registry database. The data in this record is provided by Afilias Limited for informational purposes only, and Afilias 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. Afilias reserves the right to modify these terms at any time. By submitting this query, you agree to abide by this policy. The Registrar of Record identified in this output may have an RDDS service that can be queried for additional information on how to contact the Registrant, Admin, or Tech contact of the queried domain name.") + expect(subject.domain).to eq("google.pro") + expect(subject.domain_id).to eq("D107300000000011545-LRMS") + expect(subject.status).to eq(["clientDeleteProhibited https://icann.org/epp#clientDeleteProhibited", "clientTransferProhibited https://icann.org/epp#clientTransferProhibited", "clientUpdateProhibited https://icann.org/epp#clientUpdateProhibited"]) + expect(subject.available?).to eq(false) + expect(subject.registered?).to eq(true) + expect(subject.created_on).to be_a(Time) + expect(subject.created_on).to eq(DateTime.parse("2008-07-22 00:00:00 UTC")) + expect(subject.updated_on).to be_a(Time) + expect(subject.updated_on).to eq(DateTime.parse("2021-08-07 09:34:10 UTC")) + expect(subject.expires_on).to be_a(Time) + expect(subject.expires_on).to eq(DateTime.parse("2022-09-08 00:00:00 UTC")) + expect(subject.registrar).to be_a(Whois::Parser::Registrar) + expect(subject.registrar.id).to eq("292") + expect(subject.registrar.name).to eq("MarkMonitor Inc.") + expect(subject.registrar.url).to eq("http://www.markmonitor.com") + expect(subject.registrant_contacts).to be_a(Array) + expect(subject.registrant_contacts.size).to eq(1) + expect(subject.registrant_contacts[0]).to be_a(Whois::Parser::Contact) + expect(subject.registrant_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_REGISTRANT) + expect(subject.registrant_contacts[0].id).to eq(nil) + expect(subject.registrant_contacts[0].name).to eq(nil) + expect(subject.registrant_contacts[0].organization).to eq("Google Inc.") + expect(subject.registrant_contacts[0].address).to eq(nil) + expect(subject.registrant_contacts[0].city).to eq(nil) + expect(subject.registrant_contacts[0].zip).to eq(nil) + expect(subject.registrant_contacts[0].state).to eq("CA") + expect(subject.registrant_contacts[0].country_code).to eq("US") + expect(subject.registrant_contacts[0].phone).to eq(nil) + expect(subject.registrant_contacts[0].fax).to eq(nil) + expect(subject.registrant_contacts[0].email).to eq(nil) + expect(subject.admin_contacts).to be_a(Array) + expect(subject.admin_contacts.size).to eq(0) + expect(subject.technical_contacts).to be_a(Array) + expect(subject.technical_contacts.size).to eq(0) + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers.size).to eq(2) + expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[0].name).to eq("ns1.google.com") + expect(subject.nameservers[0].ipv4).to eq(nil) + expect(subject.nameservers[0].ipv6).to eq(nil) + expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[1].name).to eq("ns2.google.com") + expect(subject.nameservers[1].ipv4).to eq(nil) + expect(subject.nameservers[1].ipv6).to eq(nil) end end diff --git a/spec/whois/parsers/responses/whois.afilias.net/pro/status_reserved_spec.rb b/spec/whois/parsers/responses/whois.afilias.net/pro/status_reserved_spec.rb index b3ea55cf..a9894204 100644 --- a/spec/whois/parsers/responses/whois.afilias.net/pro/status_reserved_spec.rb +++ b/spec/whois/parsers/responses/whois.afilias.net/pro/status_reserved_spec.rb @@ -11,24 +11,17 @@ # require 'spec_helper' -require 'whois/parsers/whois.afilias.net.rb' -describe Whois::Parsers::WhoisAfiliasNet, "status_reserved.expected" do +describe "whois.afilias.net", :aggregate_failures do subject do file = fixture("responses", "whois.afilias.net/pro/status_reserved.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.afilias.net") + Whois::Parser.parser_for(part) end - describe "#status" do - it do - expect(subject.status).to eq(:reserved) - end - end - describe "#reserved?" do - it do - expect(subject.reserved?).to eq(true) - end + it "matches status_reserved.expected" do + expect(subject.status).to eq(:reserved) + expect(subject.reserved?).to eq(true) end end diff --git a/spec/whois/parsers/responses/whois.amnic.net/am/status_available_spec.rb b/spec/whois/parsers/responses/whois.amnic.net/am/status_available_spec.rb index bc3816f1..0f123031 100644 --- a/spec/whois/parsers/responses/whois.amnic.net/am/status_available_spec.rb +++ b/spec/whois/parsers/responses/whois.amnic.net/am/status_available_spec.rb @@ -11,50 +11,23 @@ # require 'spec_helper' -require 'whois/parsers/whois.amnic.net.rb' -describe Whois::Parsers::WhoisAmnicNet, "status_available.expected" do +describe "whois.amnic.net", :aggregate_failures do subject do file = fixture("responses", "whois.amnic.net/am/status_available.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.amnic.net") + Whois::Parser.parser_for(part) end - describe "#status" do - it do - expect(subject.status).to eq(:available) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(true) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(false) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to eq(nil) - end - end - describe "#updated_on" do - it do - expect(subject.updated_on).to eq(nil) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to eq(nil) - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers).to eq([]) - end + it "matches status_available.expected" do + expect(subject.status).to eq(:available) + expect(subject.available?).to eq(true) + expect(subject.registered?).to eq(false) + expect(subject.created_on).to eq(nil) + expect(subject.updated_on).to eq(nil) + expect(subject.expires_on).to eq(nil) + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers).to eq([]) end end diff --git a/spec/whois/parsers/responses/whois.amnic.net/am/status_registered_spec.rb b/spec/whois/parsers/responses/whois.amnic.net/am/status_registered_spec.rb index c38f13eb..f0004413 100644 --- a/spec/whois/parsers/responses/whois.amnic.net/am/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.amnic.net/am/status_registered_spec.rb @@ -11,61 +11,34 @@ # require 'spec_helper' -require 'whois/parsers/whois.amnic.net.rb' -describe Whois::Parsers::WhoisAmnicNet, "status_registered.expected" do +describe "whois.amnic.net", :aggregate_failures do subject do file = fixture("responses", "whois.amnic.net/am/status_registered.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.amnic.net") + Whois::Parser.parser_for(part) end - describe "#status" do - it do - expect(subject.status).to eq(:registered) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(false) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(true) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to be_a(Time) - expect(subject.created_on).to eq(DateTime.parse("1999-06-05")) - end - end - describe "#updated_on" do - it do - expect(subject.updated_on).to be_a(Time) - expect(subject.updated_on).to eq(DateTime.parse("2014-02-13")) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to be_a(Time) - expect(subject.expires_on).to eq(DateTime.parse("2014-04-15")) - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers.size).to eq(4) - expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[0].name).to eq("ns1.google.com") - expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[1].name).to eq("ns2.google.com") - expect(subject.nameservers[2]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[2].name).to eq("ns3.google.com") - expect(subject.nameservers[3]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[3].name).to eq("ns4.google.com") - end + it "matches status_registered.expected" do + expect(subject.status).to eq(:registered) + expect(subject.available?).to eq(false) + expect(subject.registered?).to eq(true) + expect(subject.created_on).to be_a(Time) + expect(subject.created_on).to eq(DateTime.parse("1999-06-05")) + expect(subject.updated_on).to be_a(Time) + expect(subject.updated_on).to eq(DateTime.parse("2014-02-13")) + expect(subject.expires_on).to be_a(Time) + expect(subject.expires_on).to eq(DateTime.parse("2014-04-15")) + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers.size).to eq(4) + expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[0].name).to eq("ns1.google.com") + expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[1].name).to eq("ns2.google.com") + expect(subject.nameservers[2]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[2].name).to eq("ns3.google.com") + expect(subject.nameservers[3]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[3].name).to eq("ns4.google.com") end end diff --git a/spec/whois/parsers/responses/whois.ascio.com/status_available_spec.rb b/spec/whois/parsers/responses/whois.ascio.com/status_available_spec.rb index b52f77dc..1f474547 100644 --- a/spec/whois/parsers/responses/whois.ascio.com/status_available_spec.rb +++ b/spec/whois/parsers/responses/whois.ascio.com/status_available_spec.rb @@ -11,83 +11,32 @@ # require 'spec_helper' -require 'whois/parsers/whois.ascio.com.rb' -describe Whois::Parsers::WhoisAscioCom, "status_available.expected" do +describe "whois.ascio.com", :aggregate_failures do subject do file = fixture("responses", "whois.ascio.com/status_available.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.ascio.com") + Whois::Parser.parser_for(part) end - describe "#domain" do - it do - expect(subject.domain).to eq(nil) - end - end - describe "#domain_id" do - it do - expect(subject.domain_id).to eq(nil) - end - end - describe "#status" do - it do - expect(subject.status).to eq(:available) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(true) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(false) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to eq(nil) - end - end - describe "#updated_on" do - it do - expect(subject.updated_on).to eq(nil) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to eq(nil) - end - end - describe "#registrar" do - it do - expect(subject.registrar).to eq(nil) - end - end - describe "#registrant_contacts" do - it do - expect(subject.registrant_contacts).to be_a(Array) - expect(subject.registrant_contacts).to eq([]) - end - end - describe "#admin_contacts" do - it do - expect(subject.admin_contacts).to be_a(Array) - expect(subject.admin_contacts).to eq([]) - end - end - describe "#technical_contacts" do - it do - expect(subject.technical_contacts).to be_a(Array) - expect(subject.technical_contacts).to eq([]) - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers).to eq([]) - end + it "matches status_available.expected" do + expect(subject.domain).to eq(nil) + expect(subject.domain_id).to eq(nil) + expect(subject.status).to eq(:available) + expect(subject.available?).to eq(true) + expect(subject.registered?).to eq(false) + expect(subject.created_on).to eq(nil) + expect(subject.updated_on).to eq(nil) + expect(subject.expires_on).to eq(nil) + expect(subject.registrar).to eq(nil) + expect(subject.registrant_contacts).to be_a(Array) + expect(subject.registrant_contacts).to eq([]) + expect(subject.admin_contacts).to be_a(Array) + expect(subject.admin_contacts).to eq([]) + expect(subject.technical_contacts).to be_a(Array) + expect(subject.technical_contacts).to eq([]) + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers).to eq([]) end end diff --git a/spec/whois/parsers/responses/whois.ascio.com/status_registered_spec.rb b/spec/whois/parsers/responses/whois.ascio.com/status_registered_spec.rb index 80545599..0cd71c4e 100644 --- a/spec/whois/parsers/responses/whois.ascio.com/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.ascio.com/status_registered_spec.rb @@ -11,133 +11,82 @@ # require 'spec_helper' -require 'whois/parsers/whois.ascio.com.rb' -describe Whois::Parsers::WhoisAscioCom, "status_registered.expected" do +describe "whois.ascio.com", :aggregate_failures do subject do file = fixture("responses", "whois.ascio.com/status_registered.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.ascio.com") + Whois::Parser.parser_for(part) end - describe "#domain" do - it do - expect(subject.domain).to eq("ascio.com") - end - end - describe "#domain_id" do - it do - expect(subject.domain_id).to eq("") - end - end - describe "#status" do - it do - expect(subject.status).to eq(:registered) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(false) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(true) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to be_a(Time) - expect(subject.created_on).to eq(DateTime.parse("2005-03-01 14:11:50 UTC")) - end - end - describe "#updated_on" do - it do - expect(subject.updated_on).to be_a(Time) - expect(subject.updated_on).to eq(DateTime.parse("2013-06-02 00:23:21 UTC")) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to be_a(Time) - expect(subject.expires_on).to eq(DateTime.parse("2014-05-31 00:00:00 UTC")) - end - end - describe "#registrar" do - it do - expect(subject.registrar).to be_a(Whois::Parser::Registrar) - expect(subject.registrar.id).to eq("106") - expect(subject.registrar.name).to eq("Ascio Technologies, Inc") - expect(subject.registrar.url).to eq("http://www.ascio.com") - end - end - describe "#registrant_contacts" do - it do - expect(subject.registrant_contacts).to be_a(Array) - expect(subject.registrant_contacts.size).to eq(1) - expect(subject.registrant_contacts[0]).to be_a(Whois::Parser::Contact) - expect(subject.registrant_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_REGISTRANT) - expect(subject.registrant_contacts[0].name).to eq("Hostmaster Ascio") - expect(subject.registrant_contacts[0].organization).to eq("ASCIO Technologies Inc.") - expect(subject.registrant_contacts[0].address).to eq("Islands Brygge 55") - expect(subject.registrant_contacts[0].city).to eq("Copenhagen") - expect(subject.registrant_contacts[0].zip).to eq("2300") - expect(subject.registrant_contacts[0].state).to eq("S") - expect(subject.registrant_contacts[0].country_code).to eq("DK") - expect(subject.registrant_contacts[0].phone).to eq("") - expect(subject.registrant_contacts[0].fax).to eq("") - expect(subject.registrant_contacts[0].email).to eq("") - end - end - describe "#admin_contacts" do - it do - expect(subject.admin_contacts).to be_a(Array) - expect(subject.admin_contacts.size).to eq(1) - expect(subject.admin_contacts[0]).to be_a(Whois::Parser::Contact) - expect(subject.admin_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_ADMINISTRATIVE) - expect(subject.admin_contacts[0].name).to eq("Technical Hostmaster") - expect(subject.admin_contacts[0].organization).to eq("Speednames") - expect(subject.admin_contacts[0].address).to eq("Rejsbygade 8a") - expect(subject.admin_contacts[0].city).to eq("Copenhagen") - expect(subject.admin_contacts[0].zip).to eq("1759") - expect(subject.admin_contacts[0].state).to eq("DK") - expect(subject.admin_contacts[0].country_code).to eq("DK") - expect(subject.admin_contacts[0].phone).to eq("+45.33886300") - expect(subject.admin_contacts[0].fax).to eq("+45.33886301") - expect(subject.admin_contacts[0].email).to eq("hostmaster@speednames.com") - end - end - describe "#technical_contacts" do - it do - expect(subject.technical_contacts).to be_a(Array) - expect(subject.technical_contacts.size).to eq(1) - expect(subject.technical_contacts[0]).to be_a(Whois::Parser::Contact) - expect(subject.technical_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_TECHNICAL) - expect(subject.technical_contacts[0].name).to eq("Netnames Hostmaster") - expect(subject.technical_contacts[0].organization).to eq("Group NBT") - expect(subject.technical_contacts[0].address).to eq("3rd Floor Prospero House, 241 Borough High St.") - expect(subject.technical_contacts[0].city).to eq("London") - expect(subject.technical_contacts[0].zip).to eq("SE1 1GA") - expect(subject.technical_contacts[0].state).to eq("") - expect(subject.technical_contacts[0].country_code).to eq("GB") - expect(subject.technical_contacts[0].phone).to eq("+44.2070159370") - expect(subject.technical_contacts[0].fax).to eq("+44.2070159375") - expect(subject.technical_contacts[0].email).to eq("hostmaster@netnames.net") - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers.size).to eq(4) - expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[0].name).to eq("ns1.ascio.net") - expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[1].name).to eq("ns2.ascio.net") - expect(subject.nameservers[2]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[2].name).to eq("ns3.ascio.net") - expect(subject.nameservers[3]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[3].name).to eq("ns4.ascio.net") - end + it "matches status_registered.expected" do + expect(subject.domain).to eq("ascio.com") + expect(subject.domain_id).to eq("") + expect(subject.status).to eq(:registered) + expect(subject.available?).to eq(false) + expect(subject.registered?).to eq(true) + expect(subject.created_on).to be_a(Time) + expect(subject.created_on).to eq(DateTime.parse("2005-03-01 14:11:50 UTC")) + expect(subject.updated_on).to be_a(Time) + expect(subject.updated_on).to eq(DateTime.parse("2013-06-02 00:23:21 UTC")) + expect(subject.expires_on).to be_a(Time) + expect(subject.expires_on).to eq(DateTime.parse("2014-05-31 00:00:00 UTC")) + expect(subject.registrar).to be_a(Whois::Parser::Registrar) + expect(subject.registrar.id).to eq("106") + expect(subject.registrar.name).to eq("Ascio Technologies, Inc") + expect(subject.registrar.url).to eq("http://www.ascio.com") + expect(subject.registrant_contacts).to be_a(Array) + expect(subject.registrant_contacts.size).to eq(1) + expect(subject.registrant_contacts[0]).to be_a(Whois::Parser::Contact) + expect(subject.registrant_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_REGISTRANT) + expect(subject.registrant_contacts[0].name).to eq("Hostmaster Ascio") + expect(subject.registrant_contacts[0].organization).to eq("ASCIO Technologies Inc.") + expect(subject.registrant_contacts[0].address).to eq("Islands Brygge 55") + expect(subject.registrant_contacts[0].city).to eq("Copenhagen") + expect(subject.registrant_contacts[0].zip).to eq("2300") + expect(subject.registrant_contacts[0].state).to eq("S") + expect(subject.registrant_contacts[0].country_code).to eq("DK") + expect(subject.registrant_contacts[0].phone).to eq("") + expect(subject.registrant_contacts[0].fax).to eq("") + expect(subject.registrant_contacts[0].email).to eq("") + expect(subject.admin_contacts).to be_a(Array) + expect(subject.admin_contacts.size).to eq(1) + expect(subject.admin_contacts[0]).to be_a(Whois::Parser::Contact) + expect(subject.admin_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_ADMINISTRATIVE) + expect(subject.admin_contacts[0].name).to eq("Technical Hostmaster") + expect(subject.admin_contacts[0].organization).to eq("Speednames") + expect(subject.admin_contacts[0].address).to eq("Rejsbygade 8a") + expect(subject.admin_contacts[0].city).to eq("Copenhagen") + expect(subject.admin_contacts[0].zip).to eq("1759") + expect(subject.admin_contacts[0].state).to eq("DK") + expect(subject.admin_contacts[0].country_code).to eq("DK") + expect(subject.admin_contacts[0].phone).to eq("+45.33886300") + expect(subject.admin_contacts[0].fax).to eq("+45.33886301") + expect(subject.admin_contacts[0].email).to eq("hostmaster@speednames.com") + expect(subject.technical_contacts).to be_a(Array) + expect(subject.technical_contacts.size).to eq(1) + expect(subject.technical_contacts[0]).to be_a(Whois::Parser::Contact) + expect(subject.technical_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_TECHNICAL) + expect(subject.technical_contacts[0].name).to eq("Netnames Hostmaster") + expect(subject.technical_contacts[0].organization).to eq("Group NBT") + expect(subject.technical_contacts[0].address).to eq("3rd Floor Prospero House, 241 Borough High St.") + expect(subject.technical_contacts[0].city).to eq("London") + expect(subject.technical_contacts[0].zip).to eq("SE1 1GA") + expect(subject.technical_contacts[0].state).to eq("") + expect(subject.technical_contacts[0].country_code).to eq("GB") + expect(subject.technical_contacts[0].phone).to eq("+44.2070159370") + expect(subject.technical_contacts[0].fax).to eq("+44.2070159375") + expect(subject.technical_contacts[0].email).to eq("hostmaster@netnames.net") + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers.size).to eq(4) + expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[0].name).to eq("ns1.ascio.net") + expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[1].name).to eq("ns2.ascio.net") + expect(subject.nameservers[2]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[2].name).to eq("ns3.ascio.net") + expect(subject.nameservers[3]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[3].name).to eq("ns4.ascio.net") end end diff --git a/spec/whois/parsers/responses/whois.ati.tn/tn/property_contact_updated_none_spec.rb b/spec/whois/parsers/responses/whois.ati.tn/tn/property_contact_updated_none_spec.rb index fc03fd56..4d9d9d3a 100644 --- a/spec/whois/parsers/responses/whois.ati.tn/tn/property_contact_updated_none_spec.rb +++ b/spec/whois/parsers/responses/whois.ati.tn/tn/property_contact_updated_none_spec.rb @@ -11,25 +11,22 @@ # require 'spec_helper' -require 'whois/parsers/whois.ati.tn.rb' -describe Whois::Parsers::WhoisAtiTn, "property_contact_updated_none.expected" do +describe "whois.ati.tn", :aggregate_failures do subject do file = fixture("responses", "whois.ati.tn/tn/property_contact_updated_none.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.ati.tn") + Whois::Parser.parser_for(part) end - describe "#registrant_contacts" do - it do - expect(subject.registrant_contacts).to be_a(Array) - expect(subject.registrant_contacts.size).to eq(1) - expect(subject.registrant_contacts[0]).to be_a(Whois::Parser::Contact) - expect(subject.registrant_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_REGISTRANT) - expect(subject.registrant_contacts[0].name).to eq("MAISON DE BIEN HOTELIERS ET EQ Farhat Riadh") - expect(subject.registrant_contacts[0].created_on).to eq(DateTime.parse("2013-12-13 20:00:57")) - expect(subject.registrant_contacts[0].updated_on).to eq(nil) - end + it "matches property_contact_updated_none.expected" do + expect(subject.registrant_contacts).to be_a(Array) + expect(subject.registrant_contacts.size).to eq(1) + expect(subject.registrant_contacts[0]).to be_a(Whois::Parser::Contact) + expect(subject.registrant_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_REGISTRANT) + expect(subject.registrant_contacts[0].name).to eq("MAISON DE BIEN HOTELIERS ET EQ Farhat Riadh") + expect(subject.registrant_contacts[0].created_on).to eq(DateTime.parse("2013-12-13 20:00:57")) + expect(subject.registrant_contacts[0].updated_on).to eq(nil) end end diff --git a/spec/whois/parsers/responses/whois.ati.tn/tn/status_available_spec.rb b/spec/whois/parsers/responses/whois.ati.tn/tn/status_available_spec.rb index 4541198d..28adda27 100644 --- a/spec/whois/parsers/responses/whois.ati.tn/tn/status_available_spec.rb +++ b/spec/whois/parsers/responses/whois.ati.tn/tn/status_available_spec.rb @@ -11,88 +11,33 @@ # require 'spec_helper' -require 'whois/parsers/whois.ati.tn.rb' -describe Whois::Parsers::WhoisAtiTn, "status_available.expected" do +describe "whois.ati.tn", :aggregate_failures do subject do file = fixture("responses", "whois.ati.tn/tn/status_available.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.ati.tn") + Whois::Parser.parser_for(part) end - describe "#disclaimer" do - it do - expect(subject.disclaimer).to eq("All rights reserved.\nCopyright \"Tunisian Internet Agency - http://whois.tn\"") - end - end - describe "#domain" do - it do - expect(subject.domain).to eq(nil) - end - end - describe "#domain_id" do - it do - expect { subject.domain_id }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#status" do - it do - expect(subject.status).to eq(:available) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(true) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(false) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to eq(nil) - end - end - describe "#updated_on" do - it do - expect { subject.updated_on }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#expires_on" do - it do - expect { subject.expires_on }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#registrar" do - it do - expect(subject.registrar).to eq(nil) - end - end - describe "#registrant_contacts" do - it do - expect(subject.registrant_contacts).to be_a(Array) - expect(subject.registrant_contacts).to eq([]) - end - end - describe "#admin_contacts" do - it do - expect(subject.admin_contacts).to be_a(Array) - expect(subject.admin_contacts).to eq([]) - end - end - describe "#technical_contacts" do - it do - expect(subject.technical_contacts).to be_a(Array) - expect(subject.technical_contacts).to eq([]) - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers).to eq([]) - end + it "matches status_available.expected" do + expect(subject.disclaimer).to eq("All rights reserved.\nCopyright \"Tunisian Internet Agency - http://whois.tn\"") + expect(subject.domain).to eq(nil) + expect { subject.domain_id }.to raise_error(Whois::AttributeNotSupported) + expect(subject.status).to eq(:available) + expect(subject.available?).to eq(true) + expect(subject.registered?).to eq(false) + expect(subject.created_on).to eq(nil) + expect { subject.updated_on }.to raise_error(Whois::AttributeNotSupported) + expect { subject.expires_on }.to raise_error(Whois::AttributeNotSupported) + expect(subject.registrar).to eq(nil) + expect(subject.registrant_contacts).to be_a(Array) + expect(subject.registrant_contacts).to eq([]) + expect(subject.admin_contacts).to be_a(Array) + expect(subject.admin_contacts).to eq([]) + expect(subject.technical_contacts).to be_a(Array) + expect(subject.technical_contacts).to eq([]) + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers).to eq([]) end end diff --git a/spec/whois/parsers/responses/whois.ati.tn/tn/status_registered_spec.rb b/spec/whois/parsers/responses/whois.ati.tn/tn/status_registered_spec.rb index 72489c00..009ed34c 100644 --- a/spec/whois/parsers/responses/whois.ati.tn/tn/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.ati.tn/tn/status_registered_spec.rb @@ -11,152 +11,97 @@ # require 'spec_helper' -require 'whois/parsers/whois.ati.tn.rb' -describe Whois::Parsers::WhoisAtiTn, "status_registered.expected" do +describe "whois.ati.tn", :aggregate_failures do subject do file = fixture("responses", "whois.ati.tn/tn/status_registered.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.ati.tn") + Whois::Parser.parser_for(part) end - describe "#disclaimer" do - it do - expect(subject.disclaimer).to eq("All rights reserved.\nCopyright \"Tunisian Internet Agency - http://whois.tn\"") - end - end - describe "#domain" do - it do - expect(subject.domain).to eq("google.tn") - end - end - describe "#domain_id" do - it do - expect { subject.domain_id }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#status" do - it do - expect(subject.status).to eq(:registered) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(false) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(true) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to be_a(Time) - expect(subject.created_on).to eq(DateTime.parse("2009-05-14 00:00:00")) - end - end - describe "#updated_on" do - it do - expect { subject.updated_on }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#expires_on" do - it do - expect { subject.expires_on }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#registrar" do - it do - expect(subject.registrar).to be_a(Whois::Parser::Registrar) - expect(subject.registrar.id).to eq(nil) - expect(subject.registrar.name).to eq("3S Global Net") - expect(subject.registrar.url).to eq(nil) - end - end - describe "#registrant_contacts" do - it do - expect(subject.registrant_contacts).to be_a(Array) - expect(subject.registrant_contacts.size).to eq(1) - expect(subject.registrant_contacts[0]).to be_a(Whois::Parser::Contact) - expect(subject.registrant_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_REGISTRANT) - expect(subject.registrant_contacts[0].id).to eq(nil) - expect(subject.registrant_contacts[0].name).to eq("GOOGLE Inc") - expect(subject.registrant_contacts[0].organization).to eq(nil) - expect(subject.registrant_contacts[0].address).to eq("PO BOX 2050 Moutain view CA 94042 USA") - expect(subject.registrant_contacts[0].city).to eq(nil) - expect(subject.registrant_contacts[0].zip).to eq(nil) - expect(subject.registrant_contacts[0].state).to eq(nil) - expect(subject.registrant_contacts[0].country).to eq(nil) - expect(subject.registrant_contacts[0].country_code).to eq(nil) - expect(subject.registrant_contacts[0].phone).to eq("+1 925 685 9600") - expect(subject.registrant_contacts[0].fax).to eq("+1 925 685 9620") - expect(subject.registrant_contacts[0].email).to eq("dns-admin@google.com") - expect(subject.registrant_contacts[0].created_on).to eq(DateTime.parse("2009-05-14 00:00:00")) - expect(subject.registrant_contacts[0].updated_on).to eq(DateTime.parse("2010-07-18 00:00:00")) - end - end - describe "#admin_contacts" do - it do - expect(subject.admin_contacts).to be_a(Array) - expect(subject.admin_contacts.size).to eq(1) - expect(subject.admin_contacts[0]).to be_a(Whois::Parser::Contact) - expect(subject.admin_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_ADMINISTRATIVE) - expect(subject.admin_contacts[0].id).to eq(nil) - expect(subject.admin_contacts[0].name).to eq("GOOGLE Inc") - expect(subject.admin_contacts[0].organization).to eq(nil) - expect(subject.admin_contacts[0].address).to eq("PO BOX 2050 Moutain view CA 94042 USA") - expect(subject.admin_contacts[0].city).to eq(nil) - expect(subject.admin_contacts[0].zip).to eq(nil) - expect(subject.admin_contacts[0].state).to eq(nil) - expect(subject.admin_contacts[0].country).to eq(nil) - expect(subject.admin_contacts[0].country_code).to eq(nil) - expect(subject.admin_contacts[0].phone).to eq("+1 925 685 9600") - expect(subject.admin_contacts[0].fax).to eq("+1 925 685 9620") - expect(subject.admin_contacts[0].email).to eq("dns-admin@google.com") - expect(subject.admin_contacts[0].created_on).to eq(DateTime.parse("2009-05-14 00:00:00")) - expect(subject.admin_contacts[0].updated_on).to eq(DateTime.parse("2010-07-18 00:00:00")) - end - end - describe "#technical_contacts" do - it do - expect(subject.technical_contacts).to be_a(Array) - expect(subject.technical_contacts.size).to eq(1) - expect(subject.technical_contacts[0]).to be_a(Whois::Parser::Contact) - expect(subject.technical_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_TECHNICAL) - expect(subject.technical_contacts[0].id).to eq(nil) - expect(subject.technical_contacts[0].name).to eq("GOOGLE Inc") - expect(subject.technical_contacts[0].organization).to eq(nil) - expect(subject.technical_contacts[0].address).to eq("PO BOX 2050 Moutain view CA 94042 USA") - expect(subject.technical_contacts[0].city).to eq(nil) - expect(subject.technical_contacts[0].zip).to eq(nil) - expect(subject.technical_contacts[0].state).to eq(nil) - expect(subject.technical_contacts[0].country).to eq(nil) - expect(subject.technical_contacts[0].country_code).to eq(nil) - expect(subject.technical_contacts[0].phone).to eq("+1 925 685 9600") - expect(subject.technical_contacts[0].fax).to eq("+1 925 685 9620") - expect(subject.technical_contacts[0].email).to eq("dns-admin@google.com") - expect(subject.technical_contacts[0].created_on).to eq(DateTime.parse("2009-05-14 00:00:00")) - expect(subject.technical_contacts[0].updated_on).to eq(DateTime.parse("2010-07-18 00:00:00")) - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers.size).to eq(4) - expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[0].name).to eq("ns1.google.com") - expect(subject.nameservers[0].ipv4).to eq("216.239.32.10") - expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[1].name).to eq("ns2.google.com") - expect(subject.nameservers[1].ipv4).to eq("216.239.34.10") - expect(subject.nameservers[2]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[2].name).to eq("ns3.google.com") - expect(subject.nameservers[2].ipv4).to eq("216.239.36.10") - expect(subject.nameservers[3]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[3].name).to eq("ns4.google.com") - expect(subject.nameservers[3].ipv4).to eq("216.239.38.10") - end + it "matches status_registered.expected" do + expect(subject.disclaimer).to eq("All rights reserved.\nCopyright \"Tunisian Internet Agency - http://whois.tn\"") + expect(subject.domain).to eq("google.tn") + expect { subject.domain_id }.to raise_error(Whois::AttributeNotSupported) + expect(subject.status).to eq(:registered) + expect(subject.available?).to eq(false) + expect(subject.registered?).to eq(true) + expect(subject.created_on).to be_a(Time) + expect(subject.created_on).to eq(DateTime.parse("2009-05-14 00:00:00")) + expect { subject.updated_on }.to raise_error(Whois::AttributeNotSupported) + expect { subject.expires_on }.to raise_error(Whois::AttributeNotSupported) + expect(subject.registrar).to be_a(Whois::Parser::Registrar) + expect(subject.registrar.id).to eq(nil) + expect(subject.registrar.name).to eq("3S Global Net") + expect(subject.registrar.url).to eq(nil) + expect(subject.registrant_contacts).to be_a(Array) + expect(subject.registrant_contacts.size).to eq(1) + expect(subject.registrant_contacts[0]).to be_a(Whois::Parser::Contact) + expect(subject.registrant_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_REGISTRANT) + expect(subject.registrant_contacts[0].id).to eq(nil) + expect(subject.registrant_contacts[0].name).to eq("GOOGLE Inc") + expect(subject.registrant_contacts[0].organization).to eq(nil) + expect(subject.registrant_contacts[0].address).to eq("PO BOX 2050 Moutain view CA 94042 USA") + expect(subject.registrant_contacts[0].city).to eq(nil) + expect(subject.registrant_contacts[0].zip).to eq(nil) + expect(subject.registrant_contacts[0].state).to eq(nil) + expect(subject.registrant_contacts[0].country).to eq(nil) + expect(subject.registrant_contacts[0].country_code).to eq(nil) + expect(subject.registrant_contacts[0].phone).to eq("+1 925 685 9600") + expect(subject.registrant_contacts[0].fax).to eq("+1 925 685 9620") + expect(subject.registrant_contacts[0].email).to eq("dns-admin@google.com") + expect(subject.registrant_contacts[0].created_on).to eq(DateTime.parse("2009-05-14 00:00:00")) + expect(subject.registrant_contacts[0].updated_on).to eq(DateTime.parse("2010-07-18 00:00:00")) + expect(subject.admin_contacts).to be_a(Array) + expect(subject.admin_contacts.size).to eq(1) + expect(subject.admin_contacts[0]).to be_a(Whois::Parser::Contact) + expect(subject.admin_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_ADMINISTRATIVE) + expect(subject.admin_contacts[0].id).to eq(nil) + expect(subject.admin_contacts[0].name).to eq("GOOGLE Inc") + expect(subject.admin_contacts[0].organization).to eq(nil) + expect(subject.admin_contacts[0].address).to eq("PO BOX 2050 Moutain view CA 94042 USA") + expect(subject.admin_contacts[0].city).to eq(nil) + expect(subject.admin_contacts[0].zip).to eq(nil) + expect(subject.admin_contacts[0].state).to eq(nil) + expect(subject.admin_contacts[0].country).to eq(nil) + expect(subject.admin_contacts[0].country_code).to eq(nil) + expect(subject.admin_contacts[0].phone).to eq("+1 925 685 9600") + expect(subject.admin_contacts[0].fax).to eq("+1 925 685 9620") + expect(subject.admin_contacts[0].email).to eq("dns-admin@google.com") + expect(subject.admin_contacts[0].created_on).to eq(DateTime.parse("2009-05-14 00:00:00")) + expect(subject.admin_contacts[0].updated_on).to eq(DateTime.parse("2010-07-18 00:00:00")) + expect(subject.technical_contacts).to be_a(Array) + expect(subject.technical_contacts.size).to eq(1) + expect(subject.technical_contacts[0]).to be_a(Whois::Parser::Contact) + expect(subject.technical_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_TECHNICAL) + expect(subject.technical_contacts[0].id).to eq(nil) + expect(subject.technical_contacts[0].name).to eq("GOOGLE Inc") + expect(subject.technical_contacts[0].organization).to eq(nil) + expect(subject.technical_contacts[0].address).to eq("PO BOX 2050 Moutain view CA 94042 USA") + expect(subject.technical_contacts[0].city).to eq(nil) + expect(subject.technical_contacts[0].zip).to eq(nil) + expect(subject.technical_contacts[0].state).to eq(nil) + expect(subject.technical_contacts[0].country).to eq(nil) + expect(subject.technical_contacts[0].country_code).to eq(nil) + expect(subject.technical_contacts[0].phone).to eq("+1 925 685 9600") + expect(subject.technical_contacts[0].fax).to eq("+1 925 685 9620") + expect(subject.technical_contacts[0].email).to eq("dns-admin@google.com") + expect(subject.technical_contacts[0].created_on).to eq(DateTime.parse("2009-05-14 00:00:00")) + expect(subject.technical_contacts[0].updated_on).to eq(DateTime.parse("2010-07-18 00:00:00")) + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers.size).to eq(4) + expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[0].name).to eq("ns1.google.com") + expect(subject.nameservers[0].ipv4).to eq("216.239.32.10") + expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[1].name).to eq("ns2.google.com") + expect(subject.nameservers[1].ipv4).to eq("216.239.34.10") + expect(subject.nameservers[2]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[2].name).to eq("ns3.google.com") + expect(subject.nameservers[2].ipv4).to eq("216.239.36.10") + expect(subject.nameservers[3]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[3].name).to eq("ns4.google.com") + expect(subject.nameservers[3].ipv4).to eq("216.239.38.10") end end diff --git a/spec/whois/parsers/responses/whois.audns.net.au/au/property_status_with_multiple_spec.rb b/spec/whois/parsers/responses/whois.audns.net.au/au/property_status_with_multiple_spec.rb index a99baea8..bb174d4f 100644 --- a/spec/whois/parsers/responses/whois.audns.net.au/au/property_status_with_multiple_spec.rb +++ b/spec/whois/parsers/responses/whois.audns.net.au/au/property_status_with_multiple_spec.rb @@ -11,19 +11,16 @@ # require 'spec_helper' -require 'whois/parsers/whois.audns.net.au.rb' -describe Whois::Parsers::WhoisAudnsNetAu, "property_status_with_multiple.expected" do +describe "whois.audns.net.au", :aggregate_failures do subject do file = fixture("responses", "whois.audns.net.au/au/property_status_with_multiple.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.audns.net.au") + Whois::Parser.parser_for(part) end - describe "#status" do - it do - expect(subject.status).to eq(["serverHold (Expired)", "serverUpdateProhibited (Expired)"]) - end + it "matches property_status_with_multiple.expected" do + expect(subject.status).to eq(["serverHold (Expired)", "serverUpdateProhibited (Expired)"]) end end diff --git a/spec/whois/parsers/responses/whois.audns.net.au/au/status_available_spec.rb b/spec/whois/parsers/responses/whois.audns.net.au/au/status_available_spec.rb index 48966ff9..fba56a55 100644 --- a/spec/whois/parsers/responses/whois.audns.net.au/au/status_available_spec.rb +++ b/spec/whois/parsers/responses/whois.audns.net.au/au/status_available_spec.rb @@ -11,87 +11,32 @@ # require 'spec_helper' -require 'whois/parsers/whois.audns.net.au.rb' -describe Whois::Parsers::WhoisAudnsNetAu, "status_available.expected" do +describe "whois.audns.net.au", :aggregate_failures do subject do file = fixture("responses", "whois.audns.net.au/au/status_available.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.audns.net.au") + Whois::Parser.parser_for(part) end - describe "#disclaimer" do - it do - expect { subject.disclaimer }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#domain" do - it do - expect(subject.domain).to eq(nil) - end - end - describe "#domain_id" do - it do - expect { subject.domain_id }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#status" do - it do - expect(subject.status).to eq([]) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(true) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(false) - end - end - describe "#created_on" do - it do - expect { subject.created_on }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#updated_on" do - it do - expect(subject.updated_on).to eq(nil) - end - end - describe "#expires_on" do - it do - expect { subject.expires_on }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#registrar" do - it do - expect(subject.registrar).to eq(nil) - end - end - describe "#registrant_contacts" do - it do - expect(subject.registrant_contacts).to be_a(Array) - expect(subject.registrant_contacts).to eq([]) - end - end - describe "#admin_contacts" do - it do - expect { subject.admin_contacts }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#technical_contacts" do - it do - expect(subject.technical_contacts).to be_a(Array) - expect(subject.technical_contacts).to eq([]) - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers).to eq([]) - end + it "matches status_available.expected" do + expect { subject.disclaimer }.to raise_error(Whois::AttributeNotSupported) + expect(subject.domain).to eq(nil) + expect { subject.domain_id }.to raise_error(Whois::AttributeNotSupported) + expect(subject.status).to eq([]) + expect(subject.available?).to eq(true) + expect(subject.registered?).to eq(false) + expect { subject.created_on }.to raise_error(Whois::AttributeNotSupported) + expect(subject.updated_on).to eq(nil) + expect { subject.expires_on }.to raise_error(Whois::AttributeNotSupported) + expect(subject.registrar).to eq(nil) + expect(subject.registrant_contacts).to be_a(Array) + expect(subject.registrant_contacts).to eq([]) + expect { subject.admin_contacts }.to raise_error(Whois::AttributeNotSupported) + expect(subject.technical_contacts).to be_a(Array) + expect(subject.technical_contacts).to eq([]) + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers).to eq([]) end end diff --git a/spec/whois/parsers/responses/whois.audns.net.au/au/status_registered_spec.rb b/spec/whois/parsers/responses/whois.audns.net.au/au/status_registered_spec.rb index 7700a279..17dc8d96 100644 --- a/spec/whois/parsers/responses/whois.audns.net.au/au/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.audns.net.au/au/status_registered_spec.rb @@ -11,130 +11,75 @@ # require 'spec_helper' -require 'whois/parsers/whois.audns.net.au.rb' -describe Whois::Parsers::WhoisAudnsNetAu, "status_registered.expected" do +describe "whois.audns.net.au", :aggregate_failures do subject do file = fixture("responses", "whois.audns.net.au/au/status_registered.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.audns.net.au") + Whois::Parser.parser_for(part) end - describe "#disclaimer" do - it do - expect { subject.disclaimer }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#domain" do - it do - expect(subject.domain).to eq("google.com.au") - end - end - describe "#domain_id" do - it do - expect { subject.domain_id }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#status" do - it do - expect(subject.status).to eq(["clientDeleteProhibited", "clientUpdateProhibited", "serverDeleteProhibited (Protected by .auLOCKDOWN)", "serverUpdateProhibited (Protected by .auLOCKDOWN)"]) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(false) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(true) - end - end - describe "#created_on" do - it do - expect { subject.created_on }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#updated_on" do - it do - expect(subject.updated_on).to be_a(Time) - expect(subject.updated_on).to eq(DateTime.parse("2014-11-05 10:35:59 UTC")) - end - end - describe "#expires_on" do - it do - expect { subject.expires_on }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#registrar" do - it do - expect(subject.registrar).to be_a(Whois::Parser::Registrar) - expect(subject.registrar.name).to eq("MarkMonitor Inc.") - expect(subject.registrar.url).to eq(nil) - end - end - describe "#registrant_contacts" do - it do - expect(subject.registrant_contacts).to be_a(Array) - expect(subject.registrant_contacts.size).to eq(1) - expect(subject.registrant_contacts[0]).to be_a(Whois::Parser::Contact) - expect(subject.registrant_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_REGISTRANT) - expect(subject.registrant_contacts[0].id).to eq("MMR-122026") - expect(subject.registrant_contacts[0].name).to eq("Domain Administrator") - expect(subject.registrant_contacts[0].organization).to eq("Google INC") - expect(subject.registrant_contacts[0].address).to eq(nil) - expect(subject.registrant_contacts[0].city).to eq(nil) - expect(subject.registrant_contacts[0].zip).to eq(nil) - expect(subject.registrant_contacts[0].state).to eq(nil) - expect(subject.registrant_contacts[0].country).to eq(nil) - expect(subject.registrant_contacts[0].country_code).to eq(nil) - expect(subject.registrant_contacts[0].phone).to eq(nil) - expect(subject.registrant_contacts[0].fax).to eq(nil) - expect(subject.registrant_contacts[0].email).to eq("Visit whois.ausregistry.com.au for Web based WhoIs") - expect(subject.registrant_contacts[0].created_on).to eq(nil) - expect(subject.registrant_contacts[0].updated_on).to eq(nil) - end - end - describe "#admin_contacts" do - it do - expect { subject.admin_contacts }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#technical_contacts" do - it do - expect(subject.technical_contacts).to be_a(Array) - expect(subject.technical_contacts.size).to eq(1) - expect(subject.technical_contacts[0]).to be_a(Whois::Parser::Contact) - expect(subject.technical_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_TECHNICAL) - expect(subject.technical_contacts[0].id).to eq("MMR-87489") - expect(subject.technical_contacts[0].name).to eq("DNS Admin") - expect(subject.technical_contacts[0].organization).to eq(nil) - expect(subject.technical_contacts[0].address).to eq(nil) - expect(subject.technical_contacts[0].city).to eq(nil) - expect(subject.technical_contacts[0].zip).to eq(nil) - expect(subject.technical_contacts[0].state).to eq(nil) - expect(subject.technical_contacts[0].country).to eq(nil) - expect(subject.technical_contacts[0].country_code).to eq(nil) - expect(subject.technical_contacts[0].phone).to eq(nil) - expect(subject.technical_contacts[0].fax).to eq(nil) - expect(subject.technical_contacts[0].email).to eq("Visit whois.ausregistry.com.au for Web based WhoIs") - expect(subject.technical_contacts[0].created_on).to eq(nil) - expect(subject.technical_contacts[0].updated_on).to eq(nil) - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers.size).to eq(4) - expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[0].name).to eq("ns1.google.com") - expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[1].name).to eq("ns2.google.com") - expect(subject.nameservers[2]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[2].name).to eq("ns3.google.com") - expect(subject.nameservers[3]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[3].name).to eq("ns4.google.com") - end + it "matches status_registered.expected" do + expect { subject.disclaimer }.to raise_error(Whois::AttributeNotSupported) + expect(subject.domain).to eq("google.com.au") + expect { subject.domain_id }.to raise_error(Whois::AttributeNotSupported) + expect(subject.status).to eq(["clientDeleteProhibited", "clientUpdateProhibited", "serverDeleteProhibited (Protected by .auLOCKDOWN)", "serverUpdateProhibited (Protected by .auLOCKDOWN)"]) + expect(subject.available?).to eq(false) + expect(subject.registered?).to eq(true) + expect { subject.created_on }.to raise_error(Whois::AttributeNotSupported) + expect(subject.updated_on).to be_a(Time) + expect(subject.updated_on).to eq(DateTime.parse("2014-11-05 10:35:59 UTC")) + expect { subject.expires_on }.to raise_error(Whois::AttributeNotSupported) + expect(subject.registrar).to be_a(Whois::Parser::Registrar) + expect(subject.registrar.name).to eq("MarkMonitor Inc.") + expect(subject.registrar.url).to eq(nil) + expect(subject.registrant_contacts).to be_a(Array) + expect(subject.registrant_contacts.size).to eq(1) + expect(subject.registrant_contacts[0]).to be_a(Whois::Parser::Contact) + expect(subject.registrant_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_REGISTRANT) + expect(subject.registrant_contacts[0].id).to eq("MMR-122026") + expect(subject.registrant_contacts[0].name).to eq("Domain Administrator") + expect(subject.registrant_contacts[0].organization).to eq("Google INC") + expect(subject.registrant_contacts[0].address).to eq(nil) + expect(subject.registrant_contacts[0].city).to eq(nil) + expect(subject.registrant_contacts[0].zip).to eq(nil) + expect(subject.registrant_contacts[0].state).to eq(nil) + expect(subject.registrant_contacts[0].country).to eq(nil) + expect(subject.registrant_contacts[0].country_code).to eq(nil) + expect(subject.registrant_contacts[0].phone).to eq(nil) + expect(subject.registrant_contacts[0].fax).to eq(nil) + expect(subject.registrant_contacts[0].email).to eq("Visit whois.ausregistry.com.au for Web based WhoIs") + expect(subject.registrant_contacts[0].created_on).to eq(nil) + expect(subject.registrant_contacts[0].updated_on).to eq(nil) + expect { subject.admin_contacts }.to raise_error(Whois::AttributeNotSupported) + expect(subject.technical_contacts).to be_a(Array) + expect(subject.technical_contacts.size).to eq(1) + expect(subject.technical_contacts[0]).to be_a(Whois::Parser::Contact) + expect(subject.technical_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_TECHNICAL) + expect(subject.technical_contacts[0].id).to eq("MMR-87489") + expect(subject.technical_contacts[0].name).to eq("DNS Admin") + expect(subject.technical_contacts[0].organization).to eq(nil) + expect(subject.technical_contacts[0].address).to eq(nil) + expect(subject.technical_contacts[0].city).to eq(nil) + expect(subject.technical_contacts[0].zip).to eq(nil) + expect(subject.technical_contacts[0].state).to eq(nil) + expect(subject.technical_contacts[0].country).to eq(nil) + expect(subject.technical_contacts[0].country_code).to eq(nil) + expect(subject.technical_contacts[0].phone).to eq(nil) + expect(subject.technical_contacts[0].fax).to eq(nil) + expect(subject.technical_contacts[0].email).to eq("Visit whois.ausregistry.com.au for Web based WhoIs") + expect(subject.technical_contacts[0].created_on).to eq(nil) + expect(subject.technical_contacts[0].updated_on).to eq(nil) + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers.size).to eq(4) + expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[0].name).to eq("ns1.google.com") + expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[1].name).to eq("ns2.google.com") + expect(subject.nameservers[2]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[2].name).to eq("ns3.google.com") + expect(subject.nameservers[3]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[3].name).to eq("ns4.google.com") end end diff --git a/spec/whois/parsers/responses/whois.ax/ax/status_available_spec.rb b/spec/whois/parsers/responses/whois.ax/ax/status_available_spec.rb index 7da73323..856b56a2 100644 --- a/spec/whois/parsers/responses/whois.ax/ax/status_available_spec.rb +++ b/spec/whois/parsers/responses/whois.ax/ax/status_available_spec.rb @@ -11,50 +11,23 @@ # require 'spec_helper' -require 'whois/parsers/whois.ax.rb' -describe Whois::Parsers::WhoisAx, "status_available.expected" do +describe "whois.ax", :aggregate_failures do subject do file = fixture("responses", "whois.ax/ax/status_available.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.ax") + Whois::Parser.parser_for(part) end - describe "#status" do - it do - expect(subject.status).to eq(:available) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(true) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(false) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to eq(nil) - end - end - describe "#updated_on" do - it do - expect { subject.updated_on }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#expires_on" do - it do - expect { subject.expires_on }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers).to eq([]) - end + it "matches status_available.expected" do + expect(subject.status).to eq(:available) + expect(subject.available?).to eq(true) + expect(subject.registered?).to eq(false) + expect(subject.created_on).to eq(nil) + expect { subject.updated_on }.to raise_error(Whois::AttributeNotSupported) + expect { subject.expires_on }.to raise_error(Whois::AttributeNotSupported) + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers).to eq([]) end end diff --git a/spec/whois/parsers/responses/whois.ax/ax/status_registered_spec.rb b/spec/whois/parsers/responses/whois.ax/ax/status_registered_spec.rb index ade180dc..d30c13a5 100644 --- a/spec/whois/parsers/responses/whois.ax/ax/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.ax/ax/status_registered_spec.rb @@ -11,59 +11,32 @@ # require 'spec_helper' -require 'whois/parsers/whois.ax.rb' -describe Whois::Parsers::WhoisAx, "status_registered.expected" do +describe "whois.ax", :aggregate_failures do subject do file = fixture("responses", "whois.ax/ax/status_registered.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.ax") + Whois::Parser.parser_for(part) end - describe "#status" do - it do - expect(subject.status).to eq(:registered) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(false) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(true) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to be_a(Time) - expect(subject.created_on).to eq(DateTime.parse("2006-08-03")) - end - end - describe "#updated_on" do - it do - expect { subject.updated_on }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#expires_on" do - it do - expect { subject.expires_on }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers.size).to eq(4) - expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[0].name).to eq("ns.regeringen.ax") - expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[1].name).to eq("ns2.regeringen.ax") - expect(subject.nameservers[2]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[2].name).to eq("ns2.alcom.aland.fi") - expect(subject.nameservers[3]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[3].name).to eq("ns3.alcom.aland.fi") - end + it "matches status_registered.expected" do + expect(subject.status).to eq(:registered) + expect(subject.available?).to eq(false) + expect(subject.registered?).to eq(true) + expect(subject.created_on).to be_a(Time) + expect(subject.created_on).to eq(DateTime.parse("2006-08-03")) + expect { subject.updated_on }.to raise_error(Whois::AttributeNotSupported) + expect { subject.expires_on }.to raise_error(Whois::AttributeNotSupported) + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers.size).to eq(4) + expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[0].name).to eq("ns.regeringen.ax") + expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[1].name).to eq("ns2.regeringen.ax") + expect(subject.nameservers[2]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[2].name).to eq("ns2.alcom.aland.fi") + expect(subject.nameservers[3]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[3].name).to eq("ns3.alcom.aland.fi") end end diff --git a/spec/whois/parsers/responses/whois.biz/biz/status_available_spec.rb b/spec/whois/parsers/responses/whois.biz/biz/status_available_spec.rb index 29088c1d..3bbf03bc 100644 --- a/spec/whois/parsers/responses/whois.biz/biz/status_available_spec.rb +++ b/spec/whois/parsers/responses/whois.biz/biz/status_available_spec.rb @@ -11,83 +11,32 @@ # require 'spec_helper' -require 'whois/parsers/whois.biz.rb' -describe Whois::Parsers::WhoisBiz, "status_available.expected" do +describe "whois.biz", :aggregate_failures do subject do file = fixture("responses", "whois.biz/biz/status_available.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.biz") + Whois::Parser.parser_for(part) end - describe "#domain" do - it do - expect(subject.domain).to eq(nil) - end - end - describe "#domain_id" do - it do - expect(subject.domain_id).to eq(nil) - end - end - describe "#status" do - it do - expect(subject.status).to eq(:available) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(true) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(false) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to eq(nil) - end - end - describe "#updated_on" do - it do - expect(subject.updated_on).to eq(nil) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to eq(nil) - end - end - describe "#registrar" do - it do - expect(subject.registrar).to eq(nil) - end - end - describe "#registrant_contacts" do - it do - expect(subject.registrant_contacts).to be_a(Array) - expect(subject.registrant_contacts).to eq([]) - end - end - describe "#admin_contacts" do - it do - expect(subject.admin_contacts).to be_a(Array) - expect(subject.admin_contacts).to eq([]) - end - end - describe "#technical_contacts" do - it do - expect(subject.technical_contacts).to be_a(Array) - expect(subject.technical_contacts).to eq([]) - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers).to eq([]) - end + it "matches status_available.expected" do + expect(subject.domain).to eq(nil) + expect(subject.domain_id).to eq(nil) + expect(subject.status).to eq(:available) + expect(subject.available?).to eq(true) + expect(subject.registered?).to eq(false) + expect(subject.created_on).to eq(nil) + expect(subject.updated_on).to eq(nil) + expect(subject.expires_on).to eq(nil) + expect(subject.registrar).to eq(nil) + expect(subject.registrant_contacts).to be_a(Array) + expect(subject.registrant_contacts).to eq([]) + expect(subject.admin_contacts).to be_a(Array) + expect(subject.admin_contacts).to eq([]) + expect(subject.technical_contacts).to be_a(Array) + expect(subject.technical_contacts).to eq([]) + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers).to eq([]) end end diff --git a/spec/whois/parsers/responses/whois.biz/biz/status_registered_spec.rb b/spec/whois/parsers/responses/whois.biz/biz/status_registered_spec.rb index 6ed3243a..58611d0f 100644 --- a/spec/whois/parsers/responses/whois.biz/biz/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.biz/biz/status_registered_spec.rb @@ -11,138 +11,87 @@ # require 'spec_helper' -require 'whois/parsers/whois.biz.rb' -describe Whois::Parsers::WhoisBiz, "status_registered.expected" do +describe "whois.biz", :aggregate_failures do subject do file = fixture("responses", "whois.biz/biz/status_registered.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.biz") + Whois::Parser.parser_for(part) end - describe "#domain" do - it do - expect(subject.domain).to eq("google.biz") - end - end - describe "#domain_id" do - it do - expect(subject.domain_id).to eq("D2835288-BIZ") - end - end - describe "#status" do - it do - expect(subject.status).to eq(:registered) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(false) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(true) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to be_a(Time) - expect(subject.created_on).to eq(DateTime.parse("2002-03-27T16:03:44Z")) - end - end - describe "#updated_on" do - it do - expect(subject.updated_on).to be_a(Time) - expect(subject.updated_on).to eq(DateTime.parse("2017-02-22T10:27:42Z")) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to be_a(Time) - expect(subject.expires_on).to eq(DateTime.parse("2018-03-26T23:59:59Z")) - end - end - describe "#registrar" do - it do - expect(subject.registrar).to be_a(Whois::Parser::Registrar) - expect(subject.registrar.id).to eq("292") - expect(subject.registrar.name).to eq("MarkMonitor, Inc.") - end - end - describe "#registrant_contacts" do - it do - expect(subject.registrant_contacts).to be_a(Array) - expect(subject.registrant_contacts.size).to eq(1) - expect(subject.registrant_contacts[0]).to be_a(Whois::Parser::Contact) - expect(subject.registrant_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_REGISTRANT) - expect(subject.registrant_contacts[0].id).to eq("C42709140-BIZ") - expect(subject.registrant_contacts[0].name).to eq("DNS Admin") - expect(subject.registrant_contacts[0].organization).to eq("Google Inc.") - expect(subject.registrant_contacts[0].address).to eq("1600 Amphitheatre Parkway") - expect(subject.registrant_contacts[0].city).to eq("Mountain View") - expect(subject.registrant_contacts[0].zip).to eq("94043") - expect(subject.registrant_contacts[0].state).to eq("CA") - expect(subject.registrant_contacts[0].country).to eq(nil) - expect(subject.registrant_contacts[0].country_code).to eq("US") - expect(subject.registrant_contacts[0].phone).to eq("+1.6502530000") - expect(subject.registrant_contacts[0].fax).to eq("+1.6502530001") - expect(subject.registrant_contacts[0].email).to eq("dns-admin@google.com") - end - end - describe "#admin_contacts" do - it do - expect(subject.admin_contacts).to be_a(Array) - expect(subject.admin_contacts.size).to eq(1) - expect(subject.admin_contacts[0]).to be_a(Whois::Parser::Contact) - expect(subject.admin_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_ADMINISTRATIVE) - expect(subject.admin_contacts[0].id).to eq("C42709140-BIZ") - expect(subject.admin_contacts[0].name).to eq("DNS Admin") - expect(subject.admin_contacts[0].organization).to eq("Google Inc.") - expect(subject.admin_contacts[0].address).to eq("1600 Amphitheatre Parkway") - expect(subject.admin_contacts[0].city).to eq("Mountain View") - expect(subject.admin_contacts[0].zip).to eq("94043") - expect(subject.admin_contacts[0].state).to eq("CA") - expect(subject.admin_contacts[0].country).to eq(nil) - expect(subject.admin_contacts[0].country_code).to eq("US") - expect(subject.admin_contacts[0].phone).to eq("+1.6502530000") - expect(subject.admin_contacts[0].fax).to eq("+1.6502530001") - expect(subject.admin_contacts[0].email).to eq("dns-admin@google.com") - end - end - describe "#technical_contacts" do - it do - expect(subject.technical_contacts).to be_a(Array) - expect(subject.technical_contacts.size).to eq(1) - expect(subject.technical_contacts[0]).to be_a(Whois::Parser::Contact) - expect(subject.technical_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_TECHNICAL) - expect(subject.technical_contacts[0].id).to eq("C42709140-BIZ") - expect(subject.technical_contacts[0].name).to eq("DNS Admin") - expect(subject.technical_contacts[0].organization).to eq("Google Inc.") - expect(subject.technical_contacts[0].address).to eq("1600 Amphitheatre Parkway") - expect(subject.technical_contacts[0].city).to eq("Mountain View") - expect(subject.technical_contacts[0].zip).to eq("94043") - expect(subject.technical_contacts[0].state).to eq("CA") - expect(subject.technical_contacts[0].country).to eq(nil) - expect(subject.technical_contacts[0].country_code).to eq("US") - expect(subject.technical_contacts[0].phone).to eq("+1.6502530000") - expect(subject.technical_contacts[0].fax).to eq("+1.6502530001") - expect(subject.technical_contacts[0].email).to eq("dns-admin@google.com") - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers.size).to eq(4) - expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[0].name).to eq("ns1.google.com") - expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[1].name).to eq("ns2.google.com") - expect(subject.nameservers[2]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[2].name).to eq("ns4.google.com") - expect(subject.nameservers[3]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[3].name).to eq("ns3.google.com") - end + it "matches status_registered.expected" do + expect(subject.domain).to eq("google.biz") + expect(subject.domain_id).to eq("D2835288-BIZ") + expect(subject.status).to eq(:registered) + expect(subject.available?).to eq(false) + expect(subject.registered?).to eq(true) + expect(subject.created_on).to be_a(Time) + expect(subject.created_on).to eq(DateTime.parse("2002-03-27T16:03:44Z")) + expect(subject.updated_on).to be_a(Time) + expect(subject.updated_on).to eq(DateTime.parse("2017-02-22T10:27:42Z")) + expect(subject.expires_on).to be_a(Time) + expect(subject.expires_on).to eq(DateTime.parse("2018-03-26T23:59:59Z")) + expect(subject.registrar).to be_a(Whois::Parser::Registrar) + expect(subject.registrar.id).to eq("292") + expect(subject.registrar.name).to eq("MarkMonitor, Inc.") + expect(subject.registrant_contacts).to be_a(Array) + expect(subject.registrant_contacts.size).to eq(1) + expect(subject.registrant_contacts[0]).to be_a(Whois::Parser::Contact) + expect(subject.registrant_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_REGISTRANT) + expect(subject.registrant_contacts[0].id).to eq("C42709140-BIZ") + expect(subject.registrant_contacts[0].name).to eq("DNS Admin") + expect(subject.registrant_contacts[0].organization).to eq("Google Inc.") + expect(subject.registrant_contacts[0].address).to eq("1600 Amphitheatre Parkway") + expect(subject.registrant_contacts[0].city).to eq("Mountain View") + expect(subject.registrant_contacts[0].zip).to eq("94043") + expect(subject.registrant_contacts[0].state).to eq("CA") + expect(subject.registrant_contacts[0].country).to eq(nil) + expect(subject.registrant_contacts[0].country_code).to eq("US") + expect(subject.registrant_contacts[0].phone).to eq("+1.6502530000") + expect(subject.registrant_contacts[0].fax).to eq("+1.6502530001") + expect(subject.registrant_contacts[0].email).to eq("dns-admin@google.com") + expect(subject.admin_contacts).to be_a(Array) + expect(subject.admin_contacts.size).to eq(1) + expect(subject.admin_contacts[0]).to be_a(Whois::Parser::Contact) + expect(subject.admin_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_ADMINISTRATIVE) + expect(subject.admin_contacts[0].id).to eq("C42709140-BIZ") + expect(subject.admin_contacts[0].name).to eq("DNS Admin") + expect(subject.admin_contacts[0].organization).to eq("Google Inc.") + expect(subject.admin_contacts[0].address).to eq("1600 Amphitheatre Parkway") + expect(subject.admin_contacts[0].city).to eq("Mountain View") + expect(subject.admin_contacts[0].zip).to eq("94043") + expect(subject.admin_contacts[0].state).to eq("CA") + expect(subject.admin_contacts[0].country).to eq(nil) + expect(subject.admin_contacts[0].country_code).to eq("US") + expect(subject.admin_contacts[0].phone).to eq("+1.6502530000") + expect(subject.admin_contacts[0].fax).to eq("+1.6502530001") + expect(subject.admin_contacts[0].email).to eq("dns-admin@google.com") + expect(subject.technical_contacts).to be_a(Array) + expect(subject.technical_contacts.size).to eq(1) + expect(subject.technical_contacts[0]).to be_a(Whois::Parser::Contact) + expect(subject.technical_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_TECHNICAL) + expect(subject.technical_contacts[0].id).to eq("C42709140-BIZ") + expect(subject.technical_contacts[0].name).to eq("DNS Admin") + expect(subject.technical_contacts[0].organization).to eq("Google Inc.") + expect(subject.technical_contacts[0].address).to eq("1600 Amphitheatre Parkway") + expect(subject.technical_contacts[0].city).to eq("Mountain View") + expect(subject.technical_contacts[0].zip).to eq("94043") + expect(subject.technical_contacts[0].state).to eq("CA") + expect(subject.technical_contacts[0].country).to eq(nil) + expect(subject.technical_contacts[0].country_code).to eq("US") + expect(subject.technical_contacts[0].phone).to eq("+1.6502530000") + expect(subject.technical_contacts[0].fax).to eq("+1.6502530001") + expect(subject.technical_contacts[0].email).to eq("dns-admin@google.com") + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers.size).to eq(4) + expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[0].name).to eq("ns1.google.com") + expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[1].name).to eq("ns2.google.com") + expect(subject.nameservers[2]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[2].name).to eq("ns4.google.com") + expect(subject.nameservers[3]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[3].name).to eq("ns3.google.com") end end diff --git a/spec/whois/parsers/responses/whois.bnnic.bn/bn/status_available_spec.rb b/spec/whois/parsers/responses/whois.bnnic.bn/bn/status_available_spec.rb index 71cc89da..6d339268 100644 --- a/spec/whois/parsers/responses/whois.bnnic.bn/bn/status_available_spec.rb +++ b/spec/whois/parsers/responses/whois.bnnic.bn/bn/status_available_spec.rb @@ -11,50 +11,23 @@ # require 'spec_helper' -require 'whois/parsers/whois.bnnic.bn.rb' -describe Whois::Parsers::WhoisBnnicBn, "status_available.expected" do +describe "whois.bnnic.bn", :aggregate_failures do subject do file = fixture("responses", "whois.bnnic.bn/bn/status_available.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.bnnic.bn") + Whois::Parser.parser_for(part) end - describe "#status" do - it do - expect(subject.status).to eq(:available) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(true) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(false) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to eq(nil) - end - end - describe "#updated_on" do - it do - expect(subject.updated_on).to eq(nil) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to eq(nil) - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers).to eq([]) - end + it "matches status_available.expected" do + expect(subject.status).to eq(:available) + expect(subject.available?).to eq(true) + expect(subject.registered?).to eq(false) + expect(subject.created_on).to eq(nil) + expect(subject.updated_on).to eq(nil) + expect(subject.expires_on).to eq(nil) + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers).to eq([]) end end diff --git a/spec/whois/parsers/responses/whois.bnnic.bn/bn/status_registered_spec.rb b/spec/whois/parsers/responses/whois.bnnic.bn/bn/status_registered_spec.rb index 0533e122..8885b330 100644 --- a/spec/whois/parsers/responses/whois.bnnic.bn/bn/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.bnnic.bn/bn/status_registered_spec.rb @@ -11,69 +11,42 @@ # require 'spec_helper' -require 'whois/parsers/whois.bnnic.bn.rb' -describe Whois::Parsers::WhoisBnnicBn, "status_registered.expected" do +describe "whois.bnnic.bn", :aggregate_failures do subject do file = fixture("responses", "whois.bnnic.bn/bn/status_registered.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.bnnic.bn") + Whois::Parser.parser_for(part) end - describe "#status" do - it do - expect(subject.status).to eq(:registered) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(false) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(true) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to be_a(Time) - expect(subject.created_on).to eq(DateTime.parse("2014-10-07 00:00:00")) - end - end - describe "#updated_on" do - it do - expect(subject.updated_on).to be_a(Time) - expect(subject.updated_on).to eq(DateTime.parse("2014-12-17 18:07:42")) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to be_a(Time) - expect(subject.expires_on).to eq(DateTime.parse("2015-10-07 00:00:00")) - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers.size).to eq(4) - expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[0].name).to eq("dns.brunet.bn") - expect(subject.nameservers[0].ipv4).to eq("61.6.254.147") - expect(subject.nameservers[0].ipv6).to eq(nil) - expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[1].name).to eq("dns2.brunet.bn") - expect(subject.nameservers[1].ipv4).to eq("61.6.254.148") - expect(subject.nameservers[1].ipv6).to eq(nil) - expect(subject.nameservers[2]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[2].name).to eq("dns3.brunet.bn") - expect(subject.nameservers[2].ipv4).to eq("61.6.254.166") - expect(subject.nameservers[2].ipv6).to eq(nil) - expect(subject.nameservers[3]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[3].name).to eq("dns4.brunet.bn") - expect(subject.nameservers[3].ipv4).to eq("61.6.254.168") - expect(subject.nameservers[3].ipv6).to eq(nil) - end + it "matches status_registered.expected" do + expect(subject.status).to eq(:registered) + expect(subject.available?).to eq(false) + expect(subject.registered?).to eq(true) + expect(subject.created_on).to be_a(Time) + expect(subject.created_on).to eq(DateTime.parse("2014-10-07 00:00:00")) + expect(subject.updated_on).to be_a(Time) + expect(subject.updated_on).to eq(DateTime.parse("2014-12-17 18:07:42")) + expect(subject.expires_on).to be_a(Time) + expect(subject.expires_on).to eq(DateTime.parse("2015-10-07 00:00:00")) + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers.size).to eq(4) + expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[0].name).to eq("dns.brunet.bn") + expect(subject.nameservers[0].ipv4).to eq("61.6.254.147") + expect(subject.nameservers[0].ipv6).to eq(nil) + expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[1].name).to eq("dns2.brunet.bn") + expect(subject.nameservers[1].ipv4).to eq("61.6.254.148") + expect(subject.nameservers[1].ipv6).to eq(nil) + expect(subject.nameservers[2]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[2].name).to eq("dns3.brunet.bn") + expect(subject.nameservers[2].ipv4).to eq("61.6.254.166") + expect(subject.nameservers[2].ipv6).to eq(nil) + expect(subject.nameservers[3]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[3].name).to eq("dns4.brunet.bn") + expect(subject.nameservers[3].ipv4).to eq("61.6.254.168") + expect(subject.nameservers[3].ipv6).to eq(nil) end end diff --git a/spec/whois/parsers/responses/whois.cat/cat/property_status_missing_spec.rb b/spec/whois/parsers/responses/whois.cat/cat/property_status_missing_spec.rb index e2f52fde..5af189b1 100644 --- a/spec/whois/parsers/responses/whois.cat/cat/property_status_missing_spec.rb +++ b/spec/whois/parsers/responses/whois.cat/cat/property_status_missing_spec.rb @@ -11,19 +11,16 @@ # require 'spec_helper' -require 'whois/parsers/whois.cat.rb' -describe Whois::Parsers::WhoisCat, "property_status_missing.expected" do +describe "whois.cat", :aggregate_failures do subject do file = fixture("responses", "whois.cat/cat/property_status_missing.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.cat") + Whois::Parser.parser_for(part) end - describe "#status" do - it do - expect(subject.status).to eq(nil) - end + it "matches property_status_missing.expected" do + expect(subject.status).to eq(nil) end end diff --git a/spec/whois/parsers/responses/whois.cat/cat/property_status_multiple_spec.rb b/spec/whois/parsers/responses/whois.cat/cat/property_status_multiple_spec.rb index bad1f612..dd234a19 100644 --- a/spec/whois/parsers/responses/whois.cat/cat/property_status_multiple_spec.rb +++ b/spec/whois/parsers/responses/whois.cat/cat/property_status_multiple_spec.rb @@ -11,19 +11,16 @@ # require 'spec_helper' -require 'whois/parsers/whois.cat.rb' -describe Whois::Parsers::WhoisCat, "property_status_multiple.expected" do +describe "whois.cat", :aggregate_failures do subject do file = fixture("responses", "whois.cat/cat/property_status_multiple.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.cat") + Whois::Parser.parser_for(part) end - describe "#status" do - it do - expect(subject.status).to eq(["clientTransferProhibited", "clientDeleteProhibited"]) - end + it "matches property_status_multiple.expected" do + expect(subject.status).to eq(["clientTransferProhibited", "clientDeleteProhibited"]) end end diff --git a/spec/whois/parsers/responses/whois.cat/cat/property_status_ok_spec.rb b/spec/whois/parsers/responses/whois.cat/cat/property_status_ok_spec.rb index 44915aaf..01b38eb9 100644 --- a/spec/whois/parsers/responses/whois.cat/cat/property_status_ok_spec.rb +++ b/spec/whois/parsers/responses/whois.cat/cat/property_status_ok_spec.rb @@ -11,19 +11,16 @@ # require 'spec_helper' -require 'whois/parsers/whois.cat.rb' -describe Whois::Parsers::WhoisCat, "property_status_ok.expected" do +describe "whois.cat", :aggregate_failures do subject do file = fixture("responses", "whois.cat/cat/property_status_ok.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.cat") + Whois::Parser.parser_for(part) end - describe "#status" do - it do - expect(subject.status).to eq(["ok"]) - end + it "matches property_status_ok.expected" do + expect(subject.status).to eq(["ok"]) end end diff --git a/spec/whois/parsers/responses/whois.cat/cat/status_available_spec.rb b/spec/whois/parsers/responses/whois.cat/cat/status_available_spec.rb index 135d4a9b..787e5dac 100644 --- a/spec/whois/parsers/responses/whois.cat/cat/status_available_spec.rb +++ b/spec/whois/parsers/responses/whois.cat/cat/status_available_spec.rb @@ -11,50 +11,23 @@ # require 'spec_helper' -require 'whois/parsers/whois.cat.rb' -describe Whois::Parsers::WhoisCat, "status_available.expected" do +describe "whois.cat", :aggregate_failures do subject do file = fixture("responses", "whois.cat/cat/status_available.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.cat") + Whois::Parser.parser_for(part) end - describe "#status" do - it do - expect(subject.status).to eq(nil) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(true) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(false) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to eq(nil) - end - end - describe "#updated_on" do - it do - expect(subject.updated_on).to eq(nil) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to eq(nil) - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers).to eq([]) - end + it "matches status_available.expected" do + expect(subject.status).to eq(nil) + expect(subject.available?).to eq(true) + expect(subject.registered?).to eq(false) + expect(subject.created_on).to eq(nil) + expect(subject.updated_on).to eq(nil) + expect(subject.expires_on).to eq(nil) + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers).to eq([]) end end diff --git a/spec/whois/parsers/responses/whois.cat/cat/status_registered_spec.rb b/spec/whois/parsers/responses/whois.cat/cat/status_registered_spec.rb index 8b101578..aed5266b 100644 --- a/spec/whois/parsers/responses/whois.cat/cat/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.cat/cat/status_registered_spec.rb @@ -11,61 +11,34 @@ # require 'spec_helper' -require 'whois/parsers/whois.cat.rb' -describe Whois::Parsers::WhoisCat, "status_registered.expected" do +describe "whois.cat", :aggregate_failures do subject do file = fixture("responses", "whois.cat/cat/status_registered.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.cat") + Whois::Parser.parser_for(part) end - describe "#status" do - it do - expect(subject.status).to eq(["ok"]) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(false) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(true) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to be_a(Time) - expect(subject.created_on).to eq(DateTime.parse("2006-02-14 09:12:37 GMT")) - end - end - describe "#updated_on" do - it do - expect(subject.updated_on).to be_a(Time) - expect(subject.updated_on).to eq(DateTime.parse("2013-11-27 17:30:59 GMT")) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to be_a(Time) - expect(subject.expires_on).to eq(DateTime.parse("2020-02-14 09:12:37 GMT")) - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers.size).to eq(2) - expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[0].name).to eq("dns.gencat.net") - expect(subject.nameservers[0].ipv4).to eq(nil) - expect(subject.nameservers[0].ipv6).to eq(nil) - expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[1].name).to eq("dns2.gencat.cat") - expect(subject.nameservers[1].ipv4).to eq("83.247.132.4") - expect(subject.nameservers[1].ipv6).to eq(nil) - end + it "matches status_registered.expected" do + expect(subject.status).to eq(["ok"]) + expect(subject.available?).to eq(false) + expect(subject.registered?).to eq(true) + expect(subject.created_on).to be_a(Time) + expect(subject.created_on).to eq(DateTime.parse("2006-02-14 09:12:37 GMT")) + expect(subject.updated_on).to be_a(Time) + expect(subject.updated_on).to eq(DateTime.parse("2013-11-27 17:30:59 GMT")) + expect(subject.expires_on).to be_a(Time) + expect(subject.expires_on).to eq(DateTime.parse("2020-02-14 09:12:37 GMT")) + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers.size).to eq(2) + expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[0].name).to eq("dns.gencat.net") + expect(subject.nameservers[0].ipv4).to eq(nil) + expect(subject.nameservers[0].ipv6).to eq(nil) + expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[1].name).to eq("dns2.gencat.cat") + expect(subject.nameservers[1].ipv4).to eq("83.247.132.4") + expect(subject.nameservers[1].ipv6).to eq(nil) end end diff --git a/spec/whois/parsers/responses/whois.cctld.by/by/status_available_spec.rb b/spec/whois/parsers/responses/whois.cctld.by/by/status_available_spec.rb index bdf282ef..b349f1a0 100644 --- a/spec/whois/parsers/responses/whois.cctld.by/by/status_available_spec.rb +++ b/spec/whois/parsers/responses/whois.cctld.by/by/status_available_spec.rb @@ -11,85 +11,30 @@ # require 'spec_helper' -require 'whois/parsers/whois.cctld.by.rb' -describe Whois::Parsers::WhoisCctldBy, "status_available.expected" do +describe "whois.cctld.by", :aggregate_failures do subject do file = fixture("responses", "whois.cctld.by/by/status_available.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.cctld.by") + Whois::Parser.parser_for(part) end - describe "#disclaimer" do - it do - expect { subject.disclaimer }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#domain" do - it do - expect(subject.domain).to eq(nil) - end - end - describe "#domain_id" do - it do - expect { subject.domain_id }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#status" do - it do - expect(subject.status).to eq(:available) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(true) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(false) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to eq(nil) - end - end - describe "#updated_on" do - it do - expect(subject.updated_on).to eq(nil) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to eq(nil) - end - end - describe "#registrar" do - it do - expect(subject.registrar).to eq(nil) - end - end - describe "#registrant_contacts" do - it do - expect { subject.registrant_contacts }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#admin_contacts" do - it do - expect { subject.admin_contacts }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#technical_contacts" do - it do - expect { subject.technical_contacts }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers).to eq([]) - end + it "matches status_available.expected" do + expect { subject.disclaimer }.to raise_error(Whois::AttributeNotSupported) + expect(subject.domain).to eq(nil) + expect { subject.domain_id }.to raise_error(Whois::AttributeNotSupported) + expect(subject.status).to eq(:available) + expect(subject.available?).to eq(true) + expect(subject.registered?).to eq(false) + expect(subject.created_on).to eq(nil) + expect(subject.updated_on).to eq(nil) + expect(subject.expires_on).to eq(nil) + expect(subject.registrar).to eq(nil) + expect { subject.registrant_contacts }.to raise_error(Whois::AttributeNotSupported) + expect { subject.admin_contacts }.to raise_error(Whois::AttributeNotSupported) + expect { subject.technical_contacts }.to raise_error(Whois::AttributeNotSupported) + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers).to eq([]) end end diff --git a/spec/whois/parsers/responses/whois.cctld.by/by/status_registered_spec.rb b/spec/whois/parsers/responses/whois.cctld.by/by/status_registered_spec.rb index 77d4650e..f995bd46 100644 --- a/spec/whois/parsers/responses/whois.cctld.by/by/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.cctld.by/by/status_registered_spec.rb @@ -11,94 +11,39 @@ # require 'spec_helper' -require 'whois/parsers/whois.cctld.by.rb' -describe Whois::Parsers::WhoisCctldBy, "status_registered.expected" do +describe "whois.cctld.by", :aggregate_failures do subject do file = fixture("responses", "whois.cctld.by/by/status_registered.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.cctld.by") + Whois::Parser.parser_for(part) end - describe "#disclaimer" do - it do - expect { subject.disclaimer }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#domain" do - it do - expect(subject.domain).to eq("active.by") - end - end - describe "#domain_id" do - it do - expect { subject.domain_id }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#status" do - it do - expect(subject.status).to eq(:registered) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(false) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(true) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to be_a(Time) - expect(subject.created_on).to eq(DateTime.parse("2003-02-02")) - end - end - describe "#updated_on" do - it do - expect(subject.updated_on).to be_a(Time) - expect(subject.updated_on).to eq(DateTime.parse("2013-12-16")) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to be_a(Time) - expect(subject.expires_on).to eq(DateTime.parse("2014-12-21")) - end - end - describe "#registrar" do - it do - expect(subject.registrar).to be_a(Whois::Parser::Registrar) - expect(subject.registrar.id).to eq("Active Technologies LLC") - expect(subject.registrar.name).to eq("Active Technologies LLC") - end - end - describe "#registrant_contacts" do - it do - expect { subject.registrant_contacts }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#admin_contacts" do - it do - expect { subject.admin_contacts }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#technical_contacts" do - it do - expect { subject.technical_contacts }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers.size).to eq(2) - expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[0].name).to eq("ns1.activeby.net") - expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[1].name).to eq("ns2.activeby.net") - end + it "matches status_registered.expected" do + expect { subject.disclaimer }.to raise_error(Whois::AttributeNotSupported) + expect(subject.domain).to eq("active.by") + expect { subject.domain_id }.to raise_error(Whois::AttributeNotSupported) + expect(subject.status).to eq(:registered) + expect(subject.available?).to eq(false) + expect(subject.registered?).to eq(true) + expect(subject.created_on).to be_a(Time) + expect(subject.created_on).to eq(DateTime.parse("2003-02-02")) + expect(subject.updated_on).to be_a(Time) + expect(subject.updated_on).to eq(DateTime.parse("2013-12-16")) + expect(subject.expires_on).to be_a(Time) + expect(subject.expires_on).to eq(DateTime.parse("2014-12-21")) + expect(subject.registrar).to be_a(Whois::Parser::Registrar) + expect(subject.registrar.id).to eq("Active Technologies LLC") + expect(subject.registrar.name).to eq("Active Technologies LLC") + expect { subject.registrant_contacts }.to raise_error(Whois::AttributeNotSupported) + expect { subject.admin_contacts }.to raise_error(Whois::AttributeNotSupported) + expect { subject.technical_contacts }.to raise_error(Whois::AttributeNotSupported) + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers.size).to eq(2) + expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[0].name).to eq("ns1.activeby.net") + expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[1].name).to eq("ns2.activeby.net") end end diff --git a/spec/whois/parsers/responses/whois.cctld.uz/uz/property_expires_on_dash_spec.rb b/spec/whois/parsers/responses/whois.cctld.uz/uz/property_expires_on_dash_spec.rb index 1b233a31..501aaa0c 100644 --- a/spec/whois/parsers/responses/whois.cctld.uz/uz/property_expires_on_dash_spec.rb +++ b/spec/whois/parsers/responses/whois.cctld.uz/uz/property_expires_on_dash_spec.rb @@ -11,19 +11,16 @@ # require 'spec_helper' -require 'whois/parsers/whois.cctld.uz.rb' -describe Whois::Parsers::WhoisCctldUz, "property_expires_on_dash.expected" do +describe "whois.cctld.uz", :aggregate_failures do subject do file = fixture("responses", "whois.cctld.uz/uz/property_expires_on_dash.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.cctld.uz") + Whois::Parser.parser_for(part) end - describe "#expires_on" do - it do - expect(subject.expires_on).to eq(nil) - end + it "matches property_expires_on_dash.expected" do + expect(subject.expires_on).to eq(nil) end end diff --git a/spec/whois/parsers/responses/whois.cctld.uz/uz/property_status_reserved_spec.rb b/spec/whois/parsers/responses/whois.cctld.uz/uz/property_status_reserved_spec.rb index 8b8eceb8..5470695a 100644 --- a/spec/whois/parsers/responses/whois.cctld.uz/uz/property_status_reserved_spec.rb +++ b/spec/whois/parsers/responses/whois.cctld.uz/uz/property_status_reserved_spec.rb @@ -11,29 +11,18 @@ # require 'spec_helper' -require 'whois/parsers/whois.cctld.uz.rb' -describe Whois::Parsers::WhoisCctldUz, "property_status_reserved.expected" do +describe "whois.cctld.uz", :aggregate_failures do subject do file = fixture("responses", "whois.cctld.uz/uz/property_status_reserved.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.cctld.uz") + Whois::Parser.parser_for(part) end - describe "#status" do - it do - expect(subject.status).to eq(:reserved) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(false) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(true) - end + it "matches property_status_reserved.expected" do + expect(subject.status).to eq(:reserved) + expect(subject.available?).to eq(false) + expect(subject.registered?).to eq(true) end end diff --git a/spec/whois/parsers/responses/whois.cctld.uz/uz/status_available_spec.rb b/spec/whois/parsers/responses/whois.cctld.uz/uz/status_available_spec.rb index 2b8d08ae..6a2dfbfa 100644 --- a/spec/whois/parsers/responses/whois.cctld.uz/uz/status_available_spec.rb +++ b/spec/whois/parsers/responses/whois.cctld.uz/uz/status_available_spec.rb @@ -11,50 +11,23 @@ # require 'spec_helper' -require 'whois/parsers/whois.cctld.uz.rb' -describe Whois::Parsers::WhoisCctldUz, "status_available.expected" do +describe "whois.cctld.uz", :aggregate_failures do subject do file = fixture("responses", "whois.cctld.uz/uz/status_available.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.cctld.uz") + Whois::Parser.parser_for(part) end - describe "#status" do - it do - expect(subject.status).to eq(:available) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(true) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(false) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to eq(nil) - end - end - describe "#updated_on" do - it do - expect(subject.updated_on).to eq(nil) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to eq(nil) - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers).to eq([]) - end + it "matches status_available.expected" do + expect(subject.status).to eq(:available) + expect(subject.available?).to eq(true) + expect(subject.registered?).to eq(false) + expect(subject.created_on).to eq(nil) + expect(subject.updated_on).to eq(nil) + expect(subject.expires_on).to eq(nil) + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers).to eq([]) end end diff --git a/spec/whois/parsers/responses/whois.cctld.uz/uz/status_registered_spec.rb b/spec/whois/parsers/responses/whois.cctld.uz/uz/status_registered_spec.rb index c8fb04e8..94f32c0b 100644 --- a/spec/whois/parsers/responses/whois.cctld.uz/uz/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.cctld.uz/uz/status_registered_spec.rb @@ -11,57 +11,30 @@ # require 'spec_helper' -require 'whois/parsers/whois.cctld.uz.rb' -describe Whois::Parsers::WhoisCctldUz, "status_registered.expected" do +describe "whois.cctld.uz", :aggregate_failures do subject do file = fixture("responses", "whois.cctld.uz/uz/status_registered.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.cctld.uz") + Whois::Parser.parser_for(part) end - describe "#status" do - it do - expect(subject.status).to eq(:registered) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(false) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(true) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to be_a(Time) - expect(subject.created_on).to eq(DateTime.parse("2006-04-13")) - end - end - describe "#updated_on" do - it do - expect(subject.updated_on).to be_a(Time) - expect(subject.updated_on).to eq(DateTime.parse("2010-03-26")) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to be_a(Time) - expect(subject.expires_on).to eq(DateTime.parse("2011-05-01")) - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers.size).to eq(2) - expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[0].name).to eq("ns1.google.com") - expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[1].name).to eq("ns2.google.com") - end + it "matches status_registered.expected" do + expect(subject.status).to eq(:registered) + expect(subject.available?).to eq(false) + expect(subject.registered?).to eq(true) + expect(subject.created_on).to be_a(Time) + expect(subject.created_on).to eq(DateTime.parse("2006-04-13")) + expect(subject.updated_on).to be_a(Time) + expect(subject.updated_on).to eq(DateTime.parse("2010-03-26")) + expect(subject.expires_on).to be_a(Time) + expect(subject.expires_on).to eq(DateTime.parse("2011-05-01")) + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers.size).to eq(2) + expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[0].name).to eq("ns1.google.com") + expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[1].name).to eq("ns2.google.com") end end diff --git a/spec/whois/parsers/responses/whois.cdmon.com/com/status_registered_spec.rb b/spec/whois/parsers/responses/whois.cdmon.com/com/status_registered_spec.rb index b61e0605..78658d20 100644 --- a/spec/whois/parsers/responses/whois.cdmon.com/com/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.cdmon.com/com/status_registered_spec.rb @@ -11,130 +11,87 @@ # require 'spec_helper' -require 'whois/parsers/whois.cdmon.com.rb' -describe Whois::Parsers::WhoisCdmonCom, "status_registered.expected" do +describe "whois.cdmon.com", :aggregate_failures do subject do file = fixture("responses", "whois.cdmon.com/com/status_registered.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.cdmon.com") + Whois::Parser.parser_for(part) end - describe "#status" do - it do - expect(subject.status).to eq(:registered) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(false) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(true) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to be_a(Time) - expect(subject.created_on).to eq(DateTime.parse("2001-08-12T15:02:57Z")) - end - end - describe "#updated_on" do - it do - expect(subject.updated_on).to be_a(Time) - expect(subject.updated_on).to eq(DateTime.parse("2009-12-16T11:40:44Z")) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to be_a(Time) - expect(subject.expires_on).to eq(DateTime.parse("2024-08-12T15:02:53Z")) - end - end - describe "#registrar" do - it do - expect(subject.registrar).to be_a(Whois::Parser::Registrar) - expect(subject.registrar.id).to eq("1403") - expect(subject.registrar.name).to eq("10DENCEHISPAHARD, S.L") - expect(subject.registrar.url).to eq("https://www.cdmon.com") - end - end - describe "#registrant_contacts" do - it do - expect(subject.registrant_contacts).to be_a(Array) - expect(subject.registrant_contacts.size).to eq(1) - expect(subject.registrant_contacts[0]).to be_a(Whois::Parser::Contact) - expect(subject.registrant_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_REGISTRANT) - expect(subject.registrant_contacts[0].id).to eq(nil) - expect(subject.registrant_contacts[0].name).to eq("10dencehispahard,s.l.") - expect(subject.registrant_contacts[0].organization).to eq("10dencehispahard,s.l.") - expect(subject.registrant_contacts[0].address).to eq("Girona 81-83 local 6") - expect(subject.registrant_contacts[0].city).to eq("Malgrat de Mar") - expect(subject.registrant_contacts[0].zip).to eq("08380") - expect(subject.registrant_contacts[0].state).to eq("") - expect(subject.registrant_contacts[0].country).to eq(nil) - expect(subject.registrant_contacts[0].country_code).to eq("ES") - expect(subject.registrant_contacts[0].phone).to eq("+34.902364138") - expect(subject.registrant_contacts[0].email).to eq("info@cdmon.com") - end - end - describe "#admin_contacts" do - it do - expect(subject.admin_contacts).to be_a(Array) - expect(subject.admin_contacts.size).to eq(1) - expect(subject.admin_contacts[0]).to be_a(Whois::Parser::Contact) - expect(subject.admin_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_ADMINISTRATIVE) - expect(subject.admin_contacts[0].id).to eq(nil) - expect(subject.admin_contacts[0].name).to eq("10dencehispahard,s.l.") - expect(subject.admin_contacts[0].organization).to eq("10dencehispahard,s.l.") - expect(subject.admin_contacts[0].address).to eq("Girona 81-83 local 6") - expect(subject.admin_contacts[0].city).to eq("Malgrat de Mar") - expect(subject.admin_contacts[0].zip).to eq("08380") - expect(subject.admin_contacts[0].state).to eq("") - expect(subject.admin_contacts[0].country).to eq(nil) - expect(subject.admin_contacts[0].country_code).to eq("ES") - expect(subject.admin_contacts[0].phone).to eq("+34.902364138") - expect(subject.admin_contacts[0].email).to eq("info@cdmon.com") - end - end - describe "#technical_contacts" do - it do - expect(subject.technical_contacts).to be_a(Array) - expect(subject.technical_contacts.size).to eq(1) - expect(subject.technical_contacts[0]).to be_a(Whois::Parser::Contact) - expect(subject.technical_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_TECHNICAL) - expect(subject.technical_contacts[0].id).to eq(nil) - expect(subject.technical_contacts[0].name).to eq("10dencehispahard,s.l.") - expect(subject.technical_contacts[0].organization).to eq("10dencehispahard,s.l.") - expect(subject.technical_contacts[0].address).to eq("Girona 81-83 local 6") - expect(subject.technical_contacts[0].city).to eq("Malgrat de Mar") - expect(subject.technical_contacts[0].zip).to eq("08380") - expect(subject.technical_contacts[0].state).to eq("") - expect(subject.technical_contacts[0].country).to eq(nil) - expect(subject.technical_contacts[0].country_code).to eq("ES") - expect(subject.technical_contacts[0].phone).to eq("+34.902364138") - expect(subject.technical_contacts[0].email).to eq("info@cdmon.com") - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers.size).to eq(3) - expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[0].name).to eq("ns2.cdmon.es") - expect(subject.nameservers[0].ipv4).to eq(nil) - expect(subject.nameservers[0].ipv6).to eq(nil) - expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[1].name).to eq("ns3.cdmon.es") - expect(subject.nameservers[1].ipv4).to eq(nil) - expect(subject.nameservers[1].ipv6).to eq(nil) - expect(subject.nameservers[2]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[2].name).to eq("ns1.cdmon.es") - expect(subject.nameservers[2].ipv4).to eq(nil) - expect(subject.nameservers[2].ipv6).to eq(nil) - end + it "matches status_registered.expected" do + expect(subject.status).to eq(:registered) + expect(subject.available?).to eq(false) + expect(subject.registered?).to eq(true) + expect(subject.created_on).to be_a(Time) + expect(subject.created_on).to eq(DateTime.parse("2001-08-12T15:02:57Z")) + expect(subject.updated_on).to be_a(Time) + expect(subject.updated_on).to eq(DateTime.parse("2009-12-16T11:40:44Z")) + expect(subject.expires_on).to be_a(Time) + expect(subject.expires_on).to eq(DateTime.parse("2024-08-12T15:02:53Z")) + expect(subject.registrar).to be_a(Whois::Parser::Registrar) + expect(subject.registrar.id).to eq("1403") + expect(subject.registrar.name).to eq("10DENCEHISPAHARD, S.L") + expect(subject.registrar.url).to eq("https://www.cdmon.com") + expect(subject.registrant_contacts).to be_a(Array) + expect(subject.registrant_contacts.size).to eq(1) + expect(subject.registrant_contacts[0]).to be_a(Whois::Parser::Contact) + expect(subject.registrant_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_REGISTRANT) + expect(subject.registrant_contacts[0].id).to eq(nil) + expect(subject.registrant_contacts[0].name).to eq("10dencehispahard,s.l.") + expect(subject.registrant_contacts[0].organization).to eq("10dencehispahard,s.l.") + expect(subject.registrant_contacts[0].address).to eq("Girona 81-83 local 6") + expect(subject.registrant_contacts[0].city).to eq("Malgrat de Mar") + expect(subject.registrant_contacts[0].zip).to eq("08380") + expect(subject.registrant_contacts[0].state).to eq("") + expect(subject.registrant_contacts[0].country).to eq(nil) + expect(subject.registrant_contacts[0].country_code).to eq("ES") + expect(subject.registrant_contacts[0].phone).to eq("+34.902364138") + expect(subject.registrant_contacts[0].email).to eq("info@cdmon.com") + expect(subject.admin_contacts).to be_a(Array) + expect(subject.admin_contacts.size).to eq(1) + expect(subject.admin_contacts[0]).to be_a(Whois::Parser::Contact) + expect(subject.admin_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_ADMINISTRATIVE) + expect(subject.admin_contacts[0].id).to eq(nil) + expect(subject.admin_contacts[0].name).to eq("10dencehispahard,s.l.") + expect(subject.admin_contacts[0].organization).to eq("10dencehispahard,s.l.") + expect(subject.admin_contacts[0].address).to eq("Girona 81-83 local 6") + expect(subject.admin_contacts[0].city).to eq("Malgrat de Mar") + expect(subject.admin_contacts[0].zip).to eq("08380") + expect(subject.admin_contacts[0].state).to eq("") + expect(subject.admin_contacts[0].country).to eq(nil) + expect(subject.admin_contacts[0].country_code).to eq("ES") + expect(subject.admin_contacts[0].phone).to eq("+34.902364138") + expect(subject.admin_contacts[0].email).to eq("info@cdmon.com") + expect(subject.technical_contacts).to be_a(Array) + expect(subject.technical_contacts.size).to eq(1) + expect(subject.technical_contacts[0]).to be_a(Whois::Parser::Contact) + expect(subject.technical_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_TECHNICAL) + expect(subject.technical_contacts[0].id).to eq(nil) + expect(subject.technical_contacts[0].name).to eq("10dencehispahard,s.l.") + expect(subject.technical_contacts[0].organization).to eq("10dencehispahard,s.l.") + expect(subject.technical_contacts[0].address).to eq("Girona 81-83 local 6") + expect(subject.technical_contacts[0].city).to eq("Malgrat de Mar") + expect(subject.technical_contacts[0].zip).to eq("08380") + expect(subject.technical_contacts[0].state).to eq("") + expect(subject.technical_contacts[0].country).to eq(nil) + expect(subject.technical_contacts[0].country_code).to eq("ES") + expect(subject.technical_contacts[0].phone).to eq("+34.902364138") + expect(subject.technical_contacts[0].email).to eq("info@cdmon.com") + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers.size).to eq(3) + expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[0].name).to eq("ns2.cdmon.es") + expect(subject.nameservers[0].ipv4).to eq(nil) + expect(subject.nameservers[0].ipv6).to eq(nil) + expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[1].name).to eq("ns3.cdmon.es") + expect(subject.nameservers[1].ipv4).to eq(nil) + expect(subject.nameservers[1].ipv6).to eq(nil) + expect(subject.nameservers[2]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[2].name).to eq("ns1.cdmon.es") + expect(subject.nameservers[2].ipv4).to eq(nil) + expect(subject.nameservers[2].ipv6).to eq(nil) end end diff --git a/spec/whois/parsers/responses/whois.centralnic.com/ae.org/status_available_spec.rb b/spec/whois/parsers/responses/whois.centralnic.com/ae.org/status_available_spec.rb index c7d145f2..51b927f1 100644 --- a/spec/whois/parsers/responses/whois.centralnic.com/ae.org/status_available_spec.rb +++ b/spec/whois/parsers/responses/whois.centralnic.com/ae.org/status_available_spec.rb @@ -11,88 +11,33 @@ # require 'spec_helper' -require 'whois/parsers/whois.centralnic.com.rb' -describe Whois::Parsers::WhoisCentralnicCom, "status_available.expected" do +describe "whois.centralnic.com", :aggregate_failures do subject do file = fixture("responses", "whois.centralnic.com/ae.org/status_available.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.centralnic.com") + Whois::Parser.parser_for(part) end - describe "#disclaimer" do - it do - expect(subject.disclaimer).to eq(nil) - end - end - describe "#domain" do - it do - expect(subject.domain).to eq(nil) - end - end - describe "#domain_id" do - it do - expect(subject.domain_id).to eq(nil) - end - end - describe "#status" do - it do - expect(subject.status).to eq([]) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(true) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(false) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to eq(nil) - end - end - describe "#updated_on" do - it do - expect(subject.updated_on).to eq(nil) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to eq(nil) - end - end - describe "#registrar" do - it do - expect(subject.registrar).to eq(nil) - end - end - describe "#registrant_contacts" do - it do - expect(subject.registrant_contacts).to be_a(Array) - expect(subject.registrant_contacts).to eq([]) - end - end - describe "#admin_contacts" do - it do - expect(subject.admin_contacts).to be_a(Array) - expect(subject.admin_contacts).to eq([]) - end - end - describe "#technical_contacts" do - it do - expect(subject.technical_contacts).to be_a(Array) - expect(subject.technical_contacts).to eq([]) - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers).to eq([]) - end + it "matches status_available.expected" do + expect(subject.disclaimer).to eq(nil) + expect(subject.domain).to eq(nil) + expect(subject.domain_id).to eq(nil) + expect(subject.status).to eq([]) + expect(subject.available?).to eq(true) + expect(subject.registered?).to eq(false) + expect(subject.created_on).to eq(nil) + expect(subject.updated_on).to eq(nil) + expect(subject.expires_on).to eq(nil) + expect(subject.registrar).to eq(nil) + expect(subject.registrant_contacts).to be_a(Array) + expect(subject.registrant_contacts).to eq([]) + expect(subject.admin_contacts).to be_a(Array) + expect(subject.admin_contacts).to eq([]) + expect(subject.technical_contacts).to be_a(Array) + expect(subject.technical_contacts).to eq([]) + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers).to eq([]) end end diff --git a/spec/whois/parsers/responses/whois.centralnic.com/ae.org/status_registered_spec.rb b/spec/whois/parsers/responses/whois.centralnic.com/ae.org/status_registered_spec.rb index 90876b7e..9d39963d 100644 --- a/spec/whois/parsers/responses/whois.centralnic.com/ae.org/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.centralnic.com/ae.org/status_registered_spec.rb @@ -11,144 +11,89 @@ # require 'spec_helper' -require 'whois/parsers/whois.centralnic.com.rb' -describe Whois::Parsers::WhoisCentralnicCom, "status_registered.expected" do +describe "whois.centralnic.com", :aggregate_failures do subject do file = fixture("responses", "whois.centralnic.com/ae.org/status_registered.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.centralnic.com") + Whois::Parser.parser_for(part) end - describe "#disclaimer" do - it do - expect(subject.disclaimer).to eq("This whois service is provided by CentralNic Ltd and only contains information pertaining to Internet domain names we have registered for our customers. By using this service you are agreeing (1) not to use any information presented here for any purpose other than determining ownership of domain names, (2) not to store or reproduce this data in any way, (3) not to use any high-volume, automated, electronic processes to obtain data from this service. Abuse of this service is monitored and actions in contravention of these terms will result in being permanently blacklisted. All data is (c) CentralNic Ltd https://www.centralnic.com/") - end - end - describe "#domain" do - it do - expect(subject.domain).to eq("kidzlink.ae.org") - end - end - describe "#domain_id" do - it do - expect(subject.domain_id).to eq("CNIC-DO887354") - end - end - describe "#status" do - it do - expect(subject.status).to eq(["clientTransferProhibited", "serverTransferProhibited"]) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(false) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(true) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to be_a(Time) - expect(subject.created_on).to eq(DateTime.parse("2012-08-03 15:37:33 UTC")) - end - end - describe "#updated_on" do - it do - expect(subject.updated_on).to be_a(Time) - expect(subject.updated_on).to eq(DateTime.parse("2013-06-09 00:12:37 UTC")) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to be_a(Time) - expect(subject.expires_on).to eq(DateTime.parse("2014-08-03 23:59:59 UTC")) - end - end - describe "#registrar" do - it do - expect(subject.registrar).to be_a(Whois::Parser::Registrar) - expect(subject.registrar.id).to eq("H65658") - expect(subject.registrar.name).to eq("101Domain, Inc.") - expect(subject.registrar.url).to eq("http://www.101domain.com") - end - end - describe "#registrant_contacts" do - it do - expect(subject.registrant_contacts).to be_a(Array) - expect(subject.registrant_contacts.size).to eq(1) - expect(subject.registrant_contacts[0]).to be_a(Whois::Parser::Contact) - expect(subject.registrant_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_REGISTRANT) - expect(subject.registrant_contacts[0].id).to eq("RWG000000003DA24") - expect(subject.registrant_contacts[0].name).to eq("IPC C/O Clarenter") - expect(subject.registrant_contacts[0].organization).to eq("Clarenter") - expect(subject.registrant_contacts[0].address).to eq("110 E Broward Blvd\nSte. 1720") - expect(subject.registrant_contacts[0].city).to eq("Fort Lauderdale") - expect(subject.registrant_contacts[0].zip).to eq("33301") - expect(subject.registrant_contacts[0].state).to eq("FL") - expect(subject.registrant_contacts[0].country).to eq(nil) - expect(subject.registrant_contacts[0].country_code).to eq("US") - expect(subject.registrant_contacts[0].phone).to eq("+1.18888443911") - expect(subject.registrant_contacts[0].fax).to eq(nil) - expect(subject.registrant_contacts[0].email).to eq("patricia@internationalpreschoolcurriculum.com") - end - end - describe "#admin_contacts" do - it do - expect(subject.admin_contacts).to be_a(Array) - expect(subject.admin_contacts.size).to eq(1) - expect(subject.admin_contacts[0]).to be_a(Whois::Parser::Contact) - expect(subject.admin_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_ADMINISTRATIVE) - expect(subject.admin_contacts[0].id).to eq("RWG000000003DA24") - expect(subject.admin_contacts[0].name).to eq("IPC C/O Clarenter") - expect(subject.admin_contacts[0].organization).to eq("Clarenter") - expect(subject.admin_contacts[0].address).to eq("110 E Broward Blvd\nSte. 1720") - expect(subject.admin_contacts[0].city).to eq("Fort Lauderdale") - expect(subject.admin_contacts[0].zip).to eq("33301") - expect(subject.admin_contacts[0].state).to eq("FL") - expect(subject.admin_contacts[0].country).to eq(nil) - expect(subject.admin_contacts[0].country_code).to eq("US") - expect(subject.admin_contacts[0].phone).to eq("+1.18888443911") - expect(subject.admin_contacts[0].fax).to eq(nil) - expect(subject.admin_contacts[0].email).to eq("patricia@internationalpreschoolcurriculum.com") - end - end - describe "#technical_contacts" do - it do - expect(subject.technical_contacts).to be_a(Array) - expect(subject.technical_contacts.size).to eq(1) - expect(subject.technical_contacts[0]).to be_a(Whois::Parser::Contact) - expect(subject.technical_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_TECHNICAL) - expect(subject.technical_contacts[0].id).to eq("RWG000000003DA24") - expect(subject.technical_contacts[0].name).to eq("IPC C/O Clarenter") - expect(subject.technical_contacts[0].organization).to eq("Clarenter") - expect(subject.technical_contacts[0].address).to eq("110 E Broward Blvd\nSte. 1720") - expect(subject.technical_contacts[0].city).to eq("Fort Lauderdale") - expect(subject.technical_contacts[0].zip).to eq("33301") - expect(subject.technical_contacts[0].state).to eq("FL") - expect(subject.technical_contacts[0].country).to eq(nil) - expect(subject.technical_contacts[0].country_code).to eq("US") - expect(subject.technical_contacts[0].phone).to eq("+1.18888443911") - expect(subject.technical_contacts[0].fax).to eq(nil) - expect(subject.technical_contacts[0].email).to eq("patricia@internationalpreschoolcurriculum.com") - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers.size).to eq(2) - expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[0].name).to eq("ns37.domaincontrol.com") - expect(subject.nameservers[0].ipv4).to eq(nil) - expect(subject.nameservers[0].ipv6).to eq(nil) - expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[1].name).to eq("ns38.domaincontrol.com") - expect(subject.nameservers[1].ipv4).to eq(nil) - expect(subject.nameservers[1].ipv6).to eq(nil) - end + it "matches status_registered.expected" do + expect(subject.disclaimer).to eq("This whois service is provided by CentralNic Ltd and only contains information pertaining to Internet domain names we have registered for our customers. By using this service you are agreeing (1) not to use any information presented here for any purpose other than determining ownership of domain names, (2) not to store or reproduce this data in any way, (3) not to use any high-volume, automated, electronic processes to obtain data from this service. Abuse of this service is monitored and actions in contravention of these terms will result in being permanently blacklisted. All data is (c) CentralNic Ltd https://www.centralnic.com/") + expect(subject.domain).to eq("kidzlink.ae.org") + expect(subject.domain_id).to eq("CNIC-DO887354") + expect(subject.status).to eq(["clientTransferProhibited", "serverTransferProhibited"]) + expect(subject.available?).to eq(false) + expect(subject.registered?).to eq(true) + expect(subject.created_on).to be_a(Time) + expect(subject.created_on).to eq(DateTime.parse("2012-08-03 15:37:33 UTC")) + expect(subject.updated_on).to be_a(Time) + expect(subject.updated_on).to eq(DateTime.parse("2013-06-09 00:12:37 UTC")) + expect(subject.expires_on).to be_a(Time) + expect(subject.expires_on).to eq(DateTime.parse("2014-08-03 23:59:59 UTC")) + expect(subject.registrar).to be_a(Whois::Parser::Registrar) + expect(subject.registrar.id).to eq("H65658") + expect(subject.registrar.name).to eq("101Domain, Inc.") + expect(subject.registrar.url).to eq("http://www.101domain.com") + expect(subject.registrant_contacts).to be_a(Array) + expect(subject.registrant_contacts.size).to eq(1) + expect(subject.registrant_contacts[0]).to be_a(Whois::Parser::Contact) + expect(subject.registrant_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_REGISTRANT) + expect(subject.registrant_contacts[0].id).to eq("RWG000000003DA24") + expect(subject.registrant_contacts[0].name).to eq("IPC C/O Clarenter") + expect(subject.registrant_contacts[0].organization).to eq("Clarenter") + expect(subject.registrant_contacts[0].address).to eq("110 E Broward Blvd\nSte. 1720") + expect(subject.registrant_contacts[0].city).to eq("Fort Lauderdale") + expect(subject.registrant_contacts[0].zip).to eq("33301") + expect(subject.registrant_contacts[0].state).to eq("FL") + expect(subject.registrant_contacts[0].country).to eq(nil) + expect(subject.registrant_contacts[0].country_code).to eq("US") + expect(subject.registrant_contacts[0].phone).to eq("+1.18888443911") + expect(subject.registrant_contacts[0].fax).to eq(nil) + expect(subject.registrant_contacts[0].email).to eq("patricia@internationalpreschoolcurriculum.com") + expect(subject.admin_contacts).to be_a(Array) + expect(subject.admin_contacts.size).to eq(1) + expect(subject.admin_contacts[0]).to be_a(Whois::Parser::Contact) + expect(subject.admin_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_ADMINISTRATIVE) + expect(subject.admin_contacts[0].id).to eq("RWG000000003DA24") + expect(subject.admin_contacts[0].name).to eq("IPC C/O Clarenter") + expect(subject.admin_contacts[0].organization).to eq("Clarenter") + expect(subject.admin_contacts[0].address).to eq("110 E Broward Blvd\nSte. 1720") + expect(subject.admin_contacts[0].city).to eq("Fort Lauderdale") + expect(subject.admin_contacts[0].zip).to eq("33301") + expect(subject.admin_contacts[0].state).to eq("FL") + expect(subject.admin_contacts[0].country).to eq(nil) + expect(subject.admin_contacts[0].country_code).to eq("US") + expect(subject.admin_contacts[0].phone).to eq("+1.18888443911") + expect(subject.admin_contacts[0].fax).to eq(nil) + expect(subject.admin_contacts[0].email).to eq("patricia@internationalpreschoolcurriculum.com") + expect(subject.technical_contacts).to be_a(Array) + expect(subject.technical_contacts.size).to eq(1) + expect(subject.technical_contacts[0]).to be_a(Whois::Parser::Contact) + expect(subject.technical_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_TECHNICAL) + expect(subject.technical_contacts[0].id).to eq("RWG000000003DA24") + expect(subject.technical_contacts[0].name).to eq("IPC C/O Clarenter") + expect(subject.technical_contacts[0].organization).to eq("Clarenter") + expect(subject.technical_contacts[0].address).to eq("110 E Broward Blvd\nSte. 1720") + expect(subject.technical_contacts[0].city).to eq("Fort Lauderdale") + expect(subject.technical_contacts[0].zip).to eq("33301") + expect(subject.technical_contacts[0].state).to eq("FL") + expect(subject.technical_contacts[0].country).to eq(nil) + expect(subject.technical_contacts[0].country_code).to eq("US") + expect(subject.technical_contacts[0].phone).to eq("+1.18888443911") + expect(subject.technical_contacts[0].fax).to eq(nil) + expect(subject.technical_contacts[0].email).to eq("patricia@internationalpreschoolcurriculum.com") + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers.size).to eq(2) + expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[0].name).to eq("ns37.domaincontrol.com") + expect(subject.nameservers[0].ipv4).to eq(nil) + expect(subject.nameservers[0].ipv6).to eq(nil) + expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[1].name).to eq("ns38.domaincontrol.com") + expect(subject.nameservers[1].ipv4).to eq(nil) + expect(subject.nameservers[1].ipv6).to eq(nil) end end diff --git a/spec/whois/parsers/responses/whois.centralnic.com/ar.com/status_available_spec.rb b/spec/whois/parsers/responses/whois.centralnic.com/ar.com/status_available_spec.rb index 3219d20c..4985ccd8 100644 --- a/spec/whois/parsers/responses/whois.centralnic.com/ar.com/status_available_spec.rb +++ b/spec/whois/parsers/responses/whois.centralnic.com/ar.com/status_available_spec.rb @@ -11,88 +11,33 @@ # require 'spec_helper' -require 'whois/parsers/whois.centralnic.com.rb' -describe Whois::Parsers::WhoisCentralnicCom, "status_available.expected" do +describe "whois.centralnic.com", :aggregate_failures do subject do file = fixture("responses", "whois.centralnic.com/ar.com/status_available.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.centralnic.com") + Whois::Parser.parser_for(part) end - describe "#disclaimer" do - it do - expect(subject.disclaimer).to eq(nil) - end - end - describe "#domain" do - it do - expect(subject.domain).to eq(nil) - end - end - describe "#domain_id" do - it do - expect(subject.domain_id).to eq(nil) - end - end - describe "#status" do - it do - expect(subject.status).to eq([]) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(true) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(false) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to eq(nil) - end - end - describe "#updated_on" do - it do - expect(subject.updated_on).to eq(nil) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to eq(nil) - end - end - describe "#registrar" do - it do - expect(subject.registrar).to eq(nil) - end - end - describe "#registrant_contacts" do - it do - expect(subject.registrant_contacts).to be_a(Array) - expect(subject.registrant_contacts).to eq([]) - end - end - describe "#admin_contacts" do - it do - expect(subject.admin_contacts).to be_a(Array) - expect(subject.admin_contacts).to eq([]) - end - end - describe "#technical_contacts" do - it do - expect(subject.technical_contacts).to be_a(Array) - expect(subject.technical_contacts).to eq([]) - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers).to eq([]) - end + it "matches status_available.expected" do + expect(subject.disclaimer).to eq(nil) + expect(subject.domain).to eq(nil) + expect(subject.domain_id).to eq(nil) + expect(subject.status).to eq([]) + expect(subject.available?).to eq(true) + expect(subject.registered?).to eq(false) + expect(subject.created_on).to eq(nil) + expect(subject.updated_on).to eq(nil) + expect(subject.expires_on).to eq(nil) + expect(subject.registrar).to eq(nil) + expect(subject.registrant_contacts).to be_a(Array) + expect(subject.registrant_contacts).to eq([]) + expect(subject.admin_contacts).to be_a(Array) + expect(subject.admin_contacts).to eq([]) + expect(subject.technical_contacts).to be_a(Array) + expect(subject.technical_contacts).to eq([]) + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers).to eq([]) end end diff --git a/spec/whois/parsers/responses/whois.centralnic.com/ar.com/status_registered_spec.rb b/spec/whois/parsers/responses/whois.centralnic.com/ar.com/status_registered_spec.rb index dcbe102f..6ec67104 100644 --- a/spec/whois/parsers/responses/whois.centralnic.com/ar.com/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.centralnic.com/ar.com/status_registered_spec.rb @@ -11,148 +11,93 @@ # require 'spec_helper' -require 'whois/parsers/whois.centralnic.com.rb' -describe Whois::Parsers::WhoisCentralnicCom, "status_registered.expected" do +describe "whois.centralnic.com", :aggregate_failures do subject do file = fixture("responses", "whois.centralnic.com/ar.com/status_registered.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.centralnic.com") + Whois::Parser.parser_for(part) end - describe "#disclaimer" do - it do - expect(subject.disclaimer).to eq("This whois service is provided by CentralNic Ltd and only contains information pertaining to Internet domain names we have registered for our customers. By using this service you are agreeing (1) not to use any information presented here for any purpose other than determining ownership of domain names, (2) not to store or reproduce this data in any way, (3) not to use any high-volume, automated, electronic processes to obtain data from this service. Abuse of this service is monitored and actions in contravention of these terms will result in being permanently blacklisted. All data is (c) CentralNic Ltd https://www.centralnic.com/") - end - end - describe "#domain" do - it do - expect(subject.domain).to eq("hotel.ar.com") - end - end - describe "#domain_id" do - it do - expect(subject.domain_id).to eq("CNIC-DO557730") - end - end - describe "#status" do - it do - expect(subject.status).to eq(["ok"]) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(false) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(true) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to be_a(Time) - expect(subject.created_on).to eq(DateTime.parse("2008-04-25 16:22:13 UTC")) - end - end - describe "#updated_on" do - it do - expect(subject.updated_on).to be_a(Time) - expect(subject.updated_on).to eq(DateTime.parse("2013-04-26 00:15:40 UTC")) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to be_a(Time) - expect(subject.expires_on).to eq(DateTime.parse("2014-04-25 23:59:59 UTC")) - end - end - describe "#registrar" do - it do - expect(subject.registrar).to be_a(Whois::Parser::Registrar) - expect(subject.registrar.id).to eq("H1323241") - expect(subject.registrar.name).to eq("CentralNic Ltd") - expect(subject.registrar.url).to eq(nil) - end - end - describe "#registrant_contacts" do - it do - expect(subject.registrant_contacts).to be_a(Array) - expect(subject.registrant_contacts.size).to eq(1) - expect(subject.registrant_contacts[0]).to be_a(Whois::Parser::Contact) - expect(subject.registrant_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_REGISTRANT) - expect(subject.registrant_contacts[0].id).to eq("H1323241") - expect(subject.registrant_contacts[0].name).to eq("Reserved Domains") - expect(subject.registrant_contacts[0].organization).to eq("CentralNic Ltd") - expect(subject.registrant_contacts[0].address).to eq("35-39 Moorgate") - expect(subject.registrant_contacts[0].city).to eq("London") - expect(subject.registrant_contacts[0].zip).to eq("EC2R 6AR") - expect(subject.registrant_contacts[0].state).to eq(nil) - expect(subject.registrant_contacts[0].country).to eq(nil) - expect(subject.registrant_contacts[0].country_code).to eq("GB") - expect(subject.registrant_contacts[0].phone).to eq("+44.8700170900") - expect(subject.registrant_contacts[0].fax).to eq("+44.8700170901") - expect(subject.registrant_contacts[0].email).to eq("domains@centralnic.com") - end - end - describe "#admin_contacts" do - it do - expect(subject.admin_contacts).to be_a(Array) - expect(subject.admin_contacts.size).to eq(1) - expect(subject.admin_contacts[0]).to be_a(Whois::Parser::Contact) - expect(subject.admin_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_ADMINISTRATIVE) - expect(subject.admin_contacts[0].id).to eq("H1323241") - expect(subject.admin_contacts[0].name).to eq("Reserved Domains") - expect(subject.admin_contacts[0].organization).to eq("CentralNic Ltd") - expect(subject.admin_contacts[0].address).to eq("35-39 Moorgate") - expect(subject.admin_contacts[0].city).to eq("London") - expect(subject.admin_contacts[0].zip).to eq("EC2R 6AR") - expect(subject.admin_contacts[0].state).to eq(nil) - expect(subject.admin_contacts[0].country).to eq(nil) - expect(subject.admin_contacts[0].country_code).to eq("GB") - expect(subject.admin_contacts[0].phone).to eq("+44.8700170900") - expect(subject.admin_contacts[0].fax).to eq("+44.8700170901") - expect(subject.admin_contacts[0].email).to eq("domains@centralnic.com") - end - end - describe "#technical_contacts" do - it do - expect(subject.technical_contacts).to be_a(Array) - expect(subject.technical_contacts.size).to eq(1) - expect(subject.technical_contacts[0]).to be_a(Whois::Parser::Contact) - expect(subject.technical_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_TECHNICAL) - expect(subject.technical_contacts[0].id).to eq("H1323241") - expect(subject.technical_contacts[0].name).to eq("Reserved Domains") - expect(subject.technical_contacts[0].organization).to eq("CentralNic Ltd") - expect(subject.technical_contacts[0].address).to eq("35-39 Moorgate") - expect(subject.technical_contacts[0].city).to eq("London") - expect(subject.technical_contacts[0].zip).to eq("EC2R 6AR") - expect(subject.technical_contacts[0].state).to eq(nil) - expect(subject.technical_contacts[0].country).to eq(nil) - expect(subject.technical_contacts[0].country_code).to eq("GB") - expect(subject.technical_contacts[0].phone).to eq("+44.8700170900") - expect(subject.technical_contacts[0].fax).to eq("+44.8700170901") - expect(subject.technical_contacts[0].email).to eq("domains@centralnic.com") - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers.size).to eq(6) - expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[0].name).to eq("ns0.centralnic-dns.com") - expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[1].name).to eq("ns1.centralnic-dns.com") - expect(subject.nameservers[2]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[2].name).to eq("ns2.centralnic-dns.com") - expect(subject.nameservers[3]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[3].name).to eq("ns3.centralnic-dns.com") - expect(subject.nameservers[4]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[4].name).to eq("ns4.centralnic-dns.com") - expect(subject.nameservers[5]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[5].name).to eq("ns5.centralnic-dns.com") - end + it "matches status_registered.expected" do + expect(subject.disclaimer).to eq("This whois service is provided by CentralNic Ltd and only contains information pertaining to Internet domain names we have registered for our customers. By using this service you are agreeing (1) not to use any information presented here for any purpose other than determining ownership of domain names, (2) not to store or reproduce this data in any way, (3) not to use any high-volume, automated, electronic processes to obtain data from this service. Abuse of this service is monitored and actions in contravention of these terms will result in being permanently blacklisted. All data is (c) CentralNic Ltd https://www.centralnic.com/") + expect(subject.domain).to eq("hotel.ar.com") + expect(subject.domain_id).to eq("CNIC-DO557730") + expect(subject.status).to eq(["ok"]) + expect(subject.available?).to eq(false) + expect(subject.registered?).to eq(true) + expect(subject.created_on).to be_a(Time) + expect(subject.created_on).to eq(DateTime.parse("2008-04-25 16:22:13 UTC")) + expect(subject.updated_on).to be_a(Time) + expect(subject.updated_on).to eq(DateTime.parse("2013-04-26 00:15:40 UTC")) + expect(subject.expires_on).to be_a(Time) + expect(subject.expires_on).to eq(DateTime.parse("2014-04-25 23:59:59 UTC")) + expect(subject.registrar).to be_a(Whois::Parser::Registrar) + expect(subject.registrar.id).to eq("H1323241") + expect(subject.registrar.name).to eq("CentralNic Ltd") + expect(subject.registrar.url).to eq(nil) + expect(subject.registrant_contacts).to be_a(Array) + expect(subject.registrant_contacts.size).to eq(1) + expect(subject.registrant_contacts[0]).to be_a(Whois::Parser::Contact) + expect(subject.registrant_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_REGISTRANT) + expect(subject.registrant_contacts[0].id).to eq("H1323241") + expect(subject.registrant_contacts[0].name).to eq("Reserved Domains") + expect(subject.registrant_contacts[0].organization).to eq("CentralNic Ltd") + expect(subject.registrant_contacts[0].address).to eq("35-39 Moorgate") + expect(subject.registrant_contacts[0].city).to eq("London") + expect(subject.registrant_contacts[0].zip).to eq("EC2R 6AR") + expect(subject.registrant_contacts[0].state).to eq(nil) + expect(subject.registrant_contacts[0].country).to eq(nil) + expect(subject.registrant_contacts[0].country_code).to eq("GB") + expect(subject.registrant_contacts[0].phone).to eq("+44.8700170900") + expect(subject.registrant_contacts[0].fax).to eq("+44.8700170901") + expect(subject.registrant_contacts[0].email).to eq("domains@centralnic.com") + expect(subject.admin_contacts).to be_a(Array) + expect(subject.admin_contacts.size).to eq(1) + expect(subject.admin_contacts[0]).to be_a(Whois::Parser::Contact) + expect(subject.admin_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_ADMINISTRATIVE) + expect(subject.admin_contacts[0].id).to eq("H1323241") + expect(subject.admin_contacts[0].name).to eq("Reserved Domains") + expect(subject.admin_contacts[0].organization).to eq("CentralNic Ltd") + expect(subject.admin_contacts[0].address).to eq("35-39 Moorgate") + expect(subject.admin_contacts[0].city).to eq("London") + expect(subject.admin_contacts[0].zip).to eq("EC2R 6AR") + expect(subject.admin_contacts[0].state).to eq(nil) + expect(subject.admin_contacts[0].country).to eq(nil) + expect(subject.admin_contacts[0].country_code).to eq("GB") + expect(subject.admin_contacts[0].phone).to eq("+44.8700170900") + expect(subject.admin_contacts[0].fax).to eq("+44.8700170901") + expect(subject.admin_contacts[0].email).to eq("domains@centralnic.com") + expect(subject.technical_contacts).to be_a(Array) + expect(subject.technical_contacts.size).to eq(1) + expect(subject.technical_contacts[0]).to be_a(Whois::Parser::Contact) + expect(subject.technical_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_TECHNICAL) + expect(subject.technical_contacts[0].id).to eq("H1323241") + expect(subject.technical_contacts[0].name).to eq("Reserved Domains") + expect(subject.technical_contacts[0].organization).to eq("CentralNic Ltd") + expect(subject.technical_contacts[0].address).to eq("35-39 Moorgate") + expect(subject.technical_contacts[0].city).to eq("London") + expect(subject.technical_contacts[0].zip).to eq("EC2R 6AR") + expect(subject.technical_contacts[0].state).to eq(nil) + expect(subject.technical_contacts[0].country).to eq(nil) + expect(subject.technical_contacts[0].country_code).to eq("GB") + expect(subject.technical_contacts[0].phone).to eq("+44.8700170900") + expect(subject.technical_contacts[0].fax).to eq("+44.8700170901") + expect(subject.technical_contacts[0].email).to eq("domains@centralnic.com") + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers.size).to eq(6) + expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[0].name).to eq("ns0.centralnic-dns.com") + expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[1].name).to eq("ns1.centralnic-dns.com") + expect(subject.nameservers[2]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[2].name).to eq("ns2.centralnic-dns.com") + expect(subject.nameservers[3]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[3].name).to eq("ns3.centralnic-dns.com") + expect(subject.nameservers[4]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[4].name).to eq("ns4.centralnic-dns.com") + expect(subject.nameservers[5]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[5].name).to eq("ns5.centralnic-dns.com") end end diff --git a/spec/whois/parsers/responses/whois.centralnic.com/br.com/status_available_spec.rb b/spec/whois/parsers/responses/whois.centralnic.com/br.com/status_available_spec.rb index c8872492..6868cec2 100644 --- a/spec/whois/parsers/responses/whois.centralnic.com/br.com/status_available_spec.rb +++ b/spec/whois/parsers/responses/whois.centralnic.com/br.com/status_available_spec.rb @@ -11,88 +11,33 @@ # require 'spec_helper' -require 'whois/parsers/whois.centralnic.com.rb' -describe Whois::Parsers::WhoisCentralnicCom, "status_available.expected" do +describe "whois.centralnic.com", :aggregate_failures do subject do file = fixture("responses", "whois.centralnic.com/br.com/status_available.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.centralnic.com") + Whois::Parser.parser_for(part) end - describe "#disclaimer" do - it do - expect(subject.disclaimer).to eq(nil) - end - end - describe "#domain" do - it do - expect(subject.domain).to eq(nil) - end - end - describe "#domain_id" do - it do - expect(subject.domain_id).to eq(nil) - end - end - describe "#status" do - it do - expect(subject.status).to eq([]) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(true) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(false) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to eq(nil) - end - end - describe "#updated_on" do - it do - expect(subject.updated_on).to eq(nil) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to eq(nil) - end - end - describe "#registrar" do - it do - expect(subject.registrar).to eq(nil) - end - end - describe "#registrant_contacts" do - it do - expect(subject.registrant_contacts).to be_a(Array) - expect(subject.registrant_contacts).to eq([]) - end - end - describe "#admin_contacts" do - it do - expect(subject.admin_contacts).to be_a(Array) - expect(subject.admin_contacts).to eq([]) - end - end - describe "#technical_contacts" do - it do - expect(subject.technical_contacts).to be_a(Array) - expect(subject.technical_contacts).to eq([]) - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers).to eq([]) - end + it "matches status_available.expected" do + expect(subject.disclaimer).to eq(nil) + expect(subject.domain).to eq(nil) + expect(subject.domain_id).to eq(nil) + expect(subject.status).to eq([]) + expect(subject.available?).to eq(true) + expect(subject.registered?).to eq(false) + expect(subject.created_on).to eq(nil) + expect(subject.updated_on).to eq(nil) + expect(subject.expires_on).to eq(nil) + expect(subject.registrar).to eq(nil) + expect(subject.registrant_contacts).to be_a(Array) + expect(subject.registrant_contacts).to eq([]) + expect(subject.admin_contacts).to be_a(Array) + expect(subject.admin_contacts).to eq([]) + expect(subject.technical_contacts).to be_a(Array) + expect(subject.technical_contacts).to eq([]) + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers).to eq([]) end end diff --git a/spec/whois/parsers/responses/whois.centralnic.com/br.com/status_registered_spec.rb b/spec/whois/parsers/responses/whois.centralnic.com/br.com/status_registered_spec.rb index b67ca11b..fdebfb32 100644 --- a/spec/whois/parsers/responses/whois.centralnic.com/br.com/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.centralnic.com/br.com/status_registered_spec.rb @@ -11,144 +11,89 @@ # require 'spec_helper' -require 'whois/parsers/whois.centralnic.com.rb' -describe Whois::Parsers::WhoisCentralnicCom, "status_registered.expected" do +describe "whois.centralnic.com", :aggregate_failures do subject do file = fixture("responses", "whois.centralnic.com/br.com/status_registered.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.centralnic.com") + Whois::Parser.parser_for(part) end - describe "#disclaimer" do - it do - expect(subject.disclaimer).to eq("This whois service is provided by CentralNic Ltd and only contains information pertaining to Internet domain names we have registered for our customers. By using this service you are agreeing (1) not to use any information presented here for any purpose other than determining ownership of domain names, (2) not to store or reproduce this data in any way, (3) not to use any high-volume, automated, electronic processes to obtain data from this service. Abuse of this service is monitored and actions in contravention of these terms will result in being permanently blacklisted. All data is (c) CentralNic Ltd https://www.centralnic.com/") - end - end - describe "#domain" do - it do - expect(subject.domain).to eq("billboard.br.com") - end - end - describe "#domain_id" do - it do - expect(subject.domain_id).to eq("CNIC-DO624205") - end - end - describe "#status" do - it do - expect(subject.status).to eq(["clientTransferProhibited", "serverTransferProhibited", "renewPeriod"]) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(false) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(true) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to be_a(Time) - expect(subject.created_on).to eq(DateTime.parse("2009-04-17 12:22:49 UTC")) - end - end - describe "#updated_on" do - it do - expect(subject.updated_on).to be_a(Time) - expect(subject.updated_on).to eq(DateTime.parse("2012-01-16 16:23:18 UTC")) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to be_a(Time) - expect(subject.expires_on).to eq(DateTime.parse("2017-04-17 23:59:59 UTC")) - end - end - describe "#registrar" do - it do - expect(subject.registrar).to be_a(Whois::Parser::Registrar) - expect(subject.registrar.id).to eq("H292913") - expect(subject.registrar.name).to eq("Network Solutions LLC") - expect(subject.registrar.url).to eq("http://www.networksolutions.com/") - end - end - describe "#registrant_contacts" do - it do - expect(subject.registrant_contacts).to be_a(Array) - expect(subject.registrant_contacts.size).to eq(1) - expect(subject.registrant_contacts[0]).to be_a(Whois::Parser::Contact) - expect(subject.registrant_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_REGISTRANT) - expect(subject.registrant_contacts[0].id).to eq("36542943") - expect(subject.registrant_contacts[0].name).to eq("Antonio Camarotti Pinto") - expect(subject.registrant_contacts[0].organization).to eq(nil) - expect(subject.registrant_contacts[0].address).to eq("Rua Urussui, 238\n#22") - expect(subject.registrant_contacts[0].city).to eq("Sao Paulo") - expect(subject.registrant_contacts[0].zip).to eq("04542-050") - expect(subject.registrant_contacts[0].state).to eq("Sao Paulo") - expect(subject.registrant_contacts[0].country).to eq(nil) - expect(subject.registrant_contacts[0].country_code).to eq("BR") - expect(subject.registrant_contacts[0].phone).to eq("+1.551130787711") - expect(subject.registrant_contacts[0].fax).to eq(nil) - expect(subject.registrant_contacts[0].email).to eq("ac@bpp.bz") - end - end - describe "#admin_contacts" do - it do - expect(subject.admin_contacts).to be_a(Array) - expect(subject.admin_contacts.size).to eq(1) - expect(subject.admin_contacts[0]).to be_a(Whois::Parser::Contact) - expect(subject.admin_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_ADMINISTRATIVE) - expect(subject.admin_contacts[0].id).to eq("36542943") - expect(subject.admin_contacts[0].name).to eq("Antonio Camarotti Pinto") - expect(subject.admin_contacts[0].organization).to eq(nil) - expect(subject.admin_contacts[0].address).to eq("Rua Urussui, 238\n#22") - expect(subject.admin_contacts[0].city).to eq("Sao Paulo") - expect(subject.admin_contacts[0].zip).to eq("04542-050") - expect(subject.admin_contacts[0].state).to eq("Sao Paulo") - expect(subject.admin_contacts[0].country).to eq(nil) - expect(subject.admin_contacts[0].country_code).to eq("BR") - expect(subject.admin_contacts[0].phone).to eq("+1.551130787711") - expect(subject.admin_contacts[0].fax).to eq(nil) - expect(subject.admin_contacts[0].email).to eq("ac@bpp.bz") - end - end - describe "#technical_contacts" do - it do - expect(subject.technical_contacts).to be_a(Array) - expect(subject.technical_contacts.size).to eq(1) - expect(subject.technical_contacts[0]).to be_a(Whois::Parser::Contact) - expect(subject.technical_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_TECHNICAL) - expect(subject.technical_contacts[0].id).to eq("36542943") - expect(subject.technical_contacts[0].name).to eq("Antonio Camarotti Pinto") - expect(subject.technical_contacts[0].organization).to eq(nil) - expect(subject.technical_contacts[0].address).to eq("Rua Urussui, 238\n#22") - expect(subject.technical_contacts[0].city).to eq("Sao Paulo") - expect(subject.technical_contacts[0].zip).to eq("04542-050") - expect(subject.technical_contacts[0].state).to eq("Sao Paulo") - expect(subject.technical_contacts[0].country).to eq(nil) - expect(subject.technical_contacts[0].country_code).to eq("BR") - expect(subject.technical_contacts[0].phone).to eq("+1.551130787711") - expect(subject.technical_contacts[0].fax).to eq(nil) - expect(subject.technical_contacts[0].email).to eq("ac@bpp.bz") - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers.size).to eq(2) - expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[0].name).to eq("ns1.locaweb.com.br") - expect(subject.nameservers[0].ipv4).to eq(nil) - expect(subject.nameservers[0].ipv6).to eq(nil) - expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[1].name).to eq("ns2.locaweb.com.br") - expect(subject.nameservers[1].ipv4).to eq(nil) - expect(subject.nameservers[1].ipv6).to eq(nil) - end + it "matches status_registered.expected" do + expect(subject.disclaimer).to eq("This whois service is provided by CentralNic Ltd and only contains information pertaining to Internet domain names we have registered for our customers. By using this service you are agreeing (1) not to use any information presented here for any purpose other than determining ownership of domain names, (2) not to store or reproduce this data in any way, (3) not to use any high-volume, automated, electronic processes to obtain data from this service. Abuse of this service is monitored and actions in contravention of these terms will result in being permanently blacklisted. All data is (c) CentralNic Ltd https://www.centralnic.com/") + expect(subject.domain).to eq("billboard.br.com") + expect(subject.domain_id).to eq("CNIC-DO624205") + expect(subject.status).to eq(["clientTransferProhibited", "serverTransferProhibited", "renewPeriod"]) + expect(subject.available?).to eq(false) + expect(subject.registered?).to eq(true) + expect(subject.created_on).to be_a(Time) + expect(subject.created_on).to eq(DateTime.parse("2009-04-17 12:22:49 UTC")) + expect(subject.updated_on).to be_a(Time) + expect(subject.updated_on).to eq(DateTime.parse("2012-01-16 16:23:18 UTC")) + expect(subject.expires_on).to be_a(Time) + expect(subject.expires_on).to eq(DateTime.parse("2017-04-17 23:59:59 UTC")) + expect(subject.registrar).to be_a(Whois::Parser::Registrar) + expect(subject.registrar.id).to eq("H292913") + expect(subject.registrar.name).to eq("Network Solutions LLC") + expect(subject.registrar.url).to eq("http://www.networksolutions.com/") + expect(subject.registrant_contacts).to be_a(Array) + expect(subject.registrant_contacts.size).to eq(1) + expect(subject.registrant_contacts[0]).to be_a(Whois::Parser::Contact) + expect(subject.registrant_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_REGISTRANT) + expect(subject.registrant_contacts[0].id).to eq("36542943") + expect(subject.registrant_contacts[0].name).to eq("Antonio Camarotti Pinto") + expect(subject.registrant_contacts[0].organization).to eq(nil) + expect(subject.registrant_contacts[0].address).to eq("Rua Urussui, 238\n#22") + expect(subject.registrant_contacts[0].city).to eq("Sao Paulo") + expect(subject.registrant_contacts[0].zip).to eq("04542-050") + expect(subject.registrant_contacts[0].state).to eq("Sao Paulo") + expect(subject.registrant_contacts[0].country).to eq(nil) + expect(subject.registrant_contacts[0].country_code).to eq("BR") + expect(subject.registrant_contacts[0].phone).to eq("+1.551130787711") + expect(subject.registrant_contacts[0].fax).to eq(nil) + expect(subject.registrant_contacts[0].email).to eq("ac@bpp.bz") + expect(subject.admin_contacts).to be_a(Array) + expect(subject.admin_contacts.size).to eq(1) + expect(subject.admin_contacts[0]).to be_a(Whois::Parser::Contact) + expect(subject.admin_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_ADMINISTRATIVE) + expect(subject.admin_contacts[0].id).to eq("36542943") + expect(subject.admin_contacts[0].name).to eq("Antonio Camarotti Pinto") + expect(subject.admin_contacts[0].organization).to eq(nil) + expect(subject.admin_contacts[0].address).to eq("Rua Urussui, 238\n#22") + expect(subject.admin_contacts[0].city).to eq("Sao Paulo") + expect(subject.admin_contacts[0].zip).to eq("04542-050") + expect(subject.admin_contacts[0].state).to eq("Sao Paulo") + expect(subject.admin_contacts[0].country).to eq(nil) + expect(subject.admin_contacts[0].country_code).to eq("BR") + expect(subject.admin_contacts[0].phone).to eq("+1.551130787711") + expect(subject.admin_contacts[0].fax).to eq(nil) + expect(subject.admin_contacts[0].email).to eq("ac@bpp.bz") + expect(subject.technical_contacts).to be_a(Array) + expect(subject.technical_contacts.size).to eq(1) + expect(subject.technical_contacts[0]).to be_a(Whois::Parser::Contact) + expect(subject.technical_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_TECHNICAL) + expect(subject.technical_contacts[0].id).to eq("36542943") + expect(subject.technical_contacts[0].name).to eq("Antonio Camarotti Pinto") + expect(subject.technical_contacts[0].organization).to eq(nil) + expect(subject.technical_contacts[0].address).to eq("Rua Urussui, 238\n#22") + expect(subject.technical_contacts[0].city).to eq("Sao Paulo") + expect(subject.technical_contacts[0].zip).to eq("04542-050") + expect(subject.technical_contacts[0].state).to eq("Sao Paulo") + expect(subject.technical_contacts[0].country).to eq(nil) + expect(subject.technical_contacts[0].country_code).to eq("BR") + expect(subject.technical_contacts[0].phone).to eq("+1.551130787711") + expect(subject.technical_contacts[0].fax).to eq(nil) + expect(subject.technical_contacts[0].email).to eq("ac@bpp.bz") + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers.size).to eq(2) + expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[0].name).to eq("ns1.locaweb.com.br") + expect(subject.nameservers[0].ipv4).to eq(nil) + expect(subject.nameservers[0].ipv6).to eq(nil) + expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[1].name).to eq("ns2.locaweb.com.br") + expect(subject.nameservers[1].ipv4).to eq(nil) + expect(subject.nameservers[1].ipv6).to eq(nil) end end diff --git a/spec/whois/parsers/responses/whois.centralnic.com/cn.com/status_available_spec.rb b/spec/whois/parsers/responses/whois.centralnic.com/cn.com/status_available_spec.rb index 6bb54008..1302f574 100644 --- a/spec/whois/parsers/responses/whois.centralnic.com/cn.com/status_available_spec.rb +++ b/spec/whois/parsers/responses/whois.centralnic.com/cn.com/status_available_spec.rb @@ -11,88 +11,33 @@ # require 'spec_helper' -require 'whois/parsers/whois.centralnic.com.rb' -describe Whois::Parsers::WhoisCentralnicCom, "status_available.expected" do +describe "whois.centralnic.com", :aggregate_failures do subject do file = fixture("responses", "whois.centralnic.com/cn.com/status_available.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.centralnic.com") + Whois::Parser.parser_for(part) end - describe "#disclaimer" do - it do - expect(subject.disclaimer).to eq(nil) - end - end - describe "#domain" do - it do - expect(subject.domain).to eq(nil) - end - end - describe "#domain_id" do - it do - expect(subject.domain_id).to eq(nil) - end - end - describe "#status" do - it do - expect(subject.status).to eq([]) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(true) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(false) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to eq(nil) - end - end - describe "#updated_on" do - it do - expect(subject.updated_on).to eq(nil) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to eq(nil) - end - end - describe "#registrar" do - it do - expect(subject.registrar).to eq(nil) - end - end - describe "#registrant_contacts" do - it do - expect(subject.registrant_contacts).to be_a(Array) - expect(subject.registrant_contacts).to eq([]) - end - end - describe "#admin_contacts" do - it do - expect(subject.admin_contacts).to be_a(Array) - expect(subject.admin_contacts).to eq([]) - end - end - describe "#technical_contacts" do - it do - expect(subject.technical_contacts).to be_a(Array) - expect(subject.technical_contacts).to eq([]) - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers).to eq([]) - end + it "matches status_available.expected" do + expect(subject.disclaimer).to eq(nil) + expect(subject.domain).to eq(nil) + expect(subject.domain_id).to eq(nil) + expect(subject.status).to eq([]) + expect(subject.available?).to eq(true) + expect(subject.registered?).to eq(false) + expect(subject.created_on).to eq(nil) + expect(subject.updated_on).to eq(nil) + expect(subject.expires_on).to eq(nil) + expect(subject.registrar).to eq(nil) + expect(subject.registrant_contacts).to be_a(Array) + expect(subject.registrant_contacts).to eq([]) + expect(subject.admin_contacts).to be_a(Array) + expect(subject.admin_contacts).to eq([]) + expect(subject.technical_contacts).to be_a(Array) + expect(subject.technical_contacts).to eq([]) + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers).to eq([]) end end diff --git a/spec/whois/parsers/responses/whois.centralnic.com/cn.com/status_registered_spec.rb b/spec/whois/parsers/responses/whois.centralnic.com/cn.com/status_registered_spec.rb index 369dbb56..2a897457 100644 --- a/spec/whois/parsers/responses/whois.centralnic.com/cn.com/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.centralnic.com/cn.com/status_registered_spec.rb @@ -11,140 +11,85 @@ # require 'spec_helper' -require 'whois/parsers/whois.centralnic.com.rb' -describe Whois::Parsers::WhoisCentralnicCom, "status_registered.expected" do +describe "whois.centralnic.com", :aggregate_failures do subject do file = fixture("responses", "whois.centralnic.com/cn.com/status_registered.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.centralnic.com") + Whois::Parser.parser_for(part) end - describe "#disclaimer" do - it do - expect(subject.disclaimer).to eq("This whois service is provided by CentralNic Ltd and only contains information pertaining to Internet domain names we have registered for our customers. By using this service you are agreeing (1) not to use any information presented here for any purpose other than determining ownership of domain names, (2) not to store or reproduce this data in any way, (3) not to use any high-volume, automated, electronic processes to obtain data from this service. Abuse of this service is monitored and actions in contravention of these terms will result in being permanently blacklisted. All data is (c) CentralNic Ltd https://www.centralnic.com/") - end - end - describe "#domain" do - it do - expect(subject.domain).to eq("gsn.cn.com") - end - end - describe "#domain_id" do - it do - expect(subject.domain_id).to eq("CNIC-DO323367") - end - end - describe "#status" do - it do - expect(subject.status).to eq(["clientTransferProhibited", "serverTransferProhibited"]) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(false) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(true) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to be_a(Time) - expect(subject.created_on).to eq(DateTime.parse("2005-11-23 15:44:03 UTC")) - end - end - describe "#updated_on" do - it do - expect(subject.updated_on).to be_a(Time) - expect(subject.updated_on).to eq(DateTime.parse("2013-11-26 12:16:45 UTC")) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to be_a(Time) - expect(subject.expires_on).to eq(DateTime.parse("2014-11-23 23:59:59 UTC")) - end - end - describe "#registrar" do - it do - expect(subject.registrar).to be_a(Whois::Parser::Registrar) - expect(subject.registrar.id).to eq("H67436") - expect(subject.registrar.name).to eq("united-domains AG") - expect(subject.registrar.url).to eq("http://www.united-domains.de") - end - end - describe "#registrant_contacts" do - it do - expect(subject.registrant_contacts).to be_a(Array) - expect(subject.registrant_contacts.size).to eq(1) - expect(subject.registrant_contacts[0]).to be_a(Whois::Parser::Contact) - expect(subject.registrant_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_REGISTRANT) - expect(subject.registrant_contacts[0].id).to eq("H1062079") - expect(subject.registrant_contacts[0].name).to eq("GSN Electronics Incorporation Pte Ltd") - expect(subject.registrant_contacts[0].organization).to eq(nil) - expect(subject.registrant_contacts[0].address).to eq("Straits Trading Building 9 Battery Road 16-08\nSingapore") - expect(subject.registrant_contacts[0].city).to eq(nil) - expect(subject.registrant_contacts[0].zip).to eq("049910") - expect(subject.registrant_contacts[0].state).to eq(nil) - expect(subject.registrant_contacts[0].country).to eq(nil) - expect(subject.registrant_contacts[0].country_code).to eq("SG") - expect(subject.registrant_contacts[0].phone).to eq("+65.62336919") - expect(subject.registrant_contacts[0].fax).to eq(nil) - expect(subject.registrant_contacts[0].email).to eq("abuse@gsn.in") - end - end - describe "#admin_contacts" do - it do - expect(subject.admin_contacts).to be_a(Array) - expect(subject.admin_contacts.size).to eq(1) - expect(subject.admin_contacts[0]).to be_a(Whois::Parser::Contact) - expect(subject.admin_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_ADMINISTRATIVE) - expect(subject.admin_contacts[0].id).to eq("AUTO-DRZK-SNVHSY") - expect(subject.admin_contacts[0].name).to eq("Pauline Ang") - expect(subject.admin_contacts[0].organization).to eq("GSN Electronics Incorporation Pte Ltd") - expect(subject.admin_contacts[0].address).to eq("Straits Trading Building 9 Battery Road 16-08") - expect(subject.admin_contacts[0].city).to eq("Singapore") - expect(subject.admin_contacts[0].zip).to eq("049910") - expect(subject.admin_contacts[0].state).to eq(nil) - expect(subject.admin_contacts[0].country).to eq(nil) - expect(subject.admin_contacts[0].country_code).to eq("SG") - expect(subject.admin_contacts[0].phone).to eq("+65.62336919") - expect(subject.admin_contacts[0].fax).to eq(nil) - expect(subject.admin_contacts[0].email).to eq("abuse@gsn.in") - end - end - describe "#technical_contacts" do - it do - expect(subject.technical_contacts).to be_a(Array) - expect(subject.technical_contacts.size).to eq(1) - expect(subject.technical_contacts[0]).to be_a(Whois::Parser::Contact) - expect(subject.technical_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_TECHNICAL) - expect(subject.technical_contacts[0].id).to eq("C-UHM65D7-TJGULR") - expect(subject.technical_contacts[0].name).to eq("Host Master") - expect(subject.technical_contacts[0].organization).to eq("united-domains AG") - expect(subject.technical_contacts[0].address).to eq("Gautinger Str. 10") - expect(subject.technical_contacts[0].city).to eq("Starnberg") - expect(subject.technical_contacts[0].zip).to eq("82319") - expect(subject.technical_contacts[0].state).to eq("Bayern") - expect(subject.technical_contacts[0].country).to eq(nil) - expect(subject.technical_contacts[0].country_code).to eq("DE") - expect(subject.technical_contacts[0].phone).to eq("+49.8151368670") - expect(subject.technical_contacts[0].fax).to eq("+49.81513686777") - expect(subject.technical_contacts[0].email).to eq("hostmaster@united-domains.de") - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers.size).to eq(2) - expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[0].name).to eq("ns1.meteos.it") - expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[1].name).to eq("ns2.meteos.it") - end + it "matches status_registered.expected" do + expect(subject.disclaimer).to eq("This whois service is provided by CentralNic Ltd and only contains information pertaining to Internet domain names we have registered for our customers. By using this service you are agreeing (1) not to use any information presented here for any purpose other than determining ownership of domain names, (2) not to store or reproduce this data in any way, (3) not to use any high-volume, automated, electronic processes to obtain data from this service. Abuse of this service is monitored and actions in contravention of these terms will result in being permanently blacklisted. All data is (c) CentralNic Ltd https://www.centralnic.com/") + expect(subject.domain).to eq("gsn.cn.com") + expect(subject.domain_id).to eq("CNIC-DO323367") + expect(subject.status).to eq(["clientTransferProhibited", "serverTransferProhibited"]) + expect(subject.available?).to eq(false) + expect(subject.registered?).to eq(true) + expect(subject.created_on).to be_a(Time) + expect(subject.created_on).to eq(DateTime.parse("2005-11-23 15:44:03 UTC")) + expect(subject.updated_on).to be_a(Time) + expect(subject.updated_on).to eq(DateTime.parse("2013-11-26 12:16:45 UTC")) + expect(subject.expires_on).to be_a(Time) + expect(subject.expires_on).to eq(DateTime.parse("2014-11-23 23:59:59 UTC")) + expect(subject.registrar).to be_a(Whois::Parser::Registrar) + expect(subject.registrar.id).to eq("H67436") + expect(subject.registrar.name).to eq("united-domains AG") + expect(subject.registrar.url).to eq("http://www.united-domains.de") + expect(subject.registrant_contacts).to be_a(Array) + expect(subject.registrant_contacts.size).to eq(1) + expect(subject.registrant_contacts[0]).to be_a(Whois::Parser::Contact) + expect(subject.registrant_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_REGISTRANT) + expect(subject.registrant_contacts[0].id).to eq("H1062079") + expect(subject.registrant_contacts[0].name).to eq("GSN Electronics Incorporation Pte Ltd") + expect(subject.registrant_contacts[0].organization).to eq(nil) + expect(subject.registrant_contacts[0].address).to eq("Straits Trading Building 9 Battery Road 16-08\nSingapore") + expect(subject.registrant_contacts[0].city).to eq(nil) + expect(subject.registrant_contacts[0].zip).to eq("049910") + expect(subject.registrant_contacts[0].state).to eq(nil) + expect(subject.registrant_contacts[0].country).to eq(nil) + expect(subject.registrant_contacts[0].country_code).to eq("SG") + expect(subject.registrant_contacts[0].phone).to eq("+65.62336919") + expect(subject.registrant_contacts[0].fax).to eq(nil) + expect(subject.registrant_contacts[0].email).to eq("abuse@gsn.in") + expect(subject.admin_contacts).to be_a(Array) + expect(subject.admin_contacts.size).to eq(1) + expect(subject.admin_contacts[0]).to be_a(Whois::Parser::Contact) + expect(subject.admin_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_ADMINISTRATIVE) + expect(subject.admin_contacts[0].id).to eq("AUTO-DRZK-SNVHSY") + expect(subject.admin_contacts[0].name).to eq("Pauline Ang") + expect(subject.admin_contacts[0].organization).to eq("GSN Electronics Incorporation Pte Ltd") + expect(subject.admin_contacts[0].address).to eq("Straits Trading Building 9 Battery Road 16-08") + expect(subject.admin_contacts[0].city).to eq("Singapore") + expect(subject.admin_contacts[0].zip).to eq("049910") + expect(subject.admin_contacts[0].state).to eq(nil) + expect(subject.admin_contacts[0].country).to eq(nil) + expect(subject.admin_contacts[0].country_code).to eq("SG") + expect(subject.admin_contacts[0].phone).to eq("+65.62336919") + expect(subject.admin_contacts[0].fax).to eq(nil) + expect(subject.admin_contacts[0].email).to eq("abuse@gsn.in") + expect(subject.technical_contacts).to be_a(Array) + expect(subject.technical_contacts.size).to eq(1) + expect(subject.technical_contacts[0]).to be_a(Whois::Parser::Contact) + expect(subject.technical_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_TECHNICAL) + expect(subject.technical_contacts[0].id).to eq("C-UHM65D7-TJGULR") + expect(subject.technical_contacts[0].name).to eq("Host Master") + expect(subject.technical_contacts[0].organization).to eq("united-domains AG") + expect(subject.technical_contacts[0].address).to eq("Gautinger Str. 10") + expect(subject.technical_contacts[0].city).to eq("Starnberg") + expect(subject.technical_contacts[0].zip).to eq("82319") + expect(subject.technical_contacts[0].state).to eq("Bayern") + expect(subject.technical_contacts[0].country).to eq(nil) + expect(subject.technical_contacts[0].country_code).to eq("DE") + expect(subject.technical_contacts[0].phone).to eq("+49.8151368670") + expect(subject.technical_contacts[0].fax).to eq("+49.81513686777") + expect(subject.technical_contacts[0].email).to eq("hostmaster@united-domains.de") + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers.size).to eq(2) + expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[0].name).to eq("ns1.meteos.it") + expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[1].name).to eq("ns2.meteos.it") end end diff --git a/spec/whois/parsers/responses/whois.centralnic.com/de.com/status_available_spec.rb b/spec/whois/parsers/responses/whois.centralnic.com/de.com/status_available_spec.rb index 55c135b9..d2729d27 100644 --- a/spec/whois/parsers/responses/whois.centralnic.com/de.com/status_available_spec.rb +++ b/spec/whois/parsers/responses/whois.centralnic.com/de.com/status_available_spec.rb @@ -11,88 +11,33 @@ # require 'spec_helper' -require 'whois/parsers/whois.centralnic.com.rb' -describe Whois::Parsers::WhoisCentralnicCom, "status_available.expected" do +describe "whois.centralnic.com", :aggregate_failures do subject do file = fixture("responses", "whois.centralnic.com/de.com/status_available.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.centralnic.com") + Whois::Parser.parser_for(part) end - describe "#disclaimer" do - it do - expect(subject.disclaimer).to eq(nil) - end - end - describe "#domain" do - it do - expect(subject.domain).to eq(nil) - end - end - describe "#domain_id" do - it do - expect(subject.domain_id).to eq(nil) - end - end - describe "#status" do - it do - expect(subject.status).to eq([]) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(true) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(false) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to eq(nil) - end - end - describe "#updated_on" do - it do - expect(subject.updated_on).to eq(nil) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to eq(nil) - end - end - describe "#registrar" do - it do - expect(subject.registrar).to eq(nil) - end - end - describe "#registrant_contacts" do - it do - expect(subject.registrant_contacts).to be_a(Array) - expect(subject.registrant_contacts).to eq([]) - end - end - describe "#admin_contacts" do - it do - expect(subject.admin_contacts).to be_a(Array) - expect(subject.admin_contacts).to eq([]) - end - end - describe "#technical_contacts" do - it do - expect(subject.technical_contacts).to be_a(Array) - expect(subject.technical_contacts).to eq([]) - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers).to eq([]) - end + it "matches status_available.expected" do + expect(subject.disclaimer).to eq(nil) + expect(subject.domain).to eq(nil) + expect(subject.domain_id).to eq(nil) + expect(subject.status).to eq([]) + expect(subject.available?).to eq(true) + expect(subject.registered?).to eq(false) + expect(subject.created_on).to eq(nil) + expect(subject.updated_on).to eq(nil) + expect(subject.expires_on).to eq(nil) + expect(subject.registrar).to eq(nil) + expect(subject.registrant_contacts).to be_a(Array) + expect(subject.registrant_contacts).to eq([]) + expect(subject.admin_contacts).to be_a(Array) + expect(subject.admin_contacts).to eq([]) + expect(subject.technical_contacts).to be_a(Array) + expect(subject.technical_contacts).to eq([]) + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers).to eq([]) end end diff --git a/spec/whois/parsers/responses/whois.centralnic.com/de.com/status_registered_spec.rb b/spec/whois/parsers/responses/whois.centralnic.com/de.com/status_registered_spec.rb index 2c90e2bc..51c7921a 100644 --- a/spec/whois/parsers/responses/whois.centralnic.com/de.com/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.centralnic.com/de.com/status_registered_spec.rb @@ -11,144 +11,89 @@ # require 'spec_helper' -require 'whois/parsers/whois.centralnic.com.rb' -describe Whois::Parsers::WhoisCentralnicCom, "status_registered.expected" do +describe "whois.centralnic.com", :aggregate_failures do subject do file = fixture("responses", "whois.centralnic.com/de.com/status_registered.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.centralnic.com") + Whois::Parser.parser_for(part) end - describe "#disclaimer" do - it do - expect(subject.disclaimer).to eq("This whois service is provided by CentralNic Ltd and only contains information pertaining to Internet domain names we have registered for our customers. By using this service you are agreeing (1) not to use any information presented here for any purpose other than determining ownership of domain names, (2) not to store or reproduce this data in any way, (3) not to use any high-volume, automated, electronic processes to obtain data from this service. Abuse of this service is monitored and actions in contravention of these terms will result in being permanently blacklisted. All data is (c) CentralNic Ltd https://www.centralnic.com/") - end - end - describe "#domain" do - it do - expect(subject.domain).to eq("autopoint.de.com") - end - end - describe "#domain_id" do - it do - expect(subject.domain_id).to eq("CNIC-DO578833") - end - end - describe "#status" do - it do - expect(subject.status).to eq(["clientTransferProhibited", "serverTransferProhibited"]) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(false) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(true) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to be_a(Time) - expect(subject.created_on).to eq(DateTime.parse("2008-07-04 20:30:08 UTC")) - end - end - describe "#updated_on" do - it do - expect(subject.updated_on).to be_a(Time) - expect(subject.updated_on).to eq(DateTime.parse("2013-07-12 10:03:56 UTC")) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to be_a(Time) - expect(subject.expires_on).to eq(DateTime.parse("2014-07-04 23:59:59 UTC")) - end - end - describe "#registrar" do - it do - expect(subject.registrar).to be_a(Whois::Parser::Registrar) - expect(subject.registrar.id).to eq("H67436") - expect(subject.registrar.name).to eq("united-domains AG") - expect(subject.registrar.url).to eq("http://www.united-domains.de") - end - end - describe "#registrant_contacts" do - it do - expect(subject.registrant_contacts).to be_a(Array) - expect(subject.registrant_contacts.size).to eq(1) - expect(subject.registrant_contacts[0]).to be_a(Whois::Parser::Contact) - expect(subject.registrant_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_REGISTRANT) - expect(subject.registrant_contacts[0].id).to eq("H1102323") - expect(subject.registrant_contacts[0].name).to eq("Stefan Von Gehlen") - expect(subject.registrant_contacts[0].organization).to eq(nil) - expect(subject.registrant_contacts[0].address).to eq("Muelgaustr. 292-294, Moenchengladbach") - expect(subject.registrant_contacts[0].city).to eq(nil) - expect(subject.registrant_contacts[0].zip).to eq("41238") - expect(subject.registrant_contacts[0].state).to eq(nil) - expect(subject.registrant_contacts[0].country).to eq(nil) - expect(subject.registrant_contacts[0].country_code).to eq("DE") - expect(subject.registrant_contacts[0].phone).to eq("+49.2166120626") - expect(subject.registrant_contacts[0].fax).to eq(nil) - expect(subject.registrant_contacts[0].email).to eq("s.vongehlen@arcor.de") - end - end - describe "#admin_contacts" do - it do - expect(subject.admin_contacts).to be_a(Array) - expect(subject.admin_contacts.size).to eq(1) - expect(subject.admin_contacts[0]).to be_a(Whois::Parser::Contact) - expect(subject.admin_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_ADMINISTRATIVE) - expect(subject.admin_contacts[0].id).to eq("H402505") - expect(subject.admin_contacts[0].name).to eq("Stefan Von Gehlen") - expect(subject.admin_contacts[0].organization).to eq(nil) - expect(subject.admin_contacts[0].address).to eq("Muelgaustr. 292-294, Moenchengladbach") - expect(subject.admin_contacts[0].city).to eq(nil) - expect(subject.admin_contacts[0].zip).to eq("41238") - expect(subject.admin_contacts[0].state).to eq(nil) - expect(subject.admin_contacts[0].country).to eq(nil) - expect(subject.admin_contacts[0].country_code).to eq("DE") - expect(subject.admin_contacts[0].phone).to eq("+49.2166120626") - expect(subject.admin_contacts[0].fax).to eq(nil) - expect(subject.admin_contacts[0].email).to eq("s.vongehlen@arcor.de") - end - end - describe "#technical_contacts" do - it do - expect(subject.technical_contacts).to be_a(Array) - expect(subject.technical_contacts.size).to eq(1) - expect(subject.technical_contacts[0]).to be_a(Whois::Parser::Contact) - expect(subject.technical_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_TECHNICAL) - expect(subject.technical_contacts[0].id).to eq("C-UHM65D7-TJGULR") - expect(subject.technical_contacts[0].name).to eq("Host Master") - expect(subject.technical_contacts[0].organization).to eq("united-domains AG") - expect(subject.technical_contacts[0].address).to eq("Gautinger Str. 10") - expect(subject.technical_contacts[0].city).to eq("Starnberg") - expect(subject.technical_contacts[0].zip).to eq("82319") - expect(subject.technical_contacts[0].state).to eq("Bayern") - expect(subject.technical_contacts[0].country).to eq(nil) - expect(subject.technical_contacts[0].country_code).to eq("DE") - expect(subject.technical_contacts[0].phone).to eq("+49.8151368670") - expect(subject.technical_contacts[0].fax).to eq("+49.81513686777") - expect(subject.technical_contacts[0].email).to eq("hostmaster@united-domains.de") - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers.size).to eq(2) - expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[0].name).to eq("ns.udagdns.net") - expect(subject.nameservers[0].ipv4).to eq(nil) - expect(subject.nameservers[0].ipv6).to eq(nil) - expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[1].name).to eq("ns.udagdns.de") - expect(subject.nameservers[1].ipv4).to eq(nil) - expect(subject.nameservers[1].ipv6).to eq(nil) - end + it "matches status_registered.expected" do + expect(subject.disclaimer).to eq("This whois service is provided by CentralNic Ltd and only contains information pertaining to Internet domain names we have registered for our customers. By using this service you are agreeing (1) not to use any information presented here for any purpose other than determining ownership of domain names, (2) not to store or reproduce this data in any way, (3) not to use any high-volume, automated, electronic processes to obtain data from this service. Abuse of this service is monitored and actions in contravention of these terms will result in being permanently blacklisted. All data is (c) CentralNic Ltd https://www.centralnic.com/") + expect(subject.domain).to eq("autopoint.de.com") + expect(subject.domain_id).to eq("CNIC-DO578833") + expect(subject.status).to eq(["clientTransferProhibited", "serverTransferProhibited"]) + expect(subject.available?).to eq(false) + expect(subject.registered?).to eq(true) + expect(subject.created_on).to be_a(Time) + expect(subject.created_on).to eq(DateTime.parse("2008-07-04 20:30:08 UTC")) + expect(subject.updated_on).to be_a(Time) + expect(subject.updated_on).to eq(DateTime.parse("2013-07-12 10:03:56 UTC")) + expect(subject.expires_on).to be_a(Time) + expect(subject.expires_on).to eq(DateTime.parse("2014-07-04 23:59:59 UTC")) + expect(subject.registrar).to be_a(Whois::Parser::Registrar) + expect(subject.registrar.id).to eq("H67436") + expect(subject.registrar.name).to eq("united-domains AG") + expect(subject.registrar.url).to eq("http://www.united-domains.de") + expect(subject.registrant_contacts).to be_a(Array) + expect(subject.registrant_contacts.size).to eq(1) + expect(subject.registrant_contacts[0]).to be_a(Whois::Parser::Contact) + expect(subject.registrant_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_REGISTRANT) + expect(subject.registrant_contacts[0].id).to eq("H1102323") + expect(subject.registrant_contacts[0].name).to eq("Stefan Von Gehlen") + expect(subject.registrant_contacts[0].organization).to eq(nil) + expect(subject.registrant_contacts[0].address).to eq("Muelgaustr. 292-294, Moenchengladbach") + expect(subject.registrant_contacts[0].city).to eq(nil) + expect(subject.registrant_contacts[0].zip).to eq("41238") + expect(subject.registrant_contacts[0].state).to eq(nil) + expect(subject.registrant_contacts[0].country).to eq(nil) + expect(subject.registrant_contacts[0].country_code).to eq("DE") + expect(subject.registrant_contacts[0].phone).to eq("+49.2166120626") + expect(subject.registrant_contacts[0].fax).to eq(nil) + expect(subject.registrant_contacts[0].email).to eq("s.vongehlen@arcor.de") + expect(subject.admin_contacts).to be_a(Array) + expect(subject.admin_contacts.size).to eq(1) + expect(subject.admin_contacts[0]).to be_a(Whois::Parser::Contact) + expect(subject.admin_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_ADMINISTRATIVE) + expect(subject.admin_contacts[0].id).to eq("H402505") + expect(subject.admin_contacts[0].name).to eq("Stefan Von Gehlen") + expect(subject.admin_contacts[0].organization).to eq(nil) + expect(subject.admin_contacts[0].address).to eq("Muelgaustr. 292-294, Moenchengladbach") + expect(subject.admin_contacts[0].city).to eq(nil) + expect(subject.admin_contacts[0].zip).to eq("41238") + expect(subject.admin_contacts[0].state).to eq(nil) + expect(subject.admin_contacts[0].country).to eq(nil) + expect(subject.admin_contacts[0].country_code).to eq("DE") + expect(subject.admin_contacts[0].phone).to eq("+49.2166120626") + expect(subject.admin_contacts[0].fax).to eq(nil) + expect(subject.admin_contacts[0].email).to eq("s.vongehlen@arcor.de") + expect(subject.technical_contacts).to be_a(Array) + expect(subject.technical_contacts.size).to eq(1) + expect(subject.technical_contacts[0]).to be_a(Whois::Parser::Contact) + expect(subject.technical_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_TECHNICAL) + expect(subject.technical_contacts[0].id).to eq("C-UHM65D7-TJGULR") + expect(subject.technical_contacts[0].name).to eq("Host Master") + expect(subject.technical_contacts[0].organization).to eq("united-domains AG") + expect(subject.technical_contacts[0].address).to eq("Gautinger Str. 10") + expect(subject.technical_contacts[0].city).to eq("Starnberg") + expect(subject.technical_contacts[0].zip).to eq("82319") + expect(subject.technical_contacts[0].state).to eq("Bayern") + expect(subject.technical_contacts[0].country).to eq(nil) + expect(subject.technical_contacts[0].country_code).to eq("DE") + expect(subject.technical_contacts[0].phone).to eq("+49.8151368670") + expect(subject.technical_contacts[0].fax).to eq("+49.81513686777") + expect(subject.technical_contacts[0].email).to eq("hostmaster@united-domains.de") + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers.size).to eq(2) + expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[0].name).to eq("ns.udagdns.net") + expect(subject.nameservers[0].ipv4).to eq(nil) + expect(subject.nameservers[0].ipv6).to eq(nil) + expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[1].name).to eq("ns.udagdns.de") + expect(subject.nameservers[1].ipv4).to eq(nil) + expect(subject.nameservers[1].ipv6).to eq(nil) end end diff --git a/spec/whois/parsers/responses/whois.centralnic.com/eu.com/status_available_spec.rb b/spec/whois/parsers/responses/whois.centralnic.com/eu.com/status_available_spec.rb index c2df56ed..8c9603e1 100644 --- a/spec/whois/parsers/responses/whois.centralnic.com/eu.com/status_available_spec.rb +++ b/spec/whois/parsers/responses/whois.centralnic.com/eu.com/status_available_spec.rb @@ -11,88 +11,33 @@ # require 'spec_helper' -require 'whois/parsers/whois.centralnic.com.rb' -describe Whois::Parsers::WhoisCentralnicCom, "status_available.expected" do +describe "whois.centralnic.com", :aggregate_failures do subject do file = fixture("responses", "whois.centralnic.com/eu.com/status_available.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.centralnic.com") + Whois::Parser.parser_for(part) end - describe "#disclaimer" do - it do - expect(subject.disclaimer).to eq(nil) - end - end - describe "#domain" do - it do - expect(subject.domain).to eq(nil) - end - end - describe "#domain_id" do - it do - expect(subject.domain_id).to eq(nil) - end - end - describe "#status" do - it do - expect(subject.status).to eq([]) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(true) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(false) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to eq(nil) - end - end - describe "#updated_on" do - it do - expect(subject.updated_on).to eq(nil) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to eq(nil) - end - end - describe "#registrar" do - it do - expect(subject.registrar).to eq(nil) - end - end - describe "#registrant_contacts" do - it do - expect(subject.registrant_contacts).to be_a(Array) - expect(subject.registrant_contacts).to eq([]) - end - end - describe "#admin_contacts" do - it do - expect(subject.admin_contacts).to be_a(Array) - expect(subject.admin_contacts).to eq([]) - end - end - describe "#technical_contacts" do - it do - expect(subject.technical_contacts).to be_a(Array) - expect(subject.technical_contacts).to eq([]) - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers).to eq([]) - end + it "matches status_available.expected" do + expect(subject.disclaimer).to eq(nil) + expect(subject.domain).to eq(nil) + expect(subject.domain_id).to eq(nil) + expect(subject.status).to eq([]) + expect(subject.available?).to eq(true) + expect(subject.registered?).to eq(false) + expect(subject.created_on).to eq(nil) + expect(subject.updated_on).to eq(nil) + expect(subject.expires_on).to eq(nil) + expect(subject.registrar).to eq(nil) + expect(subject.registrant_contacts).to be_a(Array) + expect(subject.registrant_contacts).to eq([]) + expect(subject.admin_contacts).to be_a(Array) + expect(subject.admin_contacts).to eq([]) + expect(subject.technical_contacts).to be_a(Array) + expect(subject.technical_contacts).to eq([]) + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers).to eq([]) end end diff --git a/spec/whois/parsers/responses/whois.centralnic.com/eu.com/status_registered_spec.rb b/spec/whois/parsers/responses/whois.centralnic.com/eu.com/status_registered_spec.rb index 8336c698..5497ac8b 100644 --- a/spec/whois/parsers/responses/whois.centralnic.com/eu.com/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.centralnic.com/eu.com/status_registered_spec.rb @@ -11,150 +11,95 @@ # require 'spec_helper' -require 'whois/parsers/whois.centralnic.com.rb' -describe Whois::Parsers::WhoisCentralnicCom, "status_registered.expected" do +describe "whois.centralnic.com", :aggregate_failures do subject do file = fixture("responses", "whois.centralnic.com/eu.com/status_registered.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.centralnic.com") + Whois::Parser.parser_for(part) end - describe "#disclaimer" do - it do - expect(subject.disclaimer).to eq("This whois service is provided by CentralNic Ltd and only contains information pertaining to Internet domain names we have registered for our customers. By using this service you are agreeing (1) not to use any information presented here for any purpose other than determining ownership of domain names, (2) not to store or reproduce this data in any way, (3) not to use any high-volume, automated, electronic processes to obtain data from this service. Abuse of this service is monitored and actions in contravention of these terms will result in being permanently blacklisted. All data is (c) CentralNic Ltd https://www.centralnic.com/") - end - end - describe "#domain" do - it do - expect(subject.domain).to eq("walkabout.eu.com") - end - end - describe "#domain_id" do - it do - expect(subject.domain_id).to eq("CNIC-DO85080") - end - end - describe "#status" do - it do - expect(subject.status).to eq(["ok"]) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(false) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(true) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to be_a(Time) - expect(subject.created_on).to eq(DateTime.parse("2001-08-14 10:14:41 UTC")) - end - end - describe "#updated_on" do - it do - expect(subject.updated_on).to be_a(Time) - expect(subject.updated_on).to eq(DateTime.parse("2013-08-15 11:25:43 UTC")) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to be_a(Time) - expect(subject.expires_on).to eq(DateTime.parse("2015-08-14 23:59:59 UTC")) - end - end - describe "#registrar" do - it do - expect(subject.registrar).to be_a(Whois::Parser::Registrar) - expect(subject.registrar.id).to eq("H126914") - expect(subject.registrar.name).to eq("iTransact Ltd") - expect(subject.registrar.url).to eq("www.itransact.ltd.uk") - end - end - describe "#registrant_contacts" do - it do - expect(subject.registrant_contacts).to be_a(Array) - expect(subject.registrant_contacts.size).to eq(1) - expect(subject.registrant_contacts[0]).to be_a(Whois::Parser::Contact) - expect(subject.registrant_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_REGISTRANT) - expect(subject.registrant_contacts[0].id).to eq("H1045382") - expect(subject.registrant_contacts[0].name).to eq("Regent Inns Plc") - expect(subject.registrant_contacts[0].organization).to eq(nil) - expect(subject.registrant_contacts[0].address).to eq("77 Muswell Hill\nLondon") - expect(subject.registrant_contacts[0].city).to eq(nil) - expect(subject.registrant_contacts[0].zip).to eq("N10 3PJ") - expect(subject.registrant_contacts[0].state).to eq(nil) - expect(subject.registrant_contacts[0].country).to eq(nil) - expect(subject.registrant_contacts[0].country_code).to eq("GB") - expect(subject.registrant_contacts[0].phone).to eq("+44.2083753155") - expect(subject.registrant_contacts[0].fax).to eq("+44.2083753001") - expect(subject.registrant_contacts[0].email).to eq("john.boyle@regent-inns.plc.uk") - end - end - describe "#admin_contacts" do - it do - expect(subject.admin_contacts).to be_a(Array) - expect(subject.admin_contacts.size).to eq(1) - expect(subject.admin_contacts[0]).to be_a(Whois::Parser::Contact) - expect(subject.admin_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_ADMINISTRATIVE) - expect(subject.admin_contacts[0].id).to eq("H64717") - expect(subject.admin_contacts[0].name).to eq("John Boyle") - expect(subject.admin_contacts[0].organization).to eq("Regent Inns Plc") - expect(subject.admin_contacts[0].address).to eq("77 Muswell Hill\nLondon") - expect(subject.admin_contacts[0].city).to eq(nil) - expect(subject.admin_contacts[0].zip).to eq("N10 3PJ") - expect(subject.admin_contacts[0].state).to eq(nil) - expect(subject.admin_contacts[0].country).to eq(nil) - expect(subject.admin_contacts[0].country_code).to eq("GB") - expect(subject.admin_contacts[0].phone).to eq("+44.2083753155") - expect(subject.admin_contacts[0].fax).to eq("+44.2083753001") - expect(subject.admin_contacts[0].email).to eq("john.boyle@regent-inns.plc.uk") - end - end - describe "#technical_contacts" do - it do - expect(subject.technical_contacts).to be_a(Array) - expect(subject.technical_contacts.size).to eq(1) - expect(subject.technical_contacts[0]).to be_a(Whois::Parser::Contact) - expect(subject.technical_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_TECHNICAL) - expect(subject.technical_contacts[0].id).to eq("H126914") - expect(subject.technical_contacts[0].name).to eq("Constantine Pagonis") - expect(subject.technical_contacts[0].organization).to eq("iTransact Ltd") - expect(subject.technical_contacts[0].address).to eq("PO Box 430\nCambridge\nCambs") - expect(subject.technical_contacts[0].city).to eq(nil) - expect(subject.technical_contacts[0].zip).to eq("CB1 2WE") - expect(subject.technical_contacts[0].state).to eq(nil) - expect(subject.technical_contacts[0].country).to eq(nil) - expect(subject.technical_contacts[0].country_code).to eq("GB") - expect(subject.technical_contacts[0].phone).to eq("+44.1223700322") - expect(subject.technical_contacts[0].fax).to eq(nil) - expect(subject.technical_contacts[0].email).to eq("constantine@itransact.ltd.uk") - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers.size).to eq(4) - expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[0].name).to eq("ns-1146.awsdns-15.org") - expect(subject.nameservers[0].ipv4).to eq(nil) - expect(subject.nameservers[0].ipv6).to eq(nil) - expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[1].name).to eq("ns-1741.awsdns-25.co.uk") - expect(subject.nameservers[1].ipv4).to eq(nil) - expect(subject.nameservers[1].ipv6).to eq(nil) - expect(subject.nameservers[2].name).to eq("ns-374.awsdns-46.com") - expect(subject.nameservers[2].ipv4).to eq(nil) - expect(subject.nameservers[2].ipv6).to eq(nil) - expect(subject.nameservers[3].name).to eq("ns-914.awsdns-50.net") - expect(subject.nameservers[3].ipv4).to eq(nil) - expect(subject.nameservers[3].ipv6).to eq(nil) - end + it "matches status_registered.expected" do + expect(subject.disclaimer).to eq("This whois service is provided by CentralNic Ltd and only contains information pertaining to Internet domain names we have registered for our customers. By using this service you are agreeing (1) not to use any information presented here for any purpose other than determining ownership of domain names, (2) not to store or reproduce this data in any way, (3) not to use any high-volume, automated, electronic processes to obtain data from this service. Abuse of this service is monitored and actions in contravention of these terms will result in being permanently blacklisted. All data is (c) CentralNic Ltd https://www.centralnic.com/") + expect(subject.domain).to eq("walkabout.eu.com") + expect(subject.domain_id).to eq("CNIC-DO85080") + expect(subject.status).to eq(["ok"]) + expect(subject.available?).to eq(false) + expect(subject.registered?).to eq(true) + expect(subject.created_on).to be_a(Time) + expect(subject.created_on).to eq(DateTime.parse("2001-08-14 10:14:41 UTC")) + expect(subject.updated_on).to be_a(Time) + expect(subject.updated_on).to eq(DateTime.parse("2013-08-15 11:25:43 UTC")) + expect(subject.expires_on).to be_a(Time) + expect(subject.expires_on).to eq(DateTime.parse("2015-08-14 23:59:59 UTC")) + expect(subject.registrar).to be_a(Whois::Parser::Registrar) + expect(subject.registrar.id).to eq("H126914") + expect(subject.registrar.name).to eq("iTransact Ltd") + expect(subject.registrar.url).to eq("www.itransact.ltd.uk") + expect(subject.registrant_contacts).to be_a(Array) + expect(subject.registrant_contacts.size).to eq(1) + expect(subject.registrant_contacts[0]).to be_a(Whois::Parser::Contact) + expect(subject.registrant_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_REGISTRANT) + expect(subject.registrant_contacts[0].id).to eq("H1045382") + expect(subject.registrant_contacts[0].name).to eq("Regent Inns Plc") + expect(subject.registrant_contacts[0].organization).to eq(nil) + expect(subject.registrant_contacts[0].address).to eq("77 Muswell Hill\nLondon") + expect(subject.registrant_contacts[0].city).to eq(nil) + expect(subject.registrant_contacts[0].zip).to eq("N10 3PJ") + expect(subject.registrant_contacts[0].state).to eq(nil) + expect(subject.registrant_contacts[0].country).to eq(nil) + expect(subject.registrant_contacts[0].country_code).to eq("GB") + expect(subject.registrant_contacts[0].phone).to eq("+44.2083753155") + expect(subject.registrant_contacts[0].fax).to eq("+44.2083753001") + expect(subject.registrant_contacts[0].email).to eq("john.boyle@regent-inns.plc.uk") + expect(subject.admin_contacts).to be_a(Array) + expect(subject.admin_contacts.size).to eq(1) + expect(subject.admin_contacts[0]).to be_a(Whois::Parser::Contact) + expect(subject.admin_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_ADMINISTRATIVE) + expect(subject.admin_contacts[0].id).to eq("H64717") + expect(subject.admin_contacts[0].name).to eq("John Boyle") + expect(subject.admin_contacts[0].organization).to eq("Regent Inns Plc") + expect(subject.admin_contacts[0].address).to eq("77 Muswell Hill\nLondon") + expect(subject.admin_contacts[0].city).to eq(nil) + expect(subject.admin_contacts[0].zip).to eq("N10 3PJ") + expect(subject.admin_contacts[0].state).to eq(nil) + expect(subject.admin_contacts[0].country).to eq(nil) + expect(subject.admin_contacts[0].country_code).to eq("GB") + expect(subject.admin_contacts[0].phone).to eq("+44.2083753155") + expect(subject.admin_contacts[0].fax).to eq("+44.2083753001") + expect(subject.admin_contacts[0].email).to eq("john.boyle@regent-inns.plc.uk") + expect(subject.technical_contacts).to be_a(Array) + expect(subject.technical_contacts.size).to eq(1) + expect(subject.technical_contacts[0]).to be_a(Whois::Parser::Contact) + expect(subject.technical_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_TECHNICAL) + expect(subject.technical_contacts[0].id).to eq("H126914") + expect(subject.technical_contacts[0].name).to eq("Constantine Pagonis") + expect(subject.technical_contacts[0].organization).to eq("iTransact Ltd") + expect(subject.technical_contacts[0].address).to eq("PO Box 430\nCambridge\nCambs") + expect(subject.technical_contacts[0].city).to eq(nil) + expect(subject.technical_contacts[0].zip).to eq("CB1 2WE") + expect(subject.technical_contacts[0].state).to eq(nil) + expect(subject.technical_contacts[0].country).to eq(nil) + expect(subject.technical_contacts[0].country_code).to eq("GB") + expect(subject.technical_contacts[0].phone).to eq("+44.1223700322") + expect(subject.technical_contacts[0].fax).to eq(nil) + expect(subject.technical_contacts[0].email).to eq("constantine@itransact.ltd.uk") + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers.size).to eq(4) + expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[0].name).to eq("ns-1146.awsdns-15.org") + expect(subject.nameservers[0].ipv4).to eq(nil) + expect(subject.nameservers[0].ipv6).to eq(nil) + expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[1].name).to eq("ns-1741.awsdns-25.co.uk") + expect(subject.nameservers[1].ipv4).to eq(nil) + expect(subject.nameservers[1].ipv6).to eq(nil) + expect(subject.nameservers[2].name).to eq("ns-374.awsdns-46.com") + expect(subject.nameservers[2].ipv4).to eq(nil) + expect(subject.nameservers[2].ipv6).to eq(nil) + expect(subject.nameservers[3].name).to eq("ns-914.awsdns-50.net") + expect(subject.nameservers[3].ipv4).to eq(nil) + expect(subject.nameservers[3].ipv6).to eq(nil) end end diff --git a/spec/whois/parsers/responses/whois.centralnic.com/gb.com/status_available_spec.rb b/spec/whois/parsers/responses/whois.centralnic.com/gb.com/status_available_spec.rb index b3f94f83..8125b607 100644 --- a/spec/whois/parsers/responses/whois.centralnic.com/gb.com/status_available_spec.rb +++ b/spec/whois/parsers/responses/whois.centralnic.com/gb.com/status_available_spec.rb @@ -11,88 +11,33 @@ # require 'spec_helper' -require 'whois/parsers/whois.centralnic.com.rb' -describe Whois::Parsers::WhoisCentralnicCom, "status_available.expected" do +describe "whois.centralnic.com", :aggregate_failures do subject do file = fixture("responses", "whois.centralnic.com/gb.com/status_available.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.centralnic.com") + Whois::Parser.parser_for(part) end - describe "#disclaimer" do - it do - expect(subject.disclaimer).to eq(nil) - end - end - describe "#domain" do - it do - expect(subject.domain).to eq(nil) - end - end - describe "#domain_id" do - it do - expect(subject.domain_id).to eq(nil) - end - end - describe "#status" do - it do - expect(subject.status).to eq([]) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(true) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(false) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to eq(nil) - end - end - describe "#updated_on" do - it do - expect(subject.updated_on).to eq(nil) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to eq(nil) - end - end - describe "#registrar" do - it do - expect(subject.registrar).to eq(nil) - end - end - describe "#registrant_contacts" do - it do - expect(subject.registrant_contacts).to be_a(Array) - expect(subject.registrant_contacts).to eq([]) - end - end - describe "#admin_contacts" do - it do - expect(subject.admin_contacts).to be_a(Array) - expect(subject.admin_contacts).to eq([]) - end - end - describe "#technical_contacts" do - it do - expect(subject.technical_contacts).to be_a(Array) - expect(subject.technical_contacts).to eq([]) - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers).to eq([]) - end + it "matches status_available.expected" do + expect(subject.disclaimer).to eq(nil) + expect(subject.domain).to eq(nil) + expect(subject.domain_id).to eq(nil) + expect(subject.status).to eq([]) + expect(subject.available?).to eq(true) + expect(subject.registered?).to eq(false) + expect(subject.created_on).to eq(nil) + expect(subject.updated_on).to eq(nil) + expect(subject.expires_on).to eq(nil) + expect(subject.registrar).to eq(nil) + expect(subject.registrant_contacts).to be_a(Array) + expect(subject.registrant_contacts).to eq([]) + expect(subject.admin_contacts).to be_a(Array) + expect(subject.admin_contacts).to eq([]) + expect(subject.technical_contacts).to be_a(Array) + expect(subject.technical_contacts).to eq([]) + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers).to eq([]) end end diff --git a/spec/whois/parsers/responses/whois.centralnic.com/gb.com/status_registered_spec.rb b/spec/whois/parsers/responses/whois.centralnic.com/gb.com/status_registered_spec.rb index 12fd609e..900b3d6d 100644 --- a/spec/whois/parsers/responses/whois.centralnic.com/gb.com/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.centralnic.com/gb.com/status_registered_spec.rb @@ -11,148 +11,93 @@ # require 'spec_helper' -require 'whois/parsers/whois.centralnic.com.rb' -describe Whois::Parsers::WhoisCentralnicCom, "status_registered.expected" do +describe "whois.centralnic.com", :aggregate_failures do subject do file = fixture("responses", "whois.centralnic.com/gb.com/status_registered.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.centralnic.com") + Whois::Parser.parser_for(part) end - describe "#disclaimer" do - it do - expect(subject.disclaimer).to eq("This whois service is provided by CentralNic Ltd and only contains information pertaining to Internet domain names we have registered for our customers. By using this service you are agreeing (1) not to use any information presented here for any purpose other than determining ownership of domain names, (2) not to store or reproduce this data in any way, (3) not to use any high-volume, automated, electronic processes to obtain data from this service. Abuse of this service is monitored and actions in contravention of these terms will result in being permanently blacklisted. All data is (c) CentralNic Ltd https://www.centralnic.com/") - end - end - describe "#domain" do - it do - expect(subject.domain).to eq("hotel.gb.com") - end - end - describe "#domain_id" do - it do - expect(subject.domain_id).to eq("CNIC-DO403461") - end - end - describe "#status" do - it do - expect(subject.status).to eq(["serverTransferProhibited"]) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(false) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(true) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to be_a(Time) - expect(subject.created_on).to eq(DateTime.parse("2006-04-23 06:26:11 UTC")) - end - end - describe "#updated_on" do - it do - expect(subject.updated_on).to be_a(Time) - expect(subject.updated_on).to eq(DateTime.parse("2014-02-12 09:45:17 UTC")) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to be_a(Time) - expect(subject.expires_on).to eq(DateTime.parse("2016-04-23 23:59:59 UTC")) - end - end - describe "#registrar" do - it do - expect(subject.registrar).to be_a(Whois::Parser::Registrar) - expect(subject.registrar.id).to eq("H386560") - expect(subject.registrar.name).to eq("Wind Internethaus GMBH") - expect(subject.registrar.url).to eq("www.windinternethaus.de") - end - end - describe "#registrant_contacts" do - it do - expect(subject.registrant_contacts).to be_a(Array) - expect(subject.registrant_contacts.size).to eq(1) - expect(subject.registrant_contacts[0]).to be_a(Whois::Parser::Contact) - expect(subject.registrant_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_REGISTRANT) - expect(subject.registrant_contacts[0].id).to eq("H1049605") - expect(subject.registrant_contacts[0].name).to eq("Robert Ragge, Hotel Reservation Service Robert Ragge GmbH") - expect(subject.registrant_contacts[0].organization).to eq(nil) - expect(subject.registrant_contacts[0].address).to eq("Blaubach 32") - expect(subject.registrant_contacts[0].city).to eq("Koeln") - expect(subject.registrant_contacts[0].zip).to eq("50676") - expect(subject.registrant_contacts[0].state).to eq("NRW") - expect(subject.registrant_contacts[0].country).to eq(nil) - expect(subject.registrant_contacts[0].country_code).to eq("DE") - expect(subject.registrant_contacts[0].phone).to eq("+49.2212077222") - expect(subject.registrant_contacts[0].fax).to eq("+49.2212077394") - expect(subject.registrant_contacts[0].email).to eq("domains@hrs.de") - end - end - describe "#admin_contacts" do - it do - expect(subject.admin_contacts).to be_a(Array) - expect(subject.admin_contacts.size).to eq(1) - expect(subject.admin_contacts[0]).to be_a(Whois::Parser::Contact) - expect(subject.admin_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_ADMINISTRATIVE) - expect(subject.admin_contacts[0].id).to eq("H393781") - expect(subject.admin_contacts[0].name).to eq("Robert Ragge") - expect(subject.admin_contacts[0].organization).to eq("Hotel Reservation Service Robert Ragge GmbH") - expect(subject.admin_contacts[0].address).to eq("Blaubach 32") - expect(subject.admin_contacts[0].city).to eq("Koeln") - expect(subject.admin_contacts[0].zip).to eq("50676") - expect(subject.admin_contacts[0].state).to eq("NRW") - expect(subject.admin_contacts[0].country).to eq(nil) - expect(subject.admin_contacts[0].country_code).to eq("DE") - expect(subject.admin_contacts[0].phone).to eq("+49.2212077222") - expect(subject.admin_contacts[0].fax).to eq("+49.2212077394") - expect(subject.admin_contacts[0].email).to eq("domains@hrs.de") - end - end - describe "#technical_contacts" do - it do - expect(subject.technical_contacts).to be_a(Array) - expect(subject.technical_contacts.size).to eq(1) - expect(subject.technical_contacts[0]).to be_a(Whois::Parser::Contact) - expect(subject.technical_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_TECHNICAL) - expect(subject.technical_contacts[0].id).to eq("H1103064") - expect(subject.technical_contacts[0].name).to eq("Uwe Watzek, Wind Internethaus GMBH") - expect(subject.technical_contacts[0].organization).to eq(nil) - expect(subject.technical_contacts[0].address).to eq("Am Krebsgraben 15\nHaus 2") - expect(subject.technical_contacts[0].city).to eq("Villingen-Schwenningen") - expect(subject.technical_contacts[0].zip).to eq("78048") - expect(subject.technical_contacts[0].state).to eq("Baden-Wuerttemberg") - expect(subject.technical_contacts[0].country).to eq(nil) - expect(subject.technical_contacts[0].country_code).to eq("DE") - expect(subject.technical_contacts[0].phone).to eq("+49.77214070740") - expect(subject.technical_contacts[0].fax).to eq("+49.77214070741") - expect(subject.technical_contacts[0].email).to eq("info@windinternethaus.de") - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers.size).to eq(3) - expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[0].name).to eq("ns1.hrs.de") - expect(subject.nameservers[0].ipv4).to eq(nil) - expect(subject.nameservers[0].ipv6).to eq(nil) - expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[1].name).to eq("ns2.hrs.de") - expect(subject.nameservers[1].ipv4).to eq(nil) - expect(subject.nameservers[1].ipv6).to eq(nil) - expect(subject.nameservers[2]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[2].name).to eq("ns2.surfbrett.de") - expect(subject.nameservers[2].ipv4).to eq(nil) - expect(subject.nameservers[2].ipv6).to eq(nil) - end + it "matches status_registered.expected" do + expect(subject.disclaimer).to eq("This whois service is provided by CentralNic Ltd and only contains information pertaining to Internet domain names we have registered for our customers. By using this service you are agreeing (1) not to use any information presented here for any purpose other than determining ownership of domain names, (2) not to store or reproduce this data in any way, (3) not to use any high-volume, automated, electronic processes to obtain data from this service. Abuse of this service is monitored and actions in contravention of these terms will result in being permanently blacklisted. All data is (c) CentralNic Ltd https://www.centralnic.com/") + expect(subject.domain).to eq("hotel.gb.com") + expect(subject.domain_id).to eq("CNIC-DO403461") + expect(subject.status).to eq(["serverTransferProhibited"]) + expect(subject.available?).to eq(false) + expect(subject.registered?).to eq(true) + expect(subject.created_on).to be_a(Time) + expect(subject.created_on).to eq(DateTime.parse("2006-04-23 06:26:11 UTC")) + expect(subject.updated_on).to be_a(Time) + expect(subject.updated_on).to eq(DateTime.parse("2014-02-12 09:45:17 UTC")) + expect(subject.expires_on).to be_a(Time) + expect(subject.expires_on).to eq(DateTime.parse("2016-04-23 23:59:59 UTC")) + expect(subject.registrar).to be_a(Whois::Parser::Registrar) + expect(subject.registrar.id).to eq("H386560") + expect(subject.registrar.name).to eq("Wind Internethaus GMBH") + expect(subject.registrar.url).to eq("www.windinternethaus.de") + expect(subject.registrant_contacts).to be_a(Array) + expect(subject.registrant_contacts.size).to eq(1) + expect(subject.registrant_contacts[0]).to be_a(Whois::Parser::Contact) + expect(subject.registrant_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_REGISTRANT) + expect(subject.registrant_contacts[0].id).to eq("H1049605") + expect(subject.registrant_contacts[0].name).to eq("Robert Ragge, Hotel Reservation Service Robert Ragge GmbH") + expect(subject.registrant_contacts[0].organization).to eq(nil) + expect(subject.registrant_contacts[0].address).to eq("Blaubach 32") + expect(subject.registrant_contacts[0].city).to eq("Koeln") + expect(subject.registrant_contacts[0].zip).to eq("50676") + expect(subject.registrant_contacts[0].state).to eq("NRW") + expect(subject.registrant_contacts[0].country).to eq(nil) + expect(subject.registrant_contacts[0].country_code).to eq("DE") + expect(subject.registrant_contacts[0].phone).to eq("+49.2212077222") + expect(subject.registrant_contacts[0].fax).to eq("+49.2212077394") + expect(subject.registrant_contacts[0].email).to eq("domains@hrs.de") + expect(subject.admin_contacts).to be_a(Array) + expect(subject.admin_contacts.size).to eq(1) + expect(subject.admin_contacts[0]).to be_a(Whois::Parser::Contact) + expect(subject.admin_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_ADMINISTRATIVE) + expect(subject.admin_contacts[0].id).to eq("H393781") + expect(subject.admin_contacts[0].name).to eq("Robert Ragge") + expect(subject.admin_contacts[0].organization).to eq("Hotel Reservation Service Robert Ragge GmbH") + expect(subject.admin_contacts[0].address).to eq("Blaubach 32") + expect(subject.admin_contacts[0].city).to eq("Koeln") + expect(subject.admin_contacts[0].zip).to eq("50676") + expect(subject.admin_contacts[0].state).to eq("NRW") + expect(subject.admin_contacts[0].country).to eq(nil) + expect(subject.admin_contacts[0].country_code).to eq("DE") + expect(subject.admin_contacts[0].phone).to eq("+49.2212077222") + expect(subject.admin_contacts[0].fax).to eq("+49.2212077394") + expect(subject.admin_contacts[0].email).to eq("domains@hrs.de") + expect(subject.technical_contacts).to be_a(Array) + expect(subject.technical_contacts.size).to eq(1) + expect(subject.technical_contacts[0]).to be_a(Whois::Parser::Contact) + expect(subject.technical_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_TECHNICAL) + expect(subject.technical_contacts[0].id).to eq("H1103064") + expect(subject.technical_contacts[0].name).to eq("Uwe Watzek, Wind Internethaus GMBH") + expect(subject.technical_contacts[0].organization).to eq(nil) + expect(subject.technical_contacts[0].address).to eq("Am Krebsgraben 15\nHaus 2") + expect(subject.technical_contacts[0].city).to eq("Villingen-Schwenningen") + expect(subject.technical_contacts[0].zip).to eq("78048") + expect(subject.technical_contacts[0].state).to eq("Baden-Wuerttemberg") + expect(subject.technical_contacts[0].country).to eq(nil) + expect(subject.technical_contacts[0].country_code).to eq("DE") + expect(subject.technical_contacts[0].phone).to eq("+49.77214070740") + expect(subject.technical_contacts[0].fax).to eq("+49.77214070741") + expect(subject.technical_contacts[0].email).to eq("info@windinternethaus.de") + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers.size).to eq(3) + expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[0].name).to eq("ns1.hrs.de") + expect(subject.nameservers[0].ipv4).to eq(nil) + expect(subject.nameservers[0].ipv6).to eq(nil) + expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[1].name).to eq("ns2.hrs.de") + expect(subject.nameservers[1].ipv4).to eq(nil) + expect(subject.nameservers[1].ipv6).to eq(nil) + expect(subject.nameservers[2]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[2].name).to eq("ns2.surfbrett.de") + expect(subject.nameservers[2].ipv4).to eq(nil) + expect(subject.nameservers[2].ipv6).to eq(nil) end end diff --git a/spec/whois/parsers/responses/whois.centralnic.com/gb.net/status_available_spec.rb b/spec/whois/parsers/responses/whois.centralnic.com/gb.net/status_available_spec.rb index 334ef13f..349c0c02 100644 --- a/spec/whois/parsers/responses/whois.centralnic.com/gb.net/status_available_spec.rb +++ b/spec/whois/parsers/responses/whois.centralnic.com/gb.net/status_available_spec.rb @@ -11,88 +11,33 @@ # require 'spec_helper' -require 'whois/parsers/whois.centralnic.com.rb' -describe Whois::Parsers::WhoisCentralnicCom, "status_available.expected" do +describe "whois.centralnic.com", :aggregate_failures do subject do file = fixture("responses", "whois.centralnic.com/gb.net/status_available.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.centralnic.com") + Whois::Parser.parser_for(part) end - describe "#disclaimer" do - it do - expect(subject.disclaimer).to eq(nil) - end - end - describe "#domain" do - it do - expect(subject.domain).to eq(nil) - end - end - describe "#domain_id" do - it do - expect(subject.domain_id).to eq(nil) - end - end - describe "#status" do - it do - expect(subject.status).to eq([]) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(true) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(false) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to eq(nil) - end - end - describe "#updated_on" do - it do - expect(subject.updated_on).to eq(nil) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to eq(nil) - end - end - describe "#registrar" do - it do - expect(subject.registrar).to eq(nil) - end - end - describe "#registrant_contacts" do - it do - expect(subject.registrant_contacts).to be_a(Array) - expect(subject.registrant_contacts).to eq([]) - end - end - describe "#admin_contacts" do - it do - expect(subject.admin_contacts).to be_a(Array) - expect(subject.admin_contacts).to eq([]) - end - end - describe "#technical_contacts" do - it do - expect(subject.technical_contacts).to be_a(Array) - expect(subject.technical_contacts).to eq([]) - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers).to eq([]) - end + it "matches status_available.expected" do + expect(subject.disclaimer).to eq(nil) + expect(subject.domain).to eq(nil) + expect(subject.domain_id).to eq(nil) + expect(subject.status).to eq([]) + expect(subject.available?).to eq(true) + expect(subject.registered?).to eq(false) + expect(subject.created_on).to eq(nil) + expect(subject.updated_on).to eq(nil) + expect(subject.expires_on).to eq(nil) + expect(subject.registrar).to eq(nil) + expect(subject.registrant_contacts).to be_a(Array) + expect(subject.registrant_contacts).to eq([]) + expect(subject.admin_contacts).to be_a(Array) + expect(subject.admin_contacts).to eq([]) + expect(subject.technical_contacts).to be_a(Array) + expect(subject.technical_contacts).to eq([]) + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers).to eq([]) end end diff --git a/spec/whois/parsers/responses/whois.centralnic.com/gb.net/status_registered_spec.rb b/spec/whois/parsers/responses/whois.centralnic.com/gb.net/status_registered_spec.rb index 039f45fe..c1a0772f 100644 --- a/spec/whois/parsers/responses/whois.centralnic.com/gb.net/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.centralnic.com/gb.net/status_registered_spec.rb @@ -11,154 +11,99 @@ # require 'spec_helper' -require 'whois/parsers/whois.centralnic.com.rb' -describe Whois::Parsers::WhoisCentralnicCom, "status_registered.expected" do +describe "whois.centralnic.com", :aggregate_failures do subject do file = fixture("responses", "whois.centralnic.com/gb.net/status_registered.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.centralnic.com") + Whois::Parser.parser_for(part) end - describe "#disclaimer" do - it do - expect(subject.disclaimer).to eq("This whois service is provided by CentralNic Ltd and only contains information pertaining to Internet domain names we have registered for our customers. By using this service you are agreeing (1) not to use any information presented here for any purpose other than determining ownership of domain names, (2) not to store or reproduce this data in any way, (3) not to use any high-volume, automated, electronic processes to obtain data from this service. Abuse of this service is monitored and actions in contravention of these terms will result in being permanently blacklisted. All data is (c) CentralNic Ltd https://www.centralnic.com/") - end - end - describe "#domain" do - it do - expect(subject.domain).to eq("hotel.gb.net") - end - end - describe "#domain_id" do - it do - expect(subject.domain_id).to eq("CNIC-DO1423750") - end - end - describe "#status" do - it do - expect(subject.status).to eq(["clientTransferProhibited", "serverTransferProhibited"]) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(false) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(true) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to be_a(Time) - expect(subject.created_on).to eq(DateTime.parse("2013-08-25 12:36:24 UTC")) - end - end - describe "#updated_on" do - it do - expect(subject.updated_on).to be_a(Time) - expect(subject.updated_on).to eq(DateTime.parse("2013-08-30 12:42:09 UTC")) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to be_a(Time) - expect(subject.expires_on).to eq(DateTime.parse("2014-08-25 23:59:59 UTC")) - end - end - describe "#registrar" do - it do - expect(subject.registrar).to be_a(Whois::Parser::Registrar) - expect(subject.registrar.id).to eq("H1167922") - expect(subject.registrar.name).to eq("Gandi SAS") - expect(subject.registrar.url).to eq("http://www.gandi.net/") - end - end - describe "#registrant_contacts" do - it do - expect(subject.registrant_contacts).to be_a(Array) - expect(subject.registrant_contacts.size).to eq(1) - expect(subject.registrant_contacts[0]).to be_a(Whois::Parser::Contact) - expect(subject.registrant_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_REGISTRANT) - expect(subject.registrant_contacts[0].id).to eq("R1149-GANDI-PRYP") - expect(subject.registrant_contacts[0].name).to eq("Heinz Pierre Roeser") - expect(subject.registrant_contacts[0].organization).to eq("Roevertrieb") - expect(subject.registrant_contacts[0].address).to eq("Friedensstr. 77") - expect(subject.registrant_contacts[0].city).to eq("Grevenbroich") - expect(subject.registrant_contacts[0].zip).to eq("41517") - expect(subject.registrant_contacts[0].state).to eq(nil) - expect(subject.registrant_contacts[0].country).to eq(nil) - expect(subject.registrant_contacts[0].country_code).to eq("DE") - expect(subject.registrant_contacts[0].phone).to eq("+49.218145077") - expect(subject.registrant_contacts[0].fax).to eq(nil) - expect(subject.registrant_contacts[0].email).to eq("roevertrieb@aol.com") - expect(subject.registrant_contacts[0].created_on).to eq(nil) - expect(subject.registrant_contacts[0].updated_on).to eq(nil) - end - end - describe "#admin_contacts" do - it do - expect(subject.admin_contacts).to be_a(Array) - expect(subject.admin_contacts.size).to eq(1) - expect(subject.admin_contacts[0]).to be_a(Whois::Parser::Contact) - expect(subject.admin_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_ADMINISTRATIVE) - expect(subject.admin_contacts[0].id).to eq("R1149-GANDI-PRYP") - expect(subject.admin_contacts[0].name).to eq("Heinz Pierre Roeser") - expect(subject.admin_contacts[0].organization).to eq("Roevertrieb") - expect(subject.admin_contacts[0].address).to eq("Friedensstr. 77") - expect(subject.admin_contacts[0].city).to eq("Grevenbroich") - expect(subject.admin_contacts[0].zip).to eq("41517") - expect(subject.admin_contacts[0].state).to eq(nil) - expect(subject.admin_contacts[0].country).to eq(nil) - expect(subject.admin_contacts[0].country_code).to eq("DE") - expect(subject.admin_contacts[0].phone).to eq("+49.218145077") - expect(subject.admin_contacts[0].fax).to eq(nil) - expect(subject.admin_contacts[0].email).to eq("roevertrieb@aol.com") - expect(subject.admin_contacts[0].created_on).to eq(nil) - expect(subject.admin_contacts[0].updated_on).to eq(nil) - end - end - describe "#technical_contacts" do - it do - expect(subject.technical_contacts).to be_a(Array) - expect(subject.technical_contacts.size).to eq(1) - expect(subject.technical_contacts[0]).to be_a(Whois::Parser::Contact) - expect(subject.technical_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_TECHNICAL) - expect(subject.technical_contacts[0].id).to eq("R1149-GANDI-PRYP") - expect(subject.technical_contacts[0].name).to eq("Heinz Pierre Roeser") - expect(subject.technical_contacts[0].organization).to eq("Roevertrieb") - expect(subject.technical_contacts[0].address).to eq("Friedensstr. 77") - expect(subject.technical_contacts[0].city).to eq("Grevenbroich") - expect(subject.technical_contacts[0].zip).to eq("41517") - expect(subject.technical_contacts[0].state).to eq(nil) - expect(subject.technical_contacts[0].country).to eq(nil) - expect(subject.technical_contacts[0].country_code).to eq("DE") - expect(subject.technical_contacts[0].phone).to eq("+49.218145077") - expect(subject.technical_contacts[0].fax).to eq(nil) - expect(subject.technical_contacts[0].email).to eq("roevertrieb@aol.com") - expect(subject.technical_contacts[0].created_on).to eq(nil) - expect(subject.technical_contacts[0].updated_on).to eq(nil) - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers.size).to eq(3) - expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[0].name).to eq("b.dns.gandi.net") - expect(subject.nameservers[0].ipv4).to eq(nil) - expect(subject.nameservers[0].ipv6).to eq(nil) - expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[1].name).to eq("c.dns.gandi.net") - expect(subject.nameservers[1].ipv4).to eq(nil) - expect(subject.nameservers[1].ipv6).to eq(nil) - expect(subject.nameservers[2]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[2].name).to eq("a.dns.gandi.net") - expect(subject.nameservers[2].ipv4).to eq(nil) - expect(subject.nameservers[2].ipv6).to eq(nil) - end + it "matches status_registered.expected" do + expect(subject.disclaimer).to eq("This whois service is provided by CentralNic Ltd and only contains information pertaining to Internet domain names we have registered for our customers. By using this service you are agreeing (1) not to use any information presented here for any purpose other than determining ownership of domain names, (2) not to store or reproduce this data in any way, (3) not to use any high-volume, automated, electronic processes to obtain data from this service. Abuse of this service is monitored and actions in contravention of these terms will result in being permanently blacklisted. All data is (c) CentralNic Ltd https://www.centralnic.com/") + expect(subject.domain).to eq("hotel.gb.net") + expect(subject.domain_id).to eq("CNIC-DO1423750") + expect(subject.status).to eq(["clientTransferProhibited", "serverTransferProhibited"]) + expect(subject.available?).to eq(false) + expect(subject.registered?).to eq(true) + expect(subject.created_on).to be_a(Time) + expect(subject.created_on).to eq(DateTime.parse("2013-08-25 12:36:24 UTC")) + expect(subject.updated_on).to be_a(Time) + expect(subject.updated_on).to eq(DateTime.parse("2013-08-30 12:42:09 UTC")) + expect(subject.expires_on).to be_a(Time) + expect(subject.expires_on).to eq(DateTime.parse("2014-08-25 23:59:59 UTC")) + expect(subject.registrar).to be_a(Whois::Parser::Registrar) + expect(subject.registrar.id).to eq("H1167922") + expect(subject.registrar.name).to eq("Gandi SAS") + expect(subject.registrar.url).to eq("http://www.gandi.net/") + expect(subject.registrant_contacts).to be_a(Array) + expect(subject.registrant_contacts.size).to eq(1) + expect(subject.registrant_contacts[0]).to be_a(Whois::Parser::Contact) + expect(subject.registrant_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_REGISTRANT) + expect(subject.registrant_contacts[0].id).to eq("R1149-GANDI-PRYP") + expect(subject.registrant_contacts[0].name).to eq("Heinz Pierre Roeser") + expect(subject.registrant_contacts[0].organization).to eq("Roevertrieb") + expect(subject.registrant_contacts[0].address).to eq("Friedensstr. 77") + expect(subject.registrant_contacts[0].city).to eq("Grevenbroich") + expect(subject.registrant_contacts[0].zip).to eq("41517") + expect(subject.registrant_contacts[0].state).to eq(nil) + expect(subject.registrant_contacts[0].country).to eq(nil) + expect(subject.registrant_contacts[0].country_code).to eq("DE") + expect(subject.registrant_contacts[0].phone).to eq("+49.218145077") + expect(subject.registrant_contacts[0].fax).to eq(nil) + expect(subject.registrant_contacts[0].email).to eq("roevertrieb@aol.com") + expect(subject.registrant_contacts[0].created_on).to eq(nil) + expect(subject.registrant_contacts[0].updated_on).to eq(nil) + expect(subject.admin_contacts).to be_a(Array) + expect(subject.admin_contacts.size).to eq(1) + expect(subject.admin_contacts[0]).to be_a(Whois::Parser::Contact) + expect(subject.admin_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_ADMINISTRATIVE) + expect(subject.admin_contacts[0].id).to eq("R1149-GANDI-PRYP") + expect(subject.admin_contacts[0].name).to eq("Heinz Pierre Roeser") + expect(subject.admin_contacts[0].organization).to eq("Roevertrieb") + expect(subject.admin_contacts[0].address).to eq("Friedensstr. 77") + expect(subject.admin_contacts[0].city).to eq("Grevenbroich") + expect(subject.admin_contacts[0].zip).to eq("41517") + expect(subject.admin_contacts[0].state).to eq(nil) + expect(subject.admin_contacts[0].country).to eq(nil) + expect(subject.admin_contacts[0].country_code).to eq("DE") + expect(subject.admin_contacts[0].phone).to eq("+49.218145077") + expect(subject.admin_contacts[0].fax).to eq(nil) + expect(subject.admin_contacts[0].email).to eq("roevertrieb@aol.com") + expect(subject.admin_contacts[0].created_on).to eq(nil) + expect(subject.admin_contacts[0].updated_on).to eq(nil) + expect(subject.technical_contacts).to be_a(Array) + expect(subject.technical_contacts.size).to eq(1) + expect(subject.technical_contacts[0]).to be_a(Whois::Parser::Contact) + expect(subject.technical_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_TECHNICAL) + expect(subject.technical_contacts[0].id).to eq("R1149-GANDI-PRYP") + expect(subject.technical_contacts[0].name).to eq("Heinz Pierre Roeser") + expect(subject.technical_contacts[0].organization).to eq("Roevertrieb") + expect(subject.technical_contacts[0].address).to eq("Friedensstr. 77") + expect(subject.technical_contacts[0].city).to eq("Grevenbroich") + expect(subject.technical_contacts[0].zip).to eq("41517") + expect(subject.technical_contacts[0].state).to eq(nil) + expect(subject.technical_contacts[0].country).to eq(nil) + expect(subject.technical_contacts[0].country_code).to eq("DE") + expect(subject.technical_contacts[0].phone).to eq("+49.218145077") + expect(subject.technical_contacts[0].fax).to eq(nil) + expect(subject.technical_contacts[0].email).to eq("roevertrieb@aol.com") + expect(subject.technical_contacts[0].created_on).to eq(nil) + expect(subject.technical_contacts[0].updated_on).to eq(nil) + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers.size).to eq(3) + expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[0].name).to eq("b.dns.gandi.net") + expect(subject.nameservers[0].ipv4).to eq(nil) + expect(subject.nameservers[0].ipv6).to eq(nil) + expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[1].name).to eq("c.dns.gandi.net") + expect(subject.nameservers[1].ipv4).to eq(nil) + expect(subject.nameservers[1].ipv6).to eq(nil) + expect(subject.nameservers[2]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[2].name).to eq("a.dns.gandi.net") + expect(subject.nameservers[2].ipv4).to eq(nil) + expect(subject.nameservers[2].ipv6).to eq(nil) end end diff --git a/spec/whois/parsers/responses/whois.centralnic.com/gr.com/status_available_spec.rb b/spec/whois/parsers/responses/whois.centralnic.com/gr.com/status_available_spec.rb index 6b581f9c..0b8e5e0c 100644 --- a/spec/whois/parsers/responses/whois.centralnic.com/gr.com/status_available_spec.rb +++ b/spec/whois/parsers/responses/whois.centralnic.com/gr.com/status_available_spec.rb @@ -11,88 +11,33 @@ # require 'spec_helper' -require 'whois/parsers/whois.centralnic.com.rb' -describe Whois::Parsers::WhoisCentralnicCom, "status_available.expected" do +describe "whois.centralnic.com", :aggregate_failures do subject do file = fixture("responses", "whois.centralnic.com/gr.com/status_available.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.centralnic.com") + Whois::Parser.parser_for(part) end - describe "#disclaimer" do - it do - expect(subject.disclaimer).to eq(nil) - end - end - describe "#domain" do - it do - expect(subject.domain).to eq(nil) - end - end - describe "#domain_id" do - it do - expect(subject.domain_id).to eq(nil) - end - end - describe "#status" do - it do - expect(subject.status).to eq([]) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(true) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(false) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to eq(nil) - end - end - describe "#updated_on" do - it do - expect(subject.updated_on).to eq(nil) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to eq(nil) - end - end - describe "#registrar" do - it do - expect(subject.registrar).to eq(nil) - end - end - describe "#registrant_contacts" do - it do - expect(subject.registrant_contacts).to be_a(Array) - expect(subject.registrant_contacts).to eq([]) - end - end - describe "#admin_contacts" do - it do - expect(subject.admin_contacts).to be_a(Array) - expect(subject.admin_contacts).to eq([]) - end - end - describe "#technical_contacts" do - it do - expect(subject.technical_contacts).to be_a(Array) - expect(subject.technical_contacts).to eq([]) - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers).to eq([]) - end + it "matches status_available.expected" do + expect(subject.disclaimer).to eq(nil) + expect(subject.domain).to eq(nil) + expect(subject.domain_id).to eq(nil) + expect(subject.status).to eq([]) + expect(subject.available?).to eq(true) + expect(subject.registered?).to eq(false) + expect(subject.created_on).to eq(nil) + expect(subject.updated_on).to eq(nil) + expect(subject.expires_on).to eq(nil) + expect(subject.registrar).to eq(nil) + expect(subject.registrant_contacts).to be_a(Array) + expect(subject.registrant_contacts).to eq([]) + expect(subject.admin_contacts).to be_a(Array) + expect(subject.admin_contacts).to eq([]) + expect(subject.technical_contacts).to be_a(Array) + expect(subject.technical_contacts).to eq([]) + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers).to eq([]) end end diff --git a/spec/whois/parsers/responses/whois.centralnic.com/gr.com/status_registered_spec.rb b/spec/whois/parsers/responses/whois.centralnic.com/gr.com/status_registered_spec.rb index e820eb03..0ce21a24 100644 --- a/spec/whois/parsers/responses/whois.centralnic.com/gr.com/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.centralnic.com/gr.com/status_registered_spec.rb @@ -11,123 +11,68 @@ # require 'spec_helper' -require 'whois/parsers/whois.centralnic.com.rb' -describe Whois::Parsers::WhoisCentralnicCom, "status_registered.expected" do +describe "whois.centralnic.com", :aggregate_failures do subject do file = fixture("responses", "whois.centralnic.com/gr.com/status_registered.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.centralnic.com") + Whois::Parser.parser_for(part) end - describe "#disclaimer" do - it do - expect(subject.disclaimer).to eq("This whois service is provided by CentralNic Ltd and only contains information pertaining to Internet domain names we have registered for our customers. By using this service you are agreeing (1) not to use any information presented here for any purpose other than determining ownership of domain names, (2) not to store or reproduce this data in any way, (3) not to use any high-volume, automated, electronic processes to obtain data from this service. Abuse of this service is monitored and actions in contravention of these terms will result in being permanently blacklisted. All data is (c) CentralNic Ltd https://www.centralnic.com/") - end - end - describe "#domain" do - it do - expect(subject.domain).to eq("google.gr.com") - end - end - describe "#domain_id" do - it do - expect(subject.domain_id).to eq("CNIC-DO735168") - end - end - describe "#status" do - it do - expect(subject.status).to eq(["ok"]) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(false) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(true) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to be_a(Time) - expect(subject.created_on).to eq(DateTime.parse("2011-02-07 13:10:14 UTC")) - end - end - describe "#updated_on" do - it do - expect(subject.updated_on).to be_a(Time) - expect(subject.updated_on).to eq(DateTime.parse("2012-06-23 10:38:02 UTC")) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to be_a(Time) - expect(subject.expires_on).to eq(DateTime.parse("2015-02-07 23:59:59 UTC")) - end - end - describe "#registrar" do - it do - expect(subject.registrar).to eq(nil) - end - end - describe "#registrant_contacts" do - it do - expect(subject.registrant_contacts).to be_a(Array) - expect(subject.registrant_contacts.size).to eq(1) - expect(subject.registrant_contacts[0]).to be_a(Whois::Parser::Contact) - expect(subject.registrant_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_REGISTRANT) - expect(subject.registrant_contacts[0].id).to eq("H1346485") - expect(subject.registrant_contacts[0].name).to eq(nil) - expect(subject.registrant_contacts[0].organization).to eq(nil) - expect(subject.registrant_contacts[0].address).to eq(nil) - expect(subject.registrant_contacts[0].city).to eq(nil) - expect(subject.registrant_contacts[0].zip).to eq(nil) - expect(subject.registrant_contacts[0].state).to eq(nil) - expect(subject.registrant_contacts[0].country).to eq(nil) - expect(subject.registrant_contacts[0].country_code).to eq(nil) - expect(subject.registrant_contacts[0].phone).to eq(nil) - expect(subject.registrant_contacts[0].fax).to eq(nil) - expect(subject.registrant_contacts[0].email).to eq(nil) - end - end - describe "#admin_contacts" do - it do - expect(subject.admin_contacts).to be_a(Array) - expect(subject.admin_contacts.size).to eq(0) - end - end - describe "#technical_contacts" do - it do - expect(subject.technical_contacts).to be_a(Array) - expect(subject.technical_contacts.size).to eq(1) - expect(subject.technical_contacts[0]).to be_a(Whois::Parser::Contact) - expect(subject.technical_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_TECHNICAL) - expect(subject.technical_contacts[0].id).to eq("H1346485") - expect(subject.technical_contacts[0].name).to eq(nil) - expect(subject.technical_contacts[0].organization).to eq(nil) - expect(subject.technical_contacts[0].address).to eq(nil) - expect(subject.technical_contacts[0].city).to eq(nil) - expect(subject.technical_contacts[0].zip).to eq(nil) - expect(subject.technical_contacts[0].state).to eq(nil) - expect(subject.technical_contacts[0].country).to eq(nil) - expect(subject.technical_contacts[0].country_code).to eq(nil) - expect(subject.technical_contacts[0].phone).to eq(nil) - expect(subject.technical_contacts[0].fax).to eq(nil) - expect(subject.technical_contacts[0].email).to eq(nil) - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers.size).to eq(2) - expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[0].name).to eq("f1g1ns1.dnspod.net") - expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[1].name).to eq("f1g1ns2.dnspod.net") - end + it "matches status_registered.expected" do + expect(subject.disclaimer).to eq("This whois service is provided by CentralNic Ltd and only contains information pertaining to Internet domain names we have registered for our customers. By using this service you are agreeing (1) not to use any information presented here for any purpose other than determining ownership of domain names, (2) not to store or reproduce this data in any way, (3) not to use any high-volume, automated, electronic processes to obtain data from this service. Abuse of this service is monitored and actions in contravention of these terms will result in being permanently blacklisted. All data is (c) CentralNic Ltd https://www.centralnic.com/") + expect(subject.domain).to eq("google.gr.com") + expect(subject.domain_id).to eq("CNIC-DO735168") + expect(subject.status).to eq(["ok"]) + expect(subject.available?).to eq(false) + expect(subject.registered?).to eq(true) + expect(subject.created_on).to be_a(Time) + expect(subject.created_on).to eq(DateTime.parse("2011-02-07 13:10:14 UTC")) + expect(subject.updated_on).to be_a(Time) + expect(subject.updated_on).to eq(DateTime.parse("2012-06-23 10:38:02 UTC")) + expect(subject.expires_on).to be_a(Time) + expect(subject.expires_on).to eq(DateTime.parse("2015-02-07 23:59:59 UTC")) + expect(subject.registrar).to eq(nil) + expect(subject.registrant_contacts).to be_a(Array) + expect(subject.registrant_contacts.size).to eq(1) + expect(subject.registrant_contacts[0]).to be_a(Whois::Parser::Contact) + expect(subject.registrant_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_REGISTRANT) + expect(subject.registrant_contacts[0].id).to eq("H1346485") + expect(subject.registrant_contacts[0].name).to eq(nil) + expect(subject.registrant_contacts[0].organization).to eq(nil) + expect(subject.registrant_contacts[0].address).to eq(nil) + expect(subject.registrant_contacts[0].city).to eq(nil) + expect(subject.registrant_contacts[0].zip).to eq(nil) + expect(subject.registrant_contacts[0].state).to eq(nil) + expect(subject.registrant_contacts[0].country).to eq(nil) + expect(subject.registrant_contacts[0].country_code).to eq(nil) + expect(subject.registrant_contacts[0].phone).to eq(nil) + expect(subject.registrant_contacts[0].fax).to eq(nil) + expect(subject.registrant_contacts[0].email).to eq(nil) + expect(subject.admin_contacts).to be_a(Array) + expect(subject.admin_contacts.size).to eq(0) + expect(subject.technical_contacts).to be_a(Array) + expect(subject.technical_contacts.size).to eq(1) + expect(subject.technical_contacts[0]).to be_a(Whois::Parser::Contact) + expect(subject.technical_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_TECHNICAL) + expect(subject.technical_contacts[0].id).to eq("H1346485") + expect(subject.technical_contacts[0].name).to eq(nil) + expect(subject.technical_contacts[0].organization).to eq(nil) + expect(subject.technical_contacts[0].address).to eq(nil) + expect(subject.technical_contacts[0].city).to eq(nil) + expect(subject.technical_contacts[0].zip).to eq(nil) + expect(subject.technical_contacts[0].state).to eq(nil) + expect(subject.technical_contacts[0].country).to eq(nil) + expect(subject.technical_contacts[0].country_code).to eq(nil) + expect(subject.technical_contacts[0].phone).to eq(nil) + expect(subject.technical_contacts[0].fax).to eq(nil) + expect(subject.technical_contacts[0].email).to eq(nil) + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers.size).to eq(2) + expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[0].name).to eq("f1g1ns1.dnspod.net") + expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[1].name).to eq("f1g1ns2.dnspod.net") end end diff --git a/spec/whois/parsers/responses/whois.centralnic.com/hu.com/status_available_spec.rb b/spec/whois/parsers/responses/whois.centralnic.com/hu.com/status_available_spec.rb index 02b3e38e..ce4c9b66 100644 --- a/spec/whois/parsers/responses/whois.centralnic.com/hu.com/status_available_spec.rb +++ b/spec/whois/parsers/responses/whois.centralnic.com/hu.com/status_available_spec.rb @@ -11,88 +11,33 @@ # require 'spec_helper' -require 'whois/parsers/whois.centralnic.com.rb' -describe Whois::Parsers::WhoisCentralnicCom, "status_available.expected" do +describe "whois.centralnic.com", :aggregate_failures do subject do file = fixture("responses", "whois.centralnic.com/hu.com/status_available.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.centralnic.com") + Whois::Parser.parser_for(part) end - describe "#disclaimer" do - it do - expect(subject.disclaimer).to eq(nil) - end - end - describe "#domain" do - it do - expect(subject.domain).to eq(nil) - end - end - describe "#domain_id" do - it do - expect(subject.domain_id).to eq(nil) - end - end - describe "#status" do - it do - expect(subject.status).to eq([]) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(true) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(false) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to eq(nil) - end - end - describe "#updated_on" do - it do - expect(subject.updated_on).to eq(nil) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to eq(nil) - end - end - describe "#registrar" do - it do - expect(subject.registrar).to eq(nil) - end - end - describe "#registrant_contacts" do - it do - expect(subject.registrant_contacts).to be_a(Array) - expect(subject.registrant_contacts).to eq([]) - end - end - describe "#admin_contacts" do - it do - expect(subject.admin_contacts).to be_a(Array) - expect(subject.admin_contacts).to eq([]) - end - end - describe "#technical_contacts" do - it do - expect(subject.technical_contacts).to be_a(Array) - expect(subject.technical_contacts).to eq([]) - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers).to eq([]) - end + it "matches status_available.expected" do + expect(subject.disclaimer).to eq(nil) + expect(subject.domain).to eq(nil) + expect(subject.domain_id).to eq(nil) + expect(subject.status).to eq([]) + expect(subject.available?).to eq(true) + expect(subject.registered?).to eq(false) + expect(subject.created_on).to eq(nil) + expect(subject.updated_on).to eq(nil) + expect(subject.expires_on).to eq(nil) + expect(subject.registrar).to eq(nil) + expect(subject.registrant_contacts).to be_a(Array) + expect(subject.registrant_contacts).to eq([]) + expect(subject.admin_contacts).to be_a(Array) + expect(subject.admin_contacts).to eq([]) + expect(subject.technical_contacts).to be_a(Array) + expect(subject.technical_contacts).to eq([]) + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers).to eq([]) end end diff --git a/spec/whois/parsers/responses/whois.centralnic.com/hu.com/status_registered_spec.rb b/spec/whois/parsers/responses/whois.centralnic.com/hu.com/status_registered_spec.rb index edfa1805..04ee4d66 100644 --- a/spec/whois/parsers/responses/whois.centralnic.com/hu.com/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.centralnic.com/hu.com/status_registered_spec.rb @@ -11,140 +11,85 @@ # require 'spec_helper' -require 'whois/parsers/whois.centralnic.com.rb' -describe Whois::Parsers::WhoisCentralnicCom, "status_registered.expected" do +describe "whois.centralnic.com", :aggregate_failures do subject do file = fixture("responses", "whois.centralnic.com/hu.com/status_registered.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.centralnic.com") + Whois::Parser.parser_for(part) end - describe "#disclaimer" do - it do - expect(subject.disclaimer).to eq("This whois service is provided by CentralNic Ltd and only contains information pertaining to Internet domain names we have registered for our customers. By using this service you are agreeing (1) not to use any information presented here for any purpose other than determining ownership of domain names, (2) not to store or reproduce this data in any way, (3) not to use any high-volume, automated, electronic processes to obtain data from this service. Abuse of this service is monitored and actions in contravention of these terms will result in being permanently blacklisted. All data is (c) CentralNic Ltd https://www.centralnic.com/") - end - end - describe "#domain" do - it do - expect(subject.domain).to eq("porn.hu.com") - end - end - describe "#domain_id" do - it do - expect(subject.domain_id).to eq("CNIC-DO970405") - end - end - describe "#status" do - it do - expect(subject.status).to eq(["pendingDelete", "pendingDelete"]) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(false) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(true) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to be_a(Time) - expect(subject.created_on).to eq(DateTime.parse("2012-11-28 17:46:03 UTC")) - end - end - describe "#updated_on" do - it do - expect(subject.updated_on).to be_a(Time) - expect(subject.updated_on).to eq(DateTime.parse("2014-02-11 00:16:13 UTC")) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to be_a(Time) - expect(subject.expires_on).to eq(DateTime.parse("2013-11-28 23:59:59 UTC")) - end - end - describe "#registrar" do - it do - expect(subject.registrar).to be_a(Whois::Parser::Registrar) - expect(subject.registrar.id).to eq("H65658") - expect(subject.registrar.name).to eq("101Domain, Inc.") - expect(subject.registrar.url).to eq("http://www.101domain.com") - end - end - describe "#registrant_contacts" do - it do - expect(subject.registrant_contacts).to be_a(Array) - expect(subject.registrant_contacts.size).to eq(1) - expect(subject.registrant_contacts[0]).to be_a(Whois::Parser::Contact) - expect(subject.registrant_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_REGISTRANT) - expect(subject.registrant_contacts[0].id).to eq("RWG000000004273D") - expect(subject.registrant_contacts[0].name).to eq("Gintautas Liaskus") - expect(subject.registrant_contacts[0].organization).to eq("G.Liaskaus firma INFOMEGA") - expect(subject.registrant_contacts[0].address).to eq("Kapsu 32-53") - expect(subject.registrant_contacts[0].city).to eq("Vilnius") - expect(subject.registrant_contacts[0].zip).to eq("02167") - expect(subject.registrant_contacts[0].state).to eq(nil) - expect(subject.registrant_contacts[0].country).to eq(nil) - expect(subject.registrant_contacts[0].country_code).to eq("LT") - expect(subject.registrant_contacts[0].phone).to eq("+370.52711457") - expect(subject.registrant_contacts[0].fax).to eq("+370.52784278") - expect(subject.registrant_contacts[0].email).to eq("infotau@infotau.lt") - end - end - describe "#admin_contacts" do - it do - expect(subject.admin_contacts).to be_a(Array) - expect(subject.admin_contacts.size).to eq(1) - expect(subject.admin_contacts[0]).to be_a(Whois::Parser::Contact) - expect(subject.admin_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_ADMINISTRATIVE) - expect(subject.admin_contacts[0].id).to eq("RWG000000004273D") - expect(subject.admin_contacts[0].name).to eq("Gintautas Liaskus") - expect(subject.admin_contacts[0].organization).to eq("G.Liaskaus firma INFOMEGA") - expect(subject.admin_contacts[0].address).to eq("Kapsu 32-53") - expect(subject.admin_contacts[0].city).to eq("Vilnius") - expect(subject.admin_contacts[0].zip).to eq("02167") - expect(subject.admin_contacts[0].state).to eq(nil) - expect(subject.admin_contacts[0].country).to eq(nil) - expect(subject.admin_contacts[0].country_code).to eq("LT") - expect(subject.admin_contacts[0].phone).to eq("+370.52711457") - expect(subject.admin_contacts[0].fax).to eq("+370.52784278") - expect(subject.admin_contacts[0].email).to eq("infotau@infotau.lt") - end - end - describe "#technical_contacts" do - it do - expect(subject.technical_contacts).to be_a(Array) - expect(subject.technical_contacts.size).to eq(1) - expect(subject.technical_contacts[0]).to be_a(Whois::Parser::Contact) - expect(subject.technical_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_TECHNICAL) - expect(subject.technical_contacts[0].id).to eq("RWG000000004273D") - expect(subject.technical_contacts[0].name).to eq("Gintautas Liaskus") - expect(subject.technical_contacts[0].organization).to eq("G.Liaskaus firma INFOMEGA") - expect(subject.technical_contacts[0].address).to eq("Kapsu 32-53") - expect(subject.technical_contacts[0].city).to eq("Vilnius") - expect(subject.technical_contacts[0].zip).to eq("02167") - expect(subject.technical_contacts[0].state).to eq(nil) - expect(subject.technical_contacts[0].country).to eq(nil) - expect(subject.technical_contacts[0].country_code).to eq("LT") - expect(subject.technical_contacts[0].phone).to eq("+370.52711457") - expect(subject.technical_contacts[0].fax).to eq("+370.52784278") - expect(subject.technical_contacts[0].email).to eq("infotau@infotau.lt") - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers.size).to eq(2) - expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[0].name).to eq("ns1.sedoparking.com") - expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[1].name).to eq("ns2.sedoparking.com") - end + it "matches status_registered.expected" do + expect(subject.disclaimer).to eq("This whois service is provided by CentralNic Ltd and only contains information pertaining to Internet domain names we have registered for our customers. By using this service you are agreeing (1) not to use any information presented here for any purpose other than determining ownership of domain names, (2) not to store or reproduce this data in any way, (3) not to use any high-volume, automated, electronic processes to obtain data from this service. Abuse of this service is monitored and actions in contravention of these terms will result in being permanently blacklisted. All data is (c) CentralNic Ltd https://www.centralnic.com/") + expect(subject.domain).to eq("porn.hu.com") + expect(subject.domain_id).to eq("CNIC-DO970405") + expect(subject.status).to eq(["pendingDelete", "pendingDelete"]) + expect(subject.available?).to eq(false) + expect(subject.registered?).to eq(true) + expect(subject.created_on).to be_a(Time) + expect(subject.created_on).to eq(DateTime.parse("2012-11-28 17:46:03 UTC")) + expect(subject.updated_on).to be_a(Time) + expect(subject.updated_on).to eq(DateTime.parse("2014-02-11 00:16:13 UTC")) + expect(subject.expires_on).to be_a(Time) + expect(subject.expires_on).to eq(DateTime.parse("2013-11-28 23:59:59 UTC")) + expect(subject.registrar).to be_a(Whois::Parser::Registrar) + expect(subject.registrar.id).to eq("H65658") + expect(subject.registrar.name).to eq("101Domain, Inc.") + expect(subject.registrar.url).to eq("http://www.101domain.com") + expect(subject.registrant_contacts).to be_a(Array) + expect(subject.registrant_contacts.size).to eq(1) + expect(subject.registrant_contacts[0]).to be_a(Whois::Parser::Contact) + expect(subject.registrant_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_REGISTRANT) + expect(subject.registrant_contacts[0].id).to eq("RWG000000004273D") + expect(subject.registrant_contacts[0].name).to eq("Gintautas Liaskus") + expect(subject.registrant_contacts[0].organization).to eq("G.Liaskaus firma INFOMEGA") + expect(subject.registrant_contacts[0].address).to eq("Kapsu 32-53") + expect(subject.registrant_contacts[0].city).to eq("Vilnius") + expect(subject.registrant_contacts[0].zip).to eq("02167") + expect(subject.registrant_contacts[0].state).to eq(nil) + expect(subject.registrant_contacts[0].country).to eq(nil) + expect(subject.registrant_contacts[0].country_code).to eq("LT") + expect(subject.registrant_contacts[0].phone).to eq("+370.52711457") + expect(subject.registrant_contacts[0].fax).to eq("+370.52784278") + expect(subject.registrant_contacts[0].email).to eq("infotau@infotau.lt") + expect(subject.admin_contacts).to be_a(Array) + expect(subject.admin_contacts.size).to eq(1) + expect(subject.admin_contacts[0]).to be_a(Whois::Parser::Contact) + expect(subject.admin_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_ADMINISTRATIVE) + expect(subject.admin_contacts[0].id).to eq("RWG000000004273D") + expect(subject.admin_contacts[0].name).to eq("Gintautas Liaskus") + expect(subject.admin_contacts[0].organization).to eq("G.Liaskaus firma INFOMEGA") + expect(subject.admin_contacts[0].address).to eq("Kapsu 32-53") + expect(subject.admin_contacts[0].city).to eq("Vilnius") + expect(subject.admin_contacts[0].zip).to eq("02167") + expect(subject.admin_contacts[0].state).to eq(nil) + expect(subject.admin_contacts[0].country).to eq(nil) + expect(subject.admin_contacts[0].country_code).to eq("LT") + expect(subject.admin_contacts[0].phone).to eq("+370.52711457") + expect(subject.admin_contacts[0].fax).to eq("+370.52784278") + expect(subject.admin_contacts[0].email).to eq("infotau@infotau.lt") + expect(subject.technical_contacts).to be_a(Array) + expect(subject.technical_contacts.size).to eq(1) + expect(subject.technical_contacts[0]).to be_a(Whois::Parser::Contact) + expect(subject.technical_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_TECHNICAL) + expect(subject.technical_contacts[0].id).to eq("RWG000000004273D") + expect(subject.technical_contacts[0].name).to eq("Gintautas Liaskus") + expect(subject.technical_contacts[0].organization).to eq("G.Liaskaus firma INFOMEGA") + expect(subject.technical_contacts[0].address).to eq("Kapsu 32-53") + expect(subject.technical_contacts[0].city).to eq("Vilnius") + expect(subject.technical_contacts[0].zip).to eq("02167") + expect(subject.technical_contacts[0].state).to eq(nil) + expect(subject.technical_contacts[0].country).to eq(nil) + expect(subject.technical_contacts[0].country_code).to eq("LT") + expect(subject.technical_contacts[0].phone).to eq("+370.52711457") + expect(subject.technical_contacts[0].fax).to eq("+370.52784278") + expect(subject.technical_contacts[0].email).to eq("infotau@infotau.lt") + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers.size).to eq(2) + expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[0].name).to eq("ns1.sedoparking.com") + expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[1].name).to eq("ns2.sedoparking.com") end end diff --git a/spec/whois/parsers/responses/whois.centralnic.com/jp.net/status_available_spec.rb b/spec/whois/parsers/responses/whois.centralnic.com/jp.net/status_available_spec.rb index 04d94031..a3795abe 100644 --- a/spec/whois/parsers/responses/whois.centralnic.com/jp.net/status_available_spec.rb +++ b/spec/whois/parsers/responses/whois.centralnic.com/jp.net/status_available_spec.rb @@ -11,88 +11,33 @@ # require 'spec_helper' -require 'whois/parsers/whois.centralnic.com.rb' -describe Whois::Parsers::WhoisCentralnicCom, "status_available.expected" do +describe "whois.centralnic.com", :aggregate_failures do subject do file = fixture("responses", "whois.centralnic.com/jp.net/status_available.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.centralnic.com") + Whois::Parser.parser_for(part) end - describe "#disclaimer" do - it do - expect(subject.disclaimer).to eq(nil) - end - end - describe "#domain" do - it do - expect(subject.domain).to eq(nil) - end - end - describe "#domain_id" do - it do - expect(subject.domain_id).to eq(nil) - end - end - describe "#status" do - it do - expect(subject.status).to eq([]) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(true) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(false) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to eq(nil) - end - end - describe "#updated_on" do - it do - expect(subject.updated_on).to eq(nil) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to eq(nil) - end - end - describe "#registrar" do - it do - expect(subject.registrar).to eq(nil) - end - end - describe "#registrant_contacts" do - it do - expect(subject.registrant_contacts).to be_a(Array) - expect(subject.registrant_contacts).to eq([]) - end - end - describe "#admin_contacts" do - it do - expect(subject.admin_contacts).to be_a(Array) - expect(subject.admin_contacts).to eq([]) - end - end - describe "#technical_contacts" do - it do - expect(subject.technical_contacts).to be_a(Array) - expect(subject.technical_contacts).to eq([]) - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers).to eq([]) - end + it "matches status_available.expected" do + expect(subject.disclaimer).to eq(nil) + expect(subject.domain).to eq(nil) + expect(subject.domain_id).to eq(nil) + expect(subject.status).to eq([]) + expect(subject.available?).to eq(true) + expect(subject.registered?).to eq(false) + expect(subject.created_on).to eq(nil) + expect(subject.updated_on).to eq(nil) + expect(subject.expires_on).to eq(nil) + expect(subject.registrar).to eq(nil) + expect(subject.registrant_contacts).to be_a(Array) + expect(subject.registrant_contacts).to eq([]) + expect(subject.admin_contacts).to be_a(Array) + expect(subject.admin_contacts).to eq([]) + expect(subject.technical_contacts).to be_a(Array) + expect(subject.technical_contacts).to eq([]) + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers).to eq([]) end end diff --git a/spec/whois/parsers/responses/whois.centralnic.com/jp.net/status_registered_spec.rb b/spec/whois/parsers/responses/whois.centralnic.com/jp.net/status_registered_spec.rb index fcb9dc06..35d22d6a 100644 --- a/spec/whois/parsers/responses/whois.centralnic.com/jp.net/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.centralnic.com/jp.net/status_registered_spec.rb @@ -11,140 +11,85 @@ # require 'spec_helper' -require 'whois/parsers/whois.centralnic.com.rb' -describe Whois::Parsers::WhoisCentralnicCom, "status_registered.expected" do +describe "whois.centralnic.com", :aggregate_failures do subject do file = fixture("responses", "whois.centralnic.com/jp.net/status_registered.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.centralnic.com") + Whois::Parser.parser_for(part) end - describe "#disclaimer" do - it do - expect(subject.disclaimer).to eq("This whois service is provided by CentralNic Ltd and only contains information pertaining to Internet domain names we have registered for our customers. By using this service you are agreeing (1) not to use any information presented here for any purpose other than determining ownership of domain names, (2) not to store or reproduce this data in any way, (3) not to use any high-volume, automated, electronic processes to obtain data from this service. Abuse of this service is monitored and actions in contravention of these terms will result in being permanently blacklisted. All data is (c) CentralNic Ltd https://www.centralnic.com/") - end - end - describe "#domain" do - it do - expect(subject.domain).to eq("ntt.jp.net") - end - end - describe "#domain_id" do - it do - expect(subject.domain_id).to eq("CNIC-DO846061") - end - end - describe "#status" do - it do - expect(subject.status).to eq(["ok"]) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(false) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(true) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to be_a(Time) - expect(subject.created_on).to eq(DateTime.parse("2012-03-16 11:47:23 UTC")) - end - end - describe "#updated_on" do - it do - expect(subject.updated_on).to be_a(Time) - expect(subject.updated_on).to eq(DateTime.parse("2013-01-24 16:57:19 UTC")) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to be_a(Time) - expect(subject.expires_on).to eq(DateTime.parse("2018-03-16 23:59:59 UTC")) - end - end - describe "#registrar" do - it do - expect(subject.registrar).to be_a(Whois::Parser::Registrar) - expect(subject.registrar.id).to eq("H1605993") - expect(subject.registrar.name).to eq("GMO") - expect(subject.registrar.url).to eq("http://www.onamae.com") - end - end - describe "#registrant_contacts" do - it do - expect(subject.registrant_contacts).to be_a(Array) - expect(subject.registrant_contacts.size).to eq(1) - expect(subject.registrant_contacts[0]).to be_a(Whois::Parser::Contact) - expect(subject.registrant_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_REGISTRANT) - expect(subject.registrant_contacts[0].id).to eq("136151BCEFE") - expect(subject.registrant_contacts[0].name).to eq("zhijian xia") - expect(subject.registrant_contacts[0].organization).to eq("zhijian xia") - expect(subject.registrant_contacts[0].address).to eq("Chuo\n3-23-20") - expect(subject.registrant_contacts[0].city).to eq("Warabi-shi") - expect(subject.registrant_contacts[0].zip).to eq("335-0004") - expect(subject.registrant_contacts[0].state).to eq("Saitama") - expect(subject.registrant_contacts[0].country).to eq(nil) - expect(subject.registrant_contacts[0].country_code).to eq("JP") - expect(subject.registrant_contacts[0].phone).to eq("+81.08037215656") - expect(subject.registrant_contacts[0].fax).to eq(nil) - expect(subject.registrant_contacts[0].email).to eq("xia@ingame.jp") - end - end - describe "#admin_contacts" do - it do - expect(subject.admin_contacts).to be_a(Array) - expect(subject.admin_contacts.size).to eq(1) - expect(subject.admin_contacts[0]).to be_a(Whois::Parser::Contact) - expect(subject.admin_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_ADMINISTRATIVE) - expect(subject.admin_contacts[0].id).to eq("136151BD1A1") - expect(subject.admin_contacts[0].name).to eq("zhijian xia") - expect(subject.admin_contacts[0].organization).to eq("zhijian xia") - expect(subject.admin_contacts[0].address).to eq("Chuo\n3-23-20") - expect(subject.admin_contacts[0].city).to eq("Warabi-shi") - expect(subject.admin_contacts[0].zip).to eq("335-0004") - expect(subject.admin_contacts[0].state).to eq("Saitama") - expect(subject.admin_contacts[0].country).to eq(nil) - expect(subject.admin_contacts[0].country_code).to eq("JP") - expect(subject.admin_contacts[0].phone).to eq("+81.08037215656") - expect(subject.admin_contacts[0].fax).to eq(nil) - expect(subject.admin_contacts[0].email).to eq("xia@ingame.jp") - end - end - describe "#technical_contacts" do - it do - expect(subject.technical_contacts).to be_a(Array) - expect(subject.technical_contacts.size).to eq(1) - expect(subject.technical_contacts[0]).to be_a(Whois::Parser::Contact) - expect(subject.technical_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_TECHNICAL) - expect(subject.technical_contacts[0].id).to eq("136151BD459") - expect(subject.technical_contacts[0].name).to eq("Technical Contact") - expect(subject.technical_contacts[0].organization).to eq("GMO Internet Inc.") - expect(subject.technical_contacts[0].address).to eq("26-1 Sakuragaoka-cho\nCerulean Tower 11F") - expect(subject.technical_contacts[0].city).to eq("Shibuya-ku") - expect(subject.technical_contacts[0].zip).to eq("150-8512") - expect(subject.technical_contacts[0].state).to eq("Tokyo") - expect(subject.technical_contacts[0].country).to eq(nil) - expect(subject.technical_contacts[0].country_code).to eq("JP") - expect(subject.technical_contacts[0].phone).to eq("+81.0354562555") - expect(subject.technical_contacts[0].fax).to eq("+81.0354562556") - expect(subject.technical_contacts[0].email).to eq("admin@onamae.com") - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers.size).to eq(2) - expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[0].name).to eq("dns1.onamae.com") - expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[1].name).to eq("dns2.onamae.com") - end + it "matches status_registered.expected" do + expect(subject.disclaimer).to eq("This whois service is provided by CentralNic Ltd and only contains information pertaining to Internet domain names we have registered for our customers. By using this service you are agreeing (1) not to use any information presented here for any purpose other than determining ownership of domain names, (2) not to store or reproduce this data in any way, (3) not to use any high-volume, automated, electronic processes to obtain data from this service. Abuse of this service is monitored and actions in contravention of these terms will result in being permanently blacklisted. All data is (c) CentralNic Ltd https://www.centralnic.com/") + expect(subject.domain).to eq("ntt.jp.net") + expect(subject.domain_id).to eq("CNIC-DO846061") + expect(subject.status).to eq(["ok"]) + expect(subject.available?).to eq(false) + expect(subject.registered?).to eq(true) + expect(subject.created_on).to be_a(Time) + expect(subject.created_on).to eq(DateTime.parse("2012-03-16 11:47:23 UTC")) + expect(subject.updated_on).to be_a(Time) + expect(subject.updated_on).to eq(DateTime.parse("2013-01-24 16:57:19 UTC")) + expect(subject.expires_on).to be_a(Time) + expect(subject.expires_on).to eq(DateTime.parse("2018-03-16 23:59:59 UTC")) + expect(subject.registrar).to be_a(Whois::Parser::Registrar) + expect(subject.registrar.id).to eq("H1605993") + expect(subject.registrar.name).to eq("GMO") + expect(subject.registrar.url).to eq("http://www.onamae.com") + expect(subject.registrant_contacts).to be_a(Array) + expect(subject.registrant_contacts.size).to eq(1) + expect(subject.registrant_contacts[0]).to be_a(Whois::Parser::Contact) + expect(subject.registrant_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_REGISTRANT) + expect(subject.registrant_contacts[0].id).to eq("136151BCEFE") + expect(subject.registrant_contacts[0].name).to eq("zhijian xia") + expect(subject.registrant_contacts[0].organization).to eq("zhijian xia") + expect(subject.registrant_contacts[0].address).to eq("Chuo\n3-23-20") + expect(subject.registrant_contacts[0].city).to eq("Warabi-shi") + expect(subject.registrant_contacts[0].zip).to eq("335-0004") + expect(subject.registrant_contacts[0].state).to eq("Saitama") + expect(subject.registrant_contacts[0].country).to eq(nil) + expect(subject.registrant_contacts[0].country_code).to eq("JP") + expect(subject.registrant_contacts[0].phone).to eq("+81.08037215656") + expect(subject.registrant_contacts[0].fax).to eq(nil) + expect(subject.registrant_contacts[0].email).to eq("xia@ingame.jp") + expect(subject.admin_contacts).to be_a(Array) + expect(subject.admin_contacts.size).to eq(1) + expect(subject.admin_contacts[0]).to be_a(Whois::Parser::Contact) + expect(subject.admin_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_ADMINISTRATIVE) + expect(subject.admin_contacts[0].id).to eq("136151BD1A1") + expect(subject.admin_contacts[0].name).to eq("zhijian xia") + expect(subject.admin_contacts[0].organization).to eq("zhijian xia") + expect(subject.admin_contacts[0].address).to eq("Chuo\n3-23-20") + expect(subject.admin_contacts[0].city).to eq("Warabi-shi") + expect(subject.admin_contacts[0].zip).to eq("335-0004") + expect(subject.admin_contacts[0].state).to eq("Saitama") + expect(subject.admin_contacts[0].country).to eq(nil) + expect(subject.admin_contacts[0].country_code).to eq("JP") + expect(subject.admin_contacts[0].phone).to eq("+81.08037215656") + expect(subject.admin_contacts[0].fax).to eq(nil) + expect(subject.admin_contacts[0].email).to eq("xia@ingame.jp") + expect(subject.technical_contacts).to be_a(Array) + expect(subject.technical_contacts.size).to eq(1) + expect(subject.technical_contacts[0]).to be_a(Whois::Parser::Contact) + expect(subject.technical_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_TECHNICAL) + expect(subject.technical_contacts[0].id).to eq("136151BD459") + expect(subject.technical_contacts[0].name).to eq("Technical Contact") + expect(subject.technical_contacts[0].organization).to eq("GMO Internet Inc.") + expect(subject.technical_contacts[0].address).to eq("26-1 Sakuragaoka-cho\nCerulean Tower 11F") + expect(subject.technical_contacts[0].city).to eq("Shibuya-ku") + expect(subject.technical_contacts[0].zip).to eq("150-8512") + expect(subject.technical_contacts[0].state).to eq("Tokyo") + expect(subject.technical_contacts[0].country).to eq(nil) + expect(subject.technical_contacts[0].country_code).to eq("JP") + expect(subject.technical_contacts[0].phone).to eq("+81.0354562555") + expect(subject.technical_contacts[0].fax).to eq("+81.0354562556") + expect(subject.technical_contacts[0].email).to eq("admin@onamae.com") + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers.size).to eq(2) + expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[0].name).to eq("dns1.onamae.com") + expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[1].name).to eq("dns2.onamae.com") end end diff --git a/spec/whois/parsers/responses/whois.centralnic.com/jpn.com/status_available_spec.rb b/spec/whois/parsers/responses/whois.centralnic.com/jpn.com/status_available_spec.rb index ff5ffec3..7834b396 100644 --- a/spec/whois/parsers/responses/whois.centralnic.com/jpn.com/status_available_spec.rb +++ b/spec/whois/parsers/responses/whois.centralnic.com/jpn.com/status_available_spec.rb @@ -11,88 +11,33 @@ # require 'spec_helper' -require 'whois/parsers/whois.centralnic.com.rb' -describe Whois::Parsers::WhoisCentralnicCom, "status_available.expected" do +describe "whois.centralnic.com", :aggregate_failures do subject do file = fixture("responses", "whois.centralnic.com/jpn.com/status_available.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.centralnic.com") + Whois::Parser.parser_for(part) end - describe "#disclaimer" do - it do - expect(subject.disclaimer).to eq(nil) - end - end - describe "#domain" do - it do - expect(subject.domain).to eq(nil) - end - end - describe "#domain_id" do - it do - expect(subject.domain_id).to eq(nil) - end - end - describe "#status" do - it do - expect(subject.status).to eq([]) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(true) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(false) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to eq(nil) - end - end - describe "#updated_on" do - it do - expect(subject.updated_on).to eq(nil) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to eq(nil) - end - end - describe "#registrar" do - it do - expect(subject.registrar).to eq(nil) - end - end - describe "#registrant_contacts" do - it do - expect(subject.registrant_contacts).to be_a(Array) - expect(subject.registrant_contacts).to eq([]) - end - end - describe "#admin_contacts" do - it do - expect(subject.admin_contacts).to be_a(Array) - expect(subject.admin_contacts).to eq([]) - end - end - describe "#technical_contacts" do - it do - expect(subject.technical_contacts).to be_a(Array) - expect(subject.technical_contacts).to eq([]) - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers).to eq([]) - end + it "matches status_available.expected" do + expect(subject.disclaimer).to eq(nil) + expect(subject.domain).to eq(nil) + expect(subject.domain_id).to eq(nil) + expect(subject.status).to eq([]) + expect(subject.available?).to eq(true) + expect(subject.registered?).to eq(false) + expect(subject.created_on).to eq(nil) + expect(subject.updated_on).to eq(nil) + expect(subject.expires_on).to eq(nil) + expect(subject.registrar).to eq(nil) + expect(subject.registrant_contacts).to be_a(Array) + expect(subject.registrant_contacts).to eq([]) + expect(subject.admin_contacts).to be_a(Array) + expect(subject.admin_contacts).to eq([]) + expect(subject.technical_contacts).to be_a(Array) + expect(subject.technical_contacts).to eq([]) + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers).to eq([]) end end diff --git a/spec/whois/parsers/responses/whois.centralnic.com/jpn.com/status_registered_spec.rb b/spec/whois/parsers/responses/whois.centralnic.com/jpn.com/status_registered_spec.rb index f6585413..4bdbe685 100644 --- a/spec/whois/parsers/responses/whois.centralnic.com/jpn.com/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.centralnic.com/jpn.com/status_registered_spec.rb @@ -11,144 +11,89 @@ # require 'spec_helper' -require 'whois/parsers/whois.centralnic.com.rb' -describe Whois::Parsers::WhoisCentralnicCom, "status_registered.expected" do +describe "whois.centralnic.com", :aggregate_failures do subject do file = fixture("responses", "whois.centralnic.com/jpn.com/status_registered.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.centralnic.com") + Whois::Parser.parser_for(part) end - describe "#disclaimer" do - it do - expect(subject.disclaimer).to eq("This whois service is provided by CentralNic Ltd and only contains information pertaining to Internet domain names we have registered for our customers. By using this service you are agreeing (1) not to use any information presented here for any purpose other than determining ownership of domain names, (2) not to store or reproduce this data in any way, (3) not to use any high-volume, automated, electronic processes to obtain data from this service. Abuse of this service is monitored and actions in contravention of these terms will result in being permanently blacklisted. All data is (c) CentralNic Ltd https://www.centralnic.com/") - end - end - describe "#domain" do - it do - expect(subject.domain).to eq("koi.jpn.com") - end - end - describe "#domain_id" do - it do - expect(subject.domain_id).to eq("CNIC-DO492866") - end - end - describe "#status" do - it do - expect(subject.status).to eq(["ok"]) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(false) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(true) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to be_a(Time) - expect(subject.created_on).to eq(DateTime.parse("2007-06-29 13:42:35 UTC")) - end - end - describe "#updated_on" do - it do - expect(subject.updated_on).to be_a(Time) - expect(subject.updated_on).to eq(DateTime.parse("2013-07-01 00:18:14 UTC")) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to be_a(Time) - expect(subject.expires_on).to eq(DateTime.parse("2015-06-29 23:59:59 UTC")) - end - end - describe "#registrar" do - it do - expect(subject.registrar).to be_a(Whois::Parser::Registrar) - expect(subject.registrar.id).to eq("I6467") - expect(subject.registrar.name).to eq("Webfusion") - expect(subject.registrar.url).to eq("http://www.123-reg.co.uk/domain-names/") - end - end - describe "#registrant_contacts" do - it do - expect(subject.registrant_contacts).to be_a(Array) - expect(subject.registrant_contacts.size).to eq(1) - expect(subject.registrant_contacts[0]).to be_a(Whois::Parser::Contact) - expect(subject.registrant_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_REGISTRANT) - expect(subject.registrant_contacts[0].id).to eq("MNT78E22765897") - expect(subject.registrant_contacts[0].name).to eq("Identity Protection Service") - expect(subject.registrant_contacts[0].organization).to eq("Identity Protect Limited") - expect(subject.registrant_contacts[0].address).to eq("PO Box 795") - expect(subject.registrant_contacts[0].city).to eq("Godalming") - expect(subject.registrant_contacts[0].zip).to eq("GU7 9GA") - expect(subject.registrant_contacts[0].state).to eq("Surrey") - expect(subject.registrant_contacts[0].country).to eq(nil) - expect(subject.registrant_contacts[0].country_code).to eq("GB") - expect(subject.registrant_contacts[0].phone).to eq("+44.1483307527") - expect(subject.registrant_contacts[0].fax).to eq("+44.1483304031") - expect(subject.registrant_contacts[0].email).to eq("koi.jpn.com@identity-protect.org") - end - end - describe "#admin_contacts" do - it do - expect(subject.admin_contacts).to be_a(Array) - expect(subject.admin_contacts.size).to eq(1) - expect(subject.admin_contacts[0]).to be_a(Whois::Parser::Contact) - expect(subject.admin_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_ADMINISTRATIVE) - expect(subject.admin_contacts[0].id).to eq("MNT78E22765897") - expect(subject.admin_contacts[0].name).to eq("Identity Protection Service") - expect(subject.admin_contacts[0].organization).to eq("Identity Protect Limited") - expect(subject.admin_contacts[0].address).to eq("PO Box 795") - expect(subject.admin_contacts[0].city).to eq("Godalming") - expect(subject.admin_contacts[0].zip).to eq("GU7 9GA") - expect(subject.admin_contacts[0].state).to eq("Surrey") - expect(subject.admin_contacts[0].country).to eq(nil) - expect(subject.admin_contacts[0].country_code).to eq("GB") - expect(subject.admin_contacts[0].phone).to eq("+44.1483307527") - expect(subject.admin_contacts[0].fax).to eq("+44.1483304031") - expect(subject.admin_contacts[0].email).to eq("koi.jpn.com@identity-protect.org") - end - end - describe "#technical_contacts" do - it do - expect(subject.technical_contacts).to be_a(Array) - expect(subject.technical_contacts.size).to eq(1) - expect(subject.technical_contacts[0]).to be_a(Whois::Parser::Contact) - expect(subject.technical_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_TECHNICAL) - expect(subject.technical_contacts[0].id).to eq("MNT78E22765897") - expect(subject.technical_contacts[0].name).to eq("Identity Protection Service") - expect(subject.technical_contacts[0].organization).to eq("Identity Protect Limited") - expect(subject.technical_contacts[0].address).to eq("PO Box 795") - expect(subject.technical_contacts[0].city).to eq("Godalming") - expect(subject.technical_contacts[0].zip).to eq("GU7 9GA") - expect(subject.technical_contacts[0].state).to eq("Surrey") - expect(subject.technical_contacts[0].country).to eq(nil) - expect(subject.technical_contacts[0].country_code).to eq("GB") - expect(subject.technical_contacts[0].phone).to eq("+44.1483307527") - expect(subject.technical_contacts[0].fax).to eq("+44.1483304031") - expect(subject.technical_contacts[0].email).to eq("koi.jpn.com@identity-protect.org") - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers.size).to eq(2) - expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[0].name).to eq("ns1.chaoshosting.co.uk") - expect(subject.nameservers[0].ipv4).to eq(nil) - expect(subject.nameservers[0].ipv6).to eq(nil) - expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[1].name).to eq("ns2.chaoshosting.co.uk") - expect(subject.nameservers[1].ipv4).to eq(nil) - expect(subject.nameservers[1].ipv6).to eq(nil) - end + it "matches status_registered.expected" do + expect(subject.disclaimer).to eq("This whois service is provided by CentralNic Ltd and only contains information pertaining to Internet domain names we have registered for our customers. By using this service you are agreeing (1) not to use any information presented here for any purpose other than determining ownership of domain names, (2) not to store or reproduce this data in any way, (3) not to use any high-volume, automated, electronic processes to obtain data from this service. Abuse of this service is monitored and actions in contravention of these terms will result in being permanently blacklisted. All data is (c) CentralNic Ltd https://www.centralnic.com/") + expect(subject.domain).to eq("koi.jpn.com") + expect(subject.domain_id).to eq("CNIC-DO492866") + expect(subject.status).to eq(["ok"]) + expect(subject.available?).to eq(false) + expect(subject.registered?).to eq(true) + expect(subject.created_on).to be_a(Time) + expect(subject.created_on).to eq(DateTime.parse("2007-06-29 13:42:35 UTC")) + expect(subject.updated_on).to be_a(Time) + expect(subject.updated_on).to eq(DateTime.parse("2013-07-01 00:18:14 UTC")) + expect(subject.expires_on).to be_a(Time) + expect(subject.expires_on).to eq(DateTime.parse("2015-06-29 23:59:59 UTC")) + expect(subject.registrar).to be_a(Whois::Parser::Registrar) + expect(subject.registrar.id).to eq("I6467") + expect(subject.registrar.name).to eq("Webfusion") + expect(subject.registrar.url).to eq("http://www.123-reg.co.uk/domain-names/") + expect(subject.registrant_contacts).to be_a(Array) + expect(subject.registrant_contacts.size).to eq(1) + expect(subject.registrant_contacts[0]).to be_a(Whois::Parser::Contact) + expect(subject.registrant_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_REGISTRANT) + expect(subject.registrant_contacts[0].id).to eq("MNT78E22765897") + expect(subject.registrant_contacts[0].name).to eq("Identity Protection Service") + expect(subject.registrant_contacts[0].organization).to eq("Identity Protect Limited") + expect(subject.registrant_contacts[0].address).to eq("PO Box 795") + expect(subject.registrant_contacts[0].city).to eq("Godalming") + expect(subject.registrant_contacts[0].zip).to eq("GU7 9GA") + expect(subject.registrant_contacts[0].state).to eq("Surrey") + expect(subject.registrant_contacts[0].country).to eq(nil) + expect(subject.registrant_contacts[0].country_code).to eq("GB") + expect(subject.registrant_contacts[0].phone).to eq("+44.1483307527") + expect(subject.registrant_contacts[0].fax).to eq("+44.1483304031") + expect(subject.registrant_contacts[0].email).to eq("koi.jpn.com@identity-protect.org") + expect(subject.admin_contacts).to be_a(Array) + expect(subject.admin_contacts.size).to eq(1) + expect(subject.admin_contacts[0]).to be_a(Whois::Parser::Contact) + expect(subject.admin_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_ADMINISTRATIVE) + expect(subject.admin_contacts[0].id).to eq("MNT78E22765897") + expect(subject.admin_contacts[0].name).to eq("Identity Protection Service") + expect(subject.admin_contacts[0].organization).to eq("Identity Protect Limited") + expect(subject.admin_contacts[0].address).to eq("PO Box 795") + expect(subject.admin_contacts[0].city).to eq("Godalming") + expect(subject.admin_contacts[0].zip).to eq("GU7 9GA") + expect(subject.admin_contacts[0].state).to eq("Surrey") + expect(subject.admin_contacts[0].country).to eq(nil) + expect(subject.admin_contacts[0].country_code).to eq("GB") + expect(subject.admin_contacts[0].phone).to eq("+44.1483307527") + expect(subject.admin_contacts[0].fax).to eq("+44.1483304031") + expect(subject.admin_contacts[0].email).to eq("koi.jpn.com@identity-protect.org") + expect(subject.technical_contacts).to be_a(Array) + expect(subject.technical_contacts.size).to eq(1) + expect(subject.technical_contacts[0]).to be_a(Whois::Parser::Contact) + expect(subject.technical_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_TECHNICAL) + expect(subject.technical_contacts[0].id).to eq("MNT78E22765897") + expect(subject.technical_contacts[0].name).to eq("Identity Protection Service") + expect(subject.technical_contacts[0].organization).to eq("Identity Protect Limited") + expect(subject.technical_contacts[0].address).to eq("PO Box 795") + expect(subject.technical_contacts[0].city).to eq("Godalming") + expect(subject.technical_contacts[0].zip).to eq("GU7 9GA") + expect(subject.technical_contacts[0].state).to eq("Surrey") + expect(subject.technical_contacts[0].country).to eq(nil) + expect(subject.technical_contacts[0].country_code).to eq("GB") + expect(subject.technical_contacts[0].phone).to eq("+44.1483307527") + expect(subject.technical_contacts[0].fax).to eq("+44.1483304031") + expect(subject.technical_contacts[0].email).to eq("koi.jpn.com@identity-protect.org") + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers.size).to eq(2) + expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[0].name).to eq("ns1.chaoshosting.co.uk") + expect(subject.nameservers[0].ipv4).to eq(nil) + expect(subject.nameservers[0].ipv6).to eq(nil) + expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[1].name).to eq("ns2.chaoshosting.co.uk") + expect(subject.nameservers[1].ipv4).to eq(nil) + expect(subject.nameservers[1].ipv6).to eq(nil) end end diff --git a/spec/whois/parsers/responses/whois.centralnic.com/kr.com/status_available_spec.rb b/spec/whois/parsers/responses/whois.centralnic.com/kr.com/status_available_spec.rb index 961b2fff..3eb0e8a0 100644 --- a/spec/whois/parsers/responses/whois.centralnic.com/kr.com/status_available_spec.rb +++ b/spec/whois/parsers/responses/whois.centralnic.com/kr.com/status_available_spec.rb @@ -11,88 +11,33 @@ # require 'spec_helper' -require 'whois/parsers/whois.centralnic.com.rb' -describe Whois::Parsers::WhoisCentralnicCom, "status_available.expected" do +describe "whois.centralnic.com", :aggregate_failures do subject do file = fixture("responses", "whois.centralnic.com/kr.com/status_available.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.centralnic.com") + Whois::Parser.parser_for(part) end - describe "#disclaimer" do - it do - expect(subject.disclaimer).to eq(nil) - end - end - describe "#domain" do - it do - expect(subject.domain).to eq(nil) - end - end - describe "#domain_id" do - it do - expect(subject.domain_id).to eq(nil) - end - end - describe "#status" do - it do - expect(subject.status).to eq([]) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(true) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(false) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to eq(nil) - end - end - describe "#updated_on" do - it do - expect(subject.updated_on).to eq(nil) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to eq(nil) - end - end - describe "#registrar" do - it do - expect(subject.registrar).to eq(nil) - end - end - describe "#registrant_contacts" do - it do - expect(subject.registrant_contacts).to be_a(Array) - expect(subject.registrant_contacts).to eq([]) - end - end - describe "#admin_contacts" do - it do - expect(subject.admin_contacts).to be_a(Array) - expect(subject.admin_contacts).to eq([]) - end - end - describe "#technical_contacts" do - it do - expect(subject.technical_contacts).to be_a(Array) - expect(subject.technical_contacts).to eq([]) - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers).to eq([]) - end + it "matches status_available.expected" do + expect(subject.disclaimer).to eq(nil) + expect(subject.domain).to eq(nil) + expect(subject.domain_id).to eq(nil) + expect(subject.status).to eq([]) + expect(subject.available?).to eq(true) + expect(subject.registered?).to eq(false) + expect(subject.created_on).to eq(nil) + expect(subject.updated_on).to eq(nil) + expect(subject.expires_on).to eq(nil) + expect(subject.registrar).to eq(nil) + expect(subject.registrant_contacts).to be_a(Array) + expect(subject.registrant_contacts).to eq([]) + expect(subject.admin_contacts).to be_a(Array) + expect(subject.admin_contacts).to eq([]) + expect(subject.technical_contacts).to be_a(Array) + expect(subject.technical_contacts).to eq([]) + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers).to eq([]) end end diff --git a/spec/whois/parsers/responses/whois.centralnic.com/kr.com/status_registered_spec.rb b/spec/whois/parsers/responses/whois.centralnic.com/kr.com/status_registered_spec.rb index c2d55e5d..2db4181f 100644 --- a/spec/whois/parsers/responses/whois.centralnic.com/kr.com/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.centralnic.com/kr.com/status_registered_spec.rb @@ -11,156 +11,101 @@ # require 'spec_helper' -require 'whois/parsers/whois.centralnic.com.rb' -describe Whois::Parsers::WhoisCentralnicCom, "status_registered.expected" do +describe "whois.centralnic.com", :aggregate_failures do subject do file = fixture("responses", "whois.centralnic.com/kr.com/status_registered.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.centralnic.com") + Whois::Parser.parser_for(part) end - describe "#disclaimer" do - it do - expect(subject.disclaimer).to eq("This whois service is provided by CentralNic Ltd and only contains information pertaining to Internet domain names we have registered for our customers. By using this service you are agreeing (1) not to use any information presented here for any purpose other than determining ownership of domain names, (2) not to store or reproduce this data in any way, (3) not to use any high-volume, automated, electronic processes to obtain data from this service. Abuse of this service is monitored and actions in contravention of these terms will result in being permanently blacklisted. All data is (c) CentralNic Ltd https://www.centralnic.com/") - end - end - describe "#domain" do - it do - expect(subject.domain).to eq("academyart.kr.com") - end - end - describe "#domain_id" do - it do - expect(subject.domain_id).to eq("CNIC-DO569707") - end - end - describe "#status" do - it do - expect(subject.status).to eq(["clientTransferProhibited", "serverTransferProhibited"]) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(false) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(true) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to be_a(Time) - expect(subject.created_on).to eq(DateTime.parse("2008-06-11 21:25:43 UTC")) - end - end - describe "#updated_on" do - it do - expect(subject.updated_on).to be_a(Time) - expect(subject.updated_on).to eq(DateTime.parse("2012-01-16 16:25:41 UTC")) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to be_a(Time) - expect(subject.expires_on).to eq(DateTime.parse("2014-06-11 23:59:59 UTC")) - end - end - describe "#registrar" do - it do - expect(subject.registrar).to be_a(Whois::Parser::Registrar) - expect(subject.registrar.id).to eq("H292913") - expect(subject.registrar.name).to eq("Network Solutions LLC") - expect(subject.registrar.url).to eq("http://www.networksolutions.com/") - end - end - describe "#registrant_contacts" do - it do - expect(subject.registrant_contacts).to be_a(Array) - expect(subject.registrant_contacts.size).to eq(1) - expect(subject.registrant_contacts[0]).to be_a(Whois::Parser::Contact) - expect(subject.registrant_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_REGISTRANT) - expect(subject.registrant_contacts[0].id).to eq("41619876") - expect(subject.registrant_contacts[0].name).to eq("Academy of Art College") - expect(subject.registrant_contacts[0].organization).to eq("Academy of Art College") - expect(subject.registrant_contacts[0].address).to eq("79 NEW MONTGOMERY ST") - expect(subject.registrant_contacts[0].city).to eq("SAN FRANCISCO") - expect(subject.registrant_contacts[0].zip).to eq("94105") - expect(subject.registrant_contacts[0].state).to eq("CA") - expect(subject.registrant_contacts[0].country).to eq(nil) - expect(subject.registrant_contacts[0].country_code).to eq("US") - expect(subject.registrant_contacts[0].phone).to eq("+1.415618350") - expect(subject.registrant_contacts[0].fax).to eq(nil) - expect(subject.registrant_contacts[0].email).to eq("clefferts@academyart.edu") - end - end - describe "#admin_contacts" do - it do - expect(subject.admin_contacts).to be_a(Array) - expect(subject.admin_contacts.size).to eq(1) - expect(subject.admin_contacts[0]).to be_a(Whois::Parser::Contact) - expect(subject.admin_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_ADMINISTRATIVE) - expect(subject.admin_contacts[0].id).to eq("41619876") - expect(subject.admin_contacts[0].name).to eq("Academy of Art College") - expect(subject.admin_contacts[0].organization).to eq("Academy of Art College") - expect(subject.admin_contacts[0].address).to eq("79 NEW MONTGOMERY ST") - expect(subject.admin_contacts[0].city).to eq("SAN FRANCISCO") - expect(subject.admin_contacts[0].zip).to eq("94105") - expect(subject.admin_contacts[0].state).to eq("CA") - expect(subject.admin_contacts[0].country).to eq(nil) - expect(subject.admin_contacts[0].country_code).to eq("US") - expect(subject.admin_contacts[0].phone).to eq("+1.415618350") - expect(subject.admin_contacts[0].fax).to eq(nil) - expect(subject.admin_contacts[0].email).to eq("clefferts@academyart.edu") - end - end - describe "#technical_contacts" do - it do - expect(subject.technical_contacts).to be_a(Array) - expect(subject.technical_contacts.size).to eq(1) - expect(subject.technical_contacts[0]).to be_a(Whois::Parser::Contact) - expect(subject.technical_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_TECHNICAL) - expect(subject.technical_contacts[0].id).to eq("41619876") - expect(subject.technical_contacts[0].name).to eq("Academy of Art College") - expect(subject.technical_contacts[0].organization).to eq("Academy of Art College") - expect(subject.technical_contacts[0].address).to eq("79 NEW MONTGOMERY ST") - expect(subject.technical_contacts[0].city).to eq("SAN FRANCISCO") - expect(subject.technical_contacts[0].zip).to eq("94105") - expect(subject.technical_contacts[0].state).to eq("CA") - expect(subject.technical_contacts[0].country).to eq(nil) - expect(subject.technical_contacts[0].country_code).to eq("US") - expect(subject.technical_contacts[0].phone).to eq("+1.415618350") - expect(subject.technical_contacts[0].fax).to eq(nil) - expect(subject.technical_contacts[0].email).to eq("clefferts@academyart.edu") - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers.size).to eq(5) - expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[0].name).to eq("ns1.academyart.edu") - expect(subject.nameservers[0].ipv4).to eq(nil) - expect(subject.nameservers[0].ipv6).to eq(nil) - expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[1].name).to eq("dbru.br.ns.els-gms.att.net") - expect(subject.nameservers[1].ipv4).to eq(nil) - expect(subject.nameservers[1].ipv6).to eq(nil) - expect(subject.nameservers[2]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[2].name).to eq("dmtu.mt.ns.els-gms.att.net") - expect(subject.nameservers[2].ipv4).to eq(nil) - expect(subject.nameservers[2].ipv6).to eq(nil) - expect(subject.nameservers[3]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[3].name).to eq("cbru.br.ns.els-gms.att.net") - expect(subject.nameservers[3].ipv4).to eq(nil) - expect(subject.nameservers[3].ipv6).to eq(nil) - expect(subject.nameservers[4]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[4].name).to eq("cmtu.mt.ns.els-gms.att.net") - expect(subject.nameservers[4].ipv4).to eq(nil) - expect(subject.nameservers[4].ipv6).to eq(nil) - end + it "matches status_registered.expected" do + expect(subject.disclaimer).to eq("This whois service is provided by CentralNic Ltd and only contains information pertaining to Internet domain names we have registered for our customers. By using this service you are agreeing (1) not to use any information presented here for any purpose other than determining ownership of domain names, (2) not to store or reproduce this data in any way, (3) not to use any high-volume, automated, electronic processes to obtain data from this service. Abuse of this service is monitored and actions in contravention of these terms will result in being permanently blacklisted. All data is (c) CentralNic Ltd https://www.centralnic.com/") + expect(subject.domain).to eq("academyart.kr.com") + expect(subject.domain_id).to eq("CNIC-DO569707") + expect(subject.status).to eq(["clientTransferProhibited", "serverTransferProhibited"]) + expect(subject.available?).to eq(false) + expect(subject.registered?).to eq(true) + expect(subject.created_on).to be_a(Time) + expect(subject.created_on).to eq(DateTime.parse("2008-06-11 21:25:43 UTC")) + expect(subject.updated_on).to be_a(Time) + expect(subject.updated_on).to eq(DateTime.parse("2012-01-16 16:25:41 UTC")) + expect(subject.expires_on).to be_a(Time) + expect(subject.expires_on).to eq(DateTime.parse("2014-06-11 23:59:59 UTC")) + expect(subject.registrar).to be_a(Whois::Parser::Registrar) + expect(subject.registrar.id).to eq("H292913") + expect(subject.registrar.name).to eq("Network Solutions LLC") + expect(subject.registrar.url).to eq("http://www.networksolutions.com/") + expect(subject.registrant_contacts).to be_a(Array) + expect(subject.registrant_contacts.size).to eq(1) + expect(subject.registrant_contacts[0]).to be_a(Whois::Parser::Contact) + expect(subject.registrant_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_REGISTRANT) + expect(subject.registrant_contacts[0].id).to eq("41619876") + expect(subject.registrant_contacts[0].name).to eq("Academy of Art College") + expect(subject.registrant_contacts[0].organization).to eq("Academy of Art College") + expect(subject.registrant_contacts[0].address).to eq("79 NEW MONTGOMERY ST") + expect(subject.registrant_contacts[0].city).to eq("SAN FRANCISCO") + expect(subject.registrant_contacts[0].zip).to eq("94105") + expect(subject.registrant_contacts[0].state).to eq("CA") + expect(subject.registrant_contacts[0].country).to eq(nil) + expect(subject.registrant_contacts[0].country_code).to eq("US") + expect(subject.registrant_contacts[0].phone).to eq("+1.415618350") + expect(subject.registrant_contacts[0].fax).to eq(nil) + expect(subject.registrant_contacts[0].email).to eq("clefferts@academyart.edu") + expect(subject.admin_contacts).to be_a(Array) + expect(subject.admin_contacts.size).to eq(1) + expect(subject.admin_contacts[0]).to be_a(Whois::Parser::Contact) + expect(subject.admin_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_ADMINISTRATIVE) + expect(subject.admin_contacts[0].id).to eq("41619876") + expect(subject.admin_contacts[0].name).to eq("Academy of Art College") + expect(subject.admin_contacts[0].organization).to eq("Academy of Art College") + expect(subject.admin_contacts[0].address).to eq("79 NEW MONTGOMERY ST") + expect(subject.admin_contacts[0].city).to eq("SAN FRANCISCO") + expect(subject.admin_contacts[0].zip).to eq("94105") + expect(subject.admin_contacts[0].state).to eq("CA") + expect(subject.admin_contacts[0].country).to eq(nil) + expect(subject.admin_contacts[0].country_code).to eq("US") + expect(subject.admin_contacts[0].phone).to eq("+1.415618350") + expect(subject.admin_contacts[0].fax).to eq(nil) + expect(subject.admin_contacts[0].email).to eq("clefferts@academyart.edu") + expect(subject.technical_contacts).to be_a(Array) + expect(subject.technical_contacts.size).to eq(1) + expect(subject.technical_contacts[0]).to be_a(Whois::Parser::Contact) + expect(subject.technical_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_TECHNICAL) + expect(subject.technical_contacts[0].id).to eq("41619876") + expect(subject.technical_contacts[0].name).to eq("Academy of Art College") + expect(subject.technical_contacts[0].organization).to eq("Academy of Art College") + expect(subject.technical_contacts[0].address).to eq("79 NEW MONTGOMERY ST") + expect(subject.technical_contacts[0].city).to eq("SAN FRANCISCO") + expect(subject.technical_contacts[0].zip).to eq("94105") + expect(subject.technical_contacts[0].state).to eq("CA") + expect(subject.technical_contacts[0].country).to eq(nil) + expect(subject.technical_contacts[0].country_code).to eq("US") + expect(subject.technical_contacts[0].phone).to eq("+1.415618350") + expect(subject.technical_contacts[0].fax).to eq(nil) + expect(subject.technical_contacts[0].email).to eq("clefferts@academyart.edu") + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers.size).to eq(5) + expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[0].name).to eq("ns1.academyart.edu") + expect(subject.nameservers[0].ipv4).to eq(nil) + expect(subject.nameservers[0].ipv6).to eq(nil) + expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[1].name).to eq("dbru.br.ns.els-gms.att.net") + expect(subject.nameservers[1].ipv4).to eq(nil) + expect(subject.nameservers[1].ipv6).to eq(nil) + expect(subject.nameservers[2]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[2].name).to eq("dmtu.mt.ns.els-gms.att.net") + expect(subject.nameservers[2].ipv4).to eq(nil) + expect(subject.nameservers[2].ipv6).to eq(nil) + expect(subject.nameservers[3]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[3].name).to eq("cbru.br.ns.els-gms.att.net") + expect(subject.nameservers[3].ipv4).to eq(nil) + expect(subject.nameservers[3].ipv6).to eq(nil) + expect(subject.nameservers[4]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[4].name).to eq("cmtu.mt.ns.els-gms.att.net") + expect(subject.nameservers[4].ipv4).to eq(nil) + expect(subject.nameservers[4].ipv6).to eq(nil) end end diff --git a/spec/whois/parsers/responses/whois.centralnic.com/no.com/status_available_spec.rb b/spec/whois/parsers/responses/whois.centralnic.com/no.com/status_available_spec.rb index 9af66228..f9db5ab4 100644 --- a/spec/whois/parsers/responses/whois.centralnic.com/no.com/status_available_spec.rb +++ b/spec/whois/parsers/responses/whois.centralnic.com/no.com/status_available_spec.rb @@ -11,88 +11,33 @@ # require 'spec_helper' -require 'whois/parsers/whois.centralnic.com.rb' -describe Whois::Parsers::WhoisCentralnicCom, "status_available.expected" do +describe "whois.centralnic.com", :aggregate_failures do subject do file = fixture("responses", "whois.centralnic.com/no.com/status_available.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.centralnic.com") + Whois::Parser.parser_for(part) end - describe "#disclaimer" do - it do - expect(subject.disclaimer).to eq(nil) - end - end - describe "#domain" do - it do - expect(subject.domain).to eq(nil) - end - end - describe "#domain_id" do - it do - expect(subject.domain_id).to eq(nil) - end - end - describe "#status" do - it do - expect(subject.status).to eq([]) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(true) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(false) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to eq(nil) - end - end - describe "#updated_on" do - it do - expect(subject.updated_on).to eq(nil) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to eq(nil) - end - end - describe "#registrar" do - it do - expect(subject.registrar).to eq(nil) - end - end - describe "#registrant_contacts" do - it do - expect(subject.registrant_contacts).to be_a(Array) - expect(subject.registrant_contacts).to eq([]) - end - end - describe "#admin_contacts" do - it do - expect(subject.admin_contacts).to be_a(Array) - expect(subject.admin_contacts).to eq([]) - end - end - describe "#technical_contacts" do - it do - expect(subject.technical_contacts).to be_a(Array) - expect(subject.technical_contacts).to eq([]) - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers).to eq([]) - end + it "matches status_available.expected" do + expect(subject.disclaimer).to eq(nil) + expect(subject.domain).to eq(nil) + expect(subject.domain_id).to eq(nil) + expect(subject.status).to eq([]) + expect(subject.available?).to eq(true) + expect(subject.registered?).to eq(false) + expect(subject.created_on).to eq(nil) + expect(subject.updated_on).to eq(nil) + expect(subject.expires_on).to eq(nil) + expect(subject.registrar).to eq(nil) + expect(subject.registrant_contacts).to be_a(Array) + expect(subject.registrant_contacts).to eq([]) + expect(subject.admin_contacts).to be_a(Array) + expect(subject.admin_contacts).to eq([]) + expect(subject.technical_contacts).to be_a(Array) + expect(subject.technical_contacts).to eq([]) + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers).to eq([]) end end diff --git a/spec/whois/parsers/responses/whois.centralnic.com/qc.com/status_available_spec.rb b/spec/whois/parsers/responses/whois.centralnic.com/qc.com/status_available_spec.rb index 3e4bc27a..673a1d96 100644 --- a/spec/whois/parsers/responses/whois.centralnic.com/qc.com/status_available_spec.rb +++ b/spec/whois/parsers/responses/whois.centralnic.com/qc.com/status_available_spec.rb @@ -11,88 +11,33 @@ # require 'spec_helper' -require 'whois/parsers/whois.centralnic.com.rb' -describe Whois::Parsers::WhoisCentralnicCom, "status_available.expected" do +describe "whois.centralnic.com", :aggregate_failures do subject do file = fixture("responses", "whois.centralnic.com/qc.com/status_available.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.centralnic.com") + Whois::Parser.parser_for(part) end - describe "#disclaimer" do - it do - expect(subject.disclaimer).to eq(nil) - end - end - describe "#domain" do - it do - expect(subject.domain).to eq(nil) - end - end - describe "#domain_id" do - it do - expect(subject.domain_id).to eq(nil) - end - end - describe "#status" do - it do - expect(subject.status).to eq([]) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(true) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(false) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to eq(nil) - end - end - describe "#updated_on" do - it do - expect(subject.updated_on).to eq(nil) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to eq(nil) - end - end - describe "#registrar" do - it do - expect(subject.registrar).to eq(nil) - end - end - describe "#registrant_contacts" do - it do - expect(subject.registrant_contacts).to be_a(Array) - expect(subject.registrant_contacts).to eq([]) - end - end - describe "#admin_contacts" do - it do - expect(subject.admin_contacts).to be_a(Array) - expect(subject.admin_contacts).to eq([]) - end - end - describe "#technical_contacts" do - it do - expect(subject.technical_contacts).to be_a(Array) - expect(subject.technical_contacts).to eq([]) - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers).to eq([]) - end + it "matches status_available.expected" do + expect(subject.disclaimer).to eq(nil) + expect(subject.domain).to eq(nil) + expect(subject.domain_id).to eq(nil) + expect(subject.status).to eq([]) + expect(subject.available?).to eq(true) + expect(subject.registered?).to eq(false) + expect(subject.created_on).to eq(nil) + expect(subject.updated_on).to eq(nil) + expect(subject.expires_on).to eq(nil) + expect(subject.registrar).to eq(nil) + expect(subject.registrant_contacts).to be_a(Array) + expect(subject.registrant_contacts).to eq([]) + expect(subject.admin_contacts).to be_a(Array) + expect(subject.admin_contacts).to eq([]) + expect(subject.technical_contacts).to be_a(Array) + expect(subject.technical_contacts).to eq([]) + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers).to eq([]) end end diff --git a/spec/whois/parsers/responses/whois.centralnic.com/qc.com/status_registered_spec.rb b/spec/whois/parsers/responses/whois.centralnic.com/qc.com/status_registered_spec.rb index 7fd3e1cc..ce48c8cd 100644 --- a/spec/whois/parsers/responses/whois.centralnic.com/qc.com/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.centralnic.com/qc.com/status_registered_spec.rb @@ -11,144 +11,89 @@ # require 'spec_helper' -require 'whois/parsers/whois.centralnic.com.rb' -describe Whois::Parsers::WhoisCentralnicCom, "status_registered.expected" do +describe "whois.centralnic.com", :aggregate_failures do subject do file = fixture("responses", "whois.centralnic.com/qc.com/status_registered.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.centralnic.com") + Whois::Parser.parser_for(part) end - describe "#disclaimer" do - it do - expect(subject.disclaimer).to eq("This whois service is provided by CentralNic Ltd and only contains information pertaining to Internet domain names we have registered for our customers. By using this service you are agreeing (1) not to use any information presented here for any purpose other than determining ownership of domain names, (2) not to store or reproduce this data in any way, (3) not to use any high-volume, automated, electronic processes to obtain data from this service. Abuse of this service is monitored and actions in contravention of these terms will result in being permanently blacklisted. All data is (c) CentralNic Ltd https://www.centralnic.com/") - end - end - describe "#domain" do - it do - expect(subject.domain).to eq("ceo.qc.com") - end - end - describe "#domain_id" do - it do - expect(subject.domain_id).to eq("CNIC-DO327026") - end - end - describe "#status" do - it do - expect(subject.status).to eq(["ok"]) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(false) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(true) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to be_a(Time) - expect(subject.created_on).to eq(DateTime.parse("2004-10-08 02:12:49 UTC")) - end - end - describe "#updated_on" do - it do - expect(subject.updated_on).to be_a(Time) - expect(subject.updated_on).to eq(DateTime.parse("2012-11-23 18:03:55 UTC")) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to be_a(Time) - expect(subject.expires_on).to eq(DateTime.parse("2014-10-08 23:59:59 UTC")) - end - end - describe "#registrar" do - it do - expect(subject.registrar).to be_a(Whois::Parser::Registrar) - expect(subject.registrar.id).to eq("7065-EN") - expect(subject.registrar.name).to eq("eNom, Inc.") - expect(subject.registrar.url).to eq("http://www.enom.com/") - end - end - describe "#registrant_contacts" do - it do - expect(subject.registrant_contacts).to be_a(Array) - expect(subject.registrant_contacts.size).to eq(1) - expect(subject.registrant_contacts[0]).to be_a(Whois::Parser::Contact) - expect(subject.registrant_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_REGISTRANT) - expect(subject.registrant_contacts[0].id).to eq("H1062277") - expect(subject.registrant_contacts[0].name).to eq("helene") - expect(subject.registrant_contacts[0].organization).to eq(nil) - expect(subject.registrant_contacts[0].address).to eq("309 Laurendeau, Magog Qc") - expect(subject.registrant_contacts[0].city).to eq(nil) - expect(subject.registrant_contacts[0].zip).to eq("J1X 3W4") - expect(subject.registrant_contacts[0].state).to eq(nil) - expect(subject.registrant_contacts[0].country).to eq(nil) - expect(subject.registrant_contacts[0].country_code).to eq("CA") - expect(subject.registrant_contacts[0].phone).to eq("+1.8198438380") - expect(subject.registrant_contacts[0].fax).to eq(nil) - expect(subject.registrant_contacts[0].email).to eq("docjgs@videotron.ca") - end - end - describe "#admin_contacts" do - it do - expect(subject.admin_contacts).to be_a(Array) - expect(subject.admin_contacts.size).to eq(1) - expect(subject.admin_contacts[0]).to be_a(Whois::Parser::Contact) - expect(subject.admin_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_ADMINISTRATIVE) - expect(subject.admin_contacts[0].id).to eq("H114589") - expect(subject.admin_contacts[0].name).to eq("helene viens") - expect(subject.admin_contacts[0].organization).to eq(nil) - expect(subject.admin_contacts[0].address).to eq("309 Laurendeau, Magog Qc") - expect(subject.admin_contacts[0].city).to eq(nil) - expect(subject.admin_contacts[0].zip).to eq("J1X 3W4") - expect(subject.admin_contacts[0].state).to eq(nil) - expect(subject.admin_contacts[0].country).to eq(nil) - expect(subject.admin_contacts[0].country_code).to eq("CA") - expect(subject.admin_contacts[0].phone).to eq("+1.8198438380") - expect(subject.admin_contacts[0].fax).to eq(nil) - expect(subject.admin_contacts[0].email).to eq("docjgs@videotron.ca") - end - end - describe "#technical_contacts" do - it do - expect(subject.technical_contacts).to be_a(Array) - expect(subject.technical_contacts.size).to eq(1) - expect(subject.technical_contacts[0]).to be_a(Whois::Parser::Contact) - expect(subject.technical_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_TECHNICAL) - expect(subject.technical_contacts[0].id).to eq("H114590") - expect(subject.technical_contacts[0].name).to eq("helene viens") - expect(subject.technical_contacts[0].organization).to eq(nil) - expect(subject.technical_contacts[0].address).to eq("309 Laurendeau, Magog Qc") - expect(subject.technical_contacts[0].city).to eq(nil) - expect(subject.technical_contacts[0].zip).to eq("J1X 3W4") - expect(subject.technical_contacts[0].state).to eq(nil) - expect(subject.technical_contacts[0].country).to eq(nil) - expect(subject.technical_contacts[0].country_code).to eq("CA") - expect(subject.technical_contacts[0].phone).to eq("+1.8198438380") - expect(subject.technical_contacts[0].fax).to eq(nil) - expect(subject.technical_contacts[0].email).to eq("docjgs@videotron.ca") - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers.size).to eq(2) - expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[0].name).to eq("ns12.zoneedit.com") - expect(subject.nameservers[0].ipv4).to eq(nil) - expect(subject.nameservers[0].ipv6).to eq(nil) - expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[1].name).to eq("t1.zoneedit.com") - expect(subject.nameservers[1].ipv4).to eq(nil) - expect(subject.nameservers[1].ipv6).to eq(nil) - end + it "matches status_registered.expected" do + expect(subject.disclaimer).to eq("This whois service is provided by CentralNic Ltd and only contains information pertaining to Internet domain names we have registered for our customers. By using this service you are agreeing (1) not to use any information presented here for any purpose other than determining ownership of domain names, (2) not to store or reproduce this data in any way, (3) not to use any high-volume, automated, electronic processes to obtain data from this service. Abuse of this service is monitored and actions in contravention of these terms will result in being permanently blacklisted. All data is (c) CentralNic Ltd https://www.centralnic.com/") + expect(subject.domain).to eq("ceo.qc.com") + expect(subject.domain_id).to eq("CNIC-DO327026") + expect(subject.status).to eq(["ok"]) + expect(subject.available?).to eq(false) + expect(subject.registered?).to eq(true) + expect(subject.created_on).to be_a(Time) + expect(subject.created_on).to eq(DateTime.parse("2004-10-08 02:12:49 UTC")) + expect(subject.updated_on).to be_a(Time) + expect(subject.updated_on).to eq(DateTime.parse("2012-11-23 18:03:55 UTC")) + expect(subject.expires_on).to be_a(Time) + expect(subject.expires_on).to eq(DateTime.parse("2014-10-08 23:59:59 UTC")) + expect(subject.registrar).to be_a(Whois::Parser::Registrar) + expect(subject.registrar.id).to eq("7065-EN") + expect(subject.registrar.name).to eq("eNom, Inc.") + expect(subject.registrar.url).to eq("http://www.enom.com/") + expect(subject.registrant_contacts).to be_a(Array) + expect(subject.registrant_contacts.size).to eq(1) + expect(subject.registrant_contacts[0]).to be_a(Whois::Parser::Contact) + expect(subject.registrant_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_REGISTRANT) + expect(subject.registrant_contacts[0].id).to eq("H1062277") + expect(subject.registrant_contacts[0].name).to eq("helene") + expect(subject.registrant_contacts[0].organization).to eq(nil) + expect(subject.registrant_contacts[0].address).to eq("309 Laurendeau, Magog Qc") + expect(subject.registrant_contacts[0].city).to eq(nil) + expect(subject.registrant_contacts[0].zip).to eq("J1X 3W4") + expect(subject.registrant_contacts[0].state).to eq(nil) + expect(subject.registrant_contacts[0].country).to eq(nil) + expect(subject.registrant_contacts[0].country_code).to eq("CA") + expect(subject.registrant_contacts[0].phone).to eq("+1.8198438380") + expect(subject.registrant_contacts[0].fax).to eq(nil) + expect(subject.registrant_contacts[0].email).to eq("docjgs@videotron.ca") + expect(subject.admin_contacts).to be_a(Array) + expect(subject.admin_contacts.size).to eq(1) + expect(subject.admin_contacts[0]).to be_a(Whois::Parser::Contact) + expect(subject.admin_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_ADMINISTRATIVE) + expect(subject.admin_contacts[0].id).to eq("H114589") + expect(subject.admin_contacts[0].name).to eq("helene viens") + expect(subject.admin_contacts[0].organization).to eq(nil) + expect(subject.admin_contacts[0].address).to eq("309 Laurendeau, Magog Qc") + expect(subject.admin_contacts[0].city).to eq(nil) + expect(subject.admin_contacts[0].zip).to eq("J1X 3W4") + expect(subject.admin_contacts[0].state).to eq(nil) + expect(subject.admin_contacts[0].country).to eq(nil) + expect(subject.admin_contacts[0].country_code).to eq("CA") + expect(subject.admin_contacts[0].phone).to eq("+1.8198438380") + expect(subject.admin_contacts[0].fax).to eq(nil) + expect(subject.admin_contacts[0].email).to eq("docjgs@videotron.ca") + expect(subject.technical_contacts).to be_a(Array) + expect(subject.technical_contacts.size).to eq(1) + expect(subject.technical_contacts[0]).to be_a(Whois::Parser::Contact) + expect(subject.technical_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_TECHNICAL) + expect(subject.technical_contacts[0].id).to eq("H114590") + expect(subject.technical_contacts[0].name).to eq("helene viens") + expect(subject.technical_contacts[0].organization).to eq(nil) + expect(subject.technical_contacts[0].address).to eq("309 Laurendeau, Magog Qc") + expect(subject.technical_contacts[0].city).to eq(nil) + expect(subject.technical_contacts[0].zip).to eq("J1X 3W4") + expect(subject.technical_contacts[0].state).to eq(nil) + expect(subject.technical_contacts[0].country).to eq(nil) + expect(subject.technical_contacts[0].country_code).to eq("CA") + expect(subject.technical_contacts[0].phone).to eq("+1.8198438380") + expect(subject.technical_contacts[0].fax).to eq(nil) + expect(subject.technical_contacts[0].email).to eq("docjgs@videotron.ca") + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers.size).to eq(2) + expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[0].name).to eq("ns12.zoneedit.com") + expect(subject.nameservers[0].ipv4).to eq(nil) + expect(subject.nameservers[0].ipv6).to eq(nil) + expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[1].name).to eq("t1.zoneedit.com") + expect(subject.nameservers[1].ipv4).to eq(nil) + expect(subject.nameservers[1].ipv6).to eq(nil) end end diff --git a/spec/whois/parsers/responses/whois.centralnic.com/ru.com/status_available_spec.rb b/spec/whois/parsers/responses/whois.centralnic.com/ru.com/status_available_spec.rb index aa5be38d..892ef8dd 100644 --- a/spec/whois/parsers/responses/whois.centralnic.com/ru.com/status_available_spec.rb +++ b/spec/whois/parsers/responses/whois.centralnic.com/ru.com/status_available_spec.rb @@ -11,88 +11,33 @@ # require 'spec_helper' -require 'whois/parsers/whois.centralnic.com.rb' -describe Whois::Parsers::WhoisCentralnicCom, "status_available.expected" do +describe "whois.centralnic.com", :aggregate_failures do subject do file = fixture("responses", "whois.centralnic.com/ru.com/status_available.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.centralnic.com") + Whois::Parser.parser_for(part) end - describe "#disclaimer" do - it do - expect(subject.disclaimer).to eq(nil) - end - end - describe "#domain" do - it do - expect(subject.domain).to eq(nil) - end - end - describe "#domain_id" do - it do - expect(subject.domain_id).to eq(nil) - end - end - describe "#status" do - it do - expect(subject.status).to eq([]) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(true) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(false) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to eq(nil) - end - end - describe "#updated_on" do - it do - expect(subject.updated_on).to eq(nil) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to eq(nil) - end - end - describe "#registrar" do - it do - expect(subject.registrar).to eq(nil) - end - end - describe "#registrant_contacts" do - it do - expect(subject.registrant_contacts).to be_a(Array) - expect(subject.registrant_contacts).to eq([]) - end - end - describe "#admin_contacts" do - it do - expect(subject.admin_contacts).to be_a(Array) - expect(subject.admin_contacts).to eq([]) - end - end - describe "#technical_contacts" do - it do - expect(subject.technical_contacts).to be_a(Array) - expect(subject.technical_contacts).to eq([]) - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers).to eq([]) - end + it "matches status_available.expected" do + expect(subject.disclaimer).to eq(nil) + expect(subject.domain).to eq(nil) + expect(subject.domain_id).to eq(nil) + expect(subject.status).to eq([]) + expect(subject.available?).to eq(true) + expect(subject.registered?).to eq(false) + expect(subject.created_on).to eq(nil) + expect(subject.updated_on).to eq(nil) + expect(subject.expires_on).to eq(nil) + expect(subject.registrar).to eq(nil) + expect(subject.registrant_contacts).to be_a(Array) + expect(subject.registrant_contacts).to eq([]) + expect(subject.admin_contacts).to be_a(Array) + expect(subject.admin_contacts).to eq([]) + expect(subject.technical_contacts).to be_a(Array) + expect(subject.technical_contacts).to eq([]) + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers).to eq([]) end end diff --git a/spec/whois/parsers/responses/whois.centralnic.com/ru.com/status_registered_spec.rb b/spec/whois/parsers/responses/whois.centralnic.com/ru.com/status_registered_spec.rb index 8ff9d1bc..835d376f 100644 --- a/spec/whois/parsers/responses/whois.centralnic.com/ru.com/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.centralnic.com/ru.com/status_registered_spec.rb @@ -11,137 +11,82 @@ # require 'spec_helper' -require 'whois/parsers/whois.centralnic.com.rb' -describe Whois::Parsers::WhoisCentralnicCom, "status_registered.expected" do +describe "whois.centralnic.com", :aggregate_failures do subject do file = fixture("responses", "whois.centralnic.com/ru.com/status_registered.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.centralnic.com") + Whois::Parser.parser_for(part) end - describe "#disclaimer" do - it do - expect(subject.disclaimer).to eq("This whois service is provided by CentralNic Ltd and only contains information pertaining to Internet domain names we have registered for our customers. By using this service you are agreeing (1) not to use any information presented here for any purpose other than determining ownership of domain names, (2) not to store or reproduce this data in any way, (3) not to use any high-volume, automated, electronic processes to obtain data from this service. Abuse of this service is monitored and actions in contravention of these terms will result in being permanently blacklisted. All data is (c) CentralNic Ltd https://www.centralnic.com/") - end - end - describe "#domain" do - it do - expect(subject.domain).to eq("srk.ru.com") - end - end - describe "#domain_id" do - it do - expect(subject.domain_id).to eq("CNIC-DO450826") - end - end - describe "#status" do - it do - expect(subject.status).to eq(["ok"]) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(false) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(true) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to be_a(Time) - expect(subject.created_on).to eq(DateTime.parse("2006-07-31 10:06:04 UTC")) - end - end - describe "#updated_on" do - it do - expect(subject.updated_on).to be_a(Time) - expect(subject.updated_on).to eq(DateTime.parse("2012-07-10 08:16:19 UTC")) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to be_a(Time) - expect(subject.expires_on).to eq(DateTime.parse("2014-07-31 23:59:59 UTC")) - end - end - describe "#registrar" do - it do - expect(subject.registrar).to eq(nil) - end - end - describe "#registrant_contacts" do - it do - expect(subject.registrant_contacts).to be_a(Array) - expect(subject.registrant_contacts.size).to eq(1) - expect(subject.registrant_contacts[0]).to be_a(Whois::Parser::Contact) - expect(subject.registrant_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_REGISTRANT) - expect(subject.registrant_contacts[0].id).to eq("H1037013") - expect(subject.registrant_contacts[0].name).to eq("Anthony Lloyd, SRK Consulting (UK) Limited") - expect(subject.registrant_contacts[0].organization).to eq(nil) - expect(subject.registrant_contacts[0].address).to eq("5th Floor\nChurchill House\n17 Churchill Way") - expect(subject.registrant_contacts[0].city).to eq("Cardiff") - expect(subject.registrant_contacts[0].zip).to eq("CF10 2HH") - expect(subject.registrant_contacts[0].state).to eq(nil) - expect(subject.registrant_contacts[0].country).to eq(nil) - expect(subject.registrant_contacts[0].country_code).to eq("GB") - expect(subject.registrant_contacts[0].phone).to eq("+44.2920348150") - expect(subject.registrant_contacts[0].fax).to eq(nil) - expect(subject.registrant_contacts[0].email).to eq("alloyd@srk.co.uk") - end - end - describe "#admin_contacts" do - it do - expect(subject.admin_contacts).to be_a(Array) - expect(subject.admin_contacts.size).to eq(1) - expect(subject.admin_contacts[0]).to be_a(Whois::Parser::Contact) - expect(subject.admin_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_ADMINISTRATIVE) - expect(subject.admin_contacts[0].id).to eq("H265405") - expect(subject.admin_contacts[0].name).to eq("Anthony Lloyd") - expect(subject.admin_contacts[0].organization).to eq("SRK Consulting (UK) Limited") - expect(subject.admin_contacts[0].address).to eq("5th Floor\nChurchill House\n17 Churchill Way") - expect(subject.admin_contacts[0].city).to eq("Cardiff") - expect(subject.admin_contacts[0].zip).to eq("CF10 2HH") - expect(subject.admin_contacts[0].state).to eq(nil) - expect(subject.admin_contacts[0].country).to eq(nil) - expect(subject.admin_contacts[0].country_code).to eq("GB") - expect(subject.admin_contacts[0].phone).to eq("+44.2920348150") - expect(subject.admin_contacts[0].fax).to eq(nil) - expect(subject.admin_contacts[0].email).to eq("alloyd@srk.co.uk") - end - end - describe "#technical_contacts" do - it do - expect(subject.technical_contacts).to be_a(Array) - expect(subject.technical_contacts.size).to eq(1) - expect(subject.technical_contacts[0]).to be_a(Whois::Parser::Contact) - expect(subject.technical_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_TECHNICAL) - expect(subject.technical_contacts[0].id).to eq("H265405") - expect(subject.technical_contacts[0].name).to eq("Anthony Lloyd") - expect(subject.technical_contacts[0].organization).to eq("SRK Consulting (UK) Limited") - expect(subject.technical_contacts[0].address).to eq("5th Floor\nChurchill House\n17 Churchill Way") - expect(subject.technical_contacts[0].city).to eq("Cardiff") - expect(subject.technical_contacts[0].zip).to eq("CF10 2HH") - expect(subject.technical_contacts[0].state).to eq(nil) - expect(subject.technical_contacts[0].country).to eq(nil) - expect(subject.technical_contacts[0].country_code).to eq("GB") - expect(subject.technical_contacts[0].phone).to eq("+44.2920348150") - expect(subject.technical_contacts[0].fax).to eq(nil) - expect(subject.technical_contacts[0].email).to eq("alloyd@srk.co.uk") - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers.size).to eq(2) - expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[0].name).to eq("ns7.zoneedit.com") - expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[1].name).to eq("ns12.zoneedit.com") - end + it "matches status_registered.expected" do + expect(subject.disclaimer).to eq("This whois service is provided by CentralNic Ltd and only contains information pertaining to Internet domain names we have registered for our customers. By using this service you are agreeing (1) not to use any information presented here for any purpose other than determining ownership of domain names, (2) not to store or reproduce this data in any way, (3) not to use any high-volume, automated, electronic processes to obtain data from this service. Abuse of this service is monitored and actions in contravention of these terms will result in being permanently blacklisted. All data is (c) CentralNic Ltd https://www.centralnic.com/") + expect(subject.domain).to eq("srk.ru.com") + expect(subject.domain_id).to eq("CNIC-DO450826") + expect(subject.status).to eq(["ok"]) + expect(subject.available?).to eq(false) + expect(subject.registered?).to eq(true) + expect(subject.created_on).to be_a(Time) + expect(subject.created_on).to eq(DateTime.parse("2006-07-31 10:06:04 UTC")) + expect(subject.updated_on).to be_a(Time) + expect(subject.updated_on).to eq(DateTime.parse("2012-07-10 08:16:19 UTC")) + expect(subject.expires_on).to be_a(Time) + expect(subject.expires_on).to eq(DateTime.parse("2014-07-31 23:59:59 UTC")) + expect(subject.registrar).to eq(nil) + expect(subject.registrant_contacts).to be_a(Array) + expect(subject.registrant_contacts.size).to eq(1) + expect(subject.registrant_contacts[0]).to be_a(Whois::Parser::Contact) + expect(subject.registrant_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_REGISTRANT) + expect(subject.registrant_contacts[0].id).to eq("H1037013") + expect(subject.registrant_contacts[0].name).to eq("Anthony Lloyd, SRK Consulting (UK) Limited") + expect(subject.registrant_contacts[0].organization).to eq(nil) + expect(subject.registrant_contacts[0].address).to eq("5th Floor\nChurchill House\n17 Churchill Way") + expect(subject.registrant_contacts[0].city).to eq("Cardiff") + expect(subject.registrant_contacts[0].zip).to eq("CF10 2HH") + expect(subject.registrant_contacts[0].state).to eq(nil) + expect(subject.registrant_contacts[0].country).to eq(nil) + expect(subject.registrant_contacts[0].country_code).to eq("GB") + expect(subject.registrant_contacts[0].phone).to eq("+44.2920348150") + expect(subject.registrant_contacts[0].fax).to eq(nil) + expect(subject.registrant_contacts[0].email).to eq("alloyd@srk.co.uk") + expect(subject.admin_contacts).to be_a(Array) + expect(subject.admin_contacts.size).to eq(1) + expect(subject.admin_contacts[0]).to be_a(Whois::Parser::Contact) + expect(subject.admin_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_ADMINISTRATIVE) + expect(subject.admin_contacts[0].id).to eq("H265405") + expect(subject.admin_contacts[0].name).to eq("Anthony Lloyd") + expect(subject.admin_contacts[0].organization).to eq("SRK Consulting (UK) Limited") + expect(subject.admin_contacts[0].address).to eq("5th Floor\nChurchill House\n17 Churchill Way") + expect(subject.admin_contacts[0].city).to eq("Cardiff") + expect(subject.admin_contacts[0].zip).to eq("CF10 2HH") + expect(subject.admin_contacts[0].state).to eq(nil) + expect(subject.admin_contacts[0].country).to eq(nil) + expect(subject.admin_contacts[0].country_code).to eq("GB") + expect(subject.admin_contacts[0].phone).to eq("+44.2920348150") + expect(subject.admin_contacts[0].fax).to eq(nil) + expect(subject.admin_contacts[0].email).to eq("alloyd@srk.co.uk") + expect(subject.technical_contacts).to be_a(Array) + expect(subject.technical_contacts.size).to eq(1) + expect(subject.technical_contacts[0]).to be_a(Whois::Parser::Contact) + expect(subject.technical_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_TECHNICAL) + expect(subject.technical_contacts[0].id).to eq("H265405") + expect(subject.technical_contacts[0].name).to eq("Anthony Lloyd") + expect(subject.technical_contacts[0].organization).to eq("SRK Consulting (UK) Limited") + expect(subject.technical_contacts[0].address).to eq("5th Floor\nChurchill House\n17 Churchill Way") + expect(subject.technical_contacts[0].city).to eq("Cardiff") + expect(subject.technical_contacts[0].zip).to eq("CF10 2HH") + expect(subject.technical_contacts[0].state).to eq(nil) + expect(subject.technical_contacts[0].country).to eq(nil) + expect(subject.technical_contacts[0].country_code).to eq("GB") + expect(subject.technical_contacts[0].phone).to eq("+44.2920348150") + expect(subject.technical_contacts[0].fax).to eq(nil) + expect(subject.technical_contacts[0].email).to eq("alloyd@srk.co.uk") + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers.size).to eq(2) + expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[0].name).to eq("ns7.zoneedit.com") + expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[1].name).to eq("ns12.zoneedit.com") end end diff --git a/spec/whois/parsers/responses/whois.centralnic.com/sa.com/status_available_spec.rb b/spec/whois/parsers/responses/whois.centralnic.com/sa.com/status_available_spec.rb index 1cef2d1d..fe0f0946 100644 --- a/spec/whois/parsers/responses/whois.centralnic.com/sa.com/status_available_spec.rb +++ b/spec/whois/parsers/responses/whois.centralnic.com/sa.com/status_available_spec.rb @@ -11,88 +11,33 @@ # require 'spec_helper' -require 'whois/parsers/whois.centralnic.com.rb' -describe Whois::Parsers::WhoisCentralnicCom, "status_available.expected" do +describe "whois.centralnic.com", :aggregate_failures do subject do file = fixture("responses", "whois.centralnic.com/sa.com/status_available.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.centralnic.com") + Whois::Parser.parser_for(part) end - describe "#disclaimer" do - it do - expect(subject.disclaimer).to eq(nil) - end - end - describe "#domain" do - it do - expect(subject.domain).to eq(nil) - end - end - describe "#domain_id" do - it do - expect(subject.domain_id).to eq(nil) - end - end - describe "#status" do - it do - expect(subject.status).to eq([]) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(true) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(false) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to eq(nil) - end - end - describe "#updated_on" do - it do - expect(subject.updated_on).to eq(nil) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to eq(nil) - end - end - describe "#registrar" do - it do - expect(subject.registrar).to eq(nil) - end - end - describe "#registrant_contacts" do - it do - expect(subject.registrant_contacts).to be_a(Array) - expect(subject.registrant_contacts).to eq([]) - end - end - describe "#admin_contacts" do - it do - expect(subject.admin_contacts).to be_a(Array) - expect(subject.admin_contacts).to eq([]) - end - end - describe "#technical_contacts" do - it do - expect(subject.technical_contacts).to be_a(Array) - expect(subject.technical_contacts).to eq([]) - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers).to eq([]) - end + it "matches status_available.expected" do + expect(subject.disclaimer).to eq(nil) + expect(subject.domain).to eq(nil) + expect(subject.domain_id).to eq(nil) + expect(subject.status).to eq([]) + expect(subject.available?).to eq(true) + expect(subject.registered?).to eq(false) + expect(subject.created_on).to eq(nil) + expect(subject.updated_on).to eq(nil) + expect(subject.expires_on).to eq(nil) + expect(subject.registrar).to eq(nil) + expect(subject.registrant_contacts).to be_a(Array) + expect(subject.registrant_contacts).to eq([]) + expect(subject.admin_contacts).to be_a(Array) + expect(subject.admin_contacts).to eq([]) + expect(subject.technical_contacts).to be_a(Array) + expect(subject.technical_contacts).to eq([]) + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers).to eq([]) end end diff --git a/spec/whois/parsers/responses/whois.centralnic.com/sa.com/status_registered_spec.rb b/spec/whois/parsers/responses/whois.centralnic.com/sa.com/status_registered_spec.rb index 4521d60e..bab739a4 100644 --- a/spec/whois/parsers/responses/whois.centralnic.com/sa.com/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.centralnic.com/sa.com/status_registered_spec.rb @@ -11,140 +11,85 @@ # require 'spec_helper' -require 'whois/parsers/whois.centralnic.com.rb' -describe Whois::Parsers::WhoisCentralnicCom, "status_registered.expected" do +describe "whois.centralnic.com", :aggregate_failures do subject do file = fixture("responses", "whois.centralnic.com/sa.com/status_registered.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.centralnic.com") + Whois::Parser.parser_for(part) end - describe "#disclaimer" do - it do - expect(subject.disclaimer).to eq("This whois service is provided by CentralNic Ltd and only contains information pertaining to Internet domain names we have registered for our customers. By using this service you are agreeing (1) not to use any information presented here for any purpose other than determining ownership of domain names, (2) not to store or reproduce this data in any way, (3) not to use any high-volume, automated, electronic processes to obtain data from this service. Abuse of this service is monitored and actions in contravention of these terms will result in being permanently blacklisted. All data is (c) CentralNic Ltd https://www.centralnic.com/") - end - end - describe "#domain" do - it do - expect(subject.domain).to eq("fynbos.sa.com") - end - end - describe "#domain_id" do - it do - expect(subject.domain_id).to eq("CNIC-DO501005") - end - end - describe "#status" do - it do - expect(subject.status).to eq(["ok"]) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(false) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(true) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to be_a(Time) - expect(subject.created_on).to eq(DateTime.parse("2007-09-27 18:14:53 UTC")) - end - end - describe "#updated_on" do - it do - expect(subject.updated_on).to be_a(Time) - expect(subject.updated_on).to eq(DateTime.parse("2013-11-02 13:42:11 UTC")) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to be_a(Time) - expect(subject.expires_on).to eq(DateTime.parse("2014-09-27 23:59:59 UTC")) - end - end - describe "#registrar" do - it do - expect(subject.registrar).to be_a(Whois::Parser::Registrar) - expect(subject.registrar.id).to eq("C30342") - expect(subject.registrar.name).to eq("Paragon Internet Group") - expect(subject.registrar.url).to eq("http://www.paragon.net.uk") - end - end - describe "#registrant_contacts" do - it do - expect(subject.registrant_contacts).to be_a(Array) - expect(subject.registrant_contacts.size).to eq(1) - expect(subject.registrant_contacts[0]).to be_a(Whois::Parser::Contact) - expect(subject.registrant_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_REGISTRANT) - expect(subject.registrant_contacts[0].id).to eq("H323273") - expect(subject.registrant_contacts[0].name).to eq("Maarten Groos") - expect(subject.registrant_contacts[0].organization).to eq(nil) - expect(subject.registrant_contacts[0].address).to eq("farm 215 fynbos reserve\nPO Box 1314") - expect(subject.registrant_contacts[0].city).to eq("Gansbaai") - expect(subject.registrant_contacts[0].zip).to eq("7220") - expect(subject.registrant_contacts[0].state).to eq("Western Cape") - expect(subject.registrant_contacts[0].country).to eq(nil) - expect(subject.registrant_contacts[0].country_code).to eq("ZA") - expect(subject.registrant_contacts[0].phone).to eq("+27.283880920") - expect(subject.registrant_contacts[0].fax).to eq(nil) - expect(subject.registrant_contacts[0].email).to eq("maarten@farm215.co.za") - end - end - describe "#admin_contacts" do - it do - expect(subject.admin_contacts).to be_a(Array) - expect(subject.admin_contacts.size).to eq(1) - expect(subject.admin_contacts[0]).to be_a(Whois::Parser::Contact) - expect(subject.admin_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_ADMINISTRATIVE) - expect(subject.admin_contacts[0].id).to eq("H323273") - expect(subject.admin_contacts[0].name).to eq("Maarten Groos") - expect(subject.admin_contacts[0].organization).to eq(nil) - expect(subject.admin_contacts[0].address).to eq("farm 215 fynbos reserve\nPO Box 1314") - expect(subject.admin_contacts[0].city).to eq("Gansbaai") - expect(subject.admin_contacts[0].zip).to eq("7220") - expect(subject.admin_contacts[0].state).to eq("Western Cape") - expect(subject.admin_contacts[0].country).to eq(nil) - expect(subject.admin_contacts[0].country_code).to eq("ZA") - expect(subject.admin_contacts[0].phone).to eq("+27.283880920") - expect(subject.admin_contacts[0].fax).to eq(nil) - expect(subject.admin_contacts[0].email).to eq("maarten@farm215.co.za") - end - end - describe "#technical_contacts" do - it do - expect(subject.technical_contacts).to be_a(Array) - expect(subject.technical_contacts.size).to eq(1) - expect(subject.technical_contacts[0]).to be_a(Whois::Parser::Contact) - expect(subject.technical_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_TECHNICAL) - expect(subject.technical_contacts[0].id).to eq("C30342") - expect(subject.technical_contacts[0].name).to eq("Seb de Lemos") - expect(subject.technical_contacts[0].organization).to eq("Paragon Internet Group") - expect(subject.technical_contacts[0].address).to eq("St Andrew's House\nSt Mary's Walk") - expect(subject.technical_contacts[0].city).to eq("Maidenhead") - expect(subject.technical_contacts[0].zip).to eq("SL6 1QZ") - expect(subject.technical_contacts[0].state).to eq("Berkshire") - expect(subject.technical_contacts[0].country).to eq(nil) - expect(subject.technical_contacts[0].country_code).to eq("GB") - expect(subject.technical_contacts[0].phone).to eq("+44.2031377651") - expect(subject.technical_contacts[0].fax).to eq(nil) - expect(subject.technical_contacts[0].email).to eq("domains@paragon.net.uk") - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers.size).to eq(2) - expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[0].name).to eq("ns1191.websitewelcome.com") - expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[1].name).to eq("ns1192.websitewelcome.com") - end + it "matches status_registered.expected" do + expect(subject.disclaimer).to eq("This whois service is provided by CentralNic Ltd and only contains information pertaining to Internet domain names we have registered for our customers. By using this service you are agreeing (1) not to use any information presented here for any purpose other than determining ownership of domain names, (2) not to store or reproduce this data in any way, (3) not to use any high-volume, automated, electronic processes to obtain data from this service. Abuse of this service is monitored and actions in contravention of these terms will result in being permanently blacklisted. All data is (c) CentralNic Ltd https://www.centralnic.com/") + expect(subject.domain).to eq("fynbos.sa.com") + expect(subject.domain_id).to eq("CNIC-DO501005") + expect(subject.status).to eq(["ok"]) + expect(subject.available?).to eq(false) + expect(subject.registered?).to eq(true) + expect(subject.created_on).to be_a(Time) + expect(subject.created_on).to eq(DateTime.parse("2007-09-27 18:14:53 UTC")) + expect(subject.updated_on).to be_a(Time) + expect(subject.updated_on).to eq(DateTime.parse("2013-11-02 13:42:11 UTC")) + expect(subject.expires_on).to be_a(Time) + expect(subject.expires_on).to eq(DateTime.parse("2014-09-27 23:59:59 UTC")) + expect(subject.registrar).to be_a(Whois::Parser::Registrar) + expect(subject.registrar.id).to eq("C30342") + expect(subject.registrar.name).to eq("Paragon Internet Group") + expect(subject.registrar.url).to eq("http://www.paragon.net.uk") + expect(subject.registrant_contacts).to be_a(Array) + expect(subject.registrant_contacts.size).to eq(1) + expect(subject.registrant_contacts[0]).to be_a(Whois::Parser::Contact) + expect(subject.registrant_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_REGISTRANT) + expect(subject.registrant_contacts[0].id).to eq("H323273") + expect(subject.registrant_contacts[0].name).to eq("Maarten Groos") + expect(subject.registrant_contacts[0].organization).to eq(nil) + expect(subject.registrant_contacts[0].address).to eq("farm 215 fynbos reserve\nPO Box 1314") + expect(subject.registrant_contacts[0].city).to eq("Gansbaai") + expect(subject.registrant_contacts[0].zip).to eq("7220") + expect(subject.registrant_contacts[0].state).to eq("Western Cape") + expect(subject.registrant_contacts[0].country).to eq(nil) + expect(subject.registrant_contacts[0].country_code).to eq("ZA") + expect(subject.registrant_contacts[0].phone).to eq("+27.283880920") + expect(subject.registrant_contacts[0].fax).to eq(nil) + expect(subject.registrant_contacts[0].email).to eq("maarten@farm215.co.za") + expect(subject.admin_contacts).to be_a(Array) + expect(subject.admin_contacts.size).to eq(1) + expect(subject.admin_contacts[0]).to be_a(Whois::Parser::Contact) + expect(subject.admin_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_ADMINISTRATIVE) + expect(subject.admin_contacts[0].id).to eq("H323273") + expect(subject.admin_contacts[0].name).to eq("Maarten Groos") + expect(subject.admin_contacts[0].organization).to eq(nil) + expect(subject.admin_contacts[0].address).to eq("farm 215 fynbos reserve\nPO Box 1314") + expect(subject.admin_contacts[0].city).to eq("Gansbaai") + expect(subject.admin_contacts[0].zip).to eq("7220") + expect(subject.admin_contacts[0].state).to eq("Western Cape") + expect(subject.admin_contacts[0].country).to eq(nil) + expect(subject.admin_contacts[0].country_code).to eq("ZA") + expect(subject.admin_contacts[0].phone).to eq("+27.283880920") + expect(subject.admin_contacts[0].fax).to eq(nil) + expect(subject.admin_contacts[0].email).to eq("maarten@farm215.co.za") + expect(subject.technical_contacts).to be_a(Array) + expect(subject.technical_contacts.size).to eq(1) + expect(subject.technical_contacts[0]).to be_a(Whois::Parser::Contact) + expect(subject.technical_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_TECHNICAL) + expect(subject.technical_contacts[0].id).to eq("C30342") + expect(subject.technical_contacts[0].name).to eq("Seb de Lemos") + expect(subject.technical_contacts[0].organization).to eq("Paragon Internet Group") + expect(subject.technical_contacts[0].address).to eq("St Andrew's House\nSt Mary's Walk") + expect(subject.technical_contacts[0].city).to eq("Maidenhead") + expect(subject.technical_contacts[0].zip).to eq("SL6 1QZ") + expect(subject.technical_contacts[0].state).to eq("Berkshire") + expect(subject.technical_contacts[0].country).to eq(nil) + expect(subject.technical_contacts[0].country_code).to eq("GB") + expect(subject.technical_contacts[0].phone).to eq("+44.2031377651") + expect(subject.technical_contacts[0].fax).to eq(nil) + expect(subject.technical_contacts[0].email).to eq("domains@paragon.net.uk") + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers.size).to eq(2) + expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[0].name).to eq("ns1191.websitewelcome.com") + expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[1].name).to eq("ns1192.websitewelcome.com") end end diff --git a/spec/whois/parsers/responses/whois.centralnic.com/se.com/status_available_spec.rb b/spec/whois/parsers/responses/whois.centralnic.com/se.com/status_available_spec.rb index 2acb1d3f..b82194c3 100644 --- a/spec/whois/parsers/responses/whois.centralnic.com/se.com/status_available_spec.rb +++ b/spec/whois/parsers/responses/whois.centralnic.com/se.com/status_available_spec.rb @@ -11,88 +11,33 @@ # require 'spec_helper' -require 'whois/parsers/whois.centralnic.com.rb' -describe Whois::Parsers::WhoisCentralnicCom, "status_available.expected" do +describe "whois.centralnic.com", :aggregate_failures do subject do file = fixture("responses", "whois.centralnic.com/se.com/status_available.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.centralnic.com") + Whois::Parser.parser_for(part) end - describe "#disclaimer" do - it do - expect(subject.disclaimer).to eq(nil) - end - end - describe "#domain" do - it do - expect(subject.domain).to eq(nil) - end - end - describe "#domain_id" do - it do - expect(subject.domain_id).to eq(nil) - end - end - describe "#status" do - it do - expect(subject.status).to eq([]) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(true) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(false) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to eq(nil) - end - end - describe "#updated_on" do - it do - expect(subject.updated_on).to eq(nil) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to eq(nil) - end - end - describe "#registrar" do - it do - expect(subject.registrar).to eq(nil) - end - end - describe "#registrant_contacts" do - it do - expect(subject.registrant_contacts).to be_a(Array) - expect(subject.registrant_contacts).to eq([]) - end - end - describe "#admin_contacts" do - it do - expect(subject.admin_contacts).to be_a(Array) - expect(subject.admin_contacts).to eq([]) - end - end - describe "#technical_contacts" do - it do - expect(subject.technical_contacts).to be_a(Array) - expect(subject.technical_contacts).to eq([]) - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers).to eq([]) - end + it "matches status_available.expected" do + expect(subject.disclaimer).to eq(nil) + expect(subject.domain).to eq(nil) + expect(subject.domain_id).to eq(nil) + expect(subject.status).to eq([]) + expect(subject.available?).to eq(true) + expect(subject.registered?).to eq(false) + expect(subject.created_on).to eq(nil) + expect(subject.updated_on).to eq(nil) + expect(subject.expires_on).to eq(nil) + expect(subject.registrar).to eq(nil) + expect(subject.registrant_contacts).to be_a(Array) + expect(subject.registrant_contacts).to eq([]) + expect(subject.admin_contacts).to be_a(Array) + expect(subject.admin_contacts).to eq([]) + expect(subject.technical_contacts).to be_a(Array) + expect(subject.technical_contacts).to eq([]) + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers).to eq([]) end end diff --git a/spec/whois/parsers/responses/whois.centralnic.com/se.com/status_registered_spec.rb b/spec/whois/parsers/responses/whois.centralnic.com/se.com/status_registered_spec.rb index 4d6dc2e4..29f6abeb 100644 --- a/spec/whois/parsers/responses/whois.centralnic.com/se.com/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.centralnic.com/se.com/status_registered_spec.rb @@ -11,148 +11,93 @@ # require 'spec_helper' -require 'whois/parsers/whois.centralnic.com.rb' -describe Whois::Parsers::WhoisCentralnicCom, "status_registered.expected" do +describe "whois.centralnic.com", :aggregate_failures do subject do file = fixture("responses", "whois.centralnic.com/se.com/status_registered.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.centralnic.com") + Whois::Parser.parser_for(part) end - describe "#disclaimer" do - it do - expect(subject.disclaimer).to eq("This whois service is provided by CentralNic Ltd and only contains information pertaining to Internet domain names we have registered for our customers. By using this service you are agreeing (1) not to use any information presented here for any purpose other than determining ownership of domain names, (2) not to store or reproduce this data in any way, (3) not to use any high-volume, automated, electronic processes to obtain data from this service. Abuse of this service is monitored and actions in contravention of these terms will result in being permanently blacklisted. All data is (c) CentralNic Ltd https://www.centralnic.com/") - end - end - describe "#domain" do - it do - expect(subject.domain).to eq("hotel.se.com") - end - end - describe "#domain_id" do - it do - expect(subject.domain_id).to eq("CNIC-DO561053") - end - end - describe "#status" do - it do - expect(subject.status).to eq(["ok"]) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(false) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(true) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to be_a(Time) - expect(subject.created_on).to eq(DateTime.parse("2008-05-10 05:17:32 UTC")) - end - end - describe "#updated_on" do - it do - expect(subject.updated_on).to be_a(Time) - expect(subject.updated_on).to eq(DateTime.parse("2013-06-03 10:33:46 UTC")) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to be_a(Time) - expect(subject.expires_on).to eq(DateTime.parse("2014-05-10 23:59:59 UTC")) - end - end - describe "#registrar" do - it do - expect(subject.registrar).to be_a(Whois::Parser::Registrar) - expect(subject.registrar.id).to eq("7145-IX") - expect(subject.registrar.name).to eq("InternetX GmbH") - expect(subject.registrar.url).to eq("http://www.internetx.de/") - end - end - describe "#registrant_contacts" do - it do - expect(subject.registrant_contacts).to be_a(Array) - expect(subject.registrant_contacts.size).to eq(1) - expect(subject.registrant_contacts[0]).to be_a(Whois::Parser::Contact) - expect(subject.registrant_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_REGISTRANT) - expect(subject.registrant_contacts[0].id).to eq("INX-10599082com") - expect(subject.registrant_contacts[0].name).to eq("Hotel Reservation Service Robert Ragge GmbH") - expect(subject.registrant_contacts[0].organization).to eq("Hotel Reservation Service Robert Ragge GmbH") - expect(subject.registrant_contacts[0].address).to eq("Blaubach 32") - expect(subject.registrant_contacts[0].city).to eq("Koeln") - expect(subject.registrant_contacts[0].zip).to eq("50676") - expect(subject.registrant_contacts[0].state).to eq("NRW") - expect(subject.registrant_contacts[0].country).to eq(nil) - expect(subject.registrant_contacts[0].country_code).to eq("DE") - expect(subject.registrant_contacts[0].phone).to eq("+49.2212077222") - expect(subject.registrant_contacts[0].fax).to eq("+49.2212077394") - expect(subject.registrant_contacts[0].email).to eq("domains@hrs.de") - end - end - describe "#admin_contacts" do - it do - expect(subject.admin_contacts).to be_a(Array) - expect(subject.admin_contacts.size).to eq(1) - expect(subject.admin_contacts[0]).to be_a(Whois::Parser::Contact) - expect(subject.admin_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_ADMINISTRATIVE) - expect(subject.admin_contacts[0].id).to eq("INX-201727com") - expect(subject.admin_contacts[0].name).to eq("Robert Ragge") - expect(subject.admin_contacts[0].organization).to eq("Hotel Reservation Service Robert Ragge GmbH") - expect(subject.admin_contacts[0].address).to eq("Blaubach 32") - expect(subject.admin_contacts[0].city).to eq("Koeln") - expect(subject.admin_contacts[0].zip).to eq("50676") - expect(subject.admin_contacts[0].state).to eq("DE") - expect(subject.admin_contacts[0].country).to eq(nil) - expect(subject.admin_contacts[0].country_code).to eq("DE") - expect(subject.admin_contacts[0].phone).to eq("+49.2212077222") - expect(subject.admin_contacts[0].fax).to eq("+49.2212077394") - expect(subject.admin_contacts[0].email).to eq("domains@hrs.de") - end - end - describe "#technical_contacts" do - it do - expect(subject.technical_contacts).to be_a(Array) - expect(subject.technical_contacts.size).to eq(1) - expect(subject.technical_contacts[0]).to be_a(Whois::Parser::Contact) - expect(subject.technical_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_TECHNICAL) - expect(subject.technical_contacts[0].id).to eq("INX-201728com") - expect(subject.technical_contacts[0].name).to eq("Uwe Watzek") - expect(subject.technical_contacts[0].organization).to eq("Wind Internethaus GmbH") - expect(subject.technical_contacts[0].address).to eq("Am Krebsgraben 15\nHaus 2") - expect(subject.technical_contacts[0].city).to eq("Villingen-Schwenningen") - expect(subject.technical_contacts[0].zip).to eq("78048") - expect(subject.technical_contacts[0].state).to eq("Baden-Wuerttemberg") - expect(subject.technical_contacts[0].country).to eq(nil) - expect(subject.technical_contacts[0].country_code).to eq("DE") - expect(subject.technical_contacts[0].phone).to eq("+49.77214070740") - expect(subject.technical_contacts[0].fax).to eq("+49.77214070741") - expect(subject.technical_contacts[0].email).to eq("info@windinternethaus.de") - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers.size).to eq(3) - expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[0].name).to eq("ns1.hrs.de") - expect(subject.nameservers[0].ipv4).to eq(nil) - expect(subject.nameservers[0].ipv6).to eq(nil) - expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[1].name).to eq("ns2.hrs.de") - expect(subject.nameservers[1].ipv4).to eq(nil) - expect(subject.nameservers[1].ipv6).to eq(nil) - expect(subject.nameservers[2]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[2].name).to eq("ns2.surfbrett.de") - expect(subject.nameservers[2].ipv4).to eq(nil) - expect(subject.nameservers[2].ipv6).to eq(nil) - end + it "matches status_registered.expected" do + expect(subject.disclaimer).to eq("This whois service is provided by CentralNic Ltd and only contains information pertaining to Internet domain names we have registered for our customers. By using this service you are agreeing (1) not to use any information presented here for any purpose other than determining ownership of domain names, (2) not to store or reproduce this data in any way, (3) not to use any high-volume, automated, electronic processes to obtain data from this service. Abuse of this service is monitored and actions in contravention of these terms will result in being permanently blacklisted. All data is (c) CentralNic Ltd https://www.centralnic.com/") + expect(subject.domain).to eq("hotel.se.com") + expect(subject.domain_id).to eq("CNIC-DO561053") + expect(subject.status).to eq(["ok"]) + expect(subject.available?).to eq(false) + expect(subject.registered?).to eq(true) + expect(subject.created_on).to be_a(Time) + expect(subject.created_on).to eq(DateTime.parse("2008-05-10 05:17:32 UTC")) + expect(subject.updated_on).to be_a(Time) + expect(subject.updated_on).to eq(DateTime.parse("2013-06-03 10:33:46 UTC")) + expect(subject.expires_on).to be_a(Time) + expect(subject.expires_on).to eq(DateTime.parse("2014-05-10 23:59:59 UTC")) + expect(subject.registrar).to be_a(Whois::Parser::Registrar) + expect(subject.registrar.id).to eq("7145-IX") + expect(subject.registrar.name).to eq("InternetX GmbH") + expect(subject.registrar.url).to eq("http://www.internetx.de/") + expect(subject.registrant_contacts).to be_a(Array) + expect(subject.registrant_contacts.size).to eq(1) + expect(subject.registrant_contacts[0]).to be_a(Whois::Parser::Contact) + expect(subject.registrant_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_REGISTRANT) + expect(subject.registrant_contacts[0].id).to eq("INX-10599082com") + expect(subject.registrant_contacts[0].name).to eq("Hotel Reservation Service Robert Ragge GmbH") + expect(subject.registrant_contacts[0].organization).to eq("Hotel Reservation Service Robert Ragge GmbH") + expect(subject.registrant_contacts[0].address).to eq("Blaubach 32") + expect(subject.registrant_contacts[0].city).to eq("Koeln") + expect(subject.registrant_contacts[0].zip).to eq("50676") + expect(subject.registrant_contacts[0].state).to eq("NRW") + expect(subject.registrant_contacts[0].country).to eq(nil) + expect(subject.registrant_contacts[0].country_code).to eq("DE") + expect(subject.registrant_contacts[0].phone).to eq("+49.2212077222") + expect(subject.registrant_contacts[0].fax).to eq("+49.2212077394") + expect(subject.registrant_contacts[0].email).to eq("domains@hrs.de") + expect(subject.admin_contacts).to be_a(Array) + expect(subject.admin_contacts.size).to eq(1) + expect(subject.admin_contacts[0]).to be_a(Whois::Parser::Contact) + expect(subject.admin_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_ADMINISTRATIVE) + expect(subject.admin_contacts[0].id).to eq("INX-201727com") + expect(subject.admin_contacts[0].name).to eq("Robert Ragge") + expect(subject.admin_contacts[0].organization).to eq("Hotel Reservation Service Robert Ragge GmbH") + expect(subject.admin_contacts[0].address).to eq("Blaubach 32") + expect(subject.admin_contacts[0].city).to eq("Koeln") + expect(subject.admin_contacts[0].zip).to eq("50676") + expect(subject.admin_contacts[0].state).to eq("DE") + expect(subject.admin_contacts[0].country).to eq(nil) + expect(subject.admin_contacts[0].country_code).to eq("DE") + expect(subject.admin_contacts[0].phone).to eq("+49.2212077222") + expect(subject.admin_contacts[0].fax).to eq("+49.2212077394") + expect(subject.admin_contacts[0].email).to eq("domains@hrs.de") + expect(subject.technical_contacts).to be_a(Array) + expect(subject.technical_contacts.size).to eq(1) + expect(subject.technical_contacts[0]).to be_a(Whois::Parser::Contact) + expect(subject.technical_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_TECHNICAL) + expect(subject.technical_contacts[0].id).to eq("INX-201728com") + expect(subject.technical_contacts[0].name).to eq("Uwe Watzek") + expect(subject.technical_contacts[0].organization).to eq("Wind Internethaus GmbH") + expect(subject.technical_contacts[0].address).to eq("Am Krebsgraben 15\nHaus 2") + expect(subject.technical_contacts[0].city).to eq("Villingen-Schwenningen") + expect(subject.technical_contacts[0].zip).to eq("78048") + expect(subject.technical_contacts[0].state).to eq("Baden-Wuerttemberg") + expect(subject.technical_contacts[0].country).to eq(nil) + expect(subject.technical_contacts[0].country_code).to eq("DE") + expect(subject.technical_contacts[0].phone).to eq("+49.77214070740") + expect(subject.technical_contacts[0].fax).to eq("+49.77214070741") + expect(subject.technical_contacts[0].email).to eq("info@windinternethaus.de") + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers.size).to eq(3) + expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[0].name).to eq("ns1.hrs.de") + expect(subject.nameservers[0].ipv4).to eq(nil) + expect(subject.nameservers[0].ipv6).to eq(nil) + expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[1].name).to eq("ns2.hrs.de") + expect(subject.nameservers[1].ipv4).to eq(nil) + expect(subject.nameservers[1].ipv6).to eq(nil) + expect(subject.nameservers[2]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[2].name).to eq("ns2.surfbrett.de") + expect(subject.nameservers[2].ipv4).to eq(nil) + expect(subject.nameservers[2].ipv6).to eq(nil) end end diff --git a/spec/whois/parsers/responses/whois.centralnic.com/se.net/status_available_spec.rb b/spec/whois/parsers/responses/whois.centralnic.com/se.net/status_available_spec.rb index 15512aa7..d988a005 100644 --- a/spec/whois/parsers/responses/whois.centralnic.com/se.net/status_available_spec.rb +++ b/spec/whois/parsers/responses/whois.centralnic.com/se.net/status_available_spec.rb @@ -11,88 +11,33 @@ # require 'spec_helper' -require 'whois/parsers/whois.centralnic.com.rb' -describe Whois::Parsers::WhoisCentralnicCom, "status_available.expected" do +describe "whois.centralnic.com", :aggregate_failures do subject do file = fixture("responses", "whois.centralnic.com/se.net/status_available.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.centralnic.com") + Whois::Parser.parser_for(part) end - describe "#disclaimer" do - it do - expect(subject.disclaimer).to eq(nil) - end - end - describe "#domain" do - it do - expect(subject.domain).to eq(nil) - end - end - describe "#domain_id" do - it do - expect(subject.domain_id).to eq(nil) - end - end - describe "#status" do - it do - expect(subject.status).to eq([]) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(true) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(false) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to eq(nil) - end - end - describe "#updated_on" do - it do - expect(subject.updated_on).to eq(nil) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to eq(nil) - end - end - describe "#registrar" do - it do - expect(subject.registrar).to eq(nil) - end - end - describe "#registrant_contacts" do - it do - expect(subject.registrant_contacts).to be_a(Array) - expect(subject.registrant_contacts).to eq([]) - end - end - describe "#admin_contacts" do - it do - expect(subject.admin_contacts).to be_a(Array) - expect(subject.admin_contacts).to eq([]) - end - end - describe "#technical_contacts" do - it do - expect(subject.technical_contacts).to be_a(Array) - expect(subject.technical_contacts).to eq([]) - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers).to eq([]) - end + it "matches status_available.expected" do + expect(subject.disclaimer).to eq(nil) + expect(subject.domain).to eq(nil) + expect(subject.domain_id).to eq(nil) + expect(subject.status).to eq([]) + expect(subject.available?).to eq(true) + expect(subject.registered?).to eq(false) + expect(subject.created_on).to eq(nil) + expect(subject.updated_on).to eq(nil) + expect(subject.expires_on).to eq(nil) + expect(subject.registrar).to eq(nil) + expect(subject.registrant_contacts).to be_a(Array) + expect(subject.registrant_contacts).to eq([]) + expect(subject.admin_contacts).to be_a(Array) + expect(subject.admin_contacts).to eq([]) + expect(subject.technical_contacts).to be_a(Array) + expect(subject.technical_contacts).to eq([]) + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers).to eq([]) end end diff --git a/spec/whois/parsers/responses/whois.centralnic.com/se.net/status_registered_spec.rb b/spec/whois/parsers/responses/whois.centralnic.com/se.net/status_registered_spec.rb index 3e5c1330..0868dbd0 100644 --- a/spec/whois/parsers/responses/whois.centralnic.com/se.net/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.centralnic.com/se.net/status_registered_spec.rb @@ -11,150 +11,95 @@ # require 'spec_helper' -require 'whois/parsers/whois.centralnic.com.rb' -describe Whois::Parsers::WhoisCentralnicCom, "status_registered.expected" do +describe "whois.centralnic.com", :aggregate_failures do subject do file = fixture("responses", "whois.centralnic.com/se.net/status_registered.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.centralnic.com") + Whois::Parser.parser_for(part) end - describe "#disclaimer" do - it do - expect(subject.disclaimer).to eq("This whois service is provided by CentralNic Ltd and only contains information pertaining to Internet domain names we have registered for our customers. By using this service you are agreeing (1) not to use any information presented here for any purpose other than determining ownership of domain names, (2) not to store or reproduce this data in any way, (3) not to use any high-volume, automated, electronic processes to obtain data from this service. Abuse of this service is monitored and actions in contravention of these terms will result in being permanently blacklisted. All data is (c) CentralNic Ltd https://www.centralnic.com/") - end - end - describe "#domain" do - it do - expect(subject.domain).to eq("hotel.se.net") - end - end - describe "#domain_id" do - it do - expect(subject.domain_id).to eq("CNIC-DO1617446") - end - end - describe "#status" do - it do - expect(subject.status).to eq(["ok"]) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(false) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(true) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to be_a(Time) - expect(subject.created_on).to eq(DateTime.parse("2013-11-13 10:35:03 UTC")) - end - end - describe "#updated_on" do - it do - expect(subject.updated_on).to be_a(Time) - expect(subject.updated_on).to eq(DateTime.parse("2013-11-28 11:49:39 UTC")) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to be_a(Time) - expect(subject.expires_on).to eq(DateTime.parse("2014-11-13 23:59:59 UTC")) - end - end - describe "#registrar" do - it do - expect(subject.registrar).to be_a(Whois::Parser::Registrar) - expect(subject.registrar.id).to eq("H2307235") - expect(subject.registrar.name).to eq("Soluciones Corporativas IP, S.L.U.") - expect(subject.registrar.url).to eq("www.scip.es") - end - end - describe "#registrant_contacts" do - it do - expect(subject.registrant_contacts).to be_a(Array) - expect(subject.registrant_contacts.size).to eq(1) - expect(subject.registrant_contacts[0]).to be_a(Whois::Parser::Contact) - expect(subject.registrant_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_REGISTRANT) - expect(subject.registrant_contacts[0].id).to eq("scipr000323588") - expect(subject.registrant_contacts[0].name).to eq("Christoph Donath") - expect(subject.registrant_contacts[0].organization).to eq("Christoph Donath") - expect(subject.registrant_contacts[0].address).to eq("C. Tijarafe 24, 2c") - expect(subject.registrant_contacts[0].city).to eq("Cruce de Arinaga") - expect(subject.registrant_contacts[0].zip).to eq("35118") - expect(subject.registrant_contacts[0].state).to eq("Palmas (Las)") - expect(subject.registrant_contacts[0].country).to eq(nil) - expect(subject.registrant_contacts[0].country_code).to eq("ES") - expect(subject.registrant_contacts[0].phone).to eq("+34.667889082") - expect(subject.registrant_contacts[0].fax).to eq(nil) - expect(subject.registrant_contacts[0].email).to eq("info@christophdonath.com") - expect(subject.registrant_contacts[0].created_on).to eq(nil) - expect(subject.registrant_contacts[0].updated_on).to eq(nil) - end - end - describe "#admin_contacts" do - it do - expect(subject.admin_contacts).to be_a(Array) - expect(subject.admin_contacts.size).to eq(1) - expect(subject.admin_contacts[0]).to be_a(Whois::Parser::Contact) - expect(subject.admin_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_ADMINISTRATIVE) - expect(subject.admin_contacts[0].id).to eq("scipa000323588") - expect(subject.admin_contacts[0].name).to eq("Christoph Donath") - expect(subject.admin_contacts[0].organization).to eq("Christoph Donath") - expect(subject.admin_contacts[0].address).to eq("C. Tijarafe 24, 2c") - expect(subject.admin_contacts[0].city).to eq("Cruce de Arinaga") - expect(subject.admin_contacts[0].zip).to eq("35118") - expect(subject.admin_contacts[0].state).to eq("Palmas (Las)") - expect(subject.admin_contacts[0].country).to eq(nil) - expect(subject.admin_contacts[0].country_code).to eq("ES") - expect(subject.admin_contacts[0].phone).to eq("+34.667889082") - expect(subject.admin_contacts[0].fax).to eq(nil) - expect(subject.admin_contacts[0].email).to eq("info@christophdonath.com") - expect(subject.admin_contacts[0].created_on).to eq(nil) - expect(subject.admin_contacts[0].updated_on).to eq(nil) - end - end - describe "#technical_contacts" do - it do - expect(subject.technical_contacts).to be_a(Array) - expect(subject.technical_contacts.size).to eq(1) - expect(subject.technical_contacts[0]).to be_a(Whois::Parser::Contact) - expect(subject.technical_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_TECHNICAL) - expect(subject.technical_contacts[0].id).to eq("scipt000323588") - expect(subject.technical_contacts[0].name).to eq("Christoph Donath") - expect(subject.technical_contacts[0].organization).to eq("Christoph Donath") - expect(subject.technical_contacts[0].address).to eq("C. Tijarafe 24, 2c") - expect(subject.technical_contacts[0].city).to eq("Cruce de Arinaga") - expect(subject.technical_contacts[0].zip).to eq("35118") - expect(subject.technical_contacts[0].state).to eq("Palmas (Las)") - expect(subject.technical_contacts[0].country).to eq(nil) - expect(subject.technical_contacts[0].country_code).to eq("ES") - expect(subject.technical_contacts[0].phone).to eq("+34.667889082") - expect(subject.technical_contacts[0].fax).to eq(nil) - expect(subject.technical_contacts[0].email).to eq("info@christophdonath.com") - expect(subject.technical_contacts[0].created_on).to eq(nil) - expect(subject.technical_contacts[0].updated_on).to eq(nil) - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers.size).to eq(2) - expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[0].name).to eq("ns8261.hostgator.com") - expect(subject.nameservers[0].ipv4).to eq(nil) - expect(subject.nameservers[0].ipv6).to eq(nil) - expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[1].name).to eq("ns8262.hostgator.com") - expect(subject.nameservers[1].ipv4).to eq(nil) - expect(subject.nameservers[1].ipv6).to eq(nil) - end + it "matches status_registered.expected" do + expect(subject.disclaimer).to eq("This whois service is provided by CentralNic Ltd and only contains information pertaining to Internet domain names we have registered for our customers. By using this service you are agreeing (1) not to use any information presented here for any purpose other than determining ownership of domain names, (2) not to store or reproduce this data in any way, (3) not to use any high-volume, automated, electronic processes to obtain data from this service. Abuse of this service is monitored and actions in contravention of these terms will result in being permanently blacklisted. All data is (c) CentralNic Ltd https://www.centralnic.com/") + expect(subject.domain).to eq("hotel.se.net") + expect(subject.domain_id).to eq("CNIC-DO1617446") + expect(subject.status).to eq(["ok"]) + expect(subject.available?).to eq(false) + expect(subject.registered?).to eq(true) + expect(subject.created_on).to be_a(Time) + expect(subject.created_on).to eq(DateTime.parse("2013-11-13 10:35:03 UTC")) + expect(subject.updated_on).to be_a(Time) + expect(subject.updated_on).to eq(DateTime.parse("2013-11-28 11:49:39 UTC")) + expect(subject.expires_on).to be_a(Time) + expect(subject.expires_on).to eq(DateTime.parse("2014-11-13 23:59:59 UTC")) + expect(subject.registrar).to be_a(Whois::Parser::Registrar) + expect(subject.registrar.id).to eq("H2307235") + expect(subject.registrar.name).to eq("Soluciones Corporativas IP, S.L.U.") + expect(subject.registrar.url).to eq("www.scip.es") + expect(subject.registrant_contacts).to be_a(Array) + expect(subject.registrant_contacts.size).to eq(1) + expect(subject.registrant_contacts[0]).to be_a(Whois::Parser::Contact) + expect(subject.registrant_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_REGISTRANT) + expect(subject.registrant_contacts[0].id).to eq("scipr000323588") + expect(subject.registrant_contacts[0].name).to eq("Christoph Donath") + expect(subject.registrant_contacts[0].organization).to eq("Christoph Donath") + expect(subject.registrant_contacts[0].address).to eq("C. Tijarafe 24, 2c") + expect(subject.registrant_contacts[0].city).to eq("Cruce de Arinaga") + expect(subject.registrant_contacts[0].zip).to eq("35118") + expect(subject.registrant_contacts[0].state).to eq("Palmas (Las)") + expect(subject.registrant_contacts[0].country).to eq(nil) + expect(subject.registrant_contacts[0].country_code).to eq("ES") + expect(subject.registrant_contacts[0].phone).to eq("+34.667889082") + expect(subject.registrant_contacts[0].fax).to eq(nil) + expect(subject.registrant_contacts[0].email).to eq("info@christophdonath.com") + expect(subject.registrant_contacts[0].created_on).to eq(nil) + expect(subject.registrant_contacts[0].updated_on).to eq(nil) + expect(subject.admin_contacts).to be_a(Array) + expect(subject.admin_contacts.size).to eq(1) + expect(subject.admin_contacts[0]).to be_a(Whois::Parser::Contact) + expect(subject.admin_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_ADMINISTRATIVE) + expect(subject.admin_contacts[0].id).to eq("scipa000323588") + expect(subject.admin_contacts[0].name).to eq("Christoph Donath") + expect(subject.admin_contacts[0].organization).to eq("Christoph Donath") + expect(subject.admin_contacts[0].address).to eq("C. Tijarafe 24, 2c") + expect(subject.admin_contacts[0].city).to eq("Cruce de Arinaga") + expect(subject.admin_contacts[0].zip).to eq("35118") + expect(subject.admin_contacts[0].state).to eq("Palmas (Las)") + expect(subject.admin_contacts[0].country).to eq(nil) + expect(subject.admin_contacts[0].country_code).to eq("ES") + expect(subject.admin_contacts[0].phone).to eq("+34.667889082") + expect(subject.admin_contacts[0].fax).to eq(nil) + expect(subject.admin_contacts[0].email).to eq("info@christophdonath.com") + expect(subject.admin_contacts[0].created_on).to eq(nil) + expect(subject.admin_contacts[0].updated_on).to eq(nil) + expect(subject.technical_contacts).to be_a(Array) + expect(subject.technical_contacts.size).to eq(1) + expect(subject.technical_contacts[0]).to be_a(Whois::Parser::Contact) + expect(subject.technical_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_TECHNICAL) + expect(subject.technical_contacts[0].id).to eq("scipt000323588") + expect(subject.technical_contacts[0].name).to eq("Christoph Donath") + expect(subject.technical_contacts[0].organization).to eq("Christoph Donath") + expect(subject.technical_contacts[0].address).to eq("C. Tijarafe 24, 2c") + expect(subject.technical_contacts[0].city).to eq("Cruce de Arinaga") + expect(subject.technical_contacts[0].zip).to eq("35118") + expect(subject.technical_contacts[0].state).to eq("Palmas (Las)") + expect(subject.technical_contacts[0].country).to eq(nil) + expect(subject.technical_contacts[0].country_code).to eq("ES") + expect(subject.technical_contacts[0].phone).to eq("+34.667889082") + expect(subject.technical_contacts[0].fax).to eq(nil) + expect(subject.technical_contacts[0].email).to eq("info@christophdonath.com") + expect(subject.technical_contacts[0].created_on).to eq(nil) + expect(subject.technical_contacts[0].updated_on).to eq(nil) + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers.size).to eq(2) + expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[0].name).to eq("ns8261.hostgator.com") + expect(subject.nameservers[0].ipv4).to eq(nil) + expect(subject.nameservers[0].ipv6).to eq(nil) + expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[1].name).to eq("ns8262.hostgator.com") + expect(subject.nameservers[1].ipv4).to eq(nil) + expect(subject.nameservers[1].ipv6).to eq(nil) end end diff --git a/spec/whois/parsers/responses/whois.centralnic.com/uk.com/status_available_spec.rb b/spec/whois/parsers/responses/whois.centralnic.com/uk.com/status_available_spec.rb index ac9b4fc8..ca31ec32 100644 --- a/spec/whois/parsers/responses/whois.centralnic.com/uk.com/status_available_spec.rb +++ b/spec/whois/parsers/responses/whois.centralnic.com/uk.com/status_available_spec.rb @@ -11,88 +11,33 @@ # require 'spec_helper' -require 'whois/parsers/whois.centralnic.com.rb' -describe Whois::Parsers::WhoisCentralnicCom, "status_available.expected" do +describe "whois.centralnic.com", :aggregate_failures do subject do file = fixture("responses", "whois.centralnic.com/uk.com/status_available.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.centralnic.com") + Whois::Parser.parser_for(part) end - describe "#disclaimer" do - it do - expect(subject.disclaimer).to eq(nil) - end - end - describe "#domain" do - it do - expect(subject.domain).to eq(nil) - end - end - describe "#domain_id" do - it do - expect(subject.domain_id).to eq(nil) - end - end - describe "#status" do - it do - expect(subject.status).to eq([]) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(true) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(false) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to eq(nil) - end - end - describe "#updated_on" do - it do - expect(subject.updated_on).to eq(nil) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to eq(nil) - end - end - describe "#registrar" do - it do - expect(subject.registrar).to eq(nil) - end - end - describe "#registrant_contacts" do - it do - expect(subject.registrant_contacts).to be_a(Array) - expect(subject.registrant_contacts).to eq([]) - end - end - describe "#admin_contacts" do - it do - expect(subject.admin_contacts).to be_a(Array) - expect(subject.admin_contacts).to eq([]) - end - end - describe "#technical_contacts" do - it do - expect(subject.technical_contacts).to be_a(Array) - expect(subject.technical_contacts).to eq([]) - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers).to eq([]) - end + it "matches status_available.expected" do + expect(subject.disclaimer).to eq(nil) + expect(subject.domain).to eq(nil) + expect(subject.domain_id).to eq(nil) + expect(subject.status).to eq([]) + expect(subject.available?).to eq(true) + expect(subject.registered?).to eq(false) + expect(subject.created_on).to eq(nil) + expect(subject.updated_on).to eq(nil) + expect(subject.expires_on).to eq(nil) + expect(subject.registrar).to eq(nil) + expect(subject.registrant_contacts).to be_a(Array) + expect(subject.registrant_contacts).to eq([]) + expect(subject.admin_contacts).to be_a(Array) + expect(subject.admin_contacts).to eq([]) + expect(subject.technical_contacts).to be_a(Array) + expect(subject.technical_contacts).to eq([]) + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers).to eq([]) end end diff --git a/spec/whois/parsers/responses/whois.centralnic.com/uk.com/status_registered_spec.rb b/spec/whois/parsers/responses/whois.centralnic.com/uk.com/status_registered_spec.rb index 4b5fabca..a88e53e7 100644 --- a/spec/whois/parsers/responses/whois.centralnic.com/uk.com/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.centralnic.com/uk.com/status_registered_spec.rb @@ -11,144 +11,89 @@ # require 'spec_helper' -require 'whois/parsers/whois.centralnic.com.rb' -describe Whois::Parsers::WhoisCentralnicCom, "status_registered.expected" do +describe "whois.centralnic.com", :aggregate_failures do subject do file = fixture("responses", "whois.centralnic.com/uk.com/status_registered.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.centralnic.com") + Whois::Parser.parser_for(part) end - describe "#disclaimer" do - it do - expect(subject.disclaimer).to eq("This whois service is provided by CentralNic Ltd and only contains information pertaining to Internet domain names we have registered for our customers. By using this service you are agreeing (1) not to use any information presented here for any purpose other than determining ownership of domain names, (2) not to store or reproduce this data in any way, (3) not to use any high-volume, automated, electronic processes to obtain data from this service. Abuse of this service is monitored and actions in contravention of these terms will result in being permanently blacklisted. All data is (c) CentralNic Ltd https://www.centralnic.com/") - end - end - describe "#domain" do - it do - expect(subject.domain).to eq("history.uk.com") - end - end - describe "#domain_id" do - it do - expect(subject.domain_id).to eq("CNIC-DO86293") - end - end - describe "#status" do - it do - expect(subject.status).to eq(["ok"]) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(false) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(true) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to be_a(Time) - expect(subject.created_on).to eq(DateTime.parse("2001-08-31 11:50:57 UTC")) - end - end - describe "#updated_on" do - it do - expect(subject.updated_on).to be_a(Time) - expect(subject.updated_on).to eq(DateTime.parse("2013-09-03 10:36:47 UTC")) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to be_a(Time) - expect(subject.expires_on).to eq(DateTime.parse("2015-08-31 23:59:59 UTC")) - end - end - describe "#registrar" do - it do - expect(subject.registrar).to be_a(Whois::Parser::Registrar) - expect(subject.registrar.id).to eq("H78362") - expect(subject.registrar.name).to eq("E-VELOCITY LTD") - expect(subject.registrar.url).to eq("http://www.e-velocity.co.uk/") - end - end - describe "#registrant_contacts" do - it do - expect(subject.registrant_contacts).to be_a(Array) - expect(subject.registrant_contacts.size).to eq(1) - expect(subject.registrant_contacts[0]).to be_a(Whois::Parser::Contact) - expect(subject.registrant_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_REGISTRANT) - expect(subject.registrant_contacts[0].id).to eq("H1045821") - expect(subject.registrant_contacts[0].name).to eq("Mr. Ray Hatley") - expect(subject.registrant_contacts[0].organization).to eq(nil) - expect(subject.registrant_contacts[0].address).to eq("Tallow House\n65-66 Lower Galdeford") - expect(subject.registrant_contacts[0].city).to eq("Ludlow") - expect(subject.registrant_contacts[0].zip).to eq("SY8 1RU") - expect(subject.registrant_contacts[0].state).to eq("Shropshire") - expect(subject.registrant_contacts[0].country).to eq(nil) - expect(subject.registrant_contacts[0].country_code).to eq("GB") - expect(subject.registrant_contacts[0].phone).to eq("+44.1584873633") - expect(subject.registrant_contacts[0].fax).to eq(nil) - expect(subject.registrant_contacts[0].email).to eq("ray@hatley.co.uk") - end - end - describe "#admin_contacts" do - it do - expect(subject.admin_contacts).to be_a(Array) - expect(subject.admin_contacts.size).to eq(1) - expect(subject.admin_contacts[0]).to be_a(Whois::Parser::Contact) - expect(subject.admin_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_ADMINISTRATIVE) - expect(subject.admin_contacts[0].id).to eq("H305798") - expect(subject.admin_contacts[0].name).to eq("Mr. Ray Hatley") - expect(subject.admin_contacts[0].organization).to eq(nil) - expect(subject.admin_contacts[0].address).to eq("Tallow House\n65-66 Lower Galdeford") - expect(subject.admin_contacts[0].city).to eq("Ludlow") - expect(subject.admin_contacts[0].zip).to eq("SY8 1RU") - expect(subject.admin_contacts[0].state).to eq("Shropshire") - expect(subject.admin_contacts[0].country).to eq(nil) - expect(subject.admin_contacts[0].country_code).to eq("GB") - expect(subject.admin_contacts[0].phone).to eq("+44.1584873633") - expect(subject.admin_contacts[0].fax).to eq(nil) - expect(subject.admin_contacts[0].email).to eq("ray@hatley.co.uk") - end - end - describe "#technical_contacts" do - it do - expect(subject.technical_contacts).to be_a(Array) - expect(subject.technical_contacts.size).to eq(1) - expect(subject.technical_contacts[0]).to be_a(Whois::Parser::Contact) - expect(subject.technical_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_TECHNICAL) - expect(subject.technical_contacts[0].id).to eq("H78362") - expect(subject.technical_contacts[0].name).to eq("Mr Simon Williams") - expect(subject.technical_contacts[0].organization).to eq("E-VELOCITY LTD") - expect(subject.technical_contacts[0].address).to eq("P.O Box 3295\nBrighton") - expect(subject.technical_contacts[0].city).to eq(nil) - expect(subject.technical_contacts[0].zip).to eq("BN50 9EY") - expect(subject.technical_contacts[0].state).to eq(nil) - expect(subject.technical_contacts[0].country).to eq(nil) - expect(subject.technical_contacts[0].country_code).to eq("GB") - expect(subject.technical_contacts[0].phone).to eq("+44.1273684969") - expect(subject.technical_contacts[0].fax).to eq(nil) - expect(subject.technical_contacts[0].email).to eq("simon@e-velocity.co.uk") - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers.size).to eq(2) - expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[0].name).to eq("ns37.eukdns.com") - expect(subject.nameservers[0].ipv4).to eq(nil) - expect(subject.nameservers[0].ipv6).to eq(nil) - expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[1].name).to eq("ns38.eukdns.com") - expect(subject.nameservers[1].ipv4).to eq(nil) - expect(subject.nameservers[1].ipv6).to eq(nil) - end + it "matches status_registered.expected" do + expect(subject.disclaimer).to eq("This whois service is provided by CentralNic Ltd and only contains information pertaining to Internet domain names we have registered for our customers. By using this service you are agreeing (1) not to use any information presented here for any purpose other than determining ownership of domain names, (2) not to store or reproduce this data in any way, (3) not to use any high-volume, automated, electronic processes to obtain data from this service. Abuse of this service is monitored and actions in contravention of these terms will result in being permanently blacklisted. All data is (c) CentralNic Ltd https://www.centralnic.com/") + expect(subject.domain).to eq("history.uk.com") + expect(subject.domain_id).to eq("CNIC-DO86293") + expect(subject.status).to eq(["ok"]) + expect(subject.available?).to eq(false) + expect(subject.registered?).to eq(true) + expect(subject.created_on).to be_a(Time) + expect(subject.created_on).to eq(DateTime.parse("2001-08-31 11:50:57 UTC")) + expect(subject.updated_on).to be_a(Time) + expect(subject.updated_on).to eq(DateTime.parse("2013-09-03 10:36:47 UTC")) + expect(subject.expires_on).to be_a(Time) + expect(subject.expires_on).to eq(DateTime.parse("2015-08-31 23:59:59 UTC")) + expect(subject.registrar).to be_a(Whois::Parser::Registrar) + expect(subject.registrar.id).to eq("H78362") + expect(subject.registrar.name).to eq("E-VELOCITY LTD") + expect(subject.registrar.url).to eq("http://www.e-velocity.co.uk/") + expect(subject.registrant_contacts).to be_a(Array) + expect(subject.registrant_contacts.size).to eq(1) + expect(subject.registrant_contacts[0]).to be_a(Whois::Parser::Contact) + expect(subject.registrant_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_REGISTRANT) + expect(subject.registrant_contacts[0].id).to eq("H1045821") + expect(subject.registrant_contacts[0].name).to eq("Mr. Ray Hatley") + expect(subject.registrant_contacts[0].organization).to eq(nil) + expect(subject.registrant_contacts[0].address).to eq("Tallow House\n65-66 Lower Galdeford") + expect(subject.registrant_contacts[0].city).to eq("Ludlow") + expect(subject.registrant_contacts[0].zip).to eq("SY8 1RU") + expect(subject.registrant_contacts[0].state).to eq("Shropshire") + expect(subject.registrant_contacts[0].country).to eq(nil) + expect(subject.registrant_contacts[0].country_code).to eq("GB") + expect(subject.registrant_contacts[0].phone).to eq("+44.1584873633") + expect(subject.registrant_contacts[0].fax).to eq(nil) + expect(subject.registrant_contacts[0].email).to eq("ray@hatley.co.uk") + expect(subject.admin_contacts).to be_a(Array) + expect(subject.admin_contacts.size).to eq(1) + expect(subject.admin_contacts[0]).to be_a(Whois::Parser::Contact) + expect(subject.admin_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_ADMINISTRATIVE) + expect(subject.admin_contacts[0].id).to eq("H305798") + expect(subject.admin_contacts[0].name).to eq("Mr. Ray Hatley") + expect(subject.admin_contacts[0].organization).to eq(nil) + expect(subject.admin_contacts[0].address).to eq("Tallow House\n65-66 Lower Galdeford") + expect(subject.admin_contacts[0].city).to eq("Ludlow") + expect(subject.admin_contacts[0].zip).to eq("SY8 1RU") + expect(subject.admin_contacts[0].state).to eq("Shropshire") + expect(subject.admin_contacts[0].country).to eq(nil) + expect(subject.admin_contacts[0].country_code).to eq("GB") + expect(subject.admin_contacts[0].phone).to eq("+44.1584873633") + expect(subject.admin_contacts[0].fax).to eq(nil) + expect(subject.admin_contacts[0].email).to eq("ray@hatley.co.uk") + expect(subject.technical_contacts).to be_a(Array) + expect(subject.technical_contacts.size).to eq(1) + expect(subject.technical_contacts[0]).to be_a(Whois::Parser::Contact) + expect(subject.technical_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_TECHNICAL) + expect(subject.technical_contacts[0].id).to eq("H78362") + expect(subject.technical_contacts[0].name).to eq("Mr Simon Williams") + expect(subject.technical_contacts[0].organization).to eq("E-VELOCITY LTD") + expect(subject.technical_contacts[0].address).to eq("P.O Box 3295\nBrighton") + expect(subject.technical_contacts[0].city).to eq(nil) + expect(subject.technical_contacts[0].zip).to eq("BN50 9EY") + expect(subject.technical_contacts[0].state).to eq(nil) + expect(subject.technical_contacts[0].country).to eq(nil) + expect(subject.technical_contacts[0].country_code).to eq("GB") + expect(subject.technical_contacts[0].phone).to eq("+44.1273684969") + expect(subject.technical_contacts[0].fax).to eq(nil) + expect(subject.technical_contacts[0].email).to eq("simon@e-velocity.co.uk") + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers.size).to eq(2) + expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[0].name).to eq("ns37.eukdns.com") + expect(subject.nameservers[0].ipv4).to eq(nil) + expect(subject.nameservers[0].ipv6).to eq(nil) + expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[1].name).to eq("ns38.eukdns.com") + expect(subject.nameservers[1].ipv4).to eq(nil) + expect(subject.nameservers[1].ipv6).to eq(nil) end end diff --git a/spec/whois/parsers/responses/whois.centralnic.com/uk.net/status_available_spec.rb b/spec/whois/parsers/responses/whois.centralnic.com/uk.net/status_available_spec.rb index 9b86c470..bd1708a4 100644 --- a/spec/whois/parsers/responses/whois.centralnic.com/uk.net/status_available_spec.rb +++ b/spec/whois/parsers/responses/whois.centralnic.com/uk.net/status_available_spec.rb @@ -11,88 +11,33 @@ # require 'spec_helper' -require 'whois/parsers/whois.centralnic.com.rb' -describe Whois::Parsers::WhoisCentralnicCom, "status_available.expected" do +describe "whois.centralnic.com", :aggregate_failures do subject do file = fixture("responses", "whois.centralnic.com/uk.net/status_available.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.centralnic.com") + Whois::Parser.parser_for(part) end - describe "#disclaimer" do - it do - expect(subject.disclaimer).to eq(nil) - end - end - describe "#domain" do - it do - expect(subject.domain).to eq(nil) - end - end - describe "#domain_id" do - it do - expect(subject.domain_id).to eq(nil) - end - end - describe "#status" do - it do - expect(subject.status).to eq([]) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(true) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(false) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to eq(nil) - end - end - describe "#updated_on" do - it do - expect(subject.updated_on).to eq(nil) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to eq(nil) - end - end - describe "#registrar" do - it do - expect(subject.registrar).to eq(nil) - end - end - describe "#registrant_contacts" do - it do - expect(subject.registrant_contacts).to be_a(Array) - expect(subject.registrant_contacts).to eq([]) - end - end - describe "#admin_contacts" do - it do - expect(subject.admin_contacts).to be_a(Array) - expect(subject.admin_contacts).to eq([]) - end - end - describe "#technical_contacts" do - it do - expect(subject.technical_contacts).to be_a(Array) - expect(subject.technical_contacts).to eq([]) - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers).to eq([]) - end + it "matches status_available.expected" do + expect(subject.disclaimer).to eq(nil) + expect(subject.domain).to eq(nil) + expect(subject.domain_id).to eq(nil) + expect(subject.status).to eq([]) + expect(subject.available?).to eq(true) + expect(subject.registered?).to eq(false) + expect(subject.created_on).to eq(nil) + expect(subject.updated_on).to eq(nil) + expect(subject.expires_on).to eq(nil) + expect(subject.registrar).to eq(nil) + expect(subject.registrant_contacts).to be_a(Array) + expect(subject.registrant_contacts).to eq([]) + expect(subject.admin_contacts).to be_a(Array) + expect(subject.admin_contacts).to eq([]) + expect(subject.technical_contacts).to be_a(Array) + expect(subject.technical_contacts).to eq([]) + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers).to eq([]) end end diff --git a/spec/whois/parsers/responses/whois.centralnic.com/uk.net/status_registered_spec.rb b/spec/whois/parsers/responses/whois.centralnic.com/uk.net/status_registered_spec.rb index d21e6c1d..71df9536 100644 --- a/spec/whois/parsers/responses/whois.centralnic.com/uk.net/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.centralnic.com/uk.net/status_registered_spec.rb @@ -11,144 +11,89 @@ # require 'spec_helper' -require 'whois/parsers/whois.centralnic.com.rb' -describe Whois::Parsers::WhoisCentralnicCom, "status_registered.expected" do +describe "whois.centralnic.com", :aggregate_failures do subject do file = fixture("responses", "whois.centralnic.com/uk.net/status_registered.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.centralnic.com") + Whois::Parser.parser_for(part) end - describe "#disclaimer" do - it do - expect(subject.disclaimer).to eq("This whois service is provided by CentralNic Ltd and only contains information pertaining to Internet domain names we have registered for our customers. By using this service you are agreeing (1) not to use any information presented here for any purpose other than determining ownership of domain names, (2) not to store or reproduce this data in any way, (3) not to use any high-volume, automated, electronic processes to obtain data from this service. Abuse of this service is monitored and actions in contravention of these terms will result in being permanently blacklisted. All data is (c) CentralNic Ltd https://www.centralnic.com/") - end - end - describe "#domain" do - it do - expect(subject.domain).to eq("paramount.uk.net") - end - end - describe "#domain_id" do - it do - expect(subject.domain_id).to eq("CNIC-DO393884") - end - end - describe "#status" do - it do - expect(subject.status).to eq(["ok"]) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(false) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(true) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to be_a(Time) - expect(subject.created_on).to eq(DateTime.parse("2006-02-28 12:17:01 UTC")) - end - end - describe "#updated_on" do - it do - expect(subject.updated_on).to be_a(Time) - expect(subject.updated_on).to eq(DateTime.parse("2013-04-03 12:59:45 UTC")) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to be_a(Time) - expect(subject.expires_on).to eq(DateTime.parse("2014-02-28 23:59:59 UTC")) - end - end - describe "#registrar" do - it do - expect(subject.registrar).to be_a(Whois::Parser::Registrar) - expect(subject.registrar.id).to eq("I6467") - expect(subject.registrar.name).to eq("Webfusion") - expect(subject.registrar.url).to eq("http://www.123-reg.co.uk/domain-names/") - end - end - describe "#registrant_contacts" do - it do - expect(subject.registrant_contacts).to be_a(Array) - expect(subject.registrant_contacts.size).to eq(1) - expect(subject.registrant_contacts[0]).to be_a(Whois::Parser::Contact) - expect(subject.registrant_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_REGISTRANT) - expect(subject.registrant_contacts[0].id).to eq("MNT60424953041") - expect(subject.registrant_contacts[0].name).to eq("Identity Protection Service") - expect(subject.registrant_contacts[0].organization).to eq("Identity Protect Limited") - expect(subject.registrant_contacts[0].address).to eq("PO Box 795") - expect(subject.registrant_contacts[0].city).to eq("Godalming") - expect(subject.registrant_contacts[0].zip).to eq("GU7 9GA") - expect(subject.registrant_contacts[0].state).to eq("Surrey") - expect(subject.registrant_contacts[0].country).to eq(nil) - expect(subject.registrant_contacts[0].country_code).to eq("GB") - expect(subject.registrant_contacts[0].phone).to eq("+44.1483307527") - expect(subject.registrant_contacts[0].fax).to eq("+44.1483304031") - expect(subject.registrant_contacts[0].email).to eq("paramount.uk.net@identity-protect.org") - end - end - describe "#admin_contacts" do - it do - expect(subject.admin_contacts).to be_a(Array) - expect(subject.admin_contacts.size).to eq(1) - expect(subject.admin_contacts[0]).to be_a(Whois::Parser::Contact) - expect(subject.admin_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_ADMINISTRATIVE) - expect(subject.admin_contacts[0].id).to eq("MNT60424953041") - expect(subject.admin_contacts[0].name).to eq("Identity Protection Service") - expect(subject.admin_contacts[0].organization).to eq("Identity Protect Limited") - expect(subject.admin_contacts[0].address).to eq("PO Box 795") - expect(subject.admin_contacts[0].city).to eq("Godalming") - expect(subject.admin_contacts[0].zip).to eq("GU7 9GA") - expect(subject.admin_contacts[0].state).to eq("Surrey") - expect(subject.admin_contacts[0].country).to eq(nil) - expect(subject.admin_contacts[0].country_code).to eq("GB") - expect(subject.admin_contacts[0].phone).to eq("+44.1483307527") - expect(subject.admin_contacts[0].fax).to eq("+44.1483304031") - expect(subject.admin_contacts[0].email).to eq("paramount.uk.net@identity-protect.org") - end - end - describe "#technical_contacts" do - it do - expect(subject.technical_contacts).to be_a(Array) - expect(subject.technical_contacts.size).to eq(1) - expect(subject.technical_contacts[0]).to be_a(Whois::Parser::Contact) - expect(subject.technical_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_TECHNICAL) - expect(subject.technical_contacts[0].id).to eq("MNT60424953041") - expect(subject.technical_contacts[0].name).to eq("Identity Protection Service") - expect(subject.technical_contacts[0].organization).to eq("Identity Protect Limited") - expect(subject.technical_contacts[0].address).to eq("PO Box 795") - expect(subject.technical_contacts[0].city).to eq("Godalming") - expect(subject.technical_contacts[0].zip).to eq("GU7 9GA") - expect(subject.technical_contacts[0].state).to eq("Surrey") - expect(subject.technical_contacts[0].country).to eq(nil) - expect(subject.technical_contacts[0].country_code).to eq("GB") - expect(subject.technical_contacts[0].phone).to eq("+44.1483307527") - expect(subject.technical_contacts[0].fax).to eq("+44.1483304031") - expect(subject.technical_contacts[0].email).to eq("paramount.uk.net@identity-protect.org") - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers.size).to eq(2) - expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[0].name).to eq("ns1.myhostcp.com") - expect(subject.nameservers[0].ipv4).to eq(nil) - expect(subject.nameservers[0].ipv6).to eq(nil) - expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[1].name).to eq("ns2.myhostcp.com") - expect(subject.nameservers[1].ipv4).to eq(nil) - expect(subject.nameservers[1].ipv6).to eq(nil) - end + it "matches status_registered.expected" do + expect(subject.disclaimer).to eq("This whois service is provided by CentralNic Ltd and only contains information pertaining to Internet domain names we have registered for our customers. By using this service you are agreeing (1) not to use any information presented here for any purpose other than determining ownership of domain names, (2) not to store or reproduce this data in any way, (3) not to use any high-volume, automated, electronic processes to obtain data from this service. Abuse of this service is monitored and actions in contravention of these terms will result in being permanently blacklisted. All data is (c) CentralNic Ltd https://www.centralnic.com/") + expect(subject.domain).to eq("paramount.uk.net") + expect(subject.domain_id).to eq("CNIC-DO393884") + expect(subject.status).to eq(["ok"]) + expect(subject.available?).to eq(false) + expect(subject.registered?).to eq(true) + expect(subject.created_on).to be_a(Time) + expect(subject.created_on).to eq(DateTime.parse("2006-02-28 12:17:01 UTC")) + expect(subject.updated_on).to be_a(Time) + expect(subject.updated_on).to eq(DateTime.parse("2013-04-03 12:59:45 UTC")) + expect(subject.expires_on).to be_a(Time) + expect(subject.expires_on).to eq(DateTime.parse("2014-02-28 23:59:59 UTC")) + expect(subject.registrar).to be_a(Whois::Parser::Registrar) + expect(subject.registrar.id).to eq("I6467") + expect(subject.registrar.name).to eq("Webfusion") + expect(subject.registrar.url).to eq("http://www.123-reg.co.uk/domain-names/") + expect(subject.registrant_contacts).to be_a(Array) + expect(subject.registrant_contacts.size).to eq(1) + expect(subject.registrant_contacts[0]).to be_a(Whois::Parser::Contact) + expect(subject.registrant_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_REGISTRANT) + expect(subject.registrant_contacts[0].id).to eq("MNT60424953041") + expect(subject.registrant_contacts[0].name).to eq("Identity Protection Service") + expect(subject.registrant_contacts[0].organization).to eq("Identity Protect Limited") + expect(subject.registrant_contacts[0].address).to eq("PO Box 795") + expect(subject.registrant_contacts[0].city).to eq("Godalming") + expect(subject.registrant_contacts[0].zip).to eq("GU7 9GA") + expect(subject.registrant_contacts[0].state).to eq("Surrey") + expect(subject.registrant_contacts[0].country).to eq(nil) + expect(subject.registrant_contacts[0].country_code).to eq("GB") + expect(subject.registrant_contacts[0].phone).to eq("+44.1483307527") + expect(subject.registrant_contacts[0].fax).to eq("+44.1483304031") + expect(subject.registrant_contacts[0].email).to eq("paramount.uk.net@identity-protect.org") + expect(subject.admin_contacts).to be_a(Array) + expect(subject.admin_contacts.size).to eq(1) + expect(subject.admin_contacts[0]).to be_a(Whois::Parser::Contact) + expect(subject.admin_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_ADMINISTRATIVE) + expect(subject.admin_contacts[0].id).to eq("MNT60424953041") + expect(subject.admin_contacts[0].name).to eq("Identity Protection Service") + expect(subject.admin_contacts[0].organization).to eq("Identity Protect Limited") + expect(subject.admin_contacts[0].address).to eq("PO Box 795") + expect(subject.admin_contacts[0].city).to eq("Godalming") + expect(subject.admin_contacts[0].zip).to eq("GU7 9GA") + expect(subject.admin_contacts[0].state).to eq("Surrey") + expect(subject.admin_contacts[0].country).to eq(nil) + expect(subject.admin_contacts[0].country_code).to eq("GB") + expect(subject.admin_contacts[0].phone).to eq("+44.1483307527") + expect(subject.admin_contacts[0].fax).to eq("+44.1483304031") + expect(subject.admin_contacts[0].email).to eq("paramount.uk.net@identity-protect.org") + expect(subject.technical_contacts).to be_a(Array) + expect(subject.technical_contacts.size).to eq(1) + expect(subject.technical_contacts[0]).to be_a(Whois::Parser::Contact) + expect(subject.technical_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_TECHNICAL) + expect(subject.technical_contacts[0].id).to eq("MNT60424953041") + expect(subject.technical_contacts[0].name).to eq("Identity Protection Service") + expect(subject.technical_contacts[0].organization).to eq("Identity Protect Limited") + expect(subject.technical_contacts[0].address).to eq("PO Box 795") + expect(subject.technical_contacts[0].city).to eq("Godalming") + expect(subject.technical_contacts[0].zip).to eq("GU7 9GA") + expect(subject.technical_contacts[0].state).to eq("Surrey") + expect(subject.technical_contacts[0].country).to eq(nil) + expect(subject.technical_contacts[0].country_code).to eq("GB") + expect(subject.technical_contacts[0].phone).to eq("+44.1483307527") + expect(subject.technical_contacts[0].fax).to eq("+44.1483304031") + expect(subject.technical_contacts[0].email).to eq("paramount.uk.net@identity-protect.org") + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers.size).to eq(2) + expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[0].name).to eq("ns1.myhostcp.com") + expect(subject.nameservers[0].ipv4).to eq(nil) + expect(subject.nameservers[0].ipv6).to eq(nil) + expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[1].name).to eq("ns2.myhostcp.com") + expect(subject.nameservers[1].ipv4).to eq(nil) + expect(subject.nameservers[1].ipv6).to eq(nil) end end diff --git a/spec/whois/parsers/responses/whois.centralnic.com/us.com/status_available_spec.rb b/spec/whois/parsers/responses/whois.centralnic.com/us.com/status_available_spec.rb index fad52ee6..8a98957c 100644 --- a/spec/whois/parsers/responses/whois.centralnic.com/us.com/status_available_spec.rb +++ b/spec/whois/parsers/responses/whois.centralnic.com/us.com/status_available_spec.rb @@ -11,88 +11,33 @@ # require 'spec_helper' -require 'whois/parsers/whois.centralnic.com.rb' -describe Whois::Parsers::WhoisCentralnicCom, "status_available.expected" do +describe "whois.centralnic.com", :aggregate_failures do subject do file = fixture("responses", "whois.centralnic.com/us.com/status_available.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.centralnic.com") + Whois::Parser.parser_for(part) end - describe "#disclaimer" do - it do - expect(subject.disclaimer).to eq(nil) - end - end - describe "#domain" do - it do - expect(subject.domain).to eq(nil) - end - end - describe "#domain_id" do - it do - expect(subject.domain_id).to eq(nil) - end - end - describe "#status" do - it do - expect(subject.status).to eq([]) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(true) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(false) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to eq(nil) - end - end - describe "#updated_on" do - it do - expect(subject.updated_on).to eq(nil) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to eq(nil) - end - end - describe "#registrar" do - it do - expect(subject.registrar).to eq(nil) - end - end - describe "#registrant_contacts" do - it do - expect(subject.registrant_contacts).to be_a(Array) - expect(subject.registrant_contacts).to eq([]) - end - end - describe "#admin_contacts" do - it do - expect(subject.admin_contacts).to be_a(Array) - expect(subject.admin_contacts).to eq([]) - end - end - describe "#technical_contacts" do - it do - expect(subject.technical_contacts).to be_a(Array) - expect(subject.technical_contacts).to eq([]) - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers).to eq([]) - end + it "matches status_available.expected" do + expect(subject.disclaimer).to eq(nil) + expect(subject.domain).to eq(nil) + expect(subject.domain_id).to eq(nil) + expect(subject.status).to eq([]) + expect(subject.available?).to eq(true) + expect(subject.registered?).to eq(false) + expect(subject.created_on).to eq(nil) + expect(subject.updated_on).to eq(nil) + expect(subject.expires_on).to eq(nil) + expect(subject.registrar).to eq(nil) + expect(subject.registrant_contacts).to be_a(Array) + expect(subject.registrant_contacts).to eq([]) + expect(subject.admin_contacts).to be_a(Array) + expect(subject.admin_contacts).to eq([]) + expect(subject.technical_contacts).to be_a(Array) + expect(subject.technical_contacts).to eq([]) + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers).to eq([]) end end diff --git a/spec/whois/parsers/responses/whois.centralnic.com/us.com/status_registered_spec.rb b/spec/whois/parsers/responses/whois.centralnic.com/us.com/status_registered_spec.rb index 1e9c716e..1570eb4c 100644 --- a/spec/whois/parsers/responses/whois.centralnic.com/us.com/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.centralnic.com/us.com/status_registered_spec.rb @@ -11,149 +11,94 @@ # require 'spec_helper' -require 'whois/parsers/whois.centralnic.com.rb' -describe Whois::Parsers::WhoisCentralnicCom, "status_registered.expected" do +describe "whois.centralnic.com", :aggregate_failures do subject do file = fixture("responses", "whois.centralnic.com/us.com/status_registered.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.centralnic.com") + Whois::Parser.parser_for(part) end - describe "#disclaimer" do - it do - expect(subject.disclaimer).to eq("This whois service is provided by CentralNic Ltd and only contains information pertaining to Internet domain names we have registered for our customers. By using this service you are agreeing (1) not to use any information presented here for any purpose other than determining ownership of domain names, (2) not to store or reproduce this data in any way, (3) not to use any high-volume, automated, electronic processes to obtain data from this service. Abuse of this service is monitored and actions in contravention of these terms will result in being permanently blacklisted. All data is (c) CentralNic Ltd https://www.centralnic.com/") - end - end - describe "#domain" do - it do - expect(subject.domain).to eq("college.us.com") - end - end - describe "#domain_id" do - it do - expect(subject.domain_id).to eq("CNIC-DO275307") - end - end - describe "#status" do - it do - expect(subject.status).to eq(["ok"]) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(false) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(true) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to be_a(Time) - expect(subject.created_on).to eq(DateTime.parse("2003-10-20 10:03:28 UTC")) - end - end - describe "#updated_on" do - it do - expect(subject.updated_on).to be_a(Time) - expect(subject.updated_on).to eq(DateTime.parse("2012-01-16 16:27:26 UTC")) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to be_a(Time) - expect(subject.expires_on).to eq(DateTime.parse("2014-10-20 23:59:59 UTC")) - end - end - describe "#registrar" do - it do - expect(subject.registrar).to eq(nil) - end - end - describe "#registrant_contacts" do - it do - expect(subject.registrant_contacts).to be_a(Array) - expect(subject.registrant_contacts.size).to eq(1) - expect(subject.registrant_contacts[0]).to be_a(Whois::Parser::Contact) - expect(subject.registrant_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_REGISTRANT) - expect(subject.registrant_contacts[0].id).to eq("H1044037") - expect(subject.registrant_contacts[0].name).to eq("Vantage Media Corporation") - expect(subject.registrant_contacts[0].organization).to eq(nil) - expect(subject.registrant_contacts[0].address).to eq("2101 Rosecrans Ave.\nSuite 2000") - expect(subject.registrant_contacts[0].city).to eq(nil) - expect(subject.registrant_contacts[0].zip).to eq("90245") - expect(subject.registrant_contacts[0].state).to eq(nil) - expect(subject.registrant_contacts[0].country).to eq(nil) - expect(subject.registrant_contacts[0].country_code).to eq("US") - expect(subject.registrant_contacts[0].phone).to eq("+1.3102196200") - expect(subject.registrant_contacts[0].fax).to eq("+1.8665897214") - expect(subject.registrant_contacts[0].email).to eq("domainadmin@vantagemedia.com") - end - end - describe "#admin_contacts" do - it do - expect(subject.admin_contacts).to be_a(Array) - expect(subject.admin_contacts.size).to eq(1) - expect(subject.admin_contacts[0]).to be_a(Whois::Parser::Contact) - expect(subject.admin_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_ADMINISTRATIVE) - expect(subject.admin_contacts[0].id).to eq("H143205") - expect(subject.admin_contacts[0].name).to eq("Domain Administrator") - expect(subject.admin_contacts[0].organization).to eq("Vantage Media LLC") - expect(subject.admin_contacts[0].address).to eq("2101 Rosecrans Ave.\nSuite 2000") - expect(subject.admin_contacts[0].city).to eq(nil) - expect(subject.admin_contacts[0].zip).to eq("90245") - expect(subject.admin_contacts[0].state).to eq(nil) - expect(subject.admin_contacts[0].country).to eq(nil) - expect(subject.admin_contacts[0].country_code).to eq("US") - expect(subject.admin_contacts[0].phone).to eq("+1.3102196200") - expect(subject.admin_contacts[0].fax).to eq("+1.8665897214") - expect(subject.admin_contacts[0].email).to eq("domainadmin@vantagemedia.com") - end - end - describe "#technical_contacts" do - it do - expect(subject.technical_contacts).to be_a(Array) - expect(subject.technical_contacts.size).to eq(1) - expect(subject.technical_contacts[0]).to be_a(Whois::Parser::Contact) - expect(subject.technical_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_TECHNICAL) - expect(subject.technical_contacts[0].id).to eq("H143205") - expect(subject.technical_contacts[0].name).to eq("Domain Administrator") - expect(subject.technical_contacts[0].organization).to eq("Vantage Media LLC") - expect(subject.technical_contacts[0].address).to eq("2101 Rosecrans Ave.\nSuite 2000") - expect(subject.technical_contacts[0].city).to eq(nil) - expect(subject.technical_contacts[0].zip).to eq("90245") - expect(subject.technical_contacts[0].state).to eq(nil) - expect(subject.technical_contacts[0].country).to eq(nil) - expect(subject.technical_contacts[0].country_code).to eq("US") - expect(subject.technical_contacts[0].phone).to eq("+1.3102196200") - expect(subject.technical_contacts[0].fax).to eq("+1.8665897214") - expect(subject.technical_contacts[0].email).to eq("domainadmin@vantagemedia.com") - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers.size).to eq(4) - expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[0].name).to eq("ns1.p17.dynect.net") - expect(subject.nameservers[0].ipv4).to eq(nil) - expect(subject.nameservers[0].ipv6).to eq(nil) - expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[1].name).to eq("ns2.p17.dynect.net") - expect(subject.nameservers[1].ipv4).to eq(nil) - expect(subject.nameservers[1].ipv6).to eq(nil) - expect(subject.nameservers[2]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[2].name).to eq("ns3.p17.dynect.net") - expect(subject.nameservers[2].ipv4).to eq(nil) - expect(subject.nameservers[2].ipv6).to eq(nil) - expect(subject.nameservers[3]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[3].name).to eq("ns4.p17.dynect.net") - expect(subject.nameservers[3].ipv4).to eq(nil) - expect(subject.nameservers[3].ipv6).to eq(nil) - end + it "matches status_registered.expected" do + expect(subject.disclaimer).to eq("This whois service is provided by CentralNic Ltd and only contains information pertaining to Internet domain names we have registered for our customers. By using this service you are agreeing (1) not to use any information presented here for any purpose other than determining ownership of domain names, (2) not to store or reproduce this data in any way, (3) not to use any high-volume, automated, electronic processes to obtain data from this service. Abuse of this service is monitored and actions in contravention of these terms will result in being permanently blacklisted. All data is (c) CentralNic Ltd https://www.centralnic.com/") + expect(subject.domain).to eq("college.us.com") + expect(subject.domain_id).to eq("CNIC-DO275307") + expect(subject.status).to eq(["ok"]) + expect(subject.available?).to eq(false) + expect(subject.registered?).to eq(true) + expect(subject.created_on).to be_a(Time) + expect(subject.created_on).to eq(DateTime.parse("2003-10-20 10:03:28 UTC")) + expect(subject.updated_on).to be_a(Time) + expect(subject.updated_on).to eq(DateTime.parse("2012-01-16 16:27:26 UTC")) + expect(subject.expires_on).to be_a(Time) + expect(subject.expires_on).to eq(DateTime.parse("2014-10-20 23:59:59 UTC")) + expect(subject.registrar).to eq(nil) + expect(subject.registrant_contacts).to be_a(Array) + expect(subject.registrant_contacts.size).to eq(1) + expect(subject.registrant_contacts[0]).to be_a(Whois::Parser::Contact) + expect(subject.registrant_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_REGISTRANT) + expect(subject.registrant_contacts[0].id).to eq("H1044037") + expect(subject.registrant_contacts[0].name).to eq("Vantage Media Corporation") + expect(subject.registrant_contacts[0].organization).to eq(nil) + expect(subject.registrant_contacts[0].address).to eq("2101 Rosecrans Ave.\nSuite 2000") + expect(subject.registrant_contacts[0].city).to eq(nil) + expect(subject.registrant_contacts[0].zip).to eq("90245") + expect(subject.registrant_contacts[0].state).to eq(nil) + expect(subject.registrant_contacts[0].country).to eq(nil) + expect(subject.registrant_contacts[0].country_code).to eq("US") + expect(subject.registrant_contacts[0].phone).to eq("+1.3102196200") + expect(subject.registrant_contacts[0].fax).to eq("+1.8665897214") + expect(subject.registrant_contacts[0].email).to eq("domainadmin@vantagemedia.com") + expect(subject.admin_contacts).to be_a(Array) + expect(subject.admin_contacts.size).to eq(1) + expect(subject.admin_contacts[0]).to be_a(Whois::Parser::Contact) + expect(subject.admin_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_ADMINISTRATIVE) + expect(subject.admin_contacts[0].id).to eq("H143205") + expect(subject.admin_contacts[0].name).to eq("Domain Administrator") + expect(subject.admin_contacts[0].organization).to eq("Vantage Media LLC") + expect(subject.admin_contacts[0].address).to eq("2101 Rosecrans Ave.\nSuite 2000") + expect(subject.admin_contacts[0].city).to eq(nil) + expect(subject.admin_contacts[0].zip).to eq("90245") + expect(subject.admin_contacts[0].state).to eq(nil) + expect(subject.admin_contacts[0].country).to eq(nil) + expect(subject.admin_contacts[0].country_code).to eq("US") + expect(subject.admin_contacts[0].phone).to eq("+1.3102196200") + expect(subject.admin_contacts[0].fax).to eq("+1.8665897214") + expect(subject.admin_contacts[0].email).to eq("domainadmin@vantagemedia.com") + expect(subject.technical_contacts).to be_a(Array) + expect(subject.technical_contacts.size).to eq(1) + expect(subject.technical_contacts[0]).to be_a(Whois::Parser::Contact) + expect(subject.technical_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_TECHNICAL) + expect(subject.technical_contacts[0].id).to eq("H143205") + expect(subject.technical_contacts[0].name).to eq("Domain Administrator") + expect(subject.technical_contacts[0].organization).to eq("Vantage Media LLC") + expect(subject.technical_contacts[0].address).to eq("2101 Rosecrans Ave.\nSuite 2000") + expect(subject.technical_contacts[0].city).to eq(nil) + expect(subject.technical_contacts[0].zip).to eq("90245") + expect(subject.technical_contacts[0].state).to eq(nil) + expect(subject.technical_contacts[0].country).to eq(nil) + expect(subject.technical_contacts[0].country_code).to eq("US") + expect(subject.technical_contacts[0].phone).to eq("+1.3102196200") + expect(subject.technical_contacts[0].fax).to eq("+1.8665897214") + expect(subject.technical_contacts[0].email).to eq("domainadmin@vantagemedia.com") + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers.size).to eq(4) + expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[0].name).to eq("ns1.p17.dynect.net") + expect(subject.nameservers[0].ipv4).to eq(nil) + expect(subject.nameservers[0].ipv6).to eq(nil) + expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[1].name).to eq("ns2.p17.dynect.net") + expect(subject.nameservers[1].ipv4).to eq(nil) + expect(subject.nameservers[1].ipv6).to eq(nil) + expect(subject.nameservers[2]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[2].name).to eq("ns3.p17.dynect.net") + expect(subject.nameservers[2].ipv4).to eq(nil) + expect(subject.nameservers[2].ipv6).to eq(nil) + expect(subject.nameservers[3]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[3].name).to eq("ns4.p17.dynect.net") + expect(subject.nameservers[3].ipv4).to eq(nil) + expect(subject.nameservers[3].ipv6).to eq(nil) end end diff --git a/spec/whois/parsers/responses/whois.centralnic.com/us.org/status_available_spec.rb b/spec/whois/parsers/responses/whois.centralnic.com/us.org/status_available_spec.rb index 3c8f3235..df1bd549 100644 --- a/spec/whois/parsers/responses/whois.centralnic.com/us.org/status_available_spec.rb +++ b/spec/whois/parsers/responses/whois.centralnic.com/us.org/status_available_spec.rb @@ -11,88 +11,33 @@ # require 'spec_helper' -require 'whois/parsers/whois.centralnic.com.rb' -describe Whois::Parsers::WhoisCentralnicCom, "status_available.expected" do +describe "whois.centralnic.com", :aggregate_failures do subject do file = fixture("responses", "whois.centralnic.com/us.org/status_available.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.centralnic.com") + Whois::Parser.parser_for(part) end - describe "#disclaimer" do - it do - expect(subject.disclaimer).to eq(nil) - end - end - describe "#domain" do - it do - expect(subject.domain).to eq(nil) - end - end - describe "#domain_id" do - it do - expect(subject.domain_id).to eq(nil) - end - end - describe "#status" do - it do - expect(subject.status).to eq([]) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(true) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(false) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to eq(nil) - end - end - describe "#updated_on" do - it do - expect(subject.updated_on).to eq(nil) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to eq(nil) - end - end - describe "#registrar" do - it do - expect(subject.registrar).to eq(nil) - end - end - describe "#registrant_contacts" do - it do - expect(subject.registrant_contacts).to be_a(Array) - expect(subject.registrant_contacts).to eq([]) - end - end - describe "#admin_contacts" do - it do - expect(subject.admin_contacts).to be_a(Array) - expect(subject.admin_contacts).to eq([]) - end - end - describe "#technical_contacts" do - it do - expect(subject.technical_contacts).to be_a(Array) - expect(subject.technical_contacts).to eq([]) - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers).to eq([]) - end + it "matches status_available.expected" do + expect(subject.disclaimer).to eq(nil) + expect(subject.domain).to eq(nil) + expect(subject.domain_id).to eq(nil) + expect(subject.status).to eq([]) + expect(subject.available?).to eq(true) + expect(subject.registered?).to eq(false) + expect(subject.created_on).to eq(nil) + expect(subject.updated_on).to eq(nil) + expect(subject.expires_on).to eq(nil) + expect(subject.registrar).to eq(nil) + expect(subject.registrant_contacts).to be_a(Array) + expect(subject.registrant_contacts).to eq([]) + expect(subject.admin_contacts).to be_a(Array) + expect(subject.admin_contacts).to eq([]) + expect(subject.technical_contacts).to be_a(Array) + expect(subject.technical_contacts).to eq([]) + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers).to eq([]) end end diff --git a/spec/whois/parsers/responses/whois.centralnic.com/uy.com/status_available_spec.rb b/spec/whois/parsers/responses/whois.centralnic.com/uy.com/status_available_spec.rb index 8296e1c0..ea52b064 100644 --- a/spec/whois/parsers/responses/whois.centralnic.com/uy.com/status_available_spec.rb +++ b/spec/whois/parsers/responses/whois.centralnic.com/uy.com/status_available_spec.rb @@ -11,88 +11,33 @@ # require 'spec_helper' -require 'whois/parsers/whois.centralnic.com.rb' -describe Whois::Parsers::WhoisCentralnicCom, "status_available.expected" do +describe "whois.centralnic.com", :aggregate_failures do subject do file = fixture("responses", "whois.centralnic.com/uy.com/status_available.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.centralnic.com") + Whois::Parser.parser_for(part) end - describe "#disclaimer" do - it do - expect(subject.disclaimer).to eq(nil) - end - end - describe "#domain" do - it do - expect(subject.domain).to eq(nil) - end - end - describe "#domain_id" do - it do - expect(subject.domain_id).to eq(nil) - end - end - describe "#status" do - it do - expect(subject.status).to eq([]) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(true) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(false) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to eq(nil) - end - end - describe "#updated_on" do - it do - expect(subject.updated_on).to eq(nil) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to eq(nil) - end - end - describe "#registrar" do - it do - expect(subject.registrar).to eq(nil) - end - end - describe "#registrant_contacts" do - it do - expect(subject.registrant_contacts).to be_a(Array) - expect(subject.registrant_contacts).to eq([]) - end - end - describe "#admin_contacts" do - it do - expect(subject.admin_contacts).to be_a(Array) - expect(subject.admin_contacts).to eq([]) - end - end - describe "#technical_contacts" do - it do - expect(subject.technical_contacts).to be_a(Array) - expect(subject.technical_contacts).to eq([]) - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers).to eq([]) - end + it "matches status_available.expected" do + expect(subject.disclaimer).to eq(nil) + expect(subject.domain).to eq(nil) + expect(subject.domain_id).to eq(nil) + expect(subject.status).to eq([]) + expect(subject.available?).to eq(true) + expect(subject.registered?).to eq(false) + expect(subject.created_on).to eq(nil) + expect(subject.updated_on).to eq(nil) + expect(subject.expires_on).to eq(nil) + expect(subject.registrar).to eq(nil) + expect(subject.registrant_contacts).to be_a(Array) + expect(subject.registrant_contacts).to eq([]) + expect(subject.admin_contacts).to be_a(Array) + expect(subject.admin_contacts).to eq([]) + expect(subject.technical_contacts).to be_a(Array) + expect(subject.technical_contacts).to eq([]) + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers).to eq([]) end end diff --git a/spec/whois/parsers/responses/whois.centralnic.com/uy.com/status_registered_spec.rb b/spec/whois/parsers/responses/whois.centralnic.com/uy.com/status_registered_spec.rb index 7d7a4ce7..da82f12a 100644 --- a/spec/whois/parsers/responses/whois.centralnic.com/uy.com/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.centralnic.com/uy.com/status_registered_spec.rb @@ -11,140 +11,85 @@ # require 'spec_helper' -require 'whois/parsers/whois.centralnic.com.rb' -describe Whois::Parsers::WhoisCentralnicCom, "status_registered.expected" do +describe "whois.centralnic.com", :aggregate_failures do subject do file = fixture("responses", "whois.centralnic.com/uy.com/status_registered.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.centralnic.com") + Whois::Parser.parser_for(part) end - describe "#disclaimer" do - it do - expect(subject.disclaimer).to eq("This whois service is provided by CentralNic Ltd and only contains information pertaining to Internet domain names we have registered for our customers. By using this service you are agreeing (1) not to use any information presented here for any purpose other than determining ownership of domain names, (2) not to store or reproduce this data in any way, (3) not to use any high-volume, automated, electronic processes to obtain data from this service. Abuse of this service is monitored and actions in contravention of these terms will result in being permanently blacklisted. All data is (c) CentralNic Ltd https://www.centralnic.com/") - end - end - describe "#domain" do - it do - expect(subject.domain).to eq("bestb.uy.com") - end - end - describe "#domain_id" do - it do - expect(subject.domain_id).to eq("CNIC-DO493832") - end - end - describe "#status" do - it do - expect(subject.status).to eq(["ok"]) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(false) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(true) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to be_a(Time) - expect(subject.created_on).to eq(DateTime.parse("2007-07-12 13:49:25 UTC")) - end - end - describe "#updated_on" do - it do - expect(subject.updated_on).to be_a(Time) - expect(subject.updated_on).to eq(DateTime.parse("2013-07-10 00:27:20 UTC")) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to be_a(Time) - expect(subject.expires_on).to eq(DateTime.parse("2015-07-12 23:59:59 UTC")) - end - end - describe "#registrar" do - it do - expect(subject.registrar).to be_a(Whois::Parser::Registrar) - expect(subject.registrar.id).to eq("I6467") - expect(subject.registrar.name).to eq("Webfusion") - expect(subject.registrar.url).to eq("http://www.123-reg.co.uk/domain-names/") - end - end - describe "#registrant_contacts" do - it do - expect(subject.registrant_contacts).to be_a(Array) - expect(subject.registrant_contacts.size).to eq(1) - expect(subject.registrant_contacts[0]).to be_a(Whois::Parser::Contact) - expect(subject.registrant_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_REGISTRANT) - expect(subject.registrant_contacts[0].id).to eq("MNT32524959440") - expect(subject.registrant_contacts[0].name).to eq("Identity Protection Service") - expect(subject.registrant_contacts[0].organization).to eq("Identity Protect Limited") - expect(subject.registrant_contacts[0].address).to eq("PO Box 795") - expect(subject.registrant_contacts[0].city).to eq("Godalming") - expect(subject.registrant_contacts[0].zip).to eq("GU7 9GA") - expect(subject.registrant_contacts[0].state).to eq("Surrey") - expect(subject.registrant_contacts[0].country).to eq(nil) - expect(subject.registrant_contacts[0].country_code).to eq("GB") - expect(subject.registrant_contacts[0].phone).to eq("+44.1483307527") - expect(subject.registrant_contacts[0].fax).to eq("+44.1483304031") - expect(subject.registrant_contacts[0].email).to eq("bestb.uy.com@identity-protect.org") - end - end - describe "#admin_contacts" do - it do - expect(subject.admin_contacts).to be_a(Array) - expect(subject.admin_contacts.size).to eq(1) - expect(subject.admin_contacts[0]).to be_a(Whois::Parser::Contact) - expect(subject.admin_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_ADMINISTRATIVE) - expect(subject.admin_contacts[0].id).to eq("MNT32524959440") - expect(subject.admin_contacts[0].name).to eq("Identity Protection Service") - expect(subject.admin_contacts[0].organization).to eq("Identity Protect Limited") - expect(subject.admin_contacts[0].address).to eq("PO Box 795") - expect(subject.admin_contacts[0].city).to eq("Godalming") - expect(subject.admin_contacts[0].zip).to eq("GU7 9GA") - expect(subject.admin_contacts[0].state).to eq("Surrey") - expect(subject.admin_contacts[0].country).to eq(nil) - expect(subject.admin_contacts[0].country_code).to eq("GB") - expect(subject.admin_contacts[0].phone).to eq("+44.1483307527") - expect(subject.admin_contacts[0].fax).to eq("+44.1483304031") - expect(subject.admin_contacts[0].email).to eq("bestb.uy.com@identity-protect.org") - end - end - describe "#technical_contacts" do - it do - expect(subject.technical_contacts).to be_a(Array) - expect(subject.technical_contacts.size).to eq(1) - expect(subject.technical_contacts[0]).to be_a(Whois::Parser::Contact) - expect(subject.technical_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_TECHNICAL) - expect(subject.technical_contacts[0].id).to eq("MNT32524959440") - expect(subject.technical_contacts[0].name).to eq("Identity Protection Service") - expect(subject.technical_contacts[0].organization).to eq("Identity Protect Limited") - expect(subject.technical_contacts[0].address).to eq("PO Box 795") - expect(subject.technical_contacts[0].city).to eq("Godalming") - expect(subject.technical_contacts[0].zip).to eq("GU7 9GA") - expect(subject.technical_contacts[0].state).to eq("Surrey") - expect(subject.technical_contacts[0].country).to eq(nil) - expect(subject.technical_contacts[0].country_code).to eq("GB") - expect(subject.technical_contacts[0].phone).to eq("+44.1483307527") - expect(subject.technical_contacts[0].fax).to eq("+44.1483304031") - expect(subject.technical_contacts[0].email).to eq("bestb.uy.com@identity-protect.org") - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers.size).to eq(2) - expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[0].name).to eq("ns2.123-reg.co.uk") - expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[1].name).to eq("ns.123-reg.co.uk") - end + it "matches status_registered.expected" do + expect(subject.disclaimer).to eq("This whois service is provided by CentralNic Ltd and only contains information pertaining to Internet domain names we have registered for our customers. By using this service you are agreeing (1) not to use any information presented here for any purpose other than determining ownership of domain names, (2) not to store or reproduce this data in any way, (3) not to use any high-volume, automated, electronic processes to obtain data from this service. Abuse of this service is monitored and actions in contravention of these terms will result in being permanently blacklisted. All data is (c) CentralNic Ltd https://www.centralnic.com/") + expect(subject.domain).to eq("bestb.uy.com") + expect(subject.domain_id).to eq("CNIC-DO493832") + expect(subject.status).to eq(["ok"]) + expect(subject.available?).to eq(false) + expect(subject.registered?).to eq(true) + expect(subject.created_on).to be_a(Time) + expect(subject.created_on).to eq(DateTime.parse("2007-07-12 13:49:25 UTC")) + expect(subject.updated_on).to be_a(Time) + expect(subject.updated_on).to eq(DateTime.parse("2013-07-10 00:27:20 UTC")) + expect(subject.expires_on).to be_a(Time) + expect(subject.expires_on).to eq(DateTime.parse("2015-07-12 23:59:59 UTC")) + expect(subject.registrar).to be_a(Whois::Parser::Registrar) + expect(subject.registrar.id).to eq("I6467") + expect(subject.registrar.name).to eq("Webfusion") + expect(subject.registrar.url).to eq("http://www.123-reg.co.uk/domain-names/") + expect(subject.registrant_contacts).to be_a(Array) + expect(subject.registrant_contacts.size).to eq(1) + expect(subject.registrant_contacts[0]).to be_a(Whois::Parser::Contact) + expect(subject.registrant_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_REGISTRANT) + expect(subject.registrant_contacts[0].id).to eq("MNT32524959440") + expect(subject.registrant_contacts[0].name).to eq("Identity Protection Service") + expect(subject.registrant_contacts[0].organization).to eq("Identity Protect Limited") + expect(subject.registrant_contacts[0].address).to eq("PO Box 795") + expect(subject.registrant_contacts[0].city).to eq("Godalming") + expect(subject.registrant_contacts[0].zip).to eq("GU7 9GA") + expect(subject.registrant_contacts[0].state).to eq("Surrey") + expect(subject.registrant_contacts[0].country).to eq(nil) + expect(subject.registrant_contacts[0].country_code).to eq("GB") + expect(subject.registrant_contacts[0].phone).to eq("+44.1483307527") + expect(subject.registrant_contacts[0].fax).to eq("+44.1483304031") + expect(subject.registrant_contacts[0].email).to eq("bestb.uy.com@identity-protect.org") + expect(subject.admin_contacts).to be_a(Array) + expect(subject.admin_contacts.size).to eq(1) + expect(subject.admin_contacts[0]).to be_a(Whois::Parser::Contact) + expect(subject.admin_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_ADMINISTRATIVE) + expect(subject.admin_contacts[0].id).to eq("MNT32524959440") + expect(subject.admin_contacts[0].name).to eq("Identity Protection Service") + expect(subject.admin_contacts[0].organization).to eq("Identity Protect Limited") + expect(subject.admin_contacts[0].address).to eq("PO Box 795") + expect(subject.admin_contacts[0].city).to eq("Godalming") + expect(subject.admin_contacts[0].zip).to eq("GU7 9GA") + expect(subject.admin_contacts[0].state).to eq("Surrey") + expect(subject.admin_contacts[0].country).to eq(nil) + expect(subject.admin_contacts[0].country_code).to eq("GB") + expect(subject.admin_contacts[0].phone).to eq("+44.1483307527") + expect(subject.admin_contacts[0].fax).to eq("+44.1483304031") + expect(subject.admin_contacts[0].email).to eq("bestb.uy.com@identity-protect.org") + expect(subject.technical_contacts).to be_a(Array) + expect(subject.technical_contacts.size).to eq(1) + expect(subject.technical_contacts[0]).to be_a(Whois::Parser::Contact) + expect(subject.technical_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_TECHNICAL) + expect(subject.technical_contacts[0].id).to eq("MNT32524959440") + expect(subject.technical_contacts[0].name).to eq("Identity Protection Service") + expect(subject.technical_contacts[0].organization).to eq("Identity Protect Limited") + expect(subject.technical_contacts[0].address).to eq("PO Box 795") + expect(subject.technical_contacts[0].city).to eq("Godalming") + expect(subject.technical_contacts[0].zip).to eq("GU7 9GA") + expect(subject.technical_contacts[0].state).to eq("Surrey") + expect(subject.technical_contacts[0].country).to eq(nil) + expect(subject.technical_contacts[0].country_code).to eq("GB") + expect(subject.technical_contacts[0].phone).to eq("+44.1483307527") + expect(subject.technical_contacts[0].fax).to eq("+44.1483304031") + expect(subject.technical_contacts[0].email).to eq("bestb.uy.com@identity-protect.org") + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers.size).to eq(2) + expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[0].name).to eq("ns2.123-reg.co.uk") + expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[1].name).to eq("ns.123-reg.co.uk") end end diff --git a/spec/whois/parsers/responses/whois.centralnic.com/za.com/status_available_spec.rb b/spec/whois/parsers/responses/whois.centralnic.com/za.com/status_available_spec.rb index 5ee69009..61495049 100644 --- a/spec/whois/parsers/responses/whois.centralnic.com/za.com/status_available_spec.rb +++ b/spec/whois/parsers/responses/whois.centralnic.com/za.com/status_available_spec.rb @@ -11,88 +11,33 @@ # require 'spec_helper' -require 'whois/parsers/whois.centralnic.com.rb' -describe Whois::Parsers::WhoisCentralnicCom, "status_available.expected" do +describe "whois.centralnic.com", :aggregate_failures do subject do file = fixture("responses", "whois.centralnic.com/za.com/status_available.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.centralnic.com") + Whois::Parser.parser_for(part) end - describe "#disclaimer" do - it do - expect(subject.disclaimer).to eq(nil) - end - end - describe "#domain" do - it do - expect(subject.domain).to eq(nil) - end - end - describe "#domain_id" do - it do - expect(subject.domain_id).to eq(nil) - end - end - describe "#status" do - it do - expect(subject.status).to eq([]) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(true) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(false) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to eq(nil) - end - end - describe "#updated_on" do - it do - expect(subject.updated_on).to eq(nil) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to eq(nil) - end - end - describe "#registrar" do - it do - expect(subject.registrar).to eq(nil) - end - end - describe "#registrant_contacts" do - it do - expect(subject.registrant_contacts).to be_a(Array) - expect(subject.registrant_contacts).to eq([]) - end - end - describe "#admin_contacts" do - it do - expect(subject.admin_contacts).to be_a(Array) - expect(subject.admin_contacts).to eq([]) - end - end - describe "#technical_contacts" do - it do - expect(subject.technical_contacts).to be_a(Array) - expect(subject.technical_contacts).to eq([]) - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers).to eq([]) - end + it "matches status_available.expected" do + expect(subject.disclaimer).to eq(nil) + expect(subject.domain).to eq(nil) + expect(subject.domain_id).to eq(nil) + expect(subject.status).to eq([]) + expect(subject.available?).to eq(true) + expect(subject.registered?).to eq(false) + expect(subject.created_on).to eq(nil) + expect(subject.updated_on).to eq(nil) + expect(subject.expires_on).to eq(nil) + expect(subject.registrar).to eq(nil) + expect(subject.registrant_contacts).to be_a(Array) + expect(subject.registrant_contacts).to eq([]) + expect(subject.admin_contacts).to be_a(Array) + expect(subject.admin_contacts).to eq([]) + expect(subject.technical_contacts).to be_a(Array) + expect(subject.technical_contacts).to eq([]) + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers).to eq([]) end end diff --git a/spec/whois/parsers/responses/whois.centralnic.com/za.com/status_registered_spec.rb b/spec/whois/parsers/responses/whois.centralnic.com/za.com/status_registered_spec.rb index 92e09c60..681268b3 100644 --- a/spec/whois/parsers/responses/whois.centralnic.com/za.com/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.centralnic.com/za.com/status_registered_spec.rb @@ -11,140 +11,85 @@ # require 'spec_helper' -require 'whois/parsers/whois.centralnic.com.rb' -describe Whois::Parsers::WhoisCentralnicCom, "status_registered.expected" do +describe "whois.centralnic.com", :aggregate_failures do subject do file = fixture("responses", "whois.centralnic.com/za.com/status_registered.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.centralnic.com") + Whois::Parser.parser_for(part) end - describe "#disclaimer" do - it do - expect(subject.disclaimer).to eq("This whois service is provided by CentralNic Ltd and only contains information pertaining to Internet domain names we have registered for our customers. By using this service you are agreeing (1) not to use any information presented here for any purpose other than determining ownership of domain names, (2) not to store or reproduce this data in any way, (3) not to use any high-volume, automated, electronic processes to obtain data from this service. Abuse of this service is monitored and actions in contravention of these terms will result in being permanently blacklisted. All data is (c) CentralNic Ltd https://www.centralnic.com/") - end - end - describe "#domain" do - it do - expect(subject.domain).to eq("siyenza.za.com") - end - end - describe "#domain_id" do - it do - expect(subject.domain_id).to eq("CNIC-DO333077") - end - end - describe "#status" do - it do - expect(subject.status).to eq(["ok"]) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(false) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(true) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to be_a(Time) - expect(subject.created_on).to eq(DateTime.parse("2004-11-17 11:47:29 UTC")) - end - end - describe "#updated_on" do - it do - expect(subject.updated_on).to be_a(Time) - expect(subject.updated_on).to eq(DateTime.parse("2013-12-03 12:33:13 UTC")) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to be_a(Time) - expect(subject.expires_on).to eq(DateTime.parse("2014-11-17 23:59:59 UTC")) - end - end - describe "#registrar" do - it do - expect(subject.registrar).to be_a(Whois::Parser::Registrar) - expect(subject.registrar.id).to eq("C12112") - expect(subject.registrar.name).to eq("Megaweb Internet Services") - expect(subject.registrar.url).to eq("http://www.megaweb.co.za/") - end - end - describe "#registrant_contacts" do - it do - expect(subject.registrant_contacts).to be_a(Array) - expect(subject.registrant_contacts.size).to eq(1) - expect(subject.registrant_contacts[0]).to be_a(Whois::Parser::Contact) - expect(subject.registrant_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_REGISTRANT) - expect(subject.registrant_contacts[0].id).to eq("H1063006") - expect(subject.registrant_contacts[0].name).to eq("MegaWeb Internet Services cc") - expect(subject.registrant_contacts[0].organization).to eq(nil) - expect(subject.registrant_contacts[0].address).to eq("PO Box 3738\nCramerview") - expect(subject.registrant_contacts[0].city).to eq(nil) - expect(subject.registrant_contacts[0].zip).to eq("2060") - expect(subject.registrant_contacts[0].state).to eq(nil) - expect(subject.registrant_contacts[0].country).to eq(nil) - expect(subject.registrant_contacts[0].country_code).to eq("ZA") - expect(subject.registrant_contacts[0].phone).to eq("+27.0114851984") - expect(subject.registrant_contacts[0].fax).to eq("+27.0114855999") - expect(subject.registrant_contacts[0].email).to eq("dns-admin@megaweb.co.za") - end - end - describe "#admin_contacts" do - it do - expect(subject.admin_contacts).to be_a(Array) - expect(subject.admin_contacts.size).to eq(1) - expect(subject.admin_contacts[0]).to be_a(Whois::Parser::Contact) - expect(subject.admin_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_ADMINISTRATIVE) - expect(subject.admin_contacts[0].id).to eq("H119106") - expect(subject.admin_contacts[0].name).to eq("Liz Hart") - expect(subject.admin_contacts[0].organization).to eq("Siyenza Management") - expect(subject.admin_contacts[0].address).to eq("PO Box 3738\nCramerview") - expect(subject.admin_contacts[0].city).to eq(nil) - expect(subject.admin_contacts[0].zip).to eq("2060") - expect(subject.admin_contacts[0].state).to eq(nil) - expect(subject.admin_contacts[0].country).to eq(nil) - expect(subject.admin_contacts[0].country_code).to eq("ZA") - expect(subject.admin_contacts[0].phone).to eq("+27.0114851984") - expect(subject.admin_contacts[0].fax).to eq("+27.0114855999") - expect(subject.admin_contacts[0].email).to eq("dns-admin@megaweb.co.za") - end - end - describe "#technical_contacts" do - it do - expect(subject.technical_contacts).to be_a(Array) - expect(subject.technical_contacts.size).to eq(1) - expect(subject.technical_contacts[0]).to be_a(Whois::Parser::Contact) - expect(subject.technical_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_TECHNICAL) - expect(subject.technical_contacts[0].id).to eq("C12112") - expect(subject.technical_contacts[0].name).to eq("Laida Peters") - expect(subject.technical_contacts[0].organization).to eq("Megaweb Internet Services") - expect(subject.technical_contacts[0].address).to eq(nil) - expect(subject.technical_contacts[0].city).to eq("Gauteng") - expect(subject.technical_contacts[0].zip).to eq("2192") - expect(subject.technical_contacts[0].state).to eq(nil) - expect(subject.technical_contacts[0].country).to eq(nil) - expect(subject.technical_contacts[0].country_code).to eq("ZA") - expect(subject.technical_contacts[0].phone).to eq("+27.027114851984") - expect(subject.technical_contacts[0].fax).to eq("+27.027114851986") - expect(subject.technical_contacts[0].email).to eq("dns-admin@megaweb.co.za") - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers.size).to eq(2) - expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[0].name).to eq("ns1a.your-server.co.za") - expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[1].name).to eq("nsa.second-ns.co.za") - end + it "matches status_registered.expected" do + expect(subject.disclaimer).to eq("This whois service is provided by CentralNic Ltd and only contains information pertaining to Internet domain names we have registered for our customers. By using this service you are agreeing (1) not to use any information presented here for any purpose other than determining ownership of domain names, (2) not to store or reproduce this data in any way, (3) not to use any high-volume, automated, electronic processes to obtain data from this service. Abuse of this service is monitored and actions in contravention of these terms will result in being permanently blacklisted. All data is (c) CentralNic Ltd https://www.centralnic.com/") + expect(subject.domain).to eq("siyenza.za.com") + expect(subject.domain_id).to eq("CNIC-DO333077") + expect(subject.status).to eq(["ok"]) + expect(subject.available?).to eq(false) + expect(subject.registered?).to eq(true) + expect(subject.created_on).to be_a(Time) + expect(subject.created_on).to eq(DateTime.parse("2004-11-17 11:47:29 UTC")) + expect(subject.updated_on).to be_a(Time) + expect(subject.updated_on).to eq(DateTime.parse("2013-12-03 12:33:13 UTC")) + expect(subject.expires_on).to be_a(Time) + expect(subject.expires_on).to eq(DateTime.parse("2014-11-17 23:59:59 UTC")) + expect(subject.registrar).to be_a(Whois::Parser::Registrar) + expect(subject.registrar.id).to eq("C12112") + expect(subject.registrar.name).to eq("Megaweb Internet Services") + expect(subject.registrar.url).to eq("http://www.megaweb.co.za/") + expect(subject.registrant_contacts).to be_a(Array) + expect(subject.registrant_contacts.size).to eq(1) + expect(subject.registrant_contacts[0]).to be_a(Whois::Parser::Contact) + expect(subject.registrant_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_REGISTRANT) + expect(subject.registrant_contacts[0].id).to eq("H1063006") + expect(subject.registrant_contacts[0].name).to eq("MegaWeb Internet Services cc") + expect(subject.registrant_contacts[0].organization).to eq(nil) + expect(subject.registrant_contacts[0].address).to eq("PO Box 3738\nCramerview") + expect(subject.registrant_contacts[0].city).to eq(nil) + expect(subject.registrant_contacts[0].zip).to eq("2060") + expect(subject.registrant_contacts[0].state).to eq(nil) + expect(subject.registrant_contacts[0].country).to eq(nil) + expect(subject.registrant_contacts[0].country_code).to eq("ZA") + expect(subject.registrant_contacts[0].phone).to eq("+27.0114851984") + expect(subject.registrant_contacts[0].fax).to eq("+27.0114855999") + expect(subject.registrant_contacts[0].email).to eq("dns-admin@megaweb.co.za") + expect(subject.admin_contacts).to be_a(Array) + expect(subject.admin_contacts.size).to eq(1) + expect(subject.admin_contacts[0]).to be_a(Whois::Parser::Contact) + expect(subject.admin_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_ADMINISTRATIVE) + expect(subject.admin_contacts[0].id).to eq("H119106") + expect(subject.admin_contacts[0].name).to eq("Liz Hart") + expect(subject.admin_contacts[0].organization).to eq("Siyenza Management") + expect(subject.admin_contacts[0].address).to eq("PO Box 3738\nCramerview") + expect(subject.admin_contacts[0].city).to eq(nil) + expect(subject.admin_contacts[0].zip).to eq("2060") + expect(subject.admin_contacts[0].state).to eq(nil) + expect(subject.admin_contacts[0].country).to eq(nil) + expect(subject.admin_contacts[0].country_code).to eq("ZA") + expect(subject.admin_contacts[0].phone).to eq("+27.0114851984") + expect(subject.admin_contacts[0].fax).to eq("+27.0114855999") + expect(subject.admin_contacts[0].email).to eq("dns-admin@megaweb.co.za") + expect(subject.technical_contacts).to be_a(Array) + expect(subject.technical_contacts.size).to eq(1) + expect(subject.technical_contacts[0]).to be_a(Whois::Parser::Contact) + expect(subject.technical_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_TECHNICAL) + expect(subject.technical_contacts[0].id).to eq("C12112") + expect(subject.technical_contacts[0].name).to eq("Laida Peters") + expect(subject.technical_contacts[0].organization).to eq("Megaweb Internet Services") + expect(subject.technical_contacts[0].address).to eq(nil) + expect(subject.technical_contacts[0].city).to eq("Gauteng") + expect(subject.technical_contacts[0].zip).to eq("2192") + expect(subject.technical_contacts[0].state).to eq(nil) + expect(subject.technical_contacts[0].country).to eq(nil) + expect(subject.technical_contacts[0].country_code).to eq("ZA") + expect(subject.technical_contacts[0].phone).to eq("+27.027114851984") + expect(subject.technical_contacts[0].fax).to eq("+27.027114851986") + expect(subject.technical_contacts[0].email).to eq("dns-admin@megaweb.co.za") + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers.size).to eq(2) + expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[0].name).to eq("ns1a.your-server.co.za") + expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[1].name).to eq("nsa.second-ns.co.za") end end diff --git a/spec/whois/parsers/responses/whois.cira.ca/ca/status_available_spec.rb b/spec/whois/parsers/responses/whois.cira.ca/ca/status_available_spec.rb index 0d097b3a..d1217188 100644 --- a/spec/whois/parsers/responses/whois.cira.ca/ca/status_available_spec.rb +++ b/spec/whois/parsers/responses/whois.cira.ca/ca/status_available_spec.rb @@ -11,88 +11,33 @@ # require 'spec_helper' -require 'whois/parsers/whois.cira.ca.rb' -describe Whois::Parsers::WhoisCiraCa, "status_available.expected" do +describe "whois.cira.ca", :aggregate_failures do subject do file = fixture("responses", "whois.cira.ca/ca/status_available.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.cira.ca") + Whois::Parser.parser_for(part) end - describe "#disclaimer" do - it do - expect(subject.disclaimer).to eq("Use of CIRA's WHOIS service is governed by the Terms of Use in its Legal Notice, available at http://www.cira.ca/legal-notice/?lang=en (c) 2021 Canadian Internet Registration Authority, (http://www.cira.ca/)") - end - end - describe "#domain" do - it do - expect(subject.domain).to eq("u34jedzcq.ca") - end - end - describe "#domain_id" do - it do - expect(subject.domain_id).to eq(nil) - end - end - describe "#status" do - it do - expect(subject.status).to eq(:available) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(true) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(false) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to eq(nil) - end - end - describe "#updated_on" do - it do - expect(subject.updated_on).to eq(nil) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to eq(nil) - end - end - describe "#registrar" do - it do - expect(subject.registrar).to eq(nil) - end - end - describe "#registrant_contacts" do - it do - expect(subject.registrant_contacts).to be_a(Array) - expect(subject.registrant_contacts).to eq([]) - end - end - describe "#admin_contacts" do - it do - expect(subject.admin_contacts).to be_a(Array) - expect(subject.admin_contacts).to eq([]) - end - end - describe "#technical_contacts" do - it do - expect(subject.technical_contacts).to be_a(Array) - expect(subject.technical_contacts).to eq([]) - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers).to eq([]) - end + it "matches status_available.expected" do + expect(subject.disclaimer).to eq("Use of CIRA's WHOIS service is governed by the Terms of Use in its Legal Notice, available at http://www.cira.ca/legal-notice/?lang=en (c) 2021 Canadian Internet Registration Authority, (http://www.cira.ca/)") + expect(subject.domain).to eq("u34jedzcq.ca") + expect(subject.domain_id).to eq(nil) + expect(subject.status).to eq(:available) + expect(subject.available?).to eq(true) + expect(subject.registered?).to eq(false) + expect(subject.created_on).to eq(nil) + expect(subject.updated_on).to eq(nil) + expect(subject.expires_on).to eq(nil) + expect(subject.registrar).to eq(nil) + expect(subject.registrant_contacts).to be_a(Array) + expect(subject.registrant_contacts).to eq([]) + expect(subject.admin_contacts).to be_a(Array) + expect(subject.admin_contacts).to eq([]) + expect(subject.technical_contacts).to be_a(Array) + expect(subject.technical_contacts).to eq([]) + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers).to eq([]) end end diff --git a/spec/whois/parsers/responses/whois.cira.ca/ca/status_registered_spec.rb b/spec/whois/parsers/responses/whois.cira.ca/ca/status_registered_spec.rb index bfacaf43..a07b77c7 100644 --- a/spec/whois/parsers/responses/whois.cira.ca/ca/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.cira.ca/ca/status_registered_spec.rb @@ -11,141 +11,86 @@ # require 'spec_helper' -require 'whois/parsers/whois.cira.ca.rb' -describe Whois::Parsers::WhoisCiraCa, "status_registered.expected" do +describe "whois.cira.ca", :aggregate_failures do subject do file = fixture("responses", "whois.cira.ca/ca/status_registered.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.cira.ca") + Whois::Parser.parser_for(part) end - describe "#disclaimer" do - it do - expect(subject.disclaimer).to eq("Use of CIRA's WHOIS service is governed by the Terms of Use in its Legal Notice, available at http://www.cira.ca/legal-notice/?lang=en (c) 2021 Canadian Internet Registration Authority, (http://www.cira.ca/)") - end - end - describe "#domain" do - it do - expect(subject.domain).to eq("google.ca") - end - end - describe "#domain_id" do - it do - expect(subject.domain_id).to eq("D73081-CIRA") - end - end - describe "#status" do - it do - expect(subject.status).to eq(:registered) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(false) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(true) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to be_a(Time) - expect(subject.created_on).to eq(DateTime.parse("2000-10-04 02:21:23 UTC")) - end - end - describe "#updated_on" do - it do - expect(subject.updated_on).to be_a(Time) - expect(subject.updated_on).to eq(DateTime.parse("2021-04-28 04:04:12 UTC")) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to be_a(Time) - expect(subject.expires_on).to eq(DateTime.parse("2022-04-28 04:00:00 UTC")) - end - end - describe "#registrar" do - it do - expect(subject.registrar).to be_a(Whois::Parser::Registrar) - expect(subject.registrar.id).to eq("not applicable") - expect(subject.registrar.name).to eq("MarkMonitor International Canada Ltd.") - expect(subject.registrar.url).to eq("Markmonitor.com") - end - end - describe "#registrant_contacts" do - it do - expect(subject.registrant_contacts).to be_a(Array) - expect(subject.registrant_contacts.size).to eq(1) - expect(subject.registrant_contacts[0]).to be_a(Whois::Parser::Contact) - expect(subject.registrant_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_REGISTRANT) - expect(subject.registrant_contacts[0].id).to eq("59969059-CIRA") - expect(subject.registrant_contacts[0].name).to eq("Google LLC - TMA868122") - expect(subject.registrant_contacts[0].organization).to eq("") - expect(subject.registrant_contacts[0].address).to eq("1600 Amphitheatre Parkway") - expect(subject.registrant_contacts[0].city).to eq("Mountain View") - expect(subject.registrant_contacts[0].zip).to eq("94043") - expect(subject.registrant_contacts[0].state).to eq("CA") - expect(subject.registrant_contacts[0].country_code).to eq("US") - expect(subject.registrant_contacts[0].phone).to eq("+1.6502530000") - expect(subject.registrant_contacts[0].fax).to eq("") - expect(subject.registrant_contacts[0].email).to eq("dns-admin@google.com") - end - end - describe "#admin_contacts" do - it do - expect(subject.admin_contacts).to be_a(Array) - expect(subject.admin_contacts.size).to eq(1) - expect(subject.admin_contacts[0]).to be_a(Whois::Parser::Contact) - expect(subject.admin_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_ADMINISTRATIVE) - expect(subject.admin_contacts[0].id).to eq("59969161-CIRA") - expect(subject.admin_contacts[0].name).to eq("Lauren Johnston") - expect(subject.admin_contacts[0].organization).to eq("Google LLC") - expect(subject.admin_contacts[0].address).to eq("1600 Amphitheatre Parkway") - expect(subject.admin_contacts[0].city).to eq("Mountain View") - expect(subject.admin_contacts[0].zip).to eq("94043") - expect(subject.admin_contacts[0].state).to eq("CA") - expect(subject.admin_contacts[0].country_code).to eq("US") - expect(subject.admin_contacts[0].phone).to eq("+1.6502530000") - expect(subject.admin_contacts[0].fax).to eq("") - expect(subject.admin_contacts[0].email).to eq("dns-admin@google.com") - end - end - describe "#technical_contacts" do - it do - expect(subject.technical_contacts).to be_a(Array) - expect(subject.technical_contacts.size).to eq(1) - expect(subject.technical_contacts[0]).to be_a(Whois::Parser::Contact) - expect(subject.technical_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_TECHNICAL) - expect(subject.technical_contacts[0].id).to eq("59969161-CIRA") - expect(subject.technical_contacts[0].name).to eq("Lauren Johnston") - expect(subject.technical_contacts[0].organization).to eq("Google LLC") - expect(subject.technical_contacts[0].address).to eq("1600 Amphitheatre Parkway") - expect(subject.technical_contacts[0].city).to eq("Mountain View") - expect(subject.technical_contacts[0].zip).to eq("94043") - expect(subject.technical_contacts[0].state).to eq("CA") - expect(subject.technical_contacts[0].country_code).to eq("US") - expect(subject.technical_contacts[0].phone).to eq("+1.6502530000") - expect(subject.technical_contacts[0].fax).to eq("") - expect(subject.technical_contacts[0].email).to eq("dns-admin@google.com") - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers.size).to eq(4) - expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[0].name).to eq("ns1.google.com") - expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[1].name).to eq("ns2.google.com") - expect(subject.nameservers[2]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[2].name).to eq("ns3.google.com") - expect(subject.nameservers[3]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[3].name).to eq("ns4.google.com") - end + it "matches status_registered.expected" do + expect(subject.disclaimer).to eq("Use of CIRA's WHOIS service is governed by the Terms of Use in its Legal Notice, available at http://www.cira.ca/legal-notice/?lang=en (c) 2021 Canadian Internet Registration Authority, (http://www.cira.ca/)") + expect(subject.domain).to eq("google.ca") + expect(subject.domain_id).to eq("D73081-CIRA") + expect(subject.status).to eq(:registered) + expect(subject.available?).to eq(false) + expect(subject.registered?).to eq(true) + expect(subject.created_on).to be_a(Time) + expect(subject.created_on).to eq(DateTime.parse("2000-10-04 02:21:23 UTC")) + expect(subject.updated_on).to be_a(Time) + expect(subject.updated_on).to eq(DateTime.parse("2021-04-28 04:04:12 UTC")) + expect(subject.expires_on).to be_a(Time) + expect(subject.expires_on).to eq(DateTime.parse("2022-04-28 04:00:00 UTC")) + expect(subject.registrar).to be_a(Whois::Parser::Registrar) + expect(subject.registrar.id).to eq("not applicable") + expect(subject.registrar.name).to eq("MarkMonitor International Canada Ltd.") + expect(subject.registrar.url).to eq("Markmonitor.com") + expect(subject.registrant_contacts).to be_a(Array) + expect(subject.registrant_contacts.size).to eq(1) + expect(subject.registrant_contacts[0]).to be_a(Whois::Parser::Contact) + expect(subject.registrant_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_REGISTRANT) + expect(subject.registrant_contacts[0].id).to eq("59969059-CIRA") + expect(subject.registrant_contacts[0].name).to eq("Google LLC - TMA868122") + expect(subject.registrant_contacts[0].organization).to eq("") + expect(subject.registrant_contacts[0].address).to eq("1600 Amphitheatre Parkway") + expect(subject.registrant_contacts[0].city).to eq("Mountain View") + expect(subject.registrant_contacts[0].zip).to eq("94043") + expect(subject.registrant_contacts[0].state).to eq("CA") + expect(subject.registrant_contacts[0].country_code).to eq("US") + expect(subject.registrant_contacts[0].phone).to eq("+1.6502530000") + expect(subject.registrant_contacts[0].fax).to eq("") + expect(subject.registrant_contacts[0].email).to eq("dns-admin@google.com") + expect(subject.admin_contacts).to be_a(Array) + expect(subject.admin_contacts.size).to eq(1) + expect(subject.admin_contacts[0]).to be_a(Whois::Parser::Contact) + expect(subject.admin_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_ADMINISTRATIVE) + expect(subject.admin_contacts[0].id).to eq("59969161-CIRA") + expect(subject.admin_contacts[0].name).to eq("Lauren Johnston") + expect(subject.admin_contacts[0].organization).to eq("Google LLC") + expect(subject.admin_contacts[0].address).to eq("1600 Amphitheatre Parkway") + expect(subject.admin_contacts[0].city).to eq("Mountain View") + expect(subject.admin_contacts[0].zip).to eq("94043") + expect(subject.admin_contacts[0].state).to eq("CA") + expect(subject.admin_contacts[0].country_code).to eq("US") + expect(subject.admin_contacts[0].phone).to eq("+1.6502530000") + expect(subject.admin_contacts[0].fax).to eq("") + expect(subject.admin_contacts[0].email).to eq("dns-admin@google.com") + expect(subject.technical_contacts).to be_a(Array) + expect(subject.technical_contacts.size).to eq(1) + expect(subject.technical_contacts[0]).to be_a(Whois::Parser::Contact) + expect(subject.technical_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_TECHNICAL) + expect(subject.technical_contacts[0].id).to eq("59969161-CIRA") + expect(subject.technical_contacts[0].name).to eq("Lauren Johnston") + expect(subject.technical_contacts[0].organization).to eq("Google LLC") + expect(subject.technical_contacts[0].address).to eq("1600 Amphitheatre Parkway") + expect(subject.technical_contacts[0].city).to eq("Mountain View") + expect(subject.technical_contacts[0].zip).to eq("94043") + expect(subject.technical_contacts[0].state).to eq("CA") + expect(subject.technical_contacts[0].country_code).to eq("US") + expect(subject.technical_contacts[0].phone).to eq("+1.6502530000") + expect(subject.technical_contacts[0].fax).to eq("") + expect(subject.technical_contacts[0].email).to eq("dns-admin@google.com") + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers.size).to eq(4) + expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[0].name).to eq("ns1.google.com") + expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[1].name).to eq("ns2.google.com") + expect(subject.nameservers[2]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[2].name).to eq("ns3.google.com") + expect(subject.nameservers[3]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[3].name).to eq("ns4.google.com") end end diff --git a/spec/whois/parsers/responses/whois.cira.ca/ca/status_reserved_spec.rb b/spec/whois/parsers/responses/whois.cira.ca/ca/status_reserved_spec.rb index 9ccbd9ba..f092fc1b 100644 --- a/spec/whois/parsers/responses/whois.cira.ca/ca/status_reserved_spec.rb +++ b/spec/whois/parsers/responses/whois.cira.ca/ca/status_reserved_spec.rb @@ -11,88 +11,33 @@ # require 'spec_helper' -require 'whois/parsers/whois.cira.ca.rb' -describe Whois::Parsers::WhoisCiraCa, "status_reserved.expected" do +describe "whois.cira.ca", :aggregate_failures do subject do file = fixture("responses", "whois.cira.ca/ca/status_reserved.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.cira.ca") + Whois::Parser.parser_for(part) end - describe "#disclaimer" do - it do - expect(subject.disclaimer).to eq("Use of CIRA's WHOIS service is governed by the Terms of Use in its Legal Notice, available at http://www.cira.ca/legal-notice/?lang=en (c) 2021 Canadian Internet Registration Authority, (http://www.cira.ca/)") - end - end - describe "#domain" do - it do - expect(subject.domain).to eq(nil) - end - end - describe "#domain_id" do - it do - expect(subject.domain_id).to eq(nil) - end - end - describe "#status" do - it do - expect(subject.status).to eq(:reserved) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(false) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(true) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to eq(nil) - end - end - describe "#updated_on" do - it do - expect(subject.updated_on).to eq(nil) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to eq(nil) - end - end - describe "#registrar" do - it do - expect(subject.registrar).to eq(nil) - end - end - describe "#registrant_contacts" do - it do - expect(subject.registrant_contacts).to be_a(Array) - expect(subject.registrant_contacts).to eq([]) - end - end - describe "#admin_contacts" do - it do - expect(subject.admin_contacts).to be_a(Array) - expect(subject.admin_contacts).to eq([]) - end - end - describe "#technical_contacts" do - it do - expect(subject.technical_contacts).to be_a(Array) - expect(subject.technical_contacts).to eq([]) - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers).to eq([]) - end + it "matches status_reserved.expected" do + expect(subject.disclaimer).to eq("Use of CIRA's WHOIS service is governed by the Terms of Use in its Legal Notice, available at http://www.cira.ca/legal-notice/?lang=en (c) 2021 Canadian Internet Registration Authority, (http://www.cira.ca/)") + expect(subject.domain).to eq(nil) + expect(subject.domain_id).to eq(nil) + expect(subject.status).to eq(:reserved) + expect(subject.available?).to eq(false) + expect(subject.registered?).to eq(true) + expect(subject.created_on).to eq(nil) + expect(subject.updated_on).to eq(nil) + expect(subject.expires_on).to eq(nil) + expect(subject.registrar).to eq(nil) + expect(subject.registrant_contacts).to be_a(Array) + expect(subject.registrant_contacts).to eq([]) + expect(subject.admin_contacts).to be_a(Array) + expect(subject.admin_contacts).to eq([]) + expect(subject.technical_contacts).to be_a(Array) + expect(subject.technical_contacts).to eq([]) + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers).to eq([]) end end diff --git a/spec/whois/parsers/responses/whois.cmc.iq/iq/status_available_spec.rb b/spec/whois/parsers/responses/whois.cmc.iq/iq/status_available_spec.rb index 737ef968..aa1a087e 100644 --- a/spec/whois/parsers/responses/whois.cmc.iq/iq/status_available_spec.rb +++ b/spec/whois/parsers/responses/whois.cmc.iq/iq/status_available_spec.rb @@ -11,65 +11,26 @@ # require 'spec_helper' -require 'whois/parsers/whois.cmc.iq.rb' -describe Whois::Parsers::WhoisCmcIq, "status_available.expected" do +describe "whois.cmc.iq", :aggregate_failures do subject do file = fixture("responses", "whois.cmc.iq/iq/status_available.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.cmc.iq") + Whois::Parser.parser_for(part) end - describe "#domain" do - it do - expect(subject.domain).to eq("u34jedzcq.iq") - end - end - describe "#domain_id" do - it do - expect(subject.domain_id).to eq(nil) - end - end - describe "#status" do - it do - expect(subject.status).to eq(:available) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(true) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(false) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to eq(nil) - end - end - describe "#updated_on" do - it do - expect(subject.updated_on).to eq(nil) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to eq(nil) - end - end - describe "#registrar" do - it do - expect(subject.registrar).to eq(nil) - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers).to eq([]) - end + it "matches status_available.expected" do + expect(subject.domain).to eq("u34jedzcq.iq") + expect(subject.domain_id).to eq(nil) + expect(subject.status).to eq(:available) + expect(subject.available?).to eq(true) + expect(subject.registered?).to eq(false) + expect(subject.created_on).to eq(nil) + expect(subject.updated_on).to eq(nil) + expect(subject.expires_on).to eq(nil) + expect(subject.registrar).to eq(nil) + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers).to eq([]) end end diff --git a/spec/whois/parsers/responses/whois.cmc.iq/iq/status_registered_spec.rb b/spec/whois/parsers/responses/whois.cmc.iq/iq/status_registered_spec.rb index e57c53a0..216fd209 100644 --- a/spec/whois/parsers/responses/whois.cmc.iq/iq/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.cmc.iq/iq/status_registered_spec.rb @@ -11,87 +11,48 @@ # require 'spec_helper' -require 'whois/parsers/whois.cmc.iq.rb' -describe Whois::Parsers::WhoisCmcIq, "status_registered.expected" do +describe "whois.cmc.iq", :aggregate_failures do subject do file = fixture("responses", "whois.cmc.iq/iq/status_registered.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.cmc.iq") + Whois::Parser.parser_for(part) end - describe "#domain" do - it do - expect(subject.domain).to eq("google.iq") - end - end - describe "#domain_id" do - it do - expect(subject.domain_id).to eq("895-CoCCA") - end - end - describe "#status" do - it do - expect(subject.status).to eq(:registered) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(false) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(true) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to be_a(Time) - expect(subject.created_on).to eq(DateTime.parse("2010-10-03 21:00:00 UTC")) - end - end - describe "#updated_on" do - it do - expect(subject.updated_on).to be_a(Time) - expect(subject.updated_on).to eq(DateTime.parse("2013-09-29 05:19:04 UTC")) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to be_a(Time) - expect(subject.expires_on).to eq(DateTime.parse("2014-10-02 21:00:00 UTC")) - end - end - describe "#registrar" do - it do - expect(subject.registrar).to be_a(Whois::Parser::Registrar) - expect(subject.registrar.id).to eq(nil) - expect(subject.registrar.name).to eq("CMC Registrar") - expect(subject.registrar.url).to eq(nil) - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers.size).to eq(4) - expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[0].name).to eq("ns1.google.com") - expect(subject.nameservers[0].ipv4).to eq(nil) - expect(subject.nameservers[0].ipv6).to eq(nil) - expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[1].name).to eq("ns2.google.com") - expect(subject.nameservers[1].ipv4).to eq(nil) - expect(subject.nameservers[1].ipv6).to eq(nil) - expect(subject.nameservers[2]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[2].name).to eq("ns3.google.com") - expect(subject.nameservers[2].ipv4).to eq(nil) - expect(subject.nameservers[2].ipv6).to eq(nil) - expect(subject.nameservers[3]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[3].name).to eq("ns4.google.com") - expect(subject.nameservers[3].ipv4).to eq(nil) - expect(subject.nameservers[3].ipv6).to eq(nil) - end + it "matches status_registered.expected" do + expect(subject.domain).to eq("google.iq") + expect(subject.domain_id).to eq("895-CoCCA") + expect(subject.status).to eq(:registered) + expect(subject.available?).to eq(false) + expect(subject.registered?).to eq(true) + expect(subject.created_on).to be_a(Time) + expect(subject.created_on).to eq(DateTime.parse("2010-10-03 21:00:00 UTC")) + expect(subject.updated_on).to be_a(Time) + expect(subject.updated_on).to eq(DateTime.parse("2013-09-29 05:19:04 UTC")) + expect(subject.expires_on).to be_a(Time) + expect(subject.expires_on).to eq(DateTime.parse("2014-10-02 21:00:00 UTC")) + expect(subject.registrar).to be_a(Whois::Parser::Registrar) + expect(subject.registrar.id).to eq(nil) + expect(subject.registrar.name).to eq("CMC Registrar") + expect(subject.registrar.url).to eq(nil) + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers.size).to eq(4) + expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[0].name).to eq("ns1.google.com") + expect(subject.nameservers[0].ipv4).to eq(nil) + expect(subject.nameservers[0].ipv6).to eq(nil) + expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[1].name).to eq("ns2.google.com") + expect(subject.nameservers[1].ipv4).to eq(nil) + expect(subject.nameservers[1].ipv6).to eq(nil) + expect(subject.nameservers[2]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[2].name).to eq("ns3.google.com") + expect(subject.nameservers[2].ipv4).to eq(nil) + expect(subject.nameservers[2].ipv6).to eq(nil) + expect(subject.nameservers[3]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[3].name).to eq("ns4.google.com") + expect(subject.nameservers[3].ipv4).to eq(nil) + expect(subject.nameservers[3].ipv6).to eq(nil) end end diff --git a/spec/whois/parsers/responses/whois.cnnic.cn/cn/property_status_ok_spec.rb b/spec/whois/parsers/responses/whois.cnnic.cn/cn/property_status_ok_spec.rb index 74e05178..10415144 100644 --- a/spec/whois/parsers/responses/whois.cnnic.cn/cn/property_status_ok_spec.rb +++ b/spec/whois/parsers/responses/whois.cnnic.cn/cn/property_status_ok_spec.rb @@ -11,29 +11,18 @@ # require 'spec_helper' -require 'whois/parsers/whois.cnnic.cn.rb' -describe Whois::Parsers::WhoisCnnicCn, "property_status_ok.expected" do +describe "whois.cnnic.cn", :aggregate_failures do subject do file = fixture("responses", "whois.cnnic.cn/cn/property_status_ok.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.cnnic.cn") + Whois::Parser.parser_for(part) end - describe "#status" do - it do - expect(subject.status).to eq(["ok"]) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(false) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(true) - end + it "matches property_status_ok.expected" do + expect(subject.status).to eq(["ok"]) + expect(subject.available?).to eq(false) + expect(subject.registered?).to eq(true) end end diff --git a/spec/whois/parsers/responses/whois.cnnic.cn/cn/property_status_reserved_list_spec.rb b/spec/whois/parsers/responses/whois.cnnic.cn/cn/property_status_reserved_list_spec.rb index 044f36c1..74ea2cc1 100644 --- a/spec/whois/parsers/responses/whois.cnnic.cn/cn/property_status_reserved_list_spec.rb +++ b/spec/whois/parsers/responses/whois.cnnic.cn/cn/property_status_reserved_list_spec.rb @@ -11,34 +11,19 @@ # require 'spec_helper' -require 'whois/parsers/whois.cnnic.cn.rb' -describe Whois::Parsers::WhoisCnnicCn, "property_status_reserved_list.expected" do +describe "whois.cnnic.cn", :aggregate_failures do subject do file = fixture("responses", "whois.cnnic.cn/cn/property_status_reserved_list.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.cnnic.cn") + Whois::Parser.parser_for(part) end - describe "#status" do - it do - expect(subject.status).to eq([]) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(false) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(false) - end - end - describe "#reserved?" do - it do - expect(subject.reserved?).to eq(true) - end + it "matches property_status_reserved_list.expected" do + expect(subject.status).to eq([]) + expect(subject.available?).to eq(false) + expect(subject.registered?).to eq(false) + expect(subject.reserved?).to eq(true) end end diff --git a/spec/whois/parsers/responses/whois.cnnic.cn/cn/status_available_spec.rb b/spec/whois/parsers/responses/whois.cnnic.cn/cn/status_available_spec.rb index fea897e6..792158f9 100644 --- a/spec/whois/parsers/responses/whois.cnnic.cn/cn/status_available_spec.rb +++ b/spec/whois/parsers/responses/whois.cnnic.cn/cn/status_available_spec.rb @@ -11,92 +11,33 @@ # require 'spec_helper' -require 'whois/parsers/whois.cnnic.cn.rb' -describe Whois::Parsers::WhoisCnnicCn, "status_available.expected" do +describe "whois.cnnic.cn", :aggregate_failures do subject do file = fixture("responses", "whois.cnnic.cn/cn/status_available.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.cnnic.cn") + Whois::Parser.parser_for(part) end - describe "#disclaimer" do - it do - expect { subject.disclaimer }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#domain" do - it do - expect(subject.domain).to eq(nil) - end - end - describe "#domain_id" do - it do - expect(subject.domain_id).to eq(nil) - end - end - describe "#status" do - it do - expect(subject.status).to eq([]) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(true) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(false) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to eq(nil) - end - end - describe "#updated_on" do - it do - expect { subject.updated_on }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to eq(nil) - end - end - describe "#registrar" do - it do - expect(subject.registrar).to eq(nil) - end - end - describe "#registrant_contacts" do - it do - expect(subject.registrant_contacts).to be_a(Array) - expect(subject.registrant_contacts).to eq([]) - end - end - describe "#admin_contacts" do - it do - expect(subject.admin_contacts).to be_a(Array) - expect(subject.admin_contacts).to eq([]) - end - end - describe "#technical_contacts" do - it do - expect { subject.technical_contacts }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers).to eq([]) - end - end - describe "#reserved?" do - it do - expect(subject.reserved?).to eq(false) - end + it "matches status_available.expected" do + expect { subject.disclaimer }.to raise_error(Whois::AttributeNotSupported) + expect(subject.domain).to eq(nil) + expect(subject.domain_id).to eq(nil) + expect(subject.status).to eq([]) + expect(subject.available?).to eq(true) + expect(subject.registered?).to eq(false) + expect(subject.created_on).to eq(nil) + expect { subject.updated_on }.to raise_error(Whois::AttributeNotSupported) + expect(subject.expires_on).to eq(nil) + expect(subject.registrar).to eq(nil) + expect(subject.registrant_contacts).to be_a(Array) + expect(subject.registrant_contacts).to eq([]) + expect(subject.admin_contacts).to be_a(Array) + expect(subject.admin_contacts).to eq([]) + expect { subject.technical_contacts }.to raise_error(Whois::AttributeNotSupported) + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers).to eq([]) + expect(subject.reserved?).to eq(false) end end diff --git a/spec/whois/parsers/responses/whois.cnnic.cn/cn/status_registered_spec.rb b/spec/whois/parsers/responses/whois.cnnic.cn/cn/status_registered_spec.rb index ef765dfc..e5393e7e 100644 --- a/spec/whois/parsers/responses/whois.cnnic.cn/cn/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.cnnic.cn/cn/status_registered_spec.rb @@ -11,109 +11,50 @@ # require 'spec_helper' -require 'whois/parsers/whois.cnnic.cn.rb' -describe Whois::Parsers::WhoisCnnicCn, "status_registered.expected" do +describe "whois.cnnic.cn", :aggregate_failures do subject do file = fixture("responses", "whois.cnnic.cn/cn/status_registered.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.cnnic.cn") + Whois::Parser.parser_for(part) end - describe "#disclaimer" do - it do - expect { subject.disclaimer }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#domain" do - it do - expect(subject.domain).to eq("google.cn") - end - end - describe "#domain_id" do - it do - expect(subject.domain_id).to eq("20030311s10001s00033735-cn") - end - end - describe "#status" do - it do - expect(subject.status).to eq(["clientDeleteProhibited", "serverDeleteProhibited", "clientUpdateProhibited", "serverUpdateProhibited", "clientTransferProhibited", "serverTransferProhibited"]) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(false) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(true) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to be_a(Time) - expect(subject.created_on).to eq(DateTime.parse("2003-03-17 12:20:05")) - end - end - describe "#updated_on" do - it do - expect { subject.updated_on }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to be_a(Time) - expect(subject.expires_on).to eq(DateTime.parse("2017-03-17 12:48:36")) - end - end - describe "#registrar" do - it do - expect(subject.registrar).to be_a(Whois::Parser::Registrar) - expect(subject.registrar.id).to eq("MarkMonitor Inc.") - expect(subject.registrar.name).to eq("MarkMonitor Inc.") - end - end - describe "#registrant_contacts" do - it do - expect(subject.registrant_contacts).to be_a(Array) - expect(subject.registrant_contacts.size).to eq(1) - expect(subject.registrant_contacts[0]).to be_a(Whois::Parser::Contact) - expect(subject.registrant_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_REGISTRANT) - expect(subject.registrant_contacts[0].id).to eq("cnnic-zdmd-022") - expect(subject.registrant_contacts[0].name).to eq("Google Ireland Holdings") - expect(subject.registrant_contacts[0].organization).to eq(nil) - end - end - describe "#admin_contacts" do - it do - expect(subject.admin_contacts).to be_a(Array) - expect(subject.admin_contacts).to eq([]) - end - end - describe "#technical_contacts" do - it do - expect { subject.technical_contacts }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers.size).to eq(4) - expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[0].name).to eq("ns1.google.com") - expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[1].name).to eq("ns2.google.com") - expect(subject.nameservers[2]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[2].name).to eq("ns3.google.com") - expect(subject.nameservers[3]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[3].name).to eq("ns4.google.com") - end - end - describe "#reserved?" do - it do - expect(subject.reserved?).to eq(false) - end + it "matches status_registered.expected" do + expect { subject.disclaimer }.to raise_error(Whois::AttributeNotSupported) + expect(subject.domain).to eq("google.cn") + expect(subject.domain_id).to eq("20030311s10001s00033735-cn") + expect(subject.status).to eq(["clientDeleteProhibited", "serverDeleteProhibited", "clientUpdateProhibited", "serverUpdateProhibited", "clientTransferProhibited", "serverTransferProhibited"]) + expect(subject.available?).to eq(false) + expect(subject.registered?).to eq(true) + expect(subject.created_on).to be_a(Time) + expect(subject.created_on).to eq(DateTime.parse("2003-03-17 12:20:05")) + expect { subject.updated_on }.to raise_error(Whois::AttributeNotSupported) + expect(subject.expires_on).to be_a(Time) + expect(subject.expires_on).to eq(DateTime.parse("2017-03-17 12:48:36")) + expect(subject.registrar).to be_a(Whois::Parser::Registrar) + expect(subject.registrar.id).to eq("MarkMonitor Inc.") + expect(subject.registrar.name).to eq("MarkMonitor Inc.") + expect(subject.registrant_contacts).to be_a(Array) + expect(subject.registrant_contacts.size).to eq(1) + expect(subject.registrant_contacts[0]).to be_a(Whois::Parser::Contact) + expect(subject.registrant_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_REGISTRANT) + expect(subject.registrant_contacts[0].id).to eq("cnnic-zdmd-022") + expect(subject.registrant_contacts[0].name).to eq("Google Ireland Holdings") + expect(subject.registrant_contacts[0].organization).to eq(nil) + expect(subject.admin_contacts).to be_a(Array) + expect(subject.admin_contacts).to eq([]) + expect { subject.technical_contacts }.to raise_error(Whois::AttributeNotSupported) + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers.size).to eq(4) + expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[0].name).to eq("ns1.google.com") + expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[1].name).to eq("ns2.google.com") + expect(subject.nameservers[2]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[2].name).to eq("ns3.google.com") + expect(subject.nameservers[3]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[3].name).to eq("ns4.google.com") + expect(subject.reserved?).to eq(false) end end diff --git a/spec/whois/parsers/responses/whois.cnnic.cn/cn/status_reserved_spec.rb b/spec/whois/parsers/responses/whois.cnnic.cn/cn/status_reserved_spec.rb index 49fdbbd5..20519d24 100644 --- a/spec/whois/parsers/responses/whois.cnnic.cn/cn/status_reserved_spec.rb +++ b/spec/whois/parsers/responses/whois.cnnic.cn/cn/status_reserved_spec.rb @@ -11,34 +11,19 @@ # require 'spec_helper' -require 'whois/parsers/whois.cnnic.cn.rb' -describe Whois::Parsers::WhoisCnnicCn, "status_reserved.expected" do +describe "whois.cnnic.cn", :aggregate_failures do subject do file = fixture("responses", "whois.cnnic.cn/cn/status_reserved.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.cnnic.cn") + Whois::Parser.parser_for(part) end - describe "#status" do - it do - expect(subject.status).to eq([]) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(false) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(false) - end - end - describe "#reserved?" do - it do - expect(subject.reserved?).to eq(true) - end + it "matches status_reserved.expected" do + expect(subject.status).to eq([]) + expect(subject.available?).to eq(false) + expect(subject.registered?).to eq(false) + expect(subject.reserved?).to eq(true) end end diff --git a/spec/whois/parsers/responses/whois.co.ca/co.ca/status_available_spec.rb b/spec/whois/parsers/responses/whois.co.ca/co.ca/status_available_spec.rb index 10649bbe..4dd8f338 100644 --- a/spec/whois/parsers/responses/whois.co.ca/co.ca/status_available_spec.rb +++ b/spec/whois/parsers/responses/whois.co.ca/co.ca/status_available_spec.rb @@ -11,55 +11,24 @@ # require 'spec_helper' -require 'whois/parsers/whois.co.ca.rb' -describe Whois::Parsers::WhoisCoCa, "status_available.expected" do +describe "whois.co.ca", :aggregate_failures do subject do file = fixture("responses", "whois.co.ca/co.ca/status_available.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.co.ca") + Whois::Parser.parser_for(part) end - describe "#status" do - it do - expect(subject.status).to eq(:available) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(true) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(false) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to eq(nil) - end - end - describe "#updated_on" do - it do - expect { subject.updated_on }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to eq(nil) - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers).to eq([]) - end - end - describe "#reserved?" do - it do - expect(subject.reserved?).to eq(false) - end + it "matches status_available.expected" do + expect(subject.status).to eq(:available) + expect(subject.available?).to eq(true) + expect(subject.registered?).to eq(false) + expect(subject.created_on).to eq(nil) + expect { subject.updated_on }.to raise_error(Whois::AttributeNotSupported) + expect(subject.expires_on).to eq(nil) + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers).to eq([]) + expect(subject.reserved?).to eq(false) end end diff --git a/spec/whois/parsers/responses/whois.co.ca/co.ca/status_registered_spec.rb b/spec/whois/parsers/responses/whois.co.ca/co.ca/status_registered_spec.rb index b82b527c..ed0779de 100644 --- a/spec/whois/parsers/responses/whois.co.ca/co.ca/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.co.ca/co.ca/status_registered_spec.rb @@ -11,61 +11,30 @@ # require 'spec_helper' -require 'whois/parsers/whois.co.ca.rb' -describe Whois::Parsers::WhoisCoCa, "status_registered.expected" do +describe "whois.co.ca", :aggregate_failures do subject do file = fixture("responses", "whois.co.ca/co.ca/status_registered.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.co.ca") + Whois::Parser.parser_for(part) end - describe "#status" do - it do - expect(subject.status).to eq(:registered) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(false) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(true) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to be_a(Time) - expect(subject.created_on).to eq(DateTime.parse("2005-06-25 16:03:30")) - end - end - describe "#updated_on" do - it do - expect { subject.updated_on }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to be_a(Time) - expect(subject.expires_on).to eq(DateTime.parse("2014-06-25")) - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers.size).to eq(2) - expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[0].name).to eq("ns1.canadawebhosting.com") - expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[1].name).to eq("ns2.canadawebhosting.com") - end - end - describe "#reserved?" do - it do - expect(subject.reserved?).to eq(false) - end + it "matches status_registered.expected" do + expect(subject.status).to eq(:registered) + expect(subject.available?).to eq(false) + expect(subject.registered?).to eq(true) + expect(subject.created_on).to be_a(Time) + expect(subject.created_on).to eq(DateTime.parse("2005-06-25 16:03:30")) + expect { subject.updated_on }.to raise_error(Whois::AttributeNotSupported) + expect(subject.expires_on).to be_a(Time) + expect(subject.expires_on).to eq(DateTime.parse("2014-06-25")) + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers.size).to eq(2) + expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[0].name).to eq("ns1.canadawebhosting.com") + expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[1].name).to eq("ns2.canadawebhosting.com") + expect(subject.reserved?).to eq(false) end end diff --git a/spec/whois/parsers/responses/whois.co.ca/co.ca/status_reserved_spec.rb b/spec/whois/parsers/responses/whois.co.ca/co.ca/status_reserved_spec.rb index d8641c3a..7ff69792 100644 --- a/spec/whois/parsers/responses/whois.co.ca/co.ca/status_reserved_spec.rb +++ b/spec/whois/parsers/responses/whois.co.ca/co.ca/status_reserved_spec.rb @@ -11,34 +11,19 @@ # require 'spec_helper' -require 'whois/parsers/whois.co.ca.rb' -describe Whois::Parsers::WhoisCoCa, "status_reserved.expected" do +describe "whois.co.ca", :aggregate_failures do subject do file = fixture("responses", "whois.co.ca/co.ca/status_reserved.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.co.ca") + Whois::Parser.parser_for(part) end - describe "#status" do - it do - expect(subject.status).to eq(:reserved) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(false) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(true) - end - end - describe "#reserved?" do - it do - expect(subject.reserved?).to eq(true) - end + it "matches status_reserved.expected" do + expect(subject.status).to eq(:reserved) + expect(subject.available?).to eq(false) + expect(subject.registered?).to eq(true) + expect(subject.reserved?).to eq(true) end end diff --git a/spec/whois/parsers/responses/whois.co.pl/co.pl/status_available_spec.rb b/spec/whois/parsers/responses/whois.co.pl/co.pl/status_available_spec.rb index edce42ae..26aa64ca 100644 --- a/spec/whois/parsers/responses/whois.co.pl/co.pl/status_available_spec.rb +++ b/spec/whois/parsers/responses/whois.co.pl/co.pl/status_available_spec.rb @@ -11,85 +11,30 @@ # require 'spec_helper' -require 'whois/parsers/whois.co.pl.rb' -describe Whois::Parsers::WhoisCoPl, "status_available.expected" do +describe "whois.co.pl", :aggregate_failures do subject do file = fixture("responses", "whois.co.pl/co.pl/status_available.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.co.pl") + Whois::Parser.parser_for(part) end - describe "#disclaimer" do - it do - expect { subject.disclaimer }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#domain" do - it do - expect(subject.domain).to eq(nil) - end - end - describe "#domain_id" do - it do - expect { subject.domain_id }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#status" do - it do - expect(subject.status).to eq(:available) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(true) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(false) - end - end - describe "#created_on" do - it do - expect { subject.created_on }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#updated_on" do - it do - expect(subject.updated_on).to eq(nil) - end - end - describe "#expires_on" do - it do - expect { subject.expires_on }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#registrar" do - it do - expect { subject.registrar }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#registrant_contacts" do - it do - expect { subject.registrant_contacts }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#admin_contacts" do - it do - expect { subject.admin_contacts }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#technical_contacts" do - it do - expect { subject.technical_contacts }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers).to eq([]) - end + it "matches status_available.expected" do + expect { subject.disclaimer }.to raise_error(Whois::AttributeNotSupported) + expect(subject.domain).to eq(nil) + expect { subject.domain_id }.to raise_error(Whois::AttributeNotSupported) + expect(subject.status).to eq(:available) + expect(subject.available?).to eq(true) + expect(subject.registered?).to eq(false) + expect { subject.created_on }.to raise_error(Whois::AttributeNotSupported) + expect(subject.updated_on).to eq(nil) + expect { subject.expires_on }.to raise_error(Whois::AttributeNotSupported) + expect { subject.registrar }.to raise_error(Whois::AttributeNotSupported) + expect { subject.registrant_contacts }.to raise_error(Whois::AttributeNotSupported) + expect { subject.admin_contacts }.to raise_error(Whois::AttributeNotSupported) + expect { subject.technical_contacts }.to raise_error(Whois::AttributeNotSupported) + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers).to eq([]) end end diff --git a/spec/whois/parsers/responses/whois.co.pl/co.pl/status_registered_spec.rb b/spec/whois/parsers/responses/whois.co.pl/co.pl/status_registered_spec.rb index 38d0112a..2a1c7c7a 100644 --- a/spec/whois/parsers/responses/whois.co.pl/co.pl/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.co.pl/co.pl/status_registered_spec.rb @@ -11,90 +11,35 @@ # require 'spec_helper' -require 'whois/parsers/whois.co.pl.rb' -describe Whois::Parsers::WhoisCoPl, "status_registered.expected" do +describe "whois.co.pl", :aggregate_failures do subject do file = fixture("responses", "whois.co.pl/co.pl/status_registered.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.co.pl") + Whois::Parser.parser_for(part) end - describe "#disclaimer" do - it do - expect { subject.disclaimer }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#domain" do - it do - expect(subject.domain).to eq("coco.co.pl") - end - end - describe "#domain_id" do - it do - expect { subject.domain_id }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#status" do - it do - expect(subject.status).to eq(:registered) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(false) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(true) - end - end - describe "#created_on" do - it do - expect { subject.created_on }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#updated_on" do - it do - expect(subject.updated_on).to be_a(Time) - expect(subject.updated_on).to eq(DateTime.parse("2010-06-23 09:41:50")) - end - end - describe "#expires_on" do - it do - expect { subject.expires_on }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#registrar" do - it do - expect { subject.registrar }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#registrant_contacts" do - it do - expect { subject.registrant_contacts }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#admin_contacts" do - it do - expect { subject.admin_contacts }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#technical_contacts" do - it do - expect { subject.technical_contacts }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers.size).to eq(2) - expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[0].name).to eq("ns1.co.pl") - expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[1].name).to eq("ns2.co.pl") - end + it "matches status_registered.expected" do + expect { subject.disclaimer }.to raise_error(Whois::AttributeNotSupported) + expect(subject.domain).to eq("coco.co.pl") + expect { subject.domain_id }.to raise_error(Whois::AttributeNotSupported) + expect(subject.status).to eq(:registered) + expect(subject.available?).to eq(false) + expect(subject.registered?).to eq(true) + expect { subject.created_on }.to raise_error(Whois::AttributeNotSupported) + expect(subject.updated_on).to be_a(Time) + expect(subject.updated_on).to eq(DateTime.parse("2010-06-23 09:41:50")) + expect { subject.expires_on }.to raise_error(Whois::AttributeNotSupported) + expect { subject.registrar }.to raise_error(Whois::AttributeNotSupported) + expect { subject.registrant_contacts }.to raise_error(Whois::AttributeNotSupported) + expect { subject.admin_contacts }.to raise_error(Whois::AttributeNotSupported) + expect { subject.technical_contacts }.to raise_error(Whois::AttributeNotSupported) + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers.size).to eq(2) + expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[0].name).to eq("ns1.co.pl") + expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[1].name).to eq("ns2.co.pl") end end diff --git a/spec/whois/parsers/responses/whois.co.ug/ug/property_status_active_spec.rb b/spec/whois/parsers/responses/whois.co.ug/ug/property_status_active_spec.rb index 4bcb96fc..5db4b3b5 100644 --- a/spec/whois/parsers/responses/whois.co.ug/ug/property_status_active_spec.rb +++ b/spec/whois/parsers/responses/whois.co.ug/ug/property_status_active_spec.rb @@ -11,29 +11,18 @@ # require 'spec_helper' -require 'whois/parsers/whois.co.ug.rb' -describe Whois::Parsers::WhoisCoUg, "property_status_active.expected" do +describe "whois.co.ug", :aggregate_failures do subject do file = fixture("responses", "whois.co.ug/ug/property_status_active.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.co.ug") + Whois::Parser.parser_for(part) end - describe "#status" do - it do - expect(subject.status).to eq(:registered) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(false) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(true) - end + it "matches property_status_active.expected" do + expect(subject.status).to eq(:registered) + expect(subject.available?).to eq(false) + expect(subject.registered?).to eq(true) end end diff --git a/spec/whois/parsers/responses/whois.co.ug/ug/property_status_unconfirmed_spec.rb b/spec/whois/parsers/responses/whois.co.ug/ug/property_status_unconfirmed_spec.rb index 9f9b9723..b5e92826 100644 --- a/spec/whois/parsers/responses/whois.co.ug/ug/property_status_unconfirmed_spec.rb +++ b/spec/whois/parsers/responses/whois.co.ug/ug/property_status_unconfirmed_spec.rb @@ -11,29 +11,18 @@ # require 'spec_helper' -require 'whois/parsers/whois.co.ug.rb' -describe Whois::Parsers::WhoisCoUg, "property_status_unconfirmed.expected" do +describe "whois.co.ug", :aggregate_failures do subject do file = fixture("responses", "whois.co.ug/ug/property_status_unconfirmed.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.co.ug") + Whois::Parser.parser_for(part) end - describe "#status" do - it do - expect(subject.status).to eq(:registered) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(false) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(true) - end + it "matches property_status_unconfirmed.expected" do + expect(subject.status).to eq(:registered) + expect(subject.available?).to eq(false) + expect(subject.registered?).to eq(true) end end diff --git a/spec/whois/parsers/responses/whois.co.ug/ug/status_available_spec.rb b/spec/whois/parsers/responses/whois.co.ug/ug/status_available_spec.rb index f2c14eba..e4091b44 100644 --- a/spec/whois/parsers/responses/whois.co.ug/ug/status_available_spec.rb +++ b/spec/whois/parsers/responses/whois.co.ug/ug/status_available_spec.rb @@ -11,50 +11,23 @@ # require 'spec_helper' -require 'whois/parsers/whois.co.ug.rb' -describe Whois::Parsers::WhoisCoUg, "status_available.expected" do +describe "whois.co.ug", :aggregate_failures do subject do file = fixture("responses", "whois.co.ug/ug/status_available.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.co.ug") + Whois::Parser.parser_for(part) end - describe "#status" do - it do - expect(subject.status).to eq(:available) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(true) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(false) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to eq(nil) - end - end - describe "#updated_on" do - it do - expect(subject.updated_on).to eq(nil) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to eq(nil) - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers).to eq([]) - end + it "matches status_available.expected" do + expect(subject.status).to eq(:available) + expect(subject.available?).to eq(true) + expect(subject.registered?).to eq(false) + expect(subject.created_on).to eq(nil) + expect(subject.updated_on).to eq(nil) + expect(subject.expires_on).to eq(nil) + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers).to eq([]) end end diff --git a/spec/whois/parsers/responses/whois.co.ug/ug/status_registered_spec.rb b/spec/whois/parsers/responses/whois.co.ug/ug/status_registered_spec.rb index d923eea5..055800e2 100644 --- a/spec/whois/parsers/responses/whois.co.ug/ug/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.co.ug/ug/status_registered_spec.rb @@ -11,59 +11,32 @@ # require 'spec_helper' -require 'whois/parsers/whois.co.ug.rb' -describe Whois::Parsers::WhoisCoUg, "status_registered.expected" do +describe "whois.co.ug", :aggregate_failures do subject do file = fixture("responses", "whois.co.ug/ug/status_registered.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.co.ug") + Whois::Parser.parser_for(part) end - describe "#status" do - it do - expect(subject.status).to eq(:registered) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(false) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(true) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to be_a(Time) - expect(subject.created_on).to eq(DateTime.parse("2001-04-02 00:00:00")) - end - end - describe "#updated_on" do - it do - expect(subject.updated_on).to be_a(Time) - expect(subject.updated_on).to eq(DateTime.parse("2009-11-10 14:06:58 UTC")) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to be_a(Time) - expect(subject.expires_on).to eq(DateTime.parse("2018-04-07 00:00:00")) - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers.size).to eq(3) - expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[0].name).to eq("ns1.cfi.co.ug") - expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[1].name).to eq("ns2.cfi.co.ug") - expect(subject.nameservers[2]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[2].name).to eq("ns3.cfi.co.ug") - end + it "matches status_registered.expected" do + expect(subject.status).to eq(:registered) + expect(subject.available?).to eq(false) + expect(subject.registered?).to eq(true) + expect(subject.created_on).to be_a(Time) + expect(subject.created_on).to eq(DateTime.parse("2001-04-02 00:00:00")) + expect(subject.updated_on).to be_a(Time) + expect(subject.updated_on).to eq(DateTime.parse("2009-11-10 14:06:58 UTC")) + expect(subject.expires_on).to be_a(Time) + expect(subject.expires_on).to eq(DateTime.parse("2018-04-07 00:00:00")) + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers.size).to eq(3) + expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[0].name).to eq("ns1.cfi.co.ug") + expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[1].name).to eq("ns2.cfi.co.ug") + expect(subject.nameservers[2]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[2].name).to eq("ns3.cfi.co.ug") end end diff --git a/spec/whois/parsers/responses/whois.comlaude.com/status_registered_spec.rb b/spec/whois/parsers/responses/whois.comlaude.com/status_registered_spec.rb index 51971bd4..299fdc79 100644 --- a/spec/whois/parsers/responses/whois.comlaude.com/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.comlaude.com/status_registered_spec.rb @@ -11,122 +11,79 @@ # require 'spec_helper' -require 'whois/parsers/whois.comlaude.com.rb' -describe Whois::Parsers::WhoisComlaudeCom, "status_registered.expected" do +describe "whois.comlaude.com", :aggregate_failures do subject do file = fixture("responses", "whois.comlaude.com/status_registered.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.comlaude.com") + Whois::Parser.parser_for(part) end - describe "#status" do - it do - expect { subject.status }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(false) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(true) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to be_a(Time) - expect(subject.created_on).to eq(DateTime.parse("2005-01-30")) - end - end - describe "#updated_on" do - it do - expect { subject.updated_on }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to be_a(Time) - expect(subject.expires_on).to eq(DateTime.parse("2020-01-30")) - end - end - describe "#registrar" do - it do - expect(subject.registrar).to be_a(Whois::Parser::Registrar) - expect(subject.registrar.id).to eq(nil) - expect(subject.registrar.name).to eq("NOM IQ LTD (DBA COM LAUDE)") - expect(subject.registrar.url).to eq("http://www.comlaude.com") - end - end - describe "#registrant_contacts" do - it do - expect(subject.registrant_contacts).to be_a(Array) - expect(subject.registrant_contacts.size).to eq(1) - expect(subject.registrant_contacts[0]).to be_a(Whois::Parser::Contact) - expect(subject.registrant_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_REGISTRANT) - expect(subject.registrant_contacts[0].name).to eq("Domain Manager") - expect(subject.registrant_contacts[0].organization).to eq("Nom-IQ Ltd dba Com Laude") - expect(subject.registrant_contacts[0].address).to eq(nil) - expect(subject.registrant_contacts[0].city).to eq(nil) - expect(subject.registrant_contacts[0].zip).to eq(nil) - expect(subject.registrant_contacts[0].state).to eq(nil) - expect(subject.registrant_contacts[0].country).to eq(nil) - expect(subject.registrant_contacts[0].phone).to eq("+44.2078360070") - expect(subject.registrant_contacts[0].fax).to eq(nil) - expect(subject.registrant_contacts[0].email).to eq("admin@comlaude.com") - end - end - describe "#admin_contacts" do - it do - expect(subject.admin_contacts).to be_a(Array) - expect(subject.admin_contacts.size).to eq(1) - expect(subject.admin_contacts[0]).to be_a(Whois::Parser::Contact) - expect(subject.admin_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_ADMINISTRATIVE) - expect(subject.admin_contacts[0].name).to eq("Domain Manager") - expect(subject.admin_contacts[0].organization).to eq("Nom-IQ Ltd dba Com Laude") - expect(subject.admin_contacts[0].address).to eq(nil) - expect(subject.admin_contacts[0].city).to eq(nil) - expect(subject.admin_contacts[0].zip).to eq(nil) - expect(subject.admin_contacts[0].state).to eq(nil) - expect(subject.admin_contacts[0].country).to eq(nil) - expect(subject.admin_contacts[0].phone).to eq("+44.2078360070") - expect(subject.admin_contacts[0].fax).to eq(nil) - expect(subject.admin_contacts[0].email).to eq("admin@comlaude.com") - end - end - describe "#technical_contacts" do - it do - expect(subject.technical_contacts).to be_a(Array) - expect(subject.technical_contacts.size).to eq(1) - expect(subject.technical_contacts[0]).to be_a(Whois::Parser::Contact) - expect(subject.technical_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_TECHNICAL) - expect(subject.technical_contacts[0].name).to eq("Technical Manager") - expect(subject.technical_contacts[0].organization).to eq("Com Laude") - expect(subject.technical_contacts[0].address).to eq(nil) - expect(subject.technical_contacts[0].city).to eq(nil) - expect(subject.technical_contacts[0].zip).to eq(nil) - expect(subject.technical_contacts[0].state).to eq(nil) - expect(subject.technical_contacts[0].country).to eq(nil) - expect(subject.technical_contacts[0].phone).to eq("+44.2074218250") - expect(subject.technical_contacts[0].fax).to eq("+44.8700118187") - expect(subject.technical_contacts[0].email).to eq("hostmaster@comlaude.com") - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers.size).to eq(4) - expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[0].name).to eq("dns1.comlaude-dns.com") - expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[1].name).to eq("dns2.comlaude-dns.net") - expect(subject.nameservers[2]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[2].name).to eq("dns3.comlaude-dns.co.uk") - expect(subject.nameservers[3]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[3].name).to eq("dns4.comlaude-dns.eu") - end + it "matches status_registered.expected" do + expect { subject.status }.to raise_error(Whois::AttributeNotSupported) + expect(subject.available?).to eq(false) + expect(subject.registered?).to eq(true) + expect(subject.created_on).to be_a(Time) + expect(subject.created_on).to eq(DateTime.parse("2005-01-30")) + expect { subject.updated_on }.to raise_error(Whois::AttributeNotSupported) + expect(subject.expires_on).to be_a(Time) + expect(subject.expires_on).to eq(DateTime.parse("2020-01-30")) + expect(subject.registrar).to be_a(Whois::Parser::Registrar) + expect(subject.registrar.id).to eq(nil) + expect(subject.registrar.name).to eq("NOM IQ LTD (DBA COM LAUDE)") + expect(subject.registrar.url).to eq("http://www.comlaude.com") + expect(subject.registrant_contacts).to be_a(Array) + expect(subject.registrant_contacts.size).to eq(1) + expect(subject.registrant_contacts[0]).to be_a(Whois::Parser::Contact) + expect(subject.registrant_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_REGISTRANT) + expect(subject.registrant_contacts[0].name).to eq("Domain Manager") + expect(subject.registrant_contacts[0].organization).to eq("Nom-IQ Ltd dba Com Laude") + expect(subject.registrant_contacts[0].address).to eq(nil) + expect(subject.registrant_contacts[0].city).to eq(nil) + expect(subject.registrant_contacts[0].zip).to eq(nil) + expect(subject.registrant_contacts[0].state).to eq(nil) + expect(subject.registrant_contacts[0].country).to eq(nil) + expect(subject.registrant_contacts[0].phone).to eq("+44.2078360070") + expect(subject.registrant_contacts[0].fax).to eq(nil) + expect(subject.registrant_contacts[0].email).to eq("admin@comlaude.com") + expect(subject.admin_contacts).to be_a(Array) + expect(subject.admin_contacts.size).to eq(1) + expect(subject.admin_contacts[0]).to be_a(Whois::Parser::Contact) + expect(subject.admin_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_ADMINISTRATIVE) + expect(subject.admin_contacts[0].name).to eq("Domain Manager") + expect(subject.admin_contacts[0].organization).to eq("Nom-IQ Ltd dba Com Laude") + expect(subject.admin_contacts[0].address).to eq(nil) + expect(subject.admin_contacts[0].city).to eq(nil) + expect(subject.admin_contacts[0].zip).to eq(nil) + expect(subject.admin_contacts[0].state).to eq(nil) + expect(subject.admin_contacts[0].country).to eq(nil) + expect(subject.admin_contacts[0].phone).to eq("+44.2078360070") + expect(subject.admin_contacts[0].fax).to eq(nil) + expect(subject.admin_contacts[0].email).to eq("admin@comlaude.com") + expect(subject.technical_contacts).to be_a(Array) + expect(subject.technical_contacts.size).to eq(1) + expect(subject.technical_contacts[0]).to be_a(Whois::Parser::Contact) + expect(subject.technical_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_TECHNICAL) + expect(subject.technical_contacts[0].name).to eq("Technical Manager") + expect(subject.technical_contacts[0].organization).to eq("Com Laude") + expect(subject.technical_contacts[0].address).to eq(nil) + expect(subject.technical_contacts[0].city).to eq(nil) + expect(subject.technical_contacts[0].zip).to eq(nil) + expect(subject.technical_contacts[0].state).to eq(nil) + expect(subject.technical_contacts[0].country).to eq(nil) + expect(subject.technical_contacts[0].phone).to eq("+44.2074218250") + expect(subject.technical_contacts[0].fax).to eq("+44.8700118187") + expect(subject.technical_contacts[0].email).to eq("hostmaster@comlaude.com") + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers.size).to eq(4) + expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[0].name).to eq("dns1.comlaude-dns.com") + expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[1].name).to eq("dns2.comlaude-dns.net") + expect(subject.nameservers[2]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[2].name).to eq("dns3.comlaude-dns.co.uk") + expect(subject.nameservers[3]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[3].name).to eq("dns4.comlaude-dns.eu") end end diff --git a/spec/whois/parsers/responses/whois.corporatedomains.com/status_available_spec.rb b/spec/whois/parsers/responses/whois.corporatedomains.com/status_available_spec.rb index 9c23d000..4b7112c4 100644 --- a/spec/whois/parsers/responses/whois.corporatedomains.com/status_available_spec.rb +++ b/spec/whois/parsers/responses/whois.corporatedomains.com/status_available_spec.rb @@ -11,83 +11,32 @@ # require 'spec_helper' -require 'whois/parsers/whois.corporatedomains.com.rb' -describe Whois::Parsers::WhoisCorporatedomainsCom, "status_available.expected" do +describe "whois.corporatedomains.com", :aggregate_failures do subject do file = fixture("responses", "whois.corporatedomains.com/status_available.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.corporatedomains.com") + Whois::Parser.parser_for(part) end - describe "#domain" do - it do - expect(subject.domain).to eq(nil) - end - end - describe "#domain_id" do - it do - expect(subject.domain_id).to eq(nil) - end - end - describe "#status" do - it do - expect(subject.status).to eq(:available) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(true) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(false) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to eq(nil) - end - end - describe "#updated_on" do - it do - expect(subject.updated_on).to eq(nil) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to eq(nil) - end - end - describe "#registrar" do - it do - expect(subject.registrar).to eq(nil) - end - end - describe "#registrant_contacts" do - it do - expect(subject.registrant_contacts).to be_a(Array) - expect(subject.registrant_contacts).to eq([]) - end - end - describe "#admin_contacts" do - it do - expect(subject.admin_contacts).to be_a(Array) - expect(subject.admin_contacts).to eq([]) - end - end - describe "#technical_contacts" do - it do - expect(subject.technical_contacts).to be_a(Array) - expect(subject.technical_contacts).to eq([]) - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers).to eq([]) - end + it "matches status_available.expected" do + expect(subject.domain).to eq(nil) + expect(subject.domain_id).to eq(nil) + expect(subject.status).to eq(:available) + expect(subject.available?).to eq(true) + expect(subject.registered?).to eq(false) + expect(subject.created_on).to eq(nil) + expect(subject.updated_on).to eq(nil) + expect(subject.expires_on).to eq(nil) + expect(subject.registrar).to eq(nil) + expect(subject.registrant_contacts).to be_a(Array) + expect(subject.registrant_contacts).to eq([]) + expect(subject.admin_contacts).to be_a(Array) + expect(subject.admin_contacts).to eq([]) + expect(subject.technical_contacts).to be_a(Array) + expect(subject.technical_contacts).to eq([]) + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers).to eq([]) end end diff --git a/spec/whois/parsers/responses/whois.corporatedomains.com/status_registered_spec.rb b/spec/whois/parsers/responses/whois.corporatedomains.com/status_registered_spec.rb index a3b03807..02882c70 100644 --- a/spec/whois/parsers/responses/whois.corporatedomains.com/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.corporatedomains.com/status_registered_spec.rb @@ -11,147 +11,96 @@ # require 'spec_helper' -require 'whois/parsers/whois.corporatedomains.com.rb' -describe Whois::Parsers::WhoisCorporatedomainsCom, "status_registered.expected" do +describe "whois.corporatedomains.com", :aggregate_failures do subject do file = fixture("responses", "whois.corporatedomains.com/status_registered.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.corporatedomains.com") + Whois::Parser.parser_for(part) end - describe "#domain" do - it do - expect(subject.domain).to eq("google.com") - end - end - describe "#domain_id" do - it do - expect(subject.domain_id).to eq("") - end - end - describe "#status" do - it do - expect(subject.status).to eq(:registered) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(false) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(true) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to be_a(Time) - expect(subject.created_on).to eq(DateTime.parse("1992-11-24 00:00:00 -0500")) - end - end - describe "#updated_on" do - it do - expect(subject.updated_on).to be_a(Time) - expect(subject.updated_on).to eq(DateTime.parse("2012-05-16 09:28:56 -0400")) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to be_a(Time) - expect(subject.expires_on).to eq(DateTime.parse("2013-11-23 00:00:00 -0500")) - end - end - describe "#registrar" do - it do - expect(subject.registrar).to be_a(Whois::Parser::Registrar) - expect(subject.registrar.id).to eq("299") - expect(subject.registrar.name).to eq("CORPORATE DOMAINS, INC.") - expect(subject.registrar.url).to eq("www.cscprotectsbrands.com") - end - end - describe "#registrant_contacts" do - it do - expect(subject.registrant_contacts).to be_a(Array) - expect(subject.registrant_contacts.size).to eq(1) - expect(subject.registrant_contacts[0]).to be_a(Whois::Parser::Contact) - expect(subject.registrant_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_REGISTRANT) - expect(subject.registrant_contacts[0].name).to eq("Dns Admin") - expect(subject.registrant_contacts[0].organization).to eq("Google Inc.") - expect(subject.registrant_contacts[0].address).to eq("Please contact contact-admin@google.com, 1600 Amphitheatre Parkway") - expect(subject.registrant_contacts[0].city).to eq("Mountain View") - expect(subject.registrant_contacts[0].zip).to eq("94043") - expect(subject.registrant_contacts[0].state).to eq("CA") - expect(subject.registrant_contacts[0].country_code).to eq("US") - expect(subject.registrant_contacts[0].phone).to eq("+1.6502530000") - expect(subject.registrant_contacts[0].fax).to eq("+1.6506188571") - expect(subject.registrant_contacts[0].email).to eq("dns-admin@google.com") - expect(subject.registrant_contacts[0].created_on).to eq(nil) - expect(subject.registrant_contacts[0].updated_on).to eq(nil) - end - end - describe "#admin_contacts" do - it do - expect(subject.admin_contacts).to be_a(Array) - expect(subject.admin_contacts.size).to eq(1) - expect(subject.admin_contacts[0]).to be_a(Whois::Parser::Contact) - expect(subject.admin_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_ADMINISTRATIVE) - expect(subject.admin_contacts[0].name).to eq("DNS Admin") - expect(subject.admin_contacts[0].organization).to eq("Google Inc.") - expect(subject.admin_contacts[0].address).to eq("1600 Amphitheatre Parkway") - expect(subject.admin_contacts[0].city).to eq("Mountain View") - expect(subject.admin_contacts[0].zip).to eq("94043") - expect(subject.admin_contacts[0].state).to eq("CA") - expect(subject.admin_contacts[0].country_code).to eq("US") - expect(subject.admin_contacts[0].phone).to eq("+1.6506234000") - expect(subject.admin_contacts[0].fax).to eq("+1.6506188571") - expect(subject.admin_contacts[0].email).to eq("dns-admin@google.com") - expect(subject.admin_contacts[0].created_on).to eq(nil) - expect(subject.admin_contacts[0].updated_on).to eq(nil) - end - end - describe "#technical_contacts" do - it do - expect(subject.technical_contacts).to be_a(Array) - expect(subject.technical_contacts.size).to eq(1) - expect(subject.technical_contacts[0]).to be_a(Whois::Parser::Contact) - expect(subject.technical_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_TECHNICAL) - expect(subject.technical_contacts[0].name).to eq("DNS Admin") - expect(subject.technical_contacts[0].organization).to eq("Google Inc.") - expect(subject.technical_contacts[0].address).to eq("2400 E. Bayshore Pkwy") - expect(subject.technical_contacts[0].city).to eq("Mountain View") - expect(subject.technical_contacts[0].zip).to eq("94043") - expect(subject.technical_contacts[0].state).to eq("CA") - expect(subject.technical_contacts[0].country_code).to eq("US") - expect(subject.technical_contacts[0].phone).to eq("+1.6503300100") - expect(subject.technical_contacts[0].fax).to eq("+1.6506181499") - expect(subject.technical_contacts[0].email).to eq("dns-admin@google.com") - expect(subject.technical_contacts[0].created_on).to eq(nil) - expect(subject.technical_contacts[0].updated_on).to eq(nil) - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers.size).to eq(4) - expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[0].name).to eq("ns2.google.com") - expect(subject.nameservers[0].ipv4).to eq(nil) - expect(subject.nameservers[0].ipv6).to eq(nil) - expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[1].name).to eq("ns1.google.com") - expect(subject.nameservers[1].ipv4).to eq(nil) - expect(subject.nameservers[1].ipv6).to eq(nil) - expect(subject.nameservers[2]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[2].name).to eq("ns3.google.com") - expect(subject.nameservers[2].ipv4).to eq(nil) - expect(subject.nameservers[2].ipv6).to eq(nil) - expect(subject.nameservers[3]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[3].name).to eq("ns4.google.com") - expect(subject.nameservers[3].ipv4).to eq(nil) - expect(subject.nameservers[3].ipv6).to eq(nil) - end + it "matches status_registered.expected" do + expect(subject.domain).to eq("google.com") + expect(subject.domain_id).to eq("") + expect(subject.status).to eq(:registered) + expect(subject.available?).to eq(false) + expect(subject.registered?).to eq(true) + expect(subject.created_on).to be_a(Time) + expect(subject.created_on).to eq(DateTime.parse("1992-11-24 00:00:00 -0500")) + expect(subject.updated_on).to be_a(Time) + expect(subject.updated_on).to eq(DateTime.parse("2012-05-16 09:28:56 -0400")) + expect(subject.expires_on).to be_a(Time) + expect(subject.expires_on).to eq(DateTime.parse("2013-11-23 00:00:00 -0500")) + expect(subject.registrar).to be_a(Whois::Parser::Registrar) + expect(subject.registrar.id).to eq("299") + expect(subject.registrar.name).to eq("CORPORATE DOMAINS, INC.") + expect(subject.registrar.url).to eq("www.cscprotectsbrands.com") + expect(subject.registrant_contacts).to be_a(Array) + expect(subject.registrant_contacts.size).to eq(1) + expect(subject.registrant_contacts[0]).to be_a(Whois::Parser::Contact) + expect(subject.registrant_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_REGISTRANT) + expect(subject.registrant_contacts[0].name).to eq("Dns Admin") + expect(subject.registrant_contacts[0].organization).to eq("Google Inc.") + expect(subject.registrant_contacts[0].address).to eq("Please contact contact-admin@google.com, 1600 Amphitheatre Parkway") + expect(subject.registrant_contacts[0].city).to eq("Mountain View") + expect(subject.registrant_contacts[0].zip).to eq("94043") + expect(subject.registrant_contacts[0].state).to eq("CA") + expect(subject.registrant_contacts[0].country_code).to eq("US") + expect(subject.registrant_contacts[0].phone).to eq("+1.6502530000") + expect(subject.registrant_contacts[0].fax).to eq("+1.6506188571") + expect(subject.registrant_contacts[0].email).to eq("dns-admin@google.com") + expect(subject.registrant_contacts[0].created_on).to eq(nil) + expect(subject.registrant_contacts[0].updated_on).to eq(nil) + expect(subject.admin_contacts).to be_a(Array) + expect(subject.admin_contacts.size).to eq(1) + expect(subject.admin_contacts[0]).to be_a(Whois::Parser::Contact) + expect(subject.admin_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_ADMINISTRATIVE) + expect(subject.admin_contacts[0].name).to eq("DNS Admin") + expect(subject.admin_contacts[0].organization).to eq("Google Inc.") + expect(subject.admin_contacts[0].address).to eq("1600 Amphitheatre Parkway") + expect(subject.admin_contacts[0].city).to eq("Mountain View") + expect(subject.admin_contacts[0].zip).to eq("94043") + expect(subject.admin_contacts[0].state).to eq("CA") + expect(subject.admin_contacts[0].country_code).to eq("US") + expect(subject.admin_contacts[0].phone).to eq("+1.6506234000") + expect(subject.admin_contacts[0].fax).to eq("+1.6506188571") + expect(subject.admin_contacts[0].email).to eq("dns-admin@google.com") + expect(subject.admin_contacts[0].created_on).to eq(nil) + expect(subject.admin_contacts[0].updated_on).to eq(nil) + expect(subject.technical_contacts).to be_a(Array) + expect(subject.technical_contacts.size).to eq(1) + expect(subject.technical_contacts[0]).to be_a(Whois::Parser::Contact) + expect(subject.technical_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_TECHNICAL) + expect(subject.technical_contacts[0].name).to eq("DNS Admin") + expect(subject.technical_contacts[0].organization).to eq("Google Inc.") + expect(subject.technical_contacts[0].address).to eq("2400 E. Bayshore Pkwy") + expect(subject.technical_contacts[0].city).to eq("Mountain View") + expect(subject.technical_contacts[0].zip).to eq("94043") + expect(subject.technical_contacts[0].state).to eq("CA") + expect(subject.technical_contacts[0].country_code).to eq("US") + expect(subject.technical_contacts[0].phone).to eq("+1.6503300100") + expect(subject.technical_contacts[0].fax).to eq("+1.6506181499") + expect(subject.technical_contacts[0].email).to eq("dns-admin@google.com") + expect(subject.technical_contacts[0].created_on).to eq(nil) + expect(subject.technical_contacts[0].updated_on).to eq(nil) + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers.size).to eq(4) + expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[0].name).to eq("ns2.google.com") + expect(subject.nameservers[0].ipv4).to eq(nil) + expect(subject.nameservers[0].ipv6).to eq(nil) + expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[1].name).to eq("ns1.google.com") + expect(subject.nameservers[1].ipv4).to eq(nil) + expect(subject.nameservers[1].ipv6).to eq(nil) + expect(subject.nameservers[2]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[2].name).to eq("ns3.google.com") + expect(subject.nameservers[2].ipv4).to eq(nil) + expect(subject.nameservers[2].ipv6).to eq(nil) + expect(subject.nameservers[3]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[3].name).to eq("ns4.google.com") + expect(subject.nameservers[3].ipv4).to eq(nil) + expect(subject.nameservers[3].ipv6).to eq(nil) end end diff --git a/spec/whois/parsers/responses/whois.denic.de/de/property_nameservers_with_ip_spec.rb b/spec/whois/parsers/responses/whois.denic.de/de/property_nameservers_with_ip_spec.rb index 4e9dda7a..4d5cbc94 100644 --- a/spec/whois/parsers/responses/whois.denic.de/de/property_nameservers_with_ip_spec.rb +++ b/spec/whois/parsers/responses/whois.denic.de/de/property_nameservers_with_ip_spec.rb @@ -11,40 +11,37 @@ # require 'spec_helper' -require 'whois/parsers/whois.denic.de.rb' -describe Whois::Parsers::WhoisDenicDe, "property_nameservers_with_ip.expected" do +describe "whois.denic.de", :aggregate_failures do subject do file = fixture("responses", "whois.denic.de/de/property_nameservers_with_ip.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.denic.de") + Whois::Parser.parser_for(part) end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers.size).to eq(5) - expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[0].name).to eq("ns1.prodns.de") - expect(subject.nameservers[0].ipv4).to eq("91.233.85.99") - expect(subject.nameservers[0].ipv6).to eq(nil) - expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[1].name).to eq("ns2.prodns.eu") - expect(subject.nameservers[1].ipv4).to eq(nil) - expect(subject.nameservers[1].ipv6).to eq(nil) - expect(subject.nameservers[2]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[2].name).to eq("ns3.prodns.de") - expect(subject.nameservers[2].ipv4).to eq("91.233.86.99") - expect(subject.nameservers[2].ipv6).to eq(nil) - expect(subject.nameservers[3]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[3].name).to eq("ns4.prodns.eu") - expect(subject.nameservers[3].ipv4).to eq(nil) - expect(subject.nameservers[3].ipv6).to eq(nil) - expect(subject.nameservers[4]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[4].name).to eq("ns5.prodns.de") - expect(subject.nameservers[4].ipv4).to eq("65.18.172.184") - expect(subject.nameservers[4].ipv6).to eq(nil) - end + it "matches property_nameservers_with_ip.expected" do + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers.size).to eq(5) + expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[0].name).to eq("ns1.prodns.de") + expect(subject.nameservers[0].ipv4).to eq("91.233.85.99") + expect(subject.nameservers[0].ipv6).to eq(nil) + expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[1].name).to eq("ns2.prodns.eu") + expect(subject.nameservers[1].ipv4).to eq(nil) + expect(subject.nameservers[1].ipv6).to eq(nil) + expect(subject.nameservers[2]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[2].name).to eq("ns3.prodns.de") + expect(subject.nameservers[2].ipv4).to eq("91.233.86.99") + expect(subject.nameservers[2].ipv6).to eq(nil) + expect(subject.nameservers[3]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[3].name).to eq("ns4.prodns.eu") + expect(subject.nameservers[3].ipv4).to eq(nil) + expect(subject.nameservers[3].ipv6).to eq(nil) + expect(subject.nameservers[4]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[4].name).to eq("ns5.prodns.de") + expect(subject.nameservers[4].ipv4).to eq("65.18.172.184") + expect(subject.nameservers[4].ipv6).to eq(nil) end end diff --git a/spec/whois/parsers/responses/whois.denic.de/de/response_error_55000000010_spec.rb b/spec/whois/parsers/responses/whois.denic.de/de/response_error_55000000010_spec.rb index 14062aba..c1251700 100644 --- a/spec/whois/parsers/responses/whois.denic.de/de/response_error_55000000010_spec.rb +++ b/spec/whois/parsers/responses/whois.denic.de/de/response_error_55000000010_spec.rb @@ -11,29 +11,18 @@ # require 'spec_helper' -require 'whois/parsers/whois.denic.de.rb' -describe Whois::Parsers::WhoisDenicDe, "response_error_55000000010.expected" do +describe "whois.denic.de", :aggregate_failures do subject do file = fixture("responses", "whois.denic.de/de/response_error_55000000010.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.denic.de") + Whois::Parser.parser_for(part) end - describe "#status" do - it do - expect(subject.status).to eq(:invalid) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(false) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(false) - end + it "matches response_error_55000000010.expected" do + expect(subject.status).to eq(:invalid) + expect(subject.available?).to eq(false) + expect(subject.registered?).to eq(false) end end diff --git a/spec/whois/parsers/responses/whois.denic.de/de/response_throttled_spec.rb b/spec/whois/parsers/responses/whois.denic.de/de/response_throttled_spec.rb index 41632632..a80ad1d1 100644 --- a/spec/whois/parsers/responses/whois.denic.de/de/response_throttled_spec.rb +++ b/spec/whois/parsers/responses/whois.denic.de/de/response_throttled_spec.rb @@ -11,19 +11,16 @@ # require 'spec_helper' -require 'whois/parsers/whois.denic.de.rb' -describe Whois::Parsers::WhoisDenicDe, "response_throttled.expected" do +describe "whois.denic.de", :aggregate_failures do subject do file = fixture("responses", "whois.denic.de/de/response_throttled.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.denic.de") + Whois::Parser.parser_for(part) end - describe "#response_throttled?" do - it do - expect(subject.response_throttled?).to eq(true) - end + it "matches response_throttled.expected" do + expect(subject.response_throttled?).to eq(true) end end diff --git a/spec/whois/parsers/responses/whois.denic.de/de/status_available_spec.rb b/spec/whois/parsers/responses/whois.denic.de/de/status_available_spec.rb index 0728847b..b1b5a4bc 100644 --- a/spec/whois/parsers/responses/whois.denic.de/de/status_available_spec.rb +++ b/spec/whois/parsers/responses/whois.denic.de/de/status_available_spec.rb @@ -11,88 +11,33 @@ # require 'spec_helper' -require 'whois/parsers/whois.denic.de.rb' -describe Whois::Parsers::WhoisDenicDe, "status_available.expected" do +describe "whois.denic.de", :aggregate_failures do subject do file = fixture("responses", "whois.denic.de/de/status_available.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.denic.de") + Whois::Parser.parser_for(part) end - describe "#disclaimer" do - it do - expect(subject.disclaimer).to eq(nil) - end - end - describe "#domain" do - it do - expect(subject.domain).to eq("u34jedzcq.de") - end - end - describe "#domain_id" do - it do - expect { subject.domain_id }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#status" do - it do - expect(subject.status).to eq(:available) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(true) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(false) - end - end - describe "#created_on" do - it do - expect { subject.created_on }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#updated_on" do - it do - expect(subject.updated_on).to eq(nil) - end - end - describe "#expires_on" do - it do - expect { subject.expires_on }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#registrar" do - it do - expect(subject.registrar).to eq(nil) - end - end - describe "#registrant_contacts" do - it do - expect(subject.registrant_contacts).to be_a(Array) - expect(subject.registrant_contacts).to eq([]) - end - end - describe "#admin_contacts" do - it do - expect(subject.admin_contacts).to be_a(Array) - expect(subject.admin_contacts).to eq([]) - end - end - describe "#technical_contacts" do - it do - expect(subject.technical_contacts).to be_a(Array) - expect(subject.technical_contacts).to eq([]) - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers).to eq([]) - end + it "matches status_available.expected" do + expect(subject.disclaimer).to eq(nil) + expect(subject.domain).to eq("u34jedzcq.de") + expect { subject.domain_id }.to raise_error(Whois::AttributeNotSupported) + expect(subject.status).to eq(:available) + expect(subject.available?).to eq(true) + expect(subject.registered?).to eq(false) + expect { subject.created_on }.to raise_error(Whois::AttributeNotSupported) + expect(subject.updated_on).to eq(nil) + expect { subject.expires_on }.to raise_error(Whois::AttributeNotSupported) + expect(subject.registrar).to eq(nil) + expect(subject.registrant_contacts).to be_a(Array) + expect(subject.registrant_contacts).to eq([]) + expect(subject.admin_contacts).to be_a(Array) + expect(subject.admin_contacts).to eq([]) + expect(subject.technical_contacts).to be_a(Array) + expect(subject.technical_contacts).to eq([]) + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers).to eq([]) end end diff --git a/spec/whois/parsers/responses/whois.denic.de/de/status_failed_ace_spec.rb b/spec/whois/parsers/responses/whois.denic.de/de/status_failed_ace_spec.rb index 1f8f55fc..0ad379eb 100644 --- a/spec/whois/parsers/responses/whois.denic.de/de/status_failed_ace_spec.rb +++ b/spec/whois/parsers/responses/whois.denic.de/de/status_failed_ace_spec.rb @@ -11,29 +11,18 @@ # require 'spec_helper' -require 'whois/parsers/whois.denic.de.rb' -describe Whois::Parsers::WhoisDenicDe, "status_failed_ace.expected" do +describe "whois.denic.de", :aggregate_failures do subject do file = fixture("responses", "whois.denic.de/de/status_failed_ace.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.denic.de") + Whois::Parser.parser_for(part) end - describe "#status" do - it do - expect(subject.status).to eq(:registered) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(true) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(false) - end + it "matches status_failed_ace.expected" do + expect(subject.status).to eq(:registered) + expect(subject.registered?).to eq(true) + expect(subject.available?).to eq(false) end end diff --git a/spec/whois/parsers/responses/whois.denic.de/de/status_failed_spec.rb b/spec/whois/parsers/responses/whois.denic.de/de/status_failed_spec.rb index 55d9c0ca..c863f60f 100644 --- a/spec/whois/parsers/responses/whois.denic.de/de/status_failed_spec.rb +++ b/spec/whois/parsers/responses/whois.denic.de/de/status_failed_spec.rb @@ -11,29 +11,18 @@ # require 'spec_helper' -require 'whois/parsers/whois.denic.de.rb' -describe Whois::Parsers::WhoisDenicDe, "status_failed.expected" do +describe "whois.denic.de", :aggregate_failures do subject do file = fixture("responses", "whois.denic.de/de/status_failed.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.denic.de") + Whois::Parser.parser_for(part) end - describe "#status" do - it do - expect(subject.status).to eq(:registered) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(true) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(false) - end + it "matches status_failed.expected" do + expect(subject.status).to eq(:registered) + expect(subject.registered?).to eq(true) + expect(subject.available?).to eq(false) end end diff --git a/spec/whois/parsers/responses/whois.denic.de/de/status_invalid_spec.rb b/spec/whois/parsers/responses/whois.denic.de/de/status_invalid_spec.rb index 23063f3c..be503b1f 100644 --- a/spec/whois/parsers/responses/whois.denic.de/de/status_invalid_spec.rb +++ b/spec/whois/parsers/responses/whois.denic.de/de/status_invalid_spec.rb @@ -11,88 +11,33 @@ # require 'spec_helper' -require 'whois/parsers/whois.denic.de.rb' -describe Whois::Parsers::WhoisDenicDe, "status_invalid.expected" do +describe "whois.denic.de", :aggregate_failures do subject do file = fixture("responses", "whois.denic.de/de/status_invalid.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.denic.de") + Whois::Parser.parser_for(part) end - describe "#disclaimer" do - it do - expect(subject.disclaimer).to eq(nil) - end - end - describe "#domain" do - it do - expect(subject.domain).to eq("googlededewdedewdewde.foo.de") - end - end - describe "#domain_id" do - it do - expect { subject.domain_id }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#status" do - it do - expect(subject.status).to eq(:invalid) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(false) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(false) - end - end - describe "#created_on" do - it do - expect { subject.created_on }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#updated_on" do - it do - expect(subject.updated_on).to eq(nil) - end - end - describe "#expires_on" do - it do - expect { subject.expires_on }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#registrar" do - it do - expect(subject.registrar).to eq(nil) - end - end - describe "#registrant_contacts" do - it do - expect(subject.registrant_contacts).to be_a(Array) - expect(subject.registrant_contacts).to eq([]) - end - end - describe "#admin_contacts" do - it do - expect(subject.admin_contacts).to be_a(Array) - expect(subject.admin_contacts).to eq([]) - end - end - describe "#technical_contacts" do - it do - expect(subject.technical_contacts).to be_a(Array) - expect(subject.technical_contacts).to eq([]) - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers).to eq([]) - end + it "matches status_invalid.expected" do + expect(subject.disclaimer).to eq(nil) + expect(subject.domain).to eq("googlededewdedewdewde.foo.de") + expect { subject.domain_id }.to raise_error(Whois::AttributeNotSupported) + expect(subject.status).to eq(:invalid) + expect(subject.available?).to eq(false) + expect(subject.registered?).to eq(false) + expect { subject.created_on }.to raise_error(Whois::AttributeNotSupported) + expect(subject.updated_on).to eq(nil) + expect { subject.expires_on }.to raise_error(Whois::AttributeNotSupported) + expect(subject.registrar).to eq(nil) + expect(subject.registrant_contacts).to be_a(Array) + expect(subject.registrant_contacts).to eq([]) + expect(subject.admin_contacts).to be_a(Array) + expect(subject.admin_contacts).to eq([]) + expect(subject.technical_contacts).to be_a(Array) + expect(subject.technical_contacts).to eq([]) + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers).to eq([]) end end diff --git a/spec/whois/parsers/responses/whois.denic.de/de/status_registered_spec.rb b/spec/whois/parsers/responses/whois.denic.de/de/status_registered_spec.rb index 9af930bd..4b6b3713 100644 --- a/spec/whois/parsers/responses/whois.denic.de/de/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.denic.de/de/status_registered_spec.rb @@ -11,118 +11,59 @@ # require 'spec_helper' -require 'whois/parsers/whois.denic.de.rb' -describe Whois::Parsers::WhoisDenicDe, "status_registered.expected" do +describe "whois.denic.de", :aggregate_failures do subject do file = fixture("responses", "whois.denic.de/de/status_registered.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.denic.de") + Whois::Parser.parser_for(part) end - describe "#disclaimer" do - it do - expect(subject.disclaimer).to eq("The data in this record is provided by DENIC for informational purposes only. DENIC does not guarantee its accuracy and cannot, under any circumstances, be held liable in case the stored information would prove to be wrong, incomplete or not accurate in any sense. All the domain data that is visible in the whois service is protected by law. It is not permitted to use it for any purpose other than technical or administrative requirements associated with the operation of the Internet. It is explicitly forbidden to extract, copy and/or use or re-utilise in any form and by any means (electronically or not) the whole or a quantitatively or qualitatively substantial part of the contents of the whois database without prior and explicit written permission by DENIC. It is prohibited, in particular, to use it for transmission of unsolicited and/or commercial and/or advertising by phone, fax, e-mail or for any similar purposes. By maintaining the connection you assure that you have a legitimate interest in the data and that you will only use it for the stated purposes. You are aware that DENIC maintains the right to initiate legal proceedings against you in the event of any breach of this assurance and to bar you from using its whois service. The DENIC whois service on port 43 never discloses any information concerning the domain holder/administrative contact. Information concerning the domain holder/administrative contact can be obtained through use of our web-based whois service available at the DENIC website: http://www.denic.de/en/domains/whois-service/web-whois.html") - end - end - describe "#domain" do - it do - expect(subject.domain).to eq("google.de") - end - end - describe "#domain_id" do - it do - expect { subject.domain_id }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#status" do - it do - expect(subject.status).to eq(:registered) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(false) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(true) - end - end - describe "#created_on" do - it do - expect { subject.created_on }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#updated_on" do - it do - expect(subject.updated_on).to be_a(Time) - expect(subject.updated_on).to eq(DateTime.parse("2011-03-30 19:36:27 +0200")) - end - end - describe "#expires_on" do - it do - expect { subject.expires_on }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#registrar" do - it do - expect(subject.registrar).to be_a(Whois::Parser::Registrar) - expect(subject.registrar.id).to eq(nil) - expect(subject.registrar.name).to eq("Domain Admin") - expect(subject.registrar.url).to eq(nil) - end - end - describe "#registrant_contacts" do - it do - expect(subject.registrant_contacts).to be_a(Array) - expect(subject.registrant_contacts).to eq([]) - end - end - describe "#admin_contacts" do - it do - expect(subject.admin_contacts).to be_a(Array) - expect(subject.admin_contacts).to eq([]) - end - end - describe "#technical_contacts" do - it do - expect(subject.technical_contacts).to be_a(Array) - expect(subject.technical_contacts.size).to eq(1) - expect(subject.technical_contacts[0]).to be_a(Whois::Parser::Contact) - expect(subject.technical_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_TECHNICAL) - expect(subject.technical_contacts[0].id).to eq(nil) - expect(subject.technical_contacts[0].name).to eq("DNS Admin") - expect(subject.technical_contacts[0].organization).to eq("Google Inc.") - expect(subject.technical_contacts[0].address).to eq("1600 Amphitheatre Parkway") - expect(subject.technical_contacts[0].city).to eq("Mountain View") - expect(subject.technical_contacts[0].zip).to eq("94043") - expect(subject.technical_contacts[0].state).to eq(nil) - expect(subject.technical_contacts[0].country_code).to eq("US") - expect(subject.technical_contacts[0].phone).to eq("+1.6502530000") - expect(subject.technical_contacts[0].fax).to eq("+1.6506188571") - expect(subject.technical_contacts[0].email).to eq("dns-admin@google.com") - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers.size).to eq(4) - expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[0].name).to eq("ns1.google.com") - expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[1].name).to eq("ns2.google.com") - expect(subject.nameservers[2]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[2].name).to eq("ns3.google.com") - expect(subject.nameservers[3]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[3].name).to eq("ns4.google.com") - end - end - describe "#response_throttled?" do - it do - expect(subject.response_throttled?).to eq(false) - end + it "matches status_registered.expected" do + expect(subject.disclaimer).to eq("The data in this record is provided by DENIC for informational purposes only. DENIC does not guarantee its accuracy and cannot, under any circumstances, be held liable in case the stored information would prove to be wrong, incomplete or not accurate in any sense. All the domain data that is visible in the whois service is protected by law. It is not permitted to use it for any purpose other than technical or administrative requirements associated with the operation of the Internet. It is explicitly forbidden to extract, copy and/or use or re-utilise in any form and by any means (electronically or not) the whole or a quantitatively or qualitatively substantial part of the contents of the whois database without prior and explicit written permission by DENIC. It is prohibited, in particular, to use it for transmission of unsolicited and/or commercial and/or advertising by phone, fax, e-mail or for any similar purposes. By maintaining the connection you assure that you have a legitimate interest in the data and that you will only use it for the stated purposes. You are aware that DENIC maintains the right to initiate legal proceedings against you in the event of any breach of this assurance and to bar you from using its whois service. The DENIC whois service on port 43 never discloses any information concerning the domain holder/administrative contact. Information concerning the domain holder/administrative contact can be obtained through use of our web-based whois service available at the DENIC website: http://www.denic.de/en/domains/whois-service/web-whois.html") + expect(subject.domain).to eq("google.de") + expect { subject.domain_id }.to raise_error(Whois::AttributeNotSupported) + expect(subject.status).to eq(:registered) + expect(subject.available?).to eq(false) + expect(subject.registered?).to eq(true) + expect { subject.created_on }.to raise_error(Whois::AttributeNotSupported) + expect(subject.updated_on).to be_a(Time) + expect(subject.updated_on).to eq(DateTime.parse("2011-03-30 19:36:27 +0200")) + expect { subject.expires_on }.to raise_error(Whois::AttributeNotSupported) + expect(subject.registrar).to be_a(Whois::Parser::Registrar) + expect(subject.registrar.id).to eq(nil) + expect(subject.registrar.name).to eq("Domain Admin") + expect(subject.registrar.url).to eq(nil) + expect(subject.registrant_contacts).to be_a(Array) + expect(subject.registrant_contacts).to eq([]) + expect(subject.admin_contacts).to be_a(Array) + expect(subject.admin_contacts).to eq([]) + expect(subject.technical_contacts).to be_a(Array) + expect(subject.technical_contacts.size).to eq(1) + expect(subject.technical_contacts[0]).to be_a(Whois::Parser::Contact) + expect(subject.technical_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_TECHNICAL) + expect(subject.technical_contacts[0].id).to eq(nil) + expect(subject.technical_contacts[0].name).to eq("DNS Admin") + expect(subject.technical_contacts[0].organization).to eq("Google Inc.") + expect(subject.technical_contacts[0].address).to eq("1600 Amphitheatre Parkway") + expect(subject.technical_contacts[0].city).to eq("Mountain View") + expect(subject.technical_contacts[0].zip).to eq("94043") + expect(subject.technical_contacts[0].state).to eq(nil) + expect(subject.technical_contacts[0].country_code).to eq("US") + expect(subject.technical_contacts[0].phone).to eq("+1.6502530000") + expect(subject.technical_contacts[0].fax).to eq("+1.6506188571") + expect(subject.technical_contacts[0].email).to eq("dns-admin@google.com") + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers.size).to eq(4) + expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[0].name).to eq("ns1.google.com") + expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[1].name).to eq("ns2.google.com") + expect(subject.nameservers[2]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[2].name).to eq("ns3.google.com") + expect(subject.nameservers[3]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[3].name).to eq("ns4.google.com") + expect(subject.response_throttled?).to eq(false) end end diff --git a/spec/whois/parsers/responses/whois.dk-hostmaster.dk/dk/property_status_deactivated_spec.rb b/spec/whois/parsers/responses/whois.dk-hostmaster.dk/dk/property_status_deactivated_spec.rb index 0d7880c9..eec1164a 100644 --- a/spec/whois/parsers/responses/whois.dk-hostmaster.dk/dk/property_status_deactivated_spec.rb +++ b/spec/whois/parsers/responses/whois.dk-hostmaster.dk/dk/property_status_deactivated_spec.rb @@ -11,29 +11,18 @@ # require 'spec_helper' -require 'whois/parsers/whois.dk-hostmaster.dk.rb' -describe Whois::Parsers::WhoisDkHostmasterDk, "property_status_deactivated.expected" do +describe "whois.dk-hostmaster.dk", :aggregate_failures do subject do file = fixture("responses", "whois.dk-hostmaster.dk/dk/property_status_deactivated.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.dk-hostmaster.dk") + Whois::Parser.parser_for(part) end - describe "#status" do - it do - expect(subject.status).to eq(:expired) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(false) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(true) - end + it "matches property_status_deactivated.expected" do + expect(subject.status).to eq(:expired) + expect(subject.available?).to eq(false) + expect(subject.registered?).to eq(true) end end diff --git a/spec/whois/parsers/responses/whois.dk-hostmaster.dk/dk/property_status_reserved_spec.rb b/spec/whois/parsers/responses/whois.dk-hostmaster.dk/dk/property_status_reserved_spec.rb index 787966c3..b0c563b7 100644 --- a/spec/whois/parsers/responses/whois.dk-hostmaster.dk/dk/property_status_reserved_spec.rb +++ b/spec/whois/parsers/responses/whois.dk-hostmaster.dk/dk/property_status_reserved_spec.rb @@ -11,29 +11,18 @@ # require 'spec_helper' -require 'whois/parsers/whois.dk-hostmaster.dk.rb' -describe Whois::Parsers::WhoisDkHostmasterDk, "property_status_reserved.expected" do +describe "whois.dk-hostmaster.dk", :aggregate_failures do subject do file = fixture("responses", "whois.dk-hostmaster.dk/dk/property_status_reserved.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.dk-hostmaster.dk") + Whois::Parser.parser_for(part) end - describe "#status" do - it do - expect(subject.status).to eq(:reserved) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(false) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(true) - end + it "matches property_status_reserved.expected" do + expect(subject.status).to eq(:reserved) + expect(subject.available?).to eq(false) + expect(subject.registered?).to eq(true) end end diff --git a/spec/whois/parsers/responses/whois.dk-hostmaster.dk/dk/status_available_spec.rb b/spec/whois/parsers/responses/whois.dk-hostmaster.dk/dk/status_available_spec.rb index e92a3ab6..4492c624 100644 --- a/spec/whois/parsers/responses/whois.dk-hostmaster.dk/dk/status_available_spec.rb +++ b/spec/whois/parsers/responses/whois.dk-hostmaster.dk/dk/status_available_spec.rb @@ -11,55 +11,24 @@ # require 'spec_helper' -require 'whois/parsers/whois.dk-hostmaster.dk.rb' -describe Whois::Parsers::WhoisDkHostmasterDk, "status_available.expected" do +describe "whois.dk-hostmaster.dk", :aggregate_failures do subject do file = fixture("responses", "whois.dk-hostmaster.dk/dk/status_available.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.dk-hostmaster.dk") + Whois::Parser.parser_for(part) end - describe "#status" do - it do - expect(subject.status).to eq(:available) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(true) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(false) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to eq(nil) - end - end - describe "#updated_on" do - it do - expect { subject.updated_on }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to eq(nil) - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers).to eq([]) - end - end - describe "#response_throttled?" do - it do - expect(subject.response_throttled?).to eq(false) - end + it "matches status_available.expected" do + expect(subject.status).to eq(:available) + expect(subject.available?).to eq(true) + expect(subject.registered?).to eq(false) + expect(subject.created_on).to eq(nil) + expect { subject.updated_on }.to raise_error(Whois::AttributeNotSupported) + expect(subject.expires_on).to eq(nil) + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers).to eq([]) + expect(subject.response_throttled?).to eq(false) end end diff --git a/spec/whois/parsers/responses/whois.dk-hostmaster.dk/dk/status_registered_spec.rb b/spec/whois/parsers/responses/whois.dk-hostmaster.dk/dk/status_registered_spec.rb index 68ecf9fc..5a8e15a3 100644 --- a/spec/whois/parsers/responses/whois.dk-hostmaster.dk/dk/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.dk-hostmaster.dk/dk/status_registered_spec.rb @@ -11,65 +11,34 @@ # require 'spec_helper' -require 'whois/parsers/whois.dk-hostmaster.dk.rb' -describe Whois::Parsers::WhoisDkHostmasterDk, "status_registered.expected" do +describe "whois.dk-hostmaster.dk", :aggregate_failures do subject do file = fixture("responses", "whois.dk-hostmaster.dk/dk/status_registered.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.dk-hostmaster.dk") + Whois::Parser.parser_for(part) end - describe "#status" do - it do - expect(subject.status).to eq(:registered) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(false) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(true) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to be_a(Time) - expect(subject.created_on).to eq(DateTime.parse("1999-01-10")) - end - end - describe "#updated_on" do - it do - expect { subject.updated_on }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to be_a(Time) - expect(subject.expires_on).to eq(DateTime.parse("2010-03-31")) - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers.size).to eq(2) - expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[0].name).to eq("ns1.google.com") - expect(subject.nameservers[0].ipv4).to eq(nil) - expect(subject.nameservers[0].ipv6).to eq(nil) - expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[1].name).to eq("ns2.google.com") - expect(subject.nameservers[1].ipv4).to eq(nil) - expect(subject.nameservers[1].ipv6).to eq(nil) - end - end - describe "#response_throttled?" do - it do - expect(subject.response_throttled?).to eq(false) - end + it "matches status_registered.expected" do + expect(subject.status).to eq(:registered) + expect(subject.available?).to eq(false) + expect(subject.registered?).to eq(true) + expect(subject.created_on).to be_a(Time) + expect(subject.created_on).to eq(DateTime.parse("1999-01-10")) + expect { subject.updated_on }.to raise_error(Whois::AttributeNotSupported) + expect(subject.expires_on).to be_a(Time) + expect(subject.expires_on).to eq(DateTime.parse("2010-03-31")) + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers.size).to eq(2) + expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[0].name).to eq("ns1.google.com") + expect(subject.nameservers[0].ipv4).to eq(nil) + expect(subject.nameservers[0].ipv6).to eq(nil) + expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[1].name).to eq("ns2.google.com") + expect(subject.nameservers[1].ipv4).to eq(nil) + expect(subject.nameservers[1].ipv6).to eq(nil) + expect(subject.response_throttled?).to eq(false) end end diff --git a/spec/whois/parsers/responses/whois.dns.be/be/property_nameservers_with_ip_spec.rb b/spec/whois/parsers/responses/whois.dns.be/be/property_nameservers_with_ip_spec.rb index d59d68bc..a3d2e42f 100644 --- a/spec/whois/parsers/responses/whois.dns.be/be/property_nameservers_with_ip_spec.rb +++ b/spec/whois/parsers/responses/whois.dns.be/be/property_nameservers_with_ip_spec.rb @@ -11,29 +11,26 @@ # require 'spec_helper' -require 'whois/parsers/whois.dns.be.rb' -describe Whois::Parsers::WhoisDnsBe, "property_nameservers_with_ip.expected" do +describe "whois.dns.be", :aggregate_failures do subject do file = fixture("responses", "whois.dns.be/be/property_nameservers_with_ip.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.dns.be") + Whois::Parser.parser_for(part) end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers.size).to eq(3) - expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[0].name).to eq("ns3.register.be") - expect(subject.nameservers[0].ipv4).to eq("91.121.5.186") - expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[1].name).to eq("ns1.register.be") - expect(subject.nameservers[1].ipv4).to eq("80.169.63.207") - expect(subject.nameservers[2]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[2].name).to eq("ns2.register.be") - expect(subject.nameservers[2].ipv4).to eq("217.21.176.34") - end + it "matches property_nameservers_with_ip.expected" do + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers.size).to eq(3) + expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[0].name).to eq("ns3.register.be") + expect(subject.nameservers[0].ipv4).to eq("91.121.5.186") + expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[1].name).to eq("ns1.register.be") + expect(subject.nameservers[1].ipv4).to eq("80.169.63.207") + expect(subject.nameservers[2]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[2].name).to eq("ns2.register.be") + expect(subject.nameservers[2].ipv4).to eq("217.21.176.34") end end diff --git a/spec/whois/parsers/responses/whois.dns.be/be/property_status_available_spec.rb b/spec/whois/parsers/responses/whois.dns.be/be/property_status_available_spec.rb index a08f37c3..204f0c5f 100644 --- a/spec/whois/parsers/responses/whois.dns.be/be/property_status_available_spec.rb +++ b/spec/whois/parsers/responses/whois.dns.be/be/property_status_available_spec.rb @@ -11,29 +11,18 @@ # require 'spec_helper' -require 'whois/parsers/whois.dns.be.rb' -describe Whois::Parsers::WhoisDnsBe, "property_status_available.expected" do +describe "whois.dns.be", :aggregate_failures do subject do file = fixture("responses", "whois.dns.be/be/property_status_available.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.dns.be") + Whois::Parser.parser_for(part) end - describe "#status" do - it do - expect(subject.status).to eq(:available) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(true) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(false) - end + it "matches property_status_available.expected" do + expect(subject.status).to eq(:available) + expect(subject.available?).to eq(true) + expect(subject.registered?).to eq(false) end end diff --git a/spec/whois/parsers/responses/whois.dns.be/be/property_status_not_available_spec.rb b/spec/whois/parsers/responses/whois.dns.be/be/property_status_not_available_spec.rb index 5f84bccc..c9cfd8ae 100644 --- a/spec/whois/parsers/responses/whois.dns.be/be/property_status_not_available_spec.rb +++ b/spec/whois/parsers/responses/whois.dns.be/be/property_status_not_available_spec.rb @@ -11,29 +11,18 @@ # require 'spec_helper' -require 'whois/parsers/whois.dns.be.rb' -describe Whois::Parsers::WhoisDnsBe, "property_status_not_available.expected" do +describe "whois.dns.be", :aggregate_failures do subject do file = fixture("responses", "whois.dns.be/be/property_status_not_available.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.dns.be") + Whois::Parser.parser_for(part) end - describe "#status" do - it do - expect(subject.status).to eq(:registered) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(false) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(true) - end + it "matches property_status_not_available.expected" do + expect(subject.status).to eq(:registered) + expect(subject.available?).to eq(false) + expect(subject.registered?).to eq(true) end end diff --git a/spec/whois/parsers/responses/whois.dns.be/be/property_status_notallowed_spec.rb b/spec/whois/parsers/responses/whois.dns.be/be/property_status_notallowed_spec.rb index 3f3cc1af..beb1b190 100644 --- a/spec/whois/parsers/responses/whois.dns.be/be/property_status_notallowed_spec.rb +++ b/spec/whois/parsers/responses/whois.dns.be/be/property_status_notallowed_spec.rb @@ -11,29 +11,18 @@ # require 'spec_helper' -require 'whois/parsers/whois.dns.be.rb' -describe Whois::Parsers::WhoisDnsBe, "property_status_notallowed.expected" do +describe "whois.dns.be", :aggregate_failures do subject do file = fixture("responses", "whois.dns.be/be/property_status_notallowed.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.dns.be") + Whois::Parser.parser_for(part) end - describe "#status" do - it do - expect(subject.status).to eq(:invalid) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(false) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(false) - end + it "matches property_status_notallowed.expected" do + expect(subject.status).to eq(:invalid) + expect(subject.available?).to eq(false) + expect(subject.registered?).to eq(false) end end diff --git a/spec/whois/parsers/responses/whois.dns.be/be/property_status_outofservice_spec.rb b/spec/whois/parsers/responses/whois.dns.be/be/property_status_outofservice_spec.rb index ff9d9937..4bd96ae8 100644 --- a/spec/whois/parsers/responses/whois.dns.be/be/property_status_outofservice_spec.rb +++ b/spec/whois/parsers/responses/whois.dns.be/be/property_status_outofservice_spec.rb @@ -11,29 +11,18 @@ # require 'spec_helper' -require 'whois/parsers/whois.dns.be.rb' -describe Whois::Parsers::WhoisDnsBe, "property_status_outofservice.expected" do +describe "whois.dns.be", :aggregate_failures do subject do file = fixture("responses", "whois.dns.be/be/property_status_outofservice.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.dns.be") + Whois::Parser.parser_for(part) end - describe "#status" do - it do - expect(subject.status).to eq(:redemption) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(false) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(true) - end + it "matches property_status_outofservice.expected" do + expect(subject.status).to eq(:redemption) + expect(subject.available?).to eq(false) + expect(subject.registered?).to eq(true) end end diff --git a/spec/whois/parsers/responses/whois.dns.be/be/property_status_quarantine_spec.rb b/spec/whois/parsers/responses/whois.dns.be/be/property_status_quarantine_spec.rb index a599cc39..531916f8 100644 --- a/spec/whois/parsers/responses/whois.dns.be/be/property_status_quarantine_spec.rb +++ b/spec/whois/parsers/responses/whois.dns.be/be/property_status_quarantine_spec.rb @@ -11,29 +11,18 @@ # require 'spec_helper' -require 'whois/parsers/whois.dns.be.rb' -describe Whois::Parsers::WhoisDnsBe, "property_status_quarantine.expected" do +describe "whois.dns.be", :aggregate_failures do subject do file = fixture("responses", "whois.dns.be/be/property_status_quarantine.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.dns.be") + Whois::Parser.parser_for(part) end - describe "#status" do - it do - expect(subject.status).to eq(:redemption) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(false) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(true) - end + it "matches property_status_quarantine.expected" do + expect(subject.status).to eq(:redemption) + expect(subject.available?).to eq(false) + expect(subject.registered?).to eq(true) end end diff --git a/spec/whois/parsers/responses/whois.dns.be/be/response_blocked_spec.rb b/spec/whois/parsers/responses/whois.dns.be/be/response_blocked_spec.rb index 7a83708e..18f21cb2 100644 --- a/spec/whois/parsers/responses/whois.dns.be/be/response_blocked_spec.rb +++ b/spec/whois/parsers/responses/whois.dns.be/be/response_blocked_spec.rb @@ -11,24 +11,17 @@ # require 'spec_helper' -require 'whois/parsers/whois.dns.be.rb' -describe Whois::Parsers::WhoisDnsBe, "response_blocked.expected" do +describe "whois.dns.be", :aggregate_failures do subject do file = fixture("responses", "whois.dns.be/be/response_blocked.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.dns.be") + Whois::Parser.parser_for(part) end - describe "#response_throttled?" do - it do - expect(subject.response_throttled?).to eq(true) - end - end - describe "#response_blocked?" do - it do - expect(subject.response_blocked?).to eq(true) - end + it "matches response_blocked.expected" do + expect(subject.response_throttled?).to eq(true) + expect(subject.response_blocked?).to eq(true) end end diff --git a/spec/whois/parsers/responses/whois.dns.be/be/response_throttled_hourly_spec.rb b/spec/whois/parsers/responses/whois.dns.be/be/response_throttled_hourly_spec.rb index 39dcb45c..4e3341bb 100644 --- a/spec/whois/parsers/responses/whois.dns.be/be/response_throttled_hourly_spec.rb +++ b/spec/whois/parsers/responses/whois.dns.be/be/response_throttled_hourly_spec.rb @@ -11,19 +11,16 @@ # require 'spec_helper' -require 'whois/parsers/whois.dns.be.rb' -describe Whois::Parsers::WhoisDnsBe, "response_throttled_hourly.expected" do +describe "whois.dns.be", :aggregate_failures do subject do file = fixture("responses", "whois.dns.be/be/response_throttled_hourly.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.dns.be") + Whois::Parser.parser_for(part) end - describe "#response_throttled?" do - it do - expect(subject.response_throttled?).to eq(true) - end + it "matches response_throttled_hourly.expected" do + expect(subject.response_throttled?).to eq(true) end end diff --git a/spec/whois/parsers/responses/whois.dns.be/be/response_throttled_limit_spec.rb b/spec/whois/parsers/responses/whois.dns.be/be/response_throttled_limit_spec.rb index bfc3380c..2add6505 100644 --- a/spec/whois/parsers/responses/whois.dns.be/be/response_throttled_limit_spec.rb +++ b/spec/whois/parsers/responses/whois.dns.be/be/response_throttled_limit_spec.rb @@ -11,19 +11,16 @@ # require 'spec_helper' -require 'whois/parsers/whois.dns.be.rb' -describe Whois::Parsers::WhoisDnsBe, "response_throttled_limit.expected" do +describe "whois.dns.be", :aggregate_failures do subject do file = fixture("responses", "whois.dns.be/be/response_throttled_limit.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.dns.be") + Whois::Parser.parser_for(part) end - describe "#response_throttled?" do - it do - expect(subject.response_throttled?).to eq(true) - end + it "matches response_throttled_limit.expected" do + expect(subject.response_throttled?).to eq(true) end end diff --git a/spec/whois/parsers/responses/whois.dns.be/be/status_available_spec.rb b/spec/whois/parsers/responses/whois.dns.be/be/status_available_spec.rb index e23f452c..e9aff1be 100644 --- a/spec/whois/parsers/responses/whois.dns.be/be/status_available_spec.rb +++ b/spec/whois/parsers/responses/whois.dns.be/be/status_available_spec.rb @@ -11,70 +11,27 @@ # require 'spec_helper' -require 'whois/parsers/whois.dns.be.rb' -describe Whois::Parsers::WhoisDnsBe, "status_available.expected" do +describe "whois.dns.be", :aggregate_failures do subject do file = fixture("responses", "whois.dns.be/be/status_available.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.dns.be") + Whois::Parser.parser_for(part) end - describe "#domain" do - it do - expect(subject.domain).to eq("u34jedzcq.be") - end - end - describe "#status" do - it do - expect(subject.status).to eq(:available) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(true) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(false) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to eq(nil) - end - end - describe "#updated_on" do - it do - expect { subject.updated_on }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#expires_on" do - it do - expect { subject.expires_on }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#registrar" do - it do - expect(subject.registrar).to eq(nil) - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers).to eq([]) - end - end - describe "#response_throttled?" do - it do - expect(subject.response_throttled?).to eq(false) - end - end - describe "#invalid?" do - it do - expect(subject.invalid?).to eq(false) - end + it "matches status_available.expected" do + expect(subject.domain).to eq("u34jedzcq.be") + expect(subject.status).to eq(:available) + expect(subject.available?).to eq(true) + expect(subject.registered?).to eq(false) + expect(subject.created_on).to eq(nil) + expect { subject.updated_on }.to raise_error(Whois::AttributeNotSupported) + expect { subject.expires_on }.to raise_error(Whois::AttributeNotSupported) + expect(subject.registrar).to eq(nil) + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers).to eq([]) + expect(subject.response_throttled?).to eq(false) + expect(subject.invalid?).to eq(false) end end diff --git a/spec/whois/parsers/responses/whois.dns.be/be/status_invalid_spec.rb b/spec/whois/parsers/responses/whois.dns.be/be/status_invalid_spec.rb index 9b46d076..5c9e6edf 100644 --- a/spec/whois/parsers/responses/whois.dns.be/be/status_invalid_spec.rb +++ b/spec/whois/parsers/responses/whois.dns.be/be/status_invalid_spec.rb @@ -11,70 +11,27 @@ # require 'spec_helper' -require 'whois/parsers/whois.dns.be.rb' -describe Whois::Parsers::WhoisDnsBe, "status_invalid.expected" do +describe "whois.dns.be", :aggregate_failures do subject do file = fixture("responses", "whois.dns.be/be/status_invalid.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.dns.be") + Whois::Parser.parser_for(part) end - describe "#domain" do - it do - expect(subject.domain).to eq("www.kimdemolenaer.be") - end - end - describe "#status" do - it do - expect(subject.status).to eq(:invalid) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(false) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(false) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to eq(nil) - end - end - describe "#updated_on" do - it do - expect { subject.updated_on }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#expires_on" do - it do - expect { subject.expires_on }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#registrar" do - it do - expect(subject.registrar).to eq(nil) - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers).to eq([]) - end - end - describe "#response_throttled?" do - it do - expect(subject.response_throttled?).to eq(false) - end - end - describe "#invalid?" do - it do - expect(subject.invalid?).to eq(true) - end + it "matches status_invalid.expected" do + expect(subject.domain).to eq("www.kimdemolenaer.be") + expect(subject.status).to eq(:invalid) + expect(subject.available?).to eq(false) + expect(subject.registered?).to eq(false) + expect(subject.created_on).to eq(nil) + expect { subject.updated_on }.to raise_error(Whois::AttributeNotSupported) + expect { subject.expires_on }.to raise_error(Whois::AttributeNotSupported) + expect(subject.registrar).to eq(nil) + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers).to eq([]) + expect(subject.response_throttled?).to eq(false) + expect(subject.invalid?).to eq(true) end end diff --git a/spec/whois/parsers/responses/whois.dns.be/be/status_registered_spec.rb b/spec/whois/parsers/responses/whois.dns.be/be/status_registered_spec.rb index 0d09b87b..523c84e0 100644 --- a/spec/whois/parsers/responses/whois.dns.be/be/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.dns.be/be/status_registered_spec.rb @@ -11,82 +11,39 @@ # require 'spec_helper' -require 'whois/parsers/whois.dns.be.rb' -describe Whois::Parsers::WhoisDnsBe, "status_registered.expected" do +describe "whois.dns.be", :aggregate_failures do subject do file = fixture("responses", "whois.dns.be/be/status_registered.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.dns.be") + Whois::Parser.parser_for(part) end - describe "#domain" do - it do - expect(subject.domain).to eq("google.be") - end - end - describe "#status" do - it do - expect(subject.status).to eq(:registered) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(false) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(true) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to be_a(Time) - expect(subject.created_on).to eq(DateTime.parse("2000-12-12 00:00:00")) - end - end - describe "#updated_on" do - it do - expect { subject.updated_on }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#expires_on" do - it do - expect { subject.expires_on }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#registrar" do - it do - expect(subject.registrar).to be_a(Whois::Parser::Registrar) - expect(subject.registrar.id).to eq(nil) - expect(subject.registrar.name).to eq("MarkMonitor") - expect(subject.registrar.url).to eq("http://www.markmonitor.com") - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers.size).to eq(4) - expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[0].name).to eq("ns4.google.com") - expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[1].name).to eq("ns3.google.com") - expect(subject.nameservers[2]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[2].name).to eq("ns1.google.com") - expect(subject.nameservers[3]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[3].name).to eq("ns2.google.com") - end - end - describe "#response_throttled?" do - it do - expect(subject.response_throttled?).to eq(false) - end - end - describe "#invalid?" do - it do - expect(subject.invalid?).to eq(false) - end + it "matches status_registered.expected" do + expect(subject.domain).to eq("google.be") + expect(subject.status).to eq(:registered) + expect(subject.available?).to eq(false) + expect(subject.registered?).to eq(true) + expect(subject.created_on).to be_a(Time) + expect(subject.created_on).to eq(DateTime.parse("2000-12-12 00:00:00")) + expect { subject.updated_on }.to raise_error(Whois::AttributeNotSupported) + expect { subject.expires_on }.to raise_error(Whois::AttributeNotSupported) + expect(subject.registrar).to be_a(Whois::Parser::Registrar) + expect(subject.registrar.id).to eq(nil) + expect(subject.registrar.name).to eq("MarkMonitor") + expect(subject.registrar.url).to eq("http://www.markmonitor.com") + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers.size).to eq(4) + expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[0].name).to eq("ns4.google.com") + expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[1].name).to eq("ns3.google.com") + expect(subject.nameservers[2]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[2].name).to eq("ns1.google.com") + expect(subject.nameservers[3]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[3].name).to eq("ns2.google.com") + expect(subject.response_throttled?).to eq(false) + expect(subject.invalid?).to eq(false) end end diff --git a/spec/whois/parsers/responses/whois.dns.hr/hr/status_available_spec.rb b/spec/whois/parsers/responses/whois.dns.hr/hr/status_available_spec.rb index 4ab7e7ae..43beb0f0 100644 --- a/spec/whois/parsers/responses/whois.dns.hr/hr/status_available_spec.rb +++ b/spec/whois/parsers/responses/whois.dns.hr/hr/status_available_spec.rb @@ -11,85 +11,30 @@ # require 'spec_helper' -require 'whois/parsers/whois.dns.hr.rb' -describe Whois::Parsers::WhoisDnsHr, "status_available.expected" do +describe "whois.dns.hr", :aggregate_failures do subject do file = fixture("responses", "whois.dns.hr/hr/status_available.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.dns.hr") + Whois::Parser.parser_for(part) end - describe "#disclaimer" do - it do - expect { subject.disclaimer }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#domain" do - it do - expect(subject.domain).to eq(nil) - end - end - describe "#domain_id" do - it do - expect { subject.domain_id }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#status" do - it do - expect(subject.status).to eq(:available) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(true) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(false) - end - end - describe "#created_on" do - it do - expect { subject.created_on }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#updated_on" do - it do - expect { subject.updated_on }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to eq(nil) - end - end - describe "#registrar" do - it do - expect { subject.registrar }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#registrant_contacts" do - it do - expect(subject.registrant_contacts).to be_a(Array) - expect(subject.registrant_contacts).to eq([]) - end - end - describe "#admin_contacts" do - it do - expect { subject.admin_contacts }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#technical_contacts" do - it do - expect { subject.technical_contacts }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#nameservers" do - it do - expect { subject.nameservers }.to raise_error(Whois::AttributeNotSupported) - end + it "matches status_available.expected" do + expect { subject.disclaimer }.to raise_error(Whois::AttributeNotSupported) + expect(subject.domain).to eq(nil) + expect { subject.domain_id }.to raise_error(Whois::AttributeNotSupported) + expect(subject.status).to eq(:available) + expect(subject.available?).to eq(true) + expect(subject.registered?).to eq(false) + expect { subject.created_on }.to raise_error(Whois::AttributeNotSupported) + expect { subject.updated_on }.to raise_error(Whois::AttributeNotSupported) + expect(subject.expires_on).to eq(nil) + expect { subject.registrar }.to raise_error(Whois::AttributeNotSupported) + expect(subject.registrant_contacts).to be_a(Array) + expect(subject.registrant_contacts).to eq([]) + expect { subject.admin_contacts }.to raise_error(Whois::AttributeNotSupported) + expect { subject.technical_contacts }.to raise_error(Whois::AttributeNotSupported) + expect { subject.nameservers }.to raise_error(Whois::AttributeNotSupported) end end diff --git a/spec/whois/parsers/responses/whois.dns.hr/hr/status_registered_spec.rb b/spec/whois/parsers/responses/whois.dns.hr/hr/status_registered_spec.rb index b75ad2e1..2d20a428 100644 --- a/spec/whois/parsers/responses/whois.dns.hr/hr/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.dns.hr/hr/status_registered_spec.rb @@ -11,100 +11,45 @@ # require 'spec_helper' -require 'whois/parsers/whois.dns.hr.rb' -describe Whois::Parsers::WhoisDnsHr, "status_registered.expected" do +describe "whois.dns.hr", :aggregate_failures do subject do file = fixture("responses", "whois.dns.hr/hr/status_registered.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.dns.hr") + Whois::Parser.parser_for(part) end - describe "#disclaimer" do - it do - expect { subject.disclaimer }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#domain" do - it do - expect(subject.domain).to eq("google.hr") - end - end - describe "#domain_id" do - it do - expect { subject.domain_id }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#status" do - it do - expect(subject.status).to eq(:registered) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(false) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(true) - end - end - describe "#created_on" do - it do - expect { subject.created_on }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#updated_on" do - it do - expect { subject.updated_on }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to be_a(Time) - expect(subject.expires_on).to eq(DateTime.parse("2014-09-21")) - end - end - describe "#registrar" do - it do - expect { subject.registrar }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#registrant_contacts" do - it do - expect(subject.registrant_contacts).to be_a(Array) - expect(subject.registrant_contacts.size).to eq(1) - expect(subject.registrant_contacts[0]).to be_a(Whois::Parser::Contact) - expect(subject.registrant_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_REGISTRANT) - expect(subject.registrant_contacts[0].id).to eq(nil) - expect(subject.registrant_contacts[0].name).to eq("Google Hrvatska d.o.o.") - expect(subject.registrant_contacts[0].organization).to eq(nil) - expect(subject.registrant_contacts[0].address).to eq("Ulica Petra Hektorovića 2") - expect(subject.registrant_contacts[0].city).to eq("Zagreb") - expect(subject.registrant_contacts[0].zip).to eq("10 000") - expect(subject.registrant_contacts[0].state).to eq(nil) - expect(subject.registrant_contacts[0].country).to eq(nil) - expect(subject.registrant_contacts[0].country_code).to eq(nil) - expect(subject.registrant_contacts[0].phone).to eq(nil) - expect(subject.registrant_contacts[0].fax).to eq(nil) - expect(subject.registrant_contacts[0].email).to eq(nil) - end - end - describe "#admin_contacts" do - it do - expect { subject.admin_contacts }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#technical_contacts" do - it do - expect { subject.technical_contacts }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#nameservers" do - it do - expect { subject.nameservers }.to raise_error(Whois::AttributeNotSupported) - end + it "matches status_registered.expected" do + expect { subject.disclaimer }.to raise_error(Whois::AttributeNotSupported) + expect(subject.domain).to eq("google.hr") + expect { subject.domain_id }.to raise_error(Whois::AttributeNotSupported) + expect(subject.status).to eq(:registered) + expect(subject.available?).to eq(false) + expect(subject.registered?).to eq(true) + expect { subject.created_on }.to raise_error(Whois::AttributeNotSupported) + expect { subject.updated_on }.to raise_error(Whois::AttributeNotSupported) + expect(subject.expires_on).to be_a(Time) + expect(subject.expires_on).to eq(DateTime.parse("2014-09-21")) + expect { subject.registrar }.to raise_error(Whois::AttributeNotSupported) + expect(subject.registrant_contacts).to be_a(Array) + expect(subject.registrant_contacts.size).to eq(1) + expect(subject.registrant_contacts[0]).to be_a(Whois::Parser::Contact) + expect(subject.registrant_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_REGISTRANT) + expect(subject.registrant_contacts[0].id).to eq(nil) + expect(subject.registrant_contacts[0].name).to eq("Google Hrvatska d.o.o.") + expect(subject.registrant_contacts[0].organization).to eq(nil) + expect(subject.registrant_contacts[0].address).to eq("Ulica Petra Hektorovića 2") + expect(subject.registrant_contacts[0].city).to eq("Zagreb") + expect(subject.registrant_contacts[0].zip).to eq("10 000") + expect(subject.registrant_contacts[0].state).to eq(nil) + expect(subject.registrant_contacts[0].country).to eq(nil) + expect(subject.registrant_contacts[0].country_code).to eq(nil) + expect(subject.registrant_contacts[0].phone).to eq(nil) + expect(subject.registrant_contacts[0].fax).to eq(nil) + expect(subject.registrant_contacts[0].email).to eq(nil) + expect { subject.admin_contacts }.to raise_error(Whois::AttributeNotSupported) + expect { subject.technical_contacts }.to raise_error(Whois::AttributeNotSupported) + expect { subject.nameservers }.to raise_error(Whois::AttributeNotSupported) end end diff --git a/spec/whois/parsers/responses/whois.dns.lu/lu/property_nameservers_with_ip_spec.rb b/spec/whois/parsers/responses/whois.dns.lu/lu/property_nameservers_with_ip_spec.rb index bb9ea5bb..05a6ce5d 100644 --- a/spec/whois/parsers/responses/whois.dns.lu/lu/property_nameservers_with_ip_spec.rb +++ b/spec/whois/parsers/responses/whois.dns.lu/lu/property_nameservers_with_ip_spec.rb @@ -11,29 +11,26 @@ # require 'spec_helper' -require 'whois/parsers/whois.dns.lu.rb' -describe Whois::Parsers::WhoisDnsLu, "property_nameservers_with_ip.expected" do +describe "whois.dns.lu", :aggregate_failures do subject do file = fixture("responses", "whois.dns.lu/lu/property_nameservers_with_ip.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.dns.lu") + Whois::Parser.parser_for(part) end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers.size).to eq(3) - expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[0].name).to eq("ns1.arbed.lu") - expect(subject.nameservers[0].ipv4).to eq("194.154.218.10") - expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[1].name).to eq("ns1.pt.lu") - expect(subject.nameservers[1].ipv4).to eq(nil) - expect(subject.nameservers[2]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[2].name).to eq("ns2.arbed.lu") - expect(subject.nameservers[2].ipv4).to eq("194.154.218.12") - end + it "matches property_nameservers_with_ip.expected" do + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers.size).to eq(3) + expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[0].name).to eq("ns1.arbed.lu") + expect(subject.nameservers[0].ipv4).to eq("194.154.218.10") + expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[1].name).to eq("ns1.pt.lu") + expect(subject.nameservers[1].ipv4).to eq(nil) + expect(subject.nameservers[2]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[2].name).to eq("ns2.arbed.lu") + expect(subject.nameservers[2].ipv4).to eq("194.154.218.12") end end diff --git a/spec/whois/parsers/responses/whois.dns.lu/lu/status_available_spec.rb b/spec/whois/parsers/responses/whois.dns.lu/lu/status_available_spec.rb index 02541790..71aae61a 100644 --- a/spec/whois/parsers/responses/whois.dns.lu/lu/status_available_spec.rb +++ b/spec/whois/parsers/responses/whois.dns.lu/lu/status_available_spec.rb @@ -11,73 +11,30 @@ # require 'spec_helper' -require 'whois/parsers/whois.dns.lu.rb' -describe Whois::Parsers::WhoisDnsLu, "status_available.expected" do +describe "whois.dns.lu", :aggregate_failures do subject do file = fixture("responses", "whois.dns.lu/lu/status_available.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.dns.lu") + Whois::Parser.parser_for(part) end - describe "#status" do - it do - expect(subject.status).to eq(:available) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(true) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(false) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to eq(nil) - end - end - describe "#updated_on" do - it do - expect { subject.updated_on }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#expires_on" do - it do - expect { subject.expires_on }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#registrar" do - it do - expect(subject.registrar).to eq(nil) - end - end - describe "#registrant_contacts" do - it do - expect(subject.registrant_contacts).to be_a(Array) - expect(subject.registrant_contacts).to eq([]) - end - end - describe "#admin_contacts" do - it do - expect(subject.admin_contacts).to be_a(Array) - expect(subject.admin_contacts).to eq([]) - end - end - describe "#technical_contacts" do - it do - expect(subject.technical_contacts).to be_a(Array) - expect(subject.technical_contacts).to eq([]) - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers).to eq([]) - end + it "matches status_available.expected" do + expect(subject.status).to eq(:available) + expect(subject.available?).to eq(true) + expect(subject.registered?).to eq(false) + expect(subject.created_on).to eq(nil) + expect { subject.updated_on }.to raise_error(Whois::AttributeNotSupported) + expect { subject.expires_on }.to raise_error(Whois::AttributeNotSupported) + expect(subject.registrar).to eq(nil) + expect(subject.registrant_contacts).to be_a(Array) + expect(subject.registrant_contacts).to eq([]) + expect(subject.admin_contacts).to be_a(Array) + expect(subject.admin_contacts).to eq([]) + expect(subject.technical_contacts).to be_a(Array) + expect(subject.technical_contacts).to eq([]) + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers).to eq([]) end end diff --git a/spec/whois/parsers/responses/whois.dns.lu/lu/status_registered_spec.rb b/spec/whois/parsers/responses/whois.dns.lu/lu/status_registered_spec.rb index 580e9b58..0b73033c 100644 --- a/spec/whois/parsers/responses/whois.dns.lu/lu/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.dns.lu/lu/status_registered_spec.rb @@ -11,107 +11,64 @@ # require 'spec_helper' -require 'whois/parsers/whois.dns.lu.rb' -describe Whois::Parsers::WhoisDnsLu, "status_registered.expected" do +describe "whois.dns.lu", :aggregate_failures do subject do file = fixture("responses", "whois.dns.lu/lu/status_registered.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.dns.lu") + Whois::Parser.parser_for(part) end - describe "#status" do - it do - expect(subject.status).to eq(:registered) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(false) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(true) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to be_a(Time) - expect(subject.created_on).to eq(DateTime.parse("2003-06-04 00:00:00 UTC")) - end - end - describe "#updated_on" do - it do - expect { subject.updated_on }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#expires_on" do - it do - expect { subject.expires_on }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#registrar" do - it do - expect(subject.registrar).to be_a(Whois::Parser::Registrar) - expect(subject.registrar.name).to eq("Markmonitor") - expect(subject.registrar.url).to eq("http://www.markmonitor.com/") - end - end - describe "#registrant_contacts" do - it do - expect(subject.registrant_contacts).to be_a(Array) - expect(subject.registrant_contacts.size).to eq(1) - expect(subject.registrant_contacts[0]).to be_a(Whois::Parser::Contact) - expect(subject.registrant_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_REGISTRANT) - expect(subject.registrant_contacts[0].name).to eq("Google Inc.") - expect(subject.registrant_contacts[0].address).to eq("1600 Amphitheatre Parkway") - expect(subject.registrant_contacts[0].city).to eq("Mountain View") - expect(subject.registrant_contacts[0].zip).to eq("94043") - expect(subject.registrant_contacts[0].country_code).to eq("US") - end - end - describe "#admin_contacts" do - it do - expect(subject.admin_contacts).to be_a(Array) - expect(subject.admin_contacts.size).to eq(1) - expect(subject.admin_contacts[0]).to be_a(Whois::Parser::Contact) - expect(subject.admin_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_ADMINISTRATIVE) - expect(subject.admin_contacts[0].name).to eq("DNS Admin") - expect(subject.admin_contacts[0].address).to eq("Google Inc., 1600 Amphitheatre Parkway") - expect(subject.admin_contacts[0].city).to eq("Mountain View") - expect(subject.admin_contacts[0].zip).to eq("94043") - expect(subject.admin_contacts[0].country_code).to eq("US") - expect(subject.admin_contacts[0].email).to eq("dns-admin@google.com") - end - end - describe "#technical_contacts" do - it do - expect(subject.technical_contacts).to be_a(Array) - expect(subject.technical_contacts.size).to eq(1) - expect(subject.technical_contacts[0]).to be_a(Whois::Parser::Contact) - expect(subject.technical_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_TECHNICAL) - expect(subject.technical_contacts[0].name).to eq("DNS Admin") - expect(subject.technical_contacts[0].address).to eq("Google Inc., 1600 Amphitheatre Parkway") - expect(subject.technical_contacts[0].city).to eq("Mountain View") - expect(subject.technical_contacts[0].zip).to eq("94043") - expect(subject.technical_contacts[0].country_code).to eq("US") - expect(subject.technical_contacts[0].email).to eq("dns-admin@google.com") - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers.size).to eq(4) - expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[0].name).to eq("ns1.google.com") - expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[1].name).to eq("ns2.google.com") - expect(subject.nameservers[2]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[2].name).to eq("ns3.google.com") - expect(subject.nameservers[3]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[3].name).to eq("ns4.google.com") - end + it "matches status_registered.expected" do + expect(subject.status).to eq(:registered) + expect(subject.available?).to eq(false) + expect(subject.registered?).to eq(true) + expect(subject.created_on).to be_a(Time) + expect(subject.created_on).to eq(DateTime.parse("2003-06-04 00:00:00 UTC")) + expect { subject.updated_on }.to raise_error(Whois::AttributeNotSupported) + expect { subject.expires_on }.to raise_error(Whois::AttributeNotSupported) + expect(subject.registrar).to be_a(Whois::Parser::Registrar) + expect(subject.registrar.name).to eq("Markmonitor") + expect(subject.registrar.url).to eq("http://www.markmonitor.com/") + expect(subject.registrant_contacts).to be_a(Array) + expect(subject.registrant_contacts.size).to eq(1) + expect(subject.registrant_contacts[0]).to be_a(Whois::Parser::Contact) + expect(subject.registrant_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_REGISTRANT) + expect(subject.registrant_contacts[0].name).to eq("Google Inc.") + expect(subject.registrant_contacts[0].address).to eq("1600 Amphitheatre Parkway") + expect(subject.registrant_contacts[0].city).to eq("Mountain View") + expect(subject.registrant_contacts[0].zip).to eq("94043") + expect(subject.registrant_contacts[0].country_code).to eq("US") + expect(subject.admin_contacts).to be_a(Array) + expect(subject.admin_contacts.size).to eq(1) + expect(subject.admin_contacts[0]).to be_a(Whois::Parser::Contact) + expect(subject.admin_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_ADMINISTRATIVE) + expect(subject.admin_contacts[0].name).to eq("DNS Admin") + expect(subject.admin_contacts[0].address).to eq("Google Inc., 1600 Amphitheatre Parkway") + expect(subject.admin_contacts[0].city).to eq("Mountain View") + expect(subject.admin_contacts[0].zip).to eq("94043") + expect(subject.admin_contacts[0].country_code).to eq("US") + expect(subject.admin_contacts[0].email).to eq("dns-admin@google.com") + expect(subject.technical_contacts).to be_a(Array) + expect(subject.technical_contacts.size).to eq(1) + expect(subject.technical_contacts[0]).to be_a(Whois::Parser::Contact) + expect(subject.technical_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_TECHNICAL) + expect(subject.technical_contacts[0].name).to eq("DNS Admin") + expect(subject.technical_contacts[0].address).to eq("Google Inc., 1600 Amphitheatre Parkway") + expect(subject.technical_contacts[0].city).to eq("Mountain View") + expect(subject.technical_contacts[0].zip).to eq("94043") + expect(subject.technical_contacts[0].country_code).to eq("US") + expect(subject.technical_contacts[0].email).to eq("dns-admin@google.com") + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers.size).to eq(4) + expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[0].name).to eq("ns1.google.com") + expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[1].name).to eq("ns2.google.com") + expect(subject.nameservers[2]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[2].name).to eq("ns3.google.com") + expect(subject.nameservers[3]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[3].name).to eq("ns4.google.com") end end diff --git a/spec/whois/parsers/responses/whois.dns.pl/pl/property_expires_on_not_defined_spec.rb b/spec/whois/parsers/responses/whois.dns.pl/pl/property_expires_on_not_defined_spec.rb index 47de0fd9..bffd99c9 100644 --- a/spec/whois/parsers/responses/whois.dns.pl/pl/property_expires_on_not_defined_spec.rb +++ b/spec/whois/parsers/responses/whois.dns.pl/pl/property_expires_on_not_defined_spec.rb @@ -11,19 +11,16 @@ # require 'spec_helper' -require 'whois/parsers/whois.dns.pl.rb' -describe Whois::Parsers::WhoisDnsPl, "property_expires_on_not_defined.expected" do +describe "whois.dns.pl", :aggregate_failures do subject do file = fixture("responses", "whois.dns.pl/pl/property_expires_on_not_defined.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.dns.pl") + Whois::Parser.parser_for(part) end - describe "#expires_on" do - it do - expect(subject.expires_on).to eq(nil) - end + it "matches property_expires_on_not_defined.expected" do + expect(subject.expires_on).to eq(nil) end end diff --git a/spec/whois/parsers/responses/whois.dns.pl/pl/property_nameservers_with_ip_spec.rb b/spec/whois/parsers/responses/whois.dns.pl/pl/property_nameservers_with_ip_spec.rb index 91035203..66b64e11 100644 --- a/spec/whois/parsers/responses/whois.dns.pl/pl/property_nameservers_with_ip_spec.rb +++ b/spec/whois/parsers/responses/whois.dns.pl/pl/property_nameservers_with_ip_spec.rb @@ -11,26 +11,23 @@ # require 'spec_helper' -require 'whois/parsers/whois.dns.pl.rb' -describe Whois::Parsers::WhoisDnsPl, "property_nameservers_with_ip.expected" do +describe "whois.dns.pl", :aggregate_failures do subject do file = fixture("responses", "whois.dns.pl/pl/property_nameservers_with_ip.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.dns.pl") + Whois::Parser.parser_for(part) end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers.size).to eq(2) - expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[0].name).to eq("dns1.pentex.pl") - expect(subject.nameservers[0].ipv4).to eq("188.165.232.46") - expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[1].name).to eq("dns2.pentex.pl") - expect(subject.nameservers[1].ipv4).to eq("83.142.46.21") - end + it "matches property_nameservers_with_ip.expected" do + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers.size).to eq(2) + expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[0].name).to eq("dns1.pentex.pl") + expect(subject.nameservers[0].ipv4).to eq("188.165.232.46") + expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[1].name).to eq("dns2.pentex.pl") + expect(subject.nameservers[1].ipv4).to eq("83.142.46.21") end end diff --git a/spec/whois/parsers/responses/whois.dns.pl/pl/response_throttled_spec.rb b/spec/whois/parsers/responses/whois.dns.pl/pl/response_throttled_spec.rb index 74131f99..d2649e7e 100644 --- a/spec/whois/parsers/responses/whois.dns.pl/pl/response_throttled_spec.rb +++ b/spec/whois/parsers/responses/whois.dns.pl/pl/response_throttled_spec.rb @@ -11,19 +11,16 @@ # require 'spec_helper' -require 'whois/parsers/whois.dns.pl.rb' -describe Whois::Parsers::WhoisDnsPl, "response_throttled.expected" do +describe "whois.dns.pl", :aggregate_failures do subject do file = fixture("responses", "whois.dns.pl/pl/response_throttled.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.dns.pl") + Whois::Parser.parser_for(part) end - describe "#response_throttled?" do - it do - expect(subject.response_throttled?).to eq(true) - end + it "matches response_throttled.expected" do + expect(subject.response_throttled?).to eq(true) end end diff --git a/spec/whois/parsers/responses/whois.dns.pl/pl/status_available_spec.rb b/spec/whois/parsers/responses/whois.dns.pl/pl/status_available_spec.rb index 55e0313f..72076b1e 100644 --- a/spec/whois/parsers/responses/whois.dns.pl/pl/status_available_spec.rb +++ b/spec/whois/parsers/responses/whois.dns.pl/pl/status_available_spec.rb @@ -11,81 +11,30 @@ # require 'spec_helper' -require 'whois/parsers/whois.dns.pl.rb' -describe Whois::Parsers::WhoisDnsPl, "status_available.expected" do +describe "whois.dns.pl", :aggregate_failures do subject do file = fixture("responses", "whois.dns.pl/pl/status_available.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.dns.pl") + Whois::Parser.parser_for(part) end - describe "#domain" do - it do - expect(subject.domain).to eq(nil) - end - end - describe "#domain_id" do - it do - expect { subject.domain_id }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#status" do - it do - expect(subject.status).to eq(:available) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(true) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(false) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to eq(nil) - end - end - describe "#updated_on" do - it do - expect(subject.updated_on).to eq(nil) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to eq(nil) - end - end - describe "#registrar" do - it do - expect(subject.registrar).to eq(nil) - end - end - describe "#registrant_contacts" do - it do - expect { subject.registrant_contacts }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#admin_contacts" do - it do - expect { subject.admin_contacts }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#technical_contacts" do - it do - expect(subject.technical_contacts).to be_a(Array) - expect(subject.technical_contacts).to eq([]) - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers).to eq([]) - end + it "matches status_available.expected" do + expect(subject.domain).to eq(nil) + expect { subject.domain_id }.to raise_error(Whois::AttributeNotSupported) + expect(subject.status).to eq(:available) + expect(subject.available?).to eq(true) + expect(subject.registered?).to eq(false) + expect(subject.created_on).to eq(nil) + expect(subject.updated_on).to eq(nil) + expect(subject.expires_on).to eq(nil) + expect(subject.registrar).to eq(nil) + expect { subject.registrant_contacts }.to raise_error(Whois::AttributeNotSupported) + expect { subject.admin_contacts }.to raise_error(Whois::AttributeNotSupported) + expect(subject.technical_contacts).to be_a(Array) + expect(subject.technical_contacts).to eq([]) + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers).to eq([]) end end diff --git a/spec/whois/parsers/responses/whois.dns.pl/pl/status_registered_spec.rb b/spec/whois/parsers/responses/whois.dns.pl/pl/status_registered_spec.rb index 1b99768d..b925efb5 100644 --- a/spec/whois/parsers/responses/whois.dns.pl/pl/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.dns.pl/pl/status_registered_spec.rb @@ -11,110 +11,55 @@ # require 'spec_helper' -require 'whois/parsers/whois.dns.pl.rb' -describe Whois::Parsers::WhoisDnsPl, "status_registered.expected" do +describe "whois.dns.pl", :aggregate_failures do subject do file = fixture("responses", "whois.dns.pl/pl/status_registered.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.dns.pl") + Whois::Parser.parser_for(part) end - describe "#domain" do - it do - expect(subject.domain).to eq("google.pl") - end - end - describe "#domain_id" do - it do - expect { subject.domain_id }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#status" do - it do - expect(subject.status).to eq(:registered) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(false) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(true) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to be_a(Time) - expect(subject.created_on).to eq(DateTime.parse("2002-09-19 13:00:00")) - end - end - describe "#updated_on" do - it do - expect(subject.updated_on).to be_a(Time) - expect(subject.updated_on).to eq(DateTime.parse("2012-08-17 11:21:09")) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to be_a(Time) - expect(subject.expires_on).to eq(DateTime.parse("2013-09-18 14:00:00")) - end - end - describe "#registrar" do - it do - expect(subject.registrar).to be_a(Whois::Parser::Registrar) - expect(subject.registrar.id).to eq(nil) - expect(subject.registrar.name).to eq("Markmonitor, Inc.") - expect(subject.registrar.url).to eq(nil) - end - end - describe "#registrant_contacts" do - it do - expect { subject.registrant_contacts }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#admin_contacts" do - it do - expect { subject.admin_contacts }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#technical_contacts" do - it do - expect(subject.technical_contacts).to be_a(Array) - expect(subject.technical_contacts.size).to eq(1) - expect(subject.technical_contacts[0]).to be_a(Whois::Parser::Contact) - expect(subject.technical_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_TECHNICAL) - expect(subject.technical_contacts[0].id).to eq("ks_5271013") - expect(subject.technical_contacts[0].name).to eq(nil) - expect(subject.technical_contacts[0].organization).to eq("DNS Admin\nGoogle Inc.") - expect(subject.technical_contacts[0].address).to eq("1600 Amphitheatre Parkway") - expect(subject.technical_contacts[0].city).to eq("Mountain View") - expect(subject.technical_contacts[0].zip).to eq("94043") - expect(subject.technical_contacts[0].state).to eq(nil) - expect(subject.technical_contacts[0].country).to eq(nil) - expect(subject.technical_contacts[0].country_code).to eq("US") - expect(subject.technical_contacts[0].phone).to eq("+1.6503300100") - expect(subject.technical_contacts[0].fax).to eq("+1.6506188571") - expect(subject.technical_contacts[0].email).to eq(nil) - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers.size).to eq(2) - expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[0].name).to eq("ns2.google.com") - expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[1].name).to eq("ns1.google.com") - end - end - describe "#response_throttled?" do - it do - expect(subject.response_throttled?).to eq(false) - end + it "matches status_registered.expected" do + expect(subject.domain).to eq("google.pl") + expect { subject.domain_id }.to raise_error(Whois::AttributeNotSupported) + expect(subject.status).to eq(:registered) + expect(subject.available?).to eq(false) + expect(subject.registered?).to eq(true) + expect(subject.created_on).to be_a(Time) + expect(subject.created_on).to eq(DateTime.parse("2002-09-19 13:00:00")) + expect(subject.updated_on).to be_a(Time) + expect(subject.updated_on).to eq(DateTime.parse("2012-08-17 11:21:09")) + expect(subject.expires_on).to be_a(Time) + expect(subject.expires_on).to eq(DateTime.parse("2013-09-18 14:00:00")) + expect(subject.registrar).to be_a(Whois::Parser::Registrar) + expect(subject.registrar.id).to eq(nil) + expect(subject.registrar.name).to eq("Markmonitor, Inc.") + expect(subject.registrar.url).to eq(nil) + expect { subject.registrant_contacts }.to raise_error(Whois::AttributeNotSupported) + expect { subject.admin_contacts }.to raise_error(Whois::AttributeNotSupported) + expect(subject.technical_contacts).to be_a(Array) + expect(subject.technical_contacts.size).to eq(1) + expect(subject.technical_contacts[0]).to be_a(Whois::Parser::Contact) + expect(subject.technical_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_TECHNICAL) + expect(subject.technical_contacts[0].id).to eq("ks_5271013") + expect(subject.technical_contacts[0].name).to eq(nil) + expect(subject.technical_contacts[0].organization).to eq("DNS Admin\nGoogle Inc.") + expect(subject.technical_contacts[0].address).to eq("1600 Amphitheatre Parkway") + expect(subject.technical_contacts[0].city).to eq("Mountain View") + expect(subject.technical_contacts[0].zip).to eq("94043") + expect(subject.technical_contacts[0].state).to eq(nil) + expect(subject.technical_contacts[0].country).to eq(nil) + expect(subject.technical_contacts[0].country_code).to eq("US") + expect(subject.technical_contacts[0].phone).to eq("+1.6503300100") + expect(subject.technical_contacts[0].fax).to eq("+1.6506188571") + expect(subject.technical_contacts[0].email).to eq(nil) + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers.size).to eq(2) + expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[0].name).to eq("ns2.google.com") + expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[1].name).to eq("ns1.google.com") + expect(subject.response_throttled?).to eq(false) end end diff --git a/spec/whois/parsers/responses/whois.dns.pt/pt/property_nameservers_spec.rb b/spec/whois/parsers/responses/whois.dns.pt/pt/property_nameservers_spec.rb index 060bf5ee..13f0b584 100644 --- a/spec/whois/parsers/responses/whois.dns.pt/pt/property_nameservers_spec.rb +++ b/spec/whois/parsers/responses/whois.dns.pt/pt/property_nameservers_spec.rb @@ -11,28 +11,25 @@ # require 'spec_helper' -require 'whois/parsers/whois.dns.pt.rb' -describe Whois::Parsers::WhoisDnsPt, "property_nameservers.expected" do +describe "whois.dns.pt", :aggregate_failures do subject do file = fixture("responses", "whois.dns.pt/pt/property_nameservers.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.dns.pt") + Whois::Parser.parser_for(part) end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers.size).to eq(4) - expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[0].name).to eq("ns4.google.com") - expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[1].name).to eq("ns2.google.com") - expect(subject.nameservers[2]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[2].name).to eq("ns1.google.com") - expect(subject.nameservers[3]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[3].name).to eq("ns3.google.com") - end + it "matches property_nameservers.expected" do + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers.size).to eq(4) + expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[0].name).to eq("ns4.google.com") + expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[1].name).to eq("ns2.google.com") + expect(subject.nameservers[2]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[2].name).to eq("ns1.google.com") + expect(subject.nameservers[3]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[3].name).to eq("ns3.google.com") end end diff --git a/spec/whois/parsers/responses/whois.dns.pt/pt/property_status_techpro_spec.rb b/spec/whois/parsers/responses/whois.dns.pt/pt/property_status_techpro_spec.rb index e5242864..6b8b1566 100644 --- a/spec/whois/parsers/responses/whois.dns.pt/pt/property_status_techpro_spec.rb +++ b/spec/whois/parsers/responses/whois.dns.pt/pt/property_status_techpro_spec.rb @@ -11,29 +11,18 @@ # require 'spec_helper' -require 'whois/parsers/whois.dns.pt.rb' -describe Whois::Parsers::WhoisDnsPt, "property_status_techpro.expected" do +describe "whois.dns.pt", :aggregate_failures do subject do file = fixture("responses", "whois.dns.pt/pt/property_status_techpro.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.dns.pt") + Whois::Parser.parser_for(part) end - describe "#status" do - it do - expect(subject.status).to eq(:inactive) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(false) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(true) - end + it "matches property_status_techpro.expected" do + expect(subject.status).to eq(:inactive) + expect(subject.available?).to eq(false) + expect(subject.registered?).to eq(true) end end diff --git a/spec/whois/parsers/responses/whois.dns.pt/pt/status_available_spec.rb b/spec/whois/parsers/responses/whois.dns.pt/pt/status_available_spec.rb index 95174239..8207bb0f 100644 --- a/spec/whois/parsers/responses/whois.dns.pt/pt/status_available_spec.rb +++ b/spec/whois/parsers/responses/whois.dns.pt/pt/status_available_spec.rb @@ -11,50 +11,23 @@ # require 'spec_helper' -require 'whois/parsers/whois.dns.pt.rb' -describe Whois::Parsers::WhoisDnsPt, "status_available.expected" do +describe "whois.dns.pt", :aggregate_failures do subject do file = fixture("responses", "whois.dns.pt/pt/status_available.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.dns.pt") + Whois::Parser.parser_for(part) end - describe "#status" do - it do - expect(subject.status).to eq(:available) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(true) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(false) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to eq(nil) - end - end - describe "#updated_on" do - it do - expect { subject.updated_on }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to eq(nil) - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers).to eq([]) - end + it "matches status_available.expected" do + expect(subject.status).to eq(:available) + expect(subject.available?).to eq(true) + expect(subject.registered?).to eq(false) + expect(subject.created_on).to eq(nil) + expect { subject.updated_on }.to raise_error(Whois::AttributeNotSupported) + expect(subject.expires_on).to eq(nil) + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers).to eq([]) end end diff --git a/spec/whois/parsers/responses/whois.dns.pt/pt/status_inactive_spec.rb b/spec/whois/parsers/responses/whois.dns.pt/pt/status_inactive_spec.rb index 0b9c11f6..28ea01de 100644 --- a/spec/whois/parsers/responses/whois.dns.pt/pt/status_inactive_spec.rb +++ b/spec/whois/parsers/responses/whois.dns.pt/pt/status_inactive_spec.rb @@ -11,52 +11,25 @@ # require 'spec_helper' -require 'whois/parsers/whois.dns.pt.rb' -describe Whois::Parsers::WhoisDnsPt, "status_inactive.expected" do +describe "whois.dns.pt", :aggregate_failures do subject do file = fixture("responses", "whois.dns.pt/pt/status_inactive.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.dns.pt") + Whois::Parser.parser_for(part) end - describe "#status" do - it do - expect(subject.status).to eq(:inactive) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(false) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(true) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to be_a(Time) - expect(subject.created_on).to eq(DateTime.parse("2009-02-09 00:00:00 UTC")) - end - end - describe "#updated_on" do - it do - expect { subject.updated_on }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to be_a(Time) - expect(subject.expires_on).to eq(DateTime.parse("2014-03-01 00:00:00 UTC")) - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers.size).to eq(0) - end + it "matches status_inactive.expected" do + expect(subject.status).to eq(:inactive) + expect(subject.available?).to eq(false) + expect(subject.registered?).to eq(true) + expect(subject.created_on).to be_a(Time) + expect(subject.created_on).to eq(DateTime.parse("2009-02-09 00:00:00 UTC")) + expect { subject.updated_on }.to raise_error(Whois::AttributeNotSupported) + expect(subject.expires_on).to be_a(Time) + expect(subject.expires_on).to eq(DateTime.parse("2014-03-01 00:00:00 UTC")) + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers.size).to eq(0) end end diff --git a/spec/whois/parsers/responses/whois.dns.pt/pt/status_registered_spec.rb b/spec/whois/parsers/responses/whois.dns.pt/pt/status_registered_spec.rb index 519c1f01..41691265 100644 --- a/spec/whois/parsers/responses/whois.dns.pt/pt/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.dns.pt/pt/status_registered_spec.rb @@ -11,60 +11,33 @@ # require 'spec_helper' -require 'whois/parsers/whois.dns.pt.rb' -describe Whois::Parsers::WhoisDnsPt, "status_registered.expected" do +describe "whois.dns.pt", :aggregate_failures do subject do file = fixture("responses", "whois.dns.pt/pt/status_registered.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.dns.pt") + Whois::Parser.parser_for(part) end - describe "#status" do - it do - expect(subject.status).to eq(:registered) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(false) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(true) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to be_a(Time) - expect(subject.created_on).to eq(DateTime.parse("2003-01-09 00:00:00 UTC")) - end - end - describe "#updated_on" do - it do - expect { subject.updated_on }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to be_a(Time) - expect(subject.expires_on).to eq(DateTime.parse("2015-02-28 00:00:00 UTC")) - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers.size).to eq(4) - expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[0].name).to eq("ns4.google.com") - expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[1].name).to eq("ns2.google.com") - expect(subject.nameservers[2]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[2].name).to eq("ns1.google.com") - expect(subject.nameservers[3]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[3].name).to eq("ns3.google.com") - end + it "matches status_registered.expected" do + expect(subject.status).to eq(:registered) + expect(subject.available?).to eq(false) + expect(subject.registered?).to eq(true) + expect(subject.created_on).to be_a(Time) + expect(subject.created_on).to eq(DateTime.parse("2003-01-09 00:00:00 UTC")) + expect { subject.updated_on }.to raise_error(Whois::AttributeNotSupported) + expect(subject.expires_on).to be_a(Time) + expect(subject.expires_on).to eq(DateTime.parse("2015-02-28 00:00:00 UTC")) + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers.size).to eq(4) + expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[0].name).to eq("ns4.google.com") + expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[1].name).to eq("ns2.google.com") + expect(subject.nameservers[2]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[2].name).to eq("ns1.google.com") + expect(subject.nameservers[3]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[3].name).to eq("ns3.google.com") end end diff --git a/spec/whois/parsers/responses/whois.dns.pt/pt/status_reserved_spec.rb b/spec/whois/parsers/responses/whois.dns.pt/pt/status_reserved_spec.rb index 0d7292f4..517cf760 100644 --- a/spec/whois/parsers/responses/whois.dns.pt/pt/status_reserved_spec.rb +++ b/spec/whois/parsers/responses/whois.dns.pt/pt/status_reserved_spec.rb @@ -11,51 +11,24 @@ # require 'spec_helper' -require 'whois/parsers/whois.dns.pt.rb' -describe Whois::Parsers::WhoisDnsPt, "status_reserved.expected" do +describe "whois.dns.pt", :aggregate_failures do subject do file = fixture("responses", "whois.dns.pt/pt/status_reserved.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.dns.pt") + Whois::Parser.parser_for(part) end - describe "#status" do - it do - expect(subject.status).to eq(:reserved) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(false) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(true) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to be_a(Time) - expect(subject.created_on).to eq(DateTime.parse("2009-02-09 00:00:00 UTC")) - end - end - describe "#updated_on" do - it do - expect { subject.updated_on }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to eq(nil) - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers).to eq([]) - end + it "matches status_reserved.expected" do + expect(subject.status).to eq(:reserved) + expect(subject.available?).to eq(false) + expect(subject.registered?).to eq(true) + expect(subject.created_on).to be_a(Time) + expect(subject.created_on).to eq(DateTime.parse("2009-02-09 00:00:00 UTC")) + expect { subject.updated_on }.to raise_error(Whois::AttributeNotSupported) + expect(subject.expires_on).to eq(nil) + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers).to eq([]) end end diff --git a/spec/whois/parsers/responses/whois.domain-registry.nl/nl/property_nameservers_with_ip_spec.rb b/spec/whois/parsers/responses/whois.domain-registry.nl/nl/property_nameservers_with_ip_spec.rb index 986788f9..06487928 100644 --- a/spec/whois/parsers/responses/whois.domain-registry.nl/nl/property_nameservers_with_ip_spec.rb +++ b/spec/whois/parsers/responses/whois.domain-registry.nl/nl/property_nameservers_with_ip_spec.rb @@ -11,26 +11,23 @@ # require 'spec_helper' -require 'whois/parsers/whois.domain-registry.nl.rb' -describe Whois::Parsers::WhoisDomainRegistryNl, "property_nameservers_with_ip.expected" do +describe "whois.domain-registry.nl", :aggregate_failures do subject do file = fixture("responses", "whois.domain-registry.nl/nl/property_nameservers_with_ip.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.domain-registry.nl") + Whois::Parser.parser_for(part) end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers.size).to eq(2) - expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[0].name).to eq("ns1.tntpost.nl") - expect(subject.nameservers[0].ipv4).to eq("145.78.21.10") - expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[1].name).to eq("ns2.tntpost.nl") - expect(subject.nameservers[1].ipv4).to eq("80.69.76.10") - end + it "matches property_nameservers_with_ip.expected" do + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers.size).to eq(2) + expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[0].name).to eq("ns1.tntpost.nl") + expect(subject.nameservers[0].ipv4).to eq("145.78.21.10") + expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[1].name).to eq("ns2.tntpost.nl") + expect(subject.nameservers[1].ipv4).to eq("80.69.76.10") end end diff --git a/spec/whois/parsers/responses/whois.domain-registry.nl/nl/property_status_inactive_spec.rb b/spec/whois/parsers/responses/whois.domain-registry.nl/nl/property_status_inactive_spec.rb index dc839e72..8c528797 100644 --- a/spec/whois/parsers/responses/whois.domain-registry.nl/nl/property_status_inactive_spec.rb +++ b/spec/whois/parsers/responses/whois.domain-registry.nl/nl/property_status_inactive_spec.rb @@ -11,29 +11,18 @@ # require 'spec_helper' -require 'whois/parsers/whois.domain-registry.nl.rb' -describe Whois::Parsers::WhoisDomainRegistryNl, "property_status_inactive.expected" do +describe "whois.domain-registry.nl", :aggregate_failures do subject do file = fixture("responses", "whois.domain-registry.nl/nl/property_status_inactive.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.domain-registry.nl") + Whois::Parser.parser_for(part) end - describe "#status" do - it do - expect(subject.status).to eq(:inactive) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(false) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(true) - end + it "matches property_status_inactive.expected" do + expect(subject.status).to eq(:inactive) + expect(subject.available?).to eq(false) + expect(subject.registered?).to eq(true) end end diff --git a/spec/whois/parsers/responses/whois.domain-registry.nl/nl/response_throttled_daily_spec.rb b/spec/whois/parsers/responses/whois.domain-registry.nl/nl/response_throttled_daily_spec.rb index b27cc08c..6c7318e1 100644 --- a/spec/whois/parsers/responses/whois.domain-registry.nl/nl/response_throttled_daily_spec.rb +++ b/spec/whois/parsers/responses/whois.domain-registry.nl/nl/response_throttled_daily_spec.rb @@ -11,19 +11,16 @@ # require 'spec_helper' -require 'whois/parsers/whois.domain-registry.nl.rb' -describe Whois::Parsers::WhoisDomainRegistryNl, "response_throttled_daily.expected" do +describe "whois.domain-registry.nl", :aggregate_failures do subject do file = fixture("responses", "whois.domain-registry.nl/nl/response_throttled_daily.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.domain-registry.nl") + Whois::Parser.parser_for(part) end - describe "#response_throttled?" do - it do - expect(subject.response_throttled?).to eq(true) - end + it "matches response_throttled_daily.expected" do + expect(subject.response_throttled?).to eq(true) end end diff --git a/spec/whois/parsers/responses/whois.domain-registry.nl/nl/response_throttled_spec.rb b/spec/whois/parsers/responses/whois.domain-registry.nl/nl/response_throttled_spec.rb index d25c634c..e4921e6a 100644 --- a/spec/whois/parsers/responses/whois.domain-registry.nl/nl/response_throttled_spec.rb +++ b/spec/whois/parsers/responses/whois.domain-registry.nl/nl/response_throttled_spec.rb @@ -11,19 +11,16 @@ # require 'spec_helper' -require 'whois/parsers/whois.domain-registry.nl.rb' -describe Whois::Parsers::WhoisDomainRegistryNl, "response_throttled.expected" do +describe "whois.domain-registry.nl", :aggregate_failures do subject do file = fixture("responses", "whois.domain-registry.nl/nl/response_throttled.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.domain-registry.nl") + Whois::Parser.parser_for(part) end - describe "#response_throttled?" do - it do - expect(subject.response_throttled?).to eq(true) - end + it "matches response_throttled.expected" do + expect(subject.response_throttled?).to eq(true) end end diff --git a/spec/whois/parsers/responses/whois.domain-registry.nl/nl/response_unavailable_spec.rb b/spec/whois/parsers/responses/whois.domain-registry.nl/nl/response_unavailable_spec.rb index 21aff609..dd5b0bf4 100644 --- a/spec/whois/parsers/responses/whois.domain-registry.nl/nl/response_unavailable_spec.rb +++ b/spec/whois/parsers/responses/whois.domain-registry.nl/nl/response_unavailable_spec.rb @@ -11,19 +11,16 @@ # require 'spec_helper' -require 'whois/parsers/whois.domain-registry.nl.rb' -describe Whois::Parsers::WhoisDomainRegistryNl, "response_unavailable.expected" do +describe "whois.domain-registry.nl", :aggregate_failures do subject do file = fixture("responses", "whois.domain-registry.nl/nl/response_unavailable.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.domain-registry.nl") + Whois::Parser.parser_for(part) end - describe "#response_unavailable?" do - it do - expect(subject.response_unavailable?).to eq(true) - end + it "matches response_unavailable.expected" do + expect(subject.response_unavailable?).to eq(true) end end diff --git a/spec/whois/parsers/responses/whois.domain-registry.nl/nl/status_available_spec.rb b/spec/whois/parsers/responses/whois.domain-registry.nl/nl/status_available_spec.rb index f537491f..f55b9336 100644 --- a/spec/whois/parsers/responses/whois.domain-registry.nl/nl/status_available_spec.rb +++ b/spec/whois/parsers/responses/whois.domain-registry.nl/nl/status_available_spec.rb @@ -11,60 +11,25 @@ # require 'spec_helper' -require 'whois/parsers/whois.domain-registry.nl.rb' -describe Whois::Parsers::WhoisDomainRegistryNl, "status_available.expected" do +describe "whois.domain-registry.nl", :aggregate_failures do subject do file = fixture("responses", "whois.domain-registry.nl/nl/status_available.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.domain-registry.nl") + Whois::Parser.parser_for(part) end - describe "#status" do - it do - expect(subject.status).to eq(:available) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(true) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(false) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to eq(nil) - end - end - describe "#updated_on" do - it do - expect(subject.updated_on).to eq(nil) - end - end - describe "#expires_on" do - it do - expect { subject.expires_on }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers).to eq([]) - end - end - describe "#response_throttled?" do - it do - expect(subject.response_throttled?).to eq(false) - end - end - describe "#response_unavailable?" do - it do - expect(subject.response_unavailable?).to eq(false) - end + it "matches status_available.expected" do + expect(subject.status).to eq(:available) + expect(subject.available?).to eq(true) + expect(subject.registered?).to eq(false) + expect(subject.created_on).to eq(nil) + expect(subject.updated_on).to eq(nil) + expect { subject.expires_on }.to raise_error(Whois::AttributeNotSupported) + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers).to eq([]) + expect(subject.response_throttled?).to eq(false) + expect(subject.response_unavailable?).to eq(false) end end diff --git a/spec/whois/parsers/responses/whois.domain-registry.nl/nl/status_redemption_spec.rb b/spec/whois/parsers/responses/whois.domain-registry.nl/nl/status_redemption_spec.rb index 23986c52..11538e3d 100644 --- a/spec/whois/parsers/responses/whois.domain-registry.nl/nl/status_redemption_spec.rb +++ b/spec/whois/parsers/responses/whois.domain-registry.nl/nl/status_redemption_spec.rb @@ -11,60 +11,25 @@ # require 'spec_helper' -require 'whois/parsers/whois.domain-registry.nl.rb' -describe Whois::Parsers::WhoisDomainRegistryNl, "status_redemption.expected" do +describe "whois.domain-registry.nl", :aggregate_failures do subject do file = fixture("responses", "whois.domain-registry.nl/nl/status_redemption.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.domain-registry.nl") + Whois::Parser.parser_for(part) end - describe "#status" do - it do - expect(subject.status).to eq(:redemption) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(false) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(true) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to eq(nil) - end - end - describe "#updated_on" do - it do - expect(subject.updated_on).to eq(nil) - end - end - describe "#expires_on" do - it do - expect { subject.expires_on }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers).to eq([]) - end - end - describe "#response_throttled?" do - it do - expect(subject.response_throttled?).to eq(false) - end - end - describe "#response_unavailable?" do - it do - expect(subject.response_unavailable?).to eq(false) - end + it "matches status_redemption.expected" do + expect(subject.status).to eq(:redemption) + expect(subject.available?).to eq(false) + expect(subject.registered?).to eq(true) + expect(subject.created_on).to eq(nil) + expect(subject.updated_on).to eq(nil) + expect { subject.expires_on }.to raise_error(Whois::AttributeNotSupported) + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers).to eq([]) + expect(subject.response_throttled?).to eq(false) + expect(subject.response_unavailable?).to eq(false) end end diff --git a/spec/whois/parsers/responses/whois.domain-registry.nl/nl/status_registered_spec.rb b/spec/whois/parsers/responses/whois.domain-registry.nl/nl/status_registered_spec.rb index 36286ebf..decd2df2 100644 --- a/spec/whois/parsers/responses/whois.domain-registry.nl/nl/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.domain-registry.nl/nl/status_registered_spec.rb @@ -11,70 +11,35 @@ # require 'spec_helper' -require 'whois/parsers/whois.domain-registry.nl.rb' -describe Whois::Parsers::WhoisDomainRegistryNl, "status_registered.expected" do +describe "whois.domain-registry.nl", :aggregate_failures do subject do file = fixture("responses", "whois.domain-registry.nl/nl/status_registered.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.domain-registry.nl") + Whois::Parser.parser_for(part) end - describe "#status" do - it do - expect(subject.status).to eq(:registered) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(false) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(true) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to be_a(Time) - expect(subject.created_on).to eq(DateTime.parse("1999-05-27")) - end - end - describe "#updated_on" do - it do - expect(subject.updated_on).to be_a(Time) - expect(subject.updated_on).to eq(DateTime.parse("2009-02-11")) - end - end - describe "#expires_on" do - it do - expect { subject.expires_on }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers.size).to eq(4) - expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[0].name).to eq("ns1.google.com") - expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[1].name).to eq("ns2.google.com") - expect(subject.nameservers[2]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[2].name).to eq("ns3.google.com") - expect(subject.nameservers[3]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[3].name).to eq("ns4.google.com") - end - end - describe "#response_throttled?" do - it do - expect(subject.response_throttled?).to eq(false) - end - end - describe "#response_unavailable?" do - it do - expect(subject.response_unavailable?).to eq(false) - end + it "matches status_registered.expected" do + expect(subject.status).to eq(:registered) + expect(subject.available?).to eq(false) + expect(subject.registered?).to eq(true) + expect(subject.created_on).to be_a(Time) + expect(subject.created_on).to eq(DateTime.parse("1999-05-27")) + expect(subject.updated_on).to be_a(Time) + expect(subject.updated_on).to eq(DateTime.parse("2009-02-11")) + expect { subject.expires_on }.to raise_error(Whois::AttributeNotSupported) + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers.size).to eq(4) + expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[0].name).to eq("ns1.google.com") + expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[1].name).to eq("ns2.google.com") + expect(subject.nameservers[2]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[2].name).to eq("ns3.google.com") + expect(subject.nameservers[3]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[3].name).to eq("ns4.google.com") + expect(subject.response_throttled?).to eq(false) + expect(subject.response_unavailable?).to eq(false) end end diff --git a/spec/whois/parsers/responses/whois.domainregistry.ie/ie/case_token_application_pending_spec.rb b/spec/whois/parsers/responses/whois.domainregistry.ie/ie/case_token_application_pending_spec.rb index dcfa6554..7d8a89da 100644 --- a/spec/whois/parsers/responses/whois.domainregistry.ie/ie/case_token_application_pending_spec.rb +++ b/spec/whois/parsers/responses/whois.domainregistry.ie/ie/case_token_application_pending_spec.rb @@ -11,19 +11,16 @@ # require 'spec_helper' -require 'whois/parsers/whois.domainregistry.ie.rb' -describe Whois::Parsers::WhoisDomainregistryIe, "case_token_application_pending.expected" do +describe "whois.domainregistry.ie", :aggregate_failures do subject do file = fixture("responses", "whois.domainregistry.ie/ie/case_token_application_pending.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.domainregistry.ie") + Whois::Parser.parser_for(part) end - describe "#status" do - it do - expect(subject.status).to eq(:registered) - end + it "matches case_token_application_pending.expected" do + expect(subject.status).to eq(:registered) end end diff --git a/spec/whois/parsers/responses/whois.domainregistry.ie/ie/property_contacts_multiple_spec.rb b/spec/whois/parsers/responses/whois.domainregistry.ie/ie/property_contacts_multiple_spec.rb index d20b27bc..fc00e79c 100644 --- a/spec/whois/parsers/responses/whois.domainregistry.ie/ie/property_contacts_multiple_spec.rb +++ b/spec/whois/parsers/responses/whois.domainregistry.ie/ie/property_contacts_multiple_spec.rb @@ -11,38 +11,31 @@ # require 'spec_helper' -require 'whois/parsers/whois.domainregistry.ie.rb' -describe Whois::Parsers::WhoisDomainregistryIe, "property_contacts_multiple.expected" do +describe "whois.domainregistry.ie", :aggregate_failures do subject do file = fixture("responses", "whois.domainregistry.ie/ie/property_contacts_multiple.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.domainregistry.ie") + Whois::Parser.parser_for(part) end - describe "#admin_contacts" do - it do - expect(subject.admin_contacts).to be_a(Array) - expect(subject.admin_contacts.size).to eq(2) - expect(subject.admin_contacts[0]).to be_a(Whois::Parser::Contact) - expect(subject.admin_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_ADMINISTRATIVE) - expect(subject.admin_contacts[0].id).to eq("JL241-IEDR") - expect(subject.admin_contacts[0].name).to eq("Jonathan Lundberg") - expect(subject.admin_contacts[1]).to be_a(Whois::Parser::Contact) - expect(subject.admin_contacts[1].type).to eq(Whois::Parser::Contact::TYPE_ADMINISTRATIVE) - expect(subject.admin_contacts[1].id).to eq("JM474-IEDR") - expect(subject.admin_contacts[1].name).to eq("John Moylan") - end - end - describe "#technical_contacts" do - it do - expect(subject.technical_contacts).to be_a(Array) - expect(subject.technical_contacts.size).to eq(1) - expect(subject.technical_contacts[0]).to be_a(Whois::Parser::Contact) - expect(subject.technical_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_TECHNICAL) - expect(subject.technical_contacts[0].id).to eq("JM474-IEDR") - expect(subject.technical_contacts[0].name).to eq("John Moylan") - end + it "matches property_contacts_multiple.expected" do + expect(subject.admin_contacts).to be_a(Array) + expect(subject.admin_contacts.size).to eq(2) + expect(subject.admin_contacts[0]).to be_a(Whois::Parser::Contact) + expect(subject.admin_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_ADMINISTRATIVE) + expect(subject.admin_contacts[0].id).to eq("JL241-IEDR") + expect(subject.admin_contacts[0].name).to eq("Jonathan Lundberg") + expect(subject.admin_contacts[1]).to be_a(Whois::Parser::Contact) + expect(subject.admin_contacts[1].type).to eq(Whois::Parser::Contact::TYPE_ADMINISTRATIVE) + expect(subject.admin_contacts[1].id).to eq("JM474-IEDR") + expect(subject.admin_contacts[1].name).to eq("John Moylan") + expect(subject.technical_contacts).to be_a(Array) + expect(subject.technical_contacts.size).to eq(1) + expect(subject.technical_contacts[0]).to be_a(Whois::Parser::Contact) + expect(subject.technical_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_TECHNICAL) + expect(subject.technical_contacts[0].id).to eq("JM474-IEDR") + expect(subject.technical_contacts[0].name).to eq("John Moylan") end end diff --git a/spec/whois/parsers/responses/whois.domainregistry.ie/ie/property_contacts_not_matching_id_spec.rb b/spec/whois/parsers/responses/whois.domainregistry.ie/ie/property_contacts_not_matching_id_spec.rb index 974ec0d9..ebddba0e 100644 --- a/spec/whois/parsers/responses/whois.domainregistry.ie/ie/property_contacts_not_matching_id_spec.rb +++ b/spec/whois/parsers/responses/whois.domainregistry.ie/ie/property_contacts_not_matching_id_spec.rb @@ -11,24 +11,21 @@ # require 'spec_helper' -require 'whois/parsers/whois.domainregistry.ie.rb' -describe Whois::Parsers::WhoisDomainregistryIe, "property_contacts_not_matching_id.expected" do +describe "whois.domainregistry.ie", :aggregate_failures do subject do file = fixture("responses", "whois.domainregistry.ie/ie/property_contacts_not_matching_id.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.domainregistry.ie") + Whois::Parser.parser_for(part) end - describe "#technical_contacts" do - it do - expect(subject.technical_contacts).to be_a(Array) - expect(subject.technical_contacts.size).to eq(1) - expect(subject.technical_contacts[0]).to be_a(Whois::Parser::Contact) - expect(subject.technical_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_TECHNICAL) - expect(subject.technical_contacts[0].id).to eq("KG37-IEDR") - expect(subject.technical_contacts[0].name).to eq("Michael McGovern") - end + it "matches property_contacts_not_matching_id.expected" do + expect(subject.technical_contacts).to be_a(Array) + expect(subject.technical_contacts.size).to eq(1) + expect(subject.technical_contacts[0]).to be_a(Whois::Parser::Contact) + expect(subject.technical_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_TECHNICAL) + expect(subject.technical_contacts[0].id).to eq("KG37-IEDR") + expect(subject.technical_contacts[0].name).to eq("Michael McGovern") end end diff --git a/spec/whois/parsers/responses/whois.domainregistry.ie/ie/property_nameservers_with_ip_spec.rb b/spec/whois/parsers/responses/whois.domainregistry.ie/ie/property_nameservers_with_ip_spec.rb index 15ee9551..bf540e0b 100644 --- a/spec/whois/parsers/responses/whois.domainregistry.ie/ie/property_nameservers_with_ip_spec.rb +++ b/spec/whois/parsers/responses/whois.domainregistry.ie/ie/property_nameservers_with_ip_spec.rb @@ -11,38 +11,35 @@ # require 'spec_helper' -require 'whois/parsers/whois.domainregistry.ie.rb' -describe Whois::Parsers::WhoisDomainregistryIe, "property_nameservers_with_ip.expected" do +describe "whois.domainregistry.ie", :aggregate_failures do subject do file = fixture("responses", "whois.domainregistry.ie/ie/property_nameservers_with_ip.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.domainregistry.ie") + Whois::Parser.parser_for(part) end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers.size).to eq(6) - expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[0].name).to eq("ns1.dns.ie") - expect(subject.nameservers[0].ipv4).to eq("208.94.148.4") - expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[1].name).to eq("ns2.dns.ie") - expect(subject.nameservers[1].ipv4).to eq("208.80.124.4") - expect(subject.nameservers[2]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[2].name).to eq("ns3.dns.ie") - expect(subject.nameservers[2].ipv4).to eq("208.80.126.4") - expect(subject.nameservers[3]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[3].name).to eq("ns4.dns.ie") - expect(subject.nameservers[3].ipv4).to eq("208.80.125.4") - expect(subject.nameservers[4]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[4].name).to eq("ns5.dns.ie") - expect(subject.nameservers[4].ipv4).to eq("208.80.127.4") - expect(subject.nameservers[5]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[5].name).to eq("ns6.dns.ie") - expect(subject.nameservers[5].ipv4).to eq("208.94.149.4") - end + it "matches property_nameservers_with_ip.expected" do + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers.size).to eq(6) + expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[0].name).to eq("ns1.dns.ie") + expect(subject.nameservers[0].ipv4).to eq("208.94.148.4") + expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[1].name).to eq("ns2.dns.ie") + expect(subject.nameservers[1].ipv4).to eq("208.80.124.4") + expect(subject.nameservers[2]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[2].name).to eq("ns3.dns.ie") + expect(subject.nameservers[2].ipv4).to eq("208.80.126.4") + expect(subject.nameservers[3]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[3].name).to eq("ns4.dns.ie") + expect(subject.nameservers[3].ipv4).to eq("208.80.125.4") + expect(subject.nameservers[4]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[4].name).to eq("ns5.dns.ie") + expect(subject.nameservers[4].ipv4).to eq("208.80.127.4") + expect(subject.nameservers[5]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[5].name).to eq("ns6.dns.ie") + expect(subject.nameservers[5].ipv4).to eq("208.94.149.4") end end diff --git a/spec/whois/parsers/responses/whois.domainregistry.ie/ie/status_available_spec.rb b/spec/whois/parsers/responses/whois.domainregistry.ie/ie/status_available_spec.rb index 2962e188..c38ce4d8 100644 --- a/spec/whois/parsers/responses/whois.domainregistry.ie/ie/status_available_spec.rb +++ b/spec/whois/parsers/responses/whois.domainregistry.ie/ie/status_available_spec.rb @@ -11,88 +11,33 @@ # require 'spec_helper' -require 'whois/parsers/whois.domainregistry.ie.rb' -describe Whois::Parsers::WhoisDomainregistryIe, "status_available.expected" do +describe "whois.domainregistry.ie", :aggregate_failures do subject do file = fixture("responses", "whois.domainregistry.ie/ie/status_available.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.domainregistry.ie") + Whois::Parser.parser_for(part) end - describe "#disclaimer" do - it do - expect(subject.disclaimer).to eq("Rights restricted by copyright; http://iedr.ie/index.php/mnudomregs/mnudnssearch/96\nDo not remove this notice") - end - end - describe "#domain" do - it do - expect(subject.domain).to eq(nil) - end - end - describe "#domain_id" do - it do - expect { subject.domain_id }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#status" do - it do - expect(subject.status).to eq(:available) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(true) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(false) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to eq(nil) - end - end - describe "#updated_on" do - it do - expect { subject.updated_on }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to eq(nil) - end - end - describe "#registrar" do - it do - expect { subject.registrar }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#registrant_contacts" do - it do - expect(subject.registrant_contacts).to be_a(Array) - expect(subject.registrant_contacts).to eq([]) - end - end - describe "#admin_contacts" do - it do - expect(subject.admin_contacts).to be_a(Array) - expect(subject.admin_contacts).to eq([]) - end - end - describe "#technical_contacts" do - it do - expect(subject.technical_contacts).to be_a(Array) - expect(subject.technical_contacts).to eq([]) - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers).to eq([]) - end + it "matches status_available.expected" do + expect(subject.disclaimer).to eq("Rights restricted by copyright; http://iedr.ie/index.php/mnudomregs/mnudnssearch/96\nDo not remove this notice") + expect(subject.domain).to eq(nil) + expect { subject.domain_id }.to raise_error(Whois::AttributeNotSupported) + expect(subject.status).to eq(:available) + expect(subject.available?).to eq(true) + expect(subject.registered?).to eq(false) + expect(subject.created_on).to eq(nil) + expect { subject.updated_on }.to raise_error(Whois::AttributeNotSupported) + expect(subject.expires_on).to eq(nil) + expect { subject.registrar }.to raise_error(Whois::AttributeNotSupported) + expect(subject.registrant_contacts).to be_a(Array) + expect(subject.registrant_contacts).to eq([]) + expect(subject.admin_contacts).to be_a(Array) + expect(subject.admin_contacts).to eq([]) + expect(subject.technical_contacts).to be_a(Array) + expect(subject.technical_contacts).to eq([]) + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers).to eq([]) end end diff --git a/spec/whois/parsers/responses/whois.domainregistry.ie/ie/status_registered_spec.rb b/spec/whois/parsers/responses/whois.domainregistry.ie/ie/status_registered_spec.rb index 42ac3da5..0ed568c5 100644 --- a/spec/whois/parsers/responses/whois.domainregistry.ie/ie/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.domainregistry.ie/ie/status_registered_spec.rb @@ -11,108 +11,53 @@ # require 'spec_helper' -require 'whois/parsers/whois.domainregistry.ie.rb' -describe Whois::Parsers::WhoisDomainregistryIe, "status_registered.expected" do +describe "whois.domainregistry.ie", :aggregate_failures do subject do file = fixture("responses", "whois.domainregistry.ie/ie/status_registered.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.domainregistry.ie") + Whois::Parser.parser_for(part) end - describe "#disclaimer" do - it do - expect(subject.disclaimer).to eq("Rights restricted by copyright; http://iedr.ie/index.php/mnudomregs/mnudnssearch/96\nDo not remove this notice") - end - end - describe "#domain" do - it do - expect(subject.domain).to eq("google.ie") - end - end - describe "#domain_id" do - it do - expect { subject.domain_id }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#status" do - it do - expect(subject.status).to eq(:registered) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(false) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(true) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to be_a(Time) - expect(subject.created_on).to eq(DateTime.parse("2002-03-21")) - end - end - describe "#updated_on" do - it do - expect { subject.updated_on }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to be_a(Time) - expect(subject.expires_on).to eq(DateTime.parse("2015-03-21")) - end - end - describe "#registrar" do - it do - expect { subject.registrar }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#registrant_contacts" do - it do - expect(subject.registrant_contacts).to be_a(Array) - expect(subject.registrant_contacts.size).to eq(1) - expect(subject.registrant_contacts[0]).to be_a(Whois::Parser::Contact) - expect(subject.registrant_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_REGISTRANT) - expect(subject.registrant_contacts[0].id).to eq(nil) - expect(subject.registrant_contacts[0].name).to eq("Google, Inc") - end - end - describe "#admin_contacts" do - it do - expect(subject.admin_contacts).to be_a(Array) - expect(subject.admin_contacts.size).to eq(1) - expect(subject.admin_contacts[0]).to be_a(Whois::Parser::Contact) - expect(subject.admin_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_ADMINISTRATIVE) - expect(subject.admin_contacts[0].id).to eq("AAV410-IEDR") - expect(subject.admin_contacts[0].name).to eq("Christina Chiou") - end - end - describe "#technical_contacts" do - it do - expect(subject.technical_contacts).to be_a(Array) - expect(subject.technical_contacts.size).to eq(1) - expect(subject.technical_contacts[0]).to be_a(Whois::Parser::Contact) - expect(subject.technical_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_TECHNICAL) - expect(subject.technical_contacts[0].id).to eq("CCA7-IEDR") - expect(subject.technical_contacts[0].name).to eq("Markmonitor Inc") - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers.size).to eq(3) - expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[0].name).to eq("ns1.google.com") - expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[1].name).to eq("ns2.google.com") - expect(subject.nameservers[2]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[2].name).to eq("ns3.google.com") - end + it "matches status_registered.expected" do + expect(subject.disclaimer).to eq("Rights restricted by copyright; http://iedr.ie/index.php/mnudomregs/mnudnssearch/96\nDo not remove this notice") + expect(subject.domain).to eq("google.ie") + expect { subject.domain_id }.to raise_error(Whois::AttributeNotSupported) + expect(subject.status).to eq(:registered) + expect(subject.available?).to eq(false) + expect(subject.registered?).to eq(true) + expect(subject.created_on).to be_a(Time) + expect(subject.created_on).to eq(DateTime.parse("2002-03-21")) + expect { subject.updated_on }.to raise_error(Whois::AttributeNotSupported) + expect(subject.expires_on).to be_a(Time) + expect(subject.expires_on).to eq(DateTime.parse("2015-03-21")) + expect { subject.registrar }.to raise_error(Whois::AttributeNotSupported) + expect(subject.registrant_contacts).to be_a(Array) + expect(subject.registrant_contacts.size).to eq(1) + expect(subject.registrant_contacts[0]).to be_a(Whois::Parser::Contact) + expect(subject.registrant_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_REGISTRANT) + expect(subject.registrant_contacts[0].id).to eq(nil) + expect(subject.registrant_contacts[0].name).to eq("Google, Inc") + expect(subject.admin_contacts).to be_a(Array) + expect(subject.admin_contacts.size).to eq(1) + expect(subject.admin_contacts[0]).to be_a(Whois::Parser::Contact) + expect(subject.admin_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_ADMINISTRATIVE) + expect(subject.admin_contacts[0].id).to eq("AAV410-IEDR") + expect(subject.admin_contacts[0].name).to eq("Christina Chiou") + expect(subject.technical_contacts).to be_a(Array) + expect(subject.technical_contacts.size).to eq(1) + expect(subject.technical_contacts[0]).to be_a(Whois::Parser::Contact) + expect(subject.technical_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_TECHNICAL) + expect(subject.technical_contacts[0].id).to eq("CCA7-IEDR") + expect(subject.technical_contacts[0].name).to eq("Markmonitor Inc") + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers.size).to eq(3) + expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[0].name).to eq("ns1.google.com") + expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[1].name).to eq("ns2.google.com") + expect(subject.nameservers[2]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[2].name).to eq("ns3.google.com") end end diff --git a/spec/whois/parsers/responses/whois.domreg.lt/lt/property_nameservers_with_ip_spec.rb b/spec/whois/parsers/responses/whois.domreg.lt/lt/property_nameservers_with_ip_spec.rb index 74a0e848..8490126c 100644 --- a/spec/whois/parsers/responses/whois.domreg.lt/lt/property_nameservers_with_ip_spec.rb +++ b/spec/whois/parsers/responses/whois.domreg.lt/lt/property_nameservers_with_ip_spec.rb @@ -11,32 +11,29 @@ # require 'spec_helper' -require 'whois/parsers/whois.domreg.lt.rb' -describe Whois::Parsers::WhoisDomregLt, "property_nameservers_with_ip.expected" do +describe "whois.domreg.lt", :aggregate_failures do subject do file = fixture("responses", "whois.domreg.lt/lt/property_nameservers_with_ip.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.domreg.lt") + Whois::Parser.parser_for(part) end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers.size).to eq(4) - expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[0].name).to eq("ns1.serveriai.lt") - expect(subject.nameservers[0].ipv4).to eq("79.98.25.142") - expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[1].name).to eq("ns2.serveriai.lt") - expect(subject.nameservers[1].ipv4).to eq("174.36.250.192") - expect(subject.nameservers[2]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[2].name).to eq("ns3.serveriai.lt") - expect(subject.nameservers[2].ipv4).to eq("79.98.29.142") - expect(subject.nameservers[3]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[3].name).to eq("ns4.serveriai.lt") - expect(subject.nameservers[3].ipv4).to eq("67.228.39.192") - end + it "matches property_nameservers_with_ip.expected" do + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers.size).to eq(4) + expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[0].name).to eq("ns1.serveriai.lt") + expect(subject.nameservers[0].ipv4).to eq("79.98.25.142") + expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[1].name).to eq("ns2.serveriai.lt") + expect(subject.nameservers[1].ipv4).to eq("174.36.250.192") + expect(subject.nameservers[2]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[2].name).to eq("ns3.serveriai.lt") + expect(subject.nameservers[2].ipv4).to eq("79.98.29.142") + expect(subject.nameservers[3]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[3].name).to eq("ns4.serveriai.lt") + expect(subject.nameservers[3].ipv4).to eq("67.228.39.192") end end diff --git a/spec/whois/parsers/responses/whois.domreg.lt/lt/status_available_spec.rb b/spec/whois/parsers/responses/whois.domreg.lt/lt/status_available_spec.rb index 061c02d7..635204d5 100644 --- a/spec/whois/parsers/responses/whois.domreg.lt/lt/status_available_spec.rb +++ b/spec/whois/parsers/responses/whois.domreg.lt/lt/status_available_spec.rb @@ -11,50 +11,23 @@ # require 'spec_helper' -require 'whois/parsers/whois.domreg.lt.rb' -describe Whois::Parsers::WhoisDomregLt, "status_available.expected" do +describe "whois.domreg.lt", :aggregate_failures do subject do file = fixture("responses", "whois.domreg.lt/lt/status_available.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.domreg.lt") + Whois::Parser.parser_for(part) end - describe "#status" do - it do - expect(subject.status).to eq(:available) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(true) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(false) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to eq(nil) - end - end - describe "#updated_on" do - it do - expect { subject.updated_on }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#expires_on" do - it do - expect { subject.expires_on }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers).to eq([]) - end + it "matches status_available.expected" do + expect(subject.status).to eq(:available) + expect(subject.available?).to eq(true) + expect(subject.registered?).to eq(false) + expect(subject.created_on).to eq(nil) + expect { subject.updated_on }.to raise_error(Whois::AttributeNotSupported) + expect { subject.expires_on }.to raise_error(Whois::AttributeNotSupported) + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers).to eq([]) end end diff --git a/spec/whois/parsers/responses/whois.domreg.lt/lt/status_registered_spec.rb b/spec/whois/parsers/responses/whois.domreg.lt/lt/status_registered_spec.rb index f195a216..4b521e4e 100644 --- a/spec/whois/parsers/responses/whois.domreg.lt/lt/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.domreg.lt/lt/status_registered_spec.rb @@ -11,57 +11,30 @@ # require 'spec_helper' -require 'whois/parsers/whois.domreg.lt.rb' -describe Whois::Parsers::WhoisDomregLt, "status_registered.expected" do +describe "whois.domreg.lt", :aggregate_failures do subject do file = fixture("responses", "whois.domreg.lt/lt/status_registered.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.domreg.lt") + Whois::Parser.parser_for(part) end - describe "#status" do - it do - expect(subject.status).to eq(:registered) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(false) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(true) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to be_a(Time) - expect(subject.created_on).to eq(DateTime.parse("1999-06-06")) - end - end - describe "#updated_on" do - it do - expect { subject.updated_on }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#expires_on" do - it do - expect { subject.expires_on }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers.size).to eq(3) - expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[0].name).to eq("ns1.google.com") - expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[1].name).to eq("ns2.google.com") - expect(subject.nameservers[2]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[2].name).to eq("ns3.google.com") - end + it "matches status_registered.expected" do + expect(subject.status).to eq(:registered) + expect(subject.available?).to eq(false) + expect(subject.registered?).to eq(true) + expect(subject.created_on).to be_a(Time) + expect(subject.created_on).to eq(DateTime.parse("1999-06-06")) + expect { subject.updated_on }.to raise_error(Whois::AttributeNotSupported) + expect { subject.expires_on }.to raise_error(Whois::AttributeNotSupported) + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers.size).to eq(3) + expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[0].name).to eq("ns1.google.com") + expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[1].name).to eq("ns2.google.com") + expect(subject.nameservers[2]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[2].name).to eq("ns3.google.com") end end diff --git a/spec/whois/parsers/responses/whois.donuts.co/bike/status_available_spec.rb b/spec/whois/parsers/responses/whois.donuts.co/bike/status_available_spec.rb deleted file mode 100644 index cfa68941..00000000 --- a/spec/whois/parsers/responses/whois.donuts.co/bike/status_available_spec.rb +++ /dev/null @@ -1,93 +0,0 @@ -# encoding: utf-8 - -# This file is autogenerated. Do not edit it manually. -# If you want change the content of this file, edit -# -# /spec/fixtures/responses/whois.donuts.co/bike/status_available.expected -# -# and regenerate the tests with the following rake task -# -# $ rake spec:generate -# - -require 'spec_helper' -require 'whois/parsers/whois.donuts.co.rb' - -describe Whois::Parsers::WhoisDonutsCo, "status_available.expected" do - - subject do - file = fixture("responses", "whois.donuts.co/bike/status_available.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) - end - - describe "#domain" do - it do - expect(subject.domain).to eq(nil) - end - end - describe "#domain_id" do - it do - expect(subject.domain_id).to eq(nil) - end - end - describe "#status" do - it do - expect(subject.status).to eq(:available) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(true) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(false) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to eq(nil) - end - end - describe "#updated_on" do - it do - expect(subject.updated_on).to eq(nil) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to eq(nil) - end - end - describe "#registrar" do - it do - expect(subject.registrar).to eq(nil) - end - end - describe "#registrant_contacts" do - it do - expect(subject.registrant_contacts).to be_a(Array) - expect(subject.registrant_contacts).to eq([]) - end - end - describe "#admin_contacts" do - it do - expect(subject.admin_contacts).to be_a(Array) - expect(subject.admin_contacts).to eq([]) - end - end - describe "#technical_contacts" do - it do - expect(subject.technical_contacts).to be_a(Array) - expect(subject.technical_contacts).to eq([]) - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers).to eq([]) - end - end -end diff --git a/spec/whois/parsers/responses/whois.donuts.co/bike/status_registered_spec.rb b/spec/whois/parsers/responses/whois.donuts.co/bike/status_registered_spec.rb deleted file mode 100644 index cfa8e5b4..00000000 --- a/spec/whois/parsers/responses/whois.donuts.co/bike/status_registered_spec.rb +++ /dev/null @@ -1,155 +0,0 @@ -# encoding: utf-8 - -# This file is autogenerated. Do not edit it manually. -# If you want change the content of this file, edit -# -# /spec/fixtures/responses/whois.donuts.co/bike/status_registered.expected -# -# and regenerate the tests with the following rake task -# -# $ rake spec:generate -# - -require 'spec_helper' -require 'whois/parsers/whois.donuts.co.rb' - -describe Whois::Parsers::WhoisDonutsCo, "status_registered.expected" do - - subject do - file = fixture("responses", "whois.donuts.co/bike/status_registered.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) - end - - describe "#domain" do - it do - expect(subject.domain).to eq("whereismy.bike") - end - end - describe "#domain_id" do - it do - expect(subject.domain_id).to eq("e25432d5c94440c4a8ca0e5ecbc13904-DONUTS") - end - end - describe "#status" do - it do - expect(subject.status).to eq(:registered) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(false) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(true) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to be_a(Time) - expect(subject.created_on).to eq(DateTime.parse("2016-02-26 16:49:10 UTC")) - end - end - describe "#updated_on" do - it do - expect(subject.updated_on).to be_a(Time) - expect(subject.updated_on).to eq(DateTime.parse("2017-04-12 16:49:41 UTC")) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to be_a(Time) - expect(subject.expires_on).to eq(DateTime.parse("2018-02-26 16:49:10 UTC")) - end - end - describe "#registrar" do - it do - expect(subject.registrar).to be_a(Whois::Parser::Registrar) - expect(subject.registrar.id).to eq("146") - expect(subject.registrar.name).to eq("GoDaddy.com, LLC") - expect(subject.registrar.url).to eq("http://www.godaddy.com/domains/search.aspx?ci=8990") - end - end - describe "#registrant_contacts" do - it do - expect(subject.registrant_contacts).to be_a(Array) - expect(subject.registrant_contacts.size).to eq(1) - expect(subject.registrant_contacts[0]).to be_a(Whois::Parser::Contact) - expect(subject.registrant_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_REGISTRANT) - expect(subject.registrant_contacts[0].id).to eq("2a94fd50b2ca42c685828dfa8c07e23d-DONUTS") - expect(subject.registrant_contacts[0].name).to eq("Marko Matenda") - expect(subject.registrant_contacts[0].organization).to eq("") - expect(subject.registrant_contacts[0].address).to eq("Ante Starcevica 9.") - expect(subject.registrant_contacts[0].city).to eq("Bjelovar") - expect(subject.registrant_contacts[0].zip).to eq("43000") - expect(subject.registrant_contacts[0].state).to eq("Croatia") - expect(subject.registrant_contacts[0].country).to eq(nil) - expect(subject.registrant_contacts[0].country_code).to eq("HR") - expect(subject.registrant_contacts[0].phone).to eq("+385.916283632") - expect(subject.registrant_contacts[0].fax).to eq("") - expect(subject.registrant_contacts[0].email).to eq("marko.matenda@gmail.com") - expect(subject.registrant_contacts[0].created_on).to eq(nil) - expect(subject.registrant_contacts[0].updated_on).to eq(nil) - end - end - describe "#admin_contacts" do - it do - expect(subject.admin_contacts).to be_a(Array) - expect(subject.admin_contacts.size).to eq(1) - expect(subject.admin_contacts[0]).to be_a(Whois::Parser::Contact) - expect(subject.admin_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_ADMINISTRATIVE) - expect(subject.admin_contacts[0].id).to eq("a627ad7dc57343858c4397b9e3f9a530-DONUTS") - expect(subject.admin_contacts[0].name).to eq("Marko Matenda") - expect(subject.admin_contacts[0].organization).to eq("") - expect(subject.admin_contacts[0].address).to eq("Ante Starcevica 9.") - expect(subject.admin_contacts[0].city).to eq("Bjelovar") - expect(subject.admin_contacts[0].zip).to eq("43000") - expect(subject.admin_contacts[0].state).to eq("Croatia") - expect(subject.admin_contacts[0].country).to eq(nil) - expect(subject.admin_contacts[0].country_code).to eq("HR") - expect(subject.admin_contacts[0].phone).to eq("+385.916283632") - expect(subject.admin_contacts[0].fax).to eq("") - expect(subject.admin_contacts[0].email).to eq("marko.matenda@gmail.com") - expect(subject.admin_contacts[0].created_on).to eq(nil) - expect(subject.admin_contacts[0].updated_on).to eq(nil) - end - end - describe "#technical_contacts" do - it do - expect(subject.technical_contacts).to be_a(Array) - expect(subject.technical_contacts.size).to eq(1) - expect(subject.technical_contacts[0]).to be_a(Whois::Parser::Contact) - expect(subject.technical_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_TECHNICAL) - expect(subject.technical_contacts[0].id).to eq("08094e7dd78143d6b83338c5c59a8160-DONUTS") - expect(subject.technical_contacts[0].name).to eq("Marko Matenda") - expect(subject.technical_contacts[0].organization).to eq("") - expect(subject.technical_contacts[0].address).to eq("Ante Starcevica 9.") - expect(subject.technical_contacts[0].city).to eq("Bjelovar") - expect(subject.technical_contacts[0].zip).to eq("43000") - expect(subject.technical_contacts[0].state).to eq("Croatia") - expect(subject.technical_contacts[0].country).to eq(nil) - expect(subject.technical_contacts[0].country_code).to eq("HR") - expect(subject.technical_contacts[0].phone).to eq("+385.916283632") - expect(subject.technical_contacts[0].fax).to eq("") - expect(subject.technical_contacts[0].email).to eq("marko.matenda@gmail.com") - expect(subject.technical_contacts[0].created_on).to eq(nil) - expect(subject.technical_contacts[0].updated_on).to eq(nil) - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers.size).to eq(2) - expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[0].name).to eq("ns68.domaincontrol.com") - expect(subject.nameservers[0].ipv4).to eq(nil) - expect(subject.nameservers[0].ipv6).to eq(nil) - expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[1].name).to eq("ns67.domaincontrol.com") - expect(subject.nameservers[1].ipv4).to eq(nil) - expect(subject.nameservers[1].ipv6).to eq(nil) - end - end -end diff --git a/spec/whois/parsers/responses/whois.dot.cf/cf/property_expires_on_blank_spec.rb b/spec/whois/parsers/responses/whois.dot.cf/cf/property_expires_on_blank_spec.rb index 16550378..54f770a0 100644 --- a/spec/whois/parsers/responses/whois.dot.cf/cf/property_expires_on_blank_spec.rb +++ b/spec/whois/parsers/responses/whois.dot.cf/cf/property_expires_on_blank_spec.rb @@ -11,19 +11,16 @@ # require 'spec_helper' -require 'whois/parsers/whois.dot.cf.rb' -describe Whois::Parsers::WhoisDotCf, "property_expires_on_blank.expected" do +describe "whois.dot.cf", :aggregate_failures do subject do file = fixture("responses", "whois.dot.cf/cf/property_expires_on_blank.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.dot.cf") + Whois::Parser.parser_for(part) end - describe "#expires_on" do - it do - expect(subject.expires_on).to eq(nil) - end + it "matches property_expires_on_blank.expected" do + expect(subject.expires_on).to eq(nil) end end diff --git a/spec/whois/parsers/responses/whois.dot.cf/cf/status_available_spec.rb b/spec/whois/parsers/responses/whois.dot.cf/cf/status_available_spec.rb index 23d138ec..43abe3ea 100644 --- a/spec/whois/parsers/responses/whois.dot.cf/cf/status_available_spec.rb +++ b/spec/whois/parsers/responses/whois.dot.cf/cf/status_available_spec.rb @@ -11,50 +11,23 @@ # require 'spec_helper' -require 'whois/parsers/whois.dot.cf.rb' -describe Whois::Parsers::WhoisDotCf, "status_available.expected" do +describe "whois.dot.cf", :aggregate_failures do subject do file = fixture("responses", "whois.dot.cf/cf/status_available.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.dot.cf") + Whois::Parser.parser_for(part) end - describe "#status" do - it do - expect(subject.status).to eq(:available) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(true) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(false) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to eq(nil) - end - end - describe "#updated_on" do - it do - expect { subject.updated_on }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to eq(nil) - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers).to eq([]) - end + it "matches status_available.expected" do + expect(subject.status).to eq(:available) + expect(subject.available?).to eq(true) + expect(subject.registered?).to eq(false) + expect(subject.created_on).to eq(nil) + expect { subject.updated_on }.to raise_error(Whois::AttributeNotSupported) + expect(subject.expires_on).to eq(nil) + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers).to eq([]) end end diff --git a/spec/whois/parsers/responses/whois.dot.cf/cf/status_registered_spec.rb b/spec/whois/parsers/responses/whois.dot.cf/cf/status_registered_spec.rb index 82aa0ae5..5959920f 100644 --- a/spec/whois/parsers/responses/whois.dot.cf/cf/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.dot.cf/cf/status_registered_spec.rb @@ -11,61 +11,34 @@ # require 'spec_helper' -require 'whois/parsers/whois.dot.cf.rb' -describe Whois::Parsers::WhoisDotCf, "status_registered.expected" do +describe "whois.dot.cf", :aggregate_failures do subject do file = fixture("responses", "whois.dot.cf/cf/status_registered.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.dot.cf") + Whois::Parser.parser_for(part) end - describe "#status" do - it do - expect(subject.status).to eq(:registered) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(false) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(true) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to be_a(Time) - expect(subject.created_on).to eq(DateTime.parse("2013-03-28 00:00:00")) - end - end - describe "#updated_on" do - it do - expect { subject.updated_on }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to eq(nil) - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers.size).to eq(5) - expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[0].name).to eq("dns5.nettica.com") - expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[1].name).to eq("dns1.nettica.com") - expect(subject.nameservers[2]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[2].name).to eq("dns2.nettica.com") - expect(subject.nameservers[3]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[3].name).to eq("dns3.nettica.com") - expect(subject.nameservers[4]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[4].name).to eq("dns4.nettica.com") - end + it "matches status_registered.expected" do + expect(subject.status).to eq(:registered) + expect(subject.available?).to eq(false) + expect(subject.registered?).to eq(true) + expect(subject.created_on).to be_a(Time) + expect(subject.created_on).to eq(DateTime.parse("2013-03-28 00:00:00")) + expect { subject.updated_on }.to raise_error(Whois::AttributeNotSupported) + expect(subject.expires_on).to eq(nil) + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers.size).to eq(5) + expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[0].name).to eq("dns5.nettica.com") + expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[1].name).to eq("dns1.nettica.com") + expect(subject.nameservers[2]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[2].name).to eq("dns2.nettica.com") + expect(subject.nameservers[3]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[3].name).to eq("dns3.nettica.com") + expect(subject.nameservers[4]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[4].name).to eq("dns4.nettica.com") end end diff --git a/spec/whois/parsers/responses/whois.dot.tk/tk/status_available_spec.rb b/spec/whois/parsers/responses/whois.dot.tk/tk/status_available_spec.rb index 1d9ff5cd..899e6ce4 100644 --- a/spec/whois/parsers/responses/whois.dot.tk/tk/status_available_spec.rb +++ b/spec/whois/parsers/responses/whois.dot.tk/tk/status_available_spec.rb @@ -11,50 +11,23 @@ # require 'spec_helper' -require 'whois/parsers/whois.dot.tk.rb' -describe Whois::Parsers::WhoisDotTk, "status_available.expected" do +describe "whois.dot.tk", :aggregate_failures do subject do file = fixture("responses", "whois.dot.tk/tk/status_available.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.dot.tk") + Whois::Parser.parser_for(part) end - describe "#status" do - it do - expect(subject.status).to eq(:available) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(true) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(false) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to eq(nil) - end - end - describe "#updated_on" do - it do - expect { subject.updated_on }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to eq(nil) - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers).to eq([]) - end + it "matches status_available.expected" do + expect(subject.status).to eq(:available) + expect(subject.available?).to eq(true) + expect(subject.registered?).to eq(false) + expect(subject.created_on).to eq(nil) + expect { subject.updated_on }.to raise_error(Whois::AttributeNotSupported) + expect(subject.expires_on).to eq(nil) + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers).to eq([]) end end diff --git a/spec/whois/parsers/responses/whois.dot.tk/tk/status_registered_spec.rb b/spec/whois/parsers/responses/whois.dot.tk/tk/status_registered_spec.rb index 28fd7788..e1957a98 100644 --- a/spec/whois/parsers/responses/whois.dot.tk/tk/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.dot.tk/tk/status_registered_spec.rb @@ -11,60 +11,33 @@ # require 'spec_helper' -require 'whois/parsers/whois.dot.tk.rb' -describe Whois::Parsers::WhoisDotTk, "status_registered.expected" do +describe "whois.dot.tk", :aggregate_failures do subject do file = fixture("responses", "whois.dot.tk/tk/status_registered.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.dot.tk") + Whois::Parser.parser_for(part) end - describe "#status" do - it do - expect(subject.status).to eq(:registered) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(false) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(true) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to be_a(Time) - expect(subject.created_on).to eq(DateTime.parse("2001-12-18 00:00:00")) - end - end - describe "#updated_on" do - it do - expect { subject.updated_on }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to be_a(Time) - expect(subject.expires_on).to eq(DateTime.parse("2012-03-02 00:00:00")) - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers.size).to eq(4) - expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[0].name).to eq("ns1.google.com") - expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[1].name).to eq("ns2.google.com") - expect(subject.nameservers[2]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[2].name).to eq("ns3.google.com") - expect(subject.nameservers[3]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[3].name).to eq("ns4.google.com") - end + it "matches status_registered.expected" do + expect(subject.status).to eq(:registered) + expect(subject.available?).to eq(false) + expect(subject.registered?).to eq(true) + expect(subject.created_on).to be_a(Time) + expect(subject.created_on).to eq(DateTime.parse("2001-12-18 00:00:00")) + expect { subject.updated_on }.to raise_error(Whois::AttributeNotSupported) + expect(subject.expires_on).to be_a(Time) + expect(subject.expires_on).to eq(DateTime.parse("2012-03-02 00:00:00")) + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers.size).to eq(4) + expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[0].name).to eq("ns1.google.com") + expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[1].name).to eq("ns2.google.com") + expect(subject.nameservers[2]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[2].name).to eq("ns3.google.com") + expect(subject.nameservers[3]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[3].name).to eq("ns4.google.com") end end diff --git a/spec/whois/parsers/responses/whois.dotgov.gov/gov/status_available_spec.rb b/spec/whois/parsers/responses/whois.dotgov.gov/gov/status_available_spec.rb index 2c6dcb4b..6d400f7c 100644 --- a/spec/whois/parsers/responses/whois.dotgov.gov/gov/status_available_spec.rb +++ b/spec/whois/parsers/responses/whois.dotgov.gov/gov/status_available_spec.rb @@ -11,49 +11,22 @@ # require 'spec_helper' -require 'whois/parsers/whois.dotgov.gov.rb' -describe Whois::Parsers::WhoisDotgovGov, "status_available.expected" do +describe "whois.dotgov.gov", :aggregate_failures do subject do file = fixture("responses", "whois.dotgov.gov/gov/status_available.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.dotgov.gov") + Whois::Parser.parser_for(part) end - describe "#status" do - it do - expect(subject.status).to eq(:available) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(true) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(false) - end - end - describe "#created_on" do - it do - expect { subject.created_on }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#updated_on" do - it do - expect { subject.updated_on }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#expires_on" do - it do - expect { subject.expires_on }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#nameservers" do - it do - expect { subject.nameservers }.to raise_error(Whois::AttributeNotSupported) - end + it "matches status_available.expected" do + expect(subject.status).to eq(:available) + expect(subject.available?).to eq(true) + expect(subject.registered?).to eq(false) + expect { subject.created_on }.to raise_error(Whois::AttributeNotSupported) + expect { subject.updated_on }.to raise_error(Whois::AttributeNotSupported) + expect { subject.expires_on }.to raise_error(Whois::AttributeNotSupported) + expect { subject.nameservers }.to raise_error(Whois::AttributeNotSupported) end end diff --git a/spec/whois/parsers/responses/whois.dotgov.gov/gov/status_registered_spec.rb b/spec/whois/parsers/responses/whois.dotgov.gov/gov/status_registered_spec.rb index 9f4989b4..e32b5aa5 100644 --- a/spec/whois/parsers/responses/whois.dotgov.gov/gov/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.dotgov.gov/gov/status_registered_spec.rb @@ -11,49 +11,22 @@ # require 'spec_helper' -require 'whois/parsers/whois.dotgov.gov.rb' -describe Whois::Parsers::WhoisDotgovGov, "status_registered.expected" do +describe "whois.dotgov.gov", :aggregate_failures do subject do file = fixture("responses", "whois.dotgov.gov/gov/status_registered.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.dotgov.gov") + Whois::Parser.parser_for(part) end - describe "#status" do - it do - expect(subject.status).to eq(:registered) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(false) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(true) - end - end - describe "#created_on" do - it do - expect { subject.created_on }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#updated_on" do - it do - expect { subject.updated_on }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#expires_on" do - it do - expect { subject.expires_on }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#nameservers" do - it do - expect { subject.nameservers }.to raise_error(Whois::AttributeNotSupported) - end + it "matches status_registered.expected" do + expect(subject.status).to eq(:registered) + expect(subject.available?).to eq(false) + expect(subject.registered?).to eq(true) + expect { subject.created_on }.to raise_error(Whois::AttributeNotSupported) + expect { subject.updated_on }.to raise_error(Whois::AttributeNotSupported) + expect { subject.expires_on }.to raise_error(Whois::AttributeNotSupported) + expect { subject.nameservers }.to raise_error(Whois::AttributeNotSupported) end end diff --git a/spec/whois/parsers/responses/whois.dotmobiregistry.net/mobi/response_throttled_spec.rb b/spec/whois/parsers/responses/whois.dotmobiregistry.net/mobi/response_throttled_spec.rb index a1d64142..fd20c258 100644 --- a/spec/whois/parsers/responses/whois.dotmobiregistry.net/mobi/response_throttled_spec.rb +++ b/spec/whois/parsers/responses/whois.dotmobiregistry.net/mobi/response_throttled_spec.rb @@ -11,19 +11,16 @@ # require 'spec_helper' -require 'whois/parsers/whois.dotmobiregistry.net.rb' -describe Whois::Parsers::WhoisDotmobiregistryNet, "response_throttled.expected" do +describe "whois.dotmobiregistry.net", :aggregate_failures do subject do file = fixture("responses", "whois.dotmobiregistry.net/mobi/response_throttled.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.dotmobiregistry.net") + Whois::Parser.parser_for(part) end - describe "#response_throttled?" do - it do - expect(subject.response_throttled?).to eq(true) - end + it "matches response_throttled.expected" do + expect(subject.response_throttled?).to eq(true) end end diff --git a/spec/whois/parsers/responses/whois.dotmobiregistry.net/mobi/status_available_spec.rb b/spec/whois/parsers/responses/whois.dotmobiregistry.net/mobi/status_available_spec.rb index f3234c2a..47734f66 100644 --- a/spec/whois/parsers/responses/whois.dotmobiregistry.net/mobi/status_available_spec.rb +++ b/spec/whois/parsers/responses/whois.dotmobiregistry.net/mobi/status_available_spec.rb @@ -11,88 +11,33 @@ # require 'spec_helper' -require 'whois/parsers/whois.dotmobiregistry.net.rb' -describe Whois::Parsers::WhoisDotmobiregistryNet, "status_available.expected" do +describe "whois.dotmobiregistry.net", :aggregate_failures do subject do file = fixture("responses", "whois.dotmobiregistry.net/mobi/status_available.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.dotmobiregistry.net") + Whois::Parser.parser_for(part) end - describe "#disclaimer" do - it do - expect(subject.disclaimer).to eq("Access to AFILIAS WHOIS information is provided to assist persons in determining the contents of a domain name registration record in the Afilias registry database. The data in this record is provided by Afilias Limited for informational purposes only, and Afilias 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. Afilias reserves the right to modify these terms at any time. By submitting this query, you agree to abide by this policy. The Registrar of Record identified in this output may have an RDDS service that can be queried for additional information on how to contact the Registrant, Admin, or Tech contact of the queried domain name.") - end - end - describe "#domain" do - it do - expect(subject.domain).to eq(nil) - end - end - describe "#domain_id" do - it do - expect(subject.domain_id).to eq(nil) - end - end - describe "#status" do - it do - expect(subject.status).to eq([]) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(true) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(false) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to eq(nil) - end - end - describe "#updated_on" do - it do - expect(subject.updated_on).to eq(nil) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to eq(nil) - end - end - describe "#registrar" do - it do - expect(subject.registrar).to eq(nil) - end - end - describe "#registrant_contacts" do - it do - expect(subject.registrant_contacts).to be_a(Array) - expect(subject.registrant_contacts).to eq([]) - end - end - describe "#admin_contacts" do - it do - expect(subject.admin_contacts).to be_a(Array) - expect(subject.admin_contacts).to eq([]) - end - end - describe "#technical_contacts" do - it do - expect(subject.technical_contacts).to be_a(Array) - expect(subject.technical_contacts).to eq([]) - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers).to eq([]) - end + it "matches status_available.expected" do + expect(subject.disclaimer).to eq("Access to AFILIAS WHOIS information is provided to assist persons in determining the contents of a domain name registration record in the Afilias registry database. The data in this record is provided by Afilias Limited for informational purposes only, and Afilias 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. Afilias reserves the right to modify these terms at any time. By submitting this query, you agree to abide by this policy. The Registrar of Record identified in this output may have an RDDS service that can be queried for additional information on how to contact the Registrant, Admin, or Tech contact of the queried domain name.") + expect(subject.domain).to eq(nil) + expect(subject.domain_id).to eq(nil) + expect(subject.status).to eq([]) + expect(subject.available?).to eq(true) + expect(subject.registered?).to eq(false) + expect(subject.created_on).to eq(nil) + expect(subject.updated_on).to eq(nil) + expect(subject.expires_on).to eq(nil) + expect(subject.registrar).to eq(nil) + expect(subject.registrant_contacts).to be_a(Array) + expect(subject.registrant_contacts).to eq([]) + expect(subject.admin_contacts).to be_a(Array) + expect(subject.admin_contacts).to eq([]) + expect(subject.technical_contacts).to be_a(Array) + expect(subject.technical_contacts).to eq([]) + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers).to eq([]) end end diff --git a/spec/whois/parsers/responses/whois.dotmobiregistry.net/mobi/status_registered_spec.rb b/spec/whois/parsers/responses/whois.dotmobiregistry.net/mobi/status_registered_spec.rb index 2649e147..c92492c4 100644 --- a/spec/whois/parsers/responses/whois.dotmobiregistry.net/mobi/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.dotmobiregistry.net/mobi/status_registered_spec.rb @@ -11,115 +11,60 @@ # require 'spec_helper' -require 'whois/parsers/whois.dotmobiregistry.net.rb' -describe Whois::Parsers::WhoisDotmobiregistryNet, "status_registered.expected" do +describe "whois.dotmobiregistry.net", :aggregate_failures do subject do file = fixture("responses", "whois.dotmobiregistry.net/mobi/status_registered.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.dotmobiregistry.net") + Whois::Parser.parser_for(part) end - describe "#disclaimer" do - it do - expect(subject.disclaimer).to eq("Access to AFILIAS WHOIS information is provided to assist persons in determining the contents of a domain name registration record in the Afilias registry database. The data in this record is provided by Afilias Limited for informational purposes only, and Afilias 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. Afilias reserves the right to modify these terms at any time. By submitting this query, you agree to abide by this policy. The Registrar of Record identified in this output may have an RDDS service that can be queried for additional information on how to contact the Registrant, Admin, or Tech contact of the queried domain name.") - end - end - describe "#domain" do - it do - expect(subject.domain).to eq("google.mobi") - end - end - describe "#domain_id" do - it do - expect(subject.domain_id).to eq("D102500000000000117-LRMS") - end - end - describe "#status" do - it do - expect(subject.status).to eq(["clientDeleteProhibited https://icann.org/epp#clientDeleteProhibited", "clientTransferProhibited https://icann.org/epp#clientTransferProhibited", "clientUpdateProhibited https://icann.org/epp#clientUpdateProhibited"]) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(false) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(true) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to be_a(Time) - expect(subject.created_on).to eq(DateTime.parse("2006-05-11 21:08:42 UTC")) - end - end - describe "#updated_on" do - it do - expect(subject.updated_on).to be_a(Time) - expect(subject.updated_on).to eq(DateTime.parse("2021-04-09 09:29:29 UTC")) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to be_a(Time) - expect(subject.expires_on).to eq(DateTime.parse("2022-05-11 21:08:42 UTC")) - end - end - describe "#registrar" do - it do - expect(subject.registrar).to be_a(Whois::Parser::Registrar) - expect(subject.registrar.id).to eq("292") - expect(subject.registrar.name).to eq("MarkMonitor Inc.") - expect(subject.registrar.url).to eq("http://www.markmonitor.com") - end - end - describe "#registrant_contacts" do - it do - expect(subject.registrant_contacts).to be_a(Array) - expect(subject.registrant_contacts.size).to eq(1) - expect(subject.registrant_contacts[0]).to be_a(Whois::Parser::Contact) - expect(subject.registrant_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_REGISTRANT) - expect(subject.registrant_contacts[0].id).to eq(nil) - expect(subject.registrant_contacts[0].name).to eq(nil) - expect(subject.registrant_contacts[0].organization).to eq("Google LLC") - expect(subject.registrant_contacts[0].address).to eq(nil) - expect(subject.registrant_contacts[0].city).to eq(nil) - expect(subject.registrant_contacts[0].zip).to eq(nil) - expect(subject.registrant_contacts[0].state).to eq("CA") - expect(subject.registrant_contacts[0].country_code).to eq("US") - expect(subject.registrant_contacts[0].phone).to eq(nil) - expect(subject.registrant_contacts[0].fax).to eq(nil) - expect(subject.registrant_contacts[0].email).to eq(nil) - end - end - describe "#admin_contacts" do - it do - expect(subject.admin_contacts).to be_a(Array) - expect(subject.admin_contacts.size).to eq(0) - end - end - describe "#technical_contacts" do - it do - expect(subject.technical_contacts).to be_a(Array) - expect(subject.technical_contacts.size).to eq(0) - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers.size).to eq(4) - expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[0].name).to eq("ns1.google.com") - expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[1].name).to eq("ns2.google.com") - expect(subject.nameservers[2]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[2].name).to eq("ns3.google.com") - expect(subject.nameservers[3]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[3].name).to eq("ns4.google.com") - end + it "matches status_registered.expected" do + expect(subject.disclaimer).to eq("Access to AFILIAS WHOIS information is provided to assist persons in determining the contents of a domain name registration record in the Afilias registry database. The data in this record is provided by Afilias Limited for informational purposes only, and Afilias 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. Afilias reserves the right to modify these terms at any time. By submitting this query, you agree to abide by this policy. The Registrar of Record identified in this output may have an RDDS service that can be queried for additional information on how to contact the Registrant, Admin, or Tech contact of the queried domain name.") + expect(subject.domain).to eq("google.mobi") + expect(subject.domain_id).to eq("D102500000000000117-LRMS") + expect(subject.status).to eq(["clientDeleteProhibited https://icann.org/epp#clientDeleteProhibited", "clientTransferProhibited https://icann.org/epp#clientTransferProhibited", "clientUpdateProhibited https://icann.org/epp#clientUpdateProhibited"]) + expect(subject.available?).to eq(false) + expect(subject.registered?).to eq(true) + expect(subject.created_on).to be_a(Time) + expect(subject.created_on).to eq(DateTime.parse("2006-05-11 21:08:42 UTC")) + expect(subject.updated_on).to be_a(Time) + expect(subject.updated_on).to eq(DateTime.parse("2021-04-09 09:29:29 UTC")) + expect(subject.expires_on).to be_a(Time) + expect(subject.expires_on).to eq(DateTime.parse("2022-05-11 21:08:42 UTC")) + expect(subject.registrar).to be_a(Whois::Parser::Registrar) + expect(subject.registrar.id).to eq("292") + expect(subject.registrar.name).to eq("MarkMonitor Inc.") + expect(subject.registrar.url).to eq("http://www.markmonitor.com") + expect(subject.registrant_contacts).to be_a(Array) + expect(subject.registrant_contacts.size).to eq(1) + expect(subject.registrant_contacts[0]).to be_a(Whois::Parser::Contact) + expect(subject.registrant_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_REGISTRANT) + expect(subject.registrant_contacts[0].id).to eq(nil) + expect(subject.registrant_contacts[0].name).to eq(nil) + expect(subject.registrant_contacts[0].organization).to eq("Google LLC") + expect(subject.registrant_contacts[0].address).to eq(nil) + expect(subject.registrant_contacts[0].city).to eq(nil) + expect(subject.registrant_contacts[0].zip).to eq(nil) + expect(subject.registrant_contacts[0].state).to eq("CA") + expect(subject.registrant_contacts[0].country_code).to eq("US") + expect(subject.registrant_contacts[0].phone).to eq(nil) + expect(subject.registrant_contacts[0].fax).to eq(nil) + expect(subject.registrant_contacts[0].email).to eq(nil) + expect(subject.admin_contacts).to be_a(Array) + expect(subject.admin_contacts.size).to eq(0) + expect(subject.technical_contacts).to be_a(Array) + expect(subject.technical_contacts.size).to eq(0) + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers.size).to eq(4) + expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[0].name).to eq("ns1.google.com") + expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[1].name).to eq("ns2.google.com") + expect(subject.nameservers[2]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[2].name).to eq("ns3.google.com") + expect(subject.nameservers[3]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[3].name).to eq("ns4.google.com") end end diff --git a/spec/whois/parsers/responses/whois.dotpostregistry.net/post/status_available_spec.rb b/spec/whois/parsers/responses/whois.dotpostregistry.net/post/status_available_spec.rb index a14851fa..92d6ed88 100644 --- a/spec/whois/parsers/responses/whois.dotpostregistry.net/post/status_available_spec.rb +++ b/spec/whois/parsers/responses/whois.dotpostregistry.net/post/status_available_spec.rb @@ -11,88 +11,33 @@ # require 'spec_helper' -require 'whois/parsers/whois.dotpostregistry.net.rb' -describe Whois::Parsers::WhoisDotpostregistryNet, "status_available.expected" do +describe "whois.dotpostregistry.net", :aggregate_failures do subject do file = fixture("responses", "whois.dotpostregistry.net/post/status_available.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.dotpostregistry.net") + Whois::Parser.parser_for(part) end - describe "#disclaimer" do - it do - expect(subject.disclaimer).to eq("Access to WHOIS information is provided to assist persons in determining the contents of a domain name registration record in the registry database. The data in this record is provided by The Registry Operator for informational purposes only, and accuracy is not guaranteed. 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. Registry Operator reserves the right to modify these terms at any time. By submitting this query, you agree to abide by this policy. The Registrar of Record identified in this output may have an RDDS service that can be queried for additional information on how to contact the Registrant, Admin, or Tech contact of the queried domain name.") - end - end - describe "#domain" do - it do - expect(subject.domain).to eq(nil) - end - end - describe "#domain_id" do - it do - expect(subject.domain_id).to eq(nil) - end - end - describe "#status" do - it do - expect(subject.status).to eq([]) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(true) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(false) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to eq(nil) - end - end - describe "#updated_on" do - it do - expect(subject.updated_on).to eq(nil) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to eq(nil) - end - end - describe "#registrar" do - it do - expect(subject.registrar).to eq(nil) - end - end - describe "#registrant_contacts" do - it do - expect(subject.registrant_contacts).to be_a(Array) - expect(subject.registrant_contacts).to eq([]) - end - end - describe "#admin_contacts" do - it do - expect(subject.admin_contacts).to be_a(Array) - expect(subject.admin_contacts).to eq([]) - end - end - describe "#technical_contacts" do - it do - expect(subject.technical_contacts).to be_a(Array) - expect(subject.technical_contacts).to eq([]) - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers).to eq([]) - end + it "matches status_available.expected" do + expect(subject.disclaimer).to eq("Access to WHOIS information is provided to assist persons in determining the contents of a domain name registration record in the registry database. The data in this record is provided by The Registry Operator for informational purposes only, and accuracy is not guaranteed. 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. Registry Operator reserves the right to modify these terms at any time. By submitting this query, you agree to abide by this policy. The Registrar of Record identified in this output may have an RDDS service that can be queried for additional information on how to contact the Registrant, Admin, or Tech contact of the queried domain name.") + expect(subject.domain).to eq(nil) + expect(subject.domain_id).to eq(nil) + expect(subject.status).to eq([]) + expect(subject.available?).to eq(true) + expect(subject.registered?).to eq(false) + expect(subject.created_on).to eq(nil) + expect(subject.updated_on).to eq(nil) + expect(subject.expires_on).to eq(nil) + expect(subject.registrar).to eq(nil) + expect(subject.registrant_contacts).to be_a(Array) + expect(subject.registrant_contacts).to eq([]) + expect(subject.admin_contacts).to be_a(Array) + expect(subject.admin_contacts).to eq([]) + expect(subject.technical_contacts).to be_a(Array) + expect(subject.technical_contacts).to eq([]) + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers).to eq([]) end end diff --git a/spec/whois/parsers/responses/whois.dotpostregistry.net/post/status_registered_spec.rb b/spec/whois/parsers/responses/whois.dotpostregistry.net/post/status_registered_spec.rb index 5afaf5b5..3093515c 100644 --- a/spec/whois/parsers/responses/whois.dotpostregistry.net/post/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.dotpostregistry.net/post/status_registered_spec.rb @@ -11,137 +11,82 @@ # require 'spec_helper' -require 'whois/parsers/whois.dotpostregistry.net.rb' -describe Whois::Parsers::WhoisDotpostregistryNet, "status_registered.expected" do +describe "whois.dotpostregistry.net", :aggregate_failures do subject do file = fixture("responses", "whois.dotpostregistry.net/post/status_registered.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.dotpostregistry.net") + Whois::Parser.parser_for(part) end - describe "#disclaimer" do - it do - expect(subject.disclaimer).to eq("Access to WHOIS information is provided to assist persons in determining the contents of a domain name registration record in the registry database. The data in this record is provided by The Registry Operator for informational purposes only, and accuracy is not guaranteed. 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. Registry Operator reserves the right to modify these terms at any time. By submitting this query, you agree to abide by this policy. The Registrar of Record identified in this output may have an RDDS service that can be queried for additional information on how to contact the Registrant, Admin, or Tech contact of the queried domain name.") - end - end - describe "#domain" do - it do - expect(subject.domain).to eq("posteitaliane.post") - end - end - describe "#domain_id" do - it do - expect(subject.domain_id).to eq("D108700000000019482-AGRS") - end - end - describe "#status" do - it do - expect(subject.status).to eq(["ok https://icann.org/epp#ok"]) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(false) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(true) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to be_a(Time) - expect(subject.created_on).to eq(DateTime.parse("2012-09-21 12:03:07 UTC")) - end - end - describe "#updated_on" do - it do - expect(subject.updated_on).to be_a(Time) - expect(subject.updated_on).to eq(DateTime.parse("2021-09-21 22:31:15 UTC")) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to be_a(Time) - expect(subject.expires_on).to eq(DateTime.parse("2022-09-21 12:03:07 UTC")) - end - end - describe "#registrar" do - it do - expect(subject.registrar).to be_a(Whois::Parser::Registrar) - expect(subject.registrar.id).to eq("9999") - expect(subject.registrar.name).to eq("Universal Postal Union") - expect(subject.registrar.url).to eq("") - end - end - describe "#registrant_contacts" do - it do - expect(subject.registrant_contacts).to be_a(Array) - expect(subject.registrant_contacts.size).to eq(1) - expect(subject.registrant_contacts[0]).to be_a(Whois::Parser::Contact) - expect(subject.registrant_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_REGISTRANT) - expect(subject.registrant_contacts[0].id).to eq("C19309314-AGRS") - expect(subject.registrant_contacts[0].name).to eq("Poste Italiane") - expect(subject.registrant_contacts[0].organization).to eq("Poste Italiane") - expect(subject.registrant_contacts[0].address).to eq("Viale Europa 190") - expect(subject.registrant_contacts[0].city).to eq("Rome") - expect(subject.registrant_contacts[0].zip).to eq("00144") - expect(subject.registrant_contacts[0].state).to eq("") - expect(subject.registrant_contacts[0].country_code).to eq("IT") - expect(subject.registrant_contacts[0].phone).to eq("+39.0659581") - expect(subject.registrant_contacts[0].fax).to eq("+39.065942298") - expect(subject.registrant_contacts[0].email).to eq("info@poste.it") - end - end - describe "#admin_contacts" do - it do - expect(subject.admin_contacts).to be_a(Array) - expect(subject.admin_contacts.size).to eq(1) - expect(subject.admin_contacts[0]).to be_a(Whois::Parser::Contact) - expect(subject.admin_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_ADMINISTRATIVE) - expect(subject.admin_contacts[0].id).to eq("C19309312-AGRS") - expect(subject.admin_contacts[0].name).to eq("Giovanni Brardinoni") - expect(subject.admin_contacts[0].organization).to eq("Poste Italiane") - expect(subject.admin_contacts[0].address).to eq("Viale Europa 175") - expect(subject.admin_contacts[0].city).to eq("Rome") - expect(subject.admin_contacts[0].zip).to eq("00144") - expect(subject.admin_contacts[0].state).to eq("") - expect(subject.admin_contacts[0].country_code).to eq("IT") - expect(subject.admin_contacts[0].phone).to eq("+39.0659583671") - expect(subject.admin_contacts[0].fax).to eq("+39.0698688651") - expect(subject.admin_contacts[0].email).to eq("Giovanni.Brardinoni@Postecom.it") - end - end - describe "#technical_contacts" do - it do - expect(subject.technical_contacts).to be_a(Array) - expect(subject.technical_contacts.size).to eq(1) - expect(subject.technical_contacts[0]).to be_a(Whois::Parser::Contact) - expect(subject.technical_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_TECHNICAL) - expect(subject.technical_contacts[0].id).to eq("C19309311-AGRS") - expect(subject.technical_contacts[0].name).to eq("Andrea Speranza") - expect(subject.technical_contacts[0].organization).to eq("Poste Italiane") - expect(subject.technical_contacts[0].address).to eq("Viale Europa 175") - expect(subject.technical_contacts[0].city).to eq("Rome") - expect(subject.technical_contacts[0].zip).to eq("00144") - expect(subject.technical_contacts[0].state).to eq("") - expect(subject.technical_contacts[0].country_code).to eq("IT") - expect(subject.technical_contacts[0].phone).to eq("+39.0659583086") - expect(subject.technical_contacts[0].fax).to eq("+39.0659582032") - expect(subject.technical_contacts[0].email).to eq("netsecurity@postecom.it") - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers.size).to eq(2) - expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[0].name).to eq("dns.poste.it") - expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[1].name).to eq("dns2.poste.it") - end + it "matches status_registered.expected" do + expect(subject.disclaimer).to eq("Access to WHOIS information is provided to assist persons in determining the contents of a domain name registration record in the registry database. The data in this record is provided by The Registry Operator for informational purposes only, and accuracy is not guaranteed. 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. Registry Operator reserves the right to modify these terms at any time. By submitting this query, you agree to abide by this policy. The Registrar of Record identified in this output may have an RDDS service that can be queried for additional information on how to contact the Registrant, Admin, or Tech contact of the queried domain name.") + expect(subject.domain).to eq("posteitaliane.post") + expect(subject.domain_id).to eq("D108700000000019482-AGRS") + expect(subject.status).to eq(["ok https://icann.org/epp#ok"]) + expect(subject.available?).to eq(false) + expect(subject.registered?).to eq(true) + expect(subject.created_on).to be_a(Time) + expect(subject.created_on).to eq(DateTime.parse("2012-09-21 12:03:07 UTC")) + expect(subject.updated_on).to be_a(Time) + expect(subject.updated_on).to eq(DateTime.parse("2021-09-21 22:31:15 UTC")) + expect(subject.expires_on).to be_a(Time) + expect(subject.expires_on).to eq(DateTime.parse("2022-09-21 12:03:07 UTC")) + expect(subject.registrar).to be_a(Whois::Parser::Registrar) + expect(subject.registrar.id).to eq("9999") + expect(subject.registrar.name).to eq("Universal Postal Union") + expect(subject.registrar.url).to eq("") + expect(subject.registrant_contacts).to be_a(Array) + expect(subject.registrant_contacts.size).to eq(1) + expect(subject.registrant_contacts[0]).to be_a(Whois::Parser::Contact) + expect(subject.registrant_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_REGISTRANT) + expect(subject.registrant_contacts[0].id).to eq("C19309314-AGRS") + expect(subject.registrant_contacts[0].name).to eq("Poste Italiane") + expect(subject.registrant_contacts[0].organization).to eq("Poste Italiane") + expect(subject.registrant_contacts[0].address).to eq("Viale Europa 190") + expect(subject.registrant_contacts[0].city).to eq("Rome") + expect(subject.registrant_contacts[0].zip).to eq("00144") + expect(subject.registrant_contacts[0].state).to eq("") + expect(subject.registrant_contacts[0].country_code).to eq("IT") + expect(subject.registrant_contacts[0].phone).to eq("+39.0659581") + expect(subject.registrant_contacts[0].fax).to eq("+39.065942298") + expect(subject.registrant_contacts[0].email).to eq("info@poste.it") + expect(subject.admin_contacts).to be_a(Array) + expect(subject.admin_contacts.size).to eq(1) + expect(subject.admin_contacts[0]).to be_a(Whois::Parser::Contact) + expect(subject.admin_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_ADMINISTRATIVE) + expect(subject.admin_contacts[0].id).to eq("C19309312-AGRS") + expect(subject.admin_contacts[0].name).to eq("Giovanni Brardinoni") + expect(subject.admin_contacts[0].organization).to eq("Poste Italiane") + expect(subject.admin_contacts[0].address).to eq("Viale Europa 175") + expect(subject.admin_contacts[0].city).to eq("Rome") + expect(subject.admin_contacts[0].zip).to eq("00144") + expect(subject.admin_contacts[0].state).to eq("") + expect(subject.admin_contacts[0].country_code).to eq("IT") + expect(subject.admin_contacts[0].phone).to eq("+39.0659583671") + expect(subject.admin_contacts[0].fax).to eq("+39.0698688651") + expect(subject.admin_contacts[0].email).to eq("Giovanni.Brardinoni@Postecom.it") + expect(subject.technical_contacts).to be_a(Array) + expect(subject.technical_contacts.size).to eq(1) + expect(subject.technical_contacts[0]).to be_a(Whois::Parser::Contact) + expect(subject.technical_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_TECHNICAL) + expect(subject.technical_contacts[0].id).to eq("C19309311-AGRS") + expect(subject.technical_contacts[0].name).to eq("Andrea Speranza") + expect(subject.technical_contacts[0].organization).to eq("Poste Italiane") + expect(subject.technical_contacts[0].address).to eq("Viale Europa 175") + expect(subject.technical_contacts[0].city).to eq("Rome") + expect(subject.technical_contacts[0].zip).to eq("00144") + expect(subject.technical_contacts[0].state).to eq("") + expect(subject.technical_contacts[0].country_code).to eq("IT") + expect(subject.technical_contacts[0].phone).to eq("+39.0659583086") + expect(subject.technical_contacts[0].fax).to eq("+39.0659582032") + expect(subject.technical_contacts[0].email).to eq("netsecurity@postecom.it") + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers.size).to eq(2) + expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[0].name).to eq("dns.poste.it") + expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[1].name).to eq("dns2.poste.it") end end diff --git a/spec/whois/parsers/responses/whois.dreamhost.com/property_contact_private_spec.rb b/spec/whois/parsers/responses/whois.dreamhost.com/property_contact_private_spec.rb index 2bbf34a8..6f6c5d36 100644 --- a/spec/whois/parsers/responses/whois.dreamhost.com/property_contact_private_spec.rb +++ b/spec/whois/parsers/responses/whois.dreamhost.com/property_contact_private_spec.rb @@ -11,68 +11,57 @@ # require 'spec_helper' -require 'whois/parsers/whois.dreamhost.com.rb' -describe Whois::Parsers::WhoisDreamhostCom, "property_contact_private.expected" do +describe "whois.dreamhost.com", :aggregate_failures do subject do file = fixture("responses", "whois.dreamhost.com/property_contact_private.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.dreamhost.com") + Whois::Parser.parser_for(part) end - describe "#registrant_contacts" do - it do - expect(subject.registrant_contacts).to be_a(Array) - expect(subject.registrant_contacts.size).to eq(1) - expect(subject.registrant_contacts[0]).to be_a(Whois::Parser::Contact) - expect(subject.registrant_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_REGISTRANT) - expect(subject.registrant_contacts[0].name).to eq("PRIVATE REGISTRANT") - expect(subject.registrant_contacts[0].organization).to eq("A HAPPY DREAMHOST CUSTOMER") - expect(subject.registrant_contacts[0].address).to eq("417 ASSOCIATED RD #324, C/O ADEQUATEHQ.COM") - expect(subject.registrant_contacts[0].city).to eq("BREA") - expect(subject.registrant_contacts[0].zip).to eq("92821") - expect(subject.registrant_contacts[0].state).to eq("CA") - expect(subject.registrant_contacts[0].country_code).to eq("US") - expect(subject.registrant_contacts[0].phone).to eq("+1.7147064182") - expect(subject.registrant_contacts[0].fax).to eq("") - expect(subject.registrant_contacts[0].email).to eq("ADEQUATEHQ.COM@PROXY.DREAMHOST.COM") - end - end - describe "#admin_contacts" do - it do - expect(subject.admin_contacts).to be_a(Array) - expect(subject.admin_contacts.size).to eq(1) - expect(subject.admin_contacts[0]).to be_a(Whois::Parser::Contact) - expect(subject.admin_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_ADMINISTRATIVE) - expect(subject.admin_contacts[0].name).to eq("PRIVATE REGISTRANT") - expect(subject.admin_contacts[0].organization).to eq("A HAPPY DREAMHOST CUSTOMER") - expect(subject.admin_contacts[0].address).to eq("417 ASSOCIATED RD #324, C/O ADEQUATEHQ.COM") - expect(subject.admin_contacts[0].city).to eq("BREA") - expect(subject.admin_contacts[0].zip).to eq("92821") - expect(subject.admin_contacts[0].state).to eq("CA") - expect(subject.admin_contacts[0].country_code).to eq("US") - expect(subject.admin_contacts[0].phone).to eq("+1.7147064182") - expect(subject.admin_contacts[0].fax).to eq("") - expect(subject.admin_contacts[0].email).to eq("ADEQUATEHQ.COM@PROXY.DREAMHOST.COM") - end - end - describe "#technical_contacts" do - it do - expect(subject.technical_contacts).to be_a(Array) - expect(subject.technical_contacts.size).to eq(1) - expect(subject.technical_contacts[0]).to be_a(Whois::Parser::Contact) - expect(subject.technical_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_TECHNICAL) - expect(subject.technical_contacts[0].name).to eq("PRIVATE REGISTRANT") - expect(subject.technical_contacts[0].organization).to eq("A HAPPY DREAMHOST CUSTOMER") - expect(subject.technical_contacts[0].address).to eq("417 ASSOCIATED RD #324, C/O ADEQUATEHQ.COM") - expect(subject.technical_contacts[0].city).to eq("BREA") - expect(subject.technical_contacts[0].zip).to eq("92821") - expect(subject.technical_contacts[0].state).to eq("CA") - expect(subject.technical_contacts[0].country_code).to eq("US") - expect(subject.technical_contacts[0].phone).to eq("+1.7147064182") - expect(subject.technical_contacts[0].fax).to eq("") - expect(subject.technical_contacts[0].email).to eq("ADEQUATEHQ.COM@PROXY.DREAMHOST.COM") - end + it "matches property_contact_private.expected" do + expect(subject.registrant_contacts).to be_a(Array) + expect(subject.registrant_contacts.size).to eq(1) + expect(subject.registrant_contacts[0]).to be_a(Whois::Parser::Contact) + expect(subject.registrant_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_REGISTRANT) + expect(subject.registrant_contacts[0].name).to eq("PRIVATE REGISTRANT") + expect(subject.registrant_contacts[0].organization).to eq("A HAPPY DREAMHOST CUSTOMER") + expect(subject.registrant_contacts[0].address).to eq("417 ASSOCIATED RD #324, C/O ADEQUATEHQ.COM") + expect(subject.registrant_contacts[0].city).to eq("BREA") + expect(subject.registrant_contacts[0].zip).to eq("92821") + expect(subject.registrant_contacts[0].state).to eq("CA") + expect(subject.registrant_contacts[0].country_code).to eq("US") + expect(subject.registrant_contacts[0].phone).to eq("+1.7147064182") + expect(subject.registrant_contacts[0].fax).to eq("") + expect(subject.registrant_contacts[0].email).to eq("ADEQUATEHQ.COM@PROXY.DREAMHOST.COM") + expect(subject.admin_contacts).to be_a(Array) + expect(subject.admin_contacts.size).to eq(1) + expect(subject.admin_contacts[0]).to be_a(Whois::Parser::Contact) + expect(subject.admin_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_ADMINISTRATIVE) + expect(subject.admin_contacts[0].name).to eq("PRIVATE REGISTRANT") + expect(subject.admin_contacts[0].organization).to eq("A HAPPY DREAMHOST CUSTOMER") + expect(subject.admin_contacts[0].address).to eq("417 ASSOCIATED RD #324, C/O ADEQUATEHQ.COM") + expect(subject.admin_contacts[0].city).to eq("BREA") + expect(subject.admin_contacts[0].zip).to eq("92821") + expect(subject.admin_contacts[0].state).to eq("CA") + expect(subject.admin_contacts[0].country_code).to eq("US") + expect(subject.admin_contacts[0].phone).to eq("+1.7147064182") + expect(subject.admin_contacts[0].fax).to eq("") + expect(subject.admin_contacts[0].email).to eq("ADEQUATEHQ.COM@PROXY.DREAMHOST.COM") + expect(subject.technical_contacts).to be_a(Array) + expect(subject.technical_contacts.size).to eq(1) + expect(subject.technical_contacts[0]).to be_a(Whois::Parser::Contact) + expect(subject.technical_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_TECHNICAL) + expect(subject.technical_contacts[0].name).to eq("PRIVATE REGISTRANT") + expect(subject.technical_contacts[0].organization).to eq("A HAPPY DREAMHOST CUSTOMER") + expect(subject.technical_contacts[0].address).to eq("417 ASSOCIATED RD #324, C/O ADEQUATEHQ.COM") + expect(subject.technical_contacts[0].city).to eq("BREA") + expect(subject.technical_contacts[0].zip).to eq("92821") + expect(subject.technical_contacts[0].state).to eq("CA") + expect(subject.technical_contacts[0].country_code).to eq("US") + expect(subject.technical_contacts[0].phone).to eq("+1.7147064182") + expect(subject.technical_contacts[0].fax).to eq("") + expect(subject.technical_contacts[0].email).to eq("ADEQUATEHQ.COM@PROXY.DREAMHOST.COM") end end diff --git a/spec/whois/parsers/responses/whois.dreamhost.com/status_registered_spec.rb b/spec/whois/parsers/responses/whois.dreamhost.com/status_registered_spec.rb index 2a868d8d..b8e05ead 100644 --- a/spec/whois/parsers/responses/whois.dreamhost.com/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.dreamhost.com/status_registered_spec.rb @@ -11,121 +11,78 @@ # require 'spec_helper' -require 'whois/parsers/whois.dreamhost.com.rb' -describe Whois::Parsers::WhoisDreamhostCom, "status_registered.expected" do +describe "whois.dreamhost.com", :aggregate_failures do subject do file = fixture("responses", "whois.dreamhost.com/status_registered.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.dreamhost.com") + Whois::Parser.parser_for(part) end - describe "#status" do - it do - expect(subject.status).to eq(:registered) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(false) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(true) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to be_a(Time) - expect(subject.created_on).to eq(DateTime.parse("1997-09-22 21:00:00 UTC")) - end - end - describe "#updated_on" do - it do - expect(subject.updated_on).to be_a(Time) - expect(subject.updated_on).to eq(DateTime.parse("2013-12-14 16:53:27 UTC")) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to be_a(Time) - expect(subject.expires_on).to eq(DateTime.parse("2015-09-22 04:00:00 UTC")) - end - end - describe "#registrar" do - it do - expect(subject.registrar).to be_a(Whois::Parser::Registrar) - expect(subject.registrar.id).to eq("431") - expect(subject.registrar.name).to eq("DREAMHOST") - expect(subject.registrar.url).to eq("www.dreamhost.com") - end - end - describe "#registrant_contacts" do - it do - expect(subject.registrant_contacts).to be_a(Array) - expect(subject.registrant_contacts.size).to eq(1) - expect(subject.registrant_contacts[0]).to be_a(Whois::Parser::Contact) - expect(subject.registrant_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_REGISTRANT) - expect(subject.registrant_contacts[0].name).to eq("PRIVATE REGISTRANT") - expect(subject.registrant_contacts[0].organization).to eq("A HAPPY DREAMHOST CUSTOMER") - expect(subject.registrant_contacts[0].address).to eq("417 ASSOCIATED RD #324, C/O DREAMHOST.COM") - expect(subject.registrant_contacts[0].city).to eq("BREA") - expect(subject.registrant_contacts[0].zip).to eq("92821") - expect(subject.registrant_contacts[0].state).to eq("CA") - expect(subject.registrant_contacts[0].country_code).to eq("US") - expect(subject.registrant_contacts[0].phone).to eq("+1.7147064182") - expect(subject.registrant_contacts[0].fax).to eq("") - expect(subject.registrant_contacts[0].email).to eq("YW3GAZMC77BTMTF@PROXY.DREAMHOST.COM") - end - end - describe "#admin_contacts" do - it do - expect(subject.admin_contacts).to be_a(Array) - expect(subject.admin_contacts.size).to eq(1) - expect(subject.admin_contacts[0]).to be_a(Whois::Parser::Contact) - expect(subject.admin_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_ADMINISTRATIVE) - expect(subject.admin_contacts[0].name).to eq("PRIVATE REGISTRANT") - expect(subject.admin_contacts[0].organization).to eq("A HAPPY DREAMHOST CUSTOMER") - expect(subject.admin_contacts[0].address).to eq("417 ASSOCIATED RD #324, C/O DREAMHOST.COM") - expect(subject.admin_contacts[0].city).to eq("BREA") - expect(subject.admin_contacts[0].zip).to eq("92821") - expect(subject.admin_contacts[0].state).to eq("CA") - expect(subject.admin_contacts[0].country_code).to eq("US") - expect(subject.admin_contacts[0].phone).to eq("+1.7147064182") - expect(subject.admin_contacts[0].fax).to eq("") - expect(subject.admin_contacts[0].email).to eq("YW3GAZMC77BTMTF@PROXY.DREAMHOST.COM") - end - end - describe "#technical_contacts" do - it do - expect(subject.technical_contacts).to be_a(Array) - expect(subject.technical_contacts.size).to eq(1) - expect(subject.technical_contacts[0]).to be_a(Whois::Parser::Contact) - expect(subject.technical_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_TECHNICAL) - expect(subject.technical_contacts[0].name).to eq("PRIVATE REGISTRANT") - expect(subject.technical_contacts[0].organization).to eq("A HAPPY DREAMHOST CUSTOMER") - expect(subject.technical_contacts[0].address).to eq("417 ASSOCIATED RD #324, C/O DREAMHOST.COM") - expect(subject.technical_contacts[0].city).to eq("BREA") - expect(subject.technical_contacts[0].zip).to eq("92821") - expect(subject.technical_contacts[0].state).to eq("CA") - expect(subject.technical_contacts[0].country_code).to eq("US") - expect(subject.technical_contacts[0].phone).to eq("+1.7147064182") - expect(subject.technical_contacts[0].fax).to eq("") - expect(subject.technical_contacts[0].email).to eq("YW3GAZMC77BTMTF@PROXY.DREAMHOST.COM") - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers.size).to eq(3) - expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[0].name).to eq("ns1.dreamhost.com") - expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[1].name).to eq("ns2.dreamhost.com") - expect(subject.nameservers[2]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[2].name).to eq("ns3.dreamhost.com") - end + it "matches status_registered.expected" do + expect(subject.status).to eq(:registered) + expect(subject.available?).to eq(false) + expect(subject.registered?).to eq(true) + expect(subject.created_on).to be_a(Time) + expect(subject.created_on).to eq(DateTime.parse("1997-09-22 21:00:00 UTC")) + expect(subject.updated_on).to be_a(Time) + expect(subject.updated_on).to eq(DateTime.parse("2013-12-14 16:53:27 UTC")) + expect(subject.expires_on).to be_a(Time) + expect(subject.expires_on).to eq(DateTime.parse("2015-09-22 04:00:00 UTC")) + expect(subject.registrar).to be_a(Whois::Parser::Registrar) + expect(subject.registrar.id).to eq("431") + expect(subject.registrar.name).to eq("DREAMHOST") + expect(subject.registrar.url).to eq("www.dreamhost.com") + expect(subject.registrant_contacts).to be_a(Array) + expect(subject.registrant_contacts.size).to eq(1) + expect(subject.registrant_contacts[0]).to be_a(Whois::Parser::Contact) + expect(subject.registrant_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_REGISTRANT) + expect(subject.registrant_contacts[0].name).to eq("PRIVATE REGISTRANT") + expect(subject.registrant_contacts[0].organization).to eq("A HAPPY DREAMHOST CUSTOMER") + expect(subject.registrant_contacts[0].address).to eq("417 ASSOCIATED RD #324, C/O DREAMHOST.COM") + expect(subject.registrant_contacts[0].city).to eq("BREA") + expect(subject.registrant_contacts[0].zip).to eq("92821") + expect(subject.registrant_contacts[0].state).to eq("CA") + expect(subject.registrant_contacts[0].country_code).to eq("US") + expect(subject.registrant_contacts[0].phone).to eq("+1.7147064182") + expect(subject.registrant_contacts[0].fax).to eq("") + expect(subject.registrant_contacts[0].email).to eq("YW3GAZMC77BTMTF@PROXY.DREAMHOST.COM") + expect(subject.admin_contacts).to be_a(Array) + expect(subject.admin_contacts.size).to eq(1) + expect(subject.admin_contacts[0]).to be_a(Whois::Parser::Contact) + expect(subject.admin_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_ADMINISTRATIVE) + expect(subject.admin_contacts[0].name).to eq("PRIVATE REGISTRANT") + expect(subject.admin_contacts[0].organization).to eq("A HAPPY DREAMHOST CUSTOMER") + expect(subject.admin_contacts[0].address).to eq("417 ASSOCIATED RD #324, C/O DREAMHOST.COM") + expect(subject.admin_contacts[0].city).to eq("BREA") + expect(subject.admin_contacts[0].zip).to eq("92821") + expect(subject.admin_contacts[0].state).to eq("CA") + expect(subject.admin_contacts[0].country_code).to eq("US") + expect(subject.admin_contacts[0].phone).to eq("+1.7147064182") + expect(subject.admin_contacts[0].fax).to eq("") + expect(subject.admin_contacts[0].email).to eq("YW3GAZMC77BTMTF@PROXY.DREAMHOST.COM") + expect(subject.technical_contacts).to be_a(Array) + expect(subject.technical_contacts.size).to eq(1) + expect(subject.technical_contacts[0]).to be_a(Whois::Parser::Contact) + expect(subject.technical_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_TECHNICAL) + expect(subject.technical_contacts[0].name).to eq("PRIVATE REGISTRANT") + expect(subject.technical_contacts[0].organization).to eq("A HAPPY DREAMHOST CUSTOMER") + expect(subject.technical_contacts[0].address).to eq("417 ASSOCIATED RD #324, C/O DREAMHOST.COM") + expect(subject.technical_contacts[0].city).to eq("BREA") + expect(subject.technical_contacts[0].zip).to eq("92821") + expect(subject.technical_contacts[0].state).to eq("CA") + expect(subject.technical_contacts[0].country_code).to eq("US") + expect(subject.technical_contacts[0].phone).to eq("+1.7147064182") + expect(subject.technical_contacts[0].fax).to eq("") + expect(subject.technical_contacts[0].email).to eq("YW3GAZMC77BTMTF@PROXY.DREAMHOST.COM") + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers.size).to eq(3) + expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[0].name).to eq("ns1.dreamhost.com") + expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[1].name).to eq("ns2.dreamhost.com") + expect(subject.nameservers[2]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[2].name).to eq("ns3.dreamhost.com") end end diff --git a/spec/whois/parsers/responses/whois.educause.edu/edu/property_contact_registrant_spec.rb b/spec/whois/parsers/responses/whois.educause.edu/edu/property_contact_registrant_spec.rb index 0414f67c..97cfad0d 100644 --- a/spec/whois/parsers/responses/whois.educause.edu/edu/property_contact_registrant_spec.rb +++ b/spec/whois/parsers/responses/whois.educause.edu/edu/property_contact_registrant_spec.rb @@ -11,34 +11,31 @@ # require 'spec_helper' -require 'whois/parsers/whois.educause.edu.rb' -describe Whois::Parsers::WhoisEducauseEdu, "property_contact_registrant.expected" do +describe "whois.educause.edu", :aggregate_failures do subject do file = fixture("responses", "whois.educause.edu/edu/property_contact_registrant.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.educause.edu") + Whois::Parser.parser_for(part) end - describe "#registrant_contacts" do - it do - expect(subject.registrant_contacts).to be_a(Array) - expect(subject.registrant_contacts.size).to eq(1) - expect(subject.registrant_contacts[0]).to be_a(Whois::Parser::Contact) - expect(subject.registrant_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_REGISTRANT) - expect(subject.registrant_contacts[0].id).to eq(nil) - expect(subject.registrant_contacts[0].name).to eq(nil) - expect(subject.registrant_contacts[0].organization).to eq("North Idaho College") - expect(subject.registrant_contacts[0].address).to eq("1000 W. Garden Avenue") - expect(subject.registrant_contacts[0].city).to eq("Coeur d'Alene") - expect(subject.registrant_contacts[0].zip).to eq("83814") - expect(subject.registrant_contacts[0].state).to eq("ID") - expect(subject.registrant_contacts[0].country).to eq("UNITED STATES") - expect(subject.registrant_contacts[0].country_code).to eq(nil) - expect(subject.registrant_contacts[0].phone).to eq(nil) - expect(subject.registrant_contacts[0].fax).to eq(nil) - expect(subject.registrant_contacts[0].email).to eq(nil) - end + it "matches property_contact_registrant.expected" do + expect(subject.registrant_contacts).to be_a(Array) + expect(subject.registrant_contacts.size).to eq(1) + expect(subject.registrant_contacts[0]).to be_a(Whois::Parser::Contact) + expect(subject.registrant_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_REGISTRANT) + expect(subject.registrant_contacts[0].id).to eq(nil) + expect(subject.registrant_contacts[0].name).to eq(nil) + expect(subject.registrant_contacts[0].organization).to eq("North Idaho College") + expect(subject.registrant_contacts[0].address).to eq("1000 W. Garden Avenue") + expect(subject.registrant_contacts[0].city).to eq("Coeur d'Alene") + expect(subject.registrant_contacts[0].zip).to eq("83814") + expect(subject.registrant_contacts[0].state).to eq("ID") + expect(subject.registrant_contacts[0].country).to eq("UNITED STATES") + expect(subject.registrant_contacts[0].country_code).to eq(nil) + expect(subject.registrant_contacts[0].phone).to eq(nil) + expect(subject.registrant_contacts[0].fax).to eq(nil) + expect(subject.registrant_contacts[0].email).to eq(nil) end end diff --git a/spec/whois/parsers/responses/whois.educause.edu/edu/property_contact_registrant_with_additional_organization_spec.rb b/spec/whois/parsers/responses/whois.educause.edu/edu/property_contact_registrant_with_additional_organization_spec.rb index 9bfdeade..2da4a9d5 100644 --- a/spec/whois/parsers/responses/whois.educause.edu/edu/property_contact_registrant_with_additional_organization_spec.rb +++ b/spec/whois/parsers/responses/whois.educause.edu/edu/property_contact_registrant_with_additional_organization_spec.rb @@ -11,34 +11,31 @@ # require 'spec_helper' -require 'whois/parsers/whois.educause.edu.rb' -describe Whois::Parsers::WhoisEducauseEdu, "property_contact_registrant_with_additional_organization.expected" do +describe "whois.educause.edu", :aggregate_failures do subject do file = fixture("responses", "whois.educause.edu/edu/property_contact_registrant_with_additional_organization.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.educause.edu") + Whois::Parser.parser_for(part) end - describe "#registrant_contacts" do - it do - expect(subject.registrant_contacts).to be_a(Array) - expect(subject.registrant_contacts.size).to eq(1) - expect(subject.registrant_contacts[0]).to be_a(Whois::Parser::Contact) - expect(subject.registrant_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_REGISTRANT) - expect(subject.registrant_contacts[0].id).to eq(nil) - expect(subject.registrant_contacts[0].name).to eq(nil) - expect(subject.registrant_contacts[0].organization).to eq("Harvard University") - expect(subject.registrant_contacts[0].address).to eq("HUIT Network Services\n60 Oxford Street") - expect(subject.registrant_contacts[0].city).to eq("Cambridge") - expect(subject.registrant_contacts[0].zip).to eq("02138") - expect(subject.registrant_contacts[0].state).to eq("MA") - expect(subject.registrant_contacts[0].country).to eq("UNITED STATES") - expect(subject.registrant_contacts[0].country_code).to eq(nil) - expect(subject.registrant_contacts[0].phone).to eq(nil) - expect(subject.registrant_contacts[0].fax).to eq(nil) - expect(subject.registrant_contacts[0].email).to eq(nil) - end + it "matches property_contact_registrant_with_additional_organization.expected" do + expect(subject.registrant_contacts).to be_a(Array) + expect(subject.registrant_contacts.size).to eq(1) + expect(subject.registrant_contacts[0]).to be_a(Whois::Parser::Contact) + expect(subject.registrant_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_REGISTRANT) + expect(subject.registrant_contacts[0].id).to eq(nil) + expect(subject.registrant_contacts[0].name).to eq(nil) + expect(subject.registrant_contacts[0].organization).to eq("Harvard University") + expect(subject.registrant_contacts[0].address).to eq("HUIT Network Services\n60 Oxford Street") + expect(subject.registrant_contacts[0].city).to eq("Cambridge") + expect(subject.registrant_contacts[0].zip).to eq("02138") + expect(subject.registrant_contacts[0].state).to eq("MA") + expect(subject.registrant_contacts[0].country).to eq("UNITED STATES") + expect(subject.registrant_contacts[0].country_code).to eq(nil) + expect(subject.registrant_contacts[0].phone).to eq(nil) + expect(subject.registrant_contacts[0].fax).to eq(nil) + expect(subject.registrant_contacts[0].email).to eq(nil) end end diff --git a/spec/whois/parsers/responses/whois.educause.edu/edu/property_contact_registrant_without_address_spec.rb b/spec/whois/parsers/responses/whois.educause.edu/edu/property_contact_registrant_without_address_spec.rb index b6ad42f6..ff3ba37b 100644 --- a/spec/whois/parsers/responses/whois.educause.edu/edu/property_contact_registrant_without_address_spec.rb +++ b/spec/whois/parsers/responses/whois.educause.edu/edu/property_contact_registrant_without_address_spec.rb @@ -11,34 +11,31 @@ # require 'spec_helper' -require 'whois/parsers/whois.educause.edu.rb' -describe Whois::Parsers::WhoisEducauseEdu, "property_contact_registrant_without_address.expected" do +describe "whois.educause.edu", :aggregate_failures do subject do file = fixture("responses", "whois.educause.edu/edu/property_contact_registrant_without_address.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.educause.edu") + Whois::Parser.parser_for(part) end - describe "#registrant_contacts" do - it do - expect(subject.registrant_contacts).to be_a(Array) - expect(subject.registrant_contacts.size).to eq(1) - expect(subject.registrant_contacts[0]).to be_a(Whois::Parser::Contact) - expect(subject.registrant_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_REGISTRANT) - expect(subject.registrant_contacts[0].id).to eq(nil) - expect(subject.registrant_contacts[0].name).to eq(nil) - expect(subject.registrant_contacts[0].organization).to eq("Massachusetts Institute of Technology") - expect(subject.registrant_contacts[0].address).to eq(nil) - expect(subject.registrant_contacts[0].city).to eq("Cambridge") - expect(subject.registrant_contacts[0].zip).to eq("02139") - expect(subject.registrant_contacts[0].state).to eq("MA") - expect(subject.registrant_contacts[0].country).to eq("UNITED STATES") - expect(subject.registrant_contacts[0].country_code).to eq(nil) - expect(subject.registrant_contacts[0].phone).to eq(nil) - expect(subject.registrant_contacts[0].fax).to eq(nil) - expect(subject.registrant_contacts[0].email).to eq(nil) - end + it "matches property_contact_registrant_without_address.expected" do + expect(subject.registrant_contacts).to be_a(Array) + expect(subject.registrant_contacts.size).to eq(1) + expect(subject.registrant_contacts[0]).to be_a(Whois::Parser::Contact) + expect(subject.registrant_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_REGISTRANT) + expect(subject.registrant_contacts[0].id).to eq(nil) + expect(subject.registrant_contacts[0].name).to eq(nil) + expect(subject.registrant_contacts[0].organization).to eq("Massachusetts Institute of Technology") + expect(subject.registrant_contacts[0].address).to eq(nil) + expect(subject.registrant_contacts[0].city).to eq("Cambridge") + expect(subject.registrant_contacts[0].zip).to eq("02139") + expect(subject.registrant_contacts[0].state).to eq("MA") + expect(subject.registrant_contacts[0].country).to eq("UNITED STATES") + expect(subject.registrant_contacts[0].country_code).to eq(nil) + expect(subject.registrant_contacts[0].phone).to eq(nil) + expect(subject.registrant_contacts[0].fax).to eq(nil) + expect(subject.registrant_contacts[0].email).to eq(nil) end end diff --git a/spec/whois/parsers/responses/whois.educause.edu/edu/property_contact_registrant_without_zip_spec.rb b/spec/whois/parsers/responses/whois.educause.edu/edu/property_contact_registrant_without_zip_spec.rb index fe09d796..cc04e1bc 100644 --- a/spec/whois/parsers/responses/whois.educause.edu/edu/property_contact_registrant_without_zip_spec.rb +++ b/spec/whois/parsers/responses/whois.educause.edu/edu/property_contact_registrant_without_zip_spec.rb @@ -11,34 +11,31 @@ # require 'spec_helper' -require 'whois/parsers/whois.educause.edu.rb' -describe Whois::Parsers::WhoisEducauseEdu, "property_contact_registrant_without_zip.expected" do +describe "whois.educause.edu", :aggregate_failures do subject do file = fixture("responses", "whois.educause.edu/edu/property_contact_registrant_without_zip.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.educause.edu") + Whois::Parser.parser_for(part) end - describe "#registrant_contacts" do - it do - expect(subject.registrant_contacts).to be_a(Array) - expect(subject.registrant_contacts.size).to eq(1) - expect(subject.registrant_contacts[0]).to be_a(Whois::Parser::Contact) - expect(subject.registrant_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_REGISTRANT) - expect(subject.registrant_contacts[0].id).to eq(nil) - expect(subject.registrant_contacts[0].name).to eq(nil) - expect(subject.registrant_contacts[0].organization).to eq("The American University of the Caribbean School of Medicine") - expect(subject.registrant_contacts[0].address).to eq("c/o Campbell Corporate Services, Ltd.\nScotiabank Building, P. O. Box 268") - expect(subject.registrant_contacts[0].city).to eq("Grand Cayman") - expect(subject.registrant_contacts[0].zip).to eq(nil) - expect(subject.registrant_contacts[0].state).to eq(nil) - expect(subject.registrant_contacts[0].country).to eq("CAYMAN ISLANDS") - expect(subject.registrant_contacts[0].country_code).to eq(nil) - expect(subject.registrant_contacts[0].phone).to eq(nil) - expect(subject.registrant_contacts[0].fax).to eq(nil) - expect(subject.registrant_contacts[0].email).to eq(nil) - end + it "matches property_contact_registrant_without_zip.expected" do + expect(subject.registrant_contacts).to be_a(Array) + expect(subject.registrant_contacts.size).to eq(1) + expect(subject.registrant_contacts[0]).to be_a(Whois::Parser::Contact) + expect(subject.registrant_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_REGISTRANT) + expect(subject.registrant_contacts[0].id).to eq(nil) + expect(subject.registrant_contacts[0].name).to eq(nil) + expect(subject.registrant_contacts[0].organization).to eq("The American University of the Caribbean School of Medicine") + expect(subject.registrant_contacts[0].address).to eq("c/o Campbell Corporate Services, Ltd.\nScotiabank Building, P. O. Box 268") + expect(subject.registrant_contacts[0].city).to eq("Grand Cayman") + expect(subject.registrant_contacts[0].zip).to eq(nil) + expect(subject.registrant_contacts[0].state).to eq(nil) + expect(subject.registrant_contacts[0].country).to eq("CAYMAN ISLANDS") + expect(subject.registrant_contacts[0].country_code).to eq(nil) + expect(subject.registrant_contacts[0].phone).to eq(nil) + expect(subject.registrant_contacts[0].fax).to eq(nil) + expect(subject.registrant_contacts[0].email).to eq(nil) end end diff --git a/spec/whois/parsers/responses/whois.educause.edu/edu/property_contacts_case1_spec.rb b/spec/whois/parsers/responses/whois.educause.edu/edu/property_contacts_case1_spec.rb index 6497b828..39bc87f3 100644 --- a/spec/whois/parsers/responses/whois.educause.edu/edu/property_contacts_case1_spec.rb +++ b/spec/whois/parsers/responses/whois.educause.edu/edu/property_contacts_case1_spec.rb @@ -11,33 +11,30 @@ # require 'spec_helper' -require 'whois/parsers/whois.educause.edu.rb' -describe Whois::Parsers::WhoisEducauseEdu, "property_contacts_case1.expected" do +describe "whois.educause.edu", :aggregate_failures do subject do file = fixture("responses", "whois.educause.edu/edu/property_contacts_case1.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.educause.edu") + Whois::Parser.parser_for(part) end - describe "#technical_contacts" do - it do - expect(subject.technical_contacts).to be_a(Array) - expect(subject.technical_contacts.size).to eq(1) - expect(subject.technical_contacts[0]).to be_a(Whois::Parser::Contact) - expect(subject.technical_contacts[0].id).to eq(nil) - expect(subject.technical_contacts[0].name).to eq("Information Technology\nEDUCAUSE") - expect(subject.technical_contacts[0].organization).to eq(nil) - expect(subject.technical_contacts[0].address).to eq("4772 Walnut Street\nSte 206") - expect(subject.technical_contacts[0].city).to eq("Boulder") - expect(subject.technical_contacts[0].zip).to eq("80301") - expect(subject.technical_contacts[0].state).to eq("CO") - expect(subject.technical_contacts[0].country).to eq("UNITED STATES") - expect(subject.technical_contacts[0].country_code).to eq(nil) - expect(subject.technical_contacts[0].phone).to eq("(303) 449-4430") - expect(subject.technical_contacts[0].fax).to eq(nil) - expect(subject.technical_contacts[0].email).to eq("netadmin@educause.edu") - end + it "matches property_contacts_case1.expected" do + expect(subject.technical_contacts).to be_a(Array) + expect(subject.technical_contacts.size).to eq(1) + expect(subject.technical_contacts[0]).to be_a(Whois::Parser::Contact) + expect(subject.technical_contacts[0].id).to eq(nil) + expect(subject.technical_contacts[0].name).to eq("Information Technology\nEDUCAUSE") + expect(subject.technical_contacts[0].organization).to eq(nil) + expect(subject.technical_contacts[0].address).to eq("4772 Walnut Street\nSte 206") + expect(subject.technical_contacts[0].city).to eq("Boulder") + expect(subject.technical_contacts[0].zip).to eq("80301") + expect(subject.technical_contacts[0].state).to eq("CO") + expect(subject.technical_contacts[0].country).to eq("UNITED STATES") + expect(subject.technical_contacts[0].country_code).to eq(nil) + expect(subject.technical_contacts[0].phone).to eq("(303) 449-4430") + expect(subject.technical_contacts[0].fax).to eq(nil) + expect(subject.technical_contacts[0].email).to eq("netadmin@educause.edu") end end diff --git a/spec/whois/parsers/responses/whois.educause.edu/edu/property_contacts_case2_spec.rb b/spec/whois/parsers/responses/whois.educause.edu/edu/property_contacts_case2_spec.rb index e954297b..7aba1d65 100644 --- a/spec/whois/parsers/responses/whois.educause.edu/edu/property_contacts_case2_spec.rb +++ b/spec/whois/parsers/responses/whois.educause.edu/edu/property_contacts_case2_spec.rb @@ -11,33 +11,30 @@ # require 'spec_helper' -require 'whois/parsers/whois.educause.edu.rb' -describe Whois::Parsers::WhoisEducauseEdu, "property_contacts_case2.expected" do +describe "whois.educause.edu", :aggregate_failures do subject do file = fixture("responses", "whois.educause.edu/edu/property_contacts_case2.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.educause.edu") + Whois::Parser.parser_for(part) end - describe "#technical_contacts" do - it do - expect(subject.technical_contacts).to be_a(Array) - expect(subject.technical_contacts.size).to eq(1) - expect(subject.technical_contacts[0]).to be_a(Whois::Parser::Contact) - expect(subject.technical_contacts[0].id).to eq(nil) - expect(subject.technical_contacts[0].name).to eq("Domain Admin\nStanford University") - expect(subject.technical_contacts[0].organization).to eq(nil) - expect(subject.technical_contacts[0].address).to eq("241 Panama Street Pine Hall, Room 115") - expect(subject.technical_contacts[0].city).to eq("Stanford") - expect(subject.technical_contacts[0].zip).to eq("94305-4122") - expect(subject.technical_contacts[0].state).to eq("CA") - expect(subject.technical_contacts[0].country).to eq("UNITED STATES") - expect(subject.technical_contacts[0].country_code).to eq(nil) - expect(subject.technical_contacts[0].phone).to eq("(650) 723-4328") - expect(subject.technical_contacts[0].fax).to eq(nil) - expect(subject.technical_contacts[0].email).to eq("sunet-admin@stanford.edu") - end + it "matches property_contacts_case2.expected" do + expect(subject.technical_contacts).to be_a(Array) + expect(subject.technical_contacts.size).to eq(1) + expect(subject.technical_contacts[0]).to be_a(Whois::Parser::Contact) + expect(subject.technical_contacts[0].id).to eq(nil) + expect(subject.technical_contacts[0].name).to eq("Domain Admin\nStanford University") + expect(subject.technical_contacts[0].organization).to eq(nil) + expect(subject.technical_contacts[0].address).to eq("241 Panama Street Pine Hall, Room 115") + expect(subject.technical_contacts[0].city).to eq("Stanford") + expect(subject.technical_contacts[0].zip).to eq("94305-4122") + expect(subject.technical_contacts[0].state).to eq("CA") + expect(subject.technical_contacts[0].country).to eq("UNITED STATES") + expect(subject.technical_contacts[0].country_code).to eq(nil) + expect(subject.technical_contacts[0].phone).to eq("(650) 723-4328") + expect(subject.technical_contacts[0].fax).to eq(nil) + expect(subject.technical_contacts[0].email).to eq("sunet-admin@stanford.edu") end end diff --git a/spec/whois/parsers/responses/whois.educause.edu/edu/property_contacts_case3_spec.rb b/spec/whois/parsers/responses/whois.educause.edu/edu/property_contacts_case3_spec.rb index cc7c716f..bf376306 100644 --- a/spec/whois/parsers/responses/whois.educause.edu/edu/property_contacts_case3_spec.rb +++ b/spec/whois/parsers/responses/whois.educause.edu/edu/property_contacts_case3_spec.rb @@ -11,33 +11,30 @@ # require 'spec_helper' -require 'whois/parsers/whois.educause.edu.rb' -describe Whois::Parsers::WhoisEducauseEdu, "property_contacts_case3.expected" do +describe "whois.educause.edu", :aggregate_failures do subject do file = fixture("responses", "whois.educause.edu/edu/property_contacts_case3.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.educause.edu") + Whois::Parser.parser_for(part) end - describe "#admin_contacts" do - it do - expect(subject.admin_contacts).to be_a(Array) - expect(subject.admin_contacts.size).to eq(1) - expect(subject.admin_contacts[0]).to be_a(Whois::Parser::Contact) - expect(subject.admin_contacts[0].id).to eq(nil) - expect(subject.admin_contacts[0].name).to eq("Tracy L. Smith\nUniversity of Illinois at Urbana-Champaign\nCITES 2105 Digital Computer Laboratory") - expect(subject.admin_contacts[0].organization).to eq(nil) - expect(subject.admin_contacts[0].address).to eq("1304 West Springfield Avenue") - expect(subject.admin_contacts[0].city).to eq("Urbana") - expect(subject.admin_contacts[0].zip).to eq("61801-4399") - expect(subject.admin_contacts[0].state).to eq("IL") - expect(subject.admin_contacts[0].country).to eq("UNITED STATES") - expect(subject.admin_contacts[0].country_code).to eq(nil) - expect(subject.admin_contacts[0].phone).to eq("(217) 244-2032") - expect(subject.admin_contacts[0].fax).to eq(nil) - expect(subject.admin_contacts[0].email).to eq("edu-admin@listserv.illinois.edu") - end + it "matches property_contacts_case3.expected" do + expect(subject.admin_contacts).to be_a(Array) + expect(subject.admin_contacts.size).to eq(1) + expect(subject.admin_contacts[0]).to be_a(Whois::Parser::Contact) + expect(subject.admin_contacts[0].id).to eq(nil) + expect(subject.admin_contacts[0].name).to eq("Tracy L. Smith\nUniversity of Illinois at Urbana-Champaign\nCITES 2105 Digital Computer Laboratory") + expect(subject.admin_contacts[0].organization).to eq(nil) + expect(subject.admin_contacts[0].address).to eq("1304 West Springfield Avenue") + expect(subject.admin_contacts[0].city).to eq("Urbana") + expect(subject.admin_contacts[0].zip).to eq("61801-4399") + expect(subject.admin_contacts[0].state).to eq("IL") + expect(subject.admin_contacts[0].country).to eq("UNITED STATES") + expect(subject.admin_contacts[0].country_code).to eq(nil) + expect(subject.admin_contacts[0].phone).to eq("(217) 244-2032") + expect(subject.admin_contacts[0].fax).to eq(nil) + expect(subject.admin_contacts[0].email).to eq("edu-admin@listserv.illinois.edu") end end diff --git a/spec/whois/parsers/responses/whois.educause.edu/edu/property_contacts_case4_spec.rb b/spec/whois/parsers/responses/whois.educause.edu/edu/property_contacts_case4_spec.rb index 4bc26e27..e63f6dd3 100644 --- a/spec/whois/parsers/responses/whois.educause.edu/edu/property_contacts_case4_spec.rb +++ b/spec/whois/parsers/responses/whois.educause.edu/edu/property_contacts_case4_spec.rb @@ -11,33 +11,30 @@ # require 'spec_helper' -require 'whois/parsers/whois.educause.edu.rb' -describe Whois::Parsers::WhoisEducauseEdu, "property_contacts_case4.expected" do +describe "whois.educause.edu", :aggregate_failures do subject do file = fixture("responses", "whois.educause.edu/edu/property_contacts_case4.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.educause.edu") + Whois::Parser.parser_for(part) end - describe "#admin_contacts" do - it do - expect(subject.admin_contacts).to be_a(Array) - expect(subject.admin_contacts.size).to eq(1) - expect(subject.admin_contacts[0]).to be_a(Whois::Parser::Contact) - expect(subject.admin_contacts[0].id).to eq(nil) - expect(subject.admin_contacts[0].name).to eq("ITS Business Office\nSyracuse University\nInformation Technology and Services\nCenter for Science and Technology") - expect(subject.admin_contacts[0].organization).to eq(nil) - expect(subject.admin_contacts[0].address).to eq(nil) - expect(subject.admin_contacts[0].city).to eq("Syracuse") - expect(subject.admin_contacts[0].zip).to eq("13244") - expect(subject.admin_contacts[0].state).to eq("NY") - expect(subject.admin_contacts[0].country).to eq("UNITED STATES") - expect(subject.admin_contacts[0].country_code).to eq(nil) - expect(subject.admin_contacts[0].phone).to eq("(315) 443-6189") - expect(subject.admin_contacts[0].fax).to eq(nil) - expect(subject.admin_contacts[0].email).to eq("itsoffice@syr.edu") - end + it "matches property_contacts_case4.expected" do + expect(subject.admin_contacts).to be_a(Array) + expect(subject.admin_contacts.size).to eq(1) + expect(subject.admin_contacts[0]).to be_a(Whois::Parser::Contact) + expect(subject.admin_contacts[0].id).to eq(nil) + expect(subject.admin_contacts[0].name).to eq("ITS Business Office\nSyracuse University\nInformation Technology and Services\nCenter for Science and Technology") + expect(subject.admin_contacts[0].organization).to eq(nil) + expect(subject.admin_contacts[0].address).to eq(nil) + expect(subject.admin_contacts[0].city).to eq("Syracuse") + expect(subject.admin_contacts[0].zip).to eq("13244") + expect(subject.admin_contacts[0].state).to eq("NY") + expect(subject.admin_contacts[0].country).to eq("UNITED STATES") + expect(subject.admin_contacts[0].country_code).to eq(nil) + expect(subject.admin_contacts[0].phone).to eq("(315) 443-6189") + expect(subject.admin_contacts[0].fax).to eq(nil) + expect(subject.admin_contacts[0].email).to eq("itsoffice@syr.edu") end end diff --git a/spec/whois/parsers/responses/whois.educause.edu/edu/property_contacts_spec.rb b/spec/whois/parsers/responses/whois.educause.edu/edu/property_contacts_spec.rb index 0e215db7..2e3cd836 100644 --- a/spec/whois/parsers/responses/whois.educause.edu/edu/property_contacts_spec.rb +++ b/spec/whois/parsers/responses/whois.educause.edu/edu/property_contacts_spec.rb @@ -11,33 +11,30 @@ # require 'spec_helper' -require 'whois/parsers/whois.educause.edu.rb' -describe Whois::Parsers::WhoisEducauseEdu, "property_contacts.expected" do +describe "whois.educause.edu", :aggregate_failures do subject do file = fixture("responses", "whois.educause.edu/edu/property_contacts.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.educause.edu") + Whois::Parser.parser_for(part) end - describe "#technical_contacts" do - it do - expect(subject.technical_contacts).to be_a(Array) - expect(subject.technical_contacts.size).to eq(1) - expect(subject.technical_contacts[0]).to be_a(Whois::Parser::Contact) - expect(subject.technical_contacts[0].id).to eq(nil) - expect(subject.technical_contacts[0].name).to eq("Dennis L Noordam\nWindows System Administrator\nNorth Idaho College") - expect(subject.technical_contacts[0].organization).to eq(nil) - expect(subject.technical_contacts[0].address).to eq("1000 W. Garden Avenue") - expect(subject.technical_contacts[0].city).to eq("Coeur d Alene") - expect(subject.technical_contacts[0].zip).to eq("83814") - expect(subject.technical_contacts[0].state).to eq("ID") - expect(subject.technical_contacts[0].country).to eq("UNITED STATES") - expect(subject.technical_contacts[0].country_code).to eq(nil) - expect(subject.technical_contacts[0].phone).to eq("(208) 769-7860") - expect(subject.technical_contacts[0].fax).to eq(nil) - expect(subject.technical_contacts[0].email).to eq("dlnoordam@nic.edu") - end + it "matches property_contacts.expected" do + expect(subject.technical_contacts).to be_a(Array) + expect(subject.technical_contacts.size).to eq(1) + expect(subject.technical_contacts[0]).to be_a(Whois::Parser::Contact) + expect(subject.technical_contacts[0].id).to eq(nil) + expect(subject.technical_contacts[0].name).to eq("Dennis L Noordam\nWindows System Administrator\nNorth Idaho College") + expect(subject.technical_contacts[0].organization).to eq(nil) + expect(subject.technical_contacts[0].address).to eq("1000 W. Garden Avenue") + expect(subject.technical_contacts[0].city).to eq("Coeur d Alene") + expect(subject.technical_contacts[0].zip).to eq("83814") + expect(subject.technical_contacts[0].state).to eq("ID") + expect(subject.technical_contacts[0].country).to eq("UNITED STATES") + expect(subject.technical_contacts[0].country_code).to eq(nil) + expect(subject.technical_contacts[0].phone).to eq("(208) 769-7860") + expect(subject.technical_contacts[0].fax).to eq(nil) + expect(subject.technical_contacts[0].email).to eq("dlnoordam@nic.edu") end end diff --git a/spec/whois/parsers/responses/whois.educause.edu/edu/property_updated_on_unknown_spec.rb b/spec/whois/parsers/responses/whois.educause.edu/edu/property_updated_on_unknown_spec.rb index 0e8997a3..71896c52 100644 --- a/spec/whois/parsers/responses/whois.educause.edu/edu/property_updated_on_unknown_spec.rb +++ b/spec/whois/parsers/responses/whois.educause.edu/edu/property_updated_on_unknown_spec.rb @@ -11,19 +11,16 @@ # require 'spec_helper' -require 'whois/parsers/whois.educause.edu.rb' -describe Whois::Parsers::WhoisEducauseEdu, "property_updated_on_unknown.expected" do +describe "whois.educause.edu", :aggregate_failures do subject do file = fixture("responses", "whois.educause.edu/edu/property_updated_on_unknown.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.educause.edu") + Whois::Parser.parser_for(part) end - describe "#updated_on" do - it do - expect(subject.updated_on).to eq(nil) - end + it "matches property_updated_on_unknown.expected" do + expect(subject.updated_on).to eq(nil) end end diff --git a/spec/whois/parsers/responses/whois.educause.edu/edu/status_available_spec.rb b/spec/whois/parsers/responses/whois.educause.edu/edu/status_available_spec.rb index 52582566..050cf096 100644 --- a/spec/whois/parsers/responses/whois.educause.edu/edu/status_available_spec.rb +++ b/spec/whois/parsers/responses/whois.educause.edu/edu/status_available_spec.rb @@ -11,88 +11,33 @@ # require 'spec_helper' -require 'whois/parsers/whois.educause.edu.rb' -describe Whois::Parsers::WhoisEducauseEdu, "status_available.expected" do +describe "whois.educause.edu", :aggregate_failures do subject do file = fixture("responses", "whois.educause.edu/edu/status_available.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.educause.edu") + Whois::Parser.parser_for(part) end - describe "#disclaimer" do - it do - expect(subject.disclaimer).to eq("\nThis Registry database contains ONLY .EDU domains. \nThe data in the EDUCAUSE Whois database is provided \nby EDUCAUSE for information purposes in order to \nassist in the process of obtaining information about \nor related to .edu domain registration records. \n\nThe EDUCAUSE Whois database is authoritative for the \n.EDU domain. \n\nA Web interface for the .EDU EDUCAUSE Whois Server is \navailable at: http://whois.educause.net \n\nBy submitting a Whois query, you agree that this information \nwill not be used to allow, enable, or otherwise support \nthe transmission of unsolicited commercial advertising or \nsolicitations via e-mail. The use of electronic processes to \nharvest information from this server is generally prohibited \nexcept as reasonably necessary to register or modify .edu \ndomain names.\n\nYou may use \"%\" as a wildcard in your search. For further \ninformation regarding the use of this WHOIS server, please \ntype: help \n") - end - end - describe "#domain" do - it do - expect(subject.domain).to eq(nil) - end - end - describe "#domain_id" do - it do - expect { subject.domain_id }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#status" do - it do - expect(subject.status).to eq(:available) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(true) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(false) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to eq(nil) - end - end - describe "#updated_on" do - it do - expect(subject.updated_on).to eq(nil) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to eq(nil) - end - end - describe "#registrar" do - it do - expect { subject.registrar }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#registrant_contacts" do - it do - expect(subject.registrant_contacts).to be_a(Array) - expect(subject.registrant_contacts).to eq([]) - end - end - describe "#admin_contacts" do - it do - expect(subject.admin_contacts).to be_a(Array) - expect(subject.admin_contacts).to eq([]) - end - end - describe "#technical_contacts" do - it do - expect(subject.technical_contacts).to be_a(Array) - expect(subject.technical_contacts).to eq([]) - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers).to eq([]) - end + it "matches status_available.expected" do + expect(subject.disclaimer).to eq("\nThis Registry database contains ONLY .EDU domains. \nThe data in the EDUCAUSE Whois database is provided \nby EDUCAUSE for information purposes in order to \nassist in the process of obtaining information about \nor related to .edu domain registration records. \n\nThe EDUCAUSE Whois database is authoritative for the \n.EDU domain. \n\nA Web interface for the .EDU EDUCAUSE Whois Server is \navailable at: http://whois.educause.net \n\nBy submitting a Whois query, you agree that this information \nwill not be used to allow, enable, or otherwise support \nthe transmission of unsolicited commercial advertising or \nsolicitations via e-mail. The use of electronic processes to \nharvest information from this server is generally prohibited \nexcept as reasonably necessary to register or modify .edu \ndomain names.\n\nYou may use \"%\" as a wildcard in your search. For further \ninformation regarding the use of this WHOIS server, please \ntype: help \n") + expect(subject.domain).to eq(nil) + expect { subject.domain_id }.to raise_error(Whois::AttributeNotSupported) + expect(subject.status).to eq(:available) + expect(subject.available?).to eq(true) + expect(subject.registered?).to eq(false) + expect(subject.created_on).to eq(nil) + expect(subject.updated_on).to eq(nil) + expect(subject.expires_on).to eq(nil) + expect { subject.registrar }.to raise_error(Whois::AttributeNotSupported) + expect(subject.registrant_contacts).to be_a(Array) + expect(subject.registrant_contacts).to eq([]) + expect(subject.admin_contacts).to be_a(Array) + expect(subject.admin_contacts).to eq([]) + expect(subject.technical_contacts).to be_a(Array) + expect(subject.technical_contacts).to eq([]) + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers).to eq([]) end end diff --git a/spec/whois/parsers/responses/whois.educause.edu/edu/status_registered_spec.rb b/spec/whois/parsers/responses/whois.educause.edu/edu/status_registered_spec.rb index c5a1595f..8deed14c 100644 --- a/spec/whois/parsers/responses/whois.educause.edu/edu/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.educause.edu/edu/status_registered_spec.rb @@ -11,141 +11,86 @@ # require 'spec_helper' -require 'whois/parsers/whois.educause.edu.rb' -describe Whois::Parsers::WhoisEducauseEdu, "status_registered.expected" do +describe "whois.educause.edu", :aggregate_failures do subject do file = fixture("responses", "whois.educause.edu/edu/status_registered.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.educause.edu") + Whois::Parser.parser_for(part) end - describe "#disclaimer" do - it do - expect(subject.disclaimer).to eq("\nThis Registry database contains ONLY .EDU domains. \nThe data in the EDUCAUSE Whois database is provided \nby EDUCAUSE for information purposes in order to \nassist in the process of obtaining information about \nor related to .edu domain registration records. \n\nThe EDUCAUSE Whois database is authoritative for the \n.EDU domain. \n\nA Web interface for the .EDU EDUCAUSE Whois Server is \navailable at: http://whois.educause.net \n\nBy submitting a Whois query, you agree that this information \nwill not be used to allow, enable, or otherwise support \nthe transmission of unsolicited commercial advertising or \nsolicitations via e-mail. The use of electronic processes to \nharvest information from this server is generally prohibited \nexcept as reasonably necessary to register or modify .edu \ndomain names.\n\nYou may use \"%\" as a wildcard in your search. For further \ninformation regarding the use of this WHOIS server, please \ntype: help \n") - end - end - describe "#domain" do - it do - expect(subject.domain).to eq("academia.edu") - end - end - describe "#domain_id" do - it do - expect { subject.domain_id }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#status" do - it do - expect(subject.status).to eq(:registered) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(false) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(true) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to be_a(Time) - expect(subject.created_on).to eq(DateTime.parse("1999-05-10")) - end - end - describe "#updated_on" do - it do - expect(subject.updated_on).to be_a(Time) - expect(subject.updated_on).to eq(DateTime.parse("2012-04-04")) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to be_a(Time) - expect(subject.expires_on).to eq(DateTime.parse("2014-07-31")) - end - end - describe "#registrar" do - it do - expect { subject.registrar }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#registrant_contacts" do - it do - expect(subject.registrant_contacts).to be_a(Array) - expect(subject.registrant_contacts.size).to eq(1) - expect(subject.registrant_contacts[0]).to be_a(Whois::Parser::Contact) - expect(subject.registrant_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_REGISTRANT) - expect(subject.registrant_contacts[0].id).to eq(nil) - expect(subject.registrant_contacts[0].name).to eq(nil) - expect(subject.registrant_contacts[0].organization).to eq("Academia") - expect(subject.registrant_contacts[0].address).to eq("251 Kearny St\nsuite 520") - expect(subject.registrant_contacts[0].city).to eq("San Francisco") - expect(subject.registrant_contacts[0].zip).to eq("94108") - expect(subject.registrant_contacts[0].state).to eq("CA") - expect(subject.registrant_contacts[0].country).to eq("UNITED STATES") - expect(subject.registrant_contacts[0].country_code).to eq(nil) - expect(subject.registrant_contacts[0].phone).to eq(nil) - expect(subject.registrant_contacts[0].fax).to eq(nil) - expect(subject.registrant_contacts[0].email).to eq(nil) - end - end - describe "#admin_contacts" do - it do - expect(subject.admin_contacts).to be_a(Array) - expect(subject.admin_contacts.size).to eq(1) - expect(subject.admin_contacts[0]).to be_a(Whois::Parser::Contact) - expect(subject.admin_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_ADMINISTRATIVE) - expect(subject.admin_contacts[0].id).to eq(nil) - expect(subject.admin_contacts[0].name).to eq("Academia, Inc.") - expect(subject.admin_contacts[0].organization).to eq(nil) - expect(subject.admin_contacts[0].address).to eq("251 Kearny St\nsuite 520") - expect(subject.admin_contacts[0].city).to eq("San Francisco") - expect(subject.admin_contacts[0].zip).to eq("94108") - expect(subject.admin_contacts[0].state).to eq("CA") - expect(subject.admin_contacts[0].country).to eq("UNITED STATES") - expect(subject.admin_contacts[0].country_code).to eq(nil) - expect(subject.admin_contacts[0].phone).to eq("(415) 829-2341") - expect(subject.admin_contacts[0].fax).to eq(nil) - expect(subject.admin_contacts[0].email).to eq("helpdesk@academia.edu") - end - end - describe "#technical_contacts" do - it do - expect(subject.technical_contacts).to be_a(Array) - expect(subject.technical_contacts.size).to eq(1) - expect(subject.technical_contacts[0]).to be_a(Whois::Parser::Contact) - expect(subject.technical_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_TECHNICAL) - expect(subject.technical_contacts[0].id).to eq(nil) - expect(subject.technical_contacts[0].name).to eq("Academia, Inc.") - expect(subject.technical_contacts[0].organization).to eq(nil) - expect(subject.technical_contacts[0].address).to eq("251 Kearny St\nsuite 520") - expect(subject.technical_contacts[0].city).to eq("San Francisco") - expect(subject.technical_contacts[0].zip).to eq("94108") - expect(subject.technical_contacts[0].state).to eq("CA") - expect(subject.technical_contacts[0].country).to eq("UNITED STATES") - expect(subject.technical_contacts[0].country_code).to eq(nil) - expect(subject.technical_contacts[0].phone).to eq("(415) 829-2341") - expect(subject.technical_contacts[0].fax).to eq(nil) - expect(subject.technical_contacts[0].email).to eq("helpdesk@academia.edu") - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers.size).to eq(4) - expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[0].name).to eq("ns-1484.awsdns-57.org") - expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[1].name).to eq("ns-225.awsdns-28.com") - expect(subject.nameservers[2]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[2].name).to eq("ns-1850.awsdns-39.co.uk") - expect(subject.nameservers[3]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[3].name).to eq("ns-629.awsdns-14.net") - end + it "matches status_registered.expected" do + expect(subject.disclaimer).to eq("\nThis Registry database contains ONLY .EDU domains. \nThe data in the EDUCAUSE Whois database is provided \nby EDUCAUSE for information purposes in order to \nassist in the process of obtaining information about \nor related to .edu domain registration records. \n\nThe EDUCAUSE Whois database is authoritative for the \n.EDU domain. \n\nA Web interface for the .EDU EDUCAUSE Whois Server is \navailable at: http://whois.educause.net \n\nBy submitting a Whois query, you agree that this information \nwill not be used to allow, enable, or otherwise support \nthe transmission of unsolicited commercial advertising or \nsolicitations via e-mail. The use of electronic processes to \nharvest information from this server is generally prohibited \nexcept as reasonably necessary to register or modify .edu \ndomain names.\n\nYou may use \"%\" as a wildcard in your search. For further \ninformation regarding the use of this WHOIS server, please \ntype: help \n") + expect(subject.domain).to eq("academia.edu") + expect { subject.domain_id }.to raise_error(Whois::AttributeNotSupported) + expect(subject.status).to eq(:registered) + expect(subject.available?).to eq(false) + expect(subject.registered?).to eq(true) + expect(subject.created_on).to be_a(Time) + expect(subject.created_on).to eq(DateTime.parse("1999-05-10")) + expect(subject.updated_on).to be_a(Time) + expect(subject.updated_on).to eq(DateTime.parse("2012-04-04")) + expect(subject.expires_on).to be_a(Time) + expect(subject.expires_on).to eq(DateTime.parse("2014-07-31")) + expect { subject.registrar }.to raise_error(Whois::AttributeNotSupported) + expect(subject.registrant_contacts).to be_a(Array) + expect(subject.registrant_contacts.size).to eq(1) + expect(subject.registrant_contacts[0]).to be_a(Whois::Parser::Contact) + expect(subject.registrant_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_REGISTRANT) + expect(subject.registrant_contacts[0].id).to eq(nil) + expect(subject.registrant_contacts[0].name).to eq(nil) + expect(subject.registrant_contacts[0].organization).to eq("Academia") + expect(subject.registrant_contacts[0].address).to eq("251 Kearny St\nsuite 520") + expect(subject.registrant_contacts[0].city).to eq("San Francisco") + expect(subject.registrant_contacts[0].zip).to eq("94108") + expect(subject.registrant_contacts[0].state).to eq("CA") + expect(subject.registrant_contacts[0].country).to eq("UNITED STATES") + expect(subject.registrant_contacts[0].country_code).to eq(nil) + expect(subject.registrant_contacts[0].phone).to eq(nil) + expect(subject.registrant_contacts[0].fax).to eq(nil) + expect(subject.registrant_contacts[0].email).to eq(nil) + expect(subject.admin_contacts).to be_a(Array) + expect(subject.admin_contacts.size).to eq(1) + expect(subject.admin_contacts[0]).to be_a(Whois::Parser::Contact) + expect(subject.admin_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_ADMINISTRATIVE) + expect(subject.admin_contacts[0].id).to eq(nil) + expect(subject.admin_contacts[0].name).to eq("Academia, Inc.") + expect(subject.admin_contacts[0].organization).to eq(nil) + expect(subject.admin_contacts[0].address).to eq("251 Kearny St\nsuite 520") + expect(subject.admin_contacts[0].city).to eq("San Francisco") + expect(subject.admin_contacts[0].zip).to eq("94108") + expect(subject.admin_contacts[0].state).to eq("CA") + expect(subject.admin_contacts[0].country).to eq("UNITED STATES") + expect(subject.admin_contacts[0].country_code).to eq(nil) + expect(subject.admin_contacts[0].phone).to eq("(415) 829-2341") + expect(subject.admin_contacts[0].fax).to eq(nil) + expect(subject.admin_contacts[0].email).to eq("helpdesk@academia.edu") + expect(subject.technical_contacts).to be_a(Array) + expect(subject.technical_contacts.size).to eq(1) + expect(subject.technical_contacts[0]).to be_a(Whois::Parser::Contact) + expect(subject.technical_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_TECHNICAL) + expect(subject.technical_contacts[0].id).to eq(nil) + expect(subject.technical_contacts[0].name).to eq("Academia, Inc.") + expect(subject.technical_contacts[0].organization).to eq(nil) + expect(subject.technical_contacts[0].address).to eq("251 Kearny St\nsuite 520") + expect(subject.technical_contacts[0].city).to eq("San Francisco") + expect(subject.technical_contacts[0].zip).to eq("94108") + expect(subject.technical_contacts[0].state).to eq("CA") + expect(subject.technical_contacts[0].country).to eq("UNITED STATES") + expect(subject.technical_contacts[0].country_code).to eq(nil) + expect(subject.technical_contacts[0].phone).to eq("(415) 829-2341") + expect(subject.technical_contacts[0].fax).to eq(nil) + expect(subject.technical_contacts[0].email).to eq("helpdesk@academia.edu") + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers.size).to eq(4) + expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[0].name).to eq("ns-1484.awsdns-57.org") + expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[1].name).to eq("ns-225.awsdns-28.com") + expect(subject.nameservers[2]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[2].name).to eq("ns-1850.awsdns-39.co.uk") + expect(subject.nameservers[3]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[3].name).to eq("ns-629.awsdns-14.net") end end diff --git a/spec/whois/parsers/responses/whois.eenet.ee/ee/status_available_spec.rb b/spec/whois/parsers/responses/whois.eenet.ee/ee/status_available_spec.rb index 58047aca..f3fac995 100644 --- a/spec/whois/parsers/responses/whois.eenet.ee/ee/status_available_spec.rb +++ b/spec/whois/parsers/responses/whois.eenet.ee/ee/status_available_spec.rb @@ -11,50 +11,23 @@ # require 'spec_helper' -require 'whois/parsers/whois.eenet.ee.rb' -describe Whois::Parsers::WhoisEenetEe, "status_available.expected" do +describe "whois.eenet.ee", :aggregate_failures do subject do file = fixture("responses", "whois.eenet.ee/ee/status_available.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.eenet.ee") + Whois::Parser.parser_for(part) end - describe "#status" do - it do - expect(subject.status).to eq(:available) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(true) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(false) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to eq(nil) - end - end - describe "#updated_on" do - it do - expect(subject.updated_on).to eq(nil) - end - end - describe "#expires_on" do - it do - expect { subject.expires_on }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers).to eq([]) - end + it "matches status_available.expected" do + expect(subject.status).to eq(:available) + expect(subject.available?).to eq(true) + expect(subject.registered?).to eq(false) + expect(subject.created_on).to eq(nil) + expect(subject.updated_on).to eq(nil) + expect { subject.expires_on }.to raise_error(Whois::AttributeNotSupported) + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers).to eq([]) end end diff --git a/spec/whois/parsers/responses/whois.eenet.ee/ee/status_registered_spec.rb b/spec/whois/parsers/responses/whois.eenet.ee/ee/status_registered_spec.rb index 581af157..6c5d9397 100644 --- a/spec/whois/parsers/responses/whois.eenet.ee/ee/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.eenet.ee/ee/status_registered_spec.rb @@ -11,56 +11,29 @@ # require 'spec_helper' -require 'whois/parsers/whois.eenet.ee.rb' -describe Whois::Parsers::WhoisEenetEe, "status_registered.expected" do +describe "whois.eenet.ee", :aggregate_failures do subject do file = fixture("responses", "whois.eenet.ee/ee/status_registered.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.eenet.ee") + Whois::Parser.parser_for(part) end - describe "#status" do - it do - expect(subject.status).to eq(:registered) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(false) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(true) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to be_a(Time) - expect(subject.created_on).to eq(DateTime.parse("2003-04-22")) - end - end - describe "#updated_on" do - it do - expect(subject.updated_on).to be_a(Time) - expect(subject.updated_on).to eq(DateTime.parse("2010-05-28")) - end - end - describe "#expires_on" do - it do - expect { subject.expires_on }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers.size).to eq(2) - expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[0].name).to eq("ns1.google.com") - expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[1].name).to eq("ns2.google.com") - end + it "matches status_registered.expected" do + expect(subject.status).to eq(:registered) + expect(subject.available?).to eq(false) + expect(subject.registered?).to eq(true) + expect(subject.created_on).to be_a(Time) + expect(subject.created_on).to eq(DateTime.parse("2003-04-22")) + expect(subject.updated_on).to be_a(Time) + expect(subject.updated_on).to eq(DateTime.parse("2010-05-28")) + expect { subject.expires_on }.to raise_error(Whois::AttributeNotSupported) + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers.size).to eq(2) + expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[0].name).to eq("ns1.google.com") + expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[1].name).to eq("ns2.google.com") end end diff --git a/spec/whois/parsers/responses/whois.enom.com/status_available_spec.rb b/spec/whois/parsers/responses/whois.enom.com/status_available_spec.rb index 2f404de3..100388e6 100644 --- a/spec/whois/parsers/responses/whois.enom.com/status_available_spec.rb +++ b/spec/whois/parsers/responses/whois.enom.com/status_available_spec.rb @@ -11,83 +11,32 @@ # require 'spec_helper' -require 'whois/parsers/whois.enom.com.rb' -describe Whois::Parsers::WhoisEnomCom, "status_available.expected" do +describe "whois.enom.com", :aggregate_failures do subject do file = fixture("responses", "whois.enom.com/status_available.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.enom.com") + Whois::Parser.parser_for(part) end - describe "#domain" do - it do - expect(subject.domain).to eq(nil) - end - end - describe "#domain_id" do - it do - expect(subject.domain_id).to eq(nil) - end - end - describe "#status" do - it do - expect(subject.status).to eq(:available) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(true) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(false) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to eq(nil) - end - end - describe "#updated_on" do - it do - expect(subject.updated_on).to eq(nil) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to eq(nil) - end - end - describe "#registrar" do - it do - expect(subject.registrar).to eq(nil) - end - end - describe "#registrant_contacts" do - it do - expect(subject.registrant_contacts).to be_a(Array) - expect(subject.registrant_contacts).to eq([]) - end - end - describe "#admin_contacts" do - it do - expect(subject.admin_contacts).to be_a(Array) - expect(subject.admin_contacts).to eq([]) - end - end - describe "#technical_contacts" do - it do - expect(subject.technical_contacts).to be_a(Array) - expect(subject.technical_contacts).to eq([]) - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers).to eq([]) - end + it "matches status_available.expected" do + expect(subject.domain).to eq(nil) + expect(subject.domain_id).to eq(nil) + expect(subject.status).to eq(:available) + expect(subject.available?).to eq(true) + expect(subject.registered?).to eq(false) + expect(subject.created_on).to eq(nil) + expect(subject.updated_on).to eq(nil) + expect(subject.expires_on).to eq(nil) + expect(subject.registrar).to eq(nil) + expect(subject.registrant_contacts).to be_a(Array) + expect(subject.registrant_contacts).to eq([]) + expect(subject.admin_contacts).to be_a(Array) + expect(subject.admin_contacts).to eq([]) + expect(subject.technical_contacts).to be_a(Array) + expect(subject.technical_contacts).to eq([]) + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers).to eq([]) end end diff --git a/spec/whois/parsers/responses/whois.enom.com/status_registered_spec.rb b/spec/whois/parsers/responses/whois.enom.com/status_registered_spec.rb index f30d9297..052477b9 100644 --- a/spec/whois/parsers/responses/whois.enom.com/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.enom.com/status_registered_spec.rb @@ -11,147 +11,96 @@ # require 'spec_helper' -require 'whois/parsers/whois.enom.com.rb' -describe Whois::Parsers::WhoisEnomCom, "status_registered.expected" do +describe "whois.enom.com", :aggregate_failures do subject do file = fixture("responses", "whois.enom.com/status_registered.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.enom.com") + Whois::Parser.parser_for(part) end - describe "#domain" do - it do - expect(subject.domain).to eq("enom.com") - end - end - describe "#domain_id" do - it do - expect(subject.domain_id).to eq(nil) - end - end - describe "#status" do - it do - expect(subject.status).to eq(:registered) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(false) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(true) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to be_a(Time) - expect(subject.created_on).to eq(DateTime.parse("1997-10-24 00:00:00")) - end - end - describe "#updated_on" do - it do - expect(subject.updated_on).to eq(nil) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to eq(nil) - end - end - describe "#registrar" do - it do - expect(subject.registrar).to be_a(Whois::Parser::Registrar) - expect(subject.registrar.id).to eq(nil) - expect(subject.registrar.name).to eq("eNom, Inc.") - expect(subject.registrar.url).to eq(nil) - end - end - describe "#registrant_contacts" do - it do - expect(subject.registrant_contacts).to be_a(Array) - expect(subject.registrant_contacts.size).to eq(1) - expect(subject.registrant_contacts[0]).to be_a(Whois::Parser::Contact) - expect(subject.registrant_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_REGISTRANT) - expect(subject.registrant_contacts[0].id).to eq(nil) - expect(subject.registrant_contacts[0].name).to eq("DNS MANAGER") - expect(subject.registrant_contacts[0].organization).to eq("ENOM, INC.") - expect(subject.registrant_contacts[0].address).to eq("P.O. BOX 7449, 5808 LAKE WASHINGTON BLVD. NE, SUITE 300") - expect(subject.registrant_contacts[0].city).to eq("KIRKLAND") - expect(subject.registrant_contacts[0].zip).to eq("98033") - expect(subject.registrant_contacts[0].state).to eq("WA") - expect(subject.registrant_contacts[0].country).to eq(nil) - expect(subject.registrant_contacts[0].country_code).to eq("US") - expect(subject.registrant_contacts[0].phone).to eq("") - expect(subject.registrant_contacts[0].fax).to eq("") - expect(subject.registrant_contacts[0].email).to eq("") - expect(subject.registrant_contacts[0].created_on).to eq(nil) - expect(subject.registrant_contacts[0].updated_on).to eq(nil) - end - end - describe "#admin_contacts" do - it do - expect(subject.admin_contacts).to be_a(Array) - expect(subject.admin_contacts.size).to eq(1) - expect(subject.admin_contacts[0]).to be_a(Whois::Parser::Contact) - expect(subject.admin_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_ADMINISTRATIVE) - expect(subject.admin_contacts[0].id).to eq(nil) - expect(subject.admin_contacts[0].name).to eq("DNS MANAGER") - expect(subject.admin_contacts[0].organization).to eq("ENOM, INC.") - expect(subject.admin_contacts[0].address).to eq("P.O. BOX 7449, 5808 LAKE WASHINGTON BLVD. NE, SUITE 300") - expect(subject.admin_contacts[0].city).to eq("KIRKLAND") - expect(subject.admin_contacts[0].zip).to eq("98033") - expect(subject.admin_contacts[0].state).to eq("WA") - expect(subject.admin_contacts[0].country).to eq(nil) - expect(subject.admin_contacts[0].country_code).to eq("US") - expect(subject.admin_contacts[0].phone).to eq("+1.4259744689") - expect(subject.admin_contacts[0].fax).to eq("+1.4259744791") - expect(subject.admin_contacts[0].email).to eq("DOMAINS@DEMANDMEDIA.COM") - expect(subject.admin_contacts[0].created_on).to eq(nil) - expect(subject.admin_contacts[0].updated_on).to eq(nil) - end - end - describe "#technical_contacts" do - it do - expect(subject.technical_contacts).to be_a(Array) - expect(subject.technical_contacts.size).to eq(1) - expect(subject.technical_contacts[0]).to be_a(Whois::Parser::Contact) - expect(subject.technical_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_TECHNICAL) - expect(subject.technical_contacts[0].id).to eq(nil) - expect(subject.technical_contacts[0].name).to eq("DNS MANAGER") - expect(subject.technical_contacts[0].organization).to eq("ENOM, INC.") - expect(subject.technical_contacts[0].address).to eq("P.O. BOX 7449, 5808 LAKE WASHINGTON BLVD. NE, SUITE 300") - expect(subject.technical_contacts[0].city).to eq("KIRKLAND") - expect(subject.technical_contacts[0].zip).to eq("98033") - expect(subject.technical_contacts[0].state).to eq("WA") - expect(subject.technical_contacts[0].country).to eq(nil) - expect(subject.technical_contacts[0].country_code).to eq("US") - expect(subject.technical_contacts[0].phone).to eq("+1.4259744689") - expect(subject.technical_contacts[0].fax).to eq("+1.4259744791") - expect(subject.technical_contacts[0].email).to eq("DOMAINS@DEMANDMEDIA.COM") - expect(subject.technical_contacts[0].created_on).to eq(nil) - expect(subject.technical_contacts[0].updated_on).to eq(nil) - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers.size).to eq(3) - expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[0].name).to eq("dns11.enom.com") - expect(subject.nameservers[0].ipv4).to eq(nil) - expect(subject.nameservers[0].ipv6).to eq(nil) - expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[1].name).to eq("dns12.enom.com") - expect(subject.nameservers[1].ipv4).to eq(nil) - expect(subject.nameservers[1].ipv6).to eq(nil) - expect(subject.nameservers[2]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[2].name).to eq("dns13.enom.com") - expect(subject.nameservers[2].ipv4).to eq(nil) - expect(subject.nameservers[2].ipv6).to eq(nil) - end + it "matches status_registered.expected" do + expect(subject.domain).to eq("enom.com") + expect(subject.domain_id).to eq(nil) + expect(subject.status).to eq(:registered) + expect(subject.available?).to eq(false) + expect(subject.registered?).to eq(true) + expect(subject.created_on).to be_a(Time) + expect(subject.created_on).to eq(DateTime.parse("1997-10-24 00:00:00")) + expect(subject.updated_on).to eq(nil) + expect(subject.expires_on).to eq(nil) + expect(subject.registrar).to be_a(Whois::Parser::Registrar) + expect(subject.registrar.id).to eq(nil) + expect(subject.registrar.name).to eq("eNom, Inc.") + expect(subject.registrar.url).to eq(nil) + expect(subject.registrant_contacts).to be_a(Array) + expect(subject.registrant_contacts.size).to eq(1) + expect(subject.registrant_contacts[0]).to be_a(Whois::Parser::Contact) + expect(subject.registrant_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_REGISTRANT) + expect(subject.registrant_contacts[0].id).to eq(nil) + expect(subject.registrant_contacts[0].name).to eq("DNS MANAGER") + expect(subject.registrant_contacts[0].organization).to eq("ENOM, INC.") + expect(subject.registrant_contacts[0].address).to eq("P.O. BOX 7449, 5808 LAKE WASHINGTON BLVD. NE, SUITE 300") + expect(subject.registrant_contacts[0].city).to eq("KIRKLAND") + expect(subject.registrant_contacts[0].zip).to eq("98033") + expect(subject.registrant_contacts[0].state).to eq("WA") + expect(subject.registrant_contacts[0].country).to eq(nil) + expect(subject.registrant_contacts[0].country_code).to eq("US") + expect(subject.registrant_contacts[0].phone).to eq("") + expect(subject.registrant_contacts[0].fax).to eq("") + expect(subject.registrant_contacts[0].email).to eq("") + expect(subject.registrant_contacts[0].created_on).to eq(nil) + expect(subject.registrant_contacts[0].updated_on).to eq(nil) + expect(subject.admin_contacts).to be_a(Array) + expect(subject.admin_contacts.size).to eq(1) + expect(subject.admin_contacts[0]).to be_a(Whois::Parser::Contact) + expect(subject.admin_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_ADMINISTRATIVE) + expect(subject.admin_contacts[0].id).to eq(nil) + expect(subject.admin_contacts[0].name).to eq("DNS MANAGER") + expect(subject.admin_contacts[0].organization).to eq("ENOM, INC.") + expect(subject.admin_contacts[0].address).to eq("P.O. BOX 7449, 5808 LAKE WASHINGTON BLVD. NE, SUITE 300") + expect(subject.admin_contacts[0].city).to eq("KIRKLAND") + expect(subject.admin_contacts[0].zip).to eq("98033") + expect(subject.admin_contacts[0].state).to eq("WA") + expect(subject.admin_contacts[0].country).to eq(nil) + expect(subject.admin_contacts[0].country_code).to eq("US") + expect(subject.admin_contacts[0].phone).to eq("+1.4259744689") + expect(subject.admin_contacts[0].fax).to eq("+1.4259744791") + expect(subject.admin_contacts[0].email).to eq("DOMAINS@DEMANDMEDIA.COM") + expect(subject.admin_contacts[0].created_on).to eq(nil) + expect(subject.admin_contacts[0].updated_on).to eq(nil) + expect(subject.technical_contacts).to be_a(Array) + expect(subject.technical_contacts.size).to eq(1) + expect(subject.technical_contacts[0]).to be_a(Whois::Parser::Contact) + expect(subject.technical_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_TECHNICAL) + expect(subject.technical_contacts[0].id).to eq(nil) + expect(subject.technical_contacts[0].name).to eq("DNS MANAGER") + expect(subject.technical_contacts[0].organization).to eq("ENOM, INC.") + expect(subject.technical_contacts[0].address).to eq("P.O. BOX 7449, 5808 LAKE WASHINGTON BLVD. NE, SUITE 300") + expect(subject.technical_contacts[0].city).to eq("KIRKLAND") + expect(subject.technical_contacts[0].zip).to eq("98033") + expect(subject.technical_contacts[0].state).to eq("WA") + expect(subject.technical_contacts[0].country).to eq(nil) + expect(subject.technical_contacts[0].country_code).to eq("US") + expect(subject.technical_contacts[0].phone).to eq("+1.4259744689") + expect(subject.technical_contacts[0].fax).to eq("+1.4259744791") + expect(subject.technical_contacts[0].email).to eq("DOMAINS@DEMANDMEDIA.COM") + expect(subject.technical_contacts[0].created_on).to eq(nil) + expect(subject.technical_contacts[0].updated_on).to eq(nil) + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers.size).to eq(3) + expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[0].name).to eq("dns11.enom.com") + expect(subject.nameservers[0].ipv4).to eq(nil) + expect(subject.nameservers[0].ipv6).to eq(nil) + expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[1].name).to eq("dns12.enom.com") + expect(subject.nameservers[1].ipv4).to eq(nil) + expect(subject.nameservers[1].ipv6).to eq(nil) + expect(subject.nameservers[2]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[2].name).to eq("dns13.enom.com") + expect(subject.nameservers[2].ipv4).to eq(nil) + expect(subject.nameservers[2].ipv6).to eq(nil) end end diff --git a/spec/whois/parsers/responses/whois.enom.com/status_registered_with_blank_updated_date_spec.rb b/spec/whois/parsers/responses/whois.enom.com/status_registered_with_blank_updated_date_spec.rb index be5a1933..11514c57 100644 --- a/spec/whois/parsers/responses/whois.enom.com/status_registered_with_blank_updated_date_spec.rb +++ b/spec/whois/parsers/responses/whois.enom.com/status_registered_with_blank_updated_date_spec.rb @@ -11,19 +11,16 @@ # require 'spec_helper' -require 'whois/parsers/whois.enom.com.rb' -describe Whois::Parsers::WhoisEnomCom, "status_registered_with_blank_updated_date.expected" do +describe "whois.enom.com", :aggregate_failures do subject do file = fixture("responses", "whois.enom.com/status_registered_with_blank_updated_date.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.enom.com") + Whois::Parser.parser_for(part) end - describe "#updated_on" do - it do - expect(subject.updated_on).to eq(nil) - end + it "matches status_registered_with_blank_updated_date.expected" do + expect(subject.updated_on).to eq(nil) end end diff --git a/spec/whois/parsers/responses/whois.eu.org/eu.org/status_available_spec.rb b/spec/whois/parsers/responses/whois.eu.org/eu.org/status_available_spec.rb index cd684de7..aee5f7bc 100644 --- a/spec/whois/parsers/responses/whois.eu.org/eu.org/status_available_spec.rb +++ b/spec/whois/parsers/responses/whois.eu.org/eu.org/status_available_spec.rb @@ -11,49 +11,22 @@ # require 'spec_helper' -require 'whois/parsers/whois.eu.org.rb' -describe Whois::Parsers::WhoisEuOrg, "status_available.expected" do +describe "whois.eu.org", :aggregate_failures do subject do file = fixture("responses", "whois.eu.org/eu.org/status_available.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.eu.org") + Whois::Parser.parser_for(part) end - describe "#status" do - it do - expect(subject.status).to eq(:available) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(true) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(false) - end - end - describe "#created_on" do - it do - expect { subject.created_on }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#updated_on" do - it do - expect { subject.updated_on }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#expires_on" do - it do - expect { subject.expires_on }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#nameservers" do - it do - expect { subject.nameservers }.to raise_error(Whois::AttributeNotSupported) - end + it "matches status_available.expected" do + expect(subject.status).to eq(:available) + expect(subject.available?).to eq(true) + expect(subject.registered?).to eq(false) + expect { subject.created_on }.to raise_error(Whois::AttributeNotSupported) + expect { subject.updated_on }.to raise_error(Whois::AttributeNotSupported) + expect { subject.expires_on }.to raise_error(Whois::AttributeNotSupported) + expect { subject.nameservers }.to raise_error(Whois::AttributeNotSupported) end end diff --git a/spec/whois/parsers/responses/whois.eu.org/eu.org/status_registered_spec.rb b/spec/whois/parsers/responses/whois.eu.org/eu.org/status_registered_spec.rb index c6380bf7..48012cb6 100644 --- a/spec/whois/parsers/responses/whois.eu.org/eu.org/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.eu.org/eu.org/status_registered_spec.rb @@ -11,49 +11,22 @@ # require 'spec_helper' -require 'whois/parsers/whois.eu.org.rb' -describe Whois::Parsers::WhoisEuOrg, "status_registered.expected" do +describe "whois.eu.org", :aggregate_failures do subject do file = fixture("responses", "whois.eu.org/eu.org/status_registered.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.eu.org") + Whois::Parser.parser_for(part) end - describe "#status" do - it do - expect(subject.status).to eq(:registered) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(false) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(true) - end - end - describe "#created_on" do - it do - expect { subject.created_on }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#updated_on" do - it do - expect { subject.updated_on }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#expires_on" do - it do - expect { subject.expires_on }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#nameservers" do - it do - expect { subject.nameservers }.to raise_error(Whois::AttributeNotSupported) - end + it "matches status_registered.expected" do + expect(subject.status).to eq(:registered) + expect(subject.available?).to eq(false) + expect(subject.registered?).to eq(true) + expect { subject.created_on }.to raise_error(Whois::AttributeNotSupported) + expect { subject.updated_on }.to raise_error(Whois::AttributeNotSupported) + expect { subject.expires_on }.to raise_error(Whois::AttributeNotSupported) + expect { subject.nameservers }.to raise_error(Whois::AttributeNotSupported) end end diff --git a/spec/whois/parsers/responses/whois.eu/eu/property_nameservers_spec.rb b/spec/whois/parsers/responses/whois.eu/eu/property_nameservers_spec.rb index 4dde572a..aed79c74 100644 --- a/spec/whois/parsers/responses/whois.eu/eu/property_nameservers_spec.rb +++ b/spec/whois/parsers/responses/whois.eu/eu/property_nameservers_spec.rb @@ -11,34 +11,31 @@ # require 'spec_helper' -require 'whois/parsers/whois.eu.rb' -describe Whois::Parsers::WhoisEu, "property_nameservers.expected" do +describe "whois.eu", :aggregate_failures do subject do file = fixture("responses", "whois.eu/eu/property_nameservers.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.eu") + Whois::Parser.parser_for(part) end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers.size).to eq(5) - expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[0].name).to eq("a.nic.eu") - expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[1].name).to eq("l.nic.eu") - expect(subject.nameservers[2]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[2].name).to eq("p.nic.eu") - expect(subject.nameservers[3]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[3].name).to eq("ns1.eurid.eu") - expect(subject.nameservers[3].ipv4).to eq("91.220.191.220") - expect(subject.nameservers[3].ipv6).to eq(nil) - expect(subject.nameservers[4]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[4].name).to eq("ns2.eurid.eu") - expect(subject.nameservers[4].ipv4).to eq("195.234.53.220") - expect(subject.nameservers[4].ipv6).to eq(nil) - end + it "matches property_nameservers.expected" do + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers.size).to eq(5) + expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[0].name).to eq("a.nic.eu") + expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[1].name).to eq("l.nic.eu") + expect(subject.nameservers[2]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[2].name).to eq("p.nic.eu") + expect(subject.nameservers[3]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[3].name).to eq("ns1.eurid.eu") + expect(subject.nameservers[3].ipv4).to eq("91.220.191.220") + expect(subject.nameservers[3].ipv6).to eq(nil) + expect(subject.nameservers[4]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[4].name).to eq("ns2.eurid.eu") + expect(subject.nameservers[4].ipv4).to eq("195.234.53.220") + expect(subject.nameservers[4].ipv6).to eq(nil) end end diff --git a/spec/whois/parsers/responses/whois.eu/eu/response_throttled_spec.rb b/spec/whois/parsers/responses/whois.eu/eu/response_throttled_spec.rb index 94565d3d..74ef24d6 100644 --- a/spec/whois/parsers/responses/whois.eu/eu/response_throttled_spec.rb +++ b/spec/whois/parsers/responses/whois.eu/eu/response_throttled_spec.rb @@ -11,19 +11,16 @@ # require 'spec_helper' -require 'whois/parsers/whois.eu.rb' -describe Whois::Parsers::WhoisEu, "response_throttled.expected" do +describe "whois.eu", :aggregate_failures do subject do file = fixture("responses", "whois.eu/eu/response_throttled.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.eu") + Whois::Parser.parser_for(part) end - describe "#response_throttled?" do - it do - expect(subject.response_throttled?).to eq(true) - end + it "matches response_throttled.expected" do + expect(subject.response_throttled?).to eq(true) end end diff --git a/spec/whois/parsers/responses/whois.eu/eu/status_available_spec.rb b/spec/whois/parsers/responses/whois.eu/eu/status_available_spec.rb index 68b49fdf..38715fde 100644 --- a/spec/whois/parsers/responses/whois.eu/eu/status_available_spec.rb +++ b/spec/whois/parsers/responses/whois.eu/eu/status_available_spec.rb @@ -11,86 +11,31 @@ # require 'spec_helper' -require 'whois/parsers/whois.eu.rb' -describe Whois::Parsers::WhoisEu, "status_available.expected" do +describe "whois.eu", :aggregate_failures do subject do file = fixture("responses", "whois.eu/eu/status_available.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.eu") + Whois::Parser.parser_for(part) end - describe "#domain" do - it do - expect(subject.domain).to eq("u34jedzcq.eu") - end - end - describe "#domain_id" do - it do - expect { subject.domain_id }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#status" do - it do - expect(subject.status).to eq(:available) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(true) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(false) - end - end - describe "#created_on" do - it do - expect { subject.created_on }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#updated_on" do - it do - expect { subject.updated_on }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#expires_on" do - it do - expect { subject.expires_on }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#registrar" do - it do - expect(subject.registrar).to eq(nil) - end - end - describe "#registrant_contacts" do - it do - expect { subject.registrant_contacts }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#admin_contacts" do - it do - expect { subject.admin_contacts }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#technical_contacts" do - it do - expect(subject.technical_contacts).to be_a(Array) - expect(subject.technical_contacts).to eq([]) - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers).to eq([]) - end - end - describe "#response_throttled?" do - it do - expect(subject.response_throttled?).to eq(false) - end + it "matches status_available.expected" do + expect(subject.domain).to eq("u34jedzcq.eu") + expect { subject.domain_id }.to raise_error(Whois::AttributeNotSupported) + expect(subject.status).to eq(:available) + expect(subject.available?).to eq(true) + expect(subject.registered?).to eq(false) + expect { subject.created_on }.to raise_error(Whois::AttributeNotSupported) + expect { subject.updated_on }.to raise_error(Whois::AttributeNotSupported) + expect { subject.expires_on }.to raise_error(Whois::AttributeNotSupported) + expect(subject.registrar).to eq(nil) + expect { subject.registrant_contacts }.to raise_error(Whois::AttributeNotSupported) + expect { subject.admin_contacts }.to raise_error(Whois::AttributeNotSupported) + expect(subject.technical_contacts).to be_a(Array) + expect(subject.technical_contacts).to eq([]) + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers).to eq([]) + expect(subject.response_throttled?).to eq(false) end end diff --git a/spec/whois/parsers/responses/whois.eu/eu/status_registered_spec.rb b/spec/whois/parsers/responses/whois.eu/eu/status_registered_spec.rb index 81647fd6..b7e2eea0 100644 --- a/spec/whois/parsers/responses/whois.eu/eu/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.eu/eu/status_registered_spec.rb @@ -11,105 +11,50 @@ # require 'spec_helper' -require 'whois/parsers/whois.eu.rb' -describe Whois::Parsers::WhoisEu, "status_registered.expected" do +describe "whois.eu", :aggregate_failures do subject do file = fixture("responses", "whois.eu/eu/status_registered.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.eu") + Whois::Parser.parser_for(part) end - describe "#domain" do - it do - expect(subject.domain).to eq("google.eu") - end - end - describe "#domain_id" do - it do - expect { subject.domain_id }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#status" do - it do - expect(subject.status).to eq(:registered) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(false) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(true) - end - end - describe "#created_on" do - it do - expect { subject.created_on }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#updated_on" do - it do - expect { subject.updated_on }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#expires_on" do - it do - expect { subject.expires_on }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#registrar" do - it do - expect(subject.registrar).to be_a(Whois::Parser::Registrar) - expect(subject.registrar.id).to eq(nil) - expect(subject.registrar.name).to eq("MarkMonitor Inc.") - expect(subject.registrar.url).to eq("https://www.markmonitor.com/") - end - end - describe "#registrant_contacts" do - it do - expect { subject.registrant_contacts }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#admin_contacts" do - it do - expect { subject.admin_contacts }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#technical_contacts" do - it do - expect(subject.technical_contacts).to be_a(Array) - expect(subject.technical_contacts.size).to eq(0) - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers.size).to eq(4) - expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[0].name).to eq("ns3.google.com") - expect(subject.nameservers[0].ipv4).to eq(nil) - expect(subject.nameservers[0].ipv6).to eq(nil) - expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[1].name).to eq("ns4.google.com") - expect(subject.nameservers[1].ipv4).to eq(nil) - expect(subject.nameservers[1].ipv6).to eq(nil) - expect(subject.nameservers[2]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[2].name).to eq("ns1.google.com") - expect(subject.nameservers[2].ipv4).to eq(nil) - expect(subject.nameservers[2].ipv6).to eq(nil) - expect(subject.nameservers[3]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[3].name).to eq("ns2.google.com") - expect(subject.nameservers[3].ipv4).to eq(nil) - expect(subject.nameservers[3].ipv6).to eq(nil) - end - end - describe "#response_throttled?" do - it do - expect(subject.response_throttled?).to eq(false) - end + it "matches status_registered.expected" do + expect(subject.domain).to eq("google.eu") + expect { subject.domain_id }.to raise_error(Whois::AttributeNotSupported) + expect(subject.status).to eq(:registered) + expect(subject.available?).to eq(false) + expect(subject.registered?).to eq(true) + expect { subject.created_on }.to raise_error(Whois::AttributeNotSupported) + expect { subject.updated_on }.to raise_error(Whois::AttributeNotSupported) + expect { subject.expires_on }.to raise_error(Whois::AttributeNotSupported) + expect(subject.registrar).to be_a(Whois::Parser::Registrar) + expect(subject.registrar.id).to eq(nil) + expect(subject.registrar.name).to eq("MarkMonitor Inc.") + expect(subject.registrar.url).to eq("https://www.markmonitor.com/") + expect { subject.registrant_contacts }.to raise_error(Whois::AttributeNotSupported) + expect { subject.admin_contacts }.to raise_error(Whois::AttributeNotSupported) + expect(subject.technical_contacts).to be_a(Array) + expect(subject.technical_contacts.size).to eq(0) + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers.size).to eq(4) + expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[0].name).to eq("ns3.google.com") + expect(subject.nameservers[0].ipv4).to eq(nil) + expect(subject.nameservers[0].ipv6).to eq(nil) + expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[1].name).to eq("ns4.google.com") + expect(subject.nameservers[1].ipv4).to eq(nil) + expect(subject.nameservers[1].ipv6).to eq(nil) + expect(subject.nameservers[2]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[2].name).to eq("ns1.google.com") + expect(subject.nameservers[2].ipv4).to eq(nil) + expect(subject.nameservers[2].ipv6).to eq(nil) + expect(subject.nameservers[3]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[3].name).to eq("ns2.google.com") + expect(subject.nameservers[3].ipv4).to eq(nil) + expect(subject.nameservers[3].ipv6).to eq(nil) + expect(subject.response_throttled?).to eq(false) end end diff --git a/spec/whois/parsers/responses/whois.fi/fi/property_status_graceperiod_spec.rb b/spec/whois/parsers/responses/whois.fi/fi/property_status_graceperiod_spec.rb index b6319884..1e8b3604 100644 --- a/spec/whois/parsers/responses/whois.fi/fi/property_status_graceperiod_spec.rb +++ b/spec/whois/parsers/responses/whois.fi/fi/property_status_graceperiod_spec.rb @@ -11,127 +11,72 @@ # require 'spec_helper' -require 'whois/parsers/whois.fi.rb' -describe Whois::Parsers::WhoisFi, "property_status_graceperiod.expected" do +describe "whois.fi", :aggregate_failures do subject do file = fixture("responses", "whois.fi/fi/property_status_graceperiod.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.fi") + Whois::Parser.parser_for(part) end - describe "#disclaimer" do - it do - expect(subject.disclaimer).to eq("Copyright (c) Finnish Transport and Communications Agency Traficom") - end - end - describe "#domain" do - it do - expect(subject.domain).to eq("kalatalousministeri.fi") - end - end - describe "#domain_id" do - it do - expect { subject.domain_id }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#status" do - it do - expect(subject.status).to eq(:registered) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(false) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(true) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to be_a(Time) - expect(subject.created_on).to eq(DateTime.parse("2018-03-14 17:47:42")) - end - end - describe "#updated_on" do - it do - expect(subject.updated_on).to be_a(Time) - expect(subject.updated_on).to eq(DateTime.parse("2019-11-06")) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to be_a(Time) - expect(subject.expires_on).to eq(DateTime.parse("2020-03-14 17:47:42")) - end - end - describe "#registrar" do - it do - expect(subject.registrar.name).to eq("Gandi SAS") - expect(subject.registrar.url).to eq("www.gandi.net") - end - end - describe "#registrant_contacts" do - it do - expect { subject.registrant_contacts }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#admin_contacts" do - it do - expect(subject.admin_contacts).to be_a(Array) - expect(subject.admin_contacts.size).to eq(1) - expect(subject.admin_contacts[0]).to be_a(Whois::Parser::Contact) - expect(subject.admin_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_ADMINISTRATIVE) - expect(subject.admin_contacts[0].id).to eq("2823344-7") - expect(subject.admin_contacts[0].name).to eq("Digiteam Oy") - expect(subject.admin_contacts[0].address).to eq("Myllyniityntie 71") - expect(subject.admin_contacts[0].city).to eq("Lohja") - expect(subject.admin_contacts[0].zip).to eq("08100") - expect(subject.admin_contacts[0].state).to eq(nil) - expect(subject.admin_contacts[0].country).to eq("Finland") - expect(subject.admin_contacts[0].country_code).to eq(nil) - expect(subject.admin_contacts[0].phone).to eq("+358.503716096") - expect(subject.admin_contacts[0].fax).to eq(nil) - expect(subject.admin_contacts[0].email).to eq("") - expect(subject.admin_contacts[0].created_on).to eq(nil) - expect(subject.admin_contacts[0].updated_on).to eq(nil) - end - end - describe "#technical_contacts" do - it do - expect(subject.technical_contacts).to be_a(Array) - expect(subject.technical_contacts.size).to eq(1) - expect(subject.technical_contacts[0]).to be_a(Whois::Parser::Contact) - expect(subject.technical_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_TECHNICAL) - expect(subject.technical_contacts[0].id).to eq(nil) - expect(subject.technical_contacts[0].name).to eq("Seravo Oy") - expect(subject.technical_contacts[0].address).to eq(nil) - expect(subject.technical_contacts[0].city).to eq(nil) - expect(subject.technical_contacts[0].zip).to eq(nil) - expect(subject.technical_contacts[0].state).to eq(nil) - expect(subject.technical_contacts[0].country).to eq(nil) - expect(subject.technical_contacts[0].country_code).to eq(nil) - expect(subject.technical_contacts[0].phone).to eq(nil) - expect(subject.technical_contacts[0].fax).to eq(nil) - expect(subject.technical_contacts[0].email).to eq("hostmaster@seravo.com") - expect(subject.technical_contacts[0].created_on).to eq(nil) - expect(subject.technical_contacts[0].updated_on).to eq(nil) - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers.size).to eq(3) - expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[0].name).to eq("ns-184-c.gandi.net") - expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[1].name).to eq("ns-196-a.gandi.net") - expect(subject.nameservers[2]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[2].name).to eq("ns-73-b.gandi.net") - end + it "matches property_status_graceperiod.expected" do + expect(subject.disclaimer).to eq("Copyright (c) Finnish Transport and Communications Agency Traficom") + expect(subject.domain).to eq("kalatalousministeri.fi") + expect { subject.domain_id }.to raise_error(Whois::AttributeNotSupported) + expect(subject.status).to eq(:registered) + expect(subject.available?).to eq(false) + expect(subject.registered?).to eq(true) + expect(subject.created_on).to be_a(Time) + expect(subject.created_on).to eq(DateTime.parse("2018-03-14 17:47:42")) + expect(subject.updated_on).to be_a(Time) + expect(subject.updated_on).to eq(DateTime.parse("2019-11-06")) + expect(subject.expires_on).to be_a(Time) + expect(subject.expires_on).to eq(DateTime.parse("2020-03-14 17:47:42")) + expect(subject.registrar.name).to eq("Gandi SAS") + expect(subject.registrar.url).to eq("www.gandi.net") + expect { subject.registrant_contacts }.to raise_error(Whois::AttributeNotSupported) + expect(subject.admin_contacts).to be_a(Array) + expect(subject.admin_contacts.size).to eq(1) + expect(subject.admin_contacts[0]).to be_a(Whois::Parser::Contact) + expect(subject.admin_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_ADMINISTRATIVE) + expect(subject.admin_contacts[0].id).to eq("2823344-7") + expect(subject.admin_contacts[0].name).to eq("Digiteam Oy") + expect(subject.admin_contacts[0].address).to eq("Myllyniityntie 71") + expect(subject.admin_contacts[0].city).to eq("Lohja") + expect(subject.admin_contacts[0].zip).to eq("08100") + expect(subject.admin_contacts[0].state).to eq(nil) + expect(subject.admin_contacts[0].country).to eq("Finland") + expect(subject.admin_contacts[0].country_code).to eq(nil) + expect(subject.admin_contacts[0].phone).to eq("+358.503716096") + expect(subject.admin_contacts[0].fax).to eq(nil) + expect(subject.admin_contacts[0].email).to eq("") + expect(subject.admin_contacts[0].created_on).to eq(nil) + expect(subject.admin_contacts[0].updated_on).to eq(nil) + expect(subject.technical_contacts).to be_a(Array) + expect(subject.technical_contacts.size).to eq(1) + expect(subject.technical_contacts[0]).to be_a(Whois::Parser::Contact) + expect(subject.technical_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_TECHNICAL) + expect(subject.technical_contacts[0].id).to eq(nil) + expect(subject.technical_contacts[0].name).to eq("Seravo Oy") + expect(subject.technical_contacts[0].address).to eq(nil) + expect(subject.technical_contacts[0].city).to eq(nil) + expect(subject.technical_contacts[0].zip).to eq(nil) + expect(subject.technical_contacts[0].state).to eq(nil) + expect(subject.technical_contacts[0].country).to eq(nil) + expect(subject.technical_contacts[0].country_code).to eq(nil) + expect(subject.technical_contacts[0].phone).to eq(nil) + expect(subject.technical_contacts[0].fax).to eq(nil) + expect(subject.technical_contacts[0].email).to eq("hostmaster@seravo.com") + expect(subject.technical_contacts[0].created_on).to eq(nil) + expect(subject.technical_contacts[0].updated_on).to eq(nil) + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers.size).to eq(3) + expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[0].name).to eq("ns-184-c.gandi.net") + expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[1].name).to eq("ns-196-a.gandi.net") + expect(subject.nameservers[2]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[2].name).to eq("ns-73-b.gandi.net") end end diff --git a/spec/whois/parsers/responses/whois.fi/fi/status_available_spec.rb b/spec/whois/parsers/responses/whois.fi/fi/status_available_spec.rb index 95033b32..d6b6531e 100644 --- a/spec/whois/parsers/responses/whois.fi/fi/status_available_spec.rb +++ b/spec/whois/parsers/responses/whois.fi/fi/status_available_spec.rb @@ -11,87 +11,32 @@ # require 'spec_helper' -require 'whois/parsers/whois.fi.rb' -describe Whois::Parsers::WhoisFi, "status_available.expected" do +describe "whois.fi", :aggregate_failures do subject do file = fixture("responses", "whois.fi/fi/status_available.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.fi") + Whois::Parser.parser_for(part) end - describe "#disclaimer" do - it do - expect(subject.disclaimer).to eq("Copyright (c) Finnish Transport and Communications Agency Traficom") - end - end - describe "#domain" do - it do - expect(subject.domain).to eq(nil) - end - end - describe "#domain_id" do - it do - expect { subject.domain_id }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#status" do - it do - expect(subject.status).to eq(:available) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(true) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(false) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to eq(nil) - end - end - describe "#updated_on" do - it do - expect(subject.updated_on).to eq(nil) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to eq(nil) - end - end - describe "#registrar" do - it do - expect(subject.registrar).to eq(nil) - end - end - describe "#registrant_contacts" do - it do - expect { subject.registrant_contacts }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#admin_contacts" do - it do - expect(subject.admin_contacts).to be_a(Array) - expect(subject.admin_contacts).to eq([]) - end - end - describe "#technical_contacts" do - it do - expect(subject.technical_contacts).to be_a(Array) - expect(subject.technical_contacts).to eq([]) - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers).to eq([]) - end + it "matches status_available.expected" do + expect(subject.disclaimer).to eq("Copyright (c) Finnish Transport and Communications Agency Traficom") + expect(subject.domain).to eq(nil) + expect { subject.domain_id }.to raise_error(Whois::AttributeNotSupported) + expect(subject.status).to eq(:available) + expect(subject.available?).to eq(true) + expect(subject.registered?).to eq(false) + expect(subject.created_on).to eq(nil) + expect(subject.updated_on).to eq(nil) + expect(subject.expires_on).to eq(nil) + expect(subject.registrar).to eq(nil) + expect { subject.registrant_contacts }.to raise_error(Whois::AttributeNotSupported) + expect(subject.admin_contacts).to be_a(Array) + expect(subject.admin_contacts).to eq([]) + expect(subject.technical_contacts).to be_a(Array) + expect(subject.technical_contacts).to eq([]) + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers).to eq([]) end end diff --git a/spec/whois/parsers/responses/whois.fi/fi/status_registered_spec.rb b/spec/whois/parsers/responses/whois.fi/fi/status_registered_spec.rb index 8c88c11d..8315c2c0 100644 --- a/spec/whois/parsers/responses/whois.fi/fi/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.fi/fi/status_registered_spec.rb @@ -11,132 +11,77 @@ # require 'spec_helper' -require 'whois/parsers/whois.fi.rb' -describe Whois::Parsers::WhoisFi, "status_registered.expected" do +describe "whois.fi", :aggregate_failures do subject do file = fixture("responses", "whois.fi/fi/status_registered.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.fi") + Whois::Parser.parser_for(part) end - describe "#disclaimer" do - it do - expect(subject.disclaimer).to eq("Copyright (c) Finnish Transport and Communications Agency Traficom") - end - end - describe "#domain" do - it do - expect(subject.domain).to eq("google.fi") - end - end - describe "#domain_id" do - it do - expect { subject.domain_id }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#status" do - it do - expect(subject.status).to eq(:registered) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(false) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(true) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to be_a(Time) - expect(subject.created_on).to eq(DateTime.parse("2006-06-30")) - end - end - describe "#updated_on" do - it do - expect(subject.updated_on).to be_a(Time) - expect(subject.updated_on).to eq(DateTime.parse("2019-06-02")) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to be_a(Time) - expect(subject.expires_on).to eq(DateTime.parse("2020-07-04 10:15:55")) - end - end - describe "#registrar" do - it do - expect(subject.registrar.id).to eq(nil) - expect(subject.registrar.name).to eq("MarkMonitor Inc.") - expect(subject.registrar.url).to eq("www.markmonitor.com") - end - end - describe "#registrant_contacts" do - it do - expect { subject.registrant_contacts }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#admin_contacts" do - it do - expect(subject.admin_contacts).to be_a(Array) - expect(subject.admin_contacts.size).to eq(1) - expect(subject.admin_contacts[0]).to be_a(Whois::Parser::Contact) - expect(subject.admin_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_ADMINISTRATIVE) - expect(subject.admin_contacts[0].id).to eq("3582691") - expect(subject.admin_contacts[0].name).to eq("Google LLC") - expect(subject.admin_contacts[0].organization).to eq(nil) - expect(subject.admin_contacts[0].address).to eq("1600 Amphitheatre Parkway") - expect(subject.admin_contacts[0].zip).to eq("94043") - expect(subject.admin_contacts[0].city).to eq("Mountain View") - expect(subject.admin_contacts[0].state).to eq(nil) - expect(subject.admin_contacts[0].country).to eq("United States of America") - expect(subject.admin_contacts[0].country_code).to eq(nil) - expect(subject.admin_contacts[0].phone).to eq("+1.6502530000") - expect(subject.admin_contacts[0].fax).to eq(nil) - expect(subject.admin_contacts[0].email).to eq("") - expect(subject.admin_contacts[0].created_on).to eq(nil) - expect(subject.admin_contacts[0].updated_on).to eq(nil) - end - end - describe "#technical_contacts" do - it do - expect(subject.technical_contacts).to be_a(Array) - expect(subject.technical_contacts.size).to eq(1) - expect(subject.technical_contacts[0]).to be_a(Whois::Parser::Contact) - expect(subject.technical_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_TECHNICAL) - expect(subject.technical_contacts[0].id).to eq(nil) - expect(subject.technical_contacts[0].name).to eq("Google LLC") - expect(subject.technical_contacts[0].organization).to eq(nil) - expect(subject.technical_contacts[0].address).to eq(nil) - expect(subject.technical_contacts[0].city).to eq(nil) - expect(subject.technical_contacts[0].zip).to eq(nil) - expect(subject.technical_contacts[0].state).to eq(nil) - expect(subject.technical_contacts[0].country).to eq(nil) - expect(subject.technical_contacts[0].country_code).to eq(nil) - expect(subject.technical_contacts[0].phone).to eq(nil) - expect(subject.technical_contacts[0].fax).to eq(nil) - expect(subject.technical_contacts[0].email).to eq("ccops@markmonitor.com") - expect(subject.technical_contacts[0].created_on).to eq(nil) - expect(subject.technical_contacts[0].updated_on).to eq(nil) - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers.size).to eq(4) - expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[0].name).to eq("ns3.google.com") - expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[1].name).to eq("ns4.google.com") - expect(subject.nameservers[2]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[2].name).to eq("ns1.google.com") - expect(subject.nameservers[3]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[3].name).to eq("ns2.google.com") - end + it "matches status_registered.expected" do + expect(subject.disclaimer).to eq("Copyright (c) Finnish Transport and Communications Agency Traficom") + expect(subject.domain).to eq("google.fi") + expect { subject.domain_id }.to raise_error(Whois::AttributeNotSupported) + expect(subject.status).to eq(:registered) + expect(subject.available?).to eq(false) + expect(subject.registered?).to eq(true) + expect(subject.created_on).to be_a(Time) + expect(subject.created_on).to eq(DateTime.parse("2006-06-30")) + expect(subject.updated_on).to be_a(Time) + expect(subject.updated_on).to eq(DateTime.parse("2019-06-02")) + expect(subject.expires_on).to be_a(Time) + expect(subject.expires_on).to eq(DateTime.parse("2020-07-04 10:15:55")) + expect(subject.registrar.id).to eq(nil) + expect(subject.registrar.name).to eq("MarkMonitor Inc.") + expect(subject.registrar.url).to eq("www.markmonitor.com") + expect { subject.registrant_contacts }.to raise_error(Whois::AttributeNotSupported) + expect(subject.admin_contacts).to be_a(Array) + expect(subject.admin_contacts.size).to eq(1) + expect(subject.admin_contacts[0]).to be_a(Whois::Parser::Contact) + expect(subject.admin_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_ADMINISTRATIVE) + expect(subject.admin_contacts[0].id).to eq("3582691") + expect(subject.admin_contacts[0].name).to eq("Google LLC") + expect(subject.admin_contacts[0].organization).to eq(nil) + expect(subject.admin_contacts[0].address).to eq("1600 Amphitheatre Parkway") + expect(subject.admin_contacts[0].zip).to eq("94043") + expect(subject.admin_contacts[0].city).to eq("Mountain View") + expect(subject.admin_contacts[0].state).to eq(nil) + expect(subject.admin_contacts[0].country).to eq("United States of America") + expect(subject.admin_contacts[0].country_code).to eq(nil) + expect(subject.admin_contacts[0].phone).to eq("+1.6502530000") + expect(subject.admin_contacts[0].fax).to eq(nil) + expect(subject.admin_contacts[0].email).to eq("") + expect(subject.admin_contacts[0].created_on).to eq(nil) + expect(subject.admin_contacts[0].updated_on).to eq(nil) + expect(subject.technical_contacts).to be_a(Array) + expect(subject.technical_contacts.size).to eq(1) + expect(subject.technical_contacts[0]).to be_a(Whois::Parser::Contact) + expect(subject.technical_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_TECHNICAL) + expect(subject.technical_contacts[0].id).to eq(nil) + expect(subject.technical_contacts[0].name).to eq("Google LLC") + expect(subject.technical_contacts[0].organization).to eq(nil) + expect(subject.technical_contacts[0].address).to eq(nil) + expect(subject.technical_contacts[0].city).to eq(nil) + expect(subject.technical_contacts[0].zip).to eq(nil) + expect(subject.technical_contacts[0].state).to eq(nil) + expect(subject.technical_contacts[0].country).to eq(nil) + expect(subject.technical_contacts[0].country_code).to eq(nil) + expect(subject.technical_contacts[0].phone).to eq(nil) + expect(subject.technical_contacts[0].fax).to eq(nil) + expect(subject.technical_contacts[0].email).to eq("ccops@markmonitor.com") + expect(subject.technical_contacts[0].created_on).to eq(nil) + expect(subject.technical_contacts[0].updated_on).to eq(nil) + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers.size).to eq(4) + expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[0].name).to eq("ns3.google.com") + expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[1].name).to eq("ns4.google.com") + expect(subject.nameservers[2]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[2].name).to eq("ns1.google.com") + expect(subject.nameservers[3]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[3].name).to eq("ns2.google.com") end end diff --git a/spec/whois/parsers/responses/whois.fi/fi/status_reserved_spec.rb b/spec/whois/parsers/responses/whois.fi/fi/status_reserved_spec.rb index 81e934ec..35d77afd 100644 --- a/spec/whois/parsers/responses/whois.fi/fi/status_reserved_spec.rb +++ b/spec/whois/parsers/responses/whois.fi/fi/status_reserved_spec.rb @@ -11,87 +11,32 @@ # require 'spec_helper' -require 'whois/parsers/whois.fi.rb' -describe Whois::Parsers::WhoisFi, "status_reserved.expected" do +describe "whois.fi", :aggregate_failures do subject do file = fixture("responses", "whois.fi/fi/status_reserved.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.fi") + Whois::Parser.parser_for(part) end - describe "#disclaimer" do - it do - expect(subject.disclaimer).to eq("Copyright (c) Finnish Transport and Communications Agency Traficom") - end - end - describe "#domain" do - it do - expect(subject.domain).to eq(nil) - end - end - describe "#domain_id" do - it do - expect { subject.domain_id }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#status" do - it do - expect(subject.status).to eq(:reserved) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(false) - end - end - describe "#reserved?" do - it do - expect(subject.reserved?).to eq(true) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to eq(nil) - end - end - describe "#updated_on" do - it do - expect(subject.updated_on).to eq(nil) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to eq(nil) - end - end - describe "#registrar" do - it do - expect(subject.registrar).to eq(nil) - end - end - describe "#registrant_contacts" do - it do - expect { subject.registrant_contacts }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#admin_contacts" do - it do - expect(subject.admin_contacts).to be_a(Array) - expect(subject.admin_contacts).to eq([]) - end - end - describe "#technical_contacts" do - it do - expect(subject.technical_contacts).to be_a(Array) - expect(subject.technical_contacts).to eq([]) - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers).to eq([]) - end + it "matches status_reserved.expected" do + expect(subject.disclaimer).to eq("Copyright (c) Finnish Transport and Communications Agency Traficom") + expect(subject.domain).to eq(nil) + expect { subject.domain_id }.to raise_error(Whois::AttributeNotSupported) + expect(subject.status).to eq(:reserved) + expect(subject.available?).to eq(false) + expect(subject.reserved?).to eq(true) + expect(subject.created_on).to eq(nil) + expect(subject.updated_on).to eq(nil) + expect(subject.expires_on).to eq(nil) + expect(subject.registrar).to eq(nil) + expect { subject.registrant_contacts }.to raise_error(Whois::AttributeNotSupported) + expect(subject.admin_contacts).to be_a(Array) + expect(subject.admin_contacts).to eq([]) + expect(subject.technical_contacts).to be_a(Array) + expect(subject.technical_contacts).to eq([]) + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers).to eq([]) end end diff --git a/spec/whois/parsers/responses/whois.gandi.net/status_available_spec.rb b/spec/whois/parsers/responses/whois.gandi.net/status_available_spec.rb index 2bfed0bb..3ac8dc53 100644 --- a/spec/whois/parsers/responses/whois.gandi.net/status_available_spec.rb +++ b/spec/whois/parsers/responses/whois.gandi.net/status_available_spec.rb @@ -11,83 +11,32 @@ # require 'spec_helper' -require 'whois/parsers/whois.gandi.net.rb' -describe Whois::Parsers::WhoisGandiNet, "status_available.expected" do +describe "whois.gandi.net", :aggregate_failures do subject do file = fixture("responses", "whois.gandi.net/status_available.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.gandi.net") + Whois::Parser.parser_for(part) end - describe "#domain" do - it do - expect(subject.domain).to eq(nil) - end - end - describe "#domain_id" do - it do - expect(subject.domain_id).to eq(nil) - end - end - describe "#status" do - it do - expect(subject.status).to eq(:available) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(true) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(false) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to eq(nil) - end - end - describe "#updated_on" do - it do - expect(subject.updated_on).to eq(nil) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to eq(nil) - end - end - describe "#registrar" do - it do - expect(subject.registrar).to eq(nil) - end - end - describe "#registrant_contacts" do - it do - expect(subject.registrant_contacts).to be_a(Array) - expect(subject.registrant_contacts).to eq([]) - end - end - describe "#admin_contacts" do - it do - expect(subject.admin_contacts).to be_a(Array) - expect(subject.admin_contacts).to eq([]) - end - end - describe "#technical_contacts" do - it do - expect(subject.technical_contacts).to be_a(Array) - expect(subject.technical_contacts).to eq([]) - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers).to eq([]) - end + it "matches status_available.expected" do + expect(subject.domain).to eq(nil) + expect(subject.domain_id).to eq(nil) + expect(subject.status).to eq(:available) + expect(subject.available?).to eq(true) + expect(subject.registered?).to eq(false) + expect(subject.created_on).to eq(nil) + expect(subject.updated_on).to eq(nil) + expect(subject.expires_on).to eq(nil) + expect(subject.registrar).to eq(nil) + expect(subject.registrant_contacts).to be_a(Array) + expect(subject.registrant_contacts).to eq([]) + expect(subject.admin_contacts).to be_a(Array) + expect(subject.admin_contacts).to eq([]) + expect(subject.technical_contacts).to be_a(Array) + expect(subject.technical_contacts).to eq([]) + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers).to eq([]) end end diff --git a/spec/whois/parsers/responses/whois.gandi.net/status_registered_spec.rb b/spec/whois/parsers/responses/whois.gandi.net/status_registered_spec.rb index 7f7b063e..4fc657e0 100644 --- a/spec/whois/parsers/responses/whois.gandi.net/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.gandi.net/status_registered_spec.rb @@ -11,150 +11,99 @@ # require 'spec_helper' -require 'whois/parsers/whois.gandi.net.rb' -describe Whois::Parsers::WhoisGandiNet, "status_registered.expected" do +describe "whois.gandi.net", :aggregate_failures do subject do file = fixture("responses", "whois.gandi.net/status_registered.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.gandi.net") + Whois::Parser.parser_for(part) end - describe "#domain" do - it do - expect(subject.domain).to eq("gandi.net") - end - end - describe "#domain_id" do - it do - expect(subject.domain_id).to eq("6683836_DOMAIN_NET-VRSN") - end - end - describe "#status" do - it do - expect(subject.status).to eq(:registered) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(false) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(true) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to be_a(Time) - expect(subject.created_on).to eq(DateTime.parse("2000-02-23 12:12:59 UTC")) - end - end - describe "#updated_on" do - it do - expect(subject.updated_on).to be_a(Time) - expect(subject.updated_on).to eq(DateTime.parse("2013-10-23 18:42:52 UTC")) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to be_a(Time) - expect(subject.expires_on).to eq(DateTime.parse("2023-05-21 14:09:56 UTC")) - end - end - describe "#registrar" do - it do - expect(subject.registrar).to be_a(Whois::Parser::Registrar) - expect(subject.registrar.id).to eq("81") - expect(subject.registrar.name).to eq("GANDI SAS") - expect(subject.registrar.url).to eq("http://www.gandi.net") - end - end - describe "#registrant_contacts" do - it do - expect(subject.registrant_contacts).to be_a(Array) - expect(subject.registrant_contacts.size).to eq(1) - expect(subject.registrant_contacts[0]).to be_a(Whois::Parser::Contact) - expect(subject.registrant_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_REGISTRANT) - expect(subject.registrant_contacts[0].id).to eq(nil) - expect(subject.registrant_contacts[0].name).to eq("Stephan RAMOIN") - expect(subject.registrant_contacts[0].organization).to eq("Gandi SAS") - expect(subject.registrant_contacts[0].address).to eq("63-65 Boulevard Massena") - expect(subject.registrant_contacts[0].city).to eq("Paris") - expect(subject.registrant_contacts[0].zip).to eq("75013") - expect(subject.registrant_contacts[0].country).to eq(nil) - expect(subject.registrant_contacts[0].country_code).to eq("FR") - expect(subject.registrant_contacts[0].phone).to eq("+33.143737851") - expect(subject.registrant_contacts[0].fax).to eq("+33.143731851") - expect(subject.registrant_contacts[0].email).to eq("61ebd5b3df9f45f2b3f67f6dd01e1049-523678@contact.gandi.net") - expect(subject.registrant_contacts[0].created_on).to eq(nil) - expect(subject.registrant_contacts[0].updated_on).to eq(nil) - end - end - describe "#admin_contacts" do - it do - expect(subject.admin_contacts).to be_a(Array) - expect(subject.admin_contacts.size).to eq(1) - expect(subject.admin_contacts[0]).to be_a(Whois::Parser::Contact) - expect(subject.admin_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_ADMINISTRATIVE) - expect(subject.admin_contacts[0].id).to eq(nil) - expect(subject.admin_contacts[0].name).to eq("Noc GANDI") - expect(subject.admin_contacts[0].organization).to eq("GANDI SAS") - expect(subject.admin_contacts[0].address).to eq("63-65 Boulevard MASSENA") - expect(subject.admin_contacts[0].city).to eq("Paris") - expect(subject.admin_contacts[0].zip).to eq("75013") - expect(subject.admin_contacts[0].country).to eq(nil) - expect(subject.admin_contacts[0].country_code).to eq("FR") - expect(subject.admin_contacts[0].phone).to eq("+33.143737851") - expect(subject.admin_contacts[0].fax).to eq("+33.143731851") - expect(subject.admin_contacts[0].email).to eq("12e7da77f638acdf8d9f4d0b828ca80c-248842@contact.gandi.net") - expect(subject.admin_contacts[0].created_on).to eq(nil) - expect(subject.admin_contacts[0].updated_on).to eq(nil) - end - end - describe "#technical_contacts" do - it do - expect(subject.technical_contacts).to be_a(Array) - expect(subject.technical_contacts.size).to eq(1) - expect(subject.technical_contacts[0]).to be_a(Whois::Parser::Contact) - expect(subject.technical_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_TECHNICAL) - expect(subject.technical_contacts[0].id).to eq(nil) - expect(subject.technical_contacts[0].name).to eq("Noc GANDI") - expect(subject.technical_contacts[0].organization).to eq("GANDI SAS") - expect(subject.technical_contacts[0].address).to eq("63-65 Boulevard MASSENA") - expect(subject.technical_contacts[0].city).to eq("Paris") - expect(subject.technical_contacts[0].zip).to eq("75013") - expect(subject.technical_contacts[0].country).to eq(nil) - expect(subject.technical_contacts[0].country_code).to eq("FR") - expect(subject.technical_contacts[0].phone).to eq("+33.143737851") - expect(subject.technical_contacts[0].fax).to eq("+33.143731851") - expect(subject.technical_contacts[0].email).to eq("12e7da77f638acdf8d9f4d0b828ca80c-248842@contact.gandi.net") - expect(subject.technical_contacts[0].created_on).to eq(nil) - expect(subject.technical_contacts[0].updated_on).to eq(nil) - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers.size).to eq(4) - expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[0].name).to eq("dns0.gandi.net") - expect(subject.nameservers[0].ipv4).to eq(nil) - expect(subject.nameservers[0].ipv6).to eq(nil) - expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[1].name).to eq("dns1.gandi.net") - expect(subject.nameservers[1].ipv4).to eq(nil) - expect(subject.nameservers[1].ipv6).to eq(nil) - expect(subject.nameservers[2]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[2].name).to eq("dns2.gandi.net") - expect(subject.nameservers[2].ipv4).to eq(nil) - expect(subject.nameservers[2].ipv6).to eq(nil) - expect(subject.nameservers[3]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[3].name).to eq("dns3.gandi.net") - expect(subject.nameservers[3].ipv4).to eq(nil) - expect(subject.nameservers[3].ipv6).to eq(nil) - end + it "matches status_registered.expected" do + expect(subject.domain).to eq("gandi.net") + expect(subject.domain_id).to eq("6683836_DOMAIN_NET-VRSN") + expect(subject.status).to eq(:registered) + expect(subject.available?).to eq(false) + expect(subject.registered?).to eq(true) + expect(subject.created_on).to be_a(Time) + expect(subject.created_on).to eq(DateTime.parse("2000-02-23 12:12:59 UTC")) + expect(subject.updated_on).to be_a(Time) + expect(subject.updated_on).to eq(DateTime.parse("2013-10-23 18:42:52 UTC")) + expect(subject.expires_on).to be_a(Time) + expect(subject.expires_on).to eq(DateTime.parse("2023-05-21 14:09:56 UTC")) + expect(subject.registrar).to be_a(Whois::Parser::Registrar) + expect(subject.registrar.id).to eq("81") + expect(subject.registrar.name).to eq("GANDI SAS") + expect(subject.registrar.url).to eq("http://www.gandi.net") + expect(subject.registrant_contacts).to be_a(Array) + expect(subject.registrant_contacts.size).to eq(1) + expect(subject.registrant_contacts[0]).to be_a(Whois::Parser::Contact) + expect(subject.registrant_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_REGISTRANT) + expect(subject.registrant_contacts[0].id).to eq(nil) + expect(subject.registrant_contacts[0].name).to eq("Stephan RAMOIN") + expect(subject.registrant_contacts[0].organization).to eq("Gandi SAS") + expect(subject.registrant_contacts[0].address).to eq("63-65 Boulevard Massena") + expect(subject.registrant_contacts[0].city).to eq("Paris") + expect(subject.registrant_contacts[0].zip).to eq("75013") + expect(subject.registrant_contacts[0].country).to eq(nil) + expect(subject.registrant_contacts[0].country_code).to eq("FR") + expect(subject.registrant_contacts[0].phone).to eq("+33.143737851") + expect(subject.registrant_contacts[0].fax).to eq("+33.143731851") + expect(subject.registrant_contacts[0].email).to eq("61ebd5b3df9f45f2b3f67f6dd01e1049-523678@contact.gandi.net") + expect(subject.registrant_contacts[0].created_on).to eq(nil) + expect(subject.registrant_contacts[0].updated_on).to eq(nil) + expect(subject.admin_contacts).to be_a(Array) + expect(subject.admin_contacts.size).to eq(1) + expect(subject.admin_contacts[0]).to be_a(Whois::Parser::Contact) + expect(subject.admin_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_ADMINISTRATIVE) + expect(subject.admin_contacts[0].id).to eq(nil) + expect(subject.admin_contacts[0].name).to eq("Noc GANDI") + expect(subject.admin_contacts[0].organization).to eq("GANDI SAS") + expect(subject.admin_contacts[0].address).to eq("63-65 Boulevard MASSENA") + expect(subject.admin_contacts[0].city).to eq("Paris") + expect(subject.admin_contacts[0].zip).to eq("75013") + expect(subject.admin_contacts[0].country).to eq(nil) + expect(subject.admin_contacts[0].country_code).to eq("FR") + expect(subject.admin_contacts[0].phone).to eq("+33.143737851") + expect(subject.admin_contacts[0].fax).to eq("+33.143731851") + expect(subject.admin_contacts[0].email).to eq("12e7da77f638acdf8d9f4d0b828ca80c-248842@contact.gandi.net") + expect(subject.admin_contacts[0].created_on).to eq(nil) + expect(subject.admin_contacts[0].updated_on).to eq(nil) + expect(subject.technical_contacts).to be_a(Array) + expect(subject.technical_contacts.size).to eq(1) + expect(subject.technical_contacts[0]).to be_a(Whois::Parser::Contact) + expect(subject.technical_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_TECHNICAL) + expect(subject.technical_contacts[0].id).to eq(nil) + expect(subject.technical_contacts[0].name).to eq("Noc GANDI") + expect(subject.technical_contacts[0].organization).to eq("GANDI SAS") + expect(subject.technical_contacts[0].address).to eq("63-65 Boulevard MASSENA") + expect(subject.technical_contacts[0].city).to eq("Paris") + expect(subject.technical_contacts[0].zip).to eq("75013") + expect(subject.technical_contacts[0].country).to eq(nil) + expect(subject.technical_contacts[0].country_code).to eq("FR") + expect(subject.technical_contacts[0].phone).to eq("+33.143737851") + expect(subject.technical_contacts[0].fax).to eq("+33.143731851") + expect(subject.technical_contacts[0].email).to eq("12e7da77f638acdf8d9f4d0b828ca80c-248842@contact.gandi.net") + expect(subject.technical_contacts[0].created_on).to eq(nil) + expect(subject.technical_contacts[0].updated_on).to eq(nil) + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers.size).to eq(4) + expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[0].name).to eq("dns0.gandi.net") + expect(subject.nameservers[0].ipv4).to eq(nil) + expect(subject.nameservers[0].ipv6).to eq(nil) + expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[1].name).to eq("dns1.gandi.net") + expect(subject.nameservers[1].ipv4).to eq(nil) + expect(subject.nameservers[1].ipv6).to eq(nil) + expect(subject.nameservers[2]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[2].name).to eq("dns2.gandi.net") + expect(subject.nameservers[2].ipv4).to eq(nil) + expect(subject.nameservers[2].ipv6).to eq(nil) + expect(subject.nameservers[3]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[3].name).to eq("dns3.gandi.net") + expect(subject.nameservers[3].ipv4).to eq(nil) + expect(subject.nameservers[3].ipv6).to eq(nil) end end diff --git a/spec/whois/parsers/responses/whois.gg/gg/status_available_spec.rb b/spec/whois/parsers/responses/whois.gg/gg/status_available_spec.rb index da075562..c45b60d9 100644 --- a/spec/whois/parsers/responses/whois.gg/gg/status_available_spec.rb +++ b/spec/whois/parsers/responses/whois.gg/gg/status_available_spec.rb @@ -11,65 +11,26 @@ # require 'spec_helper' -require 'whois/parsers/whois.gg.rb' -describe Whois::Parsers::WhoisGg, "status_available.expected" do +describe "whois.gg", :aggregate_failures do subject do file = fixture("responses", "whois.gg/gg/status_available.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.gg") + Whois::Parser.parser_for(part) end - describe "#domain" do - it do - expect(subject.domain).to eq("u34jedzcq.gg") - end - end - describe "#domain_id" do - it do - expect(subject.domain_id).to eq(nil) - end - end - describe "#status" do - it do - expect(subject.status).to eq(:available) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(true) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(false) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to eq(nil) - end - end - describe "#updated_on" do - it do - expect(subject.updated_on).to eq(nil) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to eq(nil) - end - end - describe "#registrar" do - it do - expect(subject.registrar).to eq(nil) - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers).to eq([]) - end + it "matches status_available.expected" do + expect(subject.domain).to eq("u34jedzcq.gg") + expect(subject.domain_id).to eq(nil) + expect(subject.status).to eq(:available) + expect(subject.available?).to eq(true) + expect(subject.registered?).to eq(false) + expect(subject.created_on).to eq(nil) + expect(subject.updated_on).to eq(nil) + expect(subject.expires_on).to eq(nil) + expect(subject.registrar).to eq(nil) + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers).to eq([]) end end diff --git a/spec/whois/parsers/responses/whois.gg/gg/status_registered_spec.rb b/spec/whois/parsers/responses/whois.gg/gg/status_registered_spec.rb index dcf866dc..91348356 100644 --- a/spec/whois/parsers/responses/whois.gg/gg/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.gg/gg/status_registered_spec.rb @@ -11,69 +11,34 @@ # require 'spec_helper' -require 'whois/parsers/whois.gg.rb' -describe Whois::Parsers::WhoisGg, "status_registered.expected" do +describe "whois.gg", :aggregate_failures do subject do file = fixture("responses", "whois.gg/gg/status_registered.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.gg") + Whois::Parser.parser_for(part) end - describe "#domain" do - it do - expect(subject.domain).to eq("google.gg") - end - end - describe "#domain_id" do - it do - expect(subject.domain_id).to eq("24221-CI") - end - end - describe "#status" do - it do - expect(subject.status).to eq(:registered) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(false) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(true) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to be_a(Time) - expect(subject.created_on).to eq(DateTime.parse("2003-04-30 00:00:00 UTC")) - end - end - describe "#updated_on" do - it do - expect(subject.updated_on).to eq(nil) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to eq(nil) - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers.size).to eq(4) - expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[0].name).to eq("ns1.google.com") - expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[1].name).to eq("ns2.google.com") - expect(subject.nameservers[2]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[2].name).to eq("ns4.google.com") - expect(subject.nameservers[3]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[3].name).to eq("ns3.google.com") - end + it "matches status_registered.expected" do + expect(subject.domain).to eq("google.gg") + expect(subject.domain_id).to eq("24221-CI") + expect(subject.status).to eq(:registered) + expect(subject.available?).to eq(false) + expect(subject.registered?).to eq(true) + expect(subject.created_on).to be_a(Time) + expect(subject.created_on).to eq(DateTime.parse("2003-04-30 00:00:00 UTC")) + expect(subject.updated_on).to eq(nil) + expect(subject.expires_on).to eq(nil) + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers.size).to eq(4) + expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[0].name).to eq("ns1.google.com") + expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[1].name).to eq("ns2.google.com") + expect(subject.nameservers[2]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[2].name).to eq("ns4.google.com") + expect(subject.nameservers[3]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[3].name).to eq("ns3.google.com") end end diff --git a/spec/whois/parsers/responses/whois.godaddy.com/status_registered_spec.rb b/spec/whois/parsers/responses/whois.godaddy.com/status_registered_spec.rb index c1c65f9a..a36317c0 100644 --- a/spec/whois/parsers/responses/whois.godaddy.com/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.godaddy.com/status_registered_spec.rb @@ -11,176 +11,125 @@ # require 'spec_helper' -require 'whois/parsers/whois.godaddy.com.rb' -describe Whois::Parsers::WhoisGodaddyCom, "status_registered.expected" do +describe "whois.godaddy.com", :aggregate_failures do subject do file = fixture("responses", "whois.godaddy.com/status_registered.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.godaddy.com") + Whois::Parser.parser_for(part) end - describe "#domain" do - it do - expect(subject.domain).to eq("godaddy.com") - end - end - describe "#domain_id" do - it do - expect(subject.domain_id).to eq("4013247_DOMAIN_COM-VRSN") - end - end - describe "#status" do - it do - expect(subject.status).to eq(:registered) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(false) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(true) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to be_a(Time) - expect(subject.created_on).to eq(DateTime.parse("1999-03-02 05:00:00 UTC")) - end - end - describe "#updated_on" do - it do - expect(subject.updated_on).to be_a(Time) - expect(subject.updated_on).to eq(DateTime.parse("2013-06-02 12:16:24 UTC")) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to be_a(Time) - expect(subject.expires_on).to eq(DateTime.parse("2021-11-01 11:59:59 UTC")) - end - end - describe "#registrar" do - it do - expect(subject.registrar).to be_a(Whois::Parser::Registrar) - expect(subject.registrar.id).to eq("146") - expect(subject.registrar.name).to eq("GoDaddy.com, LLC") - expect(subject.registrar.url).to eq("http://www.godaddy.com") - end - end - describe "#registrant_contacts" do - it do - expect(subject.registrant_contacts).to be_a(Array) - expect(subject.registrant_contacts.size).to eq(1) - expect(subject.registrant_contacts[0]).to be_a(Whois::Parser::Contact) - expect(subject.registrant_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_REGISTRANT) - expect(subject.registrant_contacts[0].id).to eq("Not Available From Registry") - expect(subject.registrant_contacts[0].name).to eq("Domain Administrator") - expect(subject.registrant_contacts[0].organization).to eq("Go Daddy Operating Company, LLC") - expect(subject.registrant_contacts[0].address).to eq("14455 N Hayden Rd Suite 219") - expect(subject.registrant_contacts[0].city).to eq("Scottsdale") - expect(subject.registrant_contacts[0].zip).to eq("85260") - expect(subject.registrant_contacts[0].state).to eq("Arizona") - expect(subject.registrant_contacts[0].country).to eq(nil) - expect(subject.registrant_contacts[0].country_code).to eq("US") - expect(subject.registrant_contacts[0].phone).to eq("+1.4805058800") - expect(subject.registrant_contacts[0].fax).to eq("+1.4805058844") - expect(subject.registrant_contacts[0].email).to eq("companynames@godaddy.com") - expect(subject.registrant_contacts[0].created_on).to eq(nil) - expect(subject.registrant_contacts[0].updated_on).to eq(nil) - expect(subject.registrant_contacts[0].updated_on).to eq(nil) - end - end - describe "#admin_contacts" do - it do - expect(subject.admin_contacts).to be_a(Array) - expect(subject.admin_contacts.size).to eq(1) - expect(subject.admin_contacts[0]).to be_a(Whois::Parser::Contact) - expect(subject.admin_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_ADMINISTRATIVE) - expect(subject.admin_contacts[0].id).to eq("Not Available From Registry") - expect(subject.admin_contacts[0].name).to eq("Domain Administrator") - expect(subject.admin_contacts[0].organization).to eq("Go Daddy Operating Company, LLC") - expect(subject.admin_contacts[0].address).to eq("14455 N Hayden Rd Suite 219") - expect(subject.admin_contacts[0].city).to eq("Scottsdale") - expect(subject.admin_contacts[0].zip).to eq("85260") - expect(subject.admin_contacts[0].state).to eq("Arizona") - expect(subject.admin_contacts[0].country).to eq(nil) - expect(subject.admin_contacts[0].country_code).to eq("US") - expect(subject.admin_contacts[0].phone).to eq("+1.4805058800") - expect(subject.admin_contacts[0].fax).to eq("+1.4805058844") - expect(subject.admin_contacts[0].email).to eq("companynames@godaddy.com") - expect(subject.admin_contacts[0].created_on).to eq(nil) - expect(subject.admin_contacts[0].updated_on).to eq(nil) - expect(subject.admin_contacts[0].updated_on).to eq(nil) - end - end - describe "#technical_contacts" do - it do - expect(subject.technical_contacts).to be_a(Array) - expect(subject.technical_contacts.size).to eq(1) - expect(subject.technical_contacts[0]).to be_a(Whois::Parser::Contact) - expect(subject.technical_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_TECHNICAL) - expect(subject.technical_contacts[0].id).to eq("Not Available From Registry") - expect(subject.technical_contacts[0].name).to eq("Domain Administrator") - expect(subject.technical_contacts[0].organization).to eq("Go Daddy Operating Company, LLC") - expect(subject.technical_contacts[0].address).to eq("14455 N Hayden Rd Suite 219") - expect(subject.technical_contacts[0].city).to eq("Scottsdale") - expect(subject.technical_contacts[0].zip).to eq("85260") - expect(subject.technical_contacts[0].state).to eq("Arizona") - expect(subject.technical_contacts[0].country).to eq(nil) - expect(subject.technical_contacts[0].country_code).to eq("US") - expect(subject.technical_contacts[0].phone).to eq("+1.4805058800") - expect(subject.technical_contacts[0].fax).to eq("+1.4805058844") - expect(subject.technical_contacts[0].email).to eq("companynames@godaddy.com") - expect(subject.technical_contacts[0].created_on).to eq(nil) - expect(subject.technical_contacts[0].updated_on).to eq(nil) - expect(subject.technical_contacts[0].updated_on).to eq(nil) - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers.size).to eq(9) - expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[0].name).to eq("cns1.godaddy.com") - expect(subject.nameservers[0].ipv4).to eq(nil) - expect(subject.nameservers[0].ipv6).to eq(nil) - expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[1].name).to eq("cns2.godaddy.com") - expect(subject.nameservers[1].ipv4).to eq(nil) - expect(subject.nameservers[1].ipv6).to eq(nil) - expect(subject.nameservers[2]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[2].name).to eq("cns3.godaddy.com") - expect(subject.nameservers[2].ipv4).to eq(nil) - expect(subject.nameservers[2].ipv6).to eq(nil) - expect(subject.nameservers[3]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[3].name).to eq("a11-64.akam.net") - expect(subject.nameservers[3].ipv4).to eq(nil) - expect(subject.nameservers[3].ipv6).to eq(nil) - expect(subject.nameservers[4]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[4].name).to eq("a1-245.akam.net") - expect(subject.nameservers[4].ipv4).to eq(nil) - expect(subject.nameservers[4].ipv6).to eq(nil) - expect(subject.nameservers[5]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[5].name).to eq("a20-65.akam.net") - expect(subject.nameservers[5].ipv4).to eq(nil) - expect(subject.nameservers[5].ipv6).to eq(nil) - expect(subject.nameservers[6]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[6].name).to eq("a6-66.akam.net") - expect(subject.nameservers[6].ipv4).to eq(nil) - expect(subject.nameservers[6].ipv6).to eq(nil) - expect(subject.nameservers[7]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[7].name).to eq("a8-67.akam.net") - expect(subject.nameservers[7].ipv4).to eq(nil) - expect(subject.nameservers[7].ipv6).to eq(nil) - expect(subject.nameservers[8]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[8].name).to eq("a9-67.akam.net") - expect(subject.nameservers[8].ipv4).to eq(nil) - expect(subject.nameservers[8].ipv6).to eq(nil) - end + it "matches status_registered.expected" do + expect(subject.domain).to eq("godaddy.com") + expect(subject.domain_id).to eq("4013247_DOMAIN_COM-VRSN") + expect(subject.status).to eq(:registered) + expect(subject.available?).to eq(false) + expect(subject.registered?).to eq(true) + expect(subject.created_on).to be_a(Time) + expect(subject.created_on).to eq(DateTime.parse("1999-03-02 05:00:00 UTC")) + expect(subject.updated_on).to be_a(Time) + expect(subject.updated_on).to eq(DateTime.parse("2013-06-02 12:16:24 UTC")) + expect(subject.expires_on).to be_a(Time) + expect(subject.expires_on).to eq(DateTime.parse("2021-11-01 11:59:59 UTC")) + expect(subject.registrar).to be_a(Whois::Parser::Registrar) + expect(subject.registrar.id).to eq("146") + expect(subject.registrar.name).to eq("GoDaddy.com, LLC") + expect(subject.registrar.url).to eq("http://www.godaddy.com") + expect(subject.registrant_contacts).to be_a(Array) + expect(subject.registrant_contacts.size).to eq(1) + expect(subject.registrant_contacts[0]).to be_a(Whois::Parser::Contact) + expect(subject.registrant_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_REGISTRANT) + expect(subject.registrant_contacts[0].id).to eq("Not Available From Registry") + expect(subject.registrant_contacts[0].name).to eq("Domain Administrator") + expect(subject.registrant_contacts[0].organization).to eq("Go Daddy Operating Company, LLC") + expect(subject.registrant_contacts[0].address).to eq("14455 N Hayden Rd Suite 219") + expect(subject.registrant_contacts[0].city).to eq("Scottsdale") + expect(subject.registrant_contacts[0].zip).to eq("85260") + expect(subject.registrant_contacts[0].state).to eq("Arizona") + expect(subject.registrant_contacts[0].country).to eq(nil) + expect(subject.registrant_contacts[0].country_code).to eq("US") + expect(subject.registrant_contacts[0].phone).to eq("+1.4805058800") + expect(subject.registrant_contacts[0].fax).to eq("+1.4805058844") + expect(subject.registrant_contacts[0].email).to eq("companynames@godaddy.com") + expect(subject.registrant_contacts[0].created_on).to eq(nil) + expect(subject.registrant_contacts[0].updated_on).to eq(nil) + expect(subject.registrant_contacts[0].updated_on).to eq(nil) + expect(subject.admin_contacts).to be_a(Array) + expect(subject.admin_contacts.size).to eq(1) + expect(subject.admin_contacts[0]).to be_a(Whois::Parser::Contact) + expect(subject.admin_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_ADMINISTRATIVE) + expect(subject.admin_contacts[0].id).to eq("Not Available From Registry") + expect(subject.admin_contacts[0].name).to eq("Domain Administrator") + expect(subject.admin_contacts[0].organization).to eq("Go Daddy Operating Company, LLC") + expect(subject.admin_contacts[0].address).to eq("14455 N Hayden Rd Suite 219") + expect(subject.admin_contacts[0].city).to eq("Scottsdale") + expect(subject.admin_contacts[0].zip).to eq("85260") + expect(subject.admin_contacts[0].state).to eq("Arizona") + expect(subject.admin_contacts[0].country).to eq(nil) + expect(subject.admin_contacts[0].country_code).to eq("US") + expect(subject.admin_contacts[0].phone).to eq("+1.4805058800") + expect(subject.admin_contacts[0].fax).to eq("+1.4805058844") + expect(subject.admin_contacts[0].email).to eq("companynames@godaddy.com") + expect(subject.admin_contacts[0].created_on).to eq(nil) + expect(subject.admin_contacts[0].updated_on).to eq(nil) + expect(subject.admin_contacts[0].updated_on).to eq(nil) + expect(subject.technical_contacts).to be_a(Array) + expect(subject.technical_contacts.size).to eq(1) + expect(subject.technical_contacts[0]).to be_a(Whois::Parser::Contact) + expect(subject.technical_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_TECHNICAL) + expect(subject.technical_contacts[0].id).to eq("Not Available From Registry") + expect(subject.technical_contacts[0].name).to eq("Domain Administrator") + expect(subject.technical_contacts[0].organization).to eq("Go Daddy Operating Company, LLC") + expect(subject.technical_contacts[0].address).to eq("14455 N Hayden Rd Suite 219") + expect(subject.technical_contacts[0].city).to eq("Scottsdale") + expect(subject.technical_contacts[0].zip).to eq("85260") + expect(subject.technical_contacts[0].state).to eq("Arizona") + expect(subject.technical_contacts[0].country).to eq(nil) + expect(subject.technical_contacts[0].country_code).to eq("US") + expect(subject.technical_contacts[0].phone).to eq("+1.4805058800") + expect(subject.technical_contacts[0].fax).to eq("+1.4805058844") + expect(subject.technical_contacts[0].email).to eq("companynames@godaddy.com") + expect(subject.technical_contacts[0].created_on).to eq(nil) + expect(subject.technical_contacts[0].updated_on).to eq(nil) + expect(subject.technical_contacts[0].updated_on).to eq(nil) + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers.size).to eq(9) + expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[0].name).to eq("cns1.godaddy.com") + expect(subject.nameservers[0].ipv4).to eq(nil) + expect(subject.nameservers[0].ipv6).to eq(nil) + expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[1].name).to eq("cns2.godaddy.com") + expect(subject.nameservers[1].ipv4).to eq(nil) + expect(subject.nameservers[1].ipv6).to eq(nil) + expect(subject.nameservers[2]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[2].name).to eq("cns3.godaddy.com") + expect(subject.nameservers[2].ipv4).to eq(nil) + expect(subject.nameservers[2].ipv6).to eq(nil) + expect(subject.nameservers[3]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[3].name).to eq("a11-64.akam.net") + expect(subject.nameservers[3].ipv4).to eq(nil) + expect(subject.nameservers[3].ipv6).to eq(nil) + expect(subject.nameservers[4]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[4].name).to eq("a1-245.akam.net") + expect(subject.nameservers[4].ipv4).to eq(nil) + expect(subject.nameservers[4].ipv6).to eq(nil) + expect(subject.nameservers[5]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[5].name).to eq("a20-65.akam.net") + expect(subject.nameservers[5].ipv4).to eq(nil) + expect(subject.nameservers[5].ipv6).to eq(nil) + expect(subject.nameservers[6]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[6].name).to eq("a6-66.akam.net") + expect(subject.nameservers[6].ipv4).to eq(nil) + expect(subject.nameservers[6].ipv6).to eq(nil) + expect(subject.nameservers[7]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[7].name).to eq("a8-67.akam.net") + expect(subject.nameservers[7].ipv4).to eq(nil) + expect(subject.nameservers[7].ipv6).to eq(nil) + expect(subject.nameservers[8]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[8].name).to eq("a9-67.akam.net") + expect(subject.nameservers[8].ipv4).to eq(nil) + expect(subject.nameservers[8].ipv6).to eq(nil) end end diff --git a/spec/whois/parsers/responses/whois.gov.za/gov.za/status_available_spec.rb b/spec/whois/parsers/responses/whois.gov.za/gov.za/status_available_spec.rb index 05d22c13..d22098e6 100644 --- a/spec/whois/parsers/responses/whois.gov.za/gov.za/status_available_spec.rb +++ b/spec/whois/parsers/responses/whois.gov.za/gov.za/status_available_spec.rb @@ -11,49 +11,22 @@ # require 'spec_helper' -require 'whois/parsers/whois.gov.za.rb' -describe Whois::Parsers::WhoisGovZa, "status_available.expected" do +describe "whois.gov.za", :aggregate_failures do subject do file = fixture("responses", "whois.gov.za/gov.za/status_available.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.gov.za") + Whois::Parser.parser_for(part) end - describe "#status" do - it do - expect(subject.status).to eq(:available) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(true) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(false) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to eq(nil) - end - end - describe "#updated_on" do - it do - expect { subject.updated_on }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#expires_on" do - it do - expect { subject.expires_on }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#nameservers" do - it do - expect { subject.nameservers }.to raise_error(Whois::AttributeNotSupported) - end + it "matches status_available.expected" do + expect(subject.status).to eq(:available) + expect(subject.available?).to eq(true) + expect(subject.registered?).to eq(false) + expect(subject.created_on).to eq(nil) + expect { subject.updated_on }.to raise_error(Whois::AttributeNotSupported) + expect { subject.expires_on }.to raise_error(Whois::AttributeNotSupported) + expect { subject.nameservers }.to raise_error(Whois::AttributeNotSupported) end end diff --git a/spec/whois/parsers/responses/whois.gov.za/gov.za/status_registered_spec.rb b/spec/whois/parsers/responses/whois.gov.za/gov.za/status_registered_spec.rb index 84f5f226..38611a02 100644 --- a/spec/whois/parsers/responses/whois.gov.za/gov.za/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.gov.za/gov.za/status_registered_spec.rb @@ -11,50 +11,23 @@ # require 'spec_helper' -require 'whois/parsers/whois.gov.za.rb' -describe Whois::Parsers::WhoisGovZa, "status_registered.expected" do +describe "whois.gov.za", :aggregate_failures do subject do file = fixture("responses", "whois.gov.za/gov.za/status_registered.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.gov.za") + Whois::Parser.parser_for(part) end - describe "#status" do - it do - expect(subject.status).to eq(:registered) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(false) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(true) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to be_a(Time) - expect(subject.created_on).to eq(DateTime.parse("2012-09-03")) - end - end - describe "#updated_on" do - it do - expect { subject.updated_on }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#expires_on" do - it do - expect { subject.expires_on }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#nameservers" do - it do - expect { subject.nameservers }.to raise_error(Whois::AttributeNotSupported) - end + it "matches status_registered.expected" do + expect(subject.status).to eq(:registered) + expect(subject.available?).to eq(false) + expect(subject.registered?).to eq(true) + expect(subject.created_on).to be_a(Time) + expect(subject.created_on).to eq(DateTime.parse("2012-09-03")) + expect { subject.updated_on }.to raise_error(Whois::AttributeNotSupported) + expect { subject.expires_on }.to raise_error(Whois::AttributeNotSupported) + expect { subject.nameservers }.to raise_error(Whois::AttributeNotSupported) end end diff --git a/spec/whois/parsers/responses/whois.hkirc.hk/hk/property_expires_on_null_spec.rb b/spec/whois/parsers/responses/whois.hkirc.hk/hk/property_expires_on_null_spec.rb index 3658a633..4331f0c1 100644 --- a/spec/whois/parsers/responses/whois.hkirc.hk/hk/property_expires_on_null_spec.rb +++ b/spec/whois/parsers/responses/whois.hkirc.hk/hk/property_expires_on_null_spec.rb @@ -11,19 +11,16 @@ # require 'spec_helper' -require 'whois/parsers/whois.hkirc.hk.rb' -describe Whois::Parsers::WhoisHkircHk, "property_expires_on_null.expected" do +describe "whois.hkirc.hk", :aggregate_failures do subject do file = fixture("responses", "whois.hkirc.hk/hk/property_expires_on_null.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.hkirc.hk") + Whois::Parser.parser_for(part) end - describe "#expires_on" do - it do - expect(subject.expires_on).to eq(nil) - end + it "matches property_expires_on_null.expected" do + expect(subject.expires_on).to eq(nil) end end diff --git a/spec/whois/parsers/responses/whois.hkirc.hk/hk/status_available_spec.rb b/spec/whois/parsers/responses/whois.hkirc.hk/hk/status_available_spec.rb index 58bc4db0..39ae1a39 100644 --- a/spec/whois/parsers/responses/whois.hkirc.hk/hk/status_available_spec.rb +++ b/spec/whois/parsers/responses/whois.hkirc.hk/hk/status_available_spec.rb @@ -11,50 +11,23 @@ # require 'spec_helper' -require 'whois/parsers/whois.hkirc.hk.rb' -describe Whois::Parsers::WhoisHkircHk, "status_available.expected" do +describe "whois.hkirc.hk", :aggregate_failures do subject do file = fixture("responses", "whois.hkirc.hk/hk/status_available.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.hkirc.hk") + Whois::Parser.parser_for(part) end - describe "#status" do - it do - expect(subject.status).to eq(:available) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(true) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(false) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to eq(nil) - end - end - describe "#updated_on" do - it do - expect { subject.updated_on }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to eq(nil) - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers).to eq([]) - end + it "matches status_available.expected" do + expect(subject.status).to eq(:available) + expect(subject.available?).to eq(true) + expect(subject.registered?).to eq(false) + expect(subject.created_on).to eq(nil) + expect { subject.updated_on }.to raise_error(Whois::AttributeNotSupported) + expect(subject.expires_on).to eq(nil) + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers).to eq([]) end end diff --git a/spec/whois/parsers/responses/whois.hkirc.hk/hk/status_registered_spec.rb b/spec/whois/parsers/responses/whois.hkirc.hk/hk/status_registered_spec.rb index c0bc0d9f..e687f85f 100644 --- a/spec/whois/parsers/responses/whois.hkirc.hk/hk/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.hkirc.hk/hk/status_registered_spec.rb @@ -11,60 +11,33 @@ # require 'spec_helper' -require 'whois/parsers/whois.hkirc.hk.rb' -describe Whois::Parsers::WhoisHkircHk, "status_registered.expected" do +describe "whois.hkirc.hk", :aggregate_failures do subject do file = fixture("responses", "whois.hkirc.hk/hk/status_registered.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.hkirc.hk") + Whois::Parser.parser_for(part) end - describe "#status" do - it do - expect(subject.status).to eq(:registered) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(false) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(true) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to be_a(Time) - expect(subject.created_on).to eq(DateTime.parse("2004-04-06")) - end - end - describe "#updated_on" do - it do - expect { subject.updated_on }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to be_a(Time) - expect(subject.expires_on).to eq(DateTime.parse("2014-03-31")) - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers.size).to eq(4) - expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[0].name).to eq("ns1.google.com") - expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[1].name).to eq("ns2.google.com") - expect(subject.nameservers[2]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[2].name).to eq("ns3.google.com") - expect(subject.nameservers[3]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[3].name).to eq("ns4.google.com") - end + it "matches status_registered.expected" do + expect(subject.status).to eq(:registered) + expect(subject.available?).to eq(false) + expect(subject.registered?).to eq(true) + expect(subject.created_on).to be_a(Time) + expect(subject.created_on).to eq(DateTime.parse("2004-04-06")) + expect { subject.updated_on }.to raise_error(Whois::AttributeNotSupported) + expect(subject.expires_on).to be_a(Time) + expect(subject.expires_on).to eq(DateTime.parse("2014-03-31")) + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers.size).to eq(4) + expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[0].name).to eq("ns1.google.com") + expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[1].name).to eq("ns2.google.com") + expect(subject.nameservers[2]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[2].name).to eq("ns3.google.com") + expect(subject.nameservers[3]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[3].name).to eq("ns4.google.com") end end diff --git a/spec/whois/parsers/responses/whois.iana.org/int/status_available_spec.rb b/spec/whois/parsers/responses/whois.iana.org/int/status_available_spec.rb index ee3388fe..f8ec442e 100644 --- a/spec/whois/parsers/responses/whois.iana.org/int/status_available_spec.rb +++ b/spec/whois/parsers/responses/whois.iana.org/int/status_available_spec.rb @@ -11,68 +11,29 @@ # require 'spec_helper' -require 'whois/parsers/whois.iana.org.rb' -describe Whois::Parsers::WhoisIanaOrg, "status_available.expected" do +describe "whois.iana.org", :aggregate_failures do subject do file = fixture("responses", "whois.iana.org/int/status_available.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.iana.org") + Whois::Parser.parser_for(part) end - describe "#status" do - it do - expect(subject.status).to eq(:available) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(true) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(false) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to eq(nil) - end - end - describe "#updated_on" do - it do - expect(subject.updated_on).to eq(nil) - end - end - describe "#expires_on" do - it do - expect { subject.expires_on }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#registrant_contacts" do - it do - expect(subject.registrant_contacts).to be_a(Array) - expect(subject.registrant_contacts).to eq([]) - end - end - describe "#admin_contacts" do - it do - expect(subject.admin_contacts).to be_a(Array) - expect(subject.admin_contacts).to eq([]) - end - end - describe "#technical_contacts" do - it do - expect(subject.technical_contacts).to be_a(Array) - expect(subject.technical_contacts).to eq([]) - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers).to eq([]) - end + it "matches status_available.expected" do + expect(subject.status).to eq(:available) + expect(subject.available?).to eq(true) + expect(subject.registered?).to eq(false) + expect(subject.created_on).to eq(nil) + expect(subject.updated_on).to eq(nil) + expect { subject.expires_on }.to raise_error(Whois::AttributeNotSupported) + expect(subject.registrant_contacts).to be_a(Array) + expect(subject.registrant_contacts).to eq([]) + expect(subject.admin_contacts).to be_a(Array) + expect(subject.admin_contacts).to eq([]) + expect(subject.technical_contacts).to be_a(Array) + expect(subject.technical_contacts).to eq([]) + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers).to eq([]) end end diff --git a/spec/whois/parsers/responses/whois.iana.org/int/status_registered_spec.rb b/spec/whois/parsers/responses/whois.iana.org/int/status_registered_spec.rb index b8517a25..ba40ffc8 100644 --- a/spec/whois/parsers/responses/whois.iana.org/int/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.iana.org/int/status_registered_spec.rb @@ -11,136 +11,97 @@ # require 'spec_helper' -require 'whois/parsers/whois.iana.org.rb' -describe Whois::Parsers::WhoisIanaOrg, "status_registered.expected" do +describe "whois.iana.org", :aggregate_failures do subject do file = fixture("responses", "whois.iana.org/int/status_registered.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.iana.org") + Whois::Parser.parser_for(part) end - describe "#status" do - it do - expect(subject.status).to eq(:registered) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(false) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(true) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to be_a(Time) - expect(subject.created_on).to eq(DateTime.parse("1997-08-26")) - end - end - describe "#updated_on" do - it do - expect(subject.updated_on).to be_a(Time) - expect(subject.updated_on).to eq(DateTime.parse("2012-08-07")) - end - end - describe "#expires_on" do - it do - expect { subject.expires_on }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#registrant_contacts" do - it do - expect(subject.registrant_contacts).to be_a(Array) - expect(subject.registrant_contacts.size).to eq(1) - expect(subject.registrant_contacts[0]).to be_a(Whois::Parser::Contact) - expect(subject.registrant_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_REGISTRANT) - expect(subject.registrant_contacts[0].id).to eq(nil) - expect(subject.registrant_contacts[0].name).to eq(nil) - expect(subject.registrant_contacts[0].organization).to eq("North Atlantic Treaty Organization") - expect(subject.registrant_contacts[0].address).to eq("Blvd Leopold III") - expect(subject.registrant_contacts[0].city).to eq("1110 Brussels") - expect(subject.registrant_contacts[0].zip).to eq("Brussels") - expect(subject.registrant_contacts[0].country).to eq("Belgium") - expect(subject.registrant_contacts[0].country_code).to eq(nil) - expect(subject.registrant_contacts[0].phone).to eq(nil) - expect(subject.registrant_contacts[0].fax).to eq(nil) - expect(subject.registrant_contacts[0].email).to eq(nil) - expect(subject.registrant_contacts[0].created_on).to eq(nil) - expect(subject.registrant_contacts[0].updated_on).to eq(nil) - end - end - describe "#admin_contacts" do - it do - expect(subject.admin_contacts).to be_a(Array) - expect(subject.admin_contacts.size).to eq(1) - expect(subject.admin_contacts[0]).to be_a(Whois::Parser::Contact) - expect(subject.admin_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_ADMINISTRATIVE) - expect(subject.admin_contacts[0].id).to eq(nil) - expect(subject.admin_contacts[0].name).to eq("Aidan Murdock") - expect(subject.admin_contacts[0].organization).to eq(nil) - expect(subject.admin_contacts[0].address).to eq("SHAPE") - expect(subject.admin_contacts[0].city).to eq("NCIA SP SDD SAS NAR") - expect(subject.admin_contacts[0].zip).to eq("Mons Hainaut 7010") - expect(subject.admin_contacts[0].country).to eq("Belgium") - expect(subject.admin_contacts[0].country_code).to eq(nil) - expect(subject.admin_contacts[0].phone).to eq("+32 65 44 9168") - expect(subject.admin_contacts[0].fax).to eq("+32 65 44 9480") - expect(subject.admin_contacts[0].email).to eq("aidan.murdock@ncia.nato.int") - expect(subject.admin_contacts[0].created_on).to eq(nil) - expect(subject.admin_contacts[0].updated_on).to eq(nil) - end - end - describe "#technical_contacts" do - it do - expect(subject.technical_contacts).to be_a(Array) - expect(subject.technical_contacts.size).to eq(1) - expect(subject.technical_contacts[0]).to be_a(Whois::Parser::Contact) - expect(subject.technical_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_TECHNICAL) - expect(subject.technical_contacts[0].id).to eq(nil) - expect(subject.technical_contacts[0].name).to eq("Francesco Conserva") - expect(subject.technical_contacts[0].organization).to eq(nil) - expect(subject.technical_contacts[0].address).to eq("SHAPE") - expect(subject.technical_contacts[0].city).to eq("NCIA SP SMD ENT EMA") - expect(subject.technical_contacts[0].zip).to eq("Mons Hainaut 7010") - expect(subject.technical_contacts[0].country).to eq("Belgium") - expect(subject.technical_contacts[0].country_code).to eq(nil) - expect(subject.technical_contacts[0].phone).to eq("+32 65 44 7534") - expect(subject.technical_contacts[0].fax).to eq("+32 65 44 7556") - expect(subject.technical_contacts[0].email).to eq("francesco.conserva@ncia.nato.int") - expect(subject.technical_contacts[0].created_on).to eq(nil) - expect(subject.technical_contacts[0].updated_on).to eq(nil) - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers.size).to eq(7) - expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[0].name).to eq("globe.nc3a.nato.int") - expect(subject.nameservers[0].ipv4).to eq("192.41.140.178") - expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[1].name).to eq("max.nra.nato.int") - expect(subject.nameservers[1].ipv4).to eq("192.101.252.69") - expect(subject.nameservers[2]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[2].name).to eq("maxima.nra.nato.int") - expect(subject.nameservers[2].ipv4).to eq("193.110.130.68") - expect(subject.nameservers[3]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[3].name).to eq("ns.namsa.nato.int") - expect(subject.nameservers[3].ipv4).to eq("193.168.11.15") - expect(subject.nameservers[4]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[4].name).to eq("ns.saclantc.nato.int") - expect(subject.nameservers[4].ipv4).to eq("192.106.197.1") - expect(subject.nameservers[5]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[5].name).to eq("ns1.cs.ucl.ac.uk") - expect(subject.nameservers[5].ipv4).to eq("128.16.5.32") - expect(subject.nameservers[6]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[6].name).to eq("ns1.drenet.dnd.ca") - expect(subject.nameservers[6].ipv4).to eq("131.136.242.3") - end + it "matches status_registered.expected" do + expect(subject.status).to eq(:registered) + expect(subject.available?).to eq(false) + expect(subject.registered?).to eq(true) + expect(subject.created_on).to be_a(Time) + expect(subject.created_on).to eq(DateTime.parse("1997-08-26")) + expect(subject.updated_on).to be_a(Time) + expect(subject.updated_on).to eq(DateTime.parse("2012-08-07")) + expect { subject.expires_on }.to raise_error(Whois::AttributeNotSupported) + expect(subject.registrant_contacts).to be_a(Array) + expect(subject.registrant_contacts.size).to eq(1) + expect(subject.registrant_contacts[0]).to be_a(Whois::Parser::Contact) + expect(subject.registrant_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_REGISTRANT) + expect(subject.registrant_contacts[0].id).to eq(nil) + expect(subject.registrant_contacts[0].name).to eq(nil) + expect(subject.registrant_contacts[0].organization).to eq("North Atlantic Treaty Organization") + expect(subject.registrant_contacts[0].address).to eq("Blvd Leopold III") + expect(subject.registrant_contacts[0].city).to eq("1110 Brussels") + expect(subject.registrant_contacts[0].zip).to eq("Brussels") + expect(subject.registrant_contacts[0].country).to eq("Belgium") + expect(subject.registrant_contacts[0].country_code).to eq(nil) + expect(subject.registrant_contacts[0].phone).to eq(nil) + expect(subject.registrant_contacts[0].fax).to eq(nil) + expect(subject.registrant_contacts[0].email).to eq(nil) + expect(subject.registrant_contacts[0].created_on).to eq(nil) + expect(subject.registrant_contacts[0].updated_on).to eq(nil) + expect(subject.admin_contacts).to be_a(Array) + expect(subject.admin_contacts.size).to eq(1) + expect(subject.admin_contacts[0]).to be_a(Whois::Parser::Contact) + expect(subject.admin_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_ADMINISTRATIVE) + expect(subject.admin_contacts[0].id).to eq(nil) + expect(subject.admin_contacts[0].name).to eq("Aidan Murdock") + expect(subject.admin_contacts[0].organization).to eq(nil) + expect(subject.admin_contacts[0].address).to eq("SHAPE") + expect(subject.admin_contacts[0].city).to eq("NCIA SP SDD SAS NAR") + expect(subject.admin_contacts[0].zip).to eq("Mons Hainaut 7010") + expect(subject.admin_contacts[0].country).to eq("Belgium") + expect(subject.admin_contacts[0].country_code).to eq(nil) + expect(subject.admin_contacts[0].phone).to eq("+32 65 44 9168") + expect(subject.admin_contacts[0].fax).to eq("+32 65 44 9480") + expect(subject.admin_contacts[0].email).to eq("aidan.murdock@ncia.nato.int") + expect(subject.admin_contacts[0].created_on).to eq(nil) + expect(subject.admin_contacts[0].updated_on).to eq(nil) + expect(subject.technical_contacts).to be_a(Array) + expect(subject.technical_contacts.size).to eq(1) + expect(subject.technical_contacts[0]).to be_a(Whois::Parser::Contact) + expect(subject.technical_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_TECHNICAL) + expect(subject.technical_contacts[0].id).to eq(nil) + expect(subject.technical_contacts[0].name).to eq("Francesco Conserva") + expect(subject.technical_contacts[0].organization).to eq(nil) + expect(subject.technical_contacts[0].address).to eq("SHAPE") + expect(subject.technical_contacts[0].city).to eq("NCIA SP SMD ENT EMA") + expect(subject.technical_contacts[0].zip).to eq("Mons Hainaut 7010") + expect(subject.technical_contacts[0].country).to eq("Belgium") + expect(subject.technical_contacts[0].country_code).to eq(nil) + expect(subject.technical_contacts[0].phone).to eq("+32 65 44 7534") + expect(subject.technical_contacts[0].fax).to eq("+32 65 44 7556") + expect(subject.technical_contacts[0].email).to eq("francesco.conserva@ncia.nato.int") + expect(subject.technical_contacts[0].created_on).to eq(nil) + expect(subject.technical_contacts[0].updated_on).to eq(nil) + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers.size).to eq(7) + expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[0].name).to eq("globe.nc3a.nato.int") + expect(subject.nameservers[0].ipv4).to eq("192.41.140.178") + expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[1].name).to eq("max.nra.nato.int") + expect(subject.nameservers[1].ipv4).to eq("192.101.252.69") + expect(subject.nameservers[2]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[2].name).to eq("maxima.nra.nato.int") + expect(subject.nameservers[2].ipv4).to eq("193.110.130.68") + expect(subject.nameservers[3]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[3].name).to eq("ns.namsa.nato.int") + expect(subject.nameservers[3].ipv4).to eq("193.168.11.15") + expect(subject.nameservers[4]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[4].name).to eq("ns.saclantc.nato.int") + expect(subject.nameservers[4].ipv4).to eq("192.106.197.1") + expect(subject.nameservers[5]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[5].name).to eq("ns1.cs.ucl.ac.uk") + expect(subject.nameservers[5].ipv4).to eq("128.16.5.32") + expect(subject.nameservers[6]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[6].name).to eq("ns1.drenet.dnd.ca") + expect(subject.nameservers[6].ipv4).to eq("131.136.242.3") end end diff --git a/spec/whois/parsers/responses/whois.iana.org/tld/status_not_assigned_spec.rb b/spec/whois/parsers/responses/whois.iana.org/tld/status_not_assigned_spec.rb index 011fe0e6..75cc2447 100644 --- a/spec/whois/parsers/responses/whois.iana.org/tld/status_not_assigned_spec.rb +++ b/spec/whois/parsers/responses/whois.iana.org/tld/status_not_assigned_spec.rb @@ -11,69 +11,30 @@ # require 'spec_helper' -require 'whois/parsers/whois.iana.org.rb' -describe Whois::Parsers::WhoisIanaOrg, "status_not_assigned.expected" do +describe "whois.iana.org", :aggregate_failures do subject do file = fixture("responses", "whois.iana.org/tld/status_not_assigned.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.iana.org") + Whois::Parser.parser_for(part) end - describe "#status" do - it do - expect(subject.status).to eq(:available) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(true) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(false) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to eq(nil) - end - end - describe "#updated_on" do - it do - expect(subject.updated_on).to be_a(Time) - expect(subject.updated_on).to eq(DateTime.parse("1999-09-27")) - end - end - describe "#expires_on" do - it do - expect { subject.expires_on }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#registrant_contacts" do - it do - expect(subject.registrant_contacts).to be_a(Array) - expect(subject.registrant_contacts).to eq([]) - end - end - describe "#admin_contacts" do - it do - expect(subject.admin_contacts).to be_a(Array) - expect(subject.admin_contacts).to eq([]) - end - end - describe "#technical_contacts" do - it do - expect(subject.technical_contacts).to be_a(Array) - expect(subject.technical_contacts).to eq([]) - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers).to eq([]) - end + it "matches status_not_assigned.expected" do + expect(subject.status).to eq(:available) + expect(subject.available?).to eq(true) + expect(subject.registered?).to eq(false) + expect(subject.created_on).to eq(nil) + expect(subject.updated_on).to be_a(Time) + expect(subject.updated_on).to eq(DateTime.parse("1999-09-27")) + expect { subject.expires_on }.to raise_error(Whois::AttributeNotSupported) + expect(subject.registrant_contacts).to be_a(Array) + expect(subject.registrant_contacts).to eq([]) + expect(subject.admin_contacts).to be_a(Array) + expect(subject.admin_contacts).to eq([]) + expect(subject.technical_contacts).to be_a(Array) + expect(subject.technical_contacts).to eq([]) + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers).to eq([]) end end diff --git a/spec/whois/parsers/responses/whois.iis.nu/nu/status_available_spec.rb b/spec/whois/parsers/responses/whois.iis.nu/nu/status_available_spec.rb index 63a03386..eb8c5fc2 100644 --- a/spec/whois/parsers/responses/whois.iis.nu/nu/status_available_spec.rb +++ b/spec/whois/parsers/responses/whois.iis.nu/nu/status_available_spec.rb @@ -11,88 +11,33 @@ # require 'spec_helper' -require 'whois/parsers/whois.iis.nu.rb' -describe Whois::Parsers::WhoisIisNu, "status_available.expected" do +describe "whois.iis.nu", :aggregate_failures do subject do file = fixture("responses", "whois.iis.nu/nu/status_available.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.iis.nu") + Whois::Parser.parser_for(part) end - describe "#disclaimer" do - it do - expect(subject.disclaimer).to eq("Copyright (c) 1997- .SE (The Internet Infrastructure Foundation). All rights reserved. The information obtained through searches, or otherwise, is protected by the Swedish Copyright Act (1960:729) and international conventions. It is also subject to database protection according to the Swedish Copyright Act. # Any use of this material to target advertising or similar activities is forbidden and will be prosecuted. If any of the information below is transferred to a third party, it must be done in its entirety. This server must not be used as a backend for a search engine. Result of search for registered domain names under the .nu top level domain. This whois printout is printed with UTF-8 encoding.") - end - end - describe "#domain" do - it do - expect(subject.domain).to eq(nil) - end - end - describe "#domain_id" do - it do - expect { subject.domain_id }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#status" do - it do - expect(subject.status).to eq(:available) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(true) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(false) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to eq(nil) - end - end - describe "#updated_on" do - it do - expect(subject.updated_on).to eq(nil) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to eq(nil) - end - end - describe "#registrar" do - it do - expect(subject.registrar).to eq(nil) - end - end - describe "#registrant_contacts" do - it do - expect(subject.registrant_contacts).to be_a(Array) - expect(subject.registrant_contacts).to eq([]) - end - end - describe "#admin_contacts" do - it do - expect(subject.admin_contacts).to be_a(Array) - expect(subject.admin_contacts).to eq([]) - end - end - describe "#technical_contacts" do - it do - expect(subject.technical_contacts).to be_a(Array) - expect(subject.technical_contacts).to eq([]) - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers).to eq([]) - end + it "matches status_available.expected" do + expect(subject.disclaimer).to eq("Copyright (c) 1997- .SE (The Internet Infrastructure Foundation). All rights reserved. The information obtained through searches, or otherwise, is protected by the Swedish Copyright Act (1960:729) and international conventions. It is also subject to database protection according to the Swedish Copyright Act. # Any use of this material to target advertising or similar activities is forbidden and will be prosecuted. If any of the information below is transferred to a third party, it must be done in its entirety. This server must not be used as a backend for a search engine. Result of search for registered domain names under the .nu top level domain. This whois printout is printed with UTF-8 encoding.") + expect(subject.domain).to eq(nil) + expect { subject.domain_id }.to raise_error(Whois::AttributeNotSupported) + expect(subject.status).to eq(:available) + expect(subject.available?).to eq(true) + expect(subject.registered?).to eq(false) + expect(subject.created_on).to eq(nil) + expect(subject.updated_on).to eq(nil) + expect(subject.expires_on).to eq(nil) + expect(subject.registrar).to eq(nil) + expect(subject.registrant_contacts).to be_a(Array) + expect(subject.registrant_contacts).to eq([]) + expect(subject.admin_contacts).to be_a(Array) + expect(subject.admin_contacts).to eq([]) + expect(subject.technical_contacts).to be_a(Array) + expect(subject.technical_contacts).to eq([]) + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers).to eq([]) end end diff --git a/spec/whois/parsers/responses/whois.iis.nu/nu/status_registered_spec.rb b/spec/whois/parsers/responses/whois.iis.nu/nu/status_registered_spec.rb index 6d3d1811..449f3c48 100644 --- a/spec/whois/parsers/responses/whois.iis.nu/nu/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.iis.nu/nu/status_registered_spec.rb @@ -11,113 +11,58 @@ # require 'spec_helper' -require 'whois/parsers/whois.iis.nu.rb' -describe Whois::Parsers::WhoisIisNu, "status_registered.expected" do +describe "whois.iis.nu", :aggregate_failures do subject do file = fixture("responses", "whois.iis.nu/nu/status_registered.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.iis.nu") + Whois::Parser.parser_for(part) end - describe "#disclaimer" do - it do - expect(subject.disclaimer).to eq("Copyright (c) 1997- .SE (The Internet Infrastructure Foundation). All rights reserved. The information obtained through searches, or otherwise, is protected by the Swedish Copyright Act (1960:729) and international conventions. It is also subject to database protection according to the Swedish Copyright Act. # Any use of this material to target advertising or similar activities is forbidden and will be prosecuted. If any of the information below is transferred to a third party, it must be done in its entirety. This server must not be used as a backend for a search engine. Result of search for registered domain names under the .nu top level domain. This whois printout is printed with UTF-8 encoding.") - end - end - describe "#domain" do - it do - expect(subject.domain).to eq("google.nu") - end - end - describe "#domain_id" do - it do - expect { subject.domain_id }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#status" do - it do - expect(subject.status).to eq(:registered) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(false) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(true) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to be_a(Time) - expect(subject.created_on).to eq(DateTime.parse("1999-06-07")) - end - end - describe "#updated_on" do - it do - expect(subject.updated_on).to be_a(Time) - expect(subject.updated_on).to eq(DateTime.parse("2014-05-06")) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to be_a(Time) - expect(subject.expires_on).to eq(DateTime.parse("2015-06-07")) - end - end - describe "#registrar" do - it do - expect(subject.registrar).to be_a(Whois::Parser::Registrar) - expect(subject.registrar.name).to eq("MarkMonitor Inc.") - end - end - describe "#registrant_contacts" do - it do - expect(subject.registrant_contacts).to be_a(Array) - expect(subject.registrant_contacts.size).to eq(1) - expect(subject.registrant_contacts[0]).to be_a(Whois::Parser::Contact) - expect(subject.registrant_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_REGISTRANT) - expect(subject.registrant_contacts[0].id).to eq("mmr-142621") - expect(subject.registrant_contacts[0].name).to eq(nil) - expect(subject.registrant_contacts[0].organization).to eq(nil) - expect(subject.registrant_contacts[0].address).to eq(nil) - expect(subject.registrant_contacts[0].city).to eq(nil) - expect(subject.registrant_contacts[0].zip).to eq(nil) - expect(subject.registrant_contacts[0].state).to eq(nil) - expect(subject.registrant_contacts[0].country_code).to eq(nil) - expect(subject.registrant_contacts[0].phone).to eq(nil) - expect(subject.registrant_contacts[0].fax).to eq(nil) - expect(subject.registrant_contacts[0].email).to eq(nil) - end - end - describe "#admin_contacts" do - it do - expect(subject.admin_contacts).to be_a(Array) - expect(subject.admin_contacts).to eq([]) - end - end - describe "#technical_contacts" do - it do - expect(subject.technical_contacts).to be_a(Array) - expect(subject.technical_contacts).to eq([]) - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers.size).to eq(4) - expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[0].name).to eq("ns1.google.com") - expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[1].name).to eq("ns2.google.com") - expect(subject.nameservers[2]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[2].name).to eq("ns3.google.com") - expect(subject.nameservers[3]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[3].name).to eq("ns4.google.com") - end + it "matches status_registered.expected" do + expect(subject.disclaimer).to eq("Copyright (c) 1997- .SE (The Internet Infrastructure Foundation). All rights reserved. The information obtained through searches, or otherwise, is protected by the Swedish Copyright Act (1960:729) and international conventions. It is also subject to database protection according to the Swedish Copyright Act. # Any use of this material to target advertising or similar activities is forbidden and will be prosecuted. If any of the information below is transferred to a third party, it must be done in its entirety. This server must not be used as a backend for a search engine. Result of search for registered domain names under the .nu top level domain. This whois printout is printed with UTF-8 encoding.") + expect(subject.domain).to eq("google.nu") + expect { subject.domain_id }.to raise_error(Whois::AttributeNotSupported) + expect(subject.status).to eq(:registered) + expect(subject.available?).to eq(false) + expect(subject.registered?).to eq(true) + expect(subject.created_on).to be_a(Time) + expect(subject.created_on).to eq(DateTime.parse("1999-06-07")) + expect(subject.updated_on).to be_a(Time) + expect(subject.updated_on).to eq(DateTime.parse("2014-05-06")) + expect(subject.expires_on).to be_a(Time) + expect(subject.expires_on).to eq(DateTime.parse("2015-06-07")) + expect(subject.registrar).to be_a(Whois::Parser::Registrar) + expect(subject.registrar.name).to eq("MarkMonitor Inc.") + expect(subject.registrant_contacts).to be_a(Array) + expect(subject.registrant_contacts.size).to eq(1) + expect(subject.registrant_contacts[0]).to be_a(Whois::Parser::Contact) + expect(subject.registrant_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_REGISTRANT) + expect(subject.registrant_contacts[0].id).to eq("mmr-142621") + expect(subject.registrant_contacts[0].name).to eq(nil) + expect(subject.registrant_contacts[0].organization).to eq(nil) + expect(subject.registrant_contacts[0].address).to eq(nil) + expect(subject.registrant_contacts[0].city).to eq(nil) + expect(subject.registrant_contacts[0].zip).to eq(nil) + expect(subject.registrant_contacts[0].state).to eq(nil) + expect(subject.registrant_contacts[0].country_code).to eq(nil) + expect(subject.registrant_contacts[0].phone).to eq(nil) + expect(subject.registrant_contacts[0].fax).to eq(nil) + expect(subject.registrant_contacts[0].email).to eq(nil) + expect(subject.admin_contacts).to be_a(Array) + expect(subject.admin_contacts).to eq([]) + expect(subject.technical_contacts).to be_a(Array) + expect(subject.technical_contacts).to eq([]) + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers.size).to eq(4) + expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[0].name).to eq("ns1.google.com") + expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[1].name).to eq("ns2.google.com") + expect(subject.nameservers[2]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[2].name).to eq("ns3.google.com") + expect(subject.nameservers[3]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[3].name).to eq("ns4.google.com") end end diff --git a/spec/whois/parsers/responses/whois.iis.se/se/property_datetime_is_dash_spec.rb b/spec/whois/parsers/responses/whois.iis.se/se/property_datetime_is_dash_spec.rb index 00669b2b..609e890c 100644 --- a/spec/whois/parsers/responses/whois.iis.se/se/property_datetime_is_dash_spec.rb +++ b/spec/whois/parsers/responses/whois.iis.se/se/property_datetime_is_dash_spec.rb @@ -11,31 +11,20 @@ # require 'spec_helper' -require 'whois/parsers/whois.iis.se.rb' -describe Whois::Parsers::WhoisIisSe, "property_datetime_is_dash.expected" do +describe "whois.iis.se", :aggregate_failures do subject do file = fixture("responses", "whois.iis.se/se/property_datetime_is_dash.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.iis.se") + Whois::Parser.parser_for(part) end - describe "#created_on" do - it do - expect(subject.created_on).to be_a(Time) - expect(subject.created_on).to eq(DateTime.parse("2010-08-05")) - end - end - describe "#updated_on" do - it do - expect(subject.updated_on).to eq(nil) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to be_a(Time) - expect(subject.expires_on).to eq(DateTime.parse("2011-08-05")) - end + it "matches property_datetime_is_dash.expected" do + expect(subject.created_on).to be_a(Time) + expect(subject.created_on).to eq(DateTime.parse("2010-08-05")) + expect(subject.updated_on).to eq(nil) + expect(subject.expires_on).to be_a(Time) + expect(subject.expires_on).to eq(DateTime.parse("2011-08-05")) end end diff --git a/spec/whois/parsers/responses/whois.iis.se/se/property_nameservers_single_spec.rb b/spec/whois/parsers/responses/whois.iis.se/se/property_nameservers_single_spec.rb index 707f0745..7818c751 100644 --- a/spec/whois/parsers/responses/whois.iis.se/se/property_nameservers_single_spec.rb +++ b/spec/whois/parsers/responses/whois.iis.se/se/property_nameservers_single_spec.rb @@ -11,24 +11,21 @@ # require 'spec_helper' -require 'whois/parsers/whois.iis.se.rb' -describe Whois::Parsers::WhoisIisSe, "property_nameservers_single.expected" do +describe "whois.iis.se", :aggregate_failures do subject do file = fixture("responses", "whois.iis.se/se/property_nameservers_single.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.iis.se") + Whois::Parser.parser_for(part) end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers.size).to eq(1) - expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[0].name).to eq("freja.nhv.se") - expect(subject.nameservers[0].ipv4).to eq("82.96.40.83") - expect(subject.nameservers[0].ipv6).to eq(nil) - end + it "matches property_nameservers_single.expected" do + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers.size).to eq(1) + expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[0].name).to eq("freja.nhv.se") + expect(subject.nameservers[0].ipv4).to eq("82.96.40.83") + expect(subject.nameservers[0].ipv6).to eq(nil) end end diff --git a/spec/whois/parsers/responses/whois.iis.se/se/property_nameservers_with_ip_spec.rb b/spec/whois/parsers/responses/whois.iis.se/se/property_nameservers_with_ip_spec.rb index 1b0f8208..ae737906 100644 --- a/spec/whois/parsers/responses/whois.iis.se/se/property_nameservers_with_ip_spec.rb +++ b/spec/whois/parsers/responses/whois.iis.se/se/property_nameservers_with_ip_spec.rb @@ -11,32 +11,29 @@ # require 'spec_helper' -require 'whois/parsers/whois.iis.se.rb' -describe Whois::Parsers::WhoisIisSe, "property_nameservers_with_ip.expected" do +describe "whois.iis.se", :aggregate_failures do subject do file = fixture("responses", "whois.iis.se/se/property_nameservers_with_ip.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.iis.se") + Whois::Parser.parser_for(part) end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers.size).to eq(4) - expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[0].name).to eq("ns2.loopia.se") - expect(subject.nameservers[0].ipv4).to eq("93.188.0.21") - expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[1].name).to eq("ns4.loopia.se") - expect(subject.nameservers[1].ipv4).to eq("93.188.0.20") - expect(subject.nameservers[2]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[2].name).to eq("ns3.loopia.se") - expect(subject.nameservers[2].ipv4).to eq("93.188.0.21") - expect(subject.nameservers[3]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[3].name).to eq("ns1.loopia.se") - expect(subject.nameservers[3].ipv4).to eq("93.188.0.20") - end + it "matches property_nameservers_with_ip.expected" do + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers.size).to eq(4) + expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[0].name).to eq("ns2.loopia.se") + expect(subject.nameservers[0].ipv4).to eq("93.188.0.21") + expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[1].name).to eq("ns4.loopia.se") + expect(subject.nameservers[1].ipv4).to eq("93.188.0.20") + expect(subject.nameservers[2]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[2].name).to eq("ns3.loopia.se") + expect(subject.nameservers[2].ipv4).to eq("93.188.0.21") + expect(subject.nameservers[3]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[3].name).to eq("ns1.loopia.se") + expect(subject.nameservers[3].ipv4).to eq("93.188.0.20") end end diff --git a/spec/whois/parsers/responses/whois.iis.se/se/property_status_inactive_spec.rb b/spec/whois/parsers/responses/whois.iis.se/se/property_status_inactive_spec.rb index ba2dbb58..3f4b4dea 100644 --- a/spec/whois/parsers/responses/whois.iis.se/se/property_status_inactive_spec.rb +++ b/spec/whois/parsers/responses/whois.iis.se/se/property_status_inactive_spec.rb @@ -11,68 +11,29 @@ # require 'spec_helper' -require 'whois/parsers/whois.iis.se.rb' -describe Whois::Parsers::WhoisIisSe, "property_status_inactive.expected" do +describe "whois.iis.se", :aggregate_failures do subject do file = fixture("responses", "whois.iis.se/se/property_status_inactive.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.iis.se") + Whois::Parser.parser_for(part) end - describe "#status" do - it do - expect(subject.status).to eq(:registered) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(false) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(true) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to eq(DateTime.parse("2000-11-01")) - end - end - describe "#updated_on" do - it do - expect(subject.updated_on).to eq(nil) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to eq(DateTime.parse("2006-04-18")) - end - end - describe "#registrant_contacts" do - it do - expect(subject.registrant_contacts).to be_a(Array) - expect(subject.registrant_contacts).to eq([]) - end - end - describe "#admin_contacts" do - it do - expect(subject.admin_contacts).to be_a(Array) - expect(subject.admin_contacts).to eq([]) - end - end - describe "#technical_contacts" do - it do - expect(subject.technical_contacts).to be_a(Array) - expect(subject.technical_contacts).to eq([]) - end - end - describe "#registrar" do - it do - expect(subject.registrar).to be_a(Whois::Parser::Registrar) - expect(subject.registrar.name).to eq("CoreRegistry") - end + it "matches property_status_inactive.expected" do + expect(subject.status).to eq(:registered) + expect(subject.available?).to eq(false) + expect(subject.registered?).to eq(true) + expect(subject.created_on).to eq(DateTime.parse("2000-11-01")) + expect(subject.updated_on).to eq(nil) + expect(subject.expires_on).to eq(DateTime.parse("2006-04-18")) + expect(subject.registrant_contacts).to be_a(Array) + expect(subject.registrant_contacts).to eq([]) + expect(subject.admin_contacts).to be_a(Array) + expect(subject.admin_contacts).to eq([]) + expect(subject.technical_contacts).to be_a(Array) + expect(subject.technical_contacts).to eq([]) + expect(subject.registrar).to be_a(Whois::Parser::Registrar) + expect(subject.registrar.name).to eq("CoreRegistry") end end diff --git a/spec/whois/parsers/responses/whois.iis.se/se/property_status_ok_spec.rb b/spec/whois/parsers/responses/whois.iis.se/se/property_status_ok_spec.rb index 699ab246..def273bc 100644 --- a/spec/whois/parsers/responses/whois.iis.se/se/property_status_ok_spec.rb +++ b/spec/whois/parsers/responses/whois.iis.se/se/property_status_ok_spec.rb @@ -11,29 +11,18 @@ # require 'spec_helper' -require 'whois/parsers/whois.iis.se.rb' -describe Whois::Parsers::WhoisIisSe, "property_status_ok.expected" do +describe "whois.iis.se", :aggregate_failures do subject do file = fixture("responses", "whois.iis.se/se/property_status_ok.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.iis.se") + Whois::Parser.parser_for(part) end - describe "#status" do - it do - expect(subject.status).to eq(:registered) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(false) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(true) - end + it "matches property_status_ok.expected" do + expect(subject.status).to eq(:registered) + expect(subject.available?).to eq(false) + expect(subject.registered?).to eq(true) end end diff --git a/spec/whois/parsers/responses/whois.iis.se/se/property_status_serverhold_spec.rb b/spec/whois/parsers/responses/whois.iis.se/se/property_status_serverhold_spec.rb index b88d088f..5e9cb23a 100644 --- a/spec/whois/parsers/responses/whois.iis.se/se/property_status_serverhold_spec.rb +++ b/spec/whois/parsers/responses/whois.iis.se/se/property_status_serverhold_spec.rb @@ -11,29 +11,18 @@ # require 'spec_helper' -require 'whois/parsers/whois.iis.se.rb' -describe Whois::Parsers::WhoisIisSe, "property_status_serverhold.expected" do +describe "whois.iis.se", :aggregate_failures do subject do file = fixture("responses", "whois.iis.se/se/property_status_serverhold.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.iis.se") + Whois::Parser.parser_for(part) end - describe "#status" do - it do - expect(subject.status).to eq(:registered) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(false) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(true) - end + it "matches property_status_serverhold.expected" do + expect(subject.status).to eq(:registered) + expect(subject.available?).to eq(false) + expect(subject.registered?).to eq(true) end end diff --git a/spec/whois/parsers/responses/whois.iis.se/se/status_available_spec.rb b/spec/whois/parsers/responses/whois.iis.se/se/status_available_spec.rb index a29d9df2..4196abe6 100644 --- a/spec/whois/parsers/responses/whois.iis.se/se/status_available_spec.rb +++ b/spec/whois/parsers/responses/whois.iis.se/se/status_available_spec.rb @@ -11,88 +11,33 @@ # require 'spec_helper' -require 'whois/parsers/whois.iis.se.rb' -describe Whois::Parsers::WhoisIisSe, "status_available.expected" do +describe "whois.iis.se", :aggregate_failures do subject do file = fixture("responses", "whois.iis.se/se/status_available.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.iis.se") + Whois::Parser.parser_for(part) end - describe "#disclaimer" do - it do - expect(subject.disclaimer).to eq("Copyright (c) 1997- .SE (The Internet Infrastructure Foundation). All rights reserved. The information obtained through searches, or otherwise, is protected by the Swedish Copyright Act (1960:729) and international conventions. It is also subject to database protection according to the Swedish Copyright Act. Any use of this material to target advertising or similar activities is forbidden and will be prosecuted. If any of the information below is transferred to a third party, it must be done in its entirety. This server must not be used as a backend for a search engine. Result of search for registered domain names under the .SE top level domain. This whois printout is printed with UTF-8 encoding.") - end - end - describe "#domain" do - it do - expect(subject.domain).to eq(nil) - end - end - describe "#domain_id" do - it do - expect { subject.domain_id }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#status" do - it do - expect(subject.status).to eq(:available) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(true) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(false) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to eq(nil) - end - end - describe "#updated_on" do - it do - expect(subject.updated_on).to eq(nil) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to eq(nil) - end - end - describe "#registrar" do - it do - expect(subject.registrar).to eq(nil) - end - end - describe "#registrant_contacts" do - it do - expect(subject.registrant_contacts).to be_a(Array) - expect(subject.registrant_contacts).to eq([]) - end - end - describe "#admin_contacts" do - it do - expect(subject.admin_contacts).to be_a(Array) - expect(subject.admin_contacts).to eq([]) - end - end - describe "#technical_contacts" do - it do - expect(subject.technical_contacts).to be_a(Array) - expect(subject.technical_contacts).to eq([]) - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers).to eq([]) - end + it "matches status_available.expected" do + expect(subject.disclaimer).to eq("Copyright (c) 1997- .SE (The Internet Infrastructure Foundation). All rights reserved. The information obtained through searches, or otherwise, is protected by the Swedish Copyright Act (1960:729) and international conventions. It is also subject to database protection according to the Swedish Copyright Act. Any use of this material to target advertising or similar activities is forbidden and will be prosecuted. If any of the information below is transferred to a third party, it must be done in its entirety. This server must not be used as a backend for a search engine. Result of search for registered domain names under the .SE top level domain. This whois printout is printed with UTF-8 encoding.") + expect(subject.domain).to eq(nil) + expect { subject.domain_id }.to raise_error(Whois::AttributeNotSupported) + expect(subject.status).to eq(:available) + expect(subject.available?).to eq(true) + expect(subject.registered?).to eq(false) + expect(subject.created_on).to eq(nil) + expect(subject.updated_on).to eq(nil) + expect(subject.expires_on).to eq(nil) + expect(subject.registrar).to eq(nil) + expect(subject.registrant_contacts).to be_a(Array) + expect(subject.registrant_contacts).to eq([]) + expect(subject.admin_contacts).to be_a(Array) + expect(subject.admin_contacts).to eq([]) + expect(subject.technical_contacts).to be_a(Array) + expect(subject.technical_contacts).to eq([]) + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers).to eq([]) end end diff --git a/spec/whois/parsers/responses/whois.iis.se/se/status_registered_spec.rb b/spec/whois/parsers/responses/whois.iis.se/se/status_registered_spec.rb index 6582ecf0..32a1fb09 100644 --- a/spec/whois/parsers/responses/whois.iis.se/se/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.iis.se/se/status_registered_spec.rb @@ -11,113 +11,58 @@ # require 'spec_helper' -require 'whois/parsers/whois.iis.se.rb' -describe Whois::Parsers::WhoisIisSe, "status_registered.expected" do +describe "whois.iis.se", :aggregate_failures do subject do file = fixture("responses", "whois.iis.se/se/status_registered.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.iis.se") + Whois::Parser.parser_for(part) end - describe "#disclaimer" do - it do - expect(subject.disclaimer).to eq("Copyright (c) 1997- .SE (The Internet Infrastructure Foundation). All rights reserved. The information obtained through searches, or otherwise, is protected by the Swedish Copyright Act (1960:729) and international conventions. It is also subject to database protection according to the Swedish Copyright Act. Any use of this material to target advertising or similar activities is forbidden and will be prosecuted. If any of the information below is transferred to a third party, it must be done in its entirety. This server must not be used as a backend for a search engine. Result of search for registered domain names under the .SE top level domain. This whois printout is printed with UTF-8 encoding.") - end - end - describe "#domain" do - it do - expect(subject.domain).to eq("google.se") - end - end - describe "#domain_id" do - it do - expect { subject.domain_id }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#status" do - it do - expect(subject.status).to eq(:registered) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(false) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(true) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to be_a(Time) - expect(subject.created_on).to eq(DateTime.parse("2008-10-20")) - end - end - describe "#updated_on" do - it do - expect(subject.updated_on).to be_a(Time) - expect(subject.updated_on).to eq(DateTime.parse("2013-09-18")) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to be_a(Time) - expect(subject.expires_on).to eq(DateTime.parse("2014-10-20")) - end - end - describe "#registrar" do - it do - expect(subject.registrar).to be_a(Whois::Parser::Registrar) - expect(subject.registrar.name).to eq("MarkMonitor Inc") - end - end - describe "#registrant_contacts" do - it do - expect(subject.registrant_contacts).to be_a(Array) - expect(subject.registrant_contacts.size).to eq(1) - expect(subject.registrant_contacts[0]).to be_a(Whois::Parser::Contact) - expect(subject.registrant_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_REGISTRANT) - expect(subject.registrant_contacts[0].id).to eq("mmr8008-53808") - expect(subject.registrant_contacts[0].name).to eq(nil) - expect(subject.registrant_contacts[0].organization).to eq(nil) - expect(subject.registrant_contacts[0].address).to eq(nil) - expect(subject.registrant_contacts[0].city).to eq(nil) - expect(subject.registrant_contacts[0].zip).to eq(nil) - expect(subject.registrant_contacts[0].state).to eq(nil) - expect(subject.registrant_contacts[0].country_code).to eq(nil) - expect(subject.registrant_contacts[0].phone).to eq(nil) - expect(subject.registrant_contacts[0].fax).to eq(nil) - expect(subject.registrant_contacts[0].email).to eq(nil) - end - end - describe "#admin_contacts" do - it do - expect(subject.admin_contacts).to be_a(Array) - expect(subject.admin_contacts).to eq([]) - end - end - describe "#technical_contacts" do - it do - expect(subject.technical_contacts).to be_a(Array) - expect(subject.technical_contacts).to eq([]) - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers.size).to eq(4) - expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[0].name).to eq("ns1.google.com") - expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[1].name).to eq("ns2.google.com") - expect(subject.nameservers[2]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[2].name).to eq("ns3.google.com") - expect(subject.nameservers[3]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[3].name).to eq("ns4.google.com") - end + it "matches status_registered.expected" do + expect(subject.disclaimer).to eq("Copyright (c) 1997- .SE (The Internet Infrastructure Foundation). All rights reserved. The information obtained through searches, or otherwise, is protected by the Swedish Copyright Act (1960:729) and international conventions. It is also subject to database protection according to the Swedish Copyright Act. Any use of this material to target advertising or similar activities is forbidden and will be prosecuted. If any of the information below is transferred to a third party, it must be done in its entirety. This server must not be used as a backend for a search engine. Result of search for registered domain names under the .SE top level domain. This whois printout is printed with UTF-8 encoding.") + expect(subject.domain).to eq("google.se") + expect { subject.domain_id }.to raise_error(Whois::AttributeNotSupported) + expect(subject.status).to eq(:registered) + expect(subject.available?).to eq(false) + expect(subject.registered?).to eq(true) + expect(subject.created_on).to be_a(Time) + expect(subject.created_on).to eq(DateTime.parse("2008-10-20")) + expect(subject.updated_on).to be_a(Time) + expect(subject.updated_on).to eq(DateTime.parse("2013-09-18")) + expect(subject.expires_on).to be_a(Time) + expect(subject.expires_on).to eq(DateTime.parse("2014-10-20")) + expect(subject.registrar).to be_a(Whois::Parser::Registrar) + expect(subject.registrar.name).to eq("MarkMonitor Inc") + expect(subject.registrant_contacts).to be_a(Array) + expect(subject.registrant_contacts.size).to eq(1) + expect(subject.registrant_contacts[0]).to be_a(Whois::Parser::Contact) + expect(subject.registrant_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_REGISTRANT) + expect(subject.registrant_contacts[0].id).to eq("mmr8008-53808") + expect(subject.registrant_contacts[0].name).to eq(nil) + expect(subject.registrant_contacts[0].organization).to eq(nil) + expect(subject.registrant_contacts[0].address).to eq(nil) + expect(subject.registrant_contacts[0].city).to eq(nil) + expect(subject.registrant_contacts[0].zip).to eq(nil) + expect(subject.registrant_contacts[0].state).to eq(nil) + expect(subject.registrant_contacts[0].country_code).to eq(nil) + expect(subject.registrant_contacts[0].phone).to eq(nil) + expect(subject.registrant_contacts[0].fax).to eq(nil) + expect(subject.registrant_contacts[0].email).to eq(nil) + expect(subject.admin_contacts).to be_a(Array) + expect(subject.admin_contacts).to eq([]) + expect(subject.technical_contacts).to be_a(Array) + expect(subject.technical_contacts).to eq([]) + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers.size).to eq(4) + expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[0].name).to eq("ns1.google.com") + expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[1].name).to eq("ns2.google.com") + expect(subject.nameservers[2]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[2].name).to eq("ns3.google.com") + expect(subject.nameservers[3]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[3].name).to eq("ns4.google.com") end end diff --git a/spec/whois/parsers/responses/whois.in.ua/in.ua/status_available_spec.rb b/spec/whois/parsers/responses/whois.in.ua/in.ua/status_available_spec.rb index 932b79ce..e9a80694 100644 --- a/spec/whois/parsers/responses/whois.in.ua/in.ua/status_available_spec.rb +++ b/spec/whois/parsers/responses/whois.in.ua/in.ua/status_available_spec.rb @@ -11,50 +11,23 @@ # require 'spec_helper' -require 'whois/parsers/whois.in.ua.rb' -describe Whois::Parsers::WhoisInUa, "status_available.expected" do +describe "whois.in.ua", :aggregate_failures do subject do file = fixture("responses", "whois.in.ua/in.ua/status_available.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.in.ua") + Whois::Parser.parser_for(part) end - describe "#status" do - it do - expect(subject.status).to eq(:available) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(true) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(false) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to eq(nil) - end - end - describe "#updated_on" do - it do - expect(subject.updated_on).to eq(nil) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to eq(nil) - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers).to eq([]) - end + it "matches status_available.expected" do + expect(subject.status).to eq(:available) + expect(subject.available?).to eq(true) + expect(subject.registered?).to eq(false) + expect(subject.created_on).to eq(nil) + expect(subject.updated_on).to eq(nil) + expect(subject.expires_on).to eq(nil) + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers).to eq([]) end end diff --git a/spec/whois/parsers/responses/whois.in.ua/in.ua/status_registered_spec.rb b/spec/whois/parsers/responses/whois.in.ua/in.ua/status_registered_spec.rb index 4b17862e..ceee345c 100644 --- a/spec/whois/parsers/responses/whois.in.ua/in.ua/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.in.ua/in.ua/status_registered_spec.rb @@ -11,59 +11,32 @@ # require 'spec_helper' -require 'whois/parsers/whois.in.ua.rb' -describe Whois::Parsers::WhoisInUa, "status_registered.expected" do +describe "whois.in.ua", :aggregate_failures do subject do file = fixture("responses", "whois.in.ua/in.ua/status_registered.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.in.ua") + Whois::Parser.parser_for(part) end - describe "#status" do - it do - expect(subject.status).to eq(:registered) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(false) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(true) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to be_a(Time) - expect(subject.created_on).to eq(DateTime.parse("2007-12-18 20:12:35 +02:00")) - end - end - describe "#updated_on" do - it do - expect(subject.updated_on).to be_a(Time) - expect(subject.updated_on).to eq(DateTime.parse("2019-12-03 11:15:10 +02:00")) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to be_a(Time) - expect(subject.expires_on).to eq(DateTime.parse("2020-12-20 00:00:00 +02:00")) - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers.size).to eq(3) - expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[0].name).to eq("ns10.uadns.com") - expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[1].name).to eq("ns12.uadns.com") - expect(subject.nameservers[2]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[2].name).to eq("ns11.uadns.com") - end + it "matches status_registered.expected" do + expect(subject.status).to eq(:registered) + expect(subject.available?).to eq(false) + expect(subject.registered?).to eq(true) + expect(subject.created_on).to be_a(Time) + expect(subject.created_on).to eq(DateTime.parse("2007-12-18 20:12:35 +02:00")) + expect(subject.updated_on).to be_a(Time) + expect(subject.updated_on).to eq(DateTime.parse("2019-12-03 11:15:10 +02:00")) + expect(subject.expires_on).to be_a(Time) + expect(subject.expires_on).to eq(DateTime.parse("2020-12-20 00:00:00 +02:00")) + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers.size).to eq(3) + expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[0].name).to eq("ns10.uadns.com") + expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[1].name).to eq("ns12.uadns.com") + expect(subject.nameservers[2]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[2].name).to eq("ns11.uadns.com") end end diff --git a/spec/whois/parsers/responses/whois.inregistry.net/in/status_available_spec.rb b/spec/whois/parsers/responses/whois.inregistry.net/in/status_available_spec.rb index e239e881..9322679b 100644 --- a/spec/whois/parsers/responses/whois.inregistry.net/in/status_available_spec.rb +++ b/spec/whois/parsers/responses/whois.inregistry.net/in/status_available_spec.rb @@ -11,88 +11,33 @@ # require 'spec_helper' -require 'whois/parsers/whois.inregistry.net.rb' -describe Whois::Parsers::WhoisInregistryNet, "status_available.expected" do +describe "whois.inregistry.net", :aggregate_failures do subject do file = fixture("responses", "whois.inregistry.net/in/status_available.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.inregistry.net") + Whois::Parser.parser_for(part) end - describe "#disclaimer" do - it do - expect(subject.disclaimer).to eq("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 or a Registrar, or Neustar 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.") - end - end - describe "#domain" do - it do - expect(subject.domain).to eq(nil) - end - end - describe "#domain_id" do - it do - expect(subject.domain_id).to eq(nil) - end - end - describe "#status" do - it do - expect(subject.status).to eq([]) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(true) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(false) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to eq(nil) - end - end - describe "#updated_on" do - it do - expect(subject.updated_on).to eq(nil) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to eq(nil) - end - end - describe "#registrar" do - it do - expect(subject.registrar).to eq(nil) - end - end - describe "#registrant_contacts" do - it do - expect(subject.registrant_contacts).to be_a(Array) - expect(subject.registrant_contacts).to eq([]) - end - end - describe "#admin_contacts" do - it do - expect(subject.admin_contacts).to be_a(Array) - expect(subject.admin_contacts).to eq([]) - end - end - describe "#technical_contacts" do - it do - expect(subject.technical_contacts).to be_a(Array) - expect(subject.technical_contacts).to eq([]) - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers).to eq([]) - end + it "matches status_available.expected" do + expect(subject.disclaimer).to eq("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 or a Registrar, or Neustar 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.") + expect(subject.domain).to eq(nil) + expect(subject.domain_id).to eq(nil) + expect(subject.status).to eq([]) + expect(subject.available?).to eq(true) + expect(subject.registered?).to eq(false) + expect(subject.created_on).to eq(nil) + expect(subject.updated_on).to eq(nil) + expect(subject.expires_on).to eq(nil) + expect(subject.registrar).to eq(nil) + expect(subject.registrant_contacts).to be_a(Array) + expect(subject.registrant_contacts).to eq([]) + expect(subject.admin_contacts).to be_a(Array) + expect(subject.admin_contacts).to eq([]) + expect(subject.technical_contacts).to be_a(Array) + expect(subject.technical_contacts).to eq([]) + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers).to eq([]) end end diff --git a/spec/whois/parsers/responses/whois.inregistry.net/in/status_registered_spec.rb b/spec/whois/parsers/responses/whois.inregistry.net/in/status_registered_spec.rb index 5f3831ee..3b3b4050 100644 --- a/spec/whois/parsers/responses/whois.inregistry.net/in/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.inregistry.net/in/status_registered_spec.rb @@ -11,142 +11,87 @@ # require 'spec_helper' -require 'whois/parsers/whois.inregistry.net.rb' -describe Whois::Parsers::WhoisInregistryNet, "status_registered.expected" do +describe "whois.inregistry.net", :aggregate_failures do subject do file = fixture("responses", "whois.inregistry.net/in/status_registered.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.inregistry.net") + Whois::Parser.parser_for(part) end - describe "#disclaimer" do - it do - expect(subject.disclaimer).to eq("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 or a Registrar, or Neustar 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.") - end - end - describe "#domain" do - it do - expect(subject.domain).to eq("google.in") - end - end - describe "#domain_id" do - it do - expect(subject.domain_id).to eq("D21089-IN") - end - end - describe "#status" do - it do - expect(subject.status).to eq(["clientTransferProhibited http://www.icann.org/epp#clientTransferProhibited", "clientDeleteProhibited http://www.icann.org/epp#clientDeleteProhibited", "clientUpdateProhibited http://www.icann.org/epp#clientUpdateProhibited"]) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(false) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(true) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to eq(DateTime.parse("2005-02-14 20:35:14 UTC")) - end - end - describe "#updated_on" do - it do - expect(subject.updated_on).to eq(DateTime.parse("2021-01-18 10:38:43 UTC")) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to eq(DateTime.parse("2022-02-14 20:35:14 UTC")) - end - end - describe "#registrar" do - it do - expect(subject.registrar).to be_a(Whois::Parser::Registrar) - expect(subject.registrar.id).to eq("292") - expect(subject.registrar.name).to eq("MarkMonitor Inc.") - expect(subject.registrar.url).to eq("http://www.markmonitor.com") - end - end - describe "#registrant_contacts" do - it do - expect(subject.registrant_contacts).to be_a(Array) - expect(subject.registrant_contacts.size).to eq(1) - expect(subject.registrant_contacts[0]).to be_a(Whois::Parser::Contact) - expect(subject.registrant_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_REGISTRANT) - expect(subject.registrant_contacts[0].id).to eq("REDACTED FOR PRIVACY") - expect(subject.registrant_contacts[0].name).to eq("REDACTED FOR PRIVACY") - expect(subject.registrant_contacts[0].organization).to eq("Google LLC") - expect(subject.registrant_contacts[0].address).to eq("REDACTED FOR PRIVACY\nREDACTED FOR PRIVACY\nREDACTED FOR PRIVACY") - expect(subject.registrant_contacts[0].city).to eq("REDACTED FOR PRIVACY") - expect(subject.registrant_contacts[0].zip).to eq("REDACTED FOR PRIVACY") - expect(subject.registrant_contacts[0].state).to eq("CA") - expect(subject.registrant_contacts[0].country).to eq(nil) - expect(subject.registrant_contacts[0].country_code).to eq("US") - expect(subject.registrant_contacts[0].phone).to eq("REDACTED FOR PRIVACY") - expect(subject.registrant_contacts[0].fax).to eq("REDACTED FOR PRIVACY") - expect(subject.registrant_contacts[0].email).to eq("Please contact the Registrar listed above") - end - end - describe "#admin_contacts" do - it do - expect(subject.admin_contacts).to be_a(Array) - expect(subject.admin_contacts.size).to eq(1) - expect(subject.admin_contacts[0]).to be_a(Whois::Parser::Contact) - expect(subject.admin_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_ADMINISTRATIVE) - expect(subject.admin_contacts[0].id).to eq("REDACTED FOR PRIVACY") - expect(subject.admin_contacts[0].name).to eq("REDACTED FOR PRIVACY") - expect(subject.admin_contacts[0].organization).to eq("REDACTED FOR PRIVACY") - expect(subject.admin_contacts[0].address).to eq("REDACTED FOR PRIVACY\nREDACTED FOR PRIVACY\nREDACTED FOR PRIVACY") - expect(subject.admin_contacts[0].city).to eq("REDACTED FOR PRIVACY") - expect(subject.admin_contacts[0].zip).to eq("REDACTED FOR PRIVACY") - expect(subject.admin_contacts[0].state).to eq("REDACTED FOR PRIVACY") - expect(subject.admin_contacts[0].country).to eq(nil) - expect(subject.admin_contacts[0].country_code).to eq("REDACTED FOR PRIVACY") - expect(subject.admin_contacts[0].phone).to eq("REDACTED FOR PRIVACY") - expect(subject.admin_contacts[0].fax).to eq("REDACTED FOR PRIVACY") - expect(subject.admin_contacts[0].email).to eq("Please contact the Registrar listed above") - end - end - describe "#technical_contacts" do - it do - expect(subject.technical_contacts).to be_a(Array) - expect(subject.technical_contacts.size).to eq(1) - expect(subject.technical_contacts[0]).to be_a(Whois::Parser::Contact) - expect(subject.technical_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_TECHNICAL) - expect(subject.technical_contacts[0].id).to eq("REDACTED FOR PRIVACY") - expect(subject.technical_contacts[0].name).to eq("REDACTED FOR PRIVACY") - expect(subject.technical_contacts[0].organization).to eq("REDACTED FOR PRIVACY") - expect(subject.technical_contacts[0].address).to eq("REDACTED FOR PRIVACY\nREDACTED FOR PRIVACY\nREDACTED FOR PRIVACY") - expect(subject.technical_contacts[0].city).to eq("REDACTED FOR PRIVACY") - expect(subject.technical_contacts[0].zip).to eq("REDACTED FOR PRIVACY") - expect(subject.technical_contacts[0].state).to eq("REDACTED FOR PRIVACY") - expect(subject.technical_contacts[0].country).to eq(nil) - expect(subject.technical_contacts[0].country_code).to eq("REDACTED FOR PRIVACY") - expect(subject.technical_contacts[0].phone).to eq("REDACTED FOR PRIVACY") - expect(subject.technical_contacts[0].fax).to eq("REDACTED FOR PRIVACY") - expect(subject.technical_contacts[0].email).to eq("Please contact the Registrar listed above") - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers.size).to eq(4) - expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[0].name).to eq("ns4.google.com") - expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[1].name).to eq("ns2.google.com") - expect(subject.nameservers[2]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[2].name).to eq("ns1.google.com") - expect(subject.nameservers[3]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[3].name).to eq("ns3.google.com") - end + it "matches status_registered.expected" do + expect(subject.disclaimer).to eq("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 or a Registrar, or Neustar 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.") + expect(subject.domain).to eq("google.in") + expect(subject.domain_id).to eq("D21089-IN") + expect(subject.status).to eq(["clientTransferProhibited http://www.icann.org/epp#clientTransferProhibited", "clientDeleteProhibited http://www.icann.org/epp#clientDeleteProhibited", "clientUpdateProhibited http://www.icann.org/epp#clientUpdateProhibited"]) + expect(subject.available?).to eq(false) + expect(subject.registered?).to eq(true) + expect(subject.created_on).to eq(DateTime.parse("2005-02-14 20:35:14 UTC")) + expect(subject.updated_on).to eq(DateTime.parse("2021-01-18 10:38:43 UTC")) + expect(subject.expires_on).to eq(DateTime.parse("2022-02-14 20:35:14 UTC")) + expect(subject.registrar).to be_a(Whois::Parser::Registrar) + expect(subject.registrar.id).to eq("292") + expect(subject.registrar.name).to eq("MarkMonitor Inc.") + expect(subject.registrar.url).to eq("http://www.markmonitor.com") + expect(subject.registrant_contacts).to be_a(Array) + expect(subject.registrant_contacts.size).to eq(1) + expect(subject.registrant_contacts[0]).to be_a(Whois::Parser::Contact) + expect(subject.registrant_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_REGISTRANT) + expect(subject.registrant_contacts[0].id).to eq("REDACTED FOR PRIVACY") + expect(subject.registrant_contacts[0].name).to eq("REDACTED FOR PRIVACY") + expect(subject.registrant_contacts[0].organization).to eq("Google LLC") + expect(subject.registrant_contacts[0].address).to eq("REDACTED FOR PRIVACY\nREDACTED FOR PRIVACY\nREDACTED FOR PRIVACY") + expect(subject.registrant_contacts[0].city).to eq("REDACTED FOR PRIVACY") + expect(subject.registrant_contacts[0].zip).to eq("REDACTED FOR PRIVACY") + expect(subject.registrant_contacts[0].state).to eq("CA") + expect(subject.registrant_contacts[0].country).to eq(nil) + expect(subject.registrant_contacts[0].country_code).to eq("US") + expect(subject.registrant_contacts[0].phone).to eq("REDACTED FOR PRIVACY") + expect(subject.registrant_contacts[0].fax).to eq("REDACTED FOR PRIVACY") + expect(subject.registrant_contacts[0].email).to eq("Please contact the Registrar listed above") + expect(subject.admin_contacts).to be_a(Array) + expect(subject.admin_contacts.size).to eq(1) + expect(subject.admin_contacts[0]).to be_a(Whois::Parser::Contact) + expect(subject.admin_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_ADMINISTRATIVE) + expect(subject.admin_contacts[0].id).to eq("REDACTED FOR PRIVACY") + expect(subject.admin_contacts[0].name).to eq("REDACTED FOR PRIVACY") + expect(subject.admin_contacts[0].organization).to eq("REDACTED FOR PRIVACY") + expect(subject.admin_contacts[0].address).to eq("REDACTED FOR PRIVACY\nREDACTED FOR PRIVACY\nREDACTED FOR PRIVACY") + expect(subject.admin_contacts[0].city).to eq("REDACTED FOR PRIVACY") + expect(subject.admin_contacts[0].zip).to eq("REDACTED FOR PRIVACY") + expect(subject.admin_contacts[0].state).to eq("REDACTED FOR PRIVACY") + expect(subject.admin_contacts[0].country).to eq(nil) + expect(subject.admin_contacts[0].country_code).to eq("REDACTED FOR PRIVACY") + expect(subject.admin_contacts[0].phone).to eq("REDACTED FOR PRIVACY") + expect(subject.admin_contacts[0].fax).to eq("REDACTED FOR PRIVACY") + expect(subject.admin_contacts[0].email).to eq("Please contact the Registrar listed above") + expect(subject.technical_contacts).to be_a(Array) + expect(subject.technical_contacts.size).to eq(1) + expect(subject.technical_contacts[0]).to be_a(Whois::Parser::Contact) + expect(subject.technical_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_TECHNICAL) + expect(subject.technical_contacts[0].id).to eq("REDACTED FOR PRIVACY") + expect(subject.technical_contacts[0].name).to eq("REDACTED FOR PRIVACY") + expect(subject.technical_contacts[0].organization).to eq("REDACTED FOR PRIVACY") + expect(subject.technical_contacts[0].address).to eq("REDACTED FOR PRIVACY\nREDACTED FOR PRIVACY\nREDACTED FOR PRIVACY") + expect(subject.technical_contacts[0].city).to eq("REDACTED FOR PRIVACY") + expect(subject.technical_contacts[0].zip).to eq("REDACTED FOR PRIVACY") + expect(subject.technical_contacts[0].state).to eq("REDACTED FOR PRIVACY") + expect(subject.technical_contacts[0].country).to eq(nil) + expect(subject.technical_contacts[0].country_code).to eq("REDACTED FOR PRIVACY") + expect(subject.technical_contacts[0].phone).to eq("REDACTED FOR PRIVACY") + expect(subject.technical_contacts[0].fax).to eq("REDACTED FOR PRIVACY") + expect(subject.technical_contacts[0].email).to eq("Please contact the Registrar listed above") + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers.size).to eq(4) + expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[0].name).to eq("ns4.google.com") + expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[1].name).to eq("ns2.google.com") + expect(subject.nameservers[2]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[2].name).to eq("ns1.google.com") + expect(subject.nameservers[3]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[3].name).to eq("ns3.google.com") end end diff --git a/spec/whois/parsers/responses/whois.isnic.is/is/status_available_spec.rb b/spec/whois/parsers/responses/whois.isnic.is/is/status_available_spec.rb index 278ed04f..4691a736 100644 --- a/spec/whois/parsers/responses/whois.isnic.is/is/status_available_spec.rb +++ b/spec/whois/parsers/responses/whois.isnic.is/is/status_available_spec.rb @@ -11,50 +11,23 @@ # require 'spec_helper' -require 'whois/parsers/whois.isnic.is.rb' -describe Whois::Parsers::WhoisIsnicIs, "status_available.expected" do +describe "whois.isnic.is", :aggregate_failures do subject do file = fixture("responses", "whois.isnic.is/is/status_available.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.isnic.is") + Whois::Parser.parser_for(part) end - describe "#status" do - it do - expect(subject.status).to eq(:available) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(true) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(false) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to eq(nil) - end - end - describe "#updated_on" do - it do - expect { subject.updated_on }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to eq(nil) - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers).to eq([]) - end + it "matches status_available.expected" do + expect(subject.status).to eq(:available) + expect(subject.available?).to eq(true) + expect(subject.registered?).to eq(false) + expect(subject.created_on).to eq(nil) + expect { subject.updated_on }.to raise_error(Whois::AttributeNotSupported) + expect(subject.expires_on).to eq(nil) + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers).to eq([]) end end diff --git a/spec/whois/parsers/responses/whois.isnic.is/is/status_registered_spec.rb b/spec/whois/parsers/responses/whois.isnic.is/is/status_registered_spec.rb index 9a075bef..a32eeb16 100644 --- a/spec/whois/parsers/responses/whois.isnic.is/is/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.isnic.is/is/status_registered_spec.rb @@ -11,56 +11,29 @@ # require 'spec_helper' -require 'whois/parsers/whois.isnic.is.rb' -describe Whois::Parsers::WhoisIsnicIs, "status_registered.expected" do +describe "whois.isnic.is", :aggregate_failures do subject do file = fixture("responses", "whois.isnic.is/is/status_registered.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.isnic.is") + Whois::Parser.parser_for(part) end - describe "#status" do - it do - expect(subject.status).to eq(:registered) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(false) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(true) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to be_a(Time) - expect(subject.created_on).to eq(DateTime.parse("2002-05-22")) - end - end - describe "#updated_on" do - it do - expect { subject.updated_on }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to be_a(Time) - expect(subject.expires_on).to eq(DateTime.parse("2014-05-22")) - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers.size).to eq(2) - expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[0].name).to eq("ns1.google.com") - expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[1].name).to eq("ns2.google.com") - end + it "matches status_registered.expected" do + expect(subject.status).to eq(:registered) + expect(subject.available?).to eq(false) + expect(subject.registered?).to eq(true) + expect(subject.created_on).to be_a(Time) + expect(subject.created_on).to eq(DateTime.parse("2002-05-22")) + expect { subject.updated_on }.to raise_error(Whois::AttributeNotSupported) + expect(subject.expires_on).to be_a(Time) + expect(subject.expires_on).to eq(DateTime.parse("2014-05-22")) + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers.size).to eq(2) + expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[0].name).to eq("ns1.google.com") + expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[1].name).to eq("ns2.google.com") end end diff --git a/spec/whois/parsers/responses/whois.isoc.org.il/il/property_status_missing_spec.rb b/spec/whois/parsers/responses/whois.isoc.org.il/il/property_status_missing_spec.rb index b34f9cfd..10c2246d 100644 --- a/spec/whois/parsers/responses/whois.isoc.org.il/il/property_status_missing_spec.rb +++ b/spec/whois/parsers/responses/whois.isoc.org.il/il/property_status_missing_spec.rb @@ -11,29 +11,18 @@ # require 'spec_helper' -require 'whois/parsers/whois.isoc.org.il.rb' -describe Whois::Parsers::WhoisIsocOrgIl, "property_status_missing.expected" do +describe "whois.isoc.org.il", :aggregate_failures do subject do file = fixture("responses", "whois.isoc.org.il/il/property_status_missing.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.isoc.org.il") + Whois::Parser.parser_for(part) end - describe "#status" do - it do - expect(subject.status).to eq(:available) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(true) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(false) - end + it "matches property_status_missing.expected" do + expect(subject.status).to eq(:available) + expect(subject.available?).to eq(true) + expect(subject.registered?).to eq(false) end end diff --git a/spec/whois/parsers/responses/whois.isoc.org.il/il/property_status_transfer_allowed_spec.rb b/spec/whois/parsers/responses/whois.isoc.org.il/il/property_status_transfer_allowed_spec.rb index 8da48cfe..6772810d 100644 --- a/spec/whois/parsers/responses/whois.isoc.org.il/il/property_status_transfer_allowed_spec.rb +++ b/spec/whois/parsers/responses/whois.isoc.org.il/il/property_status_transfer_allowed_spec.rb @@ -11,29 +11,18 @@ # require 'spec_helper' -require 'whois/parsers/whois.isoc.org.il.rb' -describe Whois::Parsers::WhoisIsocOrgIl, "property_status_transfer_allowed.expected" do +describe "whois.isoc.org.il", :aggregate_failures do subject do file = fixture("responses", "whois.isoc.org.il/il/property_status_transfer_allowed.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.isoc.org.il") + Whois::Parser.parser_for(part) end - describe "#status" do - it do - expect(subject.status).to eq(:registered) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(false) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(true) - end + it "matches property_status_transfer_allowed.expected" do + expect(subject.status).to eq(:registered) + expect(subject.available?).to eq(false) + expect(subject.registered?).to eq(true) end end diff --git a/spec/whois/parsers/responses/whois.isoc.org.il/il/property_status_transfer_locked_spec.rb b/spec/whois/parsers/responses/whois.isoc.org.il/il/property_status_transfer_locked_spec.rb index 136342fc..e82508f4 100644 --- a/spec/whois/parsers/responses/whois.isoc.org.il/il/property_status_transfer_locked_spec.rb +++ b/spec/whois/parsers/responses/whois.isoc.org.il/il/property_status_transfer_locked_spec.rb @@ -11,29 +11,18 @@ # require 'spec_helper' -require 'whois/parsers/whois.isoc.org.il.rb' -describe Whois::Parsers::WhoisIsocOrgIl, "property_status_transfer_locked.expected" do +describe "whois.isoc.org.il", :aggregate_failures do subject do file = fixture("responses", "whois.isoc.org.il/il/property_status_transfer_locked.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.isoc.org.il") + Whois::Parser.parser_for(part) end - describe "#status" do - it do - expect(subject.status).to eq(:registered) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(false) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(true) - end + it "matches property_status_transfer_locked.expected" do + expect(subject.status).to eq(:registered) + expect(subject.available?).to eq(false) + expect(subject.registered?).to eq(true) end end diff --git a/spec/whois/parsers/responses/whois.isoc.org.il/il/status_available_spec.rb b/spec/whois/parsers/responses/whois.isoc.org.il/il/status_available_spec.rb index 8a1f8963..fdf03c7d 100644 --- a/spec/whois/parsers/responses/whois.isoc.org.il/il/status_available_spec.rb +++ b/spec/whois/parsers/responses/whois.isoc.org.il/il/status_available_spec.rb @@ -11,50 +11,23 @@ # require 'spec_helper' -require 'whois/parsers/whois.isoc.org.il.rb' -describe Whois::Parsers::WhoisIsocOrgIl, "status_available.expected" do +describe "whois.isoc.org.il", :aggregate_failures do subject do file = fixture("responses", "whois.isoc.org.il/il/status_available.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.isoc.org.il") + Whois::Parser.parser_for(part) end - describe "#status" do - it do - expect(subject.status).to eq(:available) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(true) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(false) - end - end - describe "#created_on" do - it do - expect { subject.created_on }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#updated_on" do - it do - expect(subject.updated_on).to eq(nil) - end - end - describe "#expires_on" do - it do - expect { subject.expires_on }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers).to eq([]) - end + it "matches status_available.expected" do + expect(subject.status).to eq(:available) + expect(subject.available?).to eq(true) + expect(subject.registered?).to eq(false) + expect { subject.created_on }.to raise_error(Whois::AttributeNotSupported) + expect(subject.updated_on).to eq(nil) + expect { subject.expires_on }.to raise_error(Whois::AttributeNotSupported) + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers).to eq([]) end end diff --git a/spec/whois/parsers/responses/whois.isoc.org.il/il/status_registered_spec.rb b/spec/whois/parsers/responses/whois.isoc.org.il/il/status_registered_spec.rb index da422646..990a94b1 100644 --- a/spec/whois/parsers/responses/whois.isoc.org.il/il/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.isoc.org.il/il/status_registered_spec.rb @@ -11,63 +11,36 @@ # require 'spec_helper' -require 'whois/parsers/whois.isoc.org.il.rb' -describe Whois::Parsers::WhoisIsocOrgIl, "status_registered.expected" do +describe "whois.isoc.org.il", :aggregate_failures do subject do file = fixture("responses", "whois.isoc.org.il/il/status_registered.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.isoc.org.il") + Whois::Parser.parser_for(part) end - describe "#status" do - it do - expect(subject.status).to eq(:registered) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(false) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(true) - end - end - describe "#created_on" do - it do - expect { subject.created_on }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#updated_on" do - it do - expect(subject.updated_on).to be_a(Time) - expect(subject.updated_on).to eq(DateTime.parse("2014-01-16")) - end - end - describe "#expires_on" do - it do - expect { subject.expires_on }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers.size).to eq(6) - expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[0].name).to eq("ns.isoc.org.il") - expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[1].name).to eq("grappa.isoc.org.il") - expect(subject.nameservers[2]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[2].name).to eq("aristo.tau.ac.il") - expect(subject.nameservers[3]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[3].name).to eq("relay.huji.ac.il") - expect(subject.nameservers[4]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[4].name).to eq("drns.isoc.org.il") - expect(subject.nameservers[5]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[5].name).to eq("sns-pb.isc.org") - end + it "matches status_registered.expected" do + expect(subject.status).to eq(:registered) + expect(subject.available?).to eq(false) + expect(subject.registered?).to eq(true) + expect { subject.created_on }.to raise_error(Whois::AttributeNotSupported) + expect(subject.updated_on).to be_a(Time) + expect(subject.updated_on).to eq(DateTime.parse("2014-01-16")) + expect { subject.expires_on }.to raise_error(Whois::AttributeNotSupported) + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers.size).to eq(6) + expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[0].name).to eq("ns.isoc.org.il") + expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[1].name).to eq("grappa.isoc.org.il") + expect(subject.nameservers[2]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[2].name).to eq("aristo.tau.ac.il") + expect(subject.nameservers[3]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[3].name).to eq("relay.huji.ac.il") + expect(subject.nameservers[4]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[4].name).to eq("drns.isoc.org.il") + expect(subject.nameservers[5]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[5].name).to eq("sns-pb.isc.org") end end diff --git a/spec/whois/parsers/responses/whois.ja.net/ac.uk/status_available_spec.rb b/spec/whois/parsers/responses/whois.ja.net/ac.uk/status_available_spec.rb index 76fbf92d..6ffe37f2 100644 --- a/spec/whois/parsers/responses/whois.ja.net/ac.uk/status_available_spec.rb +++ b/spec/whois/parsers/responses/whois.ja.net/ac.uk/status_available_spec.rb @@ -11,50 +11,23 @@ # require 'spec_helper' -require 'whois/parsers/whois.ja.net.rb' -describe Whois::Parsers::WhoisJaNet, "status_available.expected" do +describe "whois.ja.net", :aggregate_failures do subject do file = fixture("responses", "whois.ja.net/ac.uk/status_available.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.ja.net") + Whois::Parser.parser_for(part) end - describe "#status" do - it do - expect(subject.status).to eq(:available) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(true) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(false) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to eq(nil) - end - end - describe "#updated_on" do - it do - expect(subject.updated_on).to eq(nil) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to eq(nil) - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers).to eq([]) - end + it "matches status_available.expected" do + expect(subject.status).to eq(:available) + expect(subject.available?).to eq(true) + expect(subject.registered?).to eq(false) + expect(subject.created_on).to eq(nil) + expect(subject.updated_on).to eq(nil) + expect(subject.expires_on).to eq(nil) + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers).to eq([]) end end diff --git a/spec/whois/parsers/responses/whois.ja.net/ac.uk/status_registered_spec.rb b/spec/whois/parsers/responses/whois.ja.net/ac.uk/status_registered_spec.rb index 1a851250..bbfc582b 100644 --- a/spec/whois/parsers/responses/whois.ja.net/ac.uk/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.ja.net/ac.uk/status_registered_spec.rb @@ -11,65 +11,38 @@ # require 'spec_helper' -require 'whois/parsers/whois.ja.net.rb' -describe Whois::Parsers::WhoisJaNet, "status_registered.expected" do +describe "whois.ja.net", :aggregate_failures do subject do file = fixture("responses", "whois.ja.net/ac.uk/status_registered.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.ja.net") + Whois::Parser.parser_for(part) end - describe "#status" do - it do - expect(subject.status).to eq(:registered) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(false) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(true) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to be_a(Time) - expect(subject.created_on).to eq(DateTime.parse("2003-11-07")) - end - end - describe "#updated_on" do - it do - expect(subject.updated_on).to be_a(Time) - expect(subject.updated_on).to eq(DateTime.parse("2013-03-20")) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to be_a(Time) - expect(subject.expires_on).to eq(DateTime.parse("2014-06-16")) - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers.size).to eq(4) - expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[0].name).to eq("agate.lut.ac.uk") - expect(subject.nameservers[0].ipv4).to eq("158.125.1.100") - expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[1].name).to eq("bgate.lut.ac.uk") - expect(subject.nameservers[1].ipv4).to eq(nil) - expect(subject.nameservers[2]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[2].name).to eq("cgate.lut.ac.uk") - expect(subject.nameservers[2].ipv4).to eq(nil) - expect(subject.nameservers[3]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[3].name).to eq("ns3.ja.net") - expect(subject.nameservers[3].ipv4).to eq(nil) - end + it "matches status_registered.expected" do + expect(subject.status).to eq(:registered) + expect(subject.available?).to eq(false) + expect(subject.registered?).to eq(true) + expect(subject.created_on).to be_a(Time) + expect(subject.created_on).to eq(DateTime.parse("2003-11-07")) + expect(subject.updated_on).to be_a(Time) + expect(subject.updated_on).to eq(DateTime.parse("2013-03-20")) + expect(subject.expires_on).to be_a(Time) + expect(subject.expires_on).to eq(DateTime.parse("2014-06-16")) + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers.size).to eq(4) + expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[0].name).to eq("agate.lut.ac.uk") + expect(subject.nameservers[0].ipv4).to eq("158.125.1.100") + expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[1].name).to eq("bgate.lut.ac.uk") + expect(subject.nameservers[1].ipv4).to eq(nil) + expect(subject.nameservers[2]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[2].name).to eq("cgate.lut.ac.uk") + expect(subject.nameservers[2].ipv4).to eq(nil) + expect(subject.nameservers[3]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[3].name).to eq("ns3.ja.net") + expect(subject.nameservers[3].ipv4).to eq(nil) end end diff --git a/spec/whois/parsers/responses/whois.ja.net/gov.uk/status_available_spec.rb b/spec/whois/parsers/responses/whois.ja.net/gov.uk/status_available_spec.rb index ecee3dd9..7a2ab508 100644 --- a/spec/whois/parsers/responses/whois.ja.net/gov.uk/status_available_spec.rb +++ b/spec/whois/parsers/responses/whois.ja.net/gov.uk/status_available_spec.rb @@ -11,50 +11,23 @@ # require 'spec_helper' -require 'whois/parsers/whois.ja.net.rb' -describe Whois::Parsers::WhoisJaNet, "status_available.expected" do +describe "whois.ja.net", :aggregate_failures do subject do file = fixture("responses", "whois.ja.net/gov.uk/status_available.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.ja.net") + Whois::Parser.parser_for(part) end - describe "#status" do - it do - expect(subject.status).to eq(:available) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(true) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(false) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to eq(nil) - end - end - describe "#updated_on" do - it do - expect(subject.updated_on).to eq(nil) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to eq(nil) - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers).to eq([]) - end + it "matches status_available.expected" do + expect(subject.status).to eq(:available) + expect(subject.available?).to eq(true) + expect(subject.registered?).to eq(false) + expect(subject.created_on).to eq(nil) + expect(subject.updated_on).to eq(nil) + expect(subject.expires_on).to eq(nil) + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers).to eq([]) end end diff --git a/spec/whois/parsers/responses/whois.ja.net/gov.uk/status_registered_spec.rb b/spec/whois/parsers/responses/whois.ja.net/gov.uk/status_registered_spec.rb index 5a495126..081aec93 100644 --- a/spec/whois/parsers/responses/whois.ja.net/gov.uk/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.ja.net/gov.uk/status_registered_spec.rb @@ -11,69 +11,42 @@ # require 'spec_helper' -require 'whois/parsers/whois.ja.net.rb' -describe Whois::Parsers::WhoisJaNet, "status_registered.expected" do +describe "whois.ja.net", :aggregate_failures do subject do file = fixture("responses", "whois.ja.net/gov.uk/status_registered.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.ja.net") + Whois::Parser.parser_for(part) end - describe "#status" do - it do - expect(subject.status).to eq(:registered) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(false) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(true) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to be_a(Time) - expect(subject.created_on).to eq(DateTime.parse("2003-09-17")) - end - end - describe "#updated_on" do - it do - expect(subject.updated_on).to be_a(Time) - expect(subject.updated_on).to eq(DateTime.parse("2010-01-13")) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to be_a(Time) - expect(subject.expires_on).to eq(DateTime.parse("2011-03-30")) - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers.size).to eq(8) - expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[0].name).to eq("eur5.akam.net") - expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[1].name).to eq("eur6.akam.net") - expect(subject.nameservers[2]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[2].name).to eq("ns1-173.akam.net") - expect(subject.nameservers[3]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[3].name).to eq("ns1-31.akam.net") - expect(subject.nameservers[4]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[4].name).to eq("usc4.akam.net") - expect(subject.nameservers[5]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[5].name).to eq("use10.akam.net") - expect(subject.nameservers[6]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[6].name).to eq("usw2.akam.net") - expect(subject.nameservers[7]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[7].name).to eq("usw4.akam.net") - end + it "matches status_registered.expected" do + expect(subject.status).to eq(:registered) + expect(subject.available?).to eq(false) + expect(subject.registered?).to eq(true) + expect(subject.created_on).to be_a(Time) + expect(subject.created_on).to eq(DateTime.parse("2003-09-17")) + expect(subject.updated_on).to be_a(Time) + expect(subject.updated_on).to eq(DateTime.parse("2010-01-13")) + expect(subject.expires_on).to be_a(Time) + expect(subject.expires_on).to eq(DateTime.parse("2011-03-30")) + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers.size).to eq(8) + expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[0].name).to eq("eur5.akam.net") + expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[1].name).to eq("eur6.akam.net") + expect(subject.nameservers[2]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[2].name).to eq("ns1-173.akam.net") + expect(subject.nameservers[3]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[3].name).to eq("ns1-31.akam.net") + expect(subject.nameservers[4]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[4].name).to eq("usc4.akam.net") + expect(subject.nameservers[5]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[5].name).to eq("use10.akam.net") + expect(subject.nameservers[6]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[6].name).to eq("usw2.akam.net") + expect(subject.nameservers[7]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[7].name).to eq("usw4.akam.net") end end diff --git a/spec/whois/parsers/responses/whois.je/je/status_available_spec.rb b/spec/whois/parsers/responses/whois.je/je/status_available_spec.rb index aafb5e1e..05269338 100644 --- a/spec/whois/parsers/responses/whois.je/je/status_available_spec.rb +++ b/spec/whois/parsers/responses/whois.je/je/status_available_spec.rb @@ -11,65 +11,26 @@ # require 'spec_helper' -require 'whois/parsers/whois.je.rb' -describe Whois::Parsers::WhoisJe, "status_available.expected" do +describe "whois.je", :aggregate_failures do subject do file = fixture("responses", "whois.je/je/status_available.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.je") + Whois::Parser.parser_for(part) end - describe "#domain" do - it do - expect(subject.domain).to eq("u34jedzcq.je") - end - end - describe "#domain_id" do - it do - expect { subject.domain_id }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#status" do - it do - expect(subject.status).to eq(:available) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(true) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(false) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to eq(nil) - end - end - describe "#updated_on" do - it do - expect(subject.updated_on).to eq(nil) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to eq(nil) - end - end - describe "#registrar" do - it do - expect(subject.registrar).to eq(nil) - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers).to eq([]) - end + it "matches status_available.expected" do + expect(subject.domain).to eq("u34jedzcq.je") + expect { subject.domain_id }.to raise_error(Whois::AttributeNotSupported) + expect(subject.status).to eq(:available) + expect(subject.available?).to eq(true) + expect(subject.registered?).to eq(false) + expect(subject.created_on).to eq(nil) + expect(subject.updated_on).to eq(nil) + expect(subject.expires_on).to eq(nil) + expect(subject.registrar).to eq(nil) + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers).to eq([]) end end diff --git a/spec/whois/parsers/responses/whois.je/je/status_registered_spec.rb b/spec/whois/parsers/responses/whois.je/je/status_registered_spec.rb index 6fc55676..0715e26e 100644 --- a/spec/whois/parsers/responses/whois.je/je/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.je/je/status_registered_spec.rb @@ -11,69 +11,34 @@ # require 'spec_helper' -require 'whois/parsers/whois.je.rb' -describe Whois::Parsers::WhoisJe, "status_registered.expected" do +describe "whois.je", :aggregate_failures do subject do file = fixture("responses", "whois.je/je/status_registered.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.je") + Whois::Parser.parser_for(part) end - describe "#domain" do - it do - expect(subject.domain).to eq("google.je") - end - end - describe "#domain_id" do - it do - expect { subject.domain_id }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#status" do - it do - expect(subject.status).to eq(:registered) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(false) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(true) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to be_a(Time) - expect(subject.created_on).to eq(DateTime.parse("2002-10-31 00:00:00 UTC")) - end - end - describe "#updated_on" do - it do - expect(subject.updated_on).to eq(nil) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to eq(nil) - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers.size).to eq(4) - expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[0].name).to eq("ns1.google.com") - expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[1].name).to eq("ns2.google.com") - expect(subject.nameservers[2]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[2].name).to eq("ns4.google.com") - expect(subject.nameservers[3]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[3].name).to eq("ns3.google.com") - end + it "matches status_registered.expected" do + expect(subject.domain).to eq("google.je") + expect { subject.domain_id }.to raise_error(Whois::AttributeNotSupported) + expect(subject.status).to eq(:registered) + expect(subject.available?).to eq(false) + expect(subject.registered?).to eq(true) + expect(subject.created_on).to be_a(Time) + expect(subject.created_on).to eq(DateTime.parse("2002-10-31 00:00:00 UTC")) + expect(subject.updated_on).to eq(nil) + expect(subject.expires_on).to eq(nil) + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers.size).to eq(4) + expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[0].name).to eq("ns1.google.com") + expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[1].name).to eq("ns2.google.com") + expect(subject.nameservers[2]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[2].name).to eq("ns4.google.com") + expect(subject.nameservers[3]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[3].name).to eq("ns3.google.com") end end diff --git a/spec/whois/parsers/responses/whois.jprs.jp/co.jp/property_state_deleted_spec.rb b/spec/whois/parsers/responses/whois.jprs.jp/co.jp/property_state_deleted_spec.rb index 9945b8d2..fea31dd9 100644 --- a/spec/whois/parsers/responses/whois.jprs.jp/co.jp/property_state_deleted_spec.rb +++ b/spec/whois/parsers/responses/whois.jprs.jp/co.jp/property_state_deleted_spec.rb @@ -11,29 +11,18 @@ # require 'spec_helper' -require 'whois/parsers/whois.jprs.jp.rb' -describe Whois::Parsers::WhoisJprsJp, "property_state_deleted.expected" do +describe "whois.jprs.jp", :aggregate_failures do subject do file = fixture("responses", "whois.jprs.jp/co.jp/property_state_deleted.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.jprs.jp") + Whois::Parser.parser_for(part) end - describe "#status" do - it do - expect(subject.status).to eq(:suspended) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(false) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(true) - end + it "matches property_state_deleted.expected" do + expect(subject.status).to eq(:suspended) + expect(subject.available?).to eq(false) + expect(subject.registered?).to eq(true) end end diff --git a/spec/whois/parsers/responses/whois.jprs.jp/co.jp/property_state_registered_spec.rb b/spec/whois/parsers/responses/whois.jprs.jp/co.jp/property_state_registered_spec.rb index ea32103c..ab3c29e3 100644 --- a/spec/whois/parsers/responses/whois.jprs.jp/co.jp/property_state_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.jprs.jp/co.jp/property_state_registered_spec.rb @@ -11,29 +11,18 @@ # require 'spec_helper' -require 'whois/parsers/whois.jprs.jp.rb' -describe Whois::Parsers::WhoisJprsJp, "property_state_registered.expected" do +describe "whois.jprs.jp", :aggregate_failures do subject do file = fixture("responses", "whois.jprs.jp/co.jp/property_state_registered.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.jprs.jp") + Whois::Parser.parser_for(part) end - describe "#status" do - it do - expect(subject.status).to eq(:registered) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(false) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(true) - end + it "matches property_state_registered.expected" do + expect(subject.status).to eq(:registered) + expect(subject.available?).to eq(false) + expect(subject.registered?).to eq(true) end end diff --git a/spec/whois/parsers/responses/whois.jprs.jp/jp/property_status_suspended_spec.rb b/spec/whois/parsers/responses/whois.jprs.jp/jp/property_status_suspended_spec.rb index a93907db..95ead90f 100644 --- a/spec/whois/parsers/responses/whois.jprs.jp/jp/property_status_suspended_spec.rb +++ b/spec/whois/parsers/responses/whois.jprs.jp/jp/property_status_suspended_spec.rb @@ -11,29 +11,18 @@ # require 'spec_helper' -require 'whois/parsers/whois.jprs.jp.rb' -describe Whois::Parsers::WhoisJprsJp, "property_status_suspended.expected" do +describe "whois.jprs.jp", :aggregate_failures do subject do file = fixture("responses", "whois.jprs.jp/jp/property_status_suspended.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.jprs.jp") + Whois::Parser.parser_for(part) end - describe "#status" do - it do - expect(subject.status).to eq(:expired) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(false) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(true) - end + it "matches property_status_suspended.expected" do + expect(subject.status).to eq(:expired) + expect(subject.available?).to eq(false) + expect(subject.registered?).to eq(true) end end diff --git a/spec/whois/parsers/responses/whois.jprs.jp/jp/property_status_to_be_suspended_spec.rb b/spec/whois/parsers/responses/whois.jprs.jp/jp/property_status_to_be_suspended_spec.rb index 04916c85..84419bcc 100644 --- a/spec/whois/parsers/responses/whois.jprs.jp/jp/property_status_to_be_suspended_spec.rb +++ b/spec/whois/parsers/responses/whois.jprs.jp/jp/property_status_to_be_suspended_spec.rb @@ -11,29 +11,18 @@ # require 'spec_helper' -require 'whois/parsers/whois.jprs.jp.rb' -describe Whois::Parsers::WhoisJprsJp, "property_status_to_be_suspended.expected" do +describe "whois.jprs.jp", :aggregate_failures do subject do file = fixture("responses", "whois.jprs.jp/jp/property_status_to_be_suspended.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.jprs.jp") + Whois::Parser.parser_for(part) end - describe "#status" do - it do - expect(subject.status).to eq(:redemption) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(false) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(true) - end + it "matches property_status_to_be_suspended.expected" do + expect(subject.status).to eq(:redemption) + expect(subject.available?).to eq(false) + expect(subject.registered?).to eq(true) end end diff --git a/spec/whois/parsers/responses/whois.jprs.jp/jp/property_updates_on_error_out-of-range_spec.rb b/spec/whois/parsers/responses/whois.jprs.jp/jp/property_updates_on_error_out-of-range_spec.rb index 17815079..c0169701 100644 --- a/spec/whois/parsers/responses/whois.jprs.jp/jp/property_updates_on_error_out-of-range_spec.rb +++ b/spec/whois/parsers/responses/whois.jprs.jp/jp/property_updates_on_error_out-of-range_spec.rb @@ -11,20 +11,17 @@ # require 'spec_helper' -require 'whois/parsers/whois.jprs.jp.rb' -describe Whois::Parsers::WhoisJprsJp, "property_updates_on_error_out-of-range.expected" do +describe "whois.jprs.jp", :aggregate_failures do subject do file = fixture("responses", "whois.jprs.jp/jp/property_updates_on_error_out-of-range.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.jprs.jp") + Whois::Parser.parser_for(part) end - describe "#updated_on" do - it do - expect(subject.updated_on).to be_a(Time) - expect(subject.updated_on).to eq(DateTime.parse("2010-10-18 11:30:47 JST")) - end + it "matches property_updates_on_error_out-of-range.expected" do + expect(subject.updated_on).to be_a(Time) + expect(subject.updated_on).to eq(DateTime.parse("2010-10-18 11:30:47 JST")) end end diff --git a/spec/whois/parsers/responses/whois.jprs.jp/jp/status_available_spec.rb b/spec/whois/parsers/responses/whois.jprs.jp/jp/status_available_spec.rb index 65d2c222..f5d1f7b8 100644 --- a/spec/whois/parsers/responses/whois.jprs.jp/jp/status_available_spec.rb +++ b/spec/whois/parsers/responses/whois.jprs.jp/jp/status_available_spec.rb @@ -11,50 +11,23 @@ # require 'spec_helper' -require 'whois/parsers/whois.jprs.jp.rb' -describe Whois::Parsers::WhoisJprsJp, "status_available.expected" do +describe "whois.jprs.jp", :aggregate_failures do subject do file = fixture("responses", "whois.jprs.jp/jp/status_available.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.jprs.jp") + Whois::Parser.parser_for(part) end - describe "#status" do - it do - expect(subject.status).to eq(:available) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(true) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(false) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to eq(nil) - end - end - describe "#updated_on" do - it do - expect(subject.updated_on).to eq(nil) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to eq(nil) - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers).to eq([]) - end + it "matches status_available.expected" do + expect(subject.status).to eq(:available) + expect(subject.available?).to eq(true) + expect(subject.registered?).to eq(false) + expect(subject.created_on).to eq(nil) + expect(subject.updated_on).to eq(nil) + expect(subject.expires_on).to eq(nil) + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers).to eq([]) end end diff --git a/spec/whois/parsers/responses/whois.jprs.jp/jp/status_registered_spec.rb b/spec/whois/parsers/responses/whois.jprs.jp/jp/status_registered_spec.rb index fba388a2..6b44e63b 100644 --- a/spec/whois/parsers/responses/whois.jprs.jp/jp/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.jprs.jp/jp/status_registered_spec.rb @@ -11,61 +11,34 @@ # require 'spec_helper' -require 'whois/parsers/whois.jprs.jp.rb' -describe Whois::Parsers::WhoisJprsJp, "status_registered.expected" do +describe "whois.jprs.jp", :aggregate_failures do subject do file = fixture("responses", "whois.jprs.jp/jp/status_registered.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.jprs.jp") + Whois::Parser.parser_for(part) end - describe "#status" do - it do - expect(subject.status).to eq(:registered) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(false) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(true) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to be_a(Time) - expect(subject.created_on).to eq(DateTime.parse("2005-05-30 00:00:00 JST")) - end - end - describe "#updated_on" do - it do - expect(subject.updated_on).to be_a(Time) - expect(subject.updated_on).to eq(DateTime.parse("2021-06-01 01:05:09 JST")) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to be_a(Time) - expect(subject.expires_on).to eq(DateTime.parse("2022-05-31 00:00:00 JST")) - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers.size).to eq(4) - expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[0].name).to eq("ns1.google.com") - expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[1].name).to eq("ns2.google.com") - expect(subject.nameservers[2]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[2].name).to eq("ns3.google.com") - expect(subject.nameservers[3]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[3].name).to eq("ns4.google.com") - end + it "matches status_registered.expected" do + expect(subject.status).to eq(:registered) + expect(subject.available?).to eq(false) + expect(subject.registered?).to eq(true) + expect(subject.created_on).to be_a(Time) + expect(subject.created_on).to eq(DateTime.parse("2005-05-30 00:00:00 JST")) + expect(subject.updated_on).to be_a(Time) + expect(subject.updated_on).to eq(DateTime.parse("2021-06-01 01:05:09 JST")) + expect(subject.expires_on).to be_a(Time) + expect(subject.expires_on).to eq(DateTime.parse("2022-05-31 00:00:00 JST")) + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers.size).to eq(4) + expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[0].name).to eq("ns1.google.com") + expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[1].name).to eq("ns2.google.com") + expect(subject.nameservers[2]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[2].name).to eq("ns3.google.com") + expect(subject.nameservers[3]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[3].name).to eq("ns4.google.com") end end diff --git a/spec/whois/parsers/responses/whois.jprs.jp/jp/status_reserved_spec.rb b/spec/whois/parsers/responses/whois.jprs.jp/jp/status_reserved_spec.rb index a3ae1ff8..272fb887 100644 --- a/spec/whois/parsers/responses/whois.jprs.jp/jp/status_reserved_spec.rb +++ b/spec/whois/parsers/responses/whois.jprs.jp/jp/status_reserved_spec.rb @@ -11,51 +11,24 @@ # require 'spec_helper' -require 'whois/parsers/whois.jprs.jp.rb' -describe Whois::Parsers::WhoisJprsJp, "status_reserved.expected" do +describe "whois.jprs.jp", :aggregate_failures do subject do file = fixture("responses", "whois.jprs.jp/jp/status_reserved.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.jprs.jp") + Whois::Parser.parser_for(part) end - describe "#status" do - it do - expect(subject.status).to eq(:reserved) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(false) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(true) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to eq(nil) - end - end - describe "#updated_on" do - it do - expect(subject.updated_on).to be_a(Time) - expect(subject.updated_on).to eq(DateTime.parse("2001-02-21 00:00:00 JST")) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to eq(nil) - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers).to eq([]) - end + it "matches status_reserved.expected" do + expect(subject.status).to eq(:reserved) + expect(subject.available?).to eq(false) + expect(subject.registered?).to eq(true) + expect(subject.created_on).to eq(nil) + expect(subject.updated_on).to be_a(Time) + expect(subject.updated_on).to eq(DateTime.parse("2001-02-21 00:00:00 JST")) + expect(subject.expires_on).to eq(nil) + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers).to eq([]) end end diff --git a/spec/whois/parsers/responses/whois.jprs.jp/ne.jp/property_created_on_missing_spec.rb b/spec/whois/parsers/responses/whois.jprs.jp/ne.jp/property_created_on_missing_spec.rb index ac578ca0..1fc65c19 100644 --- a/spec/whois/parsers/responses/whois.jprs.jp/ne.jp/property_created_on_missing_spec.rb +++ b/spec/whois/parsers/responses/whois.jprs.jp/ne.jp/property_created_on_missing_spec.rb @@ -11,19 +11,16 @@ # require 'spec_helper' -require 'whois/parsers/whois.jprs.jp.rb' -describe Whois::Parsers::WhoisJprsJp, "property_created_on_missing.expected" do +describe "whois.jprs.jp", :aggregate_failures do subject do file = fixture("responses", "whois.jprs.jp/ne.jp/property_created_on_missing.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.jprs.jp") + Whois::Parser.parser_for(part) end - describe "#created_on" do - it do - expect(subject.created_on).to eq(nil) - end + it "matches property_created_on_missing.expected" do + expect(subject.created_on).to eq(nil) end end diff --git a/spec/whois/parsers/responses/whois.jprs.jp/ne.jp/property_state_reserved_spec.rb b/spec/whois/parsers/responses/whois.jprs.jp/ne.jp/property_state_reserved_spec.rb index 11dc6a07..1368f2a1 100644 --- a/spec/whois/parsers/responses/whois.jprs.jp/ne.jp/property_state_reserved_spec.rb +++ b/spec/whois/parsers/responses/whois.jprs.jp/ne.jp/property_state_reserved_spec.rb @@ -11,34 +11,19 @@ # require 'spec_helper' -require 'whois/parsers/whois.jprs.jp.rb' -describe Whois::Parsers::WhoisJprsJp, "property_state_reserved.expected" do +describe "whois.jprs.jp", :aggregate_failures do subject do file = fixture("responses", "whois.jprs.jp/ne.jp/property_state_reserved.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.jprs.jp") + Whois::Parser.parser_for(part) end - describe "#status" do - it do - expect(subject.status).to eq(:reserved) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(false) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(true) - end - end - describe "#reserved?" do - it do - expect(subject.reserved?).to eq(true) - end + it "matches property_state_reserved.expected" do + expect(subject.status).to eq(:reserved) + expect(subject.available?).to eq(false) + expect(subject.registered?).to eq(true) + expect(subject.reserved?).to eq(true) end end diff --git a/spec/whois/parsers/responses/whois.jprs.jp/ne.jp/status_available_spec.rb b/spec/whois/parsers/responses/whois.jprs.jp/ne.jp/status_available_spec.rb index ad750ad9..dcc30393 100644 --- a/spec/whois/parsers/responses/whois.jprs.jp/ne.jp/status_available_spec.rb +++ b/spec/whois/parsers/responses/whois.jprs.jp/ne.jp/status_available_spec.rb @@ -11,50 +11,23 @@ # require 'spec_helper' -require 'whois/parsers/whois.jprs.jp.rb' -describe Whois::Parsers::WhoisJprsJp, "status_available.expected" do +describe "whois.jprs.jp", :aggregate_failures do subject do file = fixture("responses", "whois.jprs.jp/ne.jp/status_available.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.jprs.jp") + Whois::Parser.parser_for(part) end - describe "#status" do - it do - expect(subject.status).to eq(:available) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(true) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(false) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to eq(nil) - end - end - describe "#updated_on" do - it do - expect(subject.updated_on).to eq(nil) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to eq(nil) - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers).to eq([]) - end + it "matches status_available.expected" do + expect(subject.status).to eq(:available) + expect(subject.available?).to eq(true) + expect(subject.registered?).to eq(false) + expect(subject.created_on).to eq(nil) + expect(subject.updated_on).to eq(nil) + expect(subject.expires_on).to eq(nil) + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers).to eq([]) end end diff --git a/spec/whois/parsers/responses/whois.jprs.jp/ne.jp/status_registered_spec.rb b/spec/whois/parsers/responses/whois.jprs.jp/ne.jp/status_registered_spec.rb index 13035822..7417742b 100644 --- a/spec/whois/parsers/responses/whois.jprs.jp/ne.jp/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.jprs.jp/ne.jp/status_registered_spec.rb @@ -11,61 +11,34 @@ # require 'spec_helper' -require 'whois/parsers/whois.jprs.jp.rb' -describe Whois::Parsers::WhoisJprsJp, "status_registered.expected" do +describe "whois.jprs.jp", :aggregate_failures do subject do file = fixture("responses", "whois.jprs.jp/ne.jp/status_registered.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.jprs.jp") + Whois::Parser.parser_for(part) end - describe "#status" do - it do - expect(subject.status).to eq(:registered) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(false) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(true) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to be_a(Time) - expect(subject.created_on).to eq(DateTime.parse("2003-09-11 00:00:00 JST")) - end - end - describe "#updated_on" do - it do - expect(subject.updated_on).to be_a(Time) - expect(subject.updated_on).to eq(DateTime.parse("2009-10-23 19:22:08 JST")) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to be_a(Time) - expect(subject.expires_on).to eq(DateTime.parse("2010-09-30 00:00:00 JST")) - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers.size).to eq(4) - expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[0].name).to eq("ns1.google.com") - expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[1].name).to eq("ns2.google.com") - expect(subject.nameservers[2]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[2].name).to eq("ns3.google.com") - expect(subject.nameservers[3]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[3].name).to eq("ns4.google.com") - end + it "matches status_registered.expected" do + expect(subject.status).to eq(:registered) + expect(subject.available?).to eq(false) + expect(subject.registered?).to eq(true) + expect(subject.created_on).to be_a(Time) + expect(subject.created_on).to eq(DateTime.parse("2003-09-11 00:00:00 JST")) + expect(subject.updated_on).to be_a(Time) + expect(subject.updated_on).to eq(DateTime.parse("2009-10-23 19:22:08 JST")) + expect(subject.expires_on).to be_a(Time) + expect(subject.expires_on).to eq(DateTime.parse("2010-09-30 00:00:00 JST")) + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers.size).to eq(4) + expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[0].name).to eq("ns1.google.com") + expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[1].name).to eq("ns2.google.com") + expect(subject.nameservers[2]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[2].name).to eq("ns3.google.com") + expect(subject.nameservers[3]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[3].name).to eq("ns4.google.com") end end diff --git a/spec/whois/parsers/responses/whois.jprs.jp/ne.jp/status_reserved_spec.rb b/spec/whois/parsers/responses/whois.jprs.jp/ne.jp/status_reserved_spec.rb index 26825ece..c8793c60 100644 --- a/spec/whois/parsers/responses/whois.jprs.jp/ne.jp/status_reserved_spec.rb +++ b/spec/whois/parsers/responses/whois.jprs.jp/ne.jp/status_reserved_spec.rb @@ -11,34 +11,19 @@ # require 'spec_helper' -require 'whois/parsers/whois.jprs.jp.rb' -describe Whois::Parsers::WhoisJprsJp, "status_reserved.expected" do +describe "whois.jprs.jp", :aggregate_failures do subject do file = fixture("responses", "whois.jprs.jp/ne.jp/status_reserved.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.jprs.jp") + Whois::Parser.parser_for(part) end - describe "#status" do - it do - expect(subject.status).to eq(:reserved) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(false) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(true) - end - end - describe "#reserved?" do - it do - expect(subject.reserved?).to eq(true) - end + it "matches status_reserved.expected" do + expect(subject.status).to eq(:reserved) + expect(subject.available?).to eq(false) + expect(subject.registered?).to eq(true) + expect(subject.reserved?).to eq(true) end end diff --git a/spec/whois/parsers/responses/whois.kenic.or.ke/ke/status_available_spec.rb b/spec/whois/parsers/responses/whois.kenic.or.ke/ke/status_available_spec.rb index 462a8c60..18260015 100644 --- a/spec/whois/parsers/responses/whois.kenic.or.ke/ke/status_available_spec.rb +++ b/spec/whois/parsers/responses/whois.kenic.or.ke/ke/status_available_spec.rb @@ -11,50 +11,23 @@ # require 'spec_helper' -require 'whois/parsers/whois.kenic.or.ke.rb' -describe Whois::Parsers::WhoisKenicOrKe, "status_available.expected" do +describe "whois.kenic.or.ke", :aggregate_failures do subject do file = fixture("responses", "whois.kenic.or.ke/ke/status_available.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.kenic.or.ke") + Whois::Parser.parser_for(part) end - describe "#status" do - it do - expect(subject.status).to eq(:available) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(true) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(false) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to eq(nil) - end - end - describe "#updated_on" do - it do - expect(subject.updated_on).to eq(nil) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to eq(nil) - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers).to eq([]) - end + it "matches status_available.expected" do + expect(subject.status).to eq(:available) + expect(subject.available?).to eq(true) + expect(subject.registered?).to eq(false) + expect(subject.created_on).to eq(nil) + expect(subject.updated_on).to eq(nil) + expect(subject.expires_on).to eq(nil) + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers).to eq([]) end end diff --git a/spec/whois/parsers/responses/whois.kenic.or.ke/ke/status_invalid_spec.rb b/spec/whois/parsers/responses/whois.kenic.or.ke/ke/status_invalid_spec.rb index cbcf1fb6..e49695f3 100644 --- a/spec/whois/parsers/responses/whois.kenic.or.ke/ke/status_invalid_spec.rb +++ b/spec/whois/parsers/responses/whois.kenic.or.ke/ke/status_invalid_spec.rb @@ -11,55 +11,24 @@ # require 'spec_helper' -require 'whois/parsers/whois.kenic.or.ke.rb' -describe Whois::Parsers::WhoisKenicOrKe, "status_invalid.expected" do +describe "whois.kenic.or.ke", :aggregate_failures do subject do file = fixture("responses", "whois.kenic.or.ke/ke/status_invalid.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.kenic.or.ke") + Whois::Parser.parser_for(part) end - describe "#status" do - it do - expect(subject.status).to eq(:invalid) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(false) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(false) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to eq(nil) - end - end - describe "#updated_on" do - it do - expect(subject.updated_on).to eq(nil) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to eq(nil) - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers).to eq([]) - end - end - describe "#invalid?" do - it do - expect(subject.invalid?).to eq(true) - end + it "matches status_invalid.expected" do + expect(subject.status).to eq(:invalid) + expect(subject.available?).to eq(false) + expect(subject.registered?).to eq(false) + expect(subject.created_on).to eq(nil) + expect(subject.updated_on).to eq(nil) + expect(subject.expires_on).to eq(nil) + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers).to eq([]) + expect(subject.invalid?).to eq(true) end end diff --git a/spec/whois/parsers/responses/whois.kenic.or.ke/ke/status_registered_spec.rb b/spec/whois/parsers/responses/whois.kenic.or.ke/ke/status_registered_spec.rb index 9934675d..dec62443 100644 --- a/spec/whois/parsers/responses/whois.kenic.or.ke/ke/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.kenic.or.ke/ke/status_registered_spec.rb @@ -11,61 +11,34 @@ # require 'spec_helper' -require 'whois/parsers/whois.kenic.or.ke.rb' -describe Whois::Parsers::WhoisKenicOrKe, "status_registered.expected" do +describe "whois.kenic.or.ke", :aggregate_failures do subject do file = fixture("responses", "whois.kenic.or.ke/ke/status_registered.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.kenic.or.ke") + Whois::Parser.parser_for(part) end - describe "#status" do - it do - expect(subject.status).to eq(:registered) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(false) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(true) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to be_a(Time) - expect(subject.created_on).to eq(DateTime.parse("2003-04-18 00:00:00 EAT")) - end - end - describe "#updated_on" do - it do - expect(subject.updated_on).to be_a(Time) - expect(subject.updated_on).to eq(DateTime.parse("2013-12-16 12:48:00 EAT")) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to be_a(Time) - expect(subject.expires_on).to eq(DateTime.parse("2015-01-01 00:00:00 EAT")) - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers.size).to eq(4) - expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[0].name).to eq("ns1.google.com") - expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[1].name).to eq("ns2.google.com") - expect(subject.nameservers[2]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[2].name).to eq("ns3.google.com") - expect(subject.nameservers[3]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[3].name).to eq("ns4.google.com") - end + it "matches status_registered.expected" do + expect(subject.status).to eq(:registered) + expect(subject.available?).to eq(false) + expect(subject.registered?).to eq(true) + expect(subject.created_on).to be_a(Time) + expect(subject.created_on).to eq(DateTime.parse("2003-04-18 00:00:00 EAT")) + expect(subject.updated_on).to be_a(Time) + expect(subject.updated_on).to eq(DateTime.parse("2013-12-16 12:48:00 EAT")) + expect(subject.expires_on).to be_a(Time) + expect(subject.expires_on).to eq(DateTime.parse("2015-01-01 00:00:00 EAT")) + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers.size).to eq(4) + expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[0].name).to eq("ns1.google.com") + expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[1].name).to eq("ns2.google.com") + expect(subject.nameservers[2]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[2].name).to eq("ns3.google.com") + expect(subject.nameservers[3]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[3].name).to eq("ns4.google.com") end end diff --git a/spec/whois/parsers/responses/whois.kg/kg/status_available_spec.rb b/spec/whois/parsers/responses/whois.kg/kg/status_available_spec.rb index 2bdfb10d..a4d909cd 100644 --- a/spec/whois/parsers/responses/whois.kg/kg/status_available_spec.rb +++ b/spec/whois/parsers/responses/whois.kg/kg/status_available_spec.rb @@ -11,50 +11,23 @@ # require 'spec_helper' -require 'whois/parsers/whois.kg.rb' -describe Whois::Parsers::WhoisKg, "status_available.expected" do +describe "whois.kg", :aggregate_failures do subject do file = fixture("responses", "whois.kg/kg/status_available.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.kg") + Whois::Parser.parser_for(part) end - describe "#status" do - it do - expect(subject.status).to eq(:available) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(true) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(false) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to eq(nil) - end - end - describe "#updated_on" do - it do - expect(subject.updated_on).to eq(nil) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to eq(nil) - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers).to eq([]) - end + it "matches status_available.expected" do + expect(subject.status).to eq(:available) + expect(subject.available?).to eq(true) + expect(subject.registered?).to eq(false) + expect(subject.created_on).to eq(nil) + expect(subject.updated_on).to eq(nil) + expect(subject.expires_on).to eq(nil) + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers).to eq([]) end end diff --git a/spec/whois/parsers/responses/whois.kg/kg/status_registered_spec.rb b/spec/whois/parsers/responses/whois.kg/kg/status_registered_spec.rb index c137e8eb..2a0ff87f 100644 --- a/spec/whois/parsers/responses/whois.kg/kg/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.kg/kg/status_registered_spec.rb @@ -11,65 +11,38 @@ # require 'spec_helper' -require 'whois/parsers/whois.kg.rb' -describe Whois::Parsers::WhoisKg, "status_registered.expected" do +describe "whois.kg", :aggregate_failures do subject do file = fixture("responses", "whois.kg/kg/status_registered.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.kg") + Whois::Parser.parser_for(part) end - describe "#status" do - it do - expect(subject.status).to eq(:registered) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(false) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(true) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to be_a(Time) - expect(subject.created_on).to eq(DateTime.parse("2004-02-10 09:42:42")) - end - end - describe "#updated_on" do - it do - expect(subject.updated_on).to be_a(Time) - expect(subject.updated_on).to eq(DateTime.parse("2010-04-19 21:47:14")) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to be_a(Time) - expect(subject.expires_on).to eq(DateTime.parse("2014-03-30 23:59:00")) - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers.size).to eq(3) - expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[0].name).to eq("ns1.google.com") - expect(subject.nameservers[0].ipv4).to eq(nil) - expect(subject.nameservers[0].ipv6).to eq(nil) - expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[1].name).to eq("ns2.google.com") - expect(subject.nameservers[1].ipv4).to eq(nil) - expect(subject.nameservers[1].ipv6).to eq(nil) - expect(subject.nameservers[2]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[2].name).to eq("ns4.google.com") - expect(subject.nameservers[2].ipv4).to eq(nil) - expect(subject.nameservers[2].ipv6).to eq(nil) - end + it "matches status_registered.expected" do + expect(subject.status).to eq(:registered) + expect(subject.available?).to eq(false) + expect(subject.registered?).to eq(true) + expect(subject.created_on).to be_a(Time) + expect(subject.created_on).to eq(DateTime.parse("2004-02-10 09:42:42")) + expect(subject.updated_on).to be_a(Time) + expect(subject.updated_on).to eq(DateTime.parse("2010-04-19 21:47:14")) + expect(subject.expires_on).to be_a(Time) + expect(subject.expires_on).to eq(DateTime.parse("2014-03-30 23:59:00")) + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers.size).to eq(3) + expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[0].name).to eq("ns1.google.com") + expect(subject.nameservers[0].ipv4).to eq(nil) + expect(subject.nameservers[0].ipv6).to eq(nil) + expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[1].name).to eq("ns2.google.com") + expect(subject.nameservers[1].ipv4).to eq(nil) + expect(subject.nameservers[1].ipv6).to eq(nil) + expect(subject.nameservers[2]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[2].name).to eq("ns4.google.com") + expect(subject.nameservers[2].ipv4).to eq(nil) + expect(subject.nameservers[2].ipv6).to eq(nil) end end diff --git a/spec/whois/parsers/responses/whois.kr/kr/property_nameservers_with_ip_spec.rb b/spec/whois/parsers/responses/whois.kr/kr/property_nameservers_with_ip_spec.rb index 1a42e8ea..604cca2b 100644 --- a/spec/whois/parsers/responses/whois.kr/kr/property_nameservers_with_ip_spec.rb +++ b/spec/whois/parsers/responses/whois.kr/kr/property_nameservers_with_ip_spec.rb @@ -11,26 +11,23 @@ # require 'spec_helper' -require 'whois/parsers/whois.kr.rb' -describe Whois::Parsers::WhoisKr, "property_nameservers_with_ip.expected" do +describe "whois.kr", :aggregate_failures do subject do file = fixture("responses", "whois.kr/kr/property_nameservers_with_ip.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.kr") + Whois::Parser.parser_for(part) end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers.size).to eq(2) - expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[0].name).to eq("prmns.lg.co.kr") - expect(subject.nameservers[0].ipv4).to eq("165.243.5.15") - expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[1].name).to eq("secns.lg.co.kr") - expect(subject.nameservers[1].ipv4).to eq("203.247.133.133") - end + it "matches property_nameservers_with_ip.expected" do + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers.size).to eq(2) + expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[0].name).to eq("prmns.lg.co.kr") + expect(subject.nameservers[0].ipv4).to eq("165.243.5.15") + expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[1].name).to eq("secns.lg.co.kr") + expect(subject.nameservers[1].ipv4).to eq("203.247.133.133") end end diff --git a/spec/whois/parsers/responses/whois.kr/kr/status_available_spec.rb b/spec/whois/parsers/responses/whois.kr/kr/status_available_spec.rb index 29775188..365718ea 100644 --- a/spec/whois/parsers/responses/whois.kr/kr/status_available_spec.rb +++ b/spec/whois/parsers/responses/whois.kr/kr/status_available_spec.rb @@ -11,50 +11,23 @@ # require 'spec_helper' -require 'whois/parsers/whois.kr.rb' -describe Whois::Parsers::WhoisKr, "status_available.expected" do +describe "whois.kr", :aggregate_failures do subject do file = fixture("responses", "whois.kr/kr/status_available.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.kr") + Whois::Parser.parser_for(part) end - describe "#status" do - it do - expect(subject.status).to eq(:available) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(true) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(false) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to eq(nil) - end - end - describe "#updated_on" do - it do - expect(subject.updated_on).to eq(nil) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to eq(nil) - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers).to eq([]) - end + it "matches status_available.expected" do + expect(subject.status).to eq(:available) + expect(subject.available?).to eq(true) + expect(subject.registered?).to eq(false) + expect(subject.created_on).to eq(nil) + expect(subject.updated_on).to eq(nil) + expect(subject.expires_on).to eq(nil) + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers).to eq([]) end end diff --git a/spec/whois/parsers/responses/whois.kr/kr/status_registered_spec.rb b/spec/whois/parsers/responses/whois.kr/kr/status_registered_spec.rb index dd3840c8..e46fbc15 100644 --- a/spec/whois/parsers/responses/whois.kr/kr/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.kr/kr/status_registered_spec.rb @@ -11,57 +11,30 @@ # require 'spec_helper' -require 'whois/parsers/whois.kr.rb' -describe Whois::Parsers::WhoisKr, "status_registered.expected" do +describe "whois.kr", :aggregate_failures do subject do file = fixture("responses", "whois.kr/kr/status_registered.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.kr") + Whois::Parser.parser_for(part) end - describe "#status" do - it do - expect(subject.status).to eq(:registered) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(false) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(true) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to be_a(Time) - expect(subject.created_on).to eq(DateTime.parse("2007-03-02")) - end - end - describe "#updated_on" do - it do - expect(subject.updated_on).to be_a(Time) - expect(subject.updated_on).to eq(DateTime.parse("2010-10-04")) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to be_a(Time) - expect(subject.expires_on).to eq(DateTime.parse("2015-03-02")) - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers.size).to eq(2) - expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[0].name).to eq("ns1.google.com") - expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[1].name).to eq("ns2.google.com") - end + it "matches status_registered.expected" do + expect(subject.status).to eq(:registered) + expect(subject.available?).to eq(false) + expect(subject.registered?).to eq(true) + expect(subject.created_on).to be_a(Time) + expect(subject.created_on).to eq(DateTime.parse("2007-03-02")) + expect(subject.updated_on).to be_a(Time) + expect(subject.updated_on).to eq(DateTime.parse("2010-10-04")) + expect(subject.expires_on).to be_a(Time) + expect(subject.expires_on).to eq(DateTime.parse("2015-03-02")) + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers.size).to eq(2) + expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[0].name).to eq("ns1.google.com") + expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[1].name).to eq("ns2.google.com") end end diff --git a/spec/whois/parsers/responses/whois.markmonitor.com/response_throttled_spec.rb b/spec/whois/parsers/responses/whois.markmonitor.com/response_throttled_spec.rb index dd36f5e7..6158ce56 100644 --- a/spec/whois/parsers/responses/whois.markmonitor.com/response_throttled_spec.rb +++ b/spec/whois/parsers/responses/whois.markmonitor.com/response_throttled_spec.rb @@ -11,19 +11,16 @@ # require 'spec_helper' -require 'whois/parsers/whois.markmonitor.com.rb' -describe Whois::Parsers::WhoisMarkmonitorCom, "response_throttled.expected" do +describe "whois.markmonitor.com", :aggregate_failures do subject do file = fixture("responses", "whois.markmonitor.com/response_throttled.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.markmonitor.com") + Whois::Parser.parser_for(part) end - describe "#response_throttled?" do - it do - expect(subject.response_throttled?).to eq(true) - end + it "matches response_throttled.expected" do + expect(subject.response_throttled?).to eq(true) end end diff --git a/spec/whois/parsers/responses/whois.markmonitor.com/status_available_spec.rb b/spec/whois/parsers/responses/whois.markmonitor.com/status_available_spec.rb index 2ba8d61a..40f7cd80 100644 --- a/spec/whois/parsers/responses/whois.markmonitor.com/status_available_spec.rb +++ b/spec/whois/parsers/responses/whois.markmonitor.com/status_available_spec.rb @@ -11,83 +11,32 @@ # require 'spec_helper' -require 'whois/parsers/whois.markmonitor.com.rb' -describe Whois::Parsers::WhoisMarkmonitorCom, "status_available.expected" do +describe "whois.markmonitor.com", :aggregate_failures do subject do file = fixture("responses", "whois.markmonitor.com/status_available.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.markmonitor.com") + Whois::Parser.parser_for(part) end - describe "#domain" do - it do - expect(subject.domain).to eq(nil) - end - end - describe "#domain_id" do - it do - expect(subject.domain_id).to eq(nil) - end - end - describe "#status" do - it do - expect(subject.status).to eq(:available) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(true) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(false) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to eq(nil) - end - end - describe "#updated_on" do - it do - expect(subject.updated_on).to eq(nil) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to eq(nil) - end - end - describe "#registrar" do - it do - expect(subject.registrar).to eq(nil) - end - end - describe "#registrant_contacts" do - it do - expect(subject.registrant_contacts).to be_a(Array) - expect(subject.registrant_contacts).to eq([]) - end - end - describe "#admin_contacts" do - it do - expect(subject.admin_contacts).to be_a(Array) - expect(subject.admin_contacts).to eq([]) - end - end - describe "#technical_contacts" do - it do - expect(subject.technical_contacts).to be_a(Array) - expect(subject.technical_contacts).to eq([]) - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers).to eq([]) - end + it "matches status_available.expected" do + expect(subject.domain).to eq(nil) + expect(subject.domain_id).to eq(nil) + expect(subject.status).to eq(:available) + expect(subject.available?).to eq(true) + expect(subject.registered?).to eq(false) + expect(subject.created_on).to eq(nil) + expect(subject.updated_on).to eq(nil) + expect(subject.expires_on).to eq(nil) + expect(subject.registrar).to eq(nil) + expect(subject.registrant_contacts).to be_a(Array) + expect(subject.registrant_contacts).to eq([]) + expect(subject.admin_contacts).to be_a(Array) + expect(subject.admin_contacts).to eq([]) + expect(subject.technical_contacts).to be_a(Array) + expect(subject.technical_contacts).to eq([]) + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers).to eq([]) end end diff --git a/spec/whois/parsers/responses/whois.markmonitor.com/status_registered_spec.rb b/spec/whois/parsers/responses/whois.markmonitor.com/status_registered_spec.rb index 89c53d7c..3c5913c7 100644 --- a/spec/whois/parsers/responses/whois.markmonitor.com/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.markmonitor.com/status_registered_spec.rb @@ -11,147 +11,96 @@ # require 'spec_helper' -require 'whois/parsers/whois.markmonitor.com.rb' -describe Whois::Parsers::WhoisMarkmonitorCom, "status_registered.expected" do +describe "whois.markmonitor.com", :aggregate_failures do subject do file = fixture("responses", "whois.markmonitor.com/status_registered.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.markmonitor.com") + Whois::Parser.parser_for(part) end - describe "#domain" do - it do - expect(subject.domain).to eq("google.com") - end - end - describe "#domain_id" do - it do - expect(subject.domain_id).to eq("") - end - end - describe "#status" do - it do - expect(subject.status).to eq(:registered) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(false) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(true) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to be_a(Time) - expect(subject.created_on).to eq(DateTime.parse("2002-10-02 00:00:00 -0700")) - end - end - describe "#updated_on" do - it do - expect(subject.updated_on).to be_a(Time) - expect(subject.updated_on).to eq(DateTime.parse("2013-10-29 11:50:06 -0700")) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to be_a(Time) - expect(subject.expires_on).to eq(DateTime.parse("2020-09-13 21:00:00 -0700")) - end - end - describe "#registrar" do - it do - expect(subject.registrar).to be_a(Whois::Parser::Registrar) - expect(subject.registrar.id).to eq("292") - expect(subject.registrar.name).to eq("MarkMonitor, Inc.") - expect(subject.registrar.url).to eq("http://www.markmonitor.com") - end - end - describe "#registrant_contacts" do - it do - expect(subject.registrant_contacts).to be_a(Array) - expect(subject.registrant_contacts.size).to eq(1) - expect(subject.registrant_contacts[0]).to be_a(Whois::Parser::Contact) - expect(subject.registrant_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_REGISTRANT) - expect(subject.registrant_contacts[0].name).to eq("Dns Admin") - expect(subject.registrant_contacts[0].organization).to eq("Google Inc.") - expect(subject.registrant_contacts[0].address).to eq("Please contact contact-admin@google.com, 1600 Amphitheatre Parkway") - expect(subject.registrant_contacts[0].city).to eq("Mountain View") - expect(subject.registrant_contacts[0].zip).to eq("94043") - expect(subject.registrant_contacts[0].state).to eq("CA") - expect(subject.registrant_contacts[0].country_code).to eq("US") - expect(subject.registrant_contacts[0].phone).to eq("+1.6502530000") - expect(subject.registrant_contacts[0].fax).to eq("+1.6506188571") - expect(subject.registrant_contacts[0].email).to eq("dns-admin@google.com") - expect(subject.registrant_contacts[0].created_on).to eq(nil) - expect(subject.registrant_contacts[0].updated_on).to eq(nil) - end - end - describe "#admin_contacts" do - it do - expect(subject.admin_contacts).to be_a(Array) - expect(subject.admin_contacts.size).to eq(1) - expect(subject.admin_contacts[0]).to be_a(Whois::Parser::Contact) - expect(subject.admin_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_ADMINISTRATIVE) - expect(subject.admin_contacts[0].name).to eq("DNS Admin") - expect(subject.admin_contacts[0].organization).to eq("Google Inc.") - expect(subject.admin_contacts[0].address).to eq("1600 Amphitheatre Parkway") - expect(subject.admin_contacts[0].city).to eq("Mountain View") - expect(subject.admin_contacts[0].zip).to eq("94043") - expect(subject.admin_contacts[0].state).to eq("CA") - expect(subject.admin_contacts[0].country_code).to eq("US") - expect(subject.admin_contacts[0].phone).to eq("+1.6506234000") - expect(subject.admin_contacts[0].fax).to eq("+1.6506188571") - expect(subject.admin_contacts[0].email).to eq("dns-admin@google.com") - expect(subject.admin_contacts[0].created_on).to eq(nil) - expect(subject.admin_contacts[0].updated_on).to eq(nil) - end - end - describe "#technical_contacts" do - it do - expect(subject.technical_contacts).to be_a(Array) - expect(subject.technical_contacts.size).to eq(1) - expect(subject.technical_contacts[0]).to be_a(Whois::Parser::Contact) - expect(subject.technical_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_TECHNICAL) - expect(subject.technical_contacts[0].name).to eq("DNS Admin") - expect(subject.technical_contacts[0].organization).to eq("Google Inc.") - expect(subject.technical_contacts[0].address).to eq("2400 E. Bayshore Pkwy") - expect(subject.technical_contacts[0].city).to eq("Mountain View") - expect(subject.technical_contacts[0].zip).to eq("94043") - expect(subject.technical_contacts[0].state).to eq("CA") - expect(subject.technical_contacts[0].country_code).to eq("US") - expect(subject.technical_contacts[0].phone).to eq("+1.6503300100") - expect(subject.technical_contacts[0].fax).to eq("+1.6506181499") - expect(subject.technical_contacts[0].email).to eq("dns-admin@google.com") - expect(subject.technical_contacts[0].created_on).to eq(nil) - expect(subject.technical_contacts[0].updated_on).to eq(nil) - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers.size).to eq(4) - expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[0].name).to eq("ns2.google.com") - expect(subject.nameservers[0].ipv4).to eq(nil) - expect(subject.nameservers[0].ipv6).to eq(nil) - expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[1].name).to eq("ns1.google.com") - expect(subject.nameservers[1].ipv4).to eq(nil) - expect(subject.nameservers[1].ipv6).to eq(nil) - expect(subject.nameservers[2]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[2].name).to eq("ns3.google.com") - expect(subject.nameservers[2].ipv4).to eq(nil) - expect(subject.nameservers[2].ipv6).to eq(nil) - expect(subject.nameservers[3]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[3].name).to eq("ns4.google.com") - expect(subject.nameservers[3].ipv4).to eq(nil) - expect(subject.nameservers[3].ipv6).to eq(nil) - end + it "matches status_registered.expected" do + expect(subject.domain).to eq("google.com") + expect(subject.domain_id).to eq("") + expect(subject.status).to eq(:registered) + expect(subject.available?).to eq(false) + expect(subject.registered?).to eq(true) + expect(subject.created_on).to be_a(Time) + expect(subject.created_on).to eq(DateTime.parse("2002-10-02 00:00:00 -0700")) + expect(subject.updated_on).to be_a(Time) + expect(subject.updated_on).to eq(DateTime.parse("2013-10-29 11:50:06 -0700")) + expect(subject.expires_on).to be_a(Time) + expect(subject.expires_on).to eq(DateTime.parse("2020-09-13 21:00:00 -0700")) + expect(subject.registrar).to be_a(Whois::Parser::Registrar) + expect(subject.registrar.id).to eq("292") + expect(subject.registrar.name).to eq("MarkMonitor, Inc.") + expect(subject.registrar.url).to eq("http://www.markmonitor.com") + expect(subject.registrant_contacts).to be_a(Array) + expect(subject.registrant_contacts.size).to eq(1) + expect(subject.registrant_contacts[0]).to be_a(Whois::Parser::Contact) + expect(subject.registrant_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_REGISTRANT) + expect(subject.registrant_contacts[0].name).to eq("Dns Admin") + expect(subject.registrant_contacts[0].organization).to eq("Google Inc.") + expect(subject.registrant_contacts[0].address).to eq("Please contact contact-admin@google.com, 1600 Amphitheatre Parkway") + expect(subject.registrant_contacts[0].city).to eq("Mountain View") + expect(subject.registrant_contacts[0].zip).to eq("94043") + expect(subject.registrant_contacts[0].state).to eq("CA") + expect(subject.registrant_contacts[0].country_code).to eq("US") + expect(subject.registrant_contacts[0].phone).to eq("+1.6502530000") + expect(subject.registrant_contacts[0].fax).to eq("+1.6506188571") + expect(subject.registrant_contacts[0].email).to eq("dns-admin@google.com") + expect(subject.registrant_contacts[0].created_on).to eq(nil) + expect(subject.registrant_contacts[0].updated_on).to eq(nil) + expect(subject.admin_contacts).to be_a(Array) + expect(subject.admin_contacts.size).to eq(1) + expect(subject.admin_contacts[0]).to be_a(Whois::Parser::Contact) + expect(subject.admin_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_ADMINISTRATIVE) + expect(subject.admin_contacts[0].name).to eq("DNS Admin") + expect(subject.admin_contacts[0].organization).to eq("Google Inc.") + expect(subject.admin_contacts[0].address).to eq("1600 Amphitheatre Parkway") + expect(subject.admin_contacts[0].city).to eq("Mountain View") + expect(subject.admin_contacts[0].zip).to eq("94043") + expect(subject.admin_contacts[0].state).to eq("CA") + expect(subject.admin_contacts[0].country_code).to eq("US") + expect(subject.admin_contacts[0].phone).to eq("+1.6506234000") + expect(subject.admin_contacts[0].fax).to eq("+1.6506188571") + expect(subject.admin_contacts[0].email).to eq("dns-admin@google.com") + expect(subject.admin_contacts[0].created_on).to eq(nil) + expect(subject.admin_contacts[0].updated_on).to eq(nil) + expect(subject.technical_contacts).to be_a(Array) + expect(subject.technical_contacts.size).to eq(1) + expect(subject.technical_contacts[0]).to be_a(Whois::Parser::Contact) + expect(subject.technical_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_TECHNICAL) + expect(subject.technical_contacts[0].name).to eq("DNS Admin") + expect(subject.technical_contacts[0].organization).to eq("Google Inc.") + expect(subject.technical_contacts[0].address).to eq("2400 E. Bayshore Pkwy") + expect(subject.technical_contacts[0].city).to eq("Mountain View") + expect(subject.technical_contacts[0].zip).to eq("94043") + expect(subject.technical_contacts[0].state).to eq("CA") + expect(subject.technical_contacts[0].country_code).to eq("US") + expect(subject.technical_contacts[0].phone).to eq("+1.6503300100") + expect(subject.technical_contacts[0].fax).to eq("+1.6506181499") + expect(subject.technical_contacts[0].email).to eq("dns-admin@google.com") + expect(subject.technical_contacts[0].created_on).to eq(nil) + expect(subject.technical_contacts[0].updated_on).to eq(nil) + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers.size).to eq(4) + expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[0].name).to eq("ns2.google.com") + expect(subject.nameservers[0].ipv4).to eq(nil) + expect(subject.nameservers[0].ipv6).to eq(nil) + expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[1].name).to eq("ns1.google.com") + expect(subject.nameservers[1].ipv4).to eq(nil) + expect(subject.nameservers[1].ipv6).to eq(nil) + expect(subject.nameservers[2]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[2].name).to eq("ns3.google.com") + expect(subject.nameservers[2].ipv4).to eq(nil) + expect(subject.nameservers[2].ipv6).to eq(nil) + expect(subject.nameservers[3]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[3].name).to eq("ns4.google.com") + expect(subject.nameservers[3].ipv4).to eq(nil) + expect(subject.nameservers[3].ipv6).to eq(nil) end end diff --git a/spec/whois/parsers/responses/whois.monic.mo/mo/status_available_spec.rb b/spec/whois/parsers/responses/whois.monic.mo/mo/status_available_spec.rb index 3b9f13dd..4e6875d7 100644 --- a/spec/whois/parsers/responses/whois.monic.mo/mo/status_available_spec.rb +++ b/spec/whois/parsers/responses/whois.monic.mo/mo/status_available_spec.rb @@ -11,85 +11,30 @@ # require 'spec_helper' -require 'whois/parsers/whois.monic.mo.rb' -describe Whois::Parsers::WhoisMonicMo, "status_available.expected" do +describe "whois.monic.mo", :aggregate_failures do subject do file = fixture("responses", "whois.monic.mo/mo/status_available.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.monic.mo") + Whois::Parser.parser_for(part) end - describe "#disclaimer" do - it do - expect { subject.disclaimer }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#domain" do - it do - expect(subject.domain).to eq(nil) - end - end - describe "#domain_id" do - it do - expect { subject.domain_id }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#status" do - it do - expect(subject.status).to eq(:available) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(true) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(false) - end - end - describe "#created_on" do - it do - expect { subject.created_on }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#updated_on" do - it do - expect { subject.updated_on }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#expires_on" do - it do - expect { subject.expires_on }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#registrar" do - it do - expect(subject.registrar).to eq(nil) - end - end - describe "#registrant_contacts" do - it do - expect { subject.registrant_contacts }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#admin_contacts" do - it do - expect { subject.admin_contacts }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#technical_contacts" do - it do - expect { subject.technical_contacts }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers).to eq([]) - end + it "matches status_available.expected" do + expect { subject.disclaimer }.to raise_error(Whois::AttributeNotSupported) + expect(subject.domain).to eq(nil) + expect { subject.domain_id }.to raise_error(Whois::AttributeNotSupported) + expect(subject.status).to eq(:available) + expect(subject.available?).to eq(true) + expect(subject.registered?).to eq(false) + expect { subject.created_on }.to raise_error(Whois::AttributeNotSupported) + expect { subject.updated_on }.to raise_error(Whois::AttributeNotSupported) + expect { subject.expires_on }.to raise_error(Whois::AttributeNotSupported) + expect(subject.registrar).to eq(nil) + expect { subject.registrant_contacts }.to raise_error(Whois::AttributeNotSupported) + expect { subject.admin_contacts }.to raise_error(Whois::AttributeNotSupported) + expect { subject.technical_contacts }.to raise_error(Whois::AttributeNotSupported) + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers).to eq([]) end end diff --git a/spec/whois/parsers/responses/whois.monic.mo/mo/status_registered_spec.rb b/spec/whois/parsers/responses/whois.monic.mo/mo/status_registered_spec.rb index e964134e..27162300 100644 --- a/spec/whois/parsers/responses/whois.monic.mo/mo/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.monic.mo/mo/status_registered_spec.rb @@ -11,92 +11,37 @@ # require 'spec_helper' -require 'whois/parsers/whois.monic.mo.rb' -describe Whois::Parsers::WhoisMonicMo, "status_registered.expected" do +describe "whois.monic.mo", :aggregate_failures do subject do file = fixture("responses", "whois.monic.mo/mo/status_registered.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.monic.mo") + Whois::Parser.parser_for(part) end - describe "#disclaimer" do - it do - expect { subject.disclaimer }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#domain" do - it do - expect(subject.domain).to eq("umac.mo") - end - end - describe "#domain_id" do - it do - expect { subject.domain_id }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#status" do - it do - expect(subject.status).to eq(:registered) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(false) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(true) - end - end - describe "#created_on" do - it do - expect { subject.created_on }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#updated_on" do - it do - expect { subject.updated_on }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#expires_on" do - it do - expect { subject.expires_on }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#registrar" do - it do - expect(subject.registrar).to be_a(Whois::Parser::Registrar) - expect(subject.registrar.id).to eq(nil) - expect(subject.registrar.name).to eq("MONIC") - expect(subject.registrar.url).to eq(nil) - end - end - describe "#registrant_contacts" do - it do - expect { subject.registrant_contacts }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#admin_contacts" do - it do - expect { subject.admin_contacts }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#technical_contacts" do - it do - expect { subject.technical_contacts }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers.size).to eq(2) - expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[0].name).to eq("umacsn1.umac.mo") - expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[1].name).to eq("umacsn2.umac.mo") - end + it "matches status_registered.expected" do + expect { subject.disclaimer }.to raise_error(Whois::AttributeNotSupported) + expect(subject.domain).to eq("umac.mo") + expect { subject.domain_id }.to raise_error(Whois::AttributeNotSupported) + expect(subject.status).to eq(:registered) + expect(subject.available?).to eq(false) + expect(subject.registered?).to eq(true) + expect { subject.created_on }.to raise_error(Whois::AttributeNotSupported) + expect { subject.updated_on }.to raise_error(Whois::AttributeNotSupported) + expect { subject.expires_on }.to raise_error(Whois::AttributeNotSupported) + expect(subject.registrar).to be_a(Whois::Parser::Registrar) + expect(subject.registrar.id).to eq(nil) + expect(subject.registrar.name).to eq("MONIC") + expect(subject.registrar.url).to eq(nil) + expect { subject.registrant_contacts }.to raise_error(Whois::AttributeNotSupported) + expect { subject.admin_contacts }.to raise_error(Whois::AttributeNotSupported) + expect { subject.technical_contacts }.to raise_error(Whois::AttributeNotSupported) + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers.size).to eq(2) + expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[0].name).to eq("umacsn1.umac.mo") + expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[1].name).to eq("umacsn2.umac.mo") end end diff --git a/spec/whois/parsers/responses/whois.museum/museum/status_available_spec.rb b/spec/whois/parsers/responses/whois.museum/museum/status_available_spec.rb index 8b110d0b..a0d10eaa 100644 --- a/spec/whois/parsers/responses/whois.museum/museum/status_available_spec.rb +++ b/spec/whois/parsers/responses/whois.museum/museum/status_available_spec.rb @@ -11,50 +11,23 @@ # require 'spec_helper' -require 'whois/parsers/whois.museum.rb' -describe Whois::Parsers::WhoisMuseum, "status_available.expected" do +describe "whois.museum", :aggregate_failures do subject do file = fixture("responses", "whois.museum/museum/status_available.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.museum") + Whois::Parser.parser_for(part) end - describe "#status" do - it do - expect(subject.status).to eq(:available) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(true) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(false) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to eq(nil) - end - end - describe "#updated_on" do - it do - expect(subject.updated_on).to eq(nil) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to eq(nil) - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers).to eq([]) - end + it "matches status_available.expected" do + expect(subject.status).to eq(:available) + expect(subject.available?).to eq(true) + expect(subject.registered?).to eq(false) + expect(subject.created_on).to eq(nil) + expect(subject.updated_on).to eq(nil) + expect(subject.expires_on).to eq(nil) + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers).to eq([]) end end diff --git a/spec/whois/parsers/responses/whois.museum/museum/status_registered_spec.rb b/spec/whois/parsers/responses/whois.museum/museum/status_registered_spec.rb index 4289ba6c..5bf43c56 100644 --- a/spec/whois/parsers/responses/whois.museum/museum/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.museum/museum/status_registered_spec.rb @@ -11,61 +11,34 @@ # require 'spec_helper' -require 'whois/parsers/whois.museum.rb' -describe Whois::Parsers::WhoisMuseum, "status_registered.expected" do +describe "whois.museum", :aggregate_failures do subject do file = fixture("responses", "whois.museum/museum/status_registered.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.museum") + Whois::Parser.parser_for(part) end - describe "#status" do - it do - expect(subject.status).to eq(:registered) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(false) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(true) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to be_a(Time) - expect(subject.created_on).to eq(DateTime.parse("2001-11-10 15:23:42 UTC")) - end - end - describe "#updated_on" do - it do - expect(subject.updated_on).to be_a(Time) - expect(subject.updated_on).to eq(DateTime.parse("2002-04-04 17:48:43 UTC")) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to be_a(Time) - expect(subject.expires_on).to eq(DateTime.parse("2003-07-31 11:00:00 UTC")) - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers.size).to eq(2) - expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[0].name).to eq("nic.museum") - expect(subject.nameservers[0].ipv4).to eq("130.242.24.5") - expect(subject.nameservers[0].ipv6).to eq(nil) - expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[1].name).to eq("nic.frd.se") - expect(subject.nameservers[1].ipv4).to eq(nil) - expect(subject.nameservers[1].ipv6).to eq(nil) - end + it "matches status_registered.expected" do + expect(subject.status).to eq(:registered) + expect(subject.available?).to eq(false) + expect(subject.registered?).to eq(true) + expect(subject.created_on).to be_a(Time) + expect(subject.created_on).to eq(DateTime.parse("2001-11-10 15:23:42 UTC")) + expect(subject.updated_on).to be_a(Time) + expect(subject.updated_on).to eq(DateTime.parse("2002-04-04 17:48:43 UTC")) + expect(subject.expires_on).to be_a(Time) + expect(subject.expires_on).to eq(DateTime.parse("2003-07-31 11:00:00 UTC")) + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers.size).to eq(2) + expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[0].name).to eq("nic.museum") + expect(subject.nameservers[0].ipv4).to eq("130.242.24.5") + expect(subject.nameservers[0].ipv6).to eq(nil) + expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[1].name).to eq("nic.frd.se") + expect(subject.nameservers[1].ipv4).to eq(nil) + expect(subject.nameservers[1].ipv6).to eq(nil) end end diff --git a/spec/whois/parsers/responses/whois.mynic.my/my/status_available_spec.rb b/spec/whois/parsers/responses/whois.mynic.my/my/status_available_spec.rb index 6f0fd30a..9fb49e8d 100644 --- a/spec/whois/parsers/responses/whois.mynic.my/my/status_available_spec.rb +++ b/spec/whois/parsers/responses/whois.mynic.my/my/status_available_spec.rb @@ -11,50 +11,23 @@ # require 'spec_helper' -require 'whois/parsers/whois.mynic.my.rb' -describe Whois::Parsers::WhoisMynicMy, "status_available.expected" do +describe "whois.mynic.my", :aggregate_failures do subject do file = fixture("responses", "whois.mynic.my/my/status_available.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.mynic.my") + Whois::Parser.parser_for(part) end - describe "#status" do - it do - expect(subject.status).to eq(:available) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(true) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(false) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to eq(nil) - end - end - describe "#updated_on" do - it do - expect(subject.updated_on).to eq(nil) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to eq(nil) - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers).to eq([]) - end + it "matches status_available.expected" do + expect(subject.status).to eq(:available) + expect(subject.available?).to eq(true) + expect(subject.registered?).to eq(false) + expect(subject.created_on).to eq(nil) + expect(subject.updated_on).to eq(nil) + expect(subject.expires_on).to eq(nil) + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers).to eq([]) end end diff --git a/spec/whois/parsers/responses/whois.mynic.my/my/status_registered_spec.rb b/spec/whois/parsers/responses/whois.mynic.my/my/status_registered_spec.rb index afd26d77..fab9cf63 100644 --- a/spec/whois/parsers/responses/whois.mynic.my/my/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.mynic.my/my/status_registered_spec.rb @@ -11,59 +11,32 @@ # require 'spec_helper' -require 'whois/parsers/whois.mynic.my.rb' -describe Whois::Parsers::WhoisMynicMy, "status_registered.expected" do +describe "whois.mynic.my", :aggregate_failures do subject do file = fixture("responses", "whois.mynic.my/my/status_registered.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.mynic.my") + Whois::Parser.parser_for(part) end - describe "#status" do - it do - expect(subject.status).to eq(:registered) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(false) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(true) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to be_a(Time) - expect(subject.created_on).to eq(DateTime.parse("2009-05-13")) - end - end - describe "#updated_on" do - it do - expect(subject.updated_on).to be_a(Time) - expect(subject.updated_on).to eq(DateTime.parse("2013-10-11")) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to be_a(Time) - expect(subject.expires_on).to eq(DateTime.parse("2014-05-13")) - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers.size).to eq(2) - expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[0].name).to eq("ns1.google.com") - expect(subject.nameservers[0].ipv4).to eq("216.239.32.10") - expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[1].name).to eq("ns2.google.com") - expect(subject.nameservers[1].ipv4).to eq("216.239.34.10") - end + it "matches status_registered.expected" do + expect(subject.status).to eq(:registered) + expect(subject.available?).to eq(false) + expect(subject.registered?).to eq(true) + expect(subject.created_on).to be_a(Time) + expect(subject.created_on).to eq(DateTime.parse("2009-05-13")) + expect(subject.updated_on).to be_a(Time) + expect(subject.updated_on).to eq(DateTime.parse("2013-10-11")) + expect(subject.expires_on).to be_a(Time) + expect(subject.expires_on).to eq(DateTime.parse("2014-05-13")) + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers.size).to eq(2) + expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[0].name).to eq("ns1.google.com") + expect(subject.nameservers[0].ipv4).to eq("216.239.32.10") + expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[1].name).to eq("ns2.google.com") + expect(subject.nameservers[1].ipv4).to eq("216.239.34.10") end end diff --git a/spec/whois/parsers/responses/whois.na-nic.com.na/na/status_available_spec.rb b/spec/whois/parsers/responses/whois.na-nic.com.na/na/status_available_spec.rb index 525815a6..d5ec27b2 100644 --- a/spec/whois/parsers/responses/whois.na-nic.com.na/na/status_available_spec.rb +++ b/spec/whois/parsers/responses/whois.na-nic.com.na/na/status_available_spec.rb @@ -11,65 +11,26 @@ # require 'spec_helper' -require 'whois/parsers/whois.na-nic.com.na.rb' -describe Whois::Parsers::WhoisNaNicComNa, "status_available.expected" do +describe "whois.na-nic.com.na", :aggregate_failures do subject do file = fixture("responses", "whois.na-nic.com.na/na/status_available.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.na-nic.com.na") + Whois::Parser.parser_for(part) end - describe "#domain" do - it do - expect(subject.domain).to eq("u34jedzcq.na") - end - end - describe "#domain_id" do - it do - expect(subject.domain_id).to eq(nil) - end - end - describe "#status" do - it do - expect(subject.status).to eq(:available) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(true) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(false) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to eq(nil) - end - end - describe "#updated_on" do - it do - expect(subject.updated_on).to eq(nil) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to eq(nil) - end - end - describe "#registrar" do - it do - expect(subject.registrar).to eq(nil) - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers).to eq([]) - end + it "matches status_available.expected" do + expect(subject.domain).to eq("u34jedzcq.na") + expect(subject.domain_id).to eq(nil) + expect(subject.status).to eq(:available) + expect(subject.available?).to eq(true) + expect(subject.registered?).to eq(false) + expect(subject.created_on).to eq(nil) + expect(subject.updated_on).to eq(nil) + expect(subject.expires_on).to eq(nil) + expect(subject.registrar).to eq(nil) + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers).to eq([]) end end diff --git a/spec/whois/parsers/responses/whois.na-nic.com.na/na/status_registered_spec.rb b/spec/whois/parsers/responses/whois.na-nic.com.na/na/status_registered_spec.rb index 1e2dbd06..d84a1d19 100644 --- a/spec/whois/parsers/responses/whois.na-nic.com.na/na/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.na-nic.com.na/na/status_registered_spec.rb @@ -11,75 +11,36 @@ # require 'spec_helper' -require 'whois/parsers/whois.na-nic.com.na.rb' -describe Whois::Parsers::WhoisNaNicComNa, "status_registered.expected" do +describe "whois.na-nic.com.na", :aggregate_failures do subject do file = fixture("responses", "whois.na-nic.com.na/na/status_registered.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.na-nic.com.na") + Whois::Parser.parser_for(part) end - describe "#domain" do - it do - expect(subject.domain).to eq("google.na") - end - end - describe "#domain_id" do - it do - expect(subject.domain_id).to eq("4100-CoCCA") - end - end - describe "#status" do - it do - expect(subject.status).to eq(:registered) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(false) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(true) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to be_a(Time) - expect(subject.created_on).to eq(DateTime.parse("2007-03-27 22:00:00 UTC")) - end - end - describe "#updated_on" do - it do - expect(subject.updated_on).to be_a(Time) - expect(subject.updated_on).to eq(DateTime.parse("2013-07-22 17:07:58 UTC")) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to be_a(Time) - expect(subject.expires_on).to eq(DateTime.parse("2014-08-19 23:00:00 UTC")) - end - end - describe "#registrar" do - it do - expect(subject.registrar).to be_a(Whois::Parser::Registrar) - expect(subject.registrar.id).to eq(nil) - expect(subject.registrar.name).to eq("MarkMonitor") - expect(subject.registrar.url).to eq("http://www.markmonitor.com") - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers.size).to eq(2) - expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[0].name).to eq("ns2.google.com") - expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[1].name).to eq("ns1.google.com") - end + it "matches status_registered.expected" do + expect(subject.domain).to eq("google.na") + expect(subject.domain_id).to eq("4100-CoCCA") + expect(subject.status).to eq(:registered) + expect(subject.available?).to eq(false) + expect(subject.registered?).to eq(true) + expect(subject.created_on).to be_a(Time) + expect(subject.created_on).to eq(DateTime.parse("2007-03-27 22:00:00 UTC")) + expect(subject.updated_on).to be_a(Time) + expect(subject.updated_on).to eq(DateTime.parse("2013-07-22 17:07:58 UTC")) + expect(subject.expires_on).to be_a(Time) + expect(subject.expires_on).to eq(DateTime.parse("2014-08-19 23:00:00 UTC")) + expect(subject.registrar).to be_a(Whois::Parser::Registrar) + expect(subject.registrar.id).to eq(nil) + expect(subject.registrar.name).to eq("MarkMonitor") + expect(subject.registrar.url).to eq("http://www.markmonitor.com") + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers.size).to eq(2) + expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[0].name).to eq("ns2.google.com") + expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[1].name).to eq("ns1.google.com") end end diff --git a/spec/whois/parsers/responses/whois.nc/nc/property_contact_without_state_and_address_spec.rb b/spec/whois/parsers/responses/whois.nc/nc/property_contact_without_state_and_address_spec.rb index d9809e4f..811fa42e 100644 --- a/spec/whois/parsers/responses/whois.nc/nc/property_contact_without_state_and_address_spec.rb +++ b/spec/whois/parsers/responses/whois.nc/nc/property_contact_without_state_and_address_spec.rb @@ -11,32 +11,29 @@ # require 'spec_helper' -require 'whois/parsers/whois.nc.rb' -describe Whois::Parsers::WhoisNc, "property_contact_without_state_and_address.expected" do +describe "whois.nc", :aggregate_failures do subject do file = fixture("responses", "whois.nc/nc/property_contact_without_state_and_address.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.nc") + Whois::Parser.parser_for(part) end - describe "#registrant_contacts" do - it do - expect(subject.registrant_contacts).to be_a(Array) - expect(subject.registrant_contacts.size).to eq(1) - expect(subject.registrant_contacts[0]).to be_a(Whois::Parser::Contact) - expect(subject.registrant_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_REGISTRANT) - expect(subject.registrant_contacts[0].name).to eq("DTSI") - expect(subject.registrant_contacts[0].organization).to eq(nil) - expect(subject.registrant_contacts[0].address).to eq("BP 15101") - expect(subject.registrant_contacts[0].city).to eq("NOUMEA CEDEX") - expect(subject.registrant_contacts[0].zip).to eq("98804") - expect(subject.registrant_contacts[0].state).to eq(nil) - expect(subject.registrant_contacts[0].country).to eq(nil) - expect(subject.registrant_contacts[0].phone).to eq(nil) - expect(subject.registrant_contacts[0].fax).to eq(nil) - expect(subject.registrant_contacts[0].email).to eq(nil) - end + it "matches property_contact_without_state_and_address.expected" do + expect(subject.registrant_contacts).to be_a(Array) + expect(subject.registrant_contacts.size).to eq(1) + expect(subject.registrant_contacts[0]).to be_a(Whois::Parser::Contact) + expect(subject.registrant_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_REGISTRANT) + expect(subject.registrant_contacts[0].name).to eq("DTSI") + expect(subject.registrant_contacts[0].organization).to eq(nil) + expect(subject.registrant_contacts[0].address).to eq("BP 15101") + expect(subject.registrant_contacts[0].city).to eq("NOUMEA CEDEX") + expect(subject.registrant_contacts[0].zip).to eq("98804") + expect(subject.registrant_contacts[0].state).to eq(nil) + expect(subject.registrant_contacts[0].country).to eq(nil) + expect(subject.registrant_contacts[0].phone).to eq(nil) + expect(subject.registrant_contacts[0].fax).to eq(nil) + expect(subject.registrant_contacts[0].email).to eq(nil) end end diff --git a/spec/whois/parsers/responses/whois.nc/nc/property_contact_without_state_spec.rb b/spec/whois/parsers/responses/whois.nc/nc/property_contact_without_state_spec.rb index 5e571bcd..6b4321d6 100644 --- a/spec/whois/parsers/responses/whois.nc/nc/property_contact_without_state_spec.rb +++ b/spec/whois/parsers/responses/whois.nc/nc/property_contact_without_state_spec.rb @@ -11,32 +11,29 @@ # require 'spec_helper' -require 'whois/parsers/whois.nc.rb' -describe Whois::Parsers::WhoisNc, "property_contact_without_state.expected" do +describe "whois.nc", :aggregate_failures do subject do file = fixture("responses", "whois.nc/nc/property_contact_without_state.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.nc") + Whois::Parser.parser_for(part) end - describe "#registrant_contacts" do - it do - expect(subject.registrant_contacts).to be_a(Array) - expect(subject.registrant_contacts.size).to eq(1) - expect(subject.registrant_contacts[0]).to be_a(Whois::Parser::Contact) - expect(subject.registrant_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_REGISTRANT) - expect(subject.registrant_contacts[0].name).to eq("PLAY NEW CALEDONIA") - expect(subject.registrant_contacts[0].organization).to eq(nil) - expect(subject.registrant_contacts[0].address).to eq("12 BOULEVARD VAUBAN\nBP 2839") - expect(subject.registrant_contacts[0].city).to eq("NOUMEA CEDEX") - expect(subject.registrant_contacts[0].zip).to eq("98846") - expect(subject.registrant_contacts[0].state).to eq(nil) - expect(subject.registrant_contacts[0].country).to eq(nil) - expect(subject.registrant_contacts[0].phone).to eq(nil) - expect(subject.registrant_contacts[0].fax).to eq(nil) - expect(subject.registrant_contacts[0].email).to eq(nil) - end + it "matches property_contact_without_state.expected" do + expect(subject.registrant_contacts).to be_a(Array) + expect(subject.registrant_contacts.size).to eq(1) + expect(subject.registrant_contacts[0]).to be_a(Whois::Parser::Contact) + expect(subject.registrant_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_REGISTRANT) + expect(subject.registrant_contacts[0].name).to eq("PLAY NEW CALEDONIA") + expect(subject.registrant_contacts[0].organization).to eq(nil) + expect(subject.registrant_contacts[0].address).to eq("12 BOULEVARD VAUBAN\nBP 2839") + expect(subject.registrant_contacts[0].city).to eq("NOUMEA CEDEX") + expect(subject.registrant_contacts[0].zip).to eq("98846") + expect(subject.registrant_contacts[0].state).to eq(nil) + expect(subject.registrant_contacts[0].country).to eq(nil) + expect(subject.registrant_contacts[0].phone).to eq(nil) + expect(subject.registrant_contacts[0].fax).to eq(nil) + expect(subject.registrant_contacts[0].email).to eq(nil) end end diff --git a/spec/whois/parsers/responses/whois.nc/nc/status_available_spec.rb b/spec/whois/parsers/responses/whois.nc/nc/status_available_spec.rb index fcc04484..17d3964c 100644 --- a/spec/whois/parsers/responses/whois.nc/nc/status_available_spec.rb +++ b/spec/whois/parsers/responses/whois.nc/nc/status_available_spec.rb @@ -11,86 +11,31 @@ # require 'spec_helper' -require 'whois/parsers/whois.nc.rb' -describe Whois::Parsers::WhoisNc, "status_available.expected" do +describe "whois.nc", :aggregate_failures do subject do file = fixture("responses", "whois.nc/nc/status_available.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.nc") + Whois::Parser.parser_for(part) end - describe "#disclaimer" do - it do - expect { subject.disclaimer }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#domain" do - it do - expect(subject.domain).to eq(nil) - end - end - describe "#domain_id" do - it do - expect { subject.domain_id }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#status" do - it do - expect(subject.status).to eq(:available) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(true) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(false) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to eq(nil) - end - end - describe "#updated_on" do - it do - expect(subject.updated_on).to eq(nil) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to eq(nil) - end - end - describe "#registrar" do - it do - expect { subject.registrar }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#registrant_contacts" do - it do - expect(subject.registrant_contacts).to be_a(Array) - expect(subject.registrant_contacts).to eq([]) - end - end - describe "#admin_contacts" do - it do - expect { subject.admin_contacts }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#technical_contacts" do - it do - expect { subject.technical_contacts }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers).to eq([]) - end + it "matches status_available.expected" do + expect { subject.disclaimer }.to raise_error(Whois::AttributeNotSupported) + expect(subject.domain).to eq(nil) + expect { subject.domain_id }.to raise_error(Whois::AttributeNotSupported) + expect(subject.status).to eq(:available) + expect(subject.available?).to eq(true) + expect(subject.registered?).to eq(false) + expect(subject.created_on).to eq(nil) + expect(subject.updated_on).to eq(nil) + expect(subject.expires_on).to eq(nil) + expect { subject.registrar }.to raise_error(Whois::AttributeNotSupported) + expect(subject.registrant_contacts).to be_a(Array) + expect(subject.registrant_contacts).to eq([]) + expect { subject.admin_contacts }.to raise_error(Whois::AttributeNotSupported) + expect { subject.technical_contacts }.to raise_error(Whois::AttributeNotSupported) + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers).to eq([]) end end diff --git a/spec/whois/parsers/responses/whois.nc/nc/status_registered_spec.rb b/spec/whois/parsers/responses/whois.nc/nc/status_registered_spec.rb index ab3de1d1..1d238db9 100644 --- a/spec/whois/parsers/responses/whois.nc/nc/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.nc/nc/status_registered_spec.rb @@ -11,107 +11,52 @@ # require 'spec_helper' -require 'whois/parsers/whois.nc.rb' -describe Whois::Parsers::WhoisNc, "status_registered.expected" do +describe "whois.nc", :aggregate_failures do subject do file = fixture("responses", "whois.nc/nc/status_registered.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.nc") + Whois::Parser.parser_for(part) end - describe "#disclaimer" do - it do - expect { subject.disclaimer }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#domain" do - it do - expect(subject.domain).to eq("domaine.nc") - end - end - describe "#domain_id" do - it do - expect { subject.domain_id }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#status" do - it do - expect(subject.status).to eq(:registered) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(false) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(true) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to be_a(Time) - expect(subject.created_on).to eq(DateTime.parse("2006-05-14")) - end - end - describe "#updated_on" do - it do - expect(subject.updated_on).to be_a(Time) - expect(subject.updated_on).to eq(DateTime.parse("2013-04-03")) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to be_a(Time) - expect(subject.expires_on).to eq(DateTime.parse("2016-05-14")) - end - end - describe "#registrar" do - it do - expect { subject.registrar }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#registrant_contacts" do - it do - expect(subject.registrant_contacts).to be_a(Array) - expect(subject.registrant_contacts.size).to eq(1) - expect(subject.registrant_contacts[0]).to be_a(Whois::Parser::Contact) - expect(subject.registrant_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_REGISTRANT) - expect(subject.registrant_contacts[0].name).to eq("CCTLD") - expect(subject.registrant_contacts[0].organization).to eq(nil) - expect(subject.registrant_contacts[0].address).to eq("1 RUE MONCHOVET\n7 EME ETAGE\nLE WARUNA 1") - expect(subject.registrant_contacts[0].city).to eq("NOUMEA CEDEX") - expect(subject.registrant_contacts[0].zip).to eq("98841") - expect(subject.registrant_contacts[0].state).to eq(nil) - expect(subject.registrant_contacts[0].country).to eq("NEW CALEDONIA") - expect(subject.registrant_contacts[0].phone).to eq(nil) - expect(subject.registrant_contacts[0].fax).to eq(nil) - expect(subject.registrant_contacts[0].email).to eq(nil) - end - end - describe "#admin_contacts" do - it do - expect { subject.admin_contacts }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#technical_contacts" do - it do - expect { subject.technical_contacts }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers.size).to eq(3) - expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[0].name).to eq("any-ns1.nc") - expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[1].name).to eq("ns1.nc") - expect(subject.nameservers[2]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[2].name).to eq("ns2.nc") - end + it "matches status_registered.expected" do + expect { subject.disclaimer }.to raise_error(Whois::AttributeNotSupported) + expect(subject.domain).to eq("domaine.nc") + expect { subject.domain_id }.to raise_error(Whois::AttributeNotSupported) + expect(subject.status).to eq(:registered) + expect(subject.available?).to eq(false) + expect(subject.registered?).to eq(true) + expect(subject.created_on).to be_a(Time) + expect(subject.created_on).to eq(DateTime.parse("2006-05-14")) + expect(subject.updated_on).to be_a(Time) + expect(subject.updated_on).to eq(DateTime.parse("2013-04-03")) + expect(subject.expires_on).to be_a(Time) + expect(subject.expires_on).to eq(DateTime.parse("2016-05-14")) + expect { subject.registrar }.to raise_error(Whois::AttributeNotSupported) + expect(subject.registrant_contacts).to be_a(Array) + expect(subject.registrant_contacts.size).to eq(1) + expect(subject.registrant_contacts[0]).to be_a(Whois::Parser::Contact) + expect(subject.registrant_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_REGISTRANT) + expect(subject.registrant_contacts[0].name).to eq("CCTLD") + expect(subject.registrant_contacts[0].organization).to eq(nil) + expect(subject.registrant_contacts[0].address).to eq("1 RUE MONCHOVET\n7 EME ETAGE\nLE WARUNA 1") + expect(subject.registrant_contacts[0].city).to eq("NOUMEA CEDEX") + expect(subject.registrant_contacts[0].zip).to eq("98841") + expect(subject.registrant_contacts[0].state).to eq(nil) + expect(subject.registrant_contacts[0].country).to eq("NEW CALEDONIA") + expect(subject.registrant_contacts[0].phone).to eq(nil) + expect(subject.registrant_contacts[0].fax).to eq(nil) + expect(subject.registrant_contacts[0].email).to eq(nil) + expect { subject.admin_contacts }.to raise_error(Whois::AttributeNotSupported) + expect { subject.technical_contacts }.to raise_error(Whois::AttributeNotSupported) + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers.size).to eq(3) + expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[0].name).to eq("any-ns1.nc") + expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[1].name).to eq("ns1.nc") + expect(subject.nameservers[2]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[2].name).to eq("ns2.nc") end end diff --git a/spec/whois/parsers/responses/whois.netcom.cm/cm/status_available_spec.rb b/spec/whois/parsers/responses/whois.netcom.cm/cm/status_available_spec.rb index 8f680fdf..718ee5b4 100644 --- a/spec/whois/parsers/responses/whois.netcom.cm/cm/status_available_spec.rb +++ b/spec/whois/parsers/responses/whois.netcom.cm/cm/status_available_spec.rb @@ -11,65 +11,26 @@ # require 'spec_helper' -require 'whois/parsers/whois.netcom.cm.rb' -describe Whois::Parsers::WhoisNetcomCm, "status_available.expected" do +describe "whois.netcom.cm", :aggregate_failures do subject do file = fixture("responses", "whois.netcom.cm/cm/status_available.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.netcom.cm") + Whois::Parser.parser_for(part) end - describe "#domain" do - it do - expect(subject.domain).to eq("u34jedzcq.cm") - end - end - describe "#domain_id" do - it do - expect { subject.domain_id }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#status" do - it do - expect(subject.status).to eq(:available) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(true) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(false) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to eq(nil) - end - end - describe "#updated_on" do - it do - expect(subject.updated_on).to eq(nil) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to eq(nil) - end - end - describe "#registrar" do - it do - expect(subject.registrar).to eq(nil) - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers).to eq([]) - end + it "matches status_available.expected" do + expect(subject.domain).to eq("u34jedzcq.cm") + expect { subject.domain_id }.to raise_error(Whois::AttributeNotSupported) + expect(subject.status).to eq(:available) + expect(subject.available?).to eq(true) + expect(subject.registered?).to eq(false) + expect(subject.created_on).to eq(nil) + expect(subject.updated_on).to eq(nil) + expect(subject.expires_on).to eq(nil) + expect(subject.registrar).to eq(nil) + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers).to eq([]) end end diff --git a/spec/whois/parsers/responses/whois.netcom.cm/cm/status_registered_spec.rb b/spec/whois/parsers/responses/whois.netcom.cm/cm/status_registered_spec.rb index c73ec2fa..3840cec2 100644 --- a/spec/whois/parsers/responses/whois.netcom.cm/cm/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.netcom.cm/cm/status_registered_spec.rb @@ -11,79 +11,40 @@ # require 'spec_helper' -require 'whois/parsers/whois.netcom.cm.rb' -describe Whois::Parsers::WhoisNetcomCm, "status_registered.expected" do +describe "whois.netcom.cm", :aggregate_failures do subject do file = fixture("responses", "whois.netcom.cm/cm/status_registered.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.netcom.cm") + Whois::Parser.parser_for(part) end - describe "#domain" do - it do - expect(subject.domain).to eq("google.cm") - end - end - describe "#domain_id" do - it do - expect { subject.domain_id }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#status" do - it do - expect(subject.status).to eq(:registered) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(false) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(true) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to be_a(Time) - expect(subject.created_on).to eq(DateTime.parse("2009-10-07 10:02 WAT")) - end - end - describe "#updated_on" do - it do - expect(subject.updated_on).to be_a(Time) - expect(subject.updated_on).to eq(DateTime.parse("2013-09-20 17:47 WAT")) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to be_a(Time) - expect(subject.expires_on).to eq(DateTime.parse("2014-10-07 10:02 WAT")) - end - end - describe "#registrar" do - it do - expect(subject.registrar).to be_a(Whois::Parser::Registrar) - expect(subject.registrar.id).to eq(nil) - expect(subject.registrar.name).to eq("MarkMonitor Inc.") - expect(subject.registrar.url).to eq(nil) - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers.size).to eq(4) - expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[0].name).to eq("ns1.google.com") - expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[1].name).to eq("ns2.google.com") - expect(subject.nameservers[2]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[2].name).to eq("ns3.google.com") - expect(subject.nameservers[3]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[3].name).to eq("ns4.google.com") - end + it "matches status_registered.expected" do + expect(subject.domain).to eq("google.cm") + expect { subject.domain_id }.to raise_error(Whois::AttributeNotSupported) + expect(subject.status).to eq(:registered) + expect(subject.available?).to eq(false) + expect(subject.registered?).to eq(true) + expect(subject.created_on).to be_a(Time) + expect(subject.created_on).to eq(DateTime.parse("2009-10-07 10:02 WAT")) + expect(subject.updated_on).to be_a(Time) + expect(subject.updated_on).to eq(DateTime.parse("2013-09-20 17:47 WAT")) + expect(subject.expires_on).to be_a(Time) + expect(subject.expires_on).to eq(DateTime.parse("2014-10-07 10:02 WAT")) + expect(subject.registrar).to be_a(Whois::Parser::Registrar) + expect(subject.registrar.id).to eq(nil) + expect(subject.registrar.name).to eq("MarkMonitor Inc.") + expect(subject.registrar.url).to eq(nil) + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers.size).to eq(4) + expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[0].name).to eq("ns1.google.com") + expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[1].name).to eq("ns2.google.com") + expect(subject.nameservers[2]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[2].name).to eq("ns3.google.com") + expect(subject.nameservers[3]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[3].name).to eq("ns4.google.com") end end diff --git a/spec/whois/parsers/responses/whois.netcom.cm/cm/status_suspended_spec.rb b/spec/whois/parsers/responses/whois.netcom.cm/cm/status_suspended_spec.rb index cb47eb7a..69f9945f 100644 --- a/spec/whois/parsers/responses/whois.netcom.cm/cm/status_suspended_spec.rb +++ b/spec/whois/parsers/responses/whois.netcom.cm/cm/status_suspended_spec.rb @@ -11,75 +11,36 @@ # require 'spec_helper' -require 'whois/parsers/whois.netcom.cm.rb' -describe Whois::Parsers::WhoisNetcomCm, "status_suspended.expected" do +describe "whois.netcom.cm", :aggregate_failures do subject do file = fixture("responses", "whois.netcom.cm/cm/status_suspended.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.netcom.cm") + Whois::Parser.parser_for(part) end - describe "#domain" do - it do - expect(subject.domain).to eq("imdb.cm") - end - end - describe "#domain_id" do - it do - expect { subject.domain_id }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#status" do - it do - expect(subject.status).to eq(:registered) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(false) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(true) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to be_a(Time) - expect(subject.created_on).to eq(DateTime.parse("2009-08-28 01:00 WAT")) - end - end - describe "#updated_on" do - it do - expect(subject.updated_on).to be_a(Time) - expect(subject.updated_on).to eq(DateTime.parse("2014-01-24 09:17 WAT")) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to be_a(Time) - expect(subject.expires_on).to eq(DateTime.parse("2011-08-28 01:00 WAT")) - end - end - describe "#registrar" do - it do - expect(subject.registrar).to be_a(Whois::Parser::Registrar) - expect(subject.registrar.id).to eq(nil) - expect(subject.registrar.name).to eq("Registrar ANTIC") - expect(subject.registrar.url).to eq(nil) - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers.size).to eq(2) - expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[0].name).to eq("ns1.refinedhosting.net") - expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[1].name).to eq("ns2.refinedhosting.net") - end + it "matches status_suspended.expected" do + expect(subject.domain).to eq("imdb.cm") + expect { subject.domain_id }.to raise_error(Whois::AttributeNotSupported) + expect(subject.status).to eq(:registered) + expect(subject.available?).to eq(false) + expect(subject.registered?).to eq(true) + expect(subject.created_on).to be_a(Time) + expect(subject.created_on).to eq(DateTime.parse("2009-08-28 01:00 WAT")) + expect(subject.updated_on).to be_a(Time) + expect(subject.updated_on).to eq(DateTime.parse("2014-01-24 09:17 WAT")) + expect(subject.expires_on).to be_a(Time) + expect(subject.expires_on).to eq(DateTime.parse("2011-08-28 01:00 WAT")) + expect(subject.registrar).to be_a(Whois::Parser::Registrar) + expect(subject.registrar.id).to eq(nil) + expect(subject.registrar.name).to eq("Registrar ANTIC") + expect(subject.registrar.url).to eq(nil) + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers.size).to eq(2) + expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[0].name).to eq("ns1.refinedhosting.net") + expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[1].name).to eq("ns2.refinedhosting.net") end end diff --git a/spec/whois/parsers/responses/whois.networksolutions.com/status_available_spec.rb b/spec/whois/parsers/responses/whois.networksolutions.com/status_available_spec.rb index fb4e0ca3..d762d482 100644 --- a/spec/whois/parsers/responses/whois.networksolutions.com/status_available_spec.rb +++ b/spec/whois/parsers/responses/whois.networksolutions.com/status_available_spec.rb @@ -11,83 +11,32 @@ # require 'spec_helper' -require 'whois/parsers/whois.networksolutions.com.rb' -describe Whois::Parsers::WhoisNetworksolutionsCom, "status_available.expected" do +describe "whois.networksolutions.com", :aggregate_failures do subject do file = fixture("responses", "whois.networksolutions.com/status_available.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.networksolutions.com") + Whois::Parser.parser_for(part) end - describe "#domain" do - it do - expect(subject.domain).to eq(nil) - end - end - describe "#domain_id" do - it do - expect(subject.domain_id).to eq(nil) - end - end - describe "#status" do - it do - expect(subject.status).to eq(:available) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(true) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(false) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to eq(nil) - end - end - describe "#updated_on" do - it do - expect(subject.updated_on).to eq(nil) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to eq(nil) - end - end - describe "#registrar" do - it do - expect(subject.registrar).to eq(nil) - end - end - describe "#registrant_contacts" do - it do - expect(subject.registrant_contacts).to be_a(Array) - expect(subject.registrant_contacts).to eq([]) - end - end - describe "#admin_contacts" do - it do - expect(subject.admin_contacts).to be_a(Array) - expect(subject.admin_contacts).to eq([]) - end - end - describe "#technical_contacts" do - it do - expect(subject.technical_contacts).to be_a(Array) - expect(subject.technical_contacts).to eq([]) - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers).to eq([]) - end + it "matches status_available.expected" do + expect(subject.domain).to eq(nil) + expect(subject.domain_id).to eq(nil) + expect(subject.status).to eq(:available) + expect(subject.available?).to eq(true) + expect(subject.registered?).to eq(false) + expect(subject.created_on).to eq(nil) + expect(subject.updated_on).to eq(nil) + expect(subject.expires_on).to eq(nil) + expect(subject.registrar).to eq(nil) + expect(subject.registrant_contacts).to be_a(Array) + expect(subject.registrant_contacts).to eq([]) + expect(subject.admin_contacts).to be_a(Array) + expect(subject.admin_contacts).to eq([]) + expect(subject.technical_contacts).to be_a(Array) + expect(subject.technical_contacts).to eq([]) + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers).to eq([]) end end diff --git a/spec/whois/parsers/responses/whois.networksolutions.com/status_registered_spec.rb b/spec/whois/parsers/responses/whois.networksolutions.com/status_registered_spec.rb index 775c08a8..f46b06c1 100644 --- a/spec/whois/parsers/responses/whois.networksolutions.com/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.networksolutions.com/status_registered_spec.rb @@ -11,143 +11,92 @@ # require 'spec_helper' -require 'whois/parsers/whois.networksolutions.com.rb' -describe Whois::Parsers::WhoisNetworksolutionsCom, "status_registered.expected" do +describe "whois.networksolutions.com", :aggregate_failures do subject do file = fixture("responses", "whois.networksolutions.com/status_registered.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.networksolutions.com") + Whois::Parser.parser_for(part) end - describe "#domain" do - it do - expect(subject.domain).to eq("xif.com") - end - end - describe "#domain_id" do - it do - expect(subject.domain_id).to eq("") - end - end - describe "#status" do - it do - expect(subject.status).to eq(:registered) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(false) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(true) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to be_a(Time) - expect(subject.created_on).to eq(DateTime.parse("1997-06-10")) - end - end - describe "#updated_on" do - it do - expect(subject.updated_on).to be_a(Time) - expect(subject.updated_on).to eq(DateTime.parse("2012-02-13")) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to be_a(Time) - expect(subject.expires_on).to eq(DateTime.parse("2014-06-09")) - end - end - describe "#registrar" do - it do - expect(subject.registrar).to be_a(Whois::Parser::Registrar) - expect(subject.registrar.id).to eq("2") - expect(subject.registrar.name).to eq("NETWORK SOLUTIONS, LLC.") - expect(subject.registrar.url).to eq("http//www.networksolutions.com/en_US/") - end - end - describe "#registrant_contacts" do - it do - expect(subject.registrant_contacts).to be_a(Array) - expect(subject.registrant_contacts.size).to eq(1) - expect(subject.registrant_contacts[0]).to be_a(Whois::Parser::Contact) - expect(subject.registrant_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_REGISTRANT) - expect(subject.registrant_contacts[0].id).to eq(nil) - expect(subject.registrant_contacts[0].name).to eq("XIF Communications") - expect(subject.registrant_contacts[0].organization).to eq("XIF Communications") - expect(subject.registrant_contacts[0].address).to eq("1200 New Hampshire Avenue NW") - expect(subject.registrant_contacts[0].city).to eq("Washington") - expect(subject.registrant_contacts[0].zip).to eq("20036") - expect(subject.registrant_contacts[0].state).to eq("DC") - expect(subject.registrant_contacts[0].country).to eq(nil) - expect(subject.registrant_contacts[0].country_code).to eq("US") - expect(subject.registrant_contacts[0].phone).to eq("202-463-7200") - expect(subject.registrant_contacts[0].fax).to eq("999-999-9999") - expect(subject.registrant_contacts[0].email).to eq("noc@xif.com") - expect(subject.registrant_contacts[0].created_on).to eq(nil) - expect(subject.registrant_contacts[0].updated_on).to eq(nil) - end - end - describe "#admin_contacts" do - it do - expect(subject.admin_contacts).to be_a(Array) - expect(subject.admin_contacts.size).to eq(1) - expect(subject.admin_contacts[0]).to be_a(Whois::Parser::Contact) - expect(subject.admin_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_ADMINISTRATIVE) - expect(subject.admin_contacts[0].id).to eq(nil) - expect(subject.admin_contacts[0].name).to eq("Communications, XIF ContactMiddleName") - expect(subject.admin_contacts[0].organization).to eq("XIF Communications") - expect(subject.admin_contacts[0].address).to eq("1200 New Hampshire Avenue NW") - expect(subject.admin_contacts[0].city).to eq("Washington") - expect(subject.admin_contacts[0].zip).to eq("20036") - expect(subject.admin_contacts[0].state).to eq("DC") - expect(subject.admin_contacts[0].country).to eq(nil) - expect(subject.admin_contacts[0].country_code).to eq("US") - expect(subject.admin_contacts[0].phone).to eq("202-463-7200") - expect(subject.admin_contacts[0].fax).to eq("202-318-4003") - expect(subject.admin_contacts[0].email).to eq("noc@xif.com") - expect(subject.admin_contacts[0].created_on).to eq(nil) - expect(subject.admin_contacts[0].updated_on).to eq(nil) - end - end - describe "#technical_contacts" do - it do - expect(subject.technical_contacts).to be_a(Array) - expect(subject.technical_contacts.size).to eq(1) - expect(subject.technical_contacts[0]).to be_a(Whois::Parser::Contact) - expect(subject.technical_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_TECHNICAL) - expect(subject.technical_contacts[0].id).to eq(nil) - expect(subject.technical_contacts[0].name).to eq("Communications, XIF ContactMiddleName") - expect(subject.technical_contacts[0].organization).to eq("XIF Communications") - expect(subject.technical_contacts[0].address).to eq("1200 New Hampshire Avenue NW") - expect(subject.technical_contacts[0].city).to eq("Washington") - expect(subject.technical_contacts[0].zip).to eq("20036") - expect(subject.technical_contacts[0].state).to eq("DC") - expect(subject.technical_contacts[0].country).to eq(nil) - expect(subject.technical_contacts[0].country_code).to eq("US") - expect(subject.technical_contacts[0].phone).to eq("202-463-7200") - expect(subject.technical_contacts[0].fax).to eq("202-318-4003") - expect(subject.technical_contacts[0].email).to eq("noc@xif.com") - expect(subject.technical_contacts[0].created_on).to eq(nil) - expect(subject.technical_contacts[0].updated_on).to eq(nil) - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers.size).to eq(3) - expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[0].name).to eq("ns01.xif.com") - expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[1].name).to eq("ns-east.cerf.net") - expect(subject.nameservers[2]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[2].name).to eq("ns-west.cerf.net") - end + it "matches status_registered.expected" do + expect(subject.domain).to eq("xif.com") + expect(subject.domain_id).to eq("") + expect(subject.status).to eq(:registered) + expect(subject.available?).to eq(false) + expect(subject.registered?).to eq(true) + expect(subject.created_on).to be_a(Time) + expect(subject.created_on).to eq(DateTime.parse("1997-06-10")) + expect(subject.updated_on).to be_a(Time) + expect(subject.updated_on).to eq(DateTime.parse("2012-02-13")) + expect(subject.expires_on).to be_a(Time) + expect(subject.expires_on).to eq(DateTime.parse("2014-06-09")) + expect(subject.registrar).to be_a(Whois::Parser::Registrar) + expect(subject.registrar.id).to eq("2") + expect(subject.registrar.name).to eq("NETWORK SOLUTIONS, LLC.") + expect(subject.registrar.url).to eq("http//www.networksolutions.com/en_US/") + expect(subject.registrant_contacts).to be_a(Array) + expect(subject.registrant_contacts.size).to eq(1) + expect(subject.registrant_contacts[0]).to be_a(Whois::Parser::Contact) + expect(subject.registrant_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_REGISTRANT) + expect(subject.registrant_contacts[0].id).to eq(nil) + expect(subject.registrant_contacts[0].name).to eq("XIF Communications") + expect(subject.registrant_contacts[0].organization).to eq("XIF Communications") + expect(subject.registrant_contacts[0].address).to eq("1200 New Hampshire Avenue NW") + expect(subject.registrant_contacts[0].city).to eq("Washington") + expect(subject.registrant_contacts[0].zip).to eq("20036") + expect(subject.registrant_contacts[0].state).to eq("DC") + expect(subject.registrant_contacts[0].country).to eq(nil) + expect(subject.registrant_contacts[0].country_code).to eq("US") + expect(subject.registrant_contacts[0].phone).to eq("202-463-7200") + expect(subject.registrant_contacts[0].fax).to eq("999-999-9999") + expect(subject.registrant_contacts[0].email).to eq("noc@xif.com") + expect(subject.registrant_contacts[0].created_on).to eq(nil) + expect(subject.registrant_contacts[0].updated_on).to eq(nil) + expect(subject.admin_contacts).to be_a(Array) + expect(subject.admin_contacts.size).to eq(1) + expect(subject.admin_contacts[0]).to be_a(Whois::Parser::Contact) + expect(subject.admin_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_ADMINISTRATIVE) + expect(subject.admin_contacts[0].id).to eq(nil) + expect(subject.admin_contacts[0].name).to eq("Communications, XIF ContactMiddleName") + expect(subject.admin_contacts[0].organization).to eq("XIF Communications") + expect(subject.admin_contacts[0].address).to eq("1200 New Hampshire Avenue NW") + expect(subject.admin_contacts[0].city).to eq("Washington") + expect(subject.admin_contacts[0].zip).to eq("20036") + expect(subject.admin_contacts[0].state).to eq("DC") + expect(subject.admin_contacts[0].country).to eq(nil) + expect(subject.admin_contacts[0].country_code).to eq("US") + expect(subject.admin_contacts[0].phone).to eq("202-463-7200") + expect(subject.admin_contacts[0].fax).to eq("202-318-4003") + expect(subject.admin_contacts[0].email).to eq("noc@xif.com") + expect(subject.admin_contacts[0].created_on).to eq(nil) + expect(subject.admin_contacts[0].updated_on).to eq(nil) + expect(subject.technical_contacts).to be_a(Array) + expect(subject.technical_contacts.size).to eq(1) + expect(subject.technical_contacts[0]).to be_a(Whois::Parser::Contact) + expect(subject.technical_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_TECHNICAL) + expect(subject.technical_contacts[0].id).to eq(nil) + expect(subject.technical_contacts[0].name).to eq("Communications, XIF ContactMiddleName") + expect(subject.technical_contacts[0].organization).to eq("XIF Communications") + expect(subject.technical_contacts[0].address).to eq("1200 New Hampshire Avenue NW") + expect(subject.technical_contacts[0].city).to eq("Washington") + expect(subject.technical_contacts[0].zip).to eq("20036") + expect(subject.technical_contacts[0].state).to eq("DC") + expect(subject.technical_contacts[0].country).to eq(nil) + expect(subject.technical_contacts[0].country_code).to eq("US") + expect(subject.technical_contacts[0].phone).to eq("202-463-7200") + expect(subject.technical_contacts[0].fax).to eq("202-318-4003") + expect(subject.technical_contacts[0].email).to eq("noc@xif.com") + expect(subject.technical_contacts[0].created_on).to eq(nil) + expect(subject.technical_contacts[0].updated_on).to eq(nil) + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers.size).to eq(3) + expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[0].name).to eq("ns01.xif.com") + expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[1].name).to eq("ns-east.cerf.net") + expect(subject.nameservers[2]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[2].name).to eq("ns-west.cerf.net") end end diff --git a/spec/whois/parsers/responses/whois.nic.ac/ac/status_available_spec.rb b/spec/whois/parsers/responses/whois.nic.ac/ac/status_available_spec.rb index 97913997..51732921 100644 --- a/spec/whois/parsers/responses/whois.nic.ac/ac/status_available_spec.rb +++ b/spec/whois/parsers/responses/whois.nic.ac/ac/status_available_spec.rb @@ -11,86 +11,31 @@ # require 'spec_helper' -require 'whois/parsers/whois.nic.ac.rb' -describe Whois::Parsers::WhoisNicAc, "status_available.expected" do +describe "whois.nic.ac", :aggregate_failures do subject do file = fixture("responses", "whois.nic.ac/ac/status_available.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.nic.ac") + Whois::Parser.parser_for(part) end - describe "#disclaimer" do - it do - expect { subject.disclaimer }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#domain" do - it do - expect(subject.domain).to eq(nil) - end - end - describe "#domain_id" do - it do - expect(subject.domain_id).to eq(nil) - end - end - describe "#status" do - it do - expect(subject.status).to eq(:available) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(true) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(false) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to eq(nil) - end - end - describe "#updated_on" do - it do - expect(subject.updated_on).to eq(nil) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to eq(nil) - end - end - describe "#registrar" do - it do - expect(subject.registrar).to eq(nil) - end - end - describe "#registrant_contacts" do - it do - expect(subject.registrant_contacts).to be_a(Array) - expect(subject.registrant_contacts).to eq([]) - end - end - describe "#admin_contacts" do - it do - expect { subject.admin_contacts }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#technical_contacts" do - it do - expect { subject.technical_contacts }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers).to eq([]) - end + it "matches status_available.expected" do + expect { subject.disclaimer }.to raise_error(Whois::AttributeNotSupported) + expect(subject.domain).to eq(nil) + expect(subject.domain_id).to eq(nil) + expect(subject.status).to eq(:available) + expect(subject.available?).to eq(true) + expect(subject.registered?).to eq(false) + expect(subject.created_on).to eq(nil) + expect(subject.updated_on).to eq(nil) + expect(subject.expires_on).to eq(nil) + expect(subject.registrar).to eq(nil) + expect(subject.registrant_contacts).to be_a(Array) + expect(subject.registrant_contacts).to eq([]) + expect { subject.admin_contacts }.to raise_error(Whois::AttributeNotSupported) + expect { subject.technical_contacts }.to raise_error(Whois::AttributeNotSupported) + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers).to eq([]) end end diff --git a/spec/whois/parsers/responses/whois.nic.ac/ac/status_registered_spec.rb b/spec/whois/parsers/responses/whois.nic.ac/ac/status_registered_spec.rb index 561c0f7d..315ab54f 100644 --- a/spec/whois/parsers/responses/whois.nic.ac/ac/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.nic.ac/ac/status_registered_spec.rb @@ -11,116 +11,61 @@ # require 'spec_helper' -require 'whois/parsers/whois.nic.ac.rb' -describe Whois::Parsers::WhoisNicAc, "status_registered.expected" do +describe "whois.nic.ac", :aggregate_failures do subject do file = fixture("responses", "whois.nic.ac/ac/status_registered.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.nic.ac") + Whois::Parser.parser_for(part) end - describe "#disclaimer" do - it do - expect { subject.disclaimer }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#domain" do - it do - expect(subject.domain).to eq("google.ac") - end - end - describe "#domain_id" do - it do - expect(subject.domain_id).to eq("D503300000040385778-LRMS") - end - end - describe "#status" do - it do - expect(subject.status).to eq(:registered) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(false) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(true) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to be_a(Time) - expect(subject.created_on).to eq(DateTime.parse("2006-04-03 13:38:02 UTC")) - end - end - describe "#updated_on" do - it do - expect(subject.updated_on).to be_a(Time) - expect(subject.updated_on).to eq(DateTime.parse("2019-03-02T10:33:12 UTC")) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to be_a(Time) - expect(subject.expires_on).to eq(DateTime.parse("2020-04-03 13:38:02 UTC")) - end - end - describe "#registrar" do - it do - expect(subject.registrar).to be_a(Whois::Parser::Registrar) - expect(subject.registrar.id).to eq("292") - expect(subject.registrar.name).to eq("MarkMonitor Inc.") - expect(subject.registrar.url).to eq("http://www.markmonitor.com") - end - end - describe "#registrant_contacts" do - it do - expect(subject.registrant_contacts).to be_a(Array) - expect(subject.registrant_contacts.size).to eq(1) - expect(subject.registrant_contacts[0]).to be_a(Whois::Parser::Contact) - expect(subject.registrant_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_REGISTRANT) - expect(subject.registrant_contacts[0].id).to eq(nil) - expect(subject.registrant_contacts[0].name).to eq(nil) - expect(subject.registrant_contacts[0].organization).to eq("Google LLC") - expect(subject.registrant_contacts[0].address).to eq(nil) - expect(subject.registrant_contacts[0].city).to eq(nil) - expect(subject.registrant_contacts[0].zip).to eq(nil) - expect(subject.registrant_contacts[0].state).to eq("CA") - expect(subject.registrant_contacts[0].country).to eq(nil) - expect(subject.registrant_contacts[0].country_code).to eq("US") - expect(subject.registrant_contacts[0].phone).to eq(nil) - expect(subject.registrant_contacts[0].fax).to eq(nil) - expect(subject.registrant_contacts[0].email).to eq(nil) - expect(subject.registrant_contacts[0].created_on).to eq(nil) - expect(subject.registrant_contacts[0].updated_on).to eq(nil) - end - end - describe "#admin_contacts" do - it do - expect { subject.admin_contacts }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#technical_contacts" do - it do - expect { subject.technical_contacts }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers.size).to eq(4) - expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[0].name).to eq("ns1.google.com") - expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[1].name).to eq("ns2.google.com") - expect(subject.nameservers[2]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[2].name).to eq("ns3.google.com") - expect(subject.nameservers[3]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[3].name).to eq("ns4.google.com") - end + it "matches status_registered.expected" do + expect { subject.disclaimer }.to raise_error(Whois::AttributeNotSupported) + expect(subject.domain).to eq("google.ac") + expect(subject.domain_id).to eq("D503300000040385778-LRMS") + expect(subject.status).to eq(:registered) + expect(subject.available?).to eq(false) + expect(subject.registered?).to eq(true) + expect(subject.created_on).to be_a(Time) + expect(subject.created_on).to eq(DateTime.parse("2006-04-03 13:38:02 UTC")) + expect(subject.updated_on).to be_a(Time) + expect(subject.updated_on).to eq(DateTime.parse("2019-03-02T10:33:12 UTC")) + expect(subject.expires_on).to be_a(Time) + expect(subject.expires_on).to eq(DateTime.parse("2020-04-03 13:38:02 UTC")) + expect(subject.registrar).to be_a(Whois::Parser::Registrar) + expect(subject.registrar.id).to eq("292") + expect(subject.registrar.name).to eq("MarkMonitor Inc.") + expect(subject.registrar.url).to eq("http://www.markmonitor.com") + expect(subject.registrant_contacts).to be_a(Array) + expect(subject.registrant_contacts.size).to eq(1) + expect(subject.registrant_contacts[0]).to be_a(Whois::Parser::Contact) + expect(subject.registrant_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_REGISTRANT) + expect(subject.registrant_contacts[0].id).to eq(nil) + expect(subject.registrant_contacts[0].name).to eq(nil) + expect(subject.registrant_contacts[0].organization).to eq("Google LLC") + expect(subject.registrant_contacts[0].address).to eq(nil) + expect(subject.registrant_contacts[0].city).to eq(nil) + expect(subject.registrant_contacts[0].zip).to eq(nil) + expect(subject.registrant_contacts[0].state).to eq("CA") + expect(subject.registrant_contacts[0].country).to eq(nil) + expect(subject.registrant_contacts[0].country_code).to eq("US") + expect(subject.registrant_contacts[0].phone).to eq(nil) + expect(subject.registrant_contacts[0].fax).to eq(nil) + expect(subject.registrant_contacts[0].email).to eq(nil) + expect(subject.registrant_contacts[0].created_on).to eq(nil) + expect(subject.registrant_contacts[0].updated_on).to eq(nil) + expect { subject.admin_contacts }.to raise_error(Whois::AttributeNotSupported) + expect { subject.technical_contacts }.to raise_error(Whois::AttributeNotSupported) + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers.size).to eq(4) + expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[0].name).to eq("ns1.google.com") + expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[1].name).to eq("ns2.google.com") + expect(subject.nameservers[2]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[2].name).to eq("ns3.google.com") + expect(subject.nameservers[3]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[3].name).to eq("ns4.google.com") end end diff --git a/spec/whois/parsers/responses/whois.nic.af/af/status_available_spec.rb b/spec/whois/parsers/responses/whois.nic.af/af/status_available_spec.rb index b9f2bebe..5c3e9575 100644 --- a/spec/whois/parsers/responses/whois.nic.af/af/status_available_spec.rb +++ b/spec/whois/parsers/responses/whois.nic.af/af/status_available_spec.rb @@ -11,65 +11,26 @@ # require 'spec_helper' -require 'whois/parsers/whois.nic.af.rb' -describe Whois::Parsers::WhoisNicAf, "status_available.expected" do +describe "whois.nic.af", :aggregate_failures do subject do file = fixture("responses", "whois.nic.af/af/status_available.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.nic.af") + Whois::Parser.parser_for(part) end - describe "#domain" do - it do - expect(subject.domain).to eq("u34jedzcq.af") - end - end - describe "#domain_id" do - it do - expect(subject.domain_id).to eq(nil) - end - end - describe "#status" do - it do - expect(subject.status).to eq(:available) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(true) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(false) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to eq(nil) - end - end - describe "#updated_on" do - it do - expect(subject.updated_on).to eq(nil) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to eq(nil) - end - end - describe "#registrar" do - it do - expect(subject.registrar).to eq(nil) - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers).to eq([]) - end + it "matches status_available.expected" do + expect(subject.domain).to eq("u34jedzcq.af") + expect(subject.domain_id).to eq(nil) + expect(subject.status).to eq(:available) + expect(subject.available?).to eq(true) + expect(subject.registered?).to eq(false) + expect(subject.created_on).to eq(nil) + expect(subject.updated_on).to eq(nil) + expect(subject.expires_on).to eq(nil) + expect(subject.registrar).to eq(nil) + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers).to eq([]) end end diff --git a/spec/whois/parsers/responses/whois.nic.af/af/status_registered_spec.rb b/spec/whois/parsers/responses/whois.nic.af/af/status_registered_spec.rb index dfed97a3..1089fc71 100644 --- a/spec/whois/parsers/responses/whois.nic.af/af/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.nic.af/af/status_registered_spec.rb @@ -11,79 +11,40 @@ # require 'spec_helper' -require 'whois/parsers/whois.nic.af.rb' -describe Whois::Parsers::WhoisNicAf, "status_registered.expected" do +describe "whois.nic.af", :aggregate_failures do subject do file = fixture("responses", "whois.nic.af/af/status_registered.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.nic.af") + Whois::Parser.parser_for(part) end - describe "#domain" do - it do - expect(subject.domain).to eq("google.af") - end - end - describe "#domain_id" do - it do - expect(subject.domain_id).to eq("345679-CoCCA") - end - end - describe "#status" do - it do - expect(subject.status).to eq(:registered) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(false) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(true) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to be_a(Time) - expect(subject.created_on).to eq(DateTime.parse("2009-10-05 03:51:17 UTC")) - end - end - describe "#updated_on" do - it do - expect(subject.updated_on).to be_a(Time) - expect(subject.updated_on).to eq(DateTime.parse("2014-01-16 06:50:48 UTC")) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to be_a(Time) - expect(subject.expires_on).to eq(DateTime.parse("2014-05-05 03:51:17 UTC")) - end - end - describe "#registrar" do - it do - expect(subject.registrar).to be_a(Whois::Parser::Registrar) - expect(subject.registrar.id).to eq(nil) - expect(subject.registrar.name).to eq("MarkMonitor") - expect(subject.registrar.url).to eq("http://www.markmonitor.com") - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers.size).to eq(4) - expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[0].name).to eq("ns1.google.com") - expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[1].name).to eq("ns2.google.com") - expect(subject.nameservers[2]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[2].name).to eq("ns3.google.com") - expect(subject.nameservers[3]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[3].name).to eq("ns4.google.com") - end + it "matches status_registered.expected" do + expect(subject.domain).to eq("google.af") + expect(subject.domain_id).to eq("345679-CoCCA") + expect(subject.status).to eq(:registered) + expect(subject.available?).to eq(false) + expect(subject.registered?).to eq(true) + expect(subject.created_on).to be_a(Time) + expect(subject.created_on).to eq(DateTime.parse("2009-10-05 03:51:17 UTC")) + expect(subject.updated_on).to be_a(Time) + expect(subject.updated_on).to eq(DateTime.parse("2014-01-16 06:50:48 UTC")) + expect(subject.expires_on).to be_a(Time) + expect(subject.expires_on).to eq(DateTime.parse("2014-05-05 03:51:17 UTC")) + expect(subject.registrar).to be_a(Whois::Parser::Registrar) + expect(subject.registrar.id).to eq(nil) + expect(subject.registrar.name).to eq("MarkMonitor") + expect(subject.registrar.url).to eq("http://www.markmonitor.com") + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers.size).to eq(4) + expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[0].name).to eq("ns1.google.com") + expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[1].name).to eq("ns2.google.com") + expect(subject.nameservers[2]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[2].name).to eq("ns3.google.com") + expect(subject.nameservers[3]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[3].name).to eq("ns4.google.com") end end diff --git a/spec/whois/parsers/responses/whois.nic.ag/ag/status_available_spec.rb b/spec/whois/parsers/responses/whois.nic.ag/ag/status_available_spec.rb index 435027d1..d1dd4e52 100644 --- a/spec/whois/parsers/responses/whois.nic.ag/ag/status_available_spec.rb +++ b/spec/whois/parsers/responses/whois.nic.ag/ag/status_available_spec.rb @@ -11,88 +11,33 @@ # require 'spec_helper' -require 'whois/parsers/whois.nic.ag.rb' -describe Whois::Parsers::WhoisNicAg, "status_available.expected" do +describe "whois.nic.ag", :aggregate_failures do subject do file = fixture("responses", "whois.nic.ag/ag/status_available.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.nic.ag") + Whois::Parser.parser_for(part) end - describe "#disclaimer" do - it do - expect(subject.disclaimer).to eq("Access to WHOIS information is provided to assist persons in determining the contents of a domain name registration record in the registry database. The data in this record is provided by The Registry Operator for informational purposes only, and accuracy is not guaranteed. 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. Registry Operator reserves the right to modify these terms at any time. By submitting this query, you agree to abide by this policy. The Registrar of Record identified in this output may have an RDDS service that can be queried for additional information on how to contact the Registrant, Admin, or Tech contact of the queried domain name.") - end - end - describe "#domain" do - it do - expect(subject.domain).to eq(nil) - end - end - describe "#domain_id" do - it do - expect(subject.domain_id).to eq(nil) - end - end - describe "#status" do - it do - expect(subject.status).to eq([]) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(true) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(false) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to eq(nil) - end - end - describe "#updated_on" do - it do - expect(subject.updated_on).to eq(nil) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to eq(nil) - end - end - describe "#registrar" do - it do - expect(subject.registrar).to eq(nil) - end - end - describe "#registrant_contacts" do - it do - expect(subject.registrant_contacts).to be_a(Array) - expect(subject.registrant_contacts).to eq([]) - end - end - describe "#admin_contacts" do - it do - expect(subject.admin_contacts).to be_a(Array) - expect(subject.admin_contacts).to eq([]) - end - end - describe "#technical_contacts" do - it do - expect(subject.technical_contacts).to be_a(Array) - expect(subject.technical_contacts).to eq([]) - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers).to eq([]) - end + it "matches status_available.expected" do + expect(subject.disclaimer).to eq("Access to WHOIS information is provided to assist persons in determining the contents of a domain name registration record in the registry database. The data in this record is provided by The Registry Operator for informational purposes only, and accuracy is not guaranteed. 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. Registry Operator reserves the right to modify these terms at any time. By submitting this query, you agree to abide by this policy. The Registrar of Record identified in this output may have an RDDS service that can be queried for additional information on how to contact the Registrant, Admin, or Tech contact of the queried domain name.") + expect(subject.domain).to eq(nil) + expect(subject.domain_id).to eq(nil) + expect(subject.status).to eq([]) + expect(subject.available?).to eq(true) + expect(subject.registered?).to eq(false) + expect(subject.created_on).to eq(nil) + expect(subject.updated_on).to eq(nil) + expect(subject.expires_on).to eq(nil) + expect(subject.registrar).to eq(nil) + expect(subject.registrant_contacts).to be_a(Array) + expect(subject.registrant_contacts).to eq([]) + expect(subject.admin_contacts).to be_a(Array) + expect(subject.admin_contacts).to eq([]) + expect(subject.technical_contacts).to be_a(Array) + expect(subject.technical_contacts).to eq([]) + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers).to eq([]) end end diff --git a/spec/whois/parsers/responses/whois.nic.ag/ag/status_registered_spec.rb b/spec/whois/parsers/responses/whois.nic.ag/ag/status_registered_spec.rb index cd977ed8..f9981bc4 100644 --- a/spec/whois/parsers/responses/whois.nic.ag/ag/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.nic.ag/ag/status_registered_spec.rb @@ -11,115 +11,60 @@ # require 'spec_helper' -require 'whois/parsers/whois.nic.ag.rb' -describe Whois::Parsers::WhoisNicAg, "status_registered.expected" do +describe "whois.nic.ag", :aggregate_failures do subject do file = fixture("responses", "whois.nic.ag/ag/status_registered.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.nic.ag") + Whois::Parser.parser_for(part) end - describe "#disclaimer" do - it do - expect(subject.disclaimer).to eq("Access to WHOIS information is provided to assist persons in determining the contents of a domain name registration record in the registry database. The data in this record is provided by The Registry Operator for informational purposes only, and accuracy is not guaranteed. 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. Registry Operator reserves the right to modify these terms at any time. By submitting this query, you agree to abide by this policy. The Registrar of Record identified in this output may have an RDDS service that can be queried for additional information on how to contact the Registrant, Admin, or Tech contact of the queried domain name.") - end - end - describe "#domain" do - it do - expect(subject.domain).to eq("google.ag") - end - end - describe "#domain_id" do - it do - expect(subject.domain_id).to eq("D105800000000048552-AGRS") - end - end - describe "#status" do - it do - expect(subject.status).to eq(["clientDeleteProhibited https://icann.org/epp#clientDeleteProhibited", "clientTransferProhibited https://icann.org/epp#clientTransferProhibited", "clientUpdateProhibited https://icann.org/epp#clientUpdateProhibited"]) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(false) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(true) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to be_a(Time) - expect(subject.created_on).to eq(DateTime.parse("2003-01-05 14:06:59 UTC")) - end - end - describe "#updated_on" do - it do - expect(subject.updated_on).to be_a(Time) - expect(subject.updated_on).to eq(DateTime.parse("2020-12-04 10:29:47 UTC")) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to be_a(Time) - expect(subject.expires_on).to eq(DateTime.parse("2022-01-05 14:06:59 UTC")) - end - end - describe "#registrar" do - it do - expect(subject.registrar).to be_a(Whois::Parser::Registrar) - expect(subject.registrar.id).to eq("292") - expect(subject.registrar.name).to eq("MarkMonitor Inc.") - expect(subject.registrar.url).to eq("http://www.markmonitor.com") - end - end - describe "#registrant_contacts" do - it do - expect(subject.registrant_contacts).to be_a(Array) - expect(subject.registrant_contacts.size).to eq(1) - expect(subject.registrant_contacts[0]).to be_a(Whois::Parser::Contact) - expect(subject.registrant_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_REGISTRANT) - expect(subject.registrant_contacts[0].id).to eq(nil) - expect(subject.registrant_contacts[0].name).to eq(nil) - expect(subject.registrant_contacts[0].organization).to eq("Google Inc.") - expect(subject.registrant_contacts[0].address).to eq(nil) - expect(subject.registrant_contacts[0].city).to eq(nil) - expect(subject.registrant_contacts[0].zip).to eq(nil) - expect(subject.registrant_contacts[0].state).to eq("CA") - expect(subject.registrant_contacts[0].country_code).to eq("US") - expect(subject.registrant_contacts[0].phone).to eq(nil) - expect(subject.registrant_contacts[0].fax).to eq(nil) - expect(subject.registrant_contacts[0].email).to eq(nil) - end - end - describe "#admin_contacts" do - it do - expect(subject.admin_contacts).to be_a(Array) - expect(subject.admin_contacts.size).to eq(0) - end - end - describe "#technical_contacts" do - it do - expect(subject.technical_contacts).to be_a(Array) - expect(subject.technical_contacts.size).to eq(0) - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers.size).to eq(4) - expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[0].name).to eq("ns1.google.com") - expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[1].name).to eq("ns2.google.com") - expect(subject.nameservers[2]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[2].name).to eq("ns4.google.com") - expect(subject.nameservers[3]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[3].name).to eq("ns3.google.com") - end + it "matches status_registered.expected" do + expect(subject.disclaimer).to eq("Access to WHOIS information is provided to assist persons in determining the contents of a domain name registration record in the registry database. The data in this record is provided by The Registry Operator for informational purposes only, and accuracy is not guaranteed. 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. Registry Operator reserves the right to modify these terms at any time. By submitting this query, you agree to abide by this policy. The Registrar of Record identified in this output may have an RDDS service that can be queried for additional information on how to contact the Registrant, Admin, or Tech contact of the queried domain name.") + expect(subject.domain).to eq("google.ag") + expect(subject.domain_id).to eq("D105800000000048552-AGRS") + expect(subject.status).to eq(["clientDeleteProhibited https://icann.org/epp#clientDeleteProhibited", "clientTransferProhibited https://icann.org/epp#clientTransferProhibited", "clientUpdateProhibited https://icann.org/epp#clientUpdateProhibited"]) + expect(subject.available?).to eq(false) + expect(subject.registered?).to eq(true) + expect(subject.created_on).to be_a(Time) + expect(subject.created_on).to eq(DateTime.parse("2003-01-05 14:06:59 UTC")) + expect(subject.updated_on).to be_a(Time) + expect(subject.updated_on).to eq(DateTime.parse("2020-12-04 10:29:47 UTC")) + expect(subject.expires_on).to be_a(Time) + expect(subject.expires_on).to eq(DateTime.parse("2022-01-05 14:06:59 UTC")) + expect(subject.registrar).to be_a(Whois::Parser::Registrar) + expect(subject.registrar.id).to eq("292") + expect(subject.registrar.name).to eq("MarkMonitor Inc.") + expect(subject.registrar.url).to eq("http://www.markmonitor.com") + expect(subject.registrant_contacts).to be_a(Array) + expect(subject.registrant_contacts.size).to eq(1) + expect(subject.registrant_contacts[0]).to be_a(Whois::Parser::Contact) + expect(subject.registrant_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_REGISTRANT) + expect(subject.registrant_contacts[0].id).to eq(nil) + expect(subject.registrant_contacts[0].name).to eq(nil) + expect(subject.registrant_contacts[0].organization).to eq("Google Inc.") + expect(subject.registrant_contacts[0].address).to eq(nil) + expect(subject.registrant_contacts[0].city).to eq(nil) + expect(subject.registrant_contacts[0].zip).to eq(nil) + expect(subject.registrant_contacts[0].state).to eq("CA") + expect(subject.registrant_contacts[0].country_code).to eq("US") + expect(subject.registrant_contacts[0].phone).to eq(nil) + expect(subject.registrant_contacts[0].fax).to eq(nil) + expect(subject.registrant_contacts[0].email).to eq(nil) + expect(subject.admin_contacts).to be_a(Array) + expect(subject.admin_contacts.size).to eq(0) + expect(subject.technical_contacts).to be_a(Array) + expect(subject.technical_contacts.size).to eq(0) + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers.size).to eq(4) + expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[0].name).to eq("ns1.google.com") + expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[1].name).to eq("ns2.google.com") + expect(subject.nameservers[2]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[2].name).to eq("ns4.google.com") + expect(subject.nameservers[3]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[3].name).to eq("ns3.google.com") end end diff --git a/spec/whois/parsers/responses/whois.nic.ai/ai/status_available_spec.rb b/spec/whois/parsers/responses/whois.nic.ai/ai/status_available_spec.rb index 6eb2af6c..9ddc37cb 100644 --- a/spec/whois/parsers/responses/whois.nic.ai/ai/status_available_spec.rb +++ b/spec/whois/parsers/responses/whois.nic.ai/ai/status_available_spec.rb @@ -11,50 +11,23 @@ # require 'spec_helper' -require 'whois/parsers/whois.nic.ai.rb' -describe Whois::Parsers::WhoisNicAi, "status_available.expected" do +describe "whois.nic.ai", :aggregate_failures do subject do file = fixture("responses", "whois.nic.ai/ai/status_available.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.nic.ai") + Whois::Parser.parser_for(part) end - describe "#status" do - it do - expect(subject.status).to eq(:available) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(true) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(false) - end - end - describe "#created_on" do - it do - expect { subject.created_on }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#updated_on" do - it do - expect { subject.updated_on }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#expires_on" do - it do - expect { subject.expires_on }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers).to eq([]) - end + it "matches status_available.expected" do + expect(subject.status).to eq(:available) + expect(subject.available?).to eq(true) + expect(subject.registered?).to eq(false) + expect { subject.created_on }.to raise_error(Whois::AttributeNotSupported) + expect { subject.updated_on }.to raise_error(Whois::AttributeNotSupported) + expect { subject.expires_on }.to raise_error(Whois::AttributeNotSupported) + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers).to eq([]) end end diff --git a/spec/whois/parsers/responses/whois.nic.ai/ai/status_registered_spec.rb b/spec/whois/parsers/responses/whois.nic.ai/ai/status_registered_spec.rb index dfdca1ac..2c243b50 100644 --- a/spec/whois/parsers/responses/whois.nic.ai/ai/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.nic.ai/ai/status_registered_spec.rb @@ -11,58 +11,31 @@ # require 'spec_helper' -require 'whois/parsers/whois.nic.ai.rb' -describe Whois::Parsers::WhoisNicAi, "status_registered.expected" do +describe "whois.nic.ai", :aggregate_failures do subject do file = fixture("responses", "whois.nic.ai/ai/status_registered.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.nic.ai") + Whois::Parser.parser_for(part) end - describe "#status" do - it do - expect(subject.status).to eq(:registered) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(false) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(true) - end - end - describe "#created_on" do - it do - expect { subject.created_on }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#updated_on" do - it do - expect { subject.updated_on }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#expires_on" do - it do - expect { subject.expires_on }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers.size).to eq(4) - expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[0].name).to eq("ns1.google.com") - expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[1].name).to eq("ns2.google.com") - expect(subject.nameservers[2]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[2].name).to eq("ns3.google.com") - expect(subject.nameservers[3]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[3].name).to eq("ns4.google.com") - end + it "matches status_registered.expected" do + expect(subject.status).to eq(:registered) + expect(subject.available?).to eq(false) + expect(subject.registered?).to eq(true) + expect { subject.created_on }.to raise_error(Whois::AttributeNotSupported) + expect { subject.updated_on }.to raise_error(Whois::AttributeNotSupported) + expect { subject.expires_on }.to raise_error(Whois::AttributeNotSupported) + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers.size).to eq(4) + expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[0].name).to eq("ns1.google.com") + expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[1].name).to eq("ns2.google.com") + expect(subject.nameservers[2]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[2].name).to eq("ns3.google.com") + expect(subject.nameservers[3]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[3].name).to eq("ns4.google.com") end end diff --git a/spec/whois/parsers/responses/whois.nic.as/as/status_available_spec.rb b/spec/whois/parsers/responses/whois.nic.as/as/status_available_spec.rb index d9a93ae4..485746b4 100644 --- a/spec/whois/parsers/responses/whois.nic.as/as/status_available_spec.rb +++ b/spec/whois/parsers/responses/whois.nic.as/as/status_available_spec.rb @@ -11,50 +11,23 @@ # require 'spec_helper' -require 'whois/parsers/whois.nic.as.rb' -describe Whois::Parsers::WhoisNicAs, "status_available.expected" do +describe "whois.nic.as", :aggregate_failures do subject do file = fixture("responses", "whois.nic.as/as/status_available.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.nic.as") + Whois::Parser.parser_for(part) end - describe "#status" do - it do - expect(subject.status).to eq(:available) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(true) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(false) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to eq(nil) - end - end - describe "#updated_on" do - it do - expect { subject.updated_on }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to eq(nil) - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers).to eq([]) - end + it "matches status_available.expected" do + expect(subject.status).to eq(:available) + expect(subject.available?).to eq(true) + expect(subject.registered?).to eq(false) + expect(subject.created_on).to eq(nil) + expect { subject.updated_on }.to raise_error(Whois::AttributeNotSupported) + expect(subject.expires_on).to eq(nil) + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers).to eq([]) end end diff --git a/spec/whois/parsers/responses/whois.nic.as/as/status_registered_spec.rb b/spec/whois/parsers/responses/whois.nic.as/as/status_registered_spec.rb index fdd85079..72344b56 100644 --- a/spec/whois/parsers/responses/whois.nic.as/as/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.nic.as/as/status_registered_spec.rb @@ -11,62 +11,35 @@ # require 'spec_helper' -require 'whois/parsers/whois.nic.as.rb' -describe Whois::Parsers::WhoisNicAs, "status_registered.expected" do +describe "whois.nic.as", :aggregate_failures do subject do file = fixture("responses", "whois.nic.as/as/status_registered.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.nic.as") + Whois::Parser.parser_for(part) end - describe "#status" do - it do - expect(subject.status).to eq(:registered) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(false) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(true) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to eq(nil) - end - end - describe "#updated_on" do - it do - expect { subject.updated_on }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to eq(nil) - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers.size).to eq(4) - expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[0].name).to eq("ns1.google.com") - expect(subject.nameservers[0].ipv4).to eq(nil) - expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[1].name).to eq("ns2.google.com") - expect(subject.nameservers[1].ipv4).to eq(nil) - expect(subject.nameservers[2]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[2].name).to eq("ns3.google.com") - expect(subject.nameservers[2].ipv4).to eq(nil) - expect(subject.nameservers[3]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[3].name).to eq("ns4.google.com") - expect(subject.nameservers[3].ipv4).to eq(nil) - end + it "matches status_registered.expected" do + expect(subject.status).to eq(:registered) + expect(subject.available?).to eq(false) + expect(subject.registered?).to eq(true) + expect(subject.created_on).to eq(nil) + expect { subject.updated_on }.to raise_error(Whois::AttributeNotSupported) + expect(subject.expires_on).to eq(nil) + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers.size).to eq(4) + expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[0].name).to eq("ns1.google.com") + expect(subject.nameservers[0].ipv4).to eq(nil) + expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[1].name).to eq("ns2.google.com") + expect(subject.nameservers[1].ipv4).to eq(nil) + expect(subject.nameservers[2]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[2].name).to eq("ns3.google.com") + expect(subject.nameservers[2].ipv4).to eq(nil) + expect(subject.nameservers[3]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[3].name).to eq("ns4.google.com") + expect(subject.nameservers[3].ipv4).to eq(nil) end end diff --git a/spec/whois/parsers/responses/whois.nic.asia/asia/property_status_multiple_spec.rb b/spec/whois/parsers/responses/whois.nic.asia/asia/property_status_multiple_spec.rb index 814513f2..19683541 100644 --- a/spec/whois/parsers/responses/whois.nic.asia/asia/property_status_multiple_spec.rb +++ b/spec/whois/parsers/responses/whois.nic.asia/asia/property_status_multiple_spec.rb @@ -11,29 +11,18 @@ # require 'spec_helper' -require 'whois/parsers/whois.nic.asia.rb' -describe Whois::Parsers::WhoisNicAsia, "property_status_multiple.expected" do +describe "whois.nic.asia", :aggregate_failures do subject do file = fixture("responses", "whois.nic.asia/asia/property_status_multiple.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.nic.asia") + Whois::Parser.parser_for(part) end - describe "#status" do - it do - expect(subject.status).to eq(["clientDeleteProhibited https://icann.org/epp#clientDeleteProhibited", "clientTransferProhibited https://icann.org/epp#clientTransferProhibited"]) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(false) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(true) - end + it "matches property_status_multiple.expected" do + expect(subject.status).to eq(["clientDeleteProhibited https://icann.org/epp#clientDeleteProhibited", "clientTransferProhibited https://icann.org/epp#clientTransferProhibited"]) + expect(subject.available?).to eq(false) + expect(subject.registered?).to eq(true) end end diff --git a/spec/whois/parsers/responses/whois.nic.asia/asia/status_available_spec.rb b/spec/whois/parsers/responses/whois.nic.asia/asia/status_available_spec.rb index 9e712cef..925b393d 100644 --- a/spec/whois/parsers/responses/whois.nic.asia/asia/status_available_spec.rb +++ b/spec/whois/parsers/responses/whois.nic.asia/asia/status_available_spec.rb @@ -11,93 +11,34 @@ # require 'spec_helper' -require 'whois/parsers/whois.nic.asia.rb' -describe Whois::Parsers::WhoisNicAsia, "status_available.expected" do +describe "whois.nic.asia", :aggregate_failures do subject do file = fixture("responses", "whois.nic.asia/asia/status_available.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.nic.asia") + Whois::Parser.parser_for(part) end - describe "#disclaimer" do - it do - expect(subject.disclaimer).to eq("Access to WHOIS information is provided to assist persons in determining the contents of a domain name registration record in the registry database. The data in this record is provided by The Registry Operator for informational purposes only, and accuracy is not guaranteed. 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. Registry Operator reserves the right to modify these terms at any time. By submitting this query, you agree to abide by this policy. The Registrar of Record identified in this output may have an RDDS service that can be queried for additional information on how to contact the Registrant, Admin, or Tech contact of the queried domain name.") - end - end - describe "#domain" do - it do - expect(subject.domain).to eq(nil) - end - end - describe "#domain_id" do - it do - expect(subject.domain_id).to eq(nil) - end - end - describe "#status" do - it do - expect(subject.status).to eq([]) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(true) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(false) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to eq(nil) - end - end - describe "#updated_on" do - it do - expect(subject.updated_on).to eq(nil) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to eq(nil) - end - end - describe "#registrar" do - it do - expect(subject.registrar).to eq(nil) - end - end - describe "#registrant_contacts" do - it do - expect(subject.registrant_contacts).to be_a(Array) - expect(subject.registrant_contacts).to eq([]) - end - end - describe "#admin_contacts" do - it do - expect(subject.admin_contacts).to be_a(Array) - expect(subject.admin_contacts).to eq([]) - end - end - describe "#technical_contacts" do - it do - expect(subject.technical_contacts).to be_a(Array) - expect(subject.technical_contacts).to eq([]) - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers).to eq([]) - end - end - describe "#reserved?" do - it do - expect(subject.reserved?).to eq(false) - end + it "matches status_available.expected" do + expect(subject.disclaimer).to eq("Access to WHOIS information is provided to assist persons in determining the contents of a domain name registration record in the registry database. The data in this record is provided by The Registry Operator for informational purposes only, and accuracy is not guaranteed. 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. Registry Operator reserves the right to modify these terms at any time. By submitting this query, you agree to abide by this policy. The Registrar of Record identified in this output may have an RDDS service that can be queried for additional information on how to contact the Registrant, Admin, or Tech contact of the queried domain name.") + expect(subject.domain).to eq(nil) + expect(subject.domain_id).to eq(nil) + expect(subject.status).to eq([]) + expect(subject.available?).to eq(true) + expect(subject.registered?).to eq(false) + expect(subject.created_on).to eq(nil) + expect(subject.updated_on).to eq(nil) + expect(subject.expires_on).to eq(nil) + expect(subject.registrar).to eq(nil) + expect(subject.registrant_contacts).to be_a(Array) + expect(subject.registrant_contacts).to eq([]) + expect(subject.admin_contacts).to be_a(Array) + expect(subject.admin_contacts).to eq([]) + expect(subject.technical_contacts).to be_a(Array) + expect(subject.technical_contacts).to eq([]) + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers).to eq([]) + expect(subject.reserved?).to eq(false) end end diff --git a/spec/whois/parsers/responses/whois.nic.asia/asia/status_registered_spec.rb b/spec/whois/parsers/responses/whois.nic.asia/asia/status_registered_spec.rb index 0991455d..7c471ba3 100644 --- a/spec/whois/parsers/responses/whois.nic.asia/asia/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.nic.asia/asia/status_registered_spec.rb @@ -11,124 +11,65 @@ # require 'spec_helper' -require 'whois/parsers/whois.nic.asia.rb' -describe Whois::Parsers::WhoisNicAsia, "status_registered.expected" do +describe "whois.nic.asia", :aggregate_failures do subject do file = fixture("responses", "whois.nic.asia/asia/status_registered.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.nic.asia") + Whois::Parser.parser_for(part) end - describe "#disclaimer" do - it do - expect(subject.disclaimer).to eq("Access to WHOIS information is provided to assist persons in determining the contents of a domain name registration record in the registry database. The data in this record is provided by The Registry Operator for informational purposes only, and accuracy is not guaranteed. 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. Registry Operator reserves the right to modify these terms at any time. By submitting this query, you agree to abide by this policy. The Registrar of Record identified in this output may have an RDDS service that can be queried for additional information on how to contact the Registrant, Admin, or Tech contact of the queried domain name.") - end - end - describe "#domain" do - it do - expect(subject.domain).to eq("cj7.asia") - end - end - describe "#domain_id" do - it do - expect(subject.domain_id).to eq("D107700000000093126-AGRS") - end - end - describe "#status" do - it do - expect(subject.status).to eq(["ok https://icann.org/epp#ok"]) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(false) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(true) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to be_a(Time) - expect(subject.created_on).to eq(DateTime.parse("2008-01-15 11:28:02 UTC")) - end - end - describe "#updated_on" do - it do - expect(subject.updated_on).to be_a(Time) - expect(subject.updated_on).to eq(DateTime.parse("2020-01-15 22:20:23 UTC")) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to be_a(Time) - expect(subject.expires_on).to eq(DateTime.parse("2021-01-15 11:28:02 UTC")) - end - end - describe "#registrar" do - it do - expect(subject.registrar).to be_a(Whois::Parser::Registrar) - expect(subject.registrar.id).to eq("119") - expect(subject.registrar.name).to eq("DotAsia Organisation") - expect(subject.registrar.url).to eq("") - end - end - describe "#registrant_contacts" do - it do - expect(subject.registrant_contacts).to be_a(Array) - expect(subject.registrant_contacts.size).to eq(1) - expect(subject.registrant_contacts[0]).to be_a(Whois::Parser::Contact) - expect(subject.registrant_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_REGISTRANT) - expect(subject.registrant_contacts[0].id).to eq(nil) - expect(subject.registrant_contacts[0].name).to eq(nil) - expect(subject.registrant_contacts[0].organization).to eq("RAXCO ASSETS CORP.") - expect(subject.registrant_contacts[0].address).to eq(nil) - expect(subject.registrant_contacts[0].city).to eq(nil) - expect(subject.registrant_contacts[0].zip).to eq(nil) - expect(subject.registrant_contacts[0].state).to eq("") - expect(subject.registrant_contacts[0].country_code).to eq("HK") - expect(subject.registrant_contacts[0].phone).to eq(nil) - expect(subject.registrant_contacts[0].fax).to eq(nil) - expect(subject.registrant_contacts[0].email).to eq(nil) - end - end - describe "#admin_contacts" do - it do - expect(subject.admin_contacts).to be_a(Array) - expect(subject.admin_contacts.size).to eq(0) - end - end - describe "#technical_contacts" do - it do - expect(subject.technical_contacts).to be_a(Array) - expect(subject.technical_contacts.size).to eq(0) - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers.size).to eq(6) - expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[0].name).to eq("ns1.dnspod.net") - expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[1].name).to eq("ns2.dnspod.net") - expect(subject.nameservers[2]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[2].name).to eq("ns3.dnspod.net") - expect(subject.nameservers[3]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[3].name).to eq("ns4.dnspod.net") - expect(subject.nameservers[4]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[4].name).to eq("ns6.dnspod.net") - expect(subject.nameservers[5]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[5].name).to eq("ns5.dnspod.net") - end - end - describe "#reserved?" do - it do - expect(subject.reserved?).to eq(false) - end + it "matches status_registered.expected" do + expect(subject.disclaimer).to eq("Access to WHOIS information is provided to assist persons in determining the contents of a domain name registration record in the registry database. The data in this record is provided by The Registry Operator for informational purposes only, and accuracy is not guaranteed. 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. Registry Operator reserves the right to modify these terms at any time. By submitting this query, you agree to abide by this policy. The Registrar of Record identified in this output may have an RDDS service that can be queried for additional information on how to contact the Registrant, Admin, or Tech contact of the queried domain name.") + expect(subject.domain).to eq("cj7.asia") + expect(subject.domain_id).to eq("D107700000000093126-AGRS") + expect(subject.status).to eq(["ok https://icann.org/epp#ok"]) + expect(subject.available?).to eq(false) + expect(subject.registered?).to eq(true) + expect(subject.created_on).to be_a(Time) + expect(subject.created_on).to eq(DateTime.parse("2008-01-15 11:28:02 UTC")) + expect(subject.updated_on).to be_a(Time) + expect(subject.updated_on).to eq(DateTime.parse("2020-01-15 22:20:23 UTC")) + expect(subject.expires_on).to be_a(Time) + expect(subject.expires_on).to eq(DateTime.parse("2021-01-15 11:28:02 UTC")) + expect(subject.registrar).to be_a(Whois::Parser::Registrar) + expect(subject.registrar.id).to eq("119") + expect(subject.registrar.name).to eq("DotAsia Organisation") + expect(subject.registrar.url).to eq("") + expect(subject.registrant_contacts).to be_a(Array) + expect(subject.registrant_contacts.size).to eq(1) + expect(subject.registrant_contacts[0]).to be_a(Whois::Parser::Contact) + expect(subject.registrant_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_REGISTRANT) + expect(subject.registrant_contacts[0].id).to eq(nil) + expect(subject.registrant_contacts[0].name).to eq(nil) + expect(subject.registrant_contacts[0].organization).to eq("RAXCO ASSETS CORP.") + expect(subject.registrant_contacts[0].address).to eq(nil) + expect(subject.registrant_contacts[0].city).to eq(nil) + expect(subject.registrant_contacts[0].zip).to eq(nil) + expect(subject.registrant_contacts[0].state).to eq("") + expect(subject.registrant_contacts[0].country_code).to eq("HK") + expect(subject.registrant_contacts[0].phone).to eq(nil) + expect(subject.registrant_contacts[0].fax).to eq(nil) + expect(subject.registrant_contacts[0].email).to eq(nil) + expect(subject.admin_contacts).to be_a(Array) + expect(subject.admin_contacts.size).to eq(0) + expect(subject.technical_contacts).to be_a(Array) + expect(subject.technical_contacts.size).to eq(0) + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers.size).to eq(6) + expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[0].name).to eq("ns1.dnspod.net") + expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[1].name).to eq("ns2.dnspod.net") + expect(subject.nameservers[2]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[2].name).to eq("ns3.dnspod.net") + expect(subject.nameservers[3]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[3].name).to eq("ns4.dnspod.net") + expect(subject.nameservers[4]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[4].name).to eq("ns6.dnspod.net") + expect(subject.nameservers[5]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[5].name).to eq("ns5.dnspod.net") + expect(subject.reserved?).to eq(false) end end diff --git a/spec/whois/parsers/responses/whois.nic.asia/asia/status_reserved_spec.rb b/spec/whois/parsers/responses/whois.nic.asia/asia/status_reserved_spec.rb index cf3d9358..72b5e298 100644 --- a/spec/whois/parsers/responses/whois.nic.asia/asia/status_reserved_spec.rb +++ b/spec/whois/parsers/responses/whois.nic.asia/asia/status_reserved_spec.rb @@ -11,88 +11,33 @@ # require 'spec_helper' -require 'whois/parsers/whois.nic.asia.rb' -describe Whois::Parsers::WhoisNicAsia, "status_reserved.expected" do +describe "whois.nic.asia", :aggregate_failures do subject do file = fixture("responses", "whois.nic.asia/asia/status_reserved.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.nic.asia") + Whois::Parser.parser_for(part) end - describe "#disclaimer" do - it do - expect(subject.disclaimer).to eq("Access to WHOIS information is provided to assist persons in determining the contents of a domain name registration record in the registry database. The data in this record is provided by The Registry Operator for informational purposes only, and accuracy is not guaranteed. 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. Registry Operator reserves the right to modify these terms at any time. By submitting this query, you agree to abide by this policy. The Registrar of Record identified in this output may have an RDDS service that can be queried for additional information on how to contact the Registrant, Admin, or Tech contact of the queried domain name.") - end - end - describe "#domain" do - it do - expect(subject.domain).to eq(nil) - end - end - describe "#domain_id" do - it do - expect(subject.domain_id).to eq(nil) - end - end - describe "#status" do - it do - expect(subject.status).to eq(:reserved) - end - end - describe "#reserved?" do - it do - expect(subject.reserved?).to eq(true) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(false) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to eq(nil) - end - end - describe "#updated_on" do - it do - expect(subject.updated_on).to eq(nil) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to eq(nil) - end - end - describe "#registrar" do - it do - expect(subject.registrar).to eq(nil) - end - end - describe "#registrant_contacts" do - it do - expect(subject.registrant_contacts).to be_a(Array) - expect(subject.registrant_contacts).to eq([]) - end - end - describe "#admin_contacts" do - it do - expect(subject.admin_contacts).to be_a(Array) - expect(subject.admin_contacts).to eq([]) - end - end - describe "#technical_contacts" do - it do - expect(subject.technical_contacts).to be_a(Array) - expect(subject.technical_contacts).to eq([]) - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers).to eq([]) - end + it "matches status_reserved.expected" do + expect(subject.disclaimer).to eq("Access to WHOIS information is provided to assist persons in determining the contents of a domain name registration record in the registry database. The data in this record is provided by The Registry Operator for informational purposes only, and accuracy is not guaranteed. 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. Registry Operator reserves the right to modify these terms at any time. By submitting this query, you agree to abide by this policy. The Registrar of Record identified in this output may have an RDDS service that can be queried for additional information on how to contact the Registrant, Admin, or Tech contact of the queried domain name.") + expect(subject.domain).to eq(nil) + expect(subject.domain_id).to eq(nil) + expect(subject.status).to eq(:reserved) + expect(subject.reserved?).to eq(true) + expect(subject.available?).to eq(false) + expect(subject.created_on).to eq(nil) + expect(subject.updated_on).to eq(nil) + expect(subject.expires_on).to eq(nil) + expect(subject.registrar).to eq(nil) + expect(subject.registrant_contacts).to be_a(Array) + expect(subject.registrant_contacts).to eq([]) + expect(subject.admin_contacts).to be_a(Array) + expect(subject.admin_contacts).to eq([]) + expect(subject.technical_contacts).to be_a(Array) + expect(subject.technical_contacts).to eq([]) + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers).to eq([]) end end diff --git a/spec/whois/parsers/responses/whois.nic.at/at/status_available_spec.rb b/spec/whois/parsers/responses/whois.nic.at/at/status_available_spec.rb index 9c2f55aa..6f67e7af 100644 --- a/spec/whois/parsers/responses/whois.nic.at/at/status_available_spec.rb +++ b/spec/whois/parsers/responses/whois.nic.at/at/status_available_spec.rb @@ -11,50 +11,23 @@ # require 'spec_helper' -require 'whois/parsers/whois.nic.at.rb' -describe Whois::Parsers::WhoisNicAt, "status_available.expected" do +describe "whois.nic.at", :aggregate_failures do subject do file = fixture("responses", "whois.nic.at/at/status_available.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.nic.at") + Whois::Parser.parser_for(part) end - describe "#status" do - it do - expect(subject.status).to eq(:available) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(true) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(false) - end - end - describe "#created_on" do - it do - expect { subject.created_on }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#updated_on" do - it do - expect(subject.updated_on).to eq(nil) - end - end - describe "#expires_on" do - it do - expect { subject.expires_on }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers).to eq([]) - end + it "matches status_available.expected" do + expect(subject.status).to eq(:available) + expect(subject.available?).to eq(true) + expect(subject.registered?).to eq(false) + expect { subject.created_on }.to raise_error(Whois::AttributeNotSupported) + expect(subject.updated_on).to eq(nil) + expect { subject.expires_on }.to raise_error(Whois::AttributeNotSupported) + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers).to eq([]) end end diff --git a/spec/whois/parsers/responses/whois.nic.at/at/status_registered_spec.rb b/spec/whois/parsers/responses/whois.nic.at/at/status_registered_spec.rb index 9347b50e..b99f5fdc 100644 --- a/spec/whois/parsers/responses/whois.nic.at/at/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.nic.at/at/status_registered_spec.rb @@ -11,59 +11,32 @@ # require 'spec_helper' -require 'whois/parsers/whois.nic.at.rb' -describe Whois::Parsers::WhoisNicAt, "status_registered.expected" do +describe "whois.nic.at", :aggregate_failures do subject do file = fixture("responses", "whois.nic.at/at/status_registered.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.nic.at") + Whois::Parser.parser_for(part) end - describe "#status" do - it do - expect(subject.status).to eq(:registered) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(false) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(true) - end - end - describe "#created_on" do - it do - expect { subject.created_on }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#updated_on" do - it do - expect(subject.updated_on).to be_a(Time) - expect(subject.updated_on).to eq(DateTime.parse("2011-04-26 17:57:27")) - end - end - describe "#expires_on" do - it do - expect { subject.expires_on }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers.size).to eq(4) - expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[0].name).to eq("ns1.google.com") - expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[1].name).to eq("ns2.google.com") - expect(subject.nameservers[2]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[2].name).to eq("ns3.google.com") - expect(subject.nameservers[3]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[3].name).to eq("ns4.google.com") - end + it "matches status_registered.expected" do + expect(subject.status).to eq(:registered) + expect(subject.available?).to eq(false) + expect(subject.registered?).to eq(true) + expect { subject.created_on }.to raise_error(Whois::AttributeNotSupported) + expect(subject.updated_on).to be_a(Time) + expect(subject.updated_on).to eq(DateTime.parse("2011-04-26 17:57:27")) + expect { subject.expires_on }.to raise_error(Whois::AttributeNotSupported) + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers.size).to eq(4) + expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[0].name).to eq("ns1.google.com") + expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[1].name).to eq("ns2.google.com") + expect(subject.nameservers[2]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[2].name).to eq("ns3.google.com") + expect(subject.nameservers[3]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[3].name).to eq("ns4.google.com") end end diff --git a/spec/whois/parsers/responses/whois.nic.bike/bike/status_available_spec.rb b/spec/whois/parsers/responses/whois.nic.bike/bike/status_available_spec.rb new file mode 100644 index 00000000..b72642ed --- /dev/null +++ b/spec/whois/parsers/responses/whois.nic.bike/bike/status_available_spec.rb @@ -0,0 +1,42 @@ +# encoding: utf-8 + +# This file is autogenerated. Do not edit it manually. +# If you want change the content of this file, edit +# +# /spec/fixtures/responses/whois.nic.bike/bike/status_available.expected +# +# and regenerate the tests with the following rake task +# +# $ rake spec:generate +# + +require 'spec_helper' + +describe "whois.nic.bike", :aggregate_failures do + + subject do + file = fixture("responses", "whois.nic.bike/bike/status_available.txt") + part = Whois::Record::Part.new(body: File.read(file), host: "whois.nic.bike") + Whois::Parser.parser_for(part) + end + + it "matches status_available.expected" do + expect(subject.domain).to eq(nil) + expect(subject.domain_id).to eq(nil) + expect(subject.status).to eq(:available) + expect(subject.available?).to eq(true) + expect(subject.registered?).to eq(false) + expect(subject.created_on).to eq(nil) + expect(subject.updated_on).to eq(nil) + expect(subject.expires_on).to eq(nil) + expect(subject.registrar).to eq(nil) + expect(subject.registrant_contacts).to be_a(Array) + expect(subject.registrant_contacts).to eq([]) + expect(subject.admin_contacts).to be_a(Array) + expect(subject.admin_contacts).to eq([]) + expect(subject.technical_contacts).to be_a(Array) + expect(subject.technical_contacts).to eq([]) + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers).to eq([]) + end +end diff --git a/spec/whois/parsers/responses/whois.nic.bike/bike/status_registered_spec.rb b/spec/whois/parsers/responses/whois.nic.bike/bike/status_registered_spec.rb new file mode 100644 index 00000000..f66779ec --- /dev/null +++ b/spec/whois/parsers/responses/whois.nic.bike/bike/status_registered_spec.rb @@ -0,0 +1,91 @@ +# encoding: utf-8 + +# This file is autogenerated. Do not edit it manually. +# If you want change the content of this file, edit +# +# /spec/fixtures/responses/whois.nic.bike/bike/status_registered.expected +# +# and regenerate the tests with the following rake task +# +# $ rake spec:generate +# + +require 'spec_helper' + +describe "whois.nic.bike", :aggregate_failures do + + subject do + file = fixture("responses", "whois.nic.bike/bike/status_registered.txt") + part = Whois::Record::Part.new(body: File.read(file), host: "whois.nic.bike") + Whois::Parser.parser_for(part) + end + + it "matches status_registered.expected" do + expect(subject.domain).to eq("whereismy.bike") + expect(subject.domain_id).to eq("e25432d5c94440c4a8ca0e5ecbc13904-DONUTS") + expect(subject.status).to eq(:registered) + expect(subject.available?).to eq(false) + expect(subject.registered?).to eq(true) + expect(subject.created_on).to be_a(Time) + expect(subject.created_on).to eq(DateTime.parse("2016-02-26 16:49:10 UTC")) + expect(subject.updated_on).to be_a(Time) + expect(subject.updated_on).to eq(DateTime.parse("2021-04-12 16:49:14 UTC")) + expect(subject.expires_on).to be_a(Time) + expect(subject.expires_on).to eq(DateTime.parse("2022-02-26 16:49:10 UTC")) + expect(subject.registrar).to be_a(Whois::Parser::Registrar) + expect(subject.registrar.id).to eq("146") + expect(subject.registrar.name).to eq("GoDaddy.com, LLC") + expect(subject.registrar.url).to eq("http://www.godaddy.com/domains/search.aspx?ci=8990") + expect(subject.registrant_contacts).to be_a(Array) + expect(subject.registrant_contacts.size).to eq(1) + expect(subject.registrant_contacts[0]).to be_a(Whois::Parser::Contact) + expect(subject.registrant_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_REGISTRANT) + expect(subject.registrant_contacts[0].id).to eq("REDACTED FOR PRIVACY") + expect(subject.registrant_contacts[0].name).to eq("REDACTED FOR PRIVACY") + expect(subject.registrant_contacts[0].organization).to eq("") + expect(subject.registrant_contacts[0].address).to eq("REDACTED FOR PRIVACY") + expect(subject.registrant_contacts[0].city).to eq("REDACTED FOR PRIVACY") + expect(subject.registrant_contacts[0].zip).to eq("REDACTED FOR PRIVACY") + expect(subject.registrant_contacts[0].state).to eq("Croatia") + expect(subject.registrant_contacts[0].country_code).to eq("HR") + expect(subject.registrant_contacts[0].phone).to eq("REDACTED FOR PRIVACY ext: REDACTED FOR PRIVACY") + expect(subject.registrant_contacts[0].fax).to eq("REDACTED FOR PRIVACY ext: REDACTED FOR PRIVACY") + expect(subject.registrant_contacts[0].email).to eq("Please query the RDDS service of the Registrar of Record identified in this output for information on how to contact the Registrant, Admin, or Tech contact of the queried domain name.") + expect(subject.admin_contacts).to be_a(Array) + expect(subject.admin_contacts.size).to eq(1) + expect(subject.admin_contacts[0]).to be_a(Whois::Parser::Contact) + expect(subject.admin_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_ADMINISTRATIVE) + expect(subject.admin_contacts[0].id).to eq("REDACTED FOR PRIVACY") + expect(subject.admin_contacts[0].name).to eq("REDACTED FOR PRIVACY") + expect(subject.admin_contacts[0].organization).to eq("REDACTED FOR PRIVACY") + expect(subject.admin_contacts[0].address).to eq("REDACTED FOR PRIVACY") + expect(subject.admin_contacts[0].city).to eq("REDACTED FOR PRIVACY") + expect(subject.admin_contacts[0].zip).to eq("REDACTED FOR PRIVACY") + expect(subject.admin_contacts[0].state).to eq("REDACTED FOR PRIVACY") + expect(subject.admin_contacts[0].country_code).to eq("REDACTED FOR PRIVACY") + expect(subject.admin_contacts[0].phone).to eq("REDACTED FOR PRIVACY ext: REDACTED FOR PRIVACY") + expect(subject.admin_contacts[0].fax).to eq("REDACTED FOR PRIVACY ext: REDACTED FOR PRIVACY") + expect(subject.admin_contacts[0].email).to eq("Please query the RDDS service of the Registrar of Record identified in this output for information on how to contact the Registrant, Admin, or Tech contact of the queried domain name.") + expect(subject.technical_contacts).to be_a(Array) + expect(subject.technical_contacts.size).to eq(1) + expect(subject.technical_contacts[0]).to be_a(Whois::Parser::Contact) + expect(subject.technical_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_TECHNICAL) + expect(subject.technical_contacts[0].id).to eq("REDACTED FOR PRIVACY") + expect(subject.technical_contacts[0].name).to eq("REDACTED FOR PRIVACY") + expect(subject.technical_contacts[0].organization).to eq("REDACTED FOR PRIVACY") + expect(subject.technical_contacts[0].address).to eq("REDACTED FOR PRIVACY") + expect(subject.technical_contacts[0].city).to eq("REDACTED FOR PRIVACY") + expect(subject.technical_contacts[0].zip).to eq("REDACTED FOR PRIVACY") + expect(subject.technical_contacts[0].state).to eq("REDACTED FOR PRIVACY") + expect(subject.technical_contacts[0].country_code).to eq("REDACTED FOR PRIVACY") + expect(subject.technical_contacts[0].phone).to eq("REDACTED FOR PRIVACY ext: REDACTED FOR PRIVACY") + expect(subject.technical_contacts[0].fax).to eq("REDACTED FOR PRIVACY ext: REDACTED FOR PRIVACY") + expect(subject.technical_contacts[0].email).to eq("Please query the RDDS service of the Registrar of Record identified in this output for information on how to contact the Registrant, Admin, or Tech contact of the queried domain name.") + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers.size).to eq(2) + expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[0].name).to eq("ns67.domaincontrol.com") + expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[1].name).to eq("ns68.domaincontrol.com") + end +end diff --git a/spec/whois/parsers/responses/whois.nic.bj/bj/status_available_spec.rb b/spec/whois/parsers/responses/whois.nic.bj/bj/status_available_spec.rb index bafb5f34..cbf896ea 100644 --- a/spec/whois/parsers/responses/whois.nic.bj/bj/status_available_spec.rb +++ b/spec/whois/parsers/responses/whois.nic.bj/bj/status_available_spec.rb @@ -11,86 +11,31 @@ # require 'spec_helper' -require 'whois/parsers/whois.nic.bj.rb' -describe Whois::Parsers::WhoisNicBj, "status_available.expected" do +describe "whois.nic.bj", :aggregate_failures do subject do file = fixture("responses", "whois.nic.bj/bj/status_available.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.nic.bj") + Whois::Parser.parser_for(part) end - describe "#disclaimer" do - it do - expect { subject.disclaimer }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#domain" do - it do - expect(subject.domain).to eq(nil) - end - end - describe "#domain_id" do - it do - expect { subject.domain_id }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#status" do - it do - expect(subject.status).to eq(:available) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(true) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(false) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to eq(nil) - end - end - describe "#updated_on" do - it do - expect(subject.updated_on).to eq(nil) - end - end - describe "#expires_on" do - it do - expect { subject.expires_on }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#registrar" do - it do - expect { subject.registrar }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#registrant_contacts" do - it do - expect(subject.registrant_contacts).to be_a(Array) - expect(subject.registrant_contacts).to eq([]) - end - end - describe "#admin_contacts" do - it do - expect { subject.admin_contacts }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#technical_contacts" do - it do - expect { subject.technical_contacts }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers).to eq([]) - end + it "matches status_available.expected" do + expect { subject.disclaimer }.to raise_error(Whois::AttributeNotSupported) + expect(subject.domain).to eq(nil) + expect { subject.domain_id }.to raise_error(Whois::AttributeNotSupported) + expect(subject.status).to eq(:available) + expect(subject.available?).to eq(true) + expect(subject.registered?).to eq(false) + expect(subject.created_on).to eq(nil) + expect(subject.updated_on).to eq(nil) + expect { subject.expires_on }.to raise_error(Whois::AttributeNotSupported) + expect { subject.registrar }.to raise_error(Whois::AttributeNotSupported) + expect(subject.registrant_contacts).to be_a(Array) + expect(subject.registrant_contacts).to eq([]) + expect { subject.admin_contacts }.to raise_error(Whois::AttributeNotSupported) + expect { subject.technical_contacts }.to raise_error(Whois::AttributeNotSupported) + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers).to eq([]) end end diff --git a/spec/whois/parsers/responses/whois.nic.bj/bj/status_registered_spec.rb b/spec/whois/parsers/responses/whois.nic.bj/bj/status_registered_spec.rb index 031c7b7c..c71e8806 100644 --- a/spec/whois/parsers/responses/whois.nic.bj/bj/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.nic.bj/bj/status_registered_spec.rb @@ -11,107 +11,52 @@ # require 'spec_helper' -require 'whois/parsers/whois.nic.bj.rb' -describe Whois::Parsers::WhoisNicBj, "status_registered.expected" do +describe "whois.nic.bj", :aggregate_failures do subject do file = fixture("responses", "whois.nic.bj/bj/status_registered.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.nic.bj") + Whois::Parser.parser_for(part) end - describe "#disclaimer" do - it do - expect { subject.disclaimer }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#domain" do - it do - expect(subject.domain).to eq("google.bj") - end - end - describe "#domain_id" do - it do - expect { subject.domain_id }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#status" do - it do - expect(subject.status).to eq(:registered) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(false) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(true) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to be_a(Time) - expect(subject.created_on).to eq(DateTime.parse("2009-03-25 01:57:22 PDT")) - end - end - describe "#updated_on" do - it do - expect(subject.updated_on).to be_a(Time) - expect(subject.updated_on).to eq(DateTime.parse("2012-08-10 01:57:22 PDT")) - end - end - describe "#expires_on" do - it do - expect { subject.expires_on }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#registrar" do - it do - expect { subject.registrar }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#registrant_contacts" do - it do - expect(subject.registrant_contacts).to be_a(Array) - expect(subject.registrant_contacts.size).to eq(1) - expect(subject.registrant_contacts[0]).to be_a(Whois::Parser::Contact) - expect(subject.registrant_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_REGISTRANT) - expect(subject.registrant_contacts[0].id).to eq(nil) - expect(subject.registrant_contacts[0].name).to eq("GOOGLE INC (ED0155)") - expect(subject.registrant_contacts[0].organization).to eq(nil) - expect(subject.registrant_contacts[0].address).to eq(nil) - expect(subject.registrant_contacts[0].city).to eq(nil) - expect(subject.registrant_contacts[0].zip).to eq(nil) - expect(subject.registrant_contacts[0].state).to eq(nil) - expect(subject.registrant_contacts[0].country_code).to eq(nil) - expect(subject.registrant_contacts[0].phone).to eq(nil) - expect(subject.registrant_contacts[0].fax).to eq(nil) - expect(subject.registrant_contacts[0].email).to eq(nil) - end - end - describe "#admin_contacts" do - it do - expect { subject.admin_contacts }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#technical_contacts" do - it do - expect { subject.technical_contacts }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers.size).to eq(3) - expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[0].name).to eq("ns1.google.com") - expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[1].name).to eq("ns2.google.com") - expect(subject.nameservers[2]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[2].name).to eq("ns3.google.com") - end + it "matches status_registered.expected" do + expect { subject.disclaimer }.to raise_error(Whois::AttributeNotSupported) + expect(subject.domain).to eq("google.bj") + expect { subject.domain_id }.to raise_error(Whois::AttributeNotSupported) + expect(subject.status).to eq(:registered) + expect(subject.available?).to eq(false) + expect(subject.registered?).to eq(true) + expect(subject.created_on).to be_a(Time) + expect(subject.created_on).to eq(DateTime.parse("2009-03-25 01:57:22 PDT")) + expect(subject.updated_on).to be_a(Time) + expect(subject.updated_on).to eq(DateTime.parse("2012-08-10 01:57:22 PDT")) + expect { subject.expires_on }.to raise_error(Whois::AttributeNotSupported) + expect { subject.registrar }.to raise_error(Whois::AttributeNotSupported) + expect(subject.registrant_contacts).to be_a(Array) + expect(subject.registrant_contacts.size).to eq(1) + expect(subject.registrant_contacts[0]).to be_a(Whois::Parser::Contact) + expect(subject.registrant_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_REGISTRANT) + expect(subject.registrant_contacts[0].id).to eq(nil) + expect(subject.registrant_contacts[0].name).to eq("GOOGLE INC (ED0155)") + expect(subject.registrant_contacts[0].organization).to eq(nil) + expect(subject.registrant_contacts[0].address).to eq(nil) + expect(subject.registrant_contacts[0].city).to eq(nil) + expect(subject.registrant_contacts[0].zip).to eq(nil) + expect(subject.registrant_contacts[0].state).to eq(nil) + expect(subject.registrant_contacts[0].country_code).to eq(nil) + expect(subject.registrant_contacts[0].phone).to eq(nil) + expect(subject.registrant_contacts[0].fax).to eq(nil) + expect(subject.registrant_contacts[0].email).to eq(nil) + expect { subject.admin_contacts }.to raise_error(Whois::AttributeNotSupported) + expect { subject.technical_contacts }.to raise_error(Whois::AttributeNotSupported) + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers.size).to eq(3) + expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[0].name).to eq("ns1.google.com") + expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[1].name).to eq("ns2.google.com") + expect(subject.nameservers[2]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[2].name).to eq("ns3.google.com") end end diff --git a/spec/whois/parsers/responses/whois.nic.bo/bo/status_available_spec.rb b/spec/whois/parsers/responses/whois.nic.bo/bo/status_available_spec.rb index 838cb907..77ba3b27 100644 --- a/spec/whois/parsers/responses/whois.nic.bo/bo/status_available_spec.rb +++ b/spec/whois/parsers/responses/whois.nic.bo/bo/status_available_spec.rb @@ -11,59 +11,24 @@ # require 'spec_helper' -require 'whois/parsers/whois.nic.bo.rb' -describe Whois::Parsers::WhoisNicBo, "status_available.expected" do +describe "whois.nic.bo", :aggregate_failures do subject do file = fixture("responses", "whois.nic.bo/bo/status_available.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.nic.bo") + Whois::Parser.parser_for(part) end - describe "#domain" do - it do - expect(subject.domain).to eq(nil) - end - end - describe "#domain_id" do - it do - expect { subject.domain_id }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#status" do - it do - expect(subject.status).to eq(:available) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(true) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(false) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to eq(nil) - end - end - describe "#updated_on" do - it do - expect { subject.updated_on }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to eq(nil) - end - end - describe "#nameservers" do - it do - expect { subject.nameservers }.to raise_error(Whois::AttributeNotSupported) - end + it "matches status_available.expected" do + expect(subject.domain).to eq(nil) + expect { subject.domain_id }.to raise_error(Whois::AttributeNotSupported) + expect(subject.status).to eq(:available) + expect(subject.available?).to eq(true) + expect(subject.registered?).to eq(false) + expect(subject.created_on).to eq(nil) + expect { subject.updated_on }.to raise_error(Whois::AttributeNotSupported) + expect(subject.expires_on).to eq(nil) + expect { subject.nameservers }.to raise_error(Whois::AttributeNotSupported) end end diff --git a/spec/whois/parsers/responses/whois.nic.bo/bo/status_registered_spec.rb b/spec/whois/parsers/responses/whois.nic.bo/bo/status_registered_spec.rb index b25915e7..9ab02d64 100644 --- a/spec/whois/parsers/responses/whois.nic.bo/bo/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.nic.bo/bo/status_registered_spec.rb @@ -11,61 +11,26 @@ # require 'spec_helper' -require 'whois/parsers/whois.nic.bo.rb' -describe Whois::Parsers::WhoisNicBo, "status_registered.expected" do +describe "whois.nic.bo", :aggregate_failures do subject do file = fixture("responses", "whois.nic.bo/bo/status_registered.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.nic.bo") + Whois::Parser.parser_for(part) end - describe "#domain" do - it do - expect(subject.domain).to eq("google.bo") - end - end - describe "#domain_id" do - it do - expect { subject.domain_id }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#status" do - it do - expect(subject.status).to eq(:registered) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(false) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(true) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to be_a(Time) - expect(subject.created_on).to eq(DateTime.parse("2006-08-22")) - end - end - describe "#updated_on" do - it do - expect { subject.updated_on }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to be_a(Time) - expect(subject.expires_on).to eq(DateTime.parse("2014-08-22")) - end - end - describe "#nameservers" do - it do - expect { subject.nameservers }.to raise_error(Whois::AttributeNotSupported) - end + it "matches status_registered.expected" do + expect(subject.domain).to eq("google.bo") + expect { subject.domain_id }.to raise_error(Whois::AttributeNotSupported) + expect(subject.status).to eq(:registered) + expect(subject.available?).to eq(false) + expect(subject.registered?).to eq(true) + expect(subject.created_on).to be_a(Time) + expect(subject.created_on).to eq(DateTime.parse("2006-08-22")) + expect { subject.updated_on }.to raise_error(Whois::AttributeNotSupported) + expect(subject.expires_on).to be_a(Time) + expect(subject.expires_on).to eq(DateTime.parse("2014-08-22")) + expect { subject.nameservers }.to raise_error(Whois::AttributeNotSupported) end end diff --git a/spec/whois/parsers/responses/whois.nic.cd/cd/status_available_spec.rb b/spec/whois/parsers/responses/whois.nic.cd/cd/status_available_spec.rb index 85112878..c1969e18 100644 --- a/spec/whois/parsers/responses/whois.nic.cd/cd/status_available_spec.rb +++ b/spec/whois/parsers/responses/whois.nic.cd/cd/status_available_spec.rb @@ -11,65 +11,26 @@ # require 'spec_helper' -require 'whois/parsers/whois.nic.cd.rb' -describe Whois::Parsers::WhoisNicCd, "status_available.expected" do +describe "whois.nic.cd", :aggregate_failures do subject do file = fixture("responses", "whois.nic.cd/cd/status_available.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.nic.cd") + Whois::Parser.parser_for(part) end - describe "#domain" do - it do - expect(subject.domain).to eq("u34jedzcq.cd") - end - end - describe "#domain_id" do - it do - expect(subject.domain_id).to eq(nil) - end - end - describe "#status" do - it do - expect(subject.status).to eq(:available) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(true) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(false) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to eq(nil) - end - end - describe "#updated_on" do - it do - expect(subject.updated_on).to eq(nil) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to eq(nil) - end - end - describe "#registrar" do - it do - expect(subject.registrar).to eq(nil) - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers).to eq([]) - end + it "matches status_available.expected" do + expect(subject.domain).to eq("u34jedzcq.cd") + expect(subject.domain_id).to eq(nil) + expect(subject.status).to eq(:available) + expect(subject.available?).to eq(true) + expect(subject.registered?).to eq(false) + expect(subject.created_on).to eq(nil) + expect(subject.updated_on).to eq(nil) + expect(subject.expires_on).to eq(nil) + expect(subject.registrar).to eq(nil) + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers).to eq([]) end end diff --git a/spec/whois/parsers/responses/whois.nic.cd/cd/status_registered_spec.rb b/spec/whois/parsers/responses/whois.nic.cd/cd/status_registered_spec.rb index e680ca33..1692e2e8 100644 --- a/spec/whois/parsers/responses/whois.nic.cd/cd/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.nic.cd/cd/status_registered_spec.rb @@ -11,68 +11,29 @@ # require 'spec_helper' -require 'whois/parsers/whois.nic.cd.rb' -describe Whois::Parsers::WhoisNicCd, "status_registered.expected" do +describe "whois.nic.cd", :aggregate_failures do subject do file = fixture("responses", "whois.nic.cd/cd/status_registered.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.nic.cd") + Whois::Parser.parser_for(part) end - describe "#domain" do - it do - expect(subject.domain).to eq("google.cd") - end - end - describe "#domain_id" do - it do - expect(subject.domain_id).to eq("5758-CD") - end - end - describe "#status" do - it do - expect(subject.status).to eq(:registered) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(false) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(true) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to eq(nil) - end - end - describe "#updated_on" do - it do - expect(subject.updated_on).to eq(nil) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to eq(nil) - end - end - describe "#registrar" do - it do - expect(subject.registrar).to be_a(Whois::Parser::Registrar) - expect(subject.registrar.id).to eq(nil) - expect(subject.registrar.name).to eq("MARKMONITOR") - expect(subject.registrar.url).to eq(nil) - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers.size).to eq(0) - end + it "matches status_registered.expected" do + expect(subject.domain).to eq("google.cd") + expect(subject.domain_id).to eq("5758-CD") + expect(subject.status).to eq(:registered) + expect(subject.available?).to eq(false) + expect(subject.registered?).to eq(true) + expect(subject.created_on).to eq(nil) + expect(subject.updated_on).to eq(nil) + expect(subject.expires_on).to eq(nil) + expect(subject.registrar).to be_a(Whois::Parser::Registrar) + expect(subject.registrar.id).to eq(nil) + expect(subject.registrar.name).to eq("MARKMONITOR") + expect(subject.registrar.url).to eq(nil) + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers.size).to eq(0) end end diff --git a/spec/whois/parsers/responses/whois.nic.ch/ch/property_contacts_spec.rb b/spec/whois/parsers/responses/whois.nic.ch/ch/property_contacts_spec.rb index 89ecac6d..3323875c 100644 --- a/spec/whois/parsers/responses/whois.nic.ch/ch/property_contacts_spec.rb +++ b/spec/whois/parsers/responses/whois.nic.ch/ch/property_contacts_spec.rb @@ -11,37 +11,26 @@ # require 'spec_helper' -require 'whois/parsers/whois.nic.ch.rb' -describe Whois::Parsers::WhoisNicCh, "property_contacts.expected" do +describe "whois.nic.ch", :aggregate_failures do subject do file = fixture("responses", "whois.nic.ch/ch/property_contacts.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.nic.ch") + Whois::Parser.parser_for(part) end - describe "#registrant_contacts" do - it do - expect(subject.registrant_contacts).to be_a(Array) - expect(subject.registrant_contacts.size).to eq(1) - expect(subject.registrant_contacts[0]).to be_a(Whois::Parser::Contact) - expect(subject.registrant_contacts[0].name).to eq("EISD John") - expect(subject.registrant_contacts[0].address).to eq("Room 208, Furong Road, Changsha City\nCN-41000 Changsha\nChina") - end - end - describe "#technical_contacts" do - it do - expect(subject.technical_contacts).to be_a(Array) - expect(subject.technical_contacts.size).to eq(1) - expect(subject.technical_contacts[0]).to be_a(Whois::Parser::Contact) - expect(subject.technical_contacts[0].name).to eq("xie huijie") - expect(subject.technical_contacts[0].address).to eq("xie huijie\nNo95.Lane768.Ruili Road.Minhang District\nCN-200240 shanghai\nChina") - end - end - describe "#admin_contacts" do - it do - expect { subject.admin_contacts }.to raise_error(Whois::AttributeNotSupported) - end + it "matches property_contacts.expected" do + expect(subject.registrant_contacts).to be_a(Array) + expect(subject.registrant_contacts.size).to eq(1) + expect(subject.registrant_contacts[0]).to be_a(Whois::Parser::Contact) + expect(subject.registrant_contacts[0].name).to eq("EISD John") + expect(subject.registrant_contacts[0].address).to eq("Room 208, Furong Road, Changsha City\nCN-41000 Changsha\nChina") + expect(subject.technical_contacts).to be_a(Array) + expect(subject.technical_contacts.size).to eq(1) + expect(subject.technical_contacts[0]).to be_a(Whois::Parser::Contact) + expect(subject.technical_contacts[0].name).to eq("xie huijie") + expect(subject.technical_contacts[0].address).to eq("xie huijie\nNo95.Lane768.Ruili Road.Minhang District\nCN-200240 shanghai\nChina") + expect { subject.admin_contacts }.to raise_error(Whois::AttributeNotSupported) end end diff --git a/spec/whois/parsers/responses/whois.nic.ch/ch/property_nameservers_with_ip_spec.rb b/spec/whois/parsers/responses/whois.nic.ch/ch/property_nameservers_with_ip_spec.rb index df71f91f..a85af4d3 100644 --- a/spec/whois/parsers/responses/whois.nic.ch/ch/property_nameservers_with_ip_spec.rb +++ b/spec/whois/parsers/responses/whois.nic.ch/ch/property_nameservers_with_ip_spec.rb @@ -11,28 +11,25 @@ # require 'spec_helper' -require 'whois/parsers/whois.nic.ch.rb' -describe Whois::Parsers::WhoisNicCh, "property_nameservers_with_ip.expected" do +describe "whois.nic.ch", :aggregate_failures do subject do file = fixture("responses", "whois.nic.ch/ch/property_nameservers_with_ip.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.nic.ch") + Whois::Parser.parser_for(part) end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers.size).to eq(2) - expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[0].name).to eq("ns1.citrin.ch") - expect(subject.nameservers[0].ipv4).to eq("193.247.72.8") - expect(subject.nameservers[0].ipv6).to eq("2001:8a8:21:5::11") - expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[1].name).to eq("ns2.citrin.ch") - expect(subject.nameservers[1].ipv4).to eq("62.12.149.3") - expect(subject.nameservers[1].ipv6).to eq("2001:8a8:21:5::12") - end + it "matches property_nameservers_with_ip.expected" do + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers.size).to eq(2) + expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[0].name).to eq("ns1.citrin.ch") + expect(subject.nameservers[0].ipv4).to eq("193.247.72.8") + expect(subject.nameservers[0].ipv6).to eq("2001:8a8:21:5::11") + expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[1].name).to eq("ns2.citrin.ch") + expect(subject.nameservers[1].ipv4).to eq("62.12.149.3") + expect(subject.nameservers[1].ipv6).to eq("2001:8a8:21:5::12") end end diff --git a/spec/whois/parsers/responses/whois.nic.ch/ch/status_available_spec.rb b/spec/whois/parsers/responses/whois.nic.ch/ch/status_available_spec.rb index 7bb67d82..b57c72e8 100644 --- a/spec/whois/parsers/responses/whois.nic.ch/ch/status_available_spec.rb +++ b/spec/whois/parsers/responses/whois.nic.ch/ch/status_available_spec.rb @@ -11,67 +11,28 @@ # require 'spec_helper' -require 'whois/parsers/whois.nic.ch.rb' -describe Whois::Parsers::WhoisNicCh, "status_available.expected" do +describe "whois.nic.ch", :aggregate_failures do subject do file = fixture("responses", "whois.nic.ch/ch/status_available.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.nic.ch") + Whois::Parser.parser_for(part) end - describe "#status" do - it do - expect(subject.status).to eq(:available) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(true) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(false) - end - end - describe "#created_on" do - it do - expect { subject.created_on }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#updated_on" do - it do - expect { subject.updated_on }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#expires_on" do - it do - expect { subject.expires_on }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#registrant_contacts" do - it do - expect(subject.registrant_contacts).to be_a(Array) - expect(subject.registrant_contacts).to eq([]) - end - end - describe "#admin_contacts" do - it do - expect { subject.admin_contacts }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#technical_contacts" do - it do - expect(subject.technical_contacts).to be_a(Array) - expect(subject.technical_contacts).to eq([]) - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers).to eq([]) - end + it "matches status_available.expected" do + expect(subject.status).to eq(:available) + expect(subject.available?).to eq(true) + expect(subject.registered?).to eq(false) + expect { subject.created_on }.to raise_error(Whois::AttributeNotSupported) + expect { subject.updated_on }.to raise_error(Whois::AttributeNotSupported) + expect { subject.expires_on }.to raise_error(Whois::AttributeNotSupported) + expect(subject.registrant_contacts).to be_a(Array) + expect(subject.registrant_contacts).to eq([]) + expect { subject.admin_contacts }.to raise_error(Whois::AttributeNotSupported) + expect(subject.technical_contacts).to be_a(Array) + expect(subject.technical_contacts).to eq([]) + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers).to eq([]) end end diff --git a/spec/whois/parsers/responses/whois.nic.ch/ch/status_registered_spec.rb b/spec/whois/parsers/responses/whois.nic.ch/ch/status_registered_spec.rb index c325a1ee..fee65acd 100644 --- a/spec/whois/parsers/responses/whois.nic.ch/ch/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.nic.ch/ch/status_registered_spec.rb @@ -11,81 +11,42 @@ # require 'spec_helper' -require 'whois/parsers/whois.nic.ch.rb' -describe Whois::Parsers::WhoisNicCh, "status_registered.expected" do +describe "whois.nic.ch", :aggregate_failures do subject do file = fixture("responses", "whois.nic.ch/ch/status_registered.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.nic.ch") + Whois::Parser.parser_for(part) end - describe "#status" do - it do - expect(subject.status).to eq(:registered) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(false) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(true) - end - end - describe "#created_on" do - it do - expect { subject.created_on }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#updated_on" do - it do - expect { subject.updated_on }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#expires_on" do - it do - expect { subject.expires_on }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#registrant_contacts" do - it do - expect(subject.registrant_contacts).to be_a(Array) - expect(subject.registrant_contacts.size).to eq(1) - expect(subject.registrant_contacts[0]).to be_a(Whois::Parser::Contact) - expect(subject.registrant_contacts[0].name).to eq("Google Inc.") - expect(subject.registrant_contacts[0].address).to eq("Administrator Domain\nAmphitheatre Parkway 1600\nUS-94043 Mountain View, CA\nUnited States") - end - end - describe "#admin_contacts" do - it do - expect { subject.admin_contacts }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#technical_contacts" do - it do - expect(subject.technical_contacts).to be_a(Array) - expect(subject.technical_contacts.size).to eq(1) - expect(subject.technical_contacts[0]).to be_a(Whois::Parser::Contact) - expect(subject.technical_contacts[0].name).to eq("Google Inc.") - expect(subject.technical_contacts[0].address).to eq("DNS Admin\n2400 E. Bayshore Pkwy\nUS-94043 Mountain View\nUnited States") - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers.size).to eq(4) - expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[0].name).to eq("ns1.google.com") - expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[1].name).to eq("ns2.google.com") - expect(subject.nameservers[2]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[2].name).to eq("ns3.google.com") - expect(subject.nameservers[3]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[3].name).to eq("ns4.google.com") - end + it "matches status_registered.expected" do + expect(subject.status).to eq(:registered) + expect(subject.available?).to eq(false) + expect(subject.registered?).to eq(true) + expect { subject.created_on }.to raise_error(Whois::AttributeNotSupported) + expect { subject.updated_on }.to raise_error(Whois::AttributeNotSupported) + expect { subject.expires_on }.to raise_error(Whois::AttributeNotSupported) + expect(subject.registrant_contacts).to be_a(Array) + expect(subject.registrant_contacts.size).to eq(1) + expect(subject.registrant_contacts[0]).to be_a(Whois::Parser::Contact) + expect(subject.registrant_contacts[0].name).to eq("Google Inc.") + expect(subject.registrant_contacts[0].address).to eq("Administrator Domain\nAmphitheatre Parkway 1600\nUS-94043 Mountain View, CA\nUnited States") + expect { subject.admin_contacts }.to raise_error(Whois::AttributeNotSupported) + expect(subject.technical_contacts).to be_a(Array) + expect(subject.technical_contacts.size).to eq(1) + expect(subject.technical_contacts[0]).to be_a(Whois::Parser::Contact) + expect(subject.technical_contacts[0].name).to eq("Google Inc.") + expect(subject.technical_contacts[0].address).to eq("DNS Admin\n2400 E. Bayshore Pkwy\nUS-94043 Mountain View\nUnited States") + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers.size).to eq(4) + expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[0].name).to eq("ns1.google.com") + expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[1].name).to eq("ns2.google.com") + expect(subject.nameservers[2]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[2].name).to eq("ns3.google.com") + expect(subject.nameservers[3]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[3].name).to eq("ns4.google.com") end end diff --git a/spec/whois/parsers/responses/whois.nic.ci/ci/status_available_spec.rb b/spec/whois/parsers/responses/whois.nic.ci/ci/status_available_spec.rb index f022b3aa..2b188ce8 100644 --- a/spec/whois/parsers/responses/whois.nic.ci/ci/status_available_spec.rb +++ b/spec/whois/parsers/responses/whois.nic.ci/ci/status_available_spec.rb @@ -11,50 +11,23 @@ # require 'spec_helper' -require 'whois/parsers/whois.nic.ci.rb' -describe Whois::Parsers::WhoisNicCi, "status_available.expected" do +describe "whois.nic.ci", :aggregate_failures do subject do file = fixture("responses", "whois.nic.ci/ci/status_available.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.nic.ci") + Whois::Parser.parser_for(part) end - describe "#status" do - it do - expect(subject.status).to eq(:available) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(true) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(false) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to eq(nil) - end - end - describe "#updated_on" do - it do - expect { subject.updated_on }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to eq(nil) - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers).to eq([]) - end + it "matches status_available.expected" do + expect(subject.status).to eq(:available) + expect(subject.available?).to eq(true) + expect(subject.registered?).to eq(false) + expect(subject.created_on).to eq(nil) + expect { subject.updated_on }.to raise_error(Whois::AttributeNotSupported) + expect(subject.expires_on).to eq(nil) + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers).to eq([]) end end diff --git a/spec/whois/parsers/responses/whois.nic.ci/ci/status_registered_spec.rb b/spec/whois/parsers/responses/whois.nic.ci/ci/status_registered_spec.rb index d7dada4c..d5e987b0 100644 --- a/spec/whois/parsers/responses/whois.nic.ci/ci/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.nic.ci/ci/status_registered_spec.rb @@ -11,60 +11,33 @@ # require 'spec_helper' -require 'whois/parsers/whois.nic.ci.rb' -describe Whois::Parsers::WhoisNicCi, "status_registered.expected" do +describe "whois.nic.ci", :aggregate_failures do subject do file = fixture("responses", "whois.nic.ci/ci/status_registered.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.nic.ci") + Whois::Parser.parser_for(part) end - describe "#status" do - it do - expect(subject.status).to eq(:registered) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(false) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(true) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to be_a(Time) - expect(subject.created_on).to eq(DateTime.parse("2006-01-27 11:14:47")) - end - end - describe "#updated_on" do - it do - expect { subject.updated_on }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to be_a(Time) - expect(subject.expires_on).to eq(DateTime.parse("2014-02-14 11:14:47")) - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers.size).to eq(4) - expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[0].name).to eq("ns1.google.com") - expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[1].name).to eq("ns2.google.com") - expect(subject.nameservers[2]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[2].name).to eq("ns3.google.com") - expect(subject.nameservers[3]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[3].name).to eq("ns4.google.com") - end + it "matches status_registered.expected" do + expect(subject.status).to eq(:registered) + expect(subject.available?).to eq(false) + expect(subject.registered?).to eq(true) + expect(subject.created_on).to be_a(Time) + expect(subject.created_on).to eq(DateTime.parse("2006-01-27 11:14:47")) + expect { subject.updated_on }.to raise_error(Whois::AttributeNotSupported) + expect(subject.expires_on).to be_a(Time) + expect(subject.expires_on).to eq(DateTime.parse("2014-02-14 11:14:47")) + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers.size).to eq(4) + expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[0].name).to eq("ns1.google.com") + expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[1].name).to eq("ns2.google.com") + expect(subject.nameservers[2]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[2].name).to eq("ns3.google.com") + expect(subject.nameservers[3]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[3].name).to eq("ns4.google.com") end end diff --git a/spec/whois/parsers/responses/whois.nic.cl/cl/status_available_spec.rb b/spec/whois/parsers/responses/whois.nic.cl/cl/status_available_spec.rb index 6a72e76d..7bf81fe4 100644 --- a/spec/whois/parsers/responses/whois.nic.cl/cl/status_available_spec.rb +++ b/spec/whois/parsers/responses/whois.nic.cl/cl/status_available_spec.rb @@ -11,45 +11,22 @@ # require 'spec_helper' -require 'whois/parsers/whois.nic.cl.rb' -describe Whois::Parsers::WhoisNicCl, "status_available.expected" do +describe "whois.nic.cl", :aggregate_failures do subject do file = fixture("responses", "whois.nic.cl/cl/status_available.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.nic.cl") + Whois::Parser.parser_for(part) end - describe "#status" do - it do - expect(subject.status).to eq(:available) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(true) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(false) - end - end - describe "#created_on" do - it do - expect { subject.created_on }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#expires_on" do - it do - expect { subject.expires_on }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers).to eq([]) - end + it "matches status_available.expected" do + expect(subject.status).to eq(:available) + expect(subject.available?).to eq(true) + expect(subject.registered?).to eq(false) + expect { subject.created_on }.to raise_error(Whois::AttributeNotSupported) + expect { subject.expires_on }.to raise_error(Whois::AttributeNotSupported) + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers).to eq([]) end end diff --git a/spec/whois/parsers/responses/whois.nic.cl/cl/status_registered_spec.rb b/spec/whois/parsers/responses/whois.nic.cl/cl/status_registered_spec.rb index 3b3214fd..dc2467ba 100644 --- a/spec/whois/parsers/responses/whois.nic.cl/cl/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.nic.cl/cl/status_registered_spec.rb @@ -11,57 +11,34 @@ # require 'spec_helper' -require 'whois/parsers/whois.nic.cl.rb' -describe Whois::Parsers::WhoisNicCl, "status_registered.expected" do +describe "whois.nic.cl", :aggregate_failures do subject do file = fixture("responses", "whois.nic.cl/cl/status_registered.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.nic.cl") + Whois::Parser.parser_for(part) end - describe "#status" do - it do - expect(subject.status).to eq(:registered) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(false) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(true) - end - end - describe "#created_on" do - it do - expect { subject.created_on }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#expires_on" do - it do - expect { subject.expires_on }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers.size).to eq(4) - expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[0].name).to eq("ns3.google.com") - expect(subject.nameservers[0].ipv4).to eq("216.239.36.10") - expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[1].name).to eq("ns4.google.com") - expect(subject.nameservers[1].ipv4).to eq("216.239.38.10") - expect(subject.nameservers[2]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[2].name).to eq("ns1.google.com") - expect(subject.nameservers[2].ipv4).to eq("216.239.32.10") - expect(subject.nameservers[3]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[3].name).to eq("ns2.google.com") - expect(subject.nameservers[3].ipv4).to eq("216.239.34.10") - end + it "matches status_registered.expected" do + expect(subject.status).to eq(:registered) + expect(subject.available?).to eq(false) + expect(subject.registered?).to eq(true) + expect { subject.created_on }.to raise_error(Whois::AttributeNotSupported) + expect { subject.expires_on }.to raise_error(Whois::AttributeNotSupported) + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers.size).to eq(4) + expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[0].name).to eq("ns3.google.com") + expect(subject.nameservers[0].ipv4).to eq("216.239.36.10") + expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[1].name).to eq("ns4.google.com") + expect(subject.nameservers[1].ipv4).to eq("216.239.38.10") + expect(subject.nameservers[2]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[2].name).to eq("ns1.google.com") + expect(subject.nameservers[2].ipv4).to eq("216.239.32.10") + expect(subject.nameservers[3]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[3].name).to eq("ns2.google.com") + expect(subject.nameservers[3].ipv4).to eq("216.239.34.10") end end diff --git a/spec/whois/parsers/responses/whois.nic.cloud/cloud/status_available_spec.rb b/spec/whois/parsers/responses/whois.nic.cloud/cloud/status_available_spec.rb index 1bfe126f..46351d38 100644 --- a/spec/whois/parsers/responses/whois.nic.cloud/cloud/status_available_spec.rb +++ b/spec/whois/parsers/responses/whois.nic.cloud/cloud/status_available_spec.rb @@ -11,83 +11,32 @@ # require 'spec_helper' -require 'whois/parsers/whois.nic.cloud.rb' -describe Whois::Parsers::WhoisNicCloud, "status_available.expected" do +describe "whois.nic.cloud", :aggregate_failures do subject do file = fixture("responses", "whois.nic.cloud/cloud/status_available.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.nic.cloud") + Whois::Parser.parser_for(part) end - describe "#domain" do - it do - expect(subject.domain).to eq(nil) - end - end - describe "#domain_id" do - it do - expect(subject.domain_id).to eq(nil) - end - end - describe "#status" do - it do - expect(subject.status).to eq(:available) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(true) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(false) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to eq(nil) - end - end - describe "#updated_on" do - it do - expect(subject.updated_on).to eq(nil) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to eq(nil) - end - end - describe "#registrar" do - it do - expect(subject.registrar).to eq(nil) - end - end - describe "#registrant_contacts" do - it do - expect(subject.registrant_contacts).to be_a(Array) - expect(subject.registrant_contacts).to eq([]) - end - end - describe "#admin_contacts" do - it do - expect(subject.admin_contacts).to be_a(Array) - expect(subject.admin_contacts).to eq([]) - end - end - describe "#technical_contacts" do - it do - expect(subject.technical_contacts).to be_a(Array) - expect(subject.technical_contacts).to eq([]) - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers).to eq([]) - end + it "matches status_available.expected" do + expect(subject.domain).to eq(nil) + expect(subject.domain_id).to eq(nil) + expect(subject.status).to eq(:available) + expect(subject.available?).to eq(true) + expect(subject.registered?).to eq(false) + expect(subject.created_on).to eq(nil) + expect(subject.updated_on).to eq(nil) + expect(subject.expires_on).to eq(nil) + expect(subject.registrar).to eq(nil) + expect(subject.registrant_contacts).to be_a(Array) + expect(subject.registrant_contacts).to eq([]) + expect(subject.admin_contacts).to be_a(Array) + expect(subject.admin_contacts).to eq([]) + expect(subject.technical_contacts).to be_a(Array) + expect(subject.technical_contacts).to eq([]) + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers).to eq([]) end end diff --git a/spec/whois/parsers/responses/whois.nic.cloud/cloud/status_registered_spec.rb b/spec/whois/parsers/responses/whois.nic.cloud/cloud/status_registered_spec.rb index b7f2c7f5..fbe8bc50 100644 --- a/spec/whois/parsers/responses/whois.nic.cloud/cloud/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.nic.cloud/cloud/status_registered_spec.rb @@ -11,136 +11,85 @@ # require 'spec_helper' -require 'whois/parsers/whois.nic.cloud.rb' -describe Whois::Parsers::WhoisNicCloud, "status_registered.expected" do +describe "whois.nic.cloud", :aggregate_failures do subject do file = fixture("responses", "whois.nic.cloud/cloud/status_registered.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.nic.cloud") + Whois::Parser.parser_for(part) end - describe "#domain" do - it do - expect(subject.domain).to eq("google.cloud") - end - end - describe "#domain_id" do - it do - expect(subject.domain_id).to eq("DDDAA72F4F319486082E1B91922F2483D-ARI") - end - end - describe "#status" do - it do - expect(subject.status).to eq(:registered) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(false) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(true) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to be_a(Time) - expect(subject.created_on).to eq(DateTime.parse("2016-01-27 01:19:35 GMT")) - end - end - describe "#updated_on" do - it do - expect(subject.updated_on).to be_a(Time) - expect(subject.updated_on).to eq(DateTime.parse("2020-12-31 10:38:20 GMT")) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to be_a(Time) - expect(subject.expires_on).to eq(DateTime.parse("2022-01-27 01:19:35 GMT")) - end - end - describe "#registrar" do - it do - expect(subject.registrar).to be_a(Whois::Parser::Registrar) - expect(subject.registrar.id).to eq("292") - expect(subject.registrar.name).to eq("MarkMonitor, Inc.") - expect(subject.registrar.url).to eq("www.markmonitor.com") - end - end - describe "#registrant_contacts" do - it do - expect(subject.registrant_contacts).to be_a(Array) - expect(subject.registrant_contacts.size).to eq(1) - expect(subject.registrant_contacts[0]).to be_a(Whois::Parser::Contact) - expect(subject.registrant_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_REGISTRANT) - expect(subject.registrant_contacts[0].id).to eq("REDACTED FOR PRIVACY") - expect(subject.registrant_contacts[0].name).to eq("REDACTED FOR PRIVACY") - expect(subject.registrant_contacts[0].organization).to eq("Google LLC") - expect(subject.registrant_contacts[0].address).to eq("REDACTED FOR PRIVACY, REDACTED FOR PRIVACY, REDACTED FOR PRIVACY") - expect(subject.registrant_contacts[0].city).to eq("REDACTED FOR PRIVACY") - expect(subject.registrant_contacts[0].zip).to eq("REDACTED FOR PRIVACY") - expect(subject.registrant_contacts[0].state).to eq("CA") - expect(subject.registrant_contacts[0].country_code).to eq("US") - expect(subject.registrant_contacts[0].phone).to eq("REDACTED FOR PRIVACY ext: REDACTED FOR PRIVACY") - expect(subject.registrant_contacts[0].fax).to eq("REDACTED FOR PRIVACY ext: REDACTED FOR PRIVACY") - expect(subject.registrant_contacts[0].email).to eq("Please query the RDDS service of the Registrar of Record identified in this output for information on how to contact the Registrant, Admin, or Tech contact of the queried domain name.") - end - end - describe "#admin_contacts" do - it do - expect(subject.admin_contacts).to be_a(Array) - expect(subject.admin_contacts.size).to eq(1) - expect(subject.admin_contacts[0]).to be_a(Whois::Parser::Contact) - expect(subject.admin_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_ADMINISTRATIVE) - expect(subject.admin_contacts[0].id).to eq("REDACTED FOR PRIVACY") - expect(subject.admin_contacts[0].name).to eq("REDACTED FOR PRIVACY") - expect(subject.admin_contacts[0].organization).to eq("REDACTED FOR PRIVACY") - expect(subject.admin_contacts[0].address).to eq("REDACTED FOR PRIVACY, REDACTED FOR PRIVACY, REDACTED FOR PRIVACY") - expect(subject.admin_contacts[0].city).to eq("REDACTED FOR PRIVACY") - expect(subject.admin_contacts[0].zip).to eq("REDACTED FOR PRIVACY") - expect(subject.admin_contacts[0].state).to eq("REDACTED FOR PRIVACY") - expect(subject.admin_contacts[0].country_code).to eq("REDACTED FOR PRIVACY") - expect(subject.admin_contacts[0].phone).to eq("REDACTED FOR PRIVACY ext: REDACTED FOR PRIVACY") - expect(subject.admin_contacts[0].fax).to eq("REDACTED FOR PRIVACY ext: REDACTED FOR PRIVACY") - expect(subject.admin_contacts[0].email).to eq("Please query the RDDS service of the Registrar of Record identified in this output for information on how to contact the Registrant, Admin, or Tech contact of the queried domain name.") - end - end - describe "#technical_contacts" do - it do - expect(subject.technical_contacts).to be_a(Array) - expect(subject.technical_contacts.size).to eq(1) - expect(subject.technical_contacts[0]).to be_a(Whois::Parser::Contact) - expect(subject.technical_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_TECHNICAL) - expect(subject.technical_contacts[0].id).to eq("REDACTED FOR PRIVACY") - expect(subject.technical_contacts[0].name).to eq("REDACTED FOR PRIVACY") - expect(subject.technical_contacts[0].organization).to eq("REDACTED FOR PRIVACY") - expect(subject.technical_contacts[0].address).to eq("REDACTED FOR PRIVACY, REDACTED FOR PRIVACY, REDACTED FOR PRIVACY") - expect(subject.technical_contacts[0].city).to eq("REDACTED FOR PRIVACY") - expect(subject.technical_contacts[0].zip).to eq("REDACTED FOR PRIVACY") - expect(subject.technical_contacts[0].state).to eq("REDACTED FOR PRIVACY") - expect(subject.technical_contacts[0].country_code).to eq("REDACTED FOR PRIVACY") - expect(subject.technical_contacts[0].phone).to eq("REDACTED FOR PRIVACY ext: REDACTED FOR PRIVACY") - expect(subject.technical_contacts[0].fax).to eq("REDACTED FOR PRIVACY ext: REDACTED FOR PRIVACY") - expect(subject.technical_contacts[0].email).to eq("Please query the RDDS service of the Registrar of Record identified in this output for information on how to contact the Registrant, Admin, or Tech contact of the queried domain name.") - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers.size).to eq(4) - expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[0].name).to eq("ns1.google.com") - expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[1].name).to eq("ns2.google.com") - expect(subject.nameservers[2]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[2].name).to eq("ns3.google.com") - expect(subject.nameservers[3]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[3].name).to eq("ns4.google.com") - end + it "matches status_registered.expected" do + expect(subject.domain).to eq("google.cloud") + expect(subject.domain_id).to eq("DDDAA72F4F319486082E1B91922F2483D-ARI") + expect(subject.status).to eq(:registered) + expect(subject.available?).to eq(false) + expect(subject.registered?).to eq(true) + expect(subject.created_on).to be_a(Time) + expect(subject.created_on).to eq(DateTime.parse("2016-01-27 01:19:35 GMT")) + expect(subject.updated_on).to be_a(Time) + expect(subject.updated_on).to eq(DateTime.parse("2020-12-31 10:38:20 GMT")) + expect(subject.expires_on).to be_a(Time) + expect(subject.expires_on).to eq(DateTime.parse("2022-01-27 01:19:35 GMT")) + expect(subject.registrar).to be_a(Whois::Parser::Registrar) + expect(subject.registrar.id).to eq("292") + expect(subject.registrar.name).to eq("MarkMonitor, Inc.") + expect(subject.registrar.url).to eq("www.markmonitor.com") + expect(subject.registrant_contacts).to be_a(Array) + expect(subject.registrant_contacts.size).to eq(1) + expect(subject.registrant_contacts[0]).to be_a(Whois::Parser::Contact) + expect(subject.registrant_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_REGISTRANT) + expect(subject.registrant_contacts[0].id).to eq("REDACTED FOR PRIVACY") + expect(subject.registrant_contacts[0].name).to eq("REDACTED FOR PRIVACY") + expect(subject.registrant_contacts[0].organization).to eq("Google LLC") + expect(subject.registrant_contacts[0].address).to eq("REDACTED FOR PRIVACY, REDACTED FOR PRIVACY, REDACTED FOR PRIVACY") + expect(subject.registrant_contacts[0].city).to eq("REDACTED FOR PRIVACY") + expect(subject.registrant_contacts[0].zip).to eq("REDACTED FOR PRIVACY") + expect(subject.registrant_contacts[0].state).to eq("CA") + expect(subject.registrant_contacts[0].country_code).to eq("US") + expect(subject.registrant_contacts[0].phone).to eq("REDACTED FOR PRIVACY ext: REDACTED FOR PRIVACY") + expect(subject.registrant_contacts[0].fax).to eq("REDACTED FOR PRIVACY ext: REDACTED FOR PRIVACY") + expect(subject.registrant_contacts[0].email).to eq("Please query the RDDS service of the Registrar of Record identified in this output for information on how to contact the Registrant, Admin, or Tech contact of the queried domain name.") + expect(subject.admin_contacts).to be_a(Array) + expect(subject.admin_contacts.size).to eq(1) + expect(subject.admin_contacts[0]).to be_a(Whois::Parser::Contact) + expect(subject.admin_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_ADMINISTRATIVE) + expect(subject.admin_contacts[0].id).to eq("REDACTED FOR PRIVACY") + expect(subject.admin_contacts[0].name).to eq("REDACTED FOR PRIVACY") + expect(subject.admin_contacts[0].organization).to eq("REDACTED FOR PRIVACY") + expect(subject.admin_contacts[0].address).to eq("REDACTED FOR PRIVACY, REDACTED FOR PRIVACY, REDACTED FOR PRIVACY") + expect(subject.admin_contacts[0].city).to eq("REDACTED FOR PRIVACY") + expect(subject.admin_contacts[0].zip).to eq("REDACTED FOR PRIVACY") + expect(subject.admin_contacts[0].state).to eq("REDACTED FOR PRIVACY") + expect(subject.admin_contacts[0].country_code).to eq("REDACTED FOR PRIVACY") + expect(subject.admin_contacts[0].phone).to eq("REDACTED FOR PRIVACY ext: REDACTED FOR PRIVACY") + expect(subject.admin_contacts[0].fax).to eq("REDACTED FOR PRIVACY ext: REDACTED FOR PRIVACY") + expect(subject.admin_contacts[0].email).to eq("Please query the RDDS service of the Registrar of Record identified in this output for information on how to contact the Registrant, Admin, or Tech contact of the queried domain name.") + expect(subject.technical_contacts).to be_a(Array) + expect(subject.technical_contacts.size).to eq(1) + expect(subject.technical_contacts[0]).to be_a(Whois::Parser::Contact) + expect(subject.technical_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_TECHNICAL) + expect(subject.technical_contacts[0].id).to eq("REDACTED FOR PRIVACY") + expect(subject.technical_contacts[0].name).to eq("REDACTED FOR PRIVACY") + expect(subject.technical_contacts[0].organization).to eq("REDACTED FOR PRIVACY") + expect(subject.technical_contacts[0].address).to eq("REDACTED FOR PRIVACY, REDACTED FOR PRIVACY, REDACTED FOR PRIVACY") + expect(subject.technical_contacts[0].city).to eq("REDACTED FOR PRIVACY") + expect(subject.technical_contacts[0].zip).to eq("REDACTED FOR PRIVACY") + expect(subject.technical_contacts[0].state).to eq("REDACTED FOR PRIVACY") + expect(subject.technical_contacts[0].country_code).to eq("REDACTED FOR PRIVACY") + expect(subject.technical_contacts[0].phone).to eq("REDACTED FOR PRIVACY ext: REDACTED FOR PRIVACY") + expect(subject.technical_contacts[0].fax).to eq("REDACTED FOR PRIVACY ext: REDACTED FOR PRIVACY") + expect(subject.technical_contacts[0].email).to eq("Please query the RDDS service of the Registrar of Record identified in this output for information on how to contact the Registrant, Admin, or Tech contact of the queried domain name.") + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers.size).to eq(4) + expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[0].name).to eq("ns1.google.com") + expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[1].name).to eq("ns2.google.com") + expect(subject.nameservers[2]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[2].name).to eq("ns3.google.com") + expect(subject.nameservers[3]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[3].name).to eq("ns4.google.com") end end diff --git a/spec/whois/parsers/responses/whois.nic.co/co/status_available_spec.rb b/spec/whois/parsers/responses/whois.nic.co/co/status_available_spec.rb index 2e81d1a4..6e824b60 100644 --- a/spec/whois/parsers/responses/whois.nic.co/co/status_available_spec.rb +++ b/spec/whois/parsers/responses/whois.nic.co/co/status_available_spec.rb @@ -11,83 +11,32 @@ # require 'spec_helper' -require 'whois/parsers/whois.nic.co.rb' -describe Whois::Parsers::WhoisNicCo, "status_available.expected" do +describe "whois.nic.co", :aggregate_failures do subject do file = fixture("responses", "whois.nic.co/co/status_available.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.nic.co") + Whois::Parser.parser_for(part) end - describe "#domain" do - it do - expect(subject.domain).to eq(nil) - end - end - describe "#domain_id" do - it do - expect(subject.domain_id).to eq(nil) - end - end - describe "#status" do - it do - expect(subject.status).to eq(:available) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(true) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(false) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to eq(nil) - end - end - describe "#updated_on" do - it do - expect(subject.updated_on).to eq(nil) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to eq(nil) - end - end - describe "#registrar" do - it do - expect(subject.registrar).to eq(nil) - end - end - describe "#registrant_contacts" do - it do - expect(subject.registrant_contacts).to be_a(Array) - expect(subject.registrant_contacts).to eq([]) - end - end - describe "#admin_contacts" do - it do - expect(subject.admin_contacts).to be_a(Array) - expect(subject.admin_contacts).to eq([]) - end - end - describe "#technical_contacts" do - it do - expect(subject.technical_contacts).to be_a(Array) - expect(subject.technical_contacts).to eq([]) - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers).to eq([]) - end + it "matches status_available.expected" do + expect(subject.domain).to eq(nil) + expect(subject.domain_id).to eq(nil) + expect(subject.status).to eq(:available) + expect(subject.available?).to eq(true) + expect(subject.registered?).to eq(false) + expect(subject.created_on).to eq(nil) + expect(subject.updated_on).to eq(nil) + expect(subject.expires_on).to eq(nil) + expect(subject.registrar).to eq(nil) + expect(subject.registrant_contacts).to be_a(Array) + expect(subject.registrant_contacts).to eq([]) + expect(subject.admin_contacts).to be_a(Array) + expect(subject.admin_contacts).to eq([]) + expect(subject.technical_contacts).to be_a(Array) + expect(subject.technical_contacts).to eq([]) + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers).to eq([]) end end diff --git a/spec/whois/parsers/responses/whois.nic.co/co/status_registered_spec.rb b/spec/whois/parsers/responses/whois.nic.co/co/status_registered_spec.rb index bced7e70..40d56af1 100644 --- a/spec/whois/parsers/responses/whois.nic.co/co/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.nic.co/co/status_registered_spec.rb @@ -11,143 +11,92 @@ # require 'spec_helper' -require 'whois/parsers/whois.nic.co.rb' -describe Whois::Parsers::WhoisNicCo, "status_registered.expected" do +describe "whois.nic.co", :aggregate_failures do subject do file = fixture("responses", "whois.nic.co/co/status_registered.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.nic.co") + Whois::Parser.parser_for(part) end - describe "#domain" do - it do - expect(subject.domain).to eq("t.co") - end - end - describe "#domain_id" do - it do - expect(subject.domain_id).to eq("D740225-CO") - end - end - describe "#status" do - it do - expect(subject.status).to eq(:registered) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(false) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(true) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to be_a(Time) - expect(subject.created_on).to eq(DateTime.parse("2010-04-26 07:50:40 GMT")) - end - end - describe "#updated_on" do - it do - expect(subject.updated_on).to be_a(Time) - expect(subject.updated_on).to eq(DateTime.parse("2021-04-26 05:09:40 GMT")) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to be_a(Time) - expect(subject.expires_on).to eq(DateTime.parse("2022-04-25 23:59:59 GMT")) - end - end - describe "#registrar" do - it do - expect(subject.registrar).to be_a(Whois::Parser::Registrar) - expect(subject.registrar.id).to eq("299") - expect(subject.registrar.name).to eq("CSC Corporate Domains, Inc.") - end - end - describe "#registrant_contacts" do - it do - expect(subject.registrant_contacts).to be_a(Array) - expect(subject.registrant_contacts.size).to eq(1) - expect(subject.registrant_contacts[0]).to be_a(Whois::Parser::Contact) - expect(subject.registrant_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_REGISTRANT) - expect(subject.registrant_contacts[0].id).to eq("REDACTED FOR PRIVACY") - expect(subject.registrant_contacts[0].name).to eq("REDACTED FOR PRIVACY") - expect(subject.registrant_contacts[0].organization).to eq("Twitter, Inc.") - expect(subject.registrant_contacts[0].address).to eq("REDACTED FOR PRIVACY, REDACTED FOR PRIVACY, REDACTED FOR PRIVACY") - expect(subject.registrant_contacts[0].city).to eq("REDACTED FOR PRIVACY") - expect(subject.registrant_contacts[0].zip).to eq("REDACTED FOR PRIVACY") - expect(subject.registrant_contacts[0].state).to eq("CA") - expect(subject.registrant_contacts[0].country_code).to eq("US") - expect(subject.registrant_contacts[0].phone).to eq("REDACTED FOR PRIVACY ext: REDACTED FOR PRIVACY") - expect(subject.registrant_contacts[0].fax).to eq("REDACTED FOR PRIVACY ext: REDACTED FOR PRIVACY") - expect(subject.registrant_contacts[0].email).to eq("Please query the RDDS service of the Registrar of Record identified in this output for information on how to contact the Registrant, Admin, or Tech contact of the queried domain name.") - end - end - describe "#admin_contacts" do - it do - expect(subject.admin_contacts).to be_a(Array) - expect(subject.admin_contacts.size).to eq(1) - expect(subject.admin_contacts[0]).to be_a(Whois::Parser::Contact) - expect(subject.admin_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_ADMINISTRATIVE) - expect(subject.admin_contacts[0].id).to eq("REDACTED FOR PRIVACY") - expect(subject.admin_contacts[0].name).to eq("REDACTED FOR PRIVACY") - expect(subject.admin_contacts[0].organization).to eq("REDACTED FOR PRIVACY") - expect(subject.admin_contacts[0].address).to eq("REDACTED FOR PRIVACY, REDACTED FOR PRIVACY, REDACTED FOR PRIVACY") - expect(subject.admin_contacts[0].city).to eq("REDACTED FOR PRIVACY") - expect(subject.admin_contacts[0].zip).to eq("REDACTED FOR PRIVACY") - expect(subject.admin_contacts[0].state).to eq("REDACTED FOR PRIVACY") - expect(subject.admin_contacts[0].country_code).to eq("REDACTED FOR PRIVACY") - expect(subject.admin_contacts[0].phone).to eq("REDACTED FOR PRIVACY ext: REDACTED FOR PRIVACY") - expect(subject.admin_contacts[0].fax).to eq("REDACTED FOR PRIVACY ext: REDACTED FOR PRIVACY") - expect(subject.admin_contacts[0].email).to eq("Please query the RDDS service of the Registrar of Record identified in this output for information on how to contact the Registrant, Admin, or Tech contact of the queried domain name.") - end - end - describe "#technical_contacts" do - it do - expect(subject.technical_contacts).to be_a(Array) - expect(subject.technical_contacts.size).to eq(1) - expect(subject.technical_contacts[0]).to be_a(Whois::Parser::Contact) - expect(subject.technical_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_TECHNICAL) - expect(subject.technical_contacts[0].id).to eq("REDACTED FOR PRIVACY") - expect(subject.technical_contacts[0].name).to eq("REDACTED FOR PRIVACY") - expect(subject.technical_contacts[0].organization).to eq("REDACTED FOR PRIVACY") - expect(subject.technical_contacts[0].address).to eq("REDACTED FOR PRIVACY, REDACTED FOR PRIVACY, REDACTED FOR PRIVACY") - expect(subject.technical_contacts[0].city).to eq("REDACTED FOR PRIVACY") - expect(subject.technical_contacts[0].zip).to eq("REDACTED FOR PRIVACY") - expect(subject.technical_contacts[0].state).to eq("REDACTED FOR PRIVACY") - expect(subject.technical_contacts[0].country_code).to eq("REDACTED FOR PRIVACY") - expect(subject.technical_contacts[0].phone).to eq("REDACTED FOR PRIVACY ext: REDACTED FOR PRIVACY") - expect(subject.technical_contacts[0].fax).to eq("REDACTED FOR PRIVACY ext: REDACTED FOR PRIVACY") - expect(subject.technical_contacts[0].email).to eq("Please query the RDDS service of the Registrar of Record identified in this output for information on how to contact the Registrant, Admin, or Tech contact of the queried domain name.") - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers.size).to eq(8) - expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[0].name).to eq("ns3.p34.dynect.net") - expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[1].name).to eq("ns4.p34.dynect.net") - expect(subject.nameservers[2]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[2].name).to eq("d01-01.ns.twtrdns.net") - expect(subject.nameservers[3]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[3].name).to eq("d01-02.ns.twtrdns.net") - expect(subject.nameservers[4]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[4].name).to eq("a.r06.twtrdns.net") - expect(subject.nameservers[5]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[5].name).to eq("b.r06.twtrdns.net") - expect(subject.nameservers[6]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[6].name).to eq("c.r06.twtrdns.net") - expect(subject.nameservers[7]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[7].name).to eq("d.r06.twtrdns.net") - end + it "matches status_registered.expected" do + expect(subject.domain).to eq("t.co") + expect(subject.domain_id).to eq("D740225-CO") + expect(subject.status).to eq(:registered) + expect(subject.available?).to eq(false) + expect(subject.registered?).to eq(true) + expect(subject.created_on).to be_a(Time) + expect(subject.created_on).to eq(DateTime.parse("2010-04-26 07:50:40 GMT")) + expect(subject.updated_on).to be_a(Time) + expect(subject.updated_on).to eq(DateTime.parse("2021-04-26 05:09:40 GMT")) + expect(subject.expires_on).to be_a(Time) + expect(subject.expires_on).to eq(DateTime.parse("2022-04-25 23:59:59 GMT")) + expect(subject.registrar).to be_a(Whois::Parser::Registrar) + expect(subject.registrar.id).to eq("299") + expect(subject.registrar.name).to eq("CSC Corporate Domains, Inc.") + expect(subject.registrant_contacts).to be_a(Array) + expect(subject.registrant_contacts.size).to eq(1) + expect(subject.registrant_contacts[0]).to be_a(Whois::Parser::Contact) + expect(subject.registrant_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_REGISTRANT) + expect(subject.registrant_contacts[0].id).to eq("REDACTED FOR PRIVACY") + expect(subject.registrant_contacts[0].name).to eq("REDACTED FOR PRIVACY") + expect(subject.registrant_contacts[0].organization).to eq("Twitter, Inc.") + expect(subject.registrant_contacts[0].address).to eq("REDACTED FOR PRIVACY, REDACTED FOR PRIVACY, REDACTED FOR PRIVACY") + expect(subject.registrant_contacts[0].city).to eq("REDACTED FOR PRIVACY") + expect(subject.registrant_contacts[0].zip).to eq("REDACTED FOR PRIVACY") + expect(subject.registrant_contacts[0].state).to eq("CA") + expect(subject.registrant_contacts[0].country_code).to eq("US") + expect(subject.registrant_contacts[0].phone).to eq("REDACTED FOR PRIVACY ext: REDACTED FOR PRIVACY") + expect(subject.registrant_contacts[0].fax).to eq("REDACTED FOR PRIVACY ext: REDACTED FOR PRIVACY") + expect(subject.registrant_contacts[0].email).to eq("Please query the RDDS service of the Registrar of Record identified in this output for information on how to contact the Registrant, Admin, or Tech contact of the queried domain name.") + expect(subject.admin_contacts).to be_a(Array) + expect(subject.admin_contacts.size).to eq(1) + expect(subject.admin_contacts[0]).to be_a(Whois::Parser::Contact) + expect(subject.admin_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_ADMINISTRATIVE) + expect(subject.admin_contacts[0].id).to eq("REDACTED FOR PRIVACY") + expect(subject.admin_contacts[0].name).to eq("REDACTED FOR PRIVACY") + expect(subject.admin_contacts[0].organization).to eq("REDACTED FOR PRIVACY") + expect(subject.admin_contacts[0].address).to eq("REDACTED FOR PRIVACY, REDACTED FOR PRIVACY, REDACTED FOR PRIVACY") + expect(subject.admin_contacts[0].city).to eq("REDACTED FOR PRIVACY") + expect(subject.admin_contacts[0].zip).to eq("REDACTED FOR PRIVACY") + expect(subject.admin_contacts[0].state).to eq("REDACTED FOR PRIVACY") + expect(subject.admin_contacts[0].country_code).to eq("REDACTED FOR PRIVACY") + expect(subject.admin_contacts[0].phone).to eq("REDACTED FOR PRIVACY ext: REDACTED FOR PRIVACY") + expect(subject.admin_contacts[0].fax).to eq("REDACTED FOR PRIVACY ext: REDACTED FOR PRIVACY") + expect(subject.admin_contacts[0].email).to eq("Please query the RDDS service of the Registrar of Record identified in this output for information on how to contact the Registrant, Admin, or Tech contact of the queried domain name.") + expect(subject.technical_contacts).to be_a(Array) + expect(subject.technical_contacts.size).to eq(1) + expect(subject.technical_contacts[0]).to be_a(Whois::Parser::Contact) + expect(subject.technical_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_TECHNICAL) + expect(subject.technical_contacts[0].id).to eq("REDACTED FOR PRIVACY") + expect(subject.technical_contacts[0].name).to eq("REDACTED FOR PRIVACY") + expect(subject.technical_contacts[0].organization).to eq("REDACTED FOR PRIVACY") + expect(subject.technical_contacts[0].address).to eq("REDACTED FOR PRIVACY, REDACTED FOR PRIVACY, REDACTED FOR PRIVACY") + expect(subject.technical_contacts[0].city).to eq("REDACTED FOR PRIVACY") + expect(subject.technical_contacts[0].zip).to eq("REDACTED FOR PRIVACY") + expect(subject.technical_contacts[0].state).to eq("REDACTED FOR PRIVACY") + expect(subject.technical_contacts[0].country_code).to eq("REDACTED FOR PRIVACY") + expect(subject.technical_contacts[0].phone).to eq("REDACTED FOR PRIVACY ext: REDACTED FOR PRIVACY") + expect(subject.technical_contacts[0].fax).to eq("REDACTED FOR PRIVACY ext: REDACTED FOR PRIVACY") + expect(subject.technical_contacts[0].email).to eq("Please query the RDDS service of the Registrar of Record identified in this output for information on how to contact the Registrant, Admin, or Tech contact of the queried domain name.") + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers.size).to eq(8) + expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[0].name).to eq("ns3.p34.dynect.net") + expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[1].name).to eq("ns4.p34.dynect.net") + expect(subject.nameservers[2]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[2].name).to eq("d01-01.ns.twtrdns.net") + expect(subject.nameservers[3]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[3].name).to eq("d01-02.ns.twtrdns.net") + expect(subject.nameservers[4]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[4].name).to eq("a.r06.twtrdns.net") + expect(subject.nameservers[5]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[5].name).to eq("b.r06.twtrdns.net") + expect(subject.nameservers[6]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[6].name).to eq("c.r06.twtrdns.net") + expect(subject.nameservers[7]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[7].name).to eq("d.r06.twtrdns.net") end end diff --git a/spec/whois/parsers/responses/whois.nic.college/college/status_available_spec.rb b/spec/whois/parsers/responses/whois.nic.college/college/status_available_spec.rb index 46de1a44..6f6ec1e4 100644 --- a/spec/whois/parsers/responses/whois.nic.college/college/status_available_spec.rb +++ b/spec/whois/parsers/responses/whois.nic.college/college/status_available_spec.rb @@ -11,88 +11,33 @@ # require 'spec_helper' -require 'whois/parsers/whois.nic.college.rb' -describe Whois::Parsers::WhoisNicCollege, "status_available.expected" do +describe "whois.nic.college", :aggregate_failures do subject do file = fixture("responses", "whois.nic.college/college/status_available.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.nic.college") + Whois::Parser.parser_for(part) end - describe "#disclaimer" do - it do - expect(subject.disclaimer).to eq(nil) - end - end - describe "#domain" do - it do - expect(subject.domain).to eq(nil) - end - end - describe "#domain_id" do - it do - expect(subject.domain_id).to eq(nil) - end - end - describe "#status" do - it do - expect(subject.status).to eq([]) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(true) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(false) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to eq(nil) - end - end - describe "#updated_on" do - it do - expect(subject.updated_on).to eq(nil) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to eq(nil) - end - end - describe "#registrar" do - it do - expect(subject.registrar).to eq(nil) - end - end - describe "#registrant_contacts" do - it do - expect(subject.registrant_contacts).to be_a(Array) - expect(subject.registrant_contacts).to eq([]) - end - end - describe "#admin_contacts" do - it do - expect(subject.admin_contacts).to be_a(Array) - expect(subject.admin_contacts).to eq([]) - end - end - describe "#technical_contacts" do - it do - expect(subject.technical_contacts).to be_a(Array) - expect(subject.technical_contacts).to eq([]) - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers).to eq([]) - end + it "matches status_available.expected" do + expect(subject.disclaimer).to eq(nil) + expect(subject.domain).to eq(nil) + expect(subject.domain_id).to eq(nil) + expect(subject.status).to eq([]) + expect(subject.available?).to eq(true) + expect(subject.registered?).to eq(false) + expect(subject.created_on).to eq(nil) + expect(subject.updated_on).to eq(nil) + expect(subject.expires_on).to eq(nil) + expect(subject.registrar).to eq(nil) + expect(subject.registrant_contacts).to be_a(Array) + expect(subject.registrant_contacts).to eq([]) + expect(subject.admin_contacts).to be_a(Array) + expect(subject.admin_contacts).to eq([]) + expect(subject.technical_contacts).to be_a(Array) + expect(subject.technical_contacts).to eq([]) + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers).to eq([]) end end diff --git a/spec/whois/parsers/responses/whois.nic.college/college/status_registered_spec.rb b/spec/whois/parsers/responses/whois.nic.college/college/status_registered_spec.rb index f2f82ee8..62f235da 100644 --- a/spec/whois/parsers/responses/whois.nic.college/college/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.nic.college/college/status_registered_spec.rb @@ -11,160 +11,105 @@ # require 'spec_helper' -require 'whois/parsers/whois.nic.college.rb' -describe Whois::Parsers::WhoisNicCollege, "status_registered.expected" do +describe "whois.nic.college", :aggregate_failures do subject do file = fixture("responses", "whois.nic.college/college/status_registered.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.nic.college") + Whois::Parser.parser_for(part) end - describe "#disclaimer" do - it do - expect(subject.disclaimer).to eq("Access to the whois service is rate limited. For more information, please see https://registrar-console.centralnic.com/pub/whois_guidance.") - end - end - describe "#domain" do - it do - expect(subject.domain).to eq("nic.college") - end - end - describe "#domain_id" do - it do - expect(subject.domain_id).to eq("D1465621-CNIC") - end - end - describe "#status" do - it do - expect(subject.status).to eq(["serverTransferProhibited", "serverUpdateProhibited", "serverDeleteProhibited", "serverRenewProhibited"]) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(false) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(true) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to be_a(Time) - expect(subject.created_on).to eq(DateTime.parse("2013-09-11 00:00:00 UTC")) - end - end - describe "#updated_on" do - it do - expect(subject.updated_on).to be_a(Time) - expect(subject.updated_on).to eq(DateTime.parse("2014-09-12 00:15:47 UTC")) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to be_a(Time) - expect(subject.expires_on).to eq(DateTime.parse("2015-09-11 23:59:59 UTC")) - end - end - describe "#registrar" do - it do - expect(subject.registrar).to be_a(Whois::Parser::Registrar) - expect(subject.registrar.id).to eq("9999") - expect(subject.registrar.name).to eq("CentralNic Ltd") - expect(subject.registrar.url).to eq(nil) - end - end - describe "#registrant_contacts" do - it do - expect(subject.registrant_contacts).to be_a(Array) - expect(subject.registrant_contacts.size).to eq(1) - expect(subject.registrant_contacts[0]).to be_a(Whois::Parser::Contact) - expect(subject.registrant_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_REGISTRANT) - expect(subject.registrant_contacts[0].id).to eq("H5178905") - expect(subject.registrant_contacts[0].name).to eq("Domain Administrator") - expect(subject.registrant_contacts[0].organization).to eq("XYZ.COM LLC") - expect(subject.registrant_contacts[0].address).to eq("2121 E Tropicana Ave Suite #2") - expect(subject.registrant_contacts[0].city).to eq("Las Vegas") - expect(subject.registrant_contacts[0].zip).to eq("89119") - expect(subject.registrant_contacts[0].state).to eq("NV") - expect(subject.registrant_contacts[0].country).to eq(nil) - expect(subject.registrant_contacts[0].country_code).to eq("US") - expect(subject.registrant_contacts[0].phone).to eq("+1.8009998422") - expect(subject.registrant_contacts[0].fax).to eq("+1.7023578299") - expect(subject.registrant_contacts[0].email).to eq("icann@xyz.com") - end - end - describe "#admin_contacts" do - it do - expect(subject.admin_contacts).to be_a(Array) - expect(subject.admin_contacts.size).to eq(1) - expect(subject.admin_contacts[0]).to be_a(Whois::Parser::Contact) - expect(subject.admin_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_ADMINISTRATIVE) - expect(subject.admin_contacts[0].id).to eq("H5178905") - expect(subject.admin_contacts[0].name).to eq("Domain Administrator") - expect(subject.admin_contacts[0].organization).to eq("XYZ.COM LLC") - expect(subject.admin_contacts[0].address).to eq("2121 E Tropicana Ave Suite #2") - expect(subject.admin_contacts[0].city).to eq("Las Vegas") - expect(subject.admin_contacts[0].zip).to eq("89119") - expect(subject.admin_contacts[0].state).to eq("NV") - expect(subject.admin_contacts[0].country).to eq(nil) - expect(subject.admin_contacts[0].country_code).to eq("US") - expect(subject.admin_contacts[0].phone).to eq("+1.8009998422") - expect(subject.admin_contacts[0].fax).to eq("+1.7023578299") - expect(subject.admin_contacts[0].email).to eq("icann@xyz.com") - end - end - describe "#technical_contacts" do - it do - expect(subject.technical_contacts).to be_a(Array) - expect(subject.technical_contacts.size).to eq(1) - expect(subject.technical_contacts[0]).to be_a(Whois::Parser::Contact) - expect(subject.technical_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_TECHNICAL) - expect(subject.technical_contacts[0].id).to eq("H5178905") - expect(subject.technical_contacts[0].name).to eq("Domain Administrator") - expect(subject.technical_contacts[0].organization).to eq("XYZ.COM LLC") - expect(subject.technical_contacts[0].address).to eq("2121 E Tropicana Ave Suite #2") - expect(subject.technical_contacts[0].city).to eq("Las Vegas") - expect(subject.technical_contacts[0].zip).to eq("89119") - expect(subject.technical_contacts[0].state).to eq("NV") - expect(subject.technical_contacts[0].country).to eq(nil) - expect(subject.technical_contacts[0].country_code).to eq("US") - expect(subject.technical_contacts[0].phone).to eq("+1.8009998422") - expect(subject.technical_contacts[0].fax).to eq("+1.7023578299") - expect(subject.technical_contacts[0].email).to eq("icann@xyz.com") - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers.size).to eq(6) - expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[0].name).to eq("ns0.centralnic-dns.com") - expect(subject.nameservers[0].ipv4).to eq(nil) - expect(subject.nameservers[0].ipv6).to eq(nil) - expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[1].name).to eq("ns1.centralnic-dns.com") - expect(subject.nameservers[1].ipv4).to eq(nil) - expect(subject.nameservers[1].ipv6).to eq(nil) - expect(subject.nameservers[2]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[2].name).to eq("ns2.centralnic-dns.com") - expect(subject.nameservers[2].ipv4).to eq(nil) - expect(subject.nameservers[2].ipv6).to eq(nil) - expect(subject.nameservers[3]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[3].name).to eq("ns3.centralnic-dns.com") - expect(subject.nameservers[3].ipv4).to eq(nil) - expect(subject.nameservers[3].ipv6).to eq(nil) - expect(subject.nameservers[4]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[4].name).to eq("ns4.centralnic-dns.com") - expect(subject.nameservers[4].ipv4).to eq(nil) - expect(subject.nameservers[4].ipv6).to eq(nil) - expect(subject.nameservers[5]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[5].name).to eq("ns5.centralnic-dns.com") - expect(subject.nameservers[5].ipv4).to eq(nil) - expect(subject.nameservers[5].ipv6).to eq(nil) - end + it "matches status_registered.expected" do + expect(subject.disclaimer).to eq("Access to the whois service is rate limited. For more information, please see https://registrar-console.centralnic.com/pub/whois_guidance.") + expect(subject.domain).to eq("nic.college") + expect(subject.domain_id).to eq("D1465621-CNIC") + expect(subject.status).to eq(["serverTransferProhibited", "serverUpdateProhibited", "serverDeleteProhibited", "serverRenewProhibited"]) + expect(subject.available?).to eq(false) + expect(subject.registered?).to eq(true) + expect(subject.created_on).to be_a(Time) + expect(subject.created_on).to eq(DateTime.parse("2013-09-11 00:00:00 UTC")) + expect(subject.updated_on).to be_a(Time) + expect(subject.updated_on).to eq(DateTime.parse("2014-09-12 00:15:47 UTC")) + expect(subject.expires_on).to be_a(Time) + expect(subject.expires_on).to eq(DateTime.parse("2015-09-11 23:59:59 UTC")) + expect(subject.registrar).to be_a(Whois::Parser::Registrar) + expect(subject.registrar.id).to eq("9999") + expect(subject.registrar.name).to eq("CentralNic Ltd") + expect(subject.registrar.url).to eq(nil) + expect(subject.registrant_contacts).to be_a(Array) + expect(subject.registrant_contacts.size).to eq(1) + expect(subject.registrant_contacts[0]).to be_a(Whois::Parser::Contact) + expect(subject.registrant_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_REGISTRANT) + expect(subject.registrant_contacts[0].id).to eq("H5178905") + expect(subject.registrant_contacts[0].name).to eq("Domain Administrator") + expect(subject.registrant_contacts[0].organization).to eq("XYZ.COM LLC") + expect(subject.registrant_contacts[0].address).to eq("2121 E Tropicana Ave Suite #2") + expect(subject.registrant_contacts[0].city).to eq("Las Vegas") + expect(subject.registrant_contacts[0].zip).to eq("89119") + expect(subject.registrant_contacts[0].state).to eq("NV") + expect(subject.registrant_contacts[0].country).to eq(nil) + expect(subject.registrant_contacts[0].country_code).to eq("US") + expect(subject.registrant_contacts[0].phone).to eq("+1.8009998422") + expect(subject.registrant_contacts[0].fax).to eq("+1.7023578299") + expect(subject.registrant_contacts[0].email).to eq("icann@xyz.com") + expect(subject.admin_contacts).to be_a(Array) + expect(subject.admin_contacts.size).to eq(1) + expect(subject.admin_contacts[0]).to be_a(Whois::Parser::Contact) + expect(subject.admin_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_ADMINISTRATIVE) + expect(subject.admin_contacts[0].id).to eq("H5178905") + expect(subject.admin_contacts[0].name).to eq("Domain Administrator") + expect(subject.admin_contacts[0].organization).to eq("XYZ.COM LLC") + expect(subject.admin_contacts[0].address).to eq("2121 E Tropicana Ave Suite #2") + expect(subject.admin_contacts[0].city).to eq("Las Vegas") + expect(subject.admin_contacts[0].zip).to eq("89119") + expect(subject.admin_contacts[0].state).to eq("NV") + expect(subject.admin_contacts[0].country).to eq(nil) + expect(subject.admin_contacts[0].country_code).to eq("US") + expect(subject.admin_contacts[0].phone).to eq("+1.8009998422") + expect(subject.admin_contacts[0].fax).to eq("+1.7023578299") + expect(subject.admin_contacts[0].email).to eq("icann@xyz.com") + expect(subject.technical_contacts).to be_a(Array) + expect(subject.technical_contacts.size).to eq(1) + expect(subject.technical_contacts[0]).to be_a(Whois::Parser::Contact) + expect(subject.technical_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_TECHNICAL) + expect(subject.technical_contacts[0].id).to eq("H5178905") + expect(subject.technical_contacts[0].name).to eq("Domain Administrator") + expect(subject.technical_contacts[0].organization).to eq("XYZ.COM LLC") + expect(subject.technical_contacts[0].address).to eq("2121 E Tropicana Ave Suite #2") + expect(subject.technical_contacts[0].city).to eq("Las Vegas") + expect(subject.technical_contacts[0].zip).to eq("89119") + expect(subject.technical_contacts[0].state).to eq("NV") + expect(subject.technical_contacts[0].country).to eq(nil) + expect(subject.technical_contacts[0].country_code).to eq("US") + expect(subject.technical_contacts[0].phone).to eq("+1.8009998422") + expect(subject.technical_contacts[0].fax).to eq("+1.7023578299") + expect(subject.technical_contacts[0].email).to eq("icann@xyz.com") + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers.size).to eq(6) + expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[0].name).to eq("ns0.centralnic-dns.com") + expect(subject.nameservers[0].ipv4).to eq(nil) + expect(subject.nameservers[0].ipv6).to eq(nil) + expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[1].name).to eq("ns1.centralnic-dns.com") + expect(subject.nameservers[1].ipv4).to eq(nil) + expect(subject.nameservers[1].ipv6).to eq(nil) + expect(subject.nameservers[2]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[2].name).to eq("ns2.centralnic-dns.com") + expect(subject.nameservers[2].ipv4).to eq(nil) + expect(subject.nameservers[2].ipv6).to eq(nil) + expect(subject.nameservers[3]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[3].name).to eq("ns3.centralnic-dns.com") + expect(subject.nameservers[3].ipv4).to eq(nil) + expect(subject.nameservers[3].ipv6).to eq(nil) + expect(subject.nameservers[4]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[4].name).to eq("ns4.centralnic-dns.com") + expect(subject.nameservers[4].ipv4).to eq(nil) + expect(subject.nameservers[4].ipv6).to eq(nil) + expect(subject.nameservers[5]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[5].name).to eq("ns5.centralnic-dns.com") + expect(subject.nameservers[5].ipv4).to eq(nil) + expect(subject.nameservers[5].ipv6).to eq(nil) end end diff --git a/spec/whois/parsers/responses/whois.nic.coop/coop/property_status_multiple_spec.rb b/spec/whois/parsers/responses/whois.nic.coop/coop/property_status_multiple_spec.rb index 547fb550..d6e36c70 100644 --- a/spec/whois/parsers/responses/whois.nic.coop/coop/property_status_multiple_spec.rb +++ b/spec/whois/parsers/responses/whois.nic.coop/coop/property_status_multiple_spec.rb @@ -11,19 +11,16 @@ # require 'spec_helper' -require 'whois/parsers/whois.nic.coop.rb' -describe Whois::Parsers::WhoisNicCoop, "property_status_multiple.expected" do +describe "whois.nic.coop", :aggregate_failures do subject do file = fixture("responses", "whois.nic.coop/coop/property_status_multiple.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.nic.coop") + Whois::Parser.parser_for(part) end - describe "#status" do - it do - expect(subject.status).to eq(["clientDeleteProhibited", "clientTransferProhibited", "clientUpdateProhibited"]) - end + it "matches property_status_multiple.expected" do + expect(subject.status).to eq(["clientDeleteProhibited", "clientTransferProhibited", "clientUpdateProhibited"]) end end diff --git a/spec/whois/parsers/responses/whois.nic.coop/coop/property_status_single_spec.rb b/spec/whois/parsers/responses/whois.nic.coop/coop/property_status_single_spec.rb index 01f2214c..72970c4b 100644 --- a/spec/whois/parsers/responses/whois.nic.coop/coop/property_status_single_spec.rb +++ b/spec/whois/parsers/responses/whois.nic.coop/coop/property_status_single_spec.rb @@ -11,19 +11,16 @@ # require 'spec_helper' -require 'whois/parsers/whois.nic.coop.rb' -describe Whois::Parsers::WhoisNicCoop, "property_status_single.expected" do +describe "whois.nic.coop", :aggregate_failures do subject do file = fixture("responses", "whois.nic.coop/coop/property_status_single.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.nic.coop") + Whois::Parser.parser_for(part) end - describe "#status" do - it do - expect(subject.status).to eq(["ok"]) - end + it "matches property_status_single.expected" do + expect(subject.status).to eq(["ok"]) end end diff --git a/spec/whois/parsers/responses/whois.nic.coop/coop/status_available_spec.rb b/spec/whois/parsers/responses/whois.nic.coop/coop/status_available_spec.rb index 1548dbb0..2846048f 100644 --- a/spec/whois/parsers/responses/whois.nic.coop/coop/status_available_spec.rb +++ b/spec/whois/parsers/responses/whois.nic.coop/coop/status_available_spec.rb @@ -11,50 +11,23 @@ # require 'spec_helper' -require 'whois/parsers/whois.nic.coop.rb' -describe Whois::Parsers::WhoisNicCoop, "status_available.expected" do +describe "whois.nic.coop", :aggregate_failures do subject do file = fixture("responses", "whois.nic.coop/coop/status_available.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.nic.coop") + Whois::Parser.parser_for(part) end - describe "#status" do - it do - expect(subject.status).to eq([]) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(true) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(false) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to eq(nil) - end - end - describe "#updated_on" do - it do - expect(subject.updated_on).to eq(nil) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to eq(nil) - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers).to eq([]) - end + it "matches status_available.expected" do + expect(subject.status).to eq([]) + expect(subject.available?).to eq(true) + expect(subject.registered?).to eq(false) + expect(subject.created_on).to eq(nil) + expect(subject.updated_on).to eq(nil) + expect(subject.expires_on).to eq(nil) + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers).to eq([]) end end diff --git a/spec/whois/parsers/responses/whois.nic.coop/coop/status_registered_spec.rb b/spec/whois/parsers/responses/whois.nic.coop/coop/status_registered_spec.rb index c9a3552e..6b842b10 100644 --- a/spec/whois/parsers/responses/whois.nic.coop/coop/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.nic.coop/coop/status_registered_spec.rb @@ -11,57 +11,30 @@ # require 'spec_helper' -require 'whois/parsers/whois.nic.coop.rb' -describe Whois::Parsers::WhoisNicCoop, "status_registered.expected" do +describe "whois.nic.coop", :aggregate_failures do subject do file = fixture("responses", "whois.nic.coop/coop/status_registered.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.nic.coop") + Whois::Parser.parser_for(part) end - describe "#status" do - it do - expect(subject.status).to eq(["ok"]) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(false) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(true) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to be_a(Time) - expect(subject.created_on).to eq(DateTime.parse("2002-01-31 22:12:44 UTC")) - end - end - describe "#updated_on" do - it do - expect(subject.updated_on).to be_a(Time) - expect(subject.updated_on).to eq(DateTime.parse("2012-01-04 18:30:54 UTC")) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to be_a(Time) - expect(subject.expires_on).to eq(DateTime.parse("2017-01-31 22:12:44 UTC")) - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers.size).to eq(2) - expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[0].name).to eq("ns1.calgarycoop.net") - expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[1].name).to eq("ns2.calgarycoop.net") - end + it "matches status_registered.expected" do + expect(subject.status).to eq(["ok"]) + expect(subject.available?).to eq(false) + expect(subject.registered?).to eq(true) + expect(subject.created_on).to be_a(Time) + expect(subject.created_on).to eq(DateTime.parse("2002-01-31 22:12:44 UTC")) + expect(subject.updated_on).to be_a(Time) + expect(subject.updated_on).to eq(DateTime.parse("2012-01-04 18:30:54 UTC")) + expect(subject.expires_on).to be_a(Time) + expect(subject.expires_on).to eq(DateTime.parse("2017-01-31 22:12:44 UTC")) + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers.size).to eq(2) + expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[0].name).to eq("ns1.calgarycoop.net") + expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[1].name).to eq("ns2.calgarycoop.net") end end diff --git a/spec/whois/parsers/responses/whois.nic.cx/cx/property_updated_on_empty_spec.rb b/spec/whois/parsers/responses/whois.nic.cx/cx/property_updated_on_empty_spec.rb index 08f5b355..c522935b 100644 --- a/spec/whois/parsers/responses/whois.nic.cx/cx/property_updated_on_empty_spec.rb +++ b/spec/whois/parsers/responses/whois.nic.cx/cx/property_updated_on_empty_spec.rb @@ -11,19 +11,16 @@ # require 'spec_helper' -require 'whois/parsers/whois.nic.cx.rb' -describe Whois::Parsers::WhoisNicCx, "property_updated_on_empty.expected" do +describe "whois.nic.cx", :aggregate_failures do subject do file = fixture("responses", "whois.nic.cx/cx/property_updated_on_empty.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.nic.cx") + Whois::Parser.parser_for(part) end - describe "#updated_on" do - it do - expect(subject.updated_on).to eq(nil) - end + it "matches property_updated_on_empty.expected" do + expect(subject.updated_on).to eq(nil) end end diff --git a/spec/whois/parsers/responses/whois.nic.cx/cx/status_available_spec.rb b/spec/whois/parsers/responses/whois.nic.cx/cx/status_available_spec.rb index e9715479..6110b527 100644 --- a/spec/whois/parsers/responses/whois.nic.cx/cx/status_available_spec.rb +++ b/spec/whois/parsers/responses/whois.nic.cx/cx/status_available_spec.rb @@ -11,65 +11,26 @@ # require 'spec_helper' -require 'whois/parsers/whois.nic.cx.rb' -describe Whois::Parsers::WhoisNicCx, "status_available.expected" do +describe "whois.nic.cx", :aggregate_failures do subject do file = fixture("responses", "whois.nic.cx/cx/status_available.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.nic.cx") + Whois::Parser.parser_for(part) end - describe "#domain" do - it do - expect(subject.domain).to eq("u34jedzcq.cx") - end - end - describe "#domain_id" do - it do - expect(subject.domain_id).to eq(nil) - end - end - describe "#status" do - it do - expect(subject.status).to eq(:available) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(true) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(false) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to eq(nil) - end - end - describe "#updated_on" do - it do - expect(subject.updated_on).to eq(nil) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to eq(nil) - end - end - describe "#registrar" do - it do - expect(subject.registrar).to eq(nil) - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers).to eq([]) - end + it "matches status_available.expected" do + expect(subject.domain).to eq("u34jedzcq.cx") + expect(subject.domain_id).to eq(nil) + expect(subject.status).to eq(:available) + expect(subject.available?).to eq(true) + expect(subject.registered?).to eq(false) + expect(subject.created_on).to eq(nil) + expect(subject.updated_on).to eq(nil) + expect(subject.expires_on).to eq(nil) + expect(subject.registrar).to eq(nil) + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers).to eq([]) end end diff --git a/spec/whois/parsers/responses/whois.nic.cx/cx/status_registered_spec.rb b/spec/whois/parsers/responses/whois.nic.cx/cx/status_registered_spec.rb index c001af22..0a6c4215 100644 --- a/spec/whois/parsers/responses/whois.nic.cx/cx/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.nic.cx/cx/status_registered_spec.rb @@ -11,79 +11,40 @@ # require 'spec_helper' -require 'whois/parsers/whois.nic.cx.rb' -describe Whois::Parsers::WhoisNicCx, "status_registered.expected" do +describe "whois.nic.cx", :aggregate_failures do subject do file = fixture("responses", "whois.nic.cx/cx/status_registered.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.nic.cx") + Whois::Parser.parser_for(part) end - describe "#domain" do - it do - expect(subject.domain).to eq("google.cx") - end - end - describe "#domain_id" do - it do - expect(subject.domain_id).to eq("447518-CoCCA") - end - end - describe "#status" do - it do - expect(subject.status).to eq(:registered) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(false) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(true) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to be_a(Time) - expect(subject.created_on).to eq(DateTime.parse("2010-07-29 18:15:42 UTC")) - end - end - describe "#updated_on" do - it do - expect(subject.updated_on).to be_a(Time) - expect(subject.updated_on).to eq(DateTime.parse("2014-06-28 09:18:02 UTC")) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to be_a(Time) - expect(subject.expires_on).to eq(DateTime.parse("2015-07-29 18:15:42 UTC")) - end - end - describe "#registrar" do - it do - expect(subject.registrar).to be_a(Whois::Parser::Registrar) - expect(subject.registrar.id).to eq(nil) - expect(subject.registrar.name).to eq("MarkMonitor") - expect(subject.registrar.url).to eq(nil) - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers.size).to eq(4) - expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[0].name).to eq("ns1.google.com") - expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[1].name).to eq("ns3.google.com") - expect(subject.nameservers[2]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[2].name).to eq("ns4.google.com") - expect(subject.nameservers[3]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[3].name).to eq("ns2.google.com") - end + it "matches status_registered.expected" do + expect(subject.domain).to eq("google.cx") + expect(subject.domain_id).to eq("447518-CoCCA") + expect(subject.status).to eq(:registered) + expect(subject.available?).to eq(false) + expect(subject.registered?).to eq(true) + expect(subject.created_on).to be_a(Time) + expect(subject.created_on).to eq(DateTime.parse("2010-07-29 18:15:42 UTC")) + expect(subject.updated_on).to be_a(Time) + expect(subject.updated_on).to eq(DateTime.parse("2014-06-28 09:18:02 UTC")) + expect(subject.expires_on).to be_a(Time) + expect(subject.expires_on).to eq(DateTime.parse("2015-07-29 18:15:42 UTC")) + expect(subject.registrar).to be_a(Whois::Parser::Registrar) + expect(subject.registrar.id).to eq(nil) + expect(subject.registrar.name).to eq("MarkMonitor") + expect(subject.registrar.url).to eq(nil) + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers.size).to eq(4) + expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[0].name).to eq("ns1.google.com") + expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[1].name).to eq("ns3.google.com") + expect(subject.nameservers[2]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[2].name).to eq("ns4.google.com") + expect(subject.nameservers[3]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[3].name).to eq("ns2.google.com") end end diff --git a/spec/whois/parsers/responses/whois.nic.cz/cz/case_nset_contact_same_name_spec.rb b/spec/whois/parsers/responses/whois.nic.cz/cz/case_nset_contact_same_name_spec.rb index 304eb36a..e0a8faf2 100644 --- a/spec/whois/parsers/responses/whois.nic.cz/cz/case_nset_contact_same_name_spec.rb +++ b/spec/whois/parsers/responses/whois.nic.cz/cz/case_nset_contact_same_name_spec.rb @@ -11,34 +11,31 @@ # require 'spec_helper' -require 'whois/parsers/whois.nic.cz.rb' -describe Whois::Parsers::WhoisNicCz, "case_nset_contact_same_name.expected" do +describe "whois.nic.cz", :aggregate_failures do subject do file = fixture("responses", "whois.nic.cz/cz/case_nset_contact_same_name.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.nic.cz") + Whois::Parser.parser_for(part) end - describe "#technical_contacts" do - it do - expect(subject.technical_contacts).to be_a(Array) - expect(subject.technical_contacts.size).to eq(1) - expect(subject.technical_contacts[0]).to be_a(Whois::Parser::Contact) - expect(subject.technical_contacts[0].id).to eq("WEBAREAL-CZ") - expect(subject.technical_contacts[0].name).to eq("Jaroslav Hansal") - expect(subject.technical_contacts[0].organization).to eq(nil) - expect(subject.technical_contacts[0].address).to eq("Rudolfovská tř. 247/85\nČeské Budějovice\n37001\nCZ") - expect(subject.technical_contacts[0].city).to eq(nil) - expect(subject.technical_contacts[0].zip).to eq(nil) - expect(subject.technical_contacts[0].state).to eq(nil) - expect(subject.technical_contacts[0].country).to eq(nil) - expect(subject.technical_contacts[0].country_code).to eq(nil) - expect(subject.technical_contacts[0].phone).to eq(nil) - expect(subject.technical_contacts[0].fax).to eq(nil) - expect(subject.technical_contacts[0].email).to eq("info@webareal.cz") - expect(subject.technical_contacts[0].created_on).to eq(DateTime.parse("2009-04-10 14:48:02")) - end + it "matches case_nset_contact_same_name.expected" do + expect(subject.technical_contacts).to be_a(Array) + expect(subject.technical_contacts.size).to eq(1) + expect(subject.technical_contacts[0]).to be_a(Whois::Parser::Contact) + expect(subject.technical_contacts[0].id).to eq("WEBAREAL-CZ") + expect(subject.technical_contacts[0].name).to eq("Jaroslav Hansal") + expect(subject.technical_contacts[0].organization).to eq(nil) + expect(subject.technical_contacts[0].address).to eq("Rudolfovská tř. 247/85\nČeské Budějovice\n37001\nCZ") + expect(subject.technical_contacts[0].city).to eq(nil) + expect(subject.technical_contacts[0].zip).to eq(nil) + expect(subject.technical_contacts[0].state).to eq(nil) + expect(subject.technical_contacts[0].country).to eq(nil) + expect(subject.technical_contacts[0].country_code).to eq(nil) + expect(subject.technical_contacts[0].phone).to eq(nil) + expect(subject.technical_contacts[0].fax).to eq(nil) + expect(subject.technical_contacts[0].email).to eq("info@webareal.cz") + expect(subject.technical_contacts[0].created_on).to eq(DateTime.parse("2009-04-10 14:48:02")) end end diff --git a/spec/whois/parsers/responses/whois.nic.cz/cz/response_throttled_spec.rb b/spec/whois/parsers/responses/whois.nic.cz/cz/response_throttled_spec.rb index 0e2636f7..1ddf988b 100644 --- a/spec/whois/parsers/responses/whois.nic.cz/cz/response_throttled_spec.rb +++ b/spec/whois/parsers/responses/whois.nic.cz/cz/response_throttled_spec.rb @@ -11,19 +11,16 @@ # require 'spec_helper' -require 'whois/parsers/whois.nic.cz.rb' -describe Whois::Parsers::WhoisNicCz, "response_throttled.expected" do +describe "whois.nic.cz", :aggregate_failures do subject do file = fixture("responses", "whois.nic.cz/cz/response_throttled.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.nic.cz") + Whois::Parser.parser_for(part) end - describe "#response_throttled?" do - it do - expect(subject.response_throttled?).to eq(true) - end + it "matches response_throttled.expected" do + expect(subject.response_throttled?).to eq(true) end end diff --git a/spec/whois/parsers/responses/whois.nic.cz/cz/response_with_keyset_spec.rb b/spec/whois/parsers/responses/whois.nic.cz/cz/response_with_keyset_spec.rb index 824db69d..48776f9e 100644 --- a/spec/whois/parsers/responses/whois.nic.cz/cz/response_with_keyset_spec.rb +++ b/spec/whois/parsers/responses/whois.nic.cz/cz/response_with_keyset_spec.rb @@ -11,32 +11,21 @@ # require 'spec_helper' -require 'whois/parsers/whois.nic.cz.rb' -describe Whois::Parsers::WhoisNicCz, "response_with_keyset.expected" do +describe "whois.nic.cz", :aggregate_failures do subject do file = fixture("responses", "whois.nic.cz/cz/response_with_keyset.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.nic.cz") + Whois::Parser.parser_for(part) end - describe "#created_on" do - it do - expect(subject.created_on).to be_a(Time) - expect(subject.created_on).to eq(DateTime.parse("2006-01-30 18:55:00")) - end - end - describe "#updated_on" do - it do - expect(subject.updated_on).to be_a(Time) - expect(subject.updated_on).to eq(DateTime.parse("2010-03-06 15:53:04")) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to be_a(Time) - expect(subject.expires_on).to eq(DateTime.parse("2014-01-30")) - end + it "matches response_with_keyset.expected" do + expect(subject.created_on).to be_a(Time) + expect(subject.created_on).to eq(DateTime.parse("2006-01-30 18:55:00")) + expect(subject.updated_on).to be_a(Time) + expect(subject.updated_on).to eq(DateTime.parse("2010-03-06 15:53:04")) + expect(subject.expires_on).to be_a(Time) + expect(subject.expires_on).to eq(DateTime.parse("2014-01-30")) end end diff --git a/spec/whois/parsers/responses/whois.nic.cz/cz/status_available_spec.rb b/spec/whois/parsers/responses/whois.nic.cz/cz/status_available_spec.rb index 68905eb5..e42ce092 100644 --- a/spec/whois/parsers/responses/whois.nic.cz/cz/status_available_spec.rb +++ b/spec/whois/parsers/responses/whois.nic.cz/cz/status_available_spec.rb @@ -11,83 +11,32 @@ # require 'spec_helper' -require 'whois/parsers/whois.nic.cz.rb' -describe Whois::Parsers::WhoisNicCz, "status_available.expected" do +describe "whois.nic.cz", :aggregate_failures do subject do file = fixture("responses", "whois.nic.cz/cz/status_available.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.nic.cz") + Whois::Parser.parser_for(part) end - describe "#domain" do - it do - expect(subject.domain).to eq(nil) - end - end - describe "#domain_id" do - it do - expect { subject.domain_id }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#status" do - it do - expect(subject.status).to eq(:available) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(true) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(false) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to eq(nil) - end - end - describe "#updated_on" do - it do - expect(subject.updated_on).to eq(nil) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to eq(nil) - end - end - describe "#registrar" do - it do - expect(subject.registrar).to eq(nil) - end - end - describe "#registrant_contacts" do - it do - expect(subject.registrant_contacts).to be_a(Array) - expect(subject.registrant_contacts).to eq([]) - end - end - describe "#admin_contacts" do - it do - expect(subject.admin_contacts).to be_a(Array) - expect(subject.admin_contacts).to eq([]) - end - end - describe "#technical_contacts" do - it do - expect(subject.technical_contacts).to be_a(Array) - expect(subject.technical_contacts).to eq([]) - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers).to eq([]) - end + it "matches status_available.expected" do + expect(subject.domain).to eq(nil) + expect { subject.domain_id }.to raise_error(Whois::AttributeNotSupported) + expect(subject.status).to eq(:available) + expect(subject.available?).to eq(true) + expect(subject.registered?).to eq(false) + expect(subject.created_on).to eq(nil) + expect(subject.updated_on).to eq(nil) + expect(subject.expires_on).to eq(nil) + expect(subject.registrar).to eq(nil) + expect(subject.registrant_contacts).to be_a(Array) + expect(subject.registrant_contacts).to eq([]) + expect(subject.admin_contacts).to be_a(Array) + expect(subject.admin_contacts).to eq([]) + expect(subject.technical_contacts).to be_a(Array) + expect(subject.technical_contacts).to eq([]) + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers).to eq([]) end end diff --git a/spec/whois/parsers/responses/whois.nic.cz/cz/status_registered_spec.rb b/spec/whois/parsers/responses/whois.nic.cz/cz/status_registered_spec.rb index 80faa297..f056a98d 100644 --- a/spec/whois/parsers/responses/whois.nic.cz/cz/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.nic.cz/cz/status_registered_spec.rb @@ -11,141 +11,90 @@ # require 'spec_helper' -require 'whois/parsers/whois.nic.cz.rb' -describe Whois::Parsers::WhoisNicCz, "status_registered.expected" do +describe "whois.nic.cz", :aggregate_failures do subject do file = fixture("responses", "whois.nic.cz/cz/status_registered.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.nic.cz") + Whois::Parser.parser_for(part) end - describe "#domain" do - it do - expect(subject.domain).to eq("google.cz") - end - end - describe "#domain_id" do - it do - expect { subject.domain_id }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#status" do - it do - expect(subject.status).to eq(:registered) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(false) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(true) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to be_a(Time) - expect(subject.created_on).to eq(DateTime.parse("2000-07-21 15:21:00")) - end - end - describe "#updated_on" do - it do - expect(subject.updated_on).to be_a(Time) - expect(subject.updated_on).to eq(DateTime.parse("2011-05-18 23:28:45")) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to be_a(Time) - expect(subject.expires_on).to eq(DateTime.parse("2014-07-22 00:00:00")) - end - end - describe "#registrar" do - it do - expect(subject.registrar).to be_a(Whois::Parser::Registrar) - expect(subject.registrar.id).to eq("REG-MARKMONITOR") - expect(subject.registrar.name).to eq("REG-MARKMONITOR") - expect(subject.registrar.url).to eq(nil) - end - end - describe "#registrant_contacts" do - it do - expect(subject.registrant_contacts).to be_a(Array) - expect(subject.registrant_contacts.size).to eq(1) - expect(subject.registrant_contacts[0]).to be_a(Whois::Parser::Contact) - expect(subject.registrant_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_REGISTRANT) - expect(subject.registrant_contacts[0].id).to eq("MM12383") - expect(subject.registrant_contacts[0].name).to eq("DNS Admin") - expect(subject.registrant_contacts[0].organization).to eq("Google Inc.") - expect(subject.registrant_contacts[0].address).to eq("1600 Amphitheatre Parkway\nMountain View\n94043\nCA\nUS") - expect(subject.registrant_contacts[0].city).to eq(nil) - expect(subject.registrant_contacts[0].zip).to eq(nil) - expect(subject.registrant_contacts[0].state).to eq(nil) - expect(subject.registrant_contacts[0].country).to eq(nil) - expect(subject.registrant_contacts[0].country_code).to eq(nil) - expect(subject.registrant_contacts[0].phone).to eq(nil) - expect(subject.registrant_contacts[0].fax).to eq(nil) - expect(subject.registrant_contacts[0].email).to eq("dns-admin@google.com") - expect(subject.registrant_contacts[0].created_on).to eq(DateTime.parse("2011-05-18 23:28:26")) - end - end - describe "#admin_contacts" do - it do - expect(subject.admin_contacts).to be_a(Array) - expect(subject.admin_contacts.size).to eq(1) - expect(subject.admin_contacts[0]).to be_a(Whois::Parser::Contact) - expect(subject.admin_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_ADMINISTRATIVE) - expect(subject.admin_contacts[0].id).to eq("MM12383") - expect(subject.admin_contacts[0].name).to eq("DNS Admin") - expect(subject.admin_contacts[0].organization).to eq("Google Inc.") - expect(subject.admin_contacts[0].address).to eq("1600 Amphitheatre Parkway\nMountain View\n94043\nCA\nUS") - expect(subject.admin_contacts[0].city).to eq(nil) - expect(subject.admin_contacts[0].zip).to eq(nil) - expect(subject.admin_contacts[0].state).to eq(nil) - expect(subject.admin_contacts[0].country).to eq(nil) - expect(subject.admin_contacts[0].country_code).to eq(nil) - expect(subject.admin_contacts[0].phone).to eq(nil) - expect(subject.admin_contacts[0].fax).to eq(nil) - expect(subject.admin_contacts[0].email).to eq("dns-admin@google.com") - expect(subject.admin_contacts[0].created_on).to eq(DateTime.parse("2011-05-18 23:28:26")) - end - end - describe "#technical_contacts" do - it do - expect(subject.technical_contacts).to be_a(Array) - expect(subject.technical_contacts.size).to eq(1) - expect(subject.technical_contacts[0]).to be_a(Whois::Parser::Contact) - expect(subject.technical_contacts[0].id).to eq("MM193020") - expect(subject.technical_contacts[0].name).to eq("Domain Provisioning") - expect(subject.technical_contacts[0].organization).to eq("MarkMonitor, Inc.") - expect(subject.technical_contacts[0].address).to eq("10400 Overland Road PMB 155\nBoise\n83709-1433\nID\nUS") - expect(subject.technical_contacts[0].city).to eq(nil) - expect(subject.technical_contacts[0].zip).to eq(nil) - expect(subject.technical_contacts[0].state).to eq(nil) - expect(subject.technical_contacts[0].country).to eq(nil) - expect(subject.technical_contacts[0].country_code).to eq(nil) - expect(subject.technical_contacts[0].phone).to eq(nil) - expect(subject.technical_contacts[0].fax).to eq(nil) - expect(subject.technical_contacts[0].email).to eq("ccops@markmonitor.com") - expect(subject.technical_contacts[0].created_on).to eq(DateTime.parse("2011-02-03 18:24:34")) - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers.size).to eq(4) - expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[0].name).to eq("ns2.google.com") - expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[1].name).to eq("ns4.google.com") - expect(subject.nameservers[2]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[2].name).to eq("ns3.google.com") - expect(subject.nameservers[3]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[3].name).to eq("ns1.google.com") - end + it "matches status_registered.expected" do + expect(subject.domain).to eq("google.cz") + expect { subject.domain_id }.to raise_error(Whois::AttributeNotSupported) + expect(subject.status).to eq(:registered) + expect(subject.available?).to eq(false) + expect(subject.registered?).to eq(true) + expect(subject.created_on).to be_a(Time) + expect(subject.created_on).to eq(DateTime.parse("2000-07-21 15:21:00")) + expect(subject.updated_on).to be_a(Time) + expect(subject.updated_on).to eq(DateTime.parse("2011-05-18 23:28:45")) + expect(subject.expires_on).to be_a(Time) + expect(subject.expires_on).to eq(DateTime.parse("2014-07-22 00:00:00")) + expect(subject.registrar).to be_a(Whois::Parser::Registrar) + expect(subject.registrar.id).to eq("REG-MARKMONITOR") + expect(subject.registrar.name).to eq("REG-MARKMONITOR") + expect(subject.registrar.url).to eq(nil) + expect(subject.registrant_contacts).to be_a(Array) + expect(subject.registrant_contacts.size).to eq(1) + expect(subject.registrant_contacts[0]).to be_a(Whois::Parser::Contact) + expect(subject.registrant_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_REGISTRANT) + expect(subject.registrant_contacts[0].id).to eq("MM12383") + expect(subject.registrant_contacts[0].name).to eq("DNS Admin") + expect(subject.registrant_contacts[0].organization).to eq("Google Inc.") + expect(subject.registrant_contacts[0].address).to eq("1600 Amphitheatre Parkway\nMountain View\n94043\nCA\nUS") + expect(subject.registrant_contacts[0].city).to eq(nil) + expect(subject.registrant_contacts[0].zip).to eq(nil) + expect(subject.registrant_contacts[0].state).to eq(nil) + expect(subject.registrant_contacts[0].country).to eq(nil) + expect(subject.registrant_contacts[0].country_code).to eq(nil) + expect(subject.registrant_contacts[0].phone).to eq(nil) + expect(subject.registrant_contacts[0].fax).to eq(nil) + expect(subject.registrant_contacts[0].email).to eq("dns-admin@google.com") + expect(subject.registrant_contacts[0].created_on).to eq(DateTime.parse("2011-05-18 23:28:26")) + expect(subject.admin_contacts).to be_a(Array) + expect(subject.admin_contacts.size).to eq(1) + expect(subject.admin_contacts[0]).to be_a(Whois::Parser::Contact) + expect(subject.admin_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_ADMINISTRATIVE) + expect(subject.admin_contacts[0].id).to eq("MM12383") + expect(subject.admin_contacts[0].name).to eq("DNS Admin") + expect(subject.admin_contacts[0].organization).to eq("Google Inc.") + expect(subject.admin_contacts[0].address).to eq("1600 Amphitheatre Parkway\nMountain View\n94043\nCA\nUS") + expect(subject.admin_contacts[0].city).to eq(nil) + expect(subject.admin_contacts[0].zip).to eq(nil) + expect(subject.admin_contacts[0].state).to eq(nil) + expect(subject.admin_contacts[0].country).to eq(nil) + expect(subject.admin_contacts[0].country_code).to eq(nil) + expect(subject.admin_contacts[0].phone).to eq(nil) + expect(subject.admin_contacts[0].fax).to eq(nil) + expect(subject.admin_contacts[0].email).to eq("dns-admin@google.com") + expect(subject.admin_contacts[0].created_on).to eq(DateTime.parse("2011-05-18 23:28:26")) + expect(subject.technical_contacts).to be_a(Array) + expect(subject.technical_contacts.size).to eq(1) + expect(subject.technical_contacts[0]).to be_a(Whois::Parser::Contact) + expect(subject.technical_contacts[0].id).to eq("MM193020") + expect(subject.technical_contacts[0].name).to eq("Domain Provisioning") + expect(subject.technical_contacts[0].organization).to eq("MarkMonitor, Inc.") + expect(subject.technical_contacts[0].address).to eq("10400 Overland Road PMB 155\nBoise\n83709-1433\nID\nUS") + expect(subject.technical_contacts[0].city).to eq(nil) + expect(subject.technical_contacts[0].zip).to eq(nil) + expect(subject.technical_contacts[0].state).to eq(nil) + expect(subject.technical_contacts[0].country).to eq(nil) + expect(subject.technical_contacts[0].country_code).to eq(nil) + expect(subject.technical_contacts[0].phone).to eq(nil) + expect(subject.technical_contacts[0].fax).to eq(nil) + expect(subject.technical_contacts[0].email).to eq("ccops@markmonitor.com") + expect(subject.technical_contacts[0].created_on).to eq(DateTime.parse("2011-02-03 18:24:34")) + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers.size).to eq(4) + expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[0].name).to eq("ns2.google.com") + expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[1].name).to eq("ns4.google.com") + expect(subject.nameservers[2]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[2].name).to eq("ns3.google.com") + expect(subject.nameservers[3]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[3].name).to eq("ns1.google.com") end end diff --git a/spec/whois/parsers/responses/whois.nic.design/design/status_available_spec.rb b/spec/whois/parsers/responses/whois.nic.design/design/status_available_spec.rb index 612653f5..38878975 100644 --- a/spec/whois/parsers/responses/whois.nic.design/design/status_available_spec.rb +++ b/spec/whois/parsers/responses/whois.nic.design/design/status_available_spec.rb @@ -11,88 +11,33 @@ # require 'spec_helper' -require 'whois/parsers/whois.nic.design.rb' -describe Whois::Parsers::WhoisNicDesign, "status_available.expected" do +describe "whois.nic.design", :aggregate_failures do subject do file = fixture("responses", "whois.nic.design/design/status_available.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.nic.design") + Whois::Parser.parser_for(part) end - describe "#disclaimer" do - it do - expect(subject.disclaimer).to eq(nil) - end - end - describe "#domain" do - it do - expect(subject.domain).to eq(nil) - end - end - describe "#domain_id" do - it do - expect(subject.domain_id).to eq(nil) - end - end - describe "#status" do - it do - expect(subject.status).to eq([]) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(true) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(false) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to eq(nil) - end - end - describe "#updated_on" do - it do - expect(subject.updated_on).to eq(nil) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to eq(nil) - end - end - describe "#registrar" do - it do - expect(subject.registrar).to eq(nil) - end - end - describe "#registrant_contacts" do - it do - expect(subject.registrant_contacts).to be_a(Array) - expect(subject.registrant_contacts).to eq([]) - end - end - describe "#admin_contacts" do - it do - expect(subject.admin_contacts).to be_a(Array) - expect(subject.admin_contacts).to eq([]) - end - end - describe "#technical_contacts" do - it do - expect(subject.technical_contacts).to be_a(Array) - expect(subject.technical_contacts).to eq([]) - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers).to eq([]) - end + it "matches status_available.expected" do + expect(subject.disclaimer).to eq(nil) + expect(subject.domain).to eq(nil) + expect(subject.domain_id).to eq(nil) + expect(subject.status).to eq([]) + expect(subject.available?).to eq(true) + expect(subject.registered?).to eq(false) + expect(subject.created_on).to eq(nil) + expect(subject.updated_on).to eq(nil) + expect(subject.expires_on).to eq(nil) + expect(subject.registrar).to eq(nil) + expect(subject.registrant_contacts).to be_a(Array) + expect(subject.registrant_contacts).to eq([]) + expect(subject.admin_contacts).to be_a(Array) + expect(subject.admin_contacts).to eq([]) + expect(subject.technical_contacts).to be_a(Array) + expect(subject.technical_contacts).to eq([]) + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers).to eq([]) end end diff --git a/spec/whois/parsers/responses/whois.nic.design/design/status_registered_spec.rb b/spec/whois/parsers/responses/whois.nic.design/design/status_registered_spec.rb index 3130c501..cf647907 100644 --- a/spec/whois/parsers/responses/whois.nic.design/design/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.nic.design/design/status_registered_spec.rb @@ -11,152 +11,97 @@ # require 'spec_helper' -require 'whois/parsers/whois.nic.design.rb' -describe Whois::Parsers::WhoisNicDesign, "status_registered.expected" do +describe "whois.nic.design", :aggregate_failures do subject do file = fixture("responses", "whois.nic.design/design/status_registered.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.nic.design") + Whois::Parser.parser_for(part) end - describe "#disclaimer" do - it do - expect(subject.disclaimer).to eq("Access to the whois service is rate limited. For more information, please see https://registrar-console.centralnic.com/pub/whois_guidance.") - end - end - describe "#domain" do - it do - expect(subject.domain).to eq("toplevel.design") - end - end - describe "#domain_id" do - it do - expect(subject.domain_id).to eq("D7069819-CNIC") - end - end - describe "#status" do - it do - expect(subject.status).to eq(["ok"]) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(false) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(true) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to be_a(Time) - expect(subject.created_on).to eq(DateTime.parse("2015-02-27 16:08:32 UTC")) - end - end - describe "#updated_on" do - it do - expect(subject.updated_on).to be_a(Time) - expect(subject.updated_on).to eq(DateTime.parse("2015-04-21 17:48:34 UTC")) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to be_a(Time) - expect(subject.expires_on).to eq(DateTime.parse("2016-02-27 23:59:59 UTC")) - end - end - describe "#registrar" do - it do - expect(subject.registrar).to be_a(Whois::Parser::Registrar) - expect(subject.registrar.id).to eq("9999") - expect(subject.registrar.name).to eq("Top Level Design, LLC") - expect(subject.registrar.url).to eq(nil) - end - end - describe "#registrant_contacts" do - it do - expect(subject.registrant_contacts).to be_a(Array) - expect(subject.registrant_contacts.size).to eq(1) - expect(subject.registrant_contacts[0]).to be_a(Whois::Parser::Contact) - expect(subject.registrant_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_REGISTRANT) - expect(subject.registrant_contacts[0].id).to eq("H4596017") - expect(subject.registrant_contacts[0].name).to eq("Domain Administrator") - expect(subject.registrant_contacts[0].organization).to eq("Top Level Design, LLC") - expect(subject.registrant_contacts[0].address).to eq("742 Ocean Club Place") - expect(subject.registrant_contacts[0].city).to eq("Fernandina Beach") - expect(subject.registrant_contacts[0].zip).to eq("32034") - expect(subject.registrant_contacts[0].state).to eq("Florida") - expect(subject.registrant_contacts[0].country).to eq(nil) - expect(subject.registrant_contacts[0].country_code).to eq("US") - expect(subject.registrant_contacts[0].phone).to eq("+1.5038888808") - expect(subject.registrant_contacts[0].fax).to eq("+1.6788841468") - expect(subject.registrant_contacts[0].email).to eq("ray@tldesign.co") - end - end - describe "#admin_contacts" do - it do - expect(subject.admin_contacts).to be_a(Array) - expect(subject.admin_contacts.size).to eq(1) - expect(subject.admin_contacts[0]).to be_a(Whois::Parser::Contact) - expect(subject.admin_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_ADMINISTRATIVE) - expect(subject.admin_contacts[0].id).to eq("H4596017") - expect(subject.admin_contacts[0].name).to eq("Domain Administrator") - expect(subject.admin_contacts[0].organization).to eq("Top Level Design, LLC") - expect(subject.admin_contacts[0].address).to eq("742 Ocean Club Place") - expect(subject.admin_contacts[0].city).to eq("Fernandina Beach") - expect(subject.admin_contacts[0].zip).to eq("32034") - expect(subject.admin_contacts[0].state).to eq("Florida") - expect(subject.admin_contacts[0].country).to eq(nil) - expect(subject.admin_contacts[0].country_code).to eq("US") - expect(subject.admin_contacts[0].phone).to eq("+1.5038888808") - expect(subject.admin_contacts[0].fax).to eq("+1.6788841468") - expect(subject.admin_contacts[0].email).to eq("ray@tldesign.co") - end - end - describe "#technical_contacts" do - it do - expect(subject.technical_contacts).to be_a(Array) - expect(subject.technical_contacts.size).to eq(1) - expect(subject.technical_contacts[0]).to be_a(Whois::Parser::Contact) - expect(subject.technical_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_TECHNICAL) - expect(subject.technical_contacts[0].id).to eq("H4596017") - expect(subject.technical_contacts[0].name).to eq("Domain Administrator") - expect(subject.technical_contacts[0].organization).to eq("Top Level Design, LLC") - expect(subject.technical_contacts[0].address).to eq("742 Ocean Club Place") - expect(subject.technical_contacts[0].city).to eq("Fernandina Beach") - expect(subject.technical_contacts[0].zip).to eq("32034") - expect(subject.technical_contacts[0].state).to eq("Florida") - expect(subject.technical_contacts[0].country).to eq(nil) - expect(subject.technical_contacts[0].country_code).to eq("US") - expect(subject.technical_contacts[0].phone).to eq("+1.5038888808") - expect(subject.technical_contacts[0].fax).to eq("+1.6788841468") - expect(subject.technical_contacts[0].email).to eq("ray@tldesign.co") - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers.size).to eq(4) - expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[0].name).to eq("ns-170.awsdns-21.com") - expect(subject.nameservers[0].ipv4).to eq(nil) - expect(subject.nameservers[0].ipv6).to eq(nil) - expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[1].name).to eq("ns-904.awsdns-49.net") - expect(subject.nameservers[1].ipv4).to eq(nil) - expect(subject.nameservers[1].ipv6).to eq(nil) - expect(subject.nameservers[2]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[2].name).to eq("ns-1067.awsdns-05.org") - expect(subject.nameservers[2].ipv4).to eq(nil) - expect(subject.nameservers[2].ipv6).to eq(nil) - expect(subject.nameservers[3]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[3].name).to eq("ns-1873.awsdns-42.co.uk") - expect(subject.nameservers[3].ipv4).to eq(nil) - expect(subject.nameservers[3].ipv6).to eq(nil) - end + it "matches status_registered.expected" do + expect(subject.disclaimer).to eq("Access to the whois service is rate limited. For more information, please see https://registrar-console.centralnic.com/pub/whois_guidance.") + expect(subject.domain).to eq("toplevel.design") + expect(subject.domain_id).to eq("D7069819-CNIC") + expect(subject.status).to eq(["ok"]) + expect(subject.available?).to eq(false) + expect(subject.registered?).to eq(true) + expect(subject.created_on).to be_a(Time) + expect(subject.created_on).to eq(DateTime.parse("2015-02-27 16:08:32 UTC")) + expect(subject.updated_on).to be_a(Time) + expect(subject.updated_on).to eq(DateTime.parse("2015-04-21 17:48:34 UTC")) + expect(subject.expires_on).to be_a(Time) + expect(subject.expires_on).to eq(DateTime.parse("2016-02-27 23:59:59 UTC")) + expect(subject.registrar).to be_a(Whois::Parser::Registrar) + expect(subject.registrar.id).to eq("9999") + expect(subject.registrar.name).to eq("Top Level Design, LLC") + expect(subject.registrar.url).to eq(nil) + expect(subject.registrant_contacts).to be_a(Array) + expect(subject.registrant_contacts.size).to eq(1) + expect(subject.registrant_contacts[0]).to be_a(Whois::Parser::Contact) + expect(subject.registrant_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_REGISTRANT) + expect(subject.registrant_contacts[0].id).to eq("H4596017") + expect(subject.registrant_contacts[0].name).to eq("Domain Administrator") + expect(subject.registrant_contacts[0].organization).to eq("Top Level Design, LLC") + expect(subject.registrant_contacts[0].address).to eq("742 Ocean Club Place") + expect(subject.registrant_contacts[0].city).to eq("Fernandina Beach") + expect(subject.registrant_contacts[0].zip).to eq("32034") + expect(subject.registrant_contacts[0].state).to eq("Florida") + expect(subject.registrant_contacts[0].country).to eq(nil) + expect(subject.registrant_contacts[0].country_code).to eq("US") + expect(subject.registrant_contacts[0].phone).to eq("+1.5038888808") + expect(subject.registrant_contacts[0].fax).to eq("+1.6788841468") + expect(subject.registrant_contacts[0].email).to eq("ray@tldesign.co") + expect(subject.admin_contacts).to be_a(Array) + expect(subject.admin_contacts.size).to eq(1) + expect(subject.admin_contacts[0]).to be_a(Whois::Parser::Contact) + expect(subject.admin_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_ADMINISTRATIVE) + expect(subject.admin_contacts[0].id).to eq("H4596017") + expect(subject.admin_contacts[0].name).to eq("Domain Administrator") + expect(subject.admin_contacts[0].organization).to eq("Top Level Design, LLC") + expect(subject.admin_contacts[0].address).to eq("742 Ocean Club Place") + expect(subject.admin_contacts[0].city).to eq("Fernandina Beach") + expect(subject.admin_contacts[0].zip).to eq("32034") + expect(subject.admin_contacts[0].state).to eq("Florida") + expect(subject.admin_contacts[0].country).to eq(nil) + expect(subject.admin_contacts[0].country_code).to eq("US") + expect(subject.admin_contacts[0].phone).to eq("+1.5038888808") + expect(subject.admin_contacts[0].fax).to eq("+1.6788841468") + expect(subject.admin_contacts[0].email).to eq("ray@tldesign.co") + expect(subject.technical_contacts).to be_a(Array) + expect(subject.technical_contacts.size).to eq(1) + expect(subject.technical_contacts[0]).to be_a(Whois::Parser::Contact) + expect(subject.technical_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_TECHNICAL) + expect(subject.technical_contacts[0].id).to eq("H4596017") + expect(subject.technical_contacts[0].name).to eq("Domain Administrator") + expect(subject.technical_contacts[0].organization).to eq("Top Level Design, LLC") + expect(subject.technical_contacts[0].address).to eq("742 Ocean Club Place") + expect(subject.technical_contacts[0].city).to eq("Fernandina Beach") + expect(subject.technical_contacts[0].zip).to eq("32034") + expect(subject.technical_contacts[0].state).to eq("Florida") + expect(subject.technical_contacts[0].country).to eq(nil) + expect(subject.technical_contacts[0].country_code).to eq("US") + expect(subject.technical_contacts[0].phone).to eq("+1.5038888808") + expect(subject.technical_contacts[0].fax).to eq("+1.6788841468") + expect(subject.technical_contacts[0].email).to eq("ray@tldesign.co") + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers.size).to eq(4) + expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[0].name).to eq("ns-170.awsdns-21.com") + expect(subject.nameservers[0].ipv4).to eq(nil) + expect(subject.nameservers[0].ipv6).to eq(nil) + expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[1].name).to eq("ns-904.awsdns-49.net") + expect(subject.nameservers[1].ipv4).to eq(nil) + expect(subject.nameservers[1].ipv6).to eq(nil) + expect(subject.nameservers[2]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[2].name).to eq("ns-1067.awsdns-05.org") + expect(subject.nameservers[2].ipv4).to eq(nil) + expect(subject.nameservers[2].ipv6).to eq(nil) + expect(subject.nameservers[3]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[3].name).to eq("ns-1873.awsdns-42.co.uk") + expect(subject.nameservers[3].ipv4).to eq(nil) + expect(subject.nameservers[3].ipv6).to eq(nil) end end diff --git a/spec/whois/parsers/responses/whois.nic.dm/dm/status_available_spec.rb b/spec/whois/parsers/responses/whois.nic.dm/dm/status_available_spec.rb index 2fb561da..863c2ae4 100644 --- a/spec/whois/parsers/responses/whois.nic.dm/dm/status_available_spec.rb +++ b/spec/whois/parsers/responses/whois.nic.dm/dm/status_available_spec.rb @@ -11,88 +11,33 @@ # require 'spec_helper' -require 'whois/parsers/whois.nic.dm.rb' -describe Whois::Parsers::WhoisNicDm, "status_available.expected" do +describe "whois.nic.dm", :aggregate_failures do subject do file = fixture("responses", "whois.nic.dm/dm/status_available.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.nic.dm") + Whois::Parser.parser_for(part) end - describe "#disclaimer" do - it do - expect(subject.disclaimer).to eq(nil) - end - end - describe "#domain" do - it do - expect(subject.domain).to eq(nil) - end - end - describe "#domain_id" do - it do - expect { subject.domain_id }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#status" do - it do - expect(subject.status).to eq(:available) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(true) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(false) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to eq(nil) - end - end - describe "#updated_on" do - it do - expect(subject.updated_on).to eq(nil) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to eq(nil) - end - end - describe "#registrar" do - it do - expect(subject.registrar).to eq(nil) - end - end - describe "#registrant_contacts" do - it do - expect(subject.registrant_contacts).to be_a(Array) - expect(subject.registrant_contacts).to eq([]) - end - end - describe "#admin_contacts" do - it do - expect(subject.admin_contacts).to be_a(Array) - expect(subject.admin_contacts).to eq([]) - end - end - describe "#technical_contacts" do - it do - expect(subject.technical_contacts).to be_a(Array) - expect(subject.technical_contacts).to eq([]) - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers).to eq([]) - end + it "matches status_available.expected" do + expect(subject.disclaimer).to eq(nil) + expect(subject.domain).to eq(nil) + expect { subject.domain_id }.to raise_error(Whois::AttributeNotSupported) + expect(subject.status).to eq(:available) + expect(subject.available?).to eq(true) + expect(subject.registered?).to eq(false) + expect(subject.created_on).to eq(nil) + expect(subject.updated_on).to eq(nil) + expect(subject.expires_on).to eq(nil) + expect(subject.registrar).to eq(nil) + expect(subject.registrant_contacts).to be_a(Array) + expect(subject.registrant_contacts).to eq([]) + expect(subject.admin_contacts).to be_a(Array) + expect(subject.admin_contacts).to eq([]) + expect(subject.technical_contacts).to be_a(Array) + expect(subject.technical_contacts).to eq([]) + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers).to eq([]) end end diff --git a/spec/whois/parsers/responses/whois.nic.dm/dm/status_registered_spec.rb b/spec/whois/parsers/responses/whois.nic.dm/dm/status_registered_spec.rb index 7c22763e..f375cbe4 100644 --- a/spec/whois/parsers/responses/whois.nic.dm/dm/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.nic.dm/dm/status_registered_spec.rb @@ -11,141 +11,86 @@ # require 'spec_helper' -require 'whois/parsers/whois.nic.dm.rb' -describe Whois::Parsers::WhoisNicDm, "status_registered.expected" do +describe "whois.nic.dm", :aggregate_failures do subject do file = fixture("responses", "whois.nic.dm/dm/status_registered.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.nic.dm") + Whois::Parser.parser_for(part) end - describe "#disclaimer" do - it do - expect(subject.disclaimer).to eq("This data is provided by DM REGISTRY for information purposes only in accordance with the DM REGISTRY TLD Privacy Policy. It is intended to assist persons to obtain information about or related to domain name registration records. DM REGISTRY does not guarantee its accuracy. By submitting this query, you agree to abide as follows:\nYou agree to use this data only for lawful purposes and that under no circumstances will you permit this data to 1) allow, enable, or otherwise support the transmission of mass unsolicited, commercial advertising or solicitations via e-mail, telephone or fax (spam); nor 2) enable high volume, automated, electronic processes to the systems of DM REGISTRY or Registrars, except as reasonably required to register new domain names or modify existing registrations; nor 3) will you generate a database of registered domain names and registrant data.\nThese terms may be changed without prior notice. By submitting this query, you agree to abide by this policy.") - end - end - describe "#domain" do - it do - expect(subject.domain).to eq("google.dm") - end - end - describe "#domain_id" do - it do - expect { subject.domain_id }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#status" do - it do - expect(subject.status).to eq(:registered) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(false) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(true) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to be_a(Time) - expect(subject.created_on).to eq(DateTime.parse("2004-08-23 23:00:00")) - end - end - describe "#updated_on" do - it do - expect(subject.updated_on).to be_a(Time) - expect(subject.updated_on).to eq(DateTime.parse("2013-07-23 17:50:34")) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to be_a(Time) - expect(subject.expires_on).to eq(DateTime.parse("2014-08-23 23:00:00")) - end - end - describe "#registrar" do - it do - expect(subject.registrar).to be_a(Whois::Parser::Registrar) - expect(subject.registrar.id).to eq(nil) - expect(subject.registrar.name).to eq("MarkMonitor Inc.") - expect(subject.registrar.url).to eq("www.markmonitor.com") - end - end - describe "#registrant_contacts" do - it do - expect(subject.registrant_contacts).to be_a(Array) - expect(subject.registrant_contacts.size).to eq(1) - expect(subject.registrant_contacts[0]).to be_a(Whois::Parser::Contact) - expect(subject.registrant_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_REGISTRANT) - expect(subject.registrant_contacts[0].id).to eq("P-CQG21") - expect(subject.registrant_contacts[0].name).to eq("Company Google Inc.") - expect(subject.registrant_contacts[0].organization).to eq(nil) - expect(subject.registrant_contacts[0].address).to eq("1600 Amphitheatre Parkway") - expect(subject.registrant_contacts[0].city).to eq("Mountain View") - expect(subject.registrant_contacts[0].zip).to eq("94043") - expect(subject.registrant_contacts[0].state).to eq(nil) - expect(subject.registrant_contacts[0].country_code).to eq("US") - expect(subject.registrant_contacts[0].phone).to eq(nil) - expect(subject.registrant_contacts[0].fax).to eq(nil) - expect(subject.registrant_contacts[0].email).to eq(nil) - end - end - describe "#admin_contacts" do - it do - expect(subject.admin_contacts).to be_a(Array) - expect(subject.admin_contacts.size).to eq(1) - expect(subject.admin_contacts[0]).to be_a(Whois::Parser::Contact) - expect(subject.admin_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_ADMINISTRATIVE) - expect(subject.admin_contacts[0].id).to eq("P-DNA22") - expect(subject.admin_contacts[0].name).to eq("DNS Admin") - expect(subject.admin_contacts[0].organization).to eq("Google Inc.") - expect(subject.admin_contacts[0].address).to eq("1600 Amphitheatre") - expect(subject.admin_contacts[0].city).to eq("Mountain View") - expect(subject.admin_contacts[0].zip).to eq("94043") - expect(subject.admin_contacts[0].state).to eq(nil) - expect(subject.admin_contacts[0].country_code).to eq("US") - expect(subject.admin_contacts[0].phone).to eq(nil) - expect(subject.admin_contacts[0].fax).to eq(nil) - expect(subject.admin_contacts[0].email).to eq(nil) - end - end - describe "#technical_contacts" do - it do - expect(subject.technical_contacts).to be_a(Array) - expect(subject.technical_contacts.size).to eq(1) - expect(subject.technical_contacts[0]).to be_a(Whois::Parser::Contact) - expect(subject.technical_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_TECHNICAL) - expect(subject.technical_contacts[0].id).to eq("P-DXA21") - expect(subject.technical_contacts[0].name).to eq("DNS Admin") - expect(subject.technical_contacts[0].organization).to eq("Google Inc.") - expect(subject.technical_contacts[0].address).to eq("1600 Amphitheatre") - expect(subject.technical_contacts[0].city).to eq("Mountain View") - expect(subject.technical_contacts[0].zip).to eq("94043") - expect(subject.technical_contacts[0].state).to eq(nil) - expect(subject.technical_contacts[0].country_code).to eq("US") - expect(subject.technical_contacts[0].phone).to eq(nil) - expect(subject.technical_contacts[0].fax).to eq(nil) - expect(subject.technical_contacts[0].email).to eq(nil) - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers.size).to eq(4) - expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[0].name).to eq("ns1.google.com") - expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[1].name).to eq("ns2.google.com") - expect(subject.nameservers[2]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[2].name).to eq("ns3.google.com") - expect(subject.nameservers[3]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[3].name).to eq("ns4.google.com") - end + it "matches status_registered.expected" do + expect(subject.disclaimer).to eq("This data is provided by DM REGISTRY for information purposes only in accordance with the DM REGISTRY TLD Privacy Policy. It is intended to assist persons to obtain information about or related to domain name registration records. DM REGISTRY does not guarantee its accuracy. By submitting this query, you agree to abide as follows:\nYou agree to use this data only for lawful purposes and that under no circumstances will you permit this data to 1) allow, enable, or otherwise support the transmission of mass unsolicited, commercial advertising or solicitations via e-mail, telephone or fax (spam); nor 2) enable high volume, automated, electronic processes to the systems of DM REGISTRY or Registrars, except as reasonably required to register new domain names or modify existing registrations; nor 3) will you generate a database of registered domain names and registrant data.\nThese terms may be changed without prior notice. By submitting this query, you agree to abide by this policy.") + expect(subject.domain).to eq("google.dm") + expect { subject.domain_id }.to raise_error(Whois::AttributeNotSupported) + expect(subject.status).to eq(:registered) + expect(subject.available?).to eq(false) + expect(subject.registered?).to eq(true) + expect(subject.created_on).to be_a(Time) + expect(subject.created_on).to eq(DateTime.parse("2004-08-23 23:00:00")) + expect(subject.updated_on).to be_a(Time) + expect(subject.updated_on).to eq(DateTime.parse("2013-07-23 17:50:34")) + expect(subject.expires_on).to be_a(Time) + expect(subject.expires_on).to eq(DateTime.parse("2014-08-23 23:00:00")) + expect(subject.registrar).to be_a(Whois::Parser::Registrar) + expect(subject.registrar.id).to eq(nil) + expect(subject.registrar.name).to eq("MarkMonitor Inc.") + expect(subject.registrar.url).to eq("www.markmonitor.com") + expect(subject.registrant_contacts).to be_a(Array) + expect(subject.registrant_contacts.size).to eq(1) + expect(subject.registrant_contacts[0]).to be_a(Whois::Parser::Contact) + expect(subject.registrant_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_REGISTRANT) + expect(subject.registrant_contacts[0].id).to eq("P-CQG21") + expect(subject.registrant_contacts[0].name).to eq("Company Google Inc.") + expect(subject.registrant_contacts[0].organization).to eq(nil) + expect(subject.registrant_contacts[0].address).to eq("1600 Amphitheatre Parkway") + expect(subject.registrant_contacts[0].city).to eq("Mountain View") + expect(subject.registrant_contacts[0].zip).to eq("94043") + expect(subject.registrant_contacts[0].state).to eq(nil) + expect(subject.registrant_contacts[0].country_code).to eq("US") + expect(subject.registrant_contacts[0].phone).to eq(nil) + expect(subject.registrant_contacts[0].fax).to eq(nil) + expect(subject.registrant_contacts[0].email).to eq(nil) + expect(subject.admin_contacts).to be_a(Array) + expect(subject.admin_contacts.size).to eq(1) + expect(subject.admin_contacts[0]).to be_a(Whois::Parser::Contact) + expect(subject.admin_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_ADMINISTRATIVE) + expect(subject.admin_contacts[0].id).to eq("P-DNA22") + expect(subject.admin_contacts[0].name).to eq("DNS Admin") + expect(subject.admin_contacts[0].organization).to eq("Google Inc.") + expect(subject.admin_contacts[0].address).to eq("1600 Amphitheatre") + expect(subject.admin_contacts[0].city).to eq("Mountain View") + expect(subject.admin_contacts[0].zip).to eq("94043") + expect(subject.admin_contacts[0].state).to eq(nil) + expect(subject.admin_contacts[0].country_code).to eq("US") + expect(subject.admin_contacts[0].phone).to eq(nil) + expect(subject.admin_contacts[0].fax).to eq(nil) + expect(subject.admin_contacts[0].email).to eq(nil) + expect(subject.technical_contacts).to be_a(Array) + expect(subject.technical_contacts.size).to eq(1) + expect(subject.technical_contacts[0]).to be_a(Whois::Parser::Contact) + expect(subject.technical_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_TECHNICAL) + expect(subject.technical_contacts[0].id).to eq("P-DXA21") + expect(subject.technical_contacts[0].name).to eq("DNS Admin") + expect(subject.technical_contacts[0].organization).to eq("Google Inc.") + expect(subject.technical_contacts[0].address).to eq("1600 Amphitheatre") + expect(subject.technical_contacts[0].city).to eq("Mountain View") + expect(subject.technical_contacts[0].zip).to eq("94043") + expect(subject.technical_contacts[0].state).to eq(nil) + expect(subject.technical_contacts[0].country_code).to eq("US") + expect(subject.technical_contacts[0].phone).to eq(nil) + expect(subject.technical_contacts[0].fax).to eq(nil) + expect(subject.technical_contacts[0].email).to eq(nil) + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers.size).to eq(4) + expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[0].name).to eq("ns1.google.com") + expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[1].name).to eq("ns2.google.com") + expect(subject.nameservers[2]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[2].name).to eq("ns3.google.com") + expect(subject.nameservers[3]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[3].name).to eq("ns4.google.com") end end diff --git a/spec/whois/parsers/responses/whois.nic.dz/dz/status_available_spec.rb b/spec/whois/parsers/responses/whois.nic.dz/dz/status_available_spec.rb index f3f728cf..938c6c39 100644 --- a/spec/whois/parsers/responses/whois.nic.dz/dz/status_available_spec.rb +++ b/spec/whois/parsers/responses/whois.nic.dz/dz/status_available_spec.rb @@ -11,49 +11,22 @@ # require 'spec_helper' -require 'whois/parsers/whois.nic.dz.rb' -describe Whois::Parsers::WhoisNicDz, "status_available.expected" do +describe "whois.nic.dz", :aggregate_failures do subject do file = fixture("responses", "whois.nic.dz/dz/status_available.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.nic.dz") + Whois::Parser.parser_for(part) end - describe "#status" do - it do - expect(subject.status).to eq(:available) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(true) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(false) - end - end - describe "#created_on" do - it do - expect { subject.created_on }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#updated_on" do - it do - expect { subject.updated_on }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#expires_on" do - it do - expect { subject.expires_on }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#nameservers" do - it do - expect { subject.nameservers }.to raise_error(Whois::AttributeNotSupported) - end + it "matches status_available.expected" do + expect(subject.status).to eq(:available) + expect(subject.available?).to eq(true) + expect(subject.registered?).to eq(false) + expect { subject.created_on }.to raise_error(Whois::AttributeNotSupported) + expect { subject.updated_on }.to raise_error(Whois::AttributeNotSupported) + expect { subject.expires_on }.to raise_error(Whois::AttributeNotSupported) + expect { subject.nameservers }.to raise_error(Whois::AttributeNotSupported) end end diff --git a/spec/whois/parsers/responses/whois.nic.dz/dz/status_registered_spec.rb b/spec/whois/parsers/responses/whois.nic.dz/dz/status_registered_spec.rb index aeaae8a9..41400858 100644 --- a/spec/whois/parsers/responses/whois.nic.dz/dz/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.nic.dz/dz/status_registered_spec.rb @@ -11,49 +11,22 @@ # require 'spec_helper' -require 'whois/parsers/whois.nic.dz.rb' -describe Whois::Parsers::WhoisNicDz, "status_registered.expected" do +describe "whois.nic.dz", :aggregate_failures do subject do file = fixture("responses", "whois.nic.dz/dz/status_registered.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.nic.dz") + Whois::Parser.parser_for(part) end - describe "#status" do - it do - expect(subject.status).to eq(:registered) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(false) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(true) - end - end - describe "#created_on" do - it do - expect { subject.created_on }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#updated_on" do - it do - expect { subject.updated_on }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#expires_on" do - it do - expect { subject.expires_on }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#nameservers" do - it do - expect { subject.nameservers }.to raise_error(Whois::AttributeNotSupported) - end + it "matches status_registered.expected" do + expect(subject.status).to eq(:registered) + expect(subject.available?).to eq(false) + expect(subject.registered?).to eq(true) + expect { subject.created_on }.to raise_error(Whois::AttributeNotSupported) + expect { subject.updated_on }.to raise_error(Whois::AttributeNotSupported) + expect { subject.expires_on }.to raise_error(Whois::AttributeNotSupported) + expect { subject.nameservers }.to raise_error(Whois::AttributeNotSupported) end end diff --git a/spec/whois/parsers/responses/whois.nic.ec/ex/status_available_spec.rb b/spec/whois/parsers/responses/whois.nic.ec/ex/status_available_spec.rb index 626c46b6..3d826b28 100644 --- a/spec/whois/parsers/responses/whois.nic.ec/ex/status_available_spec.rb +++ b/spec/whois/parsers/responses/whois.nic.ec/ex/status_available_spec.rb @@ -11,65 +11,26 @@ # require 'spec_helper' -require 'whois/parsers/whois.nic.ec.rb' -describe Whois::Parsers::WhoisNicEc, "status_available.expected" do +describe "whois.nic.ec", :aggregate_failures do subject do file = fixture("responses", "whois.nic.ec/ex/status_available.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.nic.ec") + Whois::Parser.parser_for(part) end - describe "#domain" do - it do - expect(subject.domain).to eq("u34jedzcq.ec") - end - end - describe "#domain_id" do - it do - expect { subject.domain_id }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#status" do - it do - expect(subject.status).to eq(:available) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(true) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(false) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to eq(nil) - end - end - describe "#updated_on" do - it do - expect(subject.updated_on).to eq(nil) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to eq(nil) - end - end - describe "#registrar" do - it do - expect(subject.registrar).to eq(nil) - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers).to eq([]) - end + it "matches status_available.expected" do + expect(subject.domain).to eq("u34jedzcq.ec") + expect { subject.domain_id }.to raise_error(Whois::AttributeNotSupported) + expect(subject.status).to eq(:available) + expect(subject.available?).to eq(true) + expect(subject.registered?).to eq(false) + expect(subject.created_on).to eq(nil) + expect(subject.updated_on).to eq(nil) + expect(subject.expires_on).to eq(nil) + expect(subject.registrar).to eq(nil) + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers).to eq([]) end end diff --git a/spec/whois/parsers/responses/whois.nic.ec/ex/status_registered_spec.rb b/spec/whois/parsers/responses/whois.nic.ec/ex/status_registered_spec.rb index fc266587..058aadc1 100644 --- a/spec/whois/parsers/responses/whois.nic.ec/ex/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.nic.ec/ex/status_registered_spec.rb @@ -11,87 +11,48 @@ # require 'spec_helper' -require 'whois/parsers/whois.nic.ec.rb' -describe Whois::Parsers::WhoisNicEc, "status_registered.expected" do +describe "whois.nic.ec", :aggregate_failures do subject do file = fixture("responses", "whois.nic.ec/ex/status_registered.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.nic.ec") + Whois::Parser.parser_for(part) end - describe "#domain" do - it do - expect(subject.domain).to eq("google.ec") - end - end - describe "#domain_id" do - it do - expect { subject.domain_id }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#status" do - it do - expect(subject.status).to eq(:registered) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(false) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(true) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to be_a(Time) - expect(subject.created_on).to eq(DateTime.parse("2003-10-16 00:00:00")) - end - end - describe "#updated_on" do - it do - expect(subject.updated_on).to be_a(Time) - expect(subject.updated_on).to eq(DateTime.parse("2013-09-17 00:00:00")) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to be_a(Time) - expect(subject.expires_on).to eq(DateTime.parse("2014-10-16 00:00:00")) - end - end - describe "#registrar" do - it do - expect(subject.registrar).to be_a(Whois::Parser::Registrar) - expect(subject.registrar.id).to eq(nil) - expect(subject.registrar.name).to eq("MarkMonitor Inc.") - expect(subject.registrar.url).to eq("www.markmonitor.com") - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers.size).to eq(4) - expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[0].name).to eq("ns1.google.com") - expect(subject.nameservers[0].ipv4).to eq(nil) - expect(subject.nameservers[0].ipv6).to eq(nil) - expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[1].name).to eq("ns2.google.com") - expect(subject.nameservers[1].ipv4).to eq(nil) - expect(subject.nameservers[1].ipv6).to eq(nil) - expect(subject.nameservers[2]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[2].name).to eq("ns3.google.com") - expect(subject.nameservers[2].ipv4).to eq(nil) - expect(subject.nameservers[2].ipv6).to eq(nil) - expect(subject.nameservers[3]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[3].name).to eq("ns4.google.com") - expect(subject.nameservers[3].ipv4).to eq(nil) - expect(subject.nameservers[3].ipv6).to eq(nil) - end + it "matches status_registered.expected" do + expect(subject.domain).to eq("google.ec") + expect { subject.domain_id }.to raise_error(Whois::AttributeNotSupported) + expect(subject.status).to eq(:registered) + expect(subject.available?).to eq(false) + expect(subject.registered?).to eq(true) + expect(subject.created_on).to be_a(Time) + expect(subject.created_on).to eq(DateTime.parse("2003-10-16 00:00:00")) + expect(subject.updated_on).to be_a(Time) + expect(subject.updated_on).to eq(DateTime.parse("2013-09-17 00:00:00")) + expect(subject.expires_on).to be_a(Time) + expect(subject.expires_on).to eq(DateTime.parse("2014-10-16 00:00:00")) + expect(subject.registrar).to be_a(Whois::Parser::Registrar) + expect(subject.registrar.id).to eq(nil) + expect(subject.registrar.name).to eq("MarkMonitor Inc.") + expect(subject.registrar.url).to eq("www.markmonitor.com") + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers.size).to eq(4) + expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[0].name).to eq("ns1.google.com") + expect(subject.nameservers[0].ipv4).to eq(nil) + expect(subject.nameservers[0].ipv6).to eq(nil) + expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[1].name).to eq("ns2.google.com") + expect(subject.nameservers[1].ipv4).to eq(nil) + expect(subject.nameservers[1].ipv6).to eq(nil) + expect(subject.nameservers[2]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[2].name).to eq("ns3.google.com") + expect(subject.nameservers[2].ipv4).to eq(nil) + expect(subject.nameservers[2].ipv6).to eq(nil) + expect(subject.nameservers[3]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[3].name).to eq("ns4.google.com") + expect(subject.nameservers[3].ipv4).to eq(nil) + expect(subject.nameservers[3].ipv6).to eq(nil) end end diff --git a/spec/whois/parsers/responses/whois.nic.es/es/status_available_spec.rb b/spec/whois/parsers/responses/whois.nic.es/es/status_available_spec.rb index 69bf4490..7472ec71 100644 --- a/spec/whois/parsers/responses/whois.nic.es/es/status_available_spec.rb +++ b/spec/whois/parsers/responses/whois.nic.es/es/status_available_spec.rb @@ -11,84 +11,33 @@ # require 'spec_helper' -require 'whois/parsers/whois.nic.es.rb' -describe Whois::Parsers::WhoisNicEs, "status_available.expected" do +describe "whois.nic.es", :aggregate_failures do subject do file = fixture("responses", "whois.nic.es/es/status_available.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.nic.es") + Whois::Parser.parser_for(part) end - describe "#domain" do - it do - expect(subject.domain).to eq(nil) - end - end - describe "#domain_id" do - it do - expect { subject.domain_id }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#status" do - it do - expect(subject.status).to eq(:available) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(true) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(false) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to eq(nil) - end - end - describe "#updated_on" do - it do - expect { subject.updated_on }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to eq(nil) - end - end - describe "#registrar" do - it do - expect(subject.registrar).to be_a(Whois::Parser::Registrar) - expect(subject.registrar.id).to eq(nil) - expect(subject.registrar.name).to eq("ES-NIC") - expect(subject.registrar.url).to eq(nil) - end - end - describe "#registrant_contacts" do - it do - expect(subject.registrant_contacts).to be_a(Array) - expect(subject.registrant_contacts).to eq([]) - end - end - describe "#admin_contacts" do - it do - expect { subject.admin_contacts }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#technical_contacts" do - it do - expect { subject.technical_contacts }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers).to eq([]) - end + it "matches status_available.expected" do + expect(subject.domain).to eq(nil) + expect { subject.domain_id }.to raise_error(Whois::AttributeNotSupported) + expect(subject.status).to eq(:available) + expect(subject.available?).to eq(true) + expect(subject.registered?).to eq(false) + expect(subject.created_on).to eq(nil) + expect { subject.updated_on }.to raise_error(Whois::AttributeNotSupported) + expect(subject.expires_on).to eq(nil) + expect(subject.registrar).to be_a(Whois::Parser::Registrar) + expect(subject.registrar.id).to eq(nil) + expect(subject.registrar.name).to eq("ES-NIC") + expect(subject.registrar.url).to eq(nil) + expect(subject.registrant_contacts).to be_a(Array) + expect(subject.registrant_contacts).to eq([]) + expect { subject.admin_contacts }.to raise_error(Whois::AttributeNotSupported) + expect { subject.technical_contacts }.to raise_error(Whois::AttributeNotSupported) + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers).to eq([]) end end diff --git a/spec/whois/parsers/responses/whois.nic.es/es/status_registered_spec.rb b/spec/whois/parsers/responses/whois.nic.es/es/status_registered_spec.rb index 79bb6c0e..170c2890 100644 --- a/spec/whois/parsers/responses/whois.nic.es/es/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.nic.es/es/status_registered_spec.rb @@ -11,93 +11,42 @@ # require 'spec_helper' -require 'whois/parsers/whois.nic.es.rb' -describe Whois::Parsers::WhoisNicEs, "status_registered.expected" do +describe "whois.nic.es", :aggregate_failures do subject do file = fixture("responses", "whois.nic.es/es/status_registered.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.nic.es") + Whois::Parser.parser_for(part) end - describe "#domain" do - it do - expect(subject.domain).to eq("google.es") - end - end - describe "#domain_id" do - it do - expect { subject.domain_id }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#status" do - it do - expect(subject.status).to eq(:registered) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(false) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(true) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to be_a(Time) - expect(subject.created_on).to eq(DateTime.parse("2003-09-16")) - end - end - describe "#updated_on" do - it do - expect { subject.updated_on }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to be_a(Time) - expect(subject.expires_on).to eq(DateTime.parse("2014-09-16")) - end - end - describe "#registrar" do - it do - expect(subject.registrar).to be_a(Whois::Parser::Registrar) - expect(subject.registrar.id).to eq(nil) - expect(subject.registrar.name).to eq("ES-NIC") - expect(subject.registrar.url).to eq(nil) - end - end - describe "#registrant_contacts" do - it do - expect(subject.registrant_contacts).to be_a(Array) - expect(subject.registrant_contacts.size).to eq(1) - expect(subject.registrant_contacts[0]).to be_a(Whois::Parser::Contact) - expect(subject.registrant_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_REGISTRANT) - expect(subject.registrant_contacts[0].name).to eq("GOOGLE INC.") - end - end - describe "#admin_contacts" do - it do - expect { subject.admin_contacts }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#technical_contacts" do - it do - expect { subject.technical_contacts }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers.size).to eq(4) - expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[0].name).to eq("ns2.google.com") - expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[1].name).to eq("ns1.google.com") - end + it "matches status_registered.expected" do + expect(subject.domain).to eq("google.es") + expect { subject.domain_id }.to raise_error(Whois::AttributeNotSupported) + expect(subject.status).to eq(:registered) + expect(subject.available?).to eq(false) + expect(subject.registered?).to eq(true) + expect(subject.created_on).to be_a(Time) + expect(subject.created_on).to eq(DateTime.parse("2003-09-16")) + expect { subject.updated_on }.to raise_error(Whois::AttributeNotSupported) + expect(subject.expires_on).to be_a(Time) + expect(subject.expires_on).to eq(DateTime.parse("2014-09-16")) + expect(subject.registrar).to be_a(Whois::Parser::Registrar) + expect(subject.registrar.id).to eq(nil) + expect(subject.registrar.name).to eq("ES-NIC") + expect(subject.registrar.url).to eq(nil) + expect(subject.registrant_contacts).to be_a(Array) + expect(subject.registrant_contacts.size).to eq(1) + expect(subject.registrant_contacts[0]).to be_a(Whois::Parser::Contact) + expect(subject.registrant_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_REGISTRANT) + expect(subject.registrant_contacts[0].name).to eq("GOOGLE INC.") + expect { subject.admin_contacts }.to raise_error(Whois::AttributeNotSupported) + expect { subject.technical_contacts }.to raise_error(Whois::AttributeNotSupported) + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers.size).to eq(4) + expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[0].name).to eq("ns2.google.com") + expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[1].name).to eq("ns1.google.com") end end diff --git a/spec/whois/parsers/responses/whois.nic.fm/fm/status_available_spec.rb b/spec/whois/parsers/responses/whois.nic.fm/fm/status_available_spec.rb index 51cd94cc..bea520e9 100644 --- a/spec/whois/parsers/responses/whois.nic.fm/fm/status_available_spec.rb +++ b/spec/whois/parsers/responses/whois.nic.fm/fm/status_available_spec.rb @@ -11,83 +11,32 @@ # require 'spec_helper' -require 'whois/parsers/whois.nic.fm.rb' -describe Whois::Parsers::WhoisNicFm, "status_available.expected" do +describe "whois.nic.fm", :aggregate_failures do subject do file = fixture("responses", "whois.nic.fm/fm/status_available.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.nic.fm") + Whois::Parser.parser_for(part) end - describe "#domain" do - it do - expect(subject.domain).to eq(nil) - end - end - describe "#domain_id" do - it do - expect(subject.domain_id).to eq(nil) - end - end - describe "#status" do - it do - expect(subject.status).to eq(:available) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(true) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(false) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to eq(nil) - end - end - describe "#updated_on" do - it do - expect(subject.updated_on).to eq(nil) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to eq(nil) - end - end - describe "#registrar" do - it do - expect(subject.registrar).to eq(nil) - end - end - describe "#registrant_contacts" do - it do - expect(subject.registrant_contacts).to be_a(Array) - expect(subject.registrant_contacts).to eq([]) - end - end - describe "#admin_contacts" do - it do - expect(subject.admin_contacts).to be_a(Array) - expect(subject.admin_contacts).to eq([]) - end - end - describe "#technical_contacts" do - it do - expect(subject.technical_contacts).to be_a(Array) - expect(subject.technical_contacts).to eq([]) - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers).to eq([]) - end + it "matches status_available.expected" do + expect(subject.domain).to eq(nil) + expect(subject.domain_id).to eq(nil) + expect(subject.status).to eq(:available) + expect(subject.available?).to eq(true) + expect(subject.registered?).to eq(false) + expect(subject.created_on).to eq(nil) + expect(subject.updated_on).to eq(nil) + expect(subject.expires_on).to eq(nil) + expect(subject.registrar).to eq(nil) + expect(subject.registrant_contacts).to be_a(Array) + expect(subject.registrant_contacts).to eq([]) + expect(subject.admin_contacts).to be_a(Array) + expect(subject.admin_contacts).to eq([]) + expect(subject.technical_contacts).to be_a(Array) + expect(subject.technical_contacts).to eq([]) + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers).to eq([]) end end diff --git a/spec/whois/parsers/responses/whois.nic.fm/fm/status_registered_spec.rb b/spec/whois/parsers/responses/whois.nic.fm/fm/status_registered_spec.rb index 73b8ba01..609b68c1 100644 --- a/spec/whois/parsers/responses/whois.nic.fm/fm/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.nic.fm/fm/status_registered_spec.rb @@ -11,133 +11,82 @@ # require 'spec_helper' -require 'whois/parsers/whois.nic.fm.rb' -describe Whois::Parsers::WhoisNicFm, "status_registered.expected" do +describe "whois.nic.fm", :aggregate_failures do subject do file = fixture("responses", "whois.nic.fm/fm/status_registered.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.nic.fm") + Whois::Parser.parser_for(part) end - describe "#domain" do - it do - expect(subject.domain).to eq("google.fm") - end - end - describe "#domain_id" do - it do - expect(subject.domain_id).to eq("D34865469-CNIC") - end - end - describe "#status" do - it do - expect(subject.status).to eq(:registered) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(false) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(true) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to be_a(Time) - expect(subject.created_on).to eq(DateTime.parse("2000-09-05T23:59:59.0Z")) - end - end - describe "#updated_on" do - it do - expect(subject.updated_on).to be_a(Time) - expect(subject.updated_on).to eq(DateTime.parse("2017-10-20T17:48:39.0Z")) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to be_a(Time) - expect(subject.expires_on).to eq(DateTime.parse("2018-09-04T23:59:59.0Z")) - end - end - describe "#registrar" do - it do - expect(subject.registrar).to be_a(Whois::Parser::Registrar) - expect(subject.registrar.id).to eq("292") - expect(subject.registrar.name).to eq("MarkMonitor, Inc.") - end - end - describe "#registrant_contacts" do - it do - expect(subject.registrant_contacts).to be_a(Array) - expect(subject.registrant_contacts.size).to eq(1) - expect(subject.registrant_contacts[0]).to be_a(Whois::Parser::Contact) - expect(subject.registrant_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_REGISTRANT) - expect(subject.registrant_contacts[0].id).to eq("C78398194-CNIC") - expect(subject.registrant_contacts[0].name).to eq("DNS Admin") - expect(subject.registrant_contacts[0].organization).to eq("Google, Inc.") - expect(subject.registrant_contacts[0].address).to eq("1600 Amphitheatre Parkway") - expect(subject.registrant_contacts[0].city).to eq("Mountain View") - expect(subject.registrant_contacts[0].zip).to eq("94043") - expect(subject.registrant_contacts[0].state).to eq("CA") - expect(subject.registrant_contacts[0].country_code).to eq("US") - expect(subject.registrant_contacts[0].phone).to eq("+1.6503300100") - expect(subject.registrant_contacts[0].fax).to eq("+1.6506181499") - expect(subject.registrant_contacts[0].email).to eq("dns-admin@GOOGLE.COM") - end - end - describe "#admin_contacts" do - it do - expect(subject.admin_contacts).to be_a(Array) - expect(subject.admin_contacts.size).to eq(1) - expect(subject.admin_contacts[0]).to be_a(Whois::Parser::Contact) - expect(subject.admin_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_ADMINISTRATIVE) - expect(subject.admin_contacts[0].id).to eq("C78398194-CNIC") - expect(subject.admin_contacts[0].name).to eq("DNS Admin") - expect(subject.admin_contacts[0].organization).to eq("Google, Inc.") - expect(subject.admin_contacts[0].address).to eq("1600 Amphitheatre Parkway") - expect(subject.admin_contacts[0].city).to eq("Mountain View") - expect(subject.admin_contacts[0].zip).to eq("94043") - expect(subject.admin_contacts[0].state).to eq("CA") - expect(subject.admin_contacts[0].country_code).to eq("US") - expect(subject.admin_contacts[0].phone).to eq("+1.6503300100") - expect(subject.admin_contacts[0].fax).to eq("+1.6506181499") - expect(subject.admin_contacts[0].email).to eq("dns-admin@GOOGLE.COM") - end - end - describe "#technical_contacts" do - it do - expect(subject.technical_contacts).to be_a(Array) - expect(subject.technical_contacts.size).to eq(1) - expect(subject.technical_contacts[0]).to be_a(Whois::Parser::Contact) - expect(subject.technical_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_TECHNICAL) - expect(subject.technical_contacts[0].id).to eq("C78398194-CNIC") - expect(subject.technical_contacts[0].name).to eq("DNS Admin") - expect(subject.technical_contacts[0].organization).to eq("Google, Inc.") - expect(subject.technical_contacts[0].address).to eq("1600 Amphitheatre Parkway") - expect(subject.technical_contacts[0].city).to eq("Mountain View") - expect(subject.technical_contacts[0].zip).to eq("94043") - expect(subject.technical_contacts[0].state).to eq("CA") - expect(subject.technical_contacts[0].country_code).to eq("US") - expect(subject.technical_contacts[0].phone).to eq("+1.6503300100") - expect(subject.technical_contacts[0].fax).to eq("+1.6506181499") - expect(subject.technical_contacts[0].email).to eq("dns-admin@GOOGLE.COM") - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers.size).to eq(3) - expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[0].name).to eq("ns1.google.com") - expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[1].name).to eq("ns3.google.com") - expect(subject.nameservers[2]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[2].name).to eq("ns2.google.com") - end + it "matches status_registered.expected" do + expect(subject.domain).to eq("google.fm") + expect(subject.domain_id).to eq("D34865469-CNIC") + expect(subject.status).to eq(:registered) + expect(subject.available?).to eq(false) + expect(subject.registered?).to eq(true) + expect(subject.created_on).to be_a(Time) + expect(subject.created_on).to eq(DateTime.parse("2000-09-05T23:59:59.0Z")) + expect(subject.updated_on).to be_a(Time) + expect(subject.updated_on).to eq(DateTime.parse("2017-10-20T17:48:39.0Z")) + expect(subject.expires_on).to be_a(Time) + expect(subject.expires_on).to eq(DateTime.parse("2018-09-04T23:59:59.0Z")) + expect(subject.registrar).to be_a(Whois::Parser::Registrar) + expect(subject.registrar.id).to eq("292") + expect(subject.registrar.name).to eq("MarkMonitor, Inc.") + expect(subject.registrant_contacts).to be_a(Array) + expect(subject.registrant_contacts.size).to eq(1) + expect(subject.registrant_contacts[0]).to be_a(Whois::Parser::Contact) + expect(subject.registrant_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_REGISTRANT) + expect(subject.registrant_contacts[0].id).to eq("C78398194-CNIC") + expect(subject.registrant_contacts[0].name).to eq("DNS Admin") + expect(subject.registrant_contacts[0].organization).to eq("Google, Inc.") + expect(subject.registrant_contacts[0].address).to eq("1600 Amphitheatre Parkway") + expect(subject.registrant_contacts[0].city).to eq("Mountain View") + expect(subject.registrant_contacts[0].zip).to eq("94043") + expect(subject.registrant_contacts[0].state).to eq("CA") + expect(subject.registrant_contacts[0].country_code).to eq("US") + expect(subject.registrant_contacts[0].phone).to eq("+1.6503300100") + expect(subject.registrant_contacts[0].fax).to eq("+1.6506181499") + expect(subject.registrant_contacts[0].email).to eq("dns-admin@GOOGLE.COM") + expect(subject.admin_contacts).to be_a(Array) + expect(subject.admin_contacts.size).to eq(1) + expect(subject.admin_contacts[0]).to be_a(Whois::Parser::Contact) + expect(subject.admin_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_ADMINISTRATIVE) + expect(subject.admin_contacts[0].id).to eq("C78398194-CNIC") + expect(subject.admin_contacts[0].name).to eq("DNS Admin") + expect(subject.admin_contacts[0].organization).to eq("Google, Inc.") + expect(subject.admin_contacts[0].address).to eq("1600 Amphitheatre Parkway") + expect(subject.admin_contacts[0].city).to eq("Mountain View") + expect(subject.admin_contacts[0].zip).to eq("94043") + expect(subject.admin_contacts[0].state).to eq("CA") + expect(subject.admin_contacts[0].country_code).to eq("US") + expect(subject.admin_contacts[0].phone).to eq("+1.6503300100") + expect(subject.admin_contacts[0].fax).to eq("+1.6506181499") + expect(subject.admin_contacts[0].email).to eq("dns-admin@GOOGLE.COM") + expect(subject.technical_contacts).to be_a(Array) + expect(subject.technical_contacts.size).to eq(1) + expect(subject.technical_contacts[0]).to be_a(Whois::Parser::Contact) + expect(subject.technical_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_TECHNICAL) + expect(subject.technical_contacts[0].id).to eq("C78398194-CNIC") + expect(subject.technical_contacts[0].name).to eq("DNS Admin") + expect(subject.technical_contacts[0].organization).to eq("Google, Inc.") + expect(subject.technical_contacts[0].address).to eq("1600 Amphitheatre Parkway") + expect(subject.technical_contacts[0].city).to eq("Mountain View") + expect(subject.technical_contacts[0].zip).to eq("94043") + expect(subject.technical_contacts[0].state).to eq("CA") + expect(subject.technical_contacts[0].country_code).to eq("US") + expect(subject.technical_contacts[0].phone).to eq("+1.6503300100") + expect(subject.technical_contacts[0].fax).to eq("+1.6506181499") + expect(subject.technical_contacts[0].email).to eq("dns-admin@GOOGLE.COM") + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers.size).to eq(3) + expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[0].name).to eq("ns1.google.com") + expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[1].name).to eq("ns3.google.com") + expect(subject.nameservers[2]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[2].name).to eq("ns2.google.com") end end diff --git a/spec/whois/parsers/responses/whois.nic.fo/fo/status_available_spec.rb b/spec/whois/parsers/responses/whois.nic.fo/fo/status_available_spec.rb index 89a8997e..534ac82a 100644 --- a/spec/whois/parsers/responses/whois.nic.fo/fo/status_available_spec.rb +++ b/spec/whois/parsers/responses/whois.nic.fo/fo/status_available_spec.rb @@ -11,83 +11,32 @@ # require 'spec_helper' -require 'whois/parsers/whois.nic.fo.rb' -describe Whois::Parsers::WhoisNicFo, "status_available.expected" do +describe "whois.nic.fo", :aggregate_failures do subject do file = fixture("responses", "whois.nic.fo/fo/status_available.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.nic.fo") + Whois::Parser.parser_for(part) end - describe "#domain" do - it do - expect(subject.domain).to eq(nil) - end - end - describe "#domain_id" do - it do - expect { subject.domain_id }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#status" do - it do - expect(subject.status).to eq(:available) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(true) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(false) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to eq(nil) - end - end - describe "#updated_on" do - it do - expect(subject.updated_on).to eq(nil) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to eq(nil) - end - end - describe "#registrar" do - it do - expect { subject.registrar }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#registrant_contacts" do - it do - expect(subject.registrant_contacts).to be_a(Array) - expect(subject.registrant_contacts).to eq([]) - end - end - describe "#admin_contacts" do - it do - expect(subject.admin_contacts).to be_a(Array) - expect(subject.admin_contacts).to eq([]) - end - end - describe "#technical_contacts" do - it do - expect(subject.technical_contacts).to be_a(Array) - expect(subject.technical_contacts).to eq([]) - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers).to eq([]) - end + it "matches status_available.expected" do + expect(subject.domain).to eq(nil) + expect { subject.domain_id }.to raise_error(Whois::AttributeNotSupported) + expect(subject.status).to eq(:available) + expect(subject.available?).to eq(true) + expect(subject.registered?).to eq(false) + expect(subject.created_on).to eq(nil) + expect(subject.updated_on).to eq(nil) + expect(subject.expires_on).to eq(nil) + expect { subject.registrar }.to raise_error(Whois::AttributeNotSupported) + expect(subject.registrant_contacts).to be_a(Array) + expect(subject.registrant_contacts).to eq([]) + expect(subject.admin_contacts).to be_a(Array) + expect(subject.admin_contacts).to eq([]) + expect(subject.technical_contacts).to be_a(Array) + expect(subject.technical_contacts).to eq([]) + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers).to eq([]) end end diff --git a/spec/whois/parsers/responses/whois.nic.fo/fo/status_registered_spec.rb b/spec/whois/parsers/responses/whois.nic.fo/fo/status_registered_spec.rb index d9573d82..3c9c7baa 100644 --- a/spec/whois/parsers/responses/whois.nic.fo/fo/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.nic.fo/fo/status_registered_spec.rb @@ -11,125 +11,74 @@ # require 'spec_helper' -require 'whois/parsers/whois.nic.fo.rb' -describe Whois::Parsers::WhoisNicFo, "status_registered.expected" do +describe "whois.nic.fo", :aggregate_failures do subject do file = fixture("responses", "whois.nic.fo/fo/status_registered.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.nic.fo") + Whois::Parser.parser_for(part) end - describe "#domain" do - it do - expect(subject.domain).to eq("nic.fo") - end - end - describe "#domain_id" do - it do - expect { subject.domain_id }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#status" do - it do - expect(subject.status).to eq(:registered) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(false) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(true) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to be_a(Time) - expect(subject.created_on).to eq(DateTime.parse("2010-06-03 03:34:05")) - end - end - describe "#updated_on" do - it do - expect(subject.updated_on).to be_a(Time) - expect(subject.updated_on).to eq(DateTime.parse("2011-07-12 12:52:57")) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to be_a(Time) - expect(subject.expires_on).to eq(DateTime.parse("2015-01-03")) - end - end - describe "#registrar" do - it do - expect { subject.registrar }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#registrant_contacts" do - it do - expect(subject.registrant_contacts).to be_a(Array) - expect(subject.registrant_contacts.size).to eq(1) - expect(subject.registrant_contacts[0]).to be_a(Whois::Parser::Contact) - expect(subject.registrant_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_REGISTRANT) - expect(subject.registrant_contacts[0].id).to eq("ID005359") - expect(subject.registrant_contacts[0].name).to eq(nil) - expect(subject.registrant_contacts[0].organization).to eq("FO-umsitingin") - expect(subject.registrant_contacts[0].address).to eq("Hoydalsvegur 19, Postboks 1255") - expect(subject.registrant_contacts[0].city).to eq("Torshavn") - expect(subject.registrant_contacts[0].zip).to eq("110") - expect(subject.registrant_contacts[0].state).to eq(nil) - expect(subject.registrant_contacts[0].country).to eq(nil) - expect(subject.registrant_contacts[0].country_code).to eq("FO") - expect(subject.registrant_contacts[0].phone).to eq("+298.322400") - expect(subject.registrant_contacts[0].fax).to eq(nil) - expect(subject.registrant_contacts[0].email).to eq(nil) - expect(subject.registrant_contacts[0].created_on).to eq(DateTime.parse("2010-07-21 19:11:55")) - end - end - describe "#admin_contacts" do - it do - expect(subject.admin_contacts).to be_a(Array) - expect(subject.admin_contacts).to eq([]) - end - end - describe "#technical_contacts" do - it do - expect(subject.technical_contacts).to be_a(Array) - expect(subject.technical_contacts.size).to eq(1) - expect(subject.technical_contacts[0]).to be_a(Whois::Parser::Contact) - expect(subject.technical_contacts[0].id).to eq("ID005359") - expect(subject.technical_contacts[0].name).to eq(nil) - expect(subject.technical_contacts[0].organization).to eq("FO-umsitingin") - expect(subject.technical_contacts[0].address).to eq("Hoydalsvegur 19, Postboks 1255") - expect(subject.technical_contacts[0].city).to eq("Torshavn") - expect(subject.technical_contacts[0].zip).to eq("110") - expect(subject.technical_contacts[0].state).to eq(nil) - expect(subject.technical_contacts[0].country).to eq(nil) - expect(subject.technical_contacts[0].country_code).to eq("FO") - expect(subject.technical_contacts[0].phone).to eq("+298.322400") - expect(subject.technical_contacts[0].fax).to eq(nil) - expect(subject.technical_contacts[0].email).to eq(nil) - expect(subject.technical_contacts[0].created_on).to eq(DateTime.parse("2010-07-21 19:11:55")) - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers.size).to eq(5) - expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[0].name).to eq("ns1.gratisdns.dk") - expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[1].name).to eq("ns2.gratisdns.dk") - expect(subject.nameservers[2]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[2].name).to eq("ns3.gratisdns.dk") - expect(subject.nameservers[3]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[3].name).to eq("ns4.gratisdns.dk") - expect(subject.nameservers[4]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[4].name).to eq("ns5.gratisdns.dk") - end + it "matches status_registered.expected" do + expect(subject.domain).to eq("nic.fo") + expect { subject.domain_id }.to raise_error(Whois::AttributeNotSupported) + expect(subject.status).to eq(:registered) + expect(subject.available?).to eq(false) + expect(subject.registered?).to eq(true) + expect(subject.created_on).to be_a(Time) + expect(subject.created_on).to eq(DateTime.parse("2010-06-03 03:34:05")) + expect(subject.updated_on).to be_a(Time) + expect(subject.updated_on).to eq(DateTime.parse("2011-07-12 12:52:57")) + expect(subject.expires_on).to be_a(Time) + expect(subject.expires_on).to eq(DateTime.parse("2015-01-03")) + expect { subject.registrar }.to raise_error(Whois::AttributeNotSupported) + expect(subject.registrant_contacts).to be_a(Array) + expect(subject.registrant_contacts.size).to eq(1) + expect(subject.registrant_contacts[0]).to be_a(Whois::Parser::Contact) + expect(subject.registrant_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_REGISTRANT) + expect(subject.registrant_contacts[0].id).to eq("ID005359") + expect(subject.registrant_contacts[0].name).to eq(nil) + expect(subject.registrant_contacts[0].organization).to eq("FO-umsitingin") + expect(subject.registrant_contacts[0].address).to eq("Hoydalsvegur 19, Postboks 1255") + expect(subject.registrant_contacts[0].city).to eq("Torshavn") + expect(subject.registrant_contacts[0].zip).to eq("110") + expect(subject.registrant_contacts[0].state).to eq(nil) + expect(subject.registrant_contacts[0].country).to eq(nil) + expect(subject.registrant_contacts[0].country_code).to eq("FO") + expect(subject.registrant_contacts[0].phone).to eq("+298.322400") + expect(subject.registrant_contacts[0].fax).to eq(nil) + expect(subject.registrant_contacts[0].email).to eq(nil) + expect(subject.registrant_contacts[0].created_on).to eq(DateTime.parse("2010-07-21 19:11:55")) + expect(subject.admin_contacts).to be_a(Array) + expect(subject.admin_contacts).to eq([]) + expect(subject.technical_contacts).to be_a(Array) + expect(subject.technical_contacts.size).to eq(1) + expect(subject.technical_contacts[0]).to be_a(Whois::Parser::Contact) + expect(subject.technical_contacts[0].id).to eq("ID005359") + expect(subject.technical_contacts[0].name).to eq(nil) + expect(subject.technical_contacts[0].organization).to eq("FO-umsitingin") + expect(subject.technical_contacts[0].address).to eq("Hoydalsvegur 19, Postboks 1255") + expect(subject.technical_contacts[0].city).to eq("Torshavn") + expect(subject.technical_contacts[0].zip).to eq("110") + expect(subject.technical_contacts[0].state).to eq(nil) + expect(subject.technical_contacts[0].country).to eq(nil) + expect(subject.technical_contacts[0].country_code).to eq("FO") + expect(subject.technical_contacts[0].phone).to eq("+298.322400") + expect(subject.technical_contacts[0].fax).to eq(nil) + expect(subject.technical_contacts[0].email).to eq(nil) + expect(subject.technical_contacts[0].created_on).to eq(DateTime.parse("2010-07-21 19:11:55")) + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers.size).to eq(5) + expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[0].name).to eq("ns1.gratisdns.dk") + expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[1].name).to eq("ns2.gratisdns.dk") + expect(subject.nameservers[2]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[2].name).to eq("ns3.gratisdns.dk") + expect(subject.nameservers[3]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[3].name).to eq("ns4.gratisdns.dk") + expect(subject.nameservers[4]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[4].name).to eq("ns5.gratisdns.dk") end end diff --git a/spec/whois/parsers/responses/whois.nic.fr/fr/property_contact_without_changed_spec.rb b/spec/whois/parsers/responses/whois.nic.fr/fr/property_contact_without_changed_spec.rb index a9e3ce45..b586a65d 100644 --- a/spec/whois/parsers/responses/whois.nic.fr/fr/property_contact_without_changed_spec.rb +++ b/spec/whois/parsers/responses/whois.nic.fr/fr/property_contact_without_changed_spec.rb @@ -11,35 +11,32 @@ # require 'spec_helper' -require 'whois/parsers/whois.nic.fr.rb' -describe Whois::Parsers::WhoisNicFr, "property_contact_without_changed.expected" do +describe "whois.nic.fr", :aggregate_failures do subject do file = fixture("responses", "whois.nic.fr/fr/property_contact_without_changed.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.nic.fr") + Whois::Parser.parser_for(part) end - describe "#admin_contacts" do - it do - expect(subject.admin_contacts).to be_a(Array) - expect(subject.admin_contacts.size).to eq(1) - expect(subject.admin_contacts[0]).to be_a(Whois::Parser::Contact) - expect(subject.admin_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_ADMINISTRATIVE) - expect(subject.admin_contacts[0].id).to eq("JMR39-FRNIC") - expect(subject.admin_contacts[0].name).to eq("Jean Marc Raimondo") - expect(subject.admin_contacts[0].organization).to eq("1C2") - expect(subject.admin_contacts[0].address).to eq("20-22, rue Louis Armand\n75015 Paris") - expect(subject.admin_contacts[0].city).to eq(nil) - expect(subject.admin_contacts[0].zip).to eq(nil) - expect(subject.admin_contacts[0].state).to eq(nil) - expect(subject.admin_contacts[0].country).to eq(nil) - expect(subject.admin_contacts[0].country_code).to eq("FR") - expect(subject.admin_contacts[0].phone).to eq("+33 1 30 62 40 06") - expect(subject.admin_contacts[0].fax).to eq(nil) - expect(subject.admin_contacts[0].email).to eq("jmr@1c2.com") - expect(subject.admin_contacts[0].updated_on).to eq(nil) - end + it "matches property_contact_without_changed.expected" do + expect(subject.admin_contacts).to be_a(Array) + expect(subject.admin_contacts.size).to eq(1) + expect(subject.admin_contacts[0]).to be_a(Whois::Parser::Contact) + expect(subject.admin_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_ADMINISTRATIVE) + expect(subject.admin_contacts[0].id).to eq("JMR39-FRNIC") + expect(subject.admin_contacts[0].name).to eq("Jean Marc Raimondo") + expect(subject.admin_contacts[0].organization).to eq("1C2") + expect(subject.admin_contacts[0].address).to eq("20-22, rue Louis Armand\n75015 Paris") + expect(subject.admin_contacts[0].city).to eq(nil) + expect(subject.admin_contacts[0].zip).to eq(nil) + expect(subject.admin_contacts[0].state).to eq(nil) + expect(subject.admin_contacts[0].country).to eq(nil) + expect(subject.admin_contacts[0].country_code).to eq("FR") + expect(subject.admin_contacts[0].phone).to eq("+33 1 30 62 40 06") + expect(subject.admin_contacts[0].fax).to eq(nil) + expect(subject.admin_contacts[0].email).to eq("jmr@1c2.com") + expect(subject.admin_contacts[0].updated_on).to eq(nil) end end diff --git a/spec/whois/parsers/responses/whois.nic.fr/fr/property_nameservers_multiple_ipv4_spec.rb b/spec/whois/parsers/responses/whois.nic.fr/fr/property_nameservers_multiple_ipv4_spec.rb index 0717441f..7fc39e9d 100644 --- a/spec/whois/parsers/responses/whois.nic.fr/fr/property_nameservers_multiple_ipv4_spec.rb +++ b/spec/whois/parsers/responses/whois.nic.fr/fr/property_nameservers_multiple_ipv4_spec.rb @@ -11,28 +11,25 @@ # require 'spec_helper' -require 'whois/parsers/whois.nic.fr.rb' -describe Whois::Parsers::WhoisNicFr, "property_nameservers_multiple_ipv4.expected" do +describe "whois.nic.fr", :aggregate_failures do subject do file = fixture("responses", "whois.nic.fr/fr/property_nameservers_multiple_ipv4.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.nic.fr") + Whois::Parser.parser_for(part) end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers.size).to eq(2) - expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[0].name).to eq("ns1.boursedirect.fr") - expect(subject.nameservers[0].ipv4).to eq("212.157.203.190") - expect(subject.nameservers[0].ipv6).to eq(nil) - expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[1].name).to eq("ns2.boursedirect.fr") - expect(subject.nameservers[1].ipv4).to eq("212.157.203.189") - expect(subject.nameservers[1].ipv6).to eq(nil) - end + it "matches property_nameservers_multiple_ipv4.expected" do + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers.size).to eq(2) + expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[0].name).to eq("ns1.boursedirect.fr") + expect(subject.nameservers[0].ipv4).to eq("212.157.203.190") + expect(subject.nameservers[0].ipv6).to eq(nil) + expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[1].name).to eq("ns2.boursedirect.fr") + expect(subject.nameservers[1].ipv4).to eq("212.157.203.189") + expect(subject.nameservers[1].ipv6).to eq(nil) end end diff --git a/spec/whois/parsers/responses/whois.nic.fr/fr/property_nameservers_spec.rb b/spec/whois/parsers/responses/whois.nic.fr/fr/property_nameservers_spec.rb index a74fd564..de41f94f 100644 --- a/spec/whois/parsers/responses/whois.nic.fr/fr/property_nameservers_spec.rb +++ b/spec/whois/parsers/responses/whois.nic.fr/fr/property_nameservers_spec.rb @@ -11,28 +11,25 @@ # require 'spec_helper' -require 'whois/parsers/whois.nic.fr.rb' -describe Whois::Parsers::WhoisNicFr, "property_nameservers.expected" do +describe "whois.nic.fr", :aggregate_failures do subject do file = fixture("responses", "whois.nic.fr/fr/property_nameservers.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.nic.fr") + Whois::Parser.parser_for(part) end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers.size).to eq(4) - expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[0].name).to eq("ns1.google.com") - expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[1].name).to eq("ns2.google.com") - expect(subject.nameservers[2]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[2].name).to eq("ns3.google.com") - expect(subject.nameservers[3]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[3].name).to eq("ns4.google.com") - end + it "matches property_nameservers.expected" do + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers.size).to eq(4) + expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[0].name).to eq("ns1.google.com") + expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[1].name).to eq("ns2.google.com") + expect(subject.nameservers[2]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[2].name).to eq("ns3.google.com") + expect(subject.nameservers[3]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[3].name).to eq("ns4.google.com") end end diff --git a/spec/whois/parsers/responses/whois.nic.fr/fr/property_nameservers_with_ipv4_and_some_ipv6_spec.rb b/spec/whois/parsers/responses/whois.nic.fr/fr/property_nameservers_with_ipv4_and_some_ipv6_spec.rb index 8927c6a2..add75d1c 100644 --- a/spec/whois/parsers/responses/whois.nic.fr/fr/property_nameservers_with_ipv4_and_some_ipv6_spec.rb +++ b/spec/whois/parsers/responses/whois.nic.fr/fr/property_nameservers_with_ipv4_and_some_ipv6_spec.rb @@ -11,44 +11,41 @@ # require 'spec_helper' -require 'whois/parsers/whois.nic.fr.rb' -describe Whois::Parsers::WhoisNicFr, "property_nameservers_with_ipv4_and_some_ipv6.expected" do +describe "whois.nic.fr", :aggregate_failures do subject do file = fixture("responses", "whois.nic.fr/fr/property_nameservers_with_ipv4_and_some_ipv6.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.nic.fr") + Whois::Parser.parser_for(part) end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers.size).to eq(6) - expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[0].name).to eq("ns1.nic.fr") - expect(subject.nameservers[0].ipv4).to eq("192.134.4.1") - expect(subject.nameservers[0].ipv6).to eq("2001:660:3003:2::4:1") - expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[1].name).to eq("ns2.nic.fr") - expect(subject.nameservers[1].ipv4).to eq("192.93.0.4") - expect(subject.nameservers[1].ipv6).to eq("2001:660:3005:1::1:2") - expect(subject.nameservers[2]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[2].name).to eq("ns3.nic.fr") - expect(subject.nameservers[2].ipv4).to eq("192.134.0.49") - expect(subject.nameservers[2].ipv6).to eq("2001:660:3006:1::1:1") - expect(subject.nameservers[3]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[3].name).to eq("ns1.ext.nic.fr") - expect(subject.nameservers[3].ipv4).to eq("193.51.208.13") - expect(subject.nameservers[3].ipv6).to eq(nil) - expect(subject.nameservers[4]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[4].name).to eq("ns4.ext.nic.fr") - expect(subject.nameservers[4].ipv4).to eq("193.0.9.4") - expect(subject.nameservers[4].ipv6).to eq("2001:67c:e0::4") - expect(subject.nameservers[5]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[5].name).to eq("ns5.ext.nic.fr") - expect(subject.nameservers[5].ipv4).to eq("206.167.244.5") - expect(subject.nameservers[5].ipv6).to eq(nil) - end + it "matches property_nameservers_with_ipv4_and_some_ipv6.expected" do + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers.size).to eq(6) + expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[0].name).to eq("ns1.nic.fr") + expect(subject.nameservers[0].ipv4).to eq("192.134.4.1") + expect(subject.nameservers[0].ipv6).to eq("2001:660:3003:2::4:1") + expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[1].name).to eq("ns2.nic.fr") + expect(subject.nameservers[1].ipv4).to eq("192.93.0.4") + expect(subject.nameservers[1].ipv6).to eq("2001:660:3005:1::1:2") + expect(subject.nameservers[2]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[2].name).to eq("ns3.nic.fr") + expect(subject.nameservers[2].ipv4).to eq("192.134.0.49") + expect(subject.nameservers[2].ipv6).to eq("2001:660:3006:1::1:1") + expect(subject.nameservers[3]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[3].name).to eq("ns1.ext.nic.fr") + expect(subject.nameservers[3].ipv4).to eq("193.51.208.13") + expect(subject.nameservers[3].ipv6).to eq(nil) + expect(subject.nameservers[4]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[4].name).to eq("ns4.ext.nic.fr") + expect(subject.nameservers[4].ipv4).to eq("193.0.9.4") + expect(subject.nameservers[4].ipv6).to eq("2001:67c:e0::4") + expect(subject.nameservers[5]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[5].name).to eq("ns5.ext.nic.fr") + expect(subject.nameservers[5].ipv4).to eq("206.167.244.5") + expect(subject.nameservers[5].ipv6).to eq(nil) end end diff --git a/spec/whois/parsers/responses/whois.nic.fr/fr/property_status_active_spec.rb b/spec/whois/parsers/responses/whois.nic.fr/fr/property_status_active_spec.rb index e33a7c20..4ccacc1f 100644 --- a/spec/whois/parsers/responses/whois.nic.fr/fr/property_status_active_spec.rb +++ b/spec/whois/parsers/responses/whois.nic.fr/fr/property_status_active_spec.rb @@ -11,29 +11,18 @@ # require 'spec_helper' -require 'whois/parsers/whois.nic.fr.rb' -describe Whois::Parsers::WhoisNicFr, "property_status_active.expected" do +describe "whois.nic.fr", :aggregate_failures do subject do file = fixture("responses", "whois.nic.fr/fr/property_status_active.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.nic.fr") + Whois::Parser.parser_for(part) end - describe "#status" do - it do - expect(subject.status).to eq(:registered) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(false) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(true) - end + it "matches property_status_active.expected" do + expect(subject.status).to eq(:registered) + expect(subject.available?).to eq(false) + expect(subject.registered?).to eq(true) end end diff --git a/spec/whois/parsers/responses/whois.nic.fr/fr/property_status_blocked_spec.rb b/spec/whois/parsers/responses/whois.nic.fr/fr/property_status_blocked_spec.rb index cc35687c..b86e350d 100644 --- a/spec/whois/parsers/responses/whois.nic.fr/fr/property_status_blocked_spec.rb +++ b/spec/whois/parsers/responses/whois.nic.fr/fr/property_status_blocked_spec.rb @@ -11,29 +11,18 @@ # require 'spec_helper' -require 'whois/parsers/whois.nic.fr.rb' -describe Whois::Parsers::WhoisNicFr, "property_status_blocked.expected" do +describe "whois.nic.fr", :aggregate_failures do subject do file = fixture("responses", "whois.nic.fr/fr/property_status_blocked.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.nic.fr") + Whois::Parser.parser_for(part) end - describe "#status" do - it do - expect(subject.status).to eq(:inactive) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(false) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(true) - end + it "matches property_status_blocked.expected" do + expect(subject.status).to eq(:inactive) + expect(subject.available?).to eq(false) + expect(subject.registered?).to eq(true) end end diff --git a/spec/whois/parsers/responses/whois.nic.fr/fr/property_status_missing_spec.rb b/spec/whois/parsers/responses/whois.nic.fr/fr/property_status_missing_spec.rb index 986f272b..a6c28af1 100644 --- a/spec/whois/parsers/responses/whois.nic.fr/fr/property_status_missing_spec.rb +++ b/spec/whois/parsers/responses/whois.nic.fr/fr/property_status_missing_spec.rb @@ -11,29 +11,18 @@ # require 'spec_helper' -require 'whois/parsers/whois.nic.fr.rb' -describe Whois::Parsers::WhoisNicFr, "property_status_missing.expected" do +describe "whois.nic.fr", :aggregate_failures do subject do file = fixture("responses", "whois.nic.fr/fr/property_status_missing.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.nic.fr") + Whois::Parser.parser_for(part) end - describe "#status" do - it do - expect(subject.status).to eq(:available) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(true) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(false) - end + it "matches property_status_missing.expected" do + expect(subject.status).to eq(:available) + expect(subject.available?).to eq(true) + expect(subject.registered?).to eq(false) end end diff --git a/spec/whois/parsers/responses/whois.nic.fr/fr/property_status_not_open_spec.rb b/spec/whois/parsers/responses/whois.nic.fr/fr/property_status_not_open_spec.rb index 5c90e9c4..6674c39c 100644 --- a/spec/whois/parsers/responses/whois.nic.fr/fr/property_status_not_open_spec.rb +++ b/spec/whois/parsers/responses/whois.nic.fr/fr/property_status_not_open_spec.rb @@ -11,29 +11,18 @@ # require 'spec_helper' -require 'whois/parsers/whois.nic.fr.rb' -describe Whois::Parsers::WhoisNicFr, "property_status_not_open.expected" do +describe "whois.nic.fr", :aggregate_failures do subject do file = fixture("responses", "whois.nic.fr/fr/property_status_not_open.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.nic.fr") + Whois::Parser.parser_for(part) end - describe "#status" do - it do - expect(subject.status).to eq(:reserved) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(false) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(true) - end + it "matches property_status_not_open.expected" do + expect(subject.status).to eq(:reserved) + expect(subject.available?).to eq(false) + expect(subject.registered?).to eq(true) end end diff --git a/spec/whois/parsers/responses/whois.nic.fr/fr/property_status_redemption_spec.rb b/spec/whois/parsers/responses/whois.nic.fr/fr/property_status_redemption_spec.rb index 6ad67080..c5a07f47 100644 --- a/spec/whois/parsers/responses/whois.nic.fr/fr/property_status_redemption_spec.rb +++ b/spec/whois/parsers/responses/whois.nic.fr/fr/property_status_redemption_spec.rb @@ -11,29 +11,18 @@ # require 'spec_helper' -require 'whois/parsers/whois.nic.fr.rb' -describe Whois::Parsers::WhoisNicFr, "property_status_redemption.expected" do +describe "whois.nic.fr", :aggregate_failures do subject do file = fixture("responses", "whois.nic.fr/fr/property_status_redemption.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.nic.fr") + Whois::Parser.parser_for(part) end - describe "#status" do - it do - expect(subject.status).to eq(:redemption) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(false) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(true) - end + it "matches property_status_redemption.expected" do + expect(subject.status).to eq(:redemption) + expect(subject.available?).to eq(false) + expect(subject.registered?).to eq(true) end end diff --git a/spec/whois/parsers/responses/whois.nic.fr/fr/property_status_registered_spec.rb b/spec/whois/parsers/responses/whois.nic.fr/fr/property_status_registered_spec.rb index 5cd230f2..54296a20 100644 --- a/spec/whois/parsers/responses/whois.nic.fr/fr/property_status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.nic.fr/fr/property_status_registered_spec.rb @@ -11,29 +11,18 @@ # require 'spec_helper' -require 'whois/parsers/whois.nic.fr.rb' -describe Whois::Parsers::WhoisNicFr, "property_status_registered.expected" do +describe "whois.nic.fr", :aggregate_failures do subject do file = fixture("responses", "whois.nic.fr/fr/property_status_registered.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.nic.fr") + Whois::Parser.parser_for(part) end - describe "#status" do - it do - expect(subject.status).to eq(:registered) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(false) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(true) - end + it "matches property_status_registered.expected" do + expect(subject.status).to eq(:registered) + expect(subject.available?).to eq(false) + expect(subject.registered?).to eq(true) end end diff --git a/spec/whois/parsers/responses/whois.nic.fr/fr/response_throttled_spec.rb b/spec/whois/parsers/responses/whois.nic.fr/fr/response_throttled_spec.rb index c6f4c738..ba032ffc 100644 --- a/spec/whois/parsers/responses/whois.nic.fr/fr/response_throttled_spec.rb +++ b/spec/whois/parsers/responses/whois.nic.fr/fr/response_throttled_spec.rb @@ -11,19 +11,16 @@ # require 'spec_helper' -require 'whois/parsers/whois.nic.fr.rb' -describe Whois::Parsers::WhoisNicFr, "response_throttled.expected" do +describe "whois.nic.fr", :aggregate_failures do subject do file = fixture("responses", "whois.nic.fr/fr/response_throttled.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.nic.fr") + Whois::Parser.parser_for(part) end - describe "#response_throttled?" do - it do - expect(subject.response_throttled?).to eq(true) - end + it "matches response_throttled.expected" do + expect(subject.response_throttled?).to eq(true) end end diff --git a/spec/whois/parsers/responses/whois.nic.fr/fr/status_available_spec.rb b/spec/whois/parsers/responses/whois.nic.fr/fr/status_available_spec.rb index be0e8a40..b23ec5ee 100644 --- a/spec/whois/parsers/responses/whois.nic.fr/fr/status_available_spec.rb +++ b/spec/whois/parsers/responses/whois.nic.fr/fr/status_available_spec.rb @@ -11,68 +11,29 @@ # require 'spec_helper' -require 'whois/parsers/whois.nic.fr.rb' -describe Whois::Parsers::WhoisNicFr, "status_available.expected" do +describe "whois.nic.fr", :aggregate_failures do subject do file = fixture("responses", "whois.nic.fr/fr/status_available.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.nic.fr") + Whois::Parser.parser_for(part) end - describe "#status" do - it do - expect(subject.status).to eq(:available) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(true) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(false) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to eq(nil) - end - end - describe "#updated_on" do - it do - expect(subject.updated_on).to eq(nil) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to eq(nil) - end - end - describe "#registrant_contacts" do - it do - expect(subject.registrant_contacts).to be_a(Array) - expect(subject.registrant_contacts).to eq([]) - end - end - describe "#admin_contacts" do - it do - expect(subject.admin_contacts).to be_a(Array) - expect(subject.admin_contacts).to eq([]) - end - end - describe "#technical_contacts" do - it do - expect(subject.technical_contacts).to be_a(Array) - expect(subject.technical_contacts).to eq([]) - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers).to eq([]) - end + it "matches status_available.expected" do + expect(subject.status).to eq(:available) + expect(subject.available?).to eq(true) + expect(subject.registered?).to eq(false) + expect(subject.created_on).to eq(nil) + expect(subject.updated_on).to eq(nil) + expect(subject.expires_on).to eq(nil) + expect(subject.registrant_contacts).to be_a(Array) + expect(subject.registrant_contacts).to eq([]) + expect(subject.admin_contacts).to be_a(Array) + expect(subject.admin_contacts).to eq([]) + expect(subject.technical_contacts).to be_a(Array) + expect(subject.technical_contacts).to eq([]) + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers).to eq([]) end end diff --git a/spec/whois/parsers/responses/whois.nic.fr/fr/status_registered_spec.rb b/spec/whois/parsers/responses/whois.nic.fr/fr/status_registered_spec.rb index f7355509..280ed7e0 100644 --- a/spec/whois/parsers/responses/whois.nic.fr/fr/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.nic.fr/fr/status_registered_spec.rb @@ -11,120 +11,81 @@ # require 'spec_helper' -require 'whois/parsers/whois.nic.fr.rb' -describe Whois::Parsers::WhoisNicFr, "status_registered.expected" do +describe "whois.nic.fr", :aggregate_failures do subject do file = fixture("responses", "whois.nic.fr/fr/status_registered.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.nic.fr") + Whois::Parser.parser_for(part) end - describe "#status" do - it do - expect(subject.status).to eq(:registered) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(false) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(true) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to be_a(Time) - expect(subject.created_on).to eq(DateTime.parse("2004-05-20 11:28:40 UTC")) - end - end - describe "#updated_on" do - it do - expect(subject.updated_on).to be_a(Time) - expect(subject.updated_on).to eq(DateTime.parse("2018-04-08 03:52:04 UTC")) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to be_a(Time) - expect(subject.expires_on).to eq(DateTime.parse("2019-05-07 07:43:45 UTC")) - end - end - describe "#registrant_contacts" do - it do - expect(subject.registrant_contacts).to be_a(Array) - expect(subject.registrant_contacts.size).to eq(1) - expect(subject.registrant_contacts[0]).to be_a(Whois::Parser::Contact) - expect(subject.registrant_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_REGISTRANT) - expect(subject.registrant_contacts[0].id).to eq("U4339-FRNIC") - expect(subject.registrant_contacts[0].name).to eq(nil) - expect(subject.registrant_contacts[0].organization).to eq("1C2") - expect(subject.registrant_contacts[0].address).to eq("20-22, rue Louis Armand\n75015 Paris") - expect(subject.registrant_contacts[0].city).to eq(nil) - expect(subject.registrant_contacts[0].zip).to eq(nil) - expect(subject.registrant_contacts[0].state).to eq(nil) - expect(subject.registrant_contacts[0].country).to eq(nil) - expect(subject.registrant_contacts[0].country_code).to eq("FR") - expect(subject.registrant_contacts[0].phone).to eq("+33 1 30 62 40 06") - expect(subject.registrant_contacts[0].fax).to eq(nil) - expect(subject.registrant_contacts[0].email).to eq("jmr@1c2.com") - expect(subject.registrant_contacts[0].updated_on).to eq(DateTime.parse("2016-09-22 07:52:47 UTC")) - end - end - describe "#admin_contacts" do - it do - expect(subject.admin_contacts).to be_a(Array) - expect(subject.admin_contacts.size).to eq(1) - expect(subject.admin_contacts[0]).to be_a(Whois::Parser::Contact) - expect(subject.admin_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_ADMINISTRATIVE) - expect(subject.admin_contacts[0].id).to eq("MO2494-FRNIC") - expect(subject.admin_contacts[0].name).to eq("Magic Online") - expect(subject.admin_contacts[0].organization).to eq("Magic Online") - expect(subject.admin_contacts[0].address).to eq("130, avenue President Wilson\n93100 Montreuil\nParis") - expect(subject.admin_contacts[0].city).to eq(nil) - expect(subject.admin_contacts[0].zip).to eq(nil) - expect(subject.admin_contacts[0].state).to eq(nil) - expect(subject.admin_contacts[0].country).to eq(nil) - expect(subject.admin_contacts[0].country_code).to eq("FR") - expect(subject.admin_contacts[0].phone).to eq("+33 1 41 58 22 50") - expect(subject.admin_contacts[0].fax).to eq("+33 1 56 72 93 30") - expect(subject.admin_contacts[0].email).to eq("hostmaster@magic.fr") - expect(subject.admin_contacts[0].updated_on).to eq(DateTime.parse("2014-03-31 16:13:52 UTC")) - end - end - describe "#technical_contacts" do - it do - expect(subject.technical_contacts).to be_a(Array) - expect(subject.technical_contacts.size).to eq(1) - expect(subject.technical_contacts[0]).to be_a(Whois::Parser::Contact) - expect(subject.technical_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_TECHNICAL) - expect(subject.technical_contacts[0].id).to eq("MO2556-FRNIC") - expect(subject.technical_contacts[0].name).to eq("Magic Online") - expect(subject.technical_contacts[0].organization).to eq("Magic Online") - expect(subject.technical_contacts[0].address).to eq("130-134, avenue du President Wilson\n93100 Montreuil\nFrance") - expect(subject.technical_contacts[0].city).to eq(nil) - expect(subject.technical_contacts[0].zip).to eq(nil) - expect(subject.technical_contacts[0].state).to eq(nil) - expect(subject.technical_contacts[0].country).to eq(nil) - expect(subject.technical_contacts[0].country_code).to eq("FR") - expect(subject.technical_contacts[0].phone).to eq("+33 1 41 58 22 50") - expect(subject.technical_contacts[0].fax).to eq("+33 1 56 72 93 30") - expect(subject.technical_contacts[0].email).to eq("production@magic.fr") - expect(subject.technical_contacts[0].updated_on).to eq(DateTime.parse("2014-05-20 15:07:08 UTC")) - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers.size).to eq(2) - expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[0].name).to eq("ns.magic.fr") - expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[1].name).to eq("ns2.magic.fr") - end + it "matches status_registered.expected" do + expect(subject.status).to eq(:registered) + expect(subject.available?).to eq(false) + expect(subject.registered?).to eq(true) + expect(subject.created_on).to be_a(Time) + expect(subject.created_on).to eq(DateTime.parse("2004-05-20 11:28:40 UTC")) + expect(subject.updated_on).to be_a(Time) + expect(subject.updated_on).to eq(DateTime.parse("2018-04-08 03:52:04 UTC")) + expect(subject.expires_on).to be_a(Time) + expect(subject.expires_on).to eq(DateTime.parse("2019-05-07 07:43:45 UTC")) + expect(subject.registrant_contacts).to be_a(Array) + expect(subject.registrant_contacts.size).to eq(1) + expect(subject.registrant_contacts[0]).to be_a(Whois::Parser::Contact) + expect(subject.registrant_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_REGISTRANT) + expect(subject.registrant_contacts[0].id).to eq("U4339-FRNIC") + expect(subject.registrant_contacts[0].name).to eq(nil) + expect(subject.registrant_contacts[0].organization).to eq("1C2") + expect(subject.registrant_contacts[0].address).to eq("20-22, rue Louis Armand\n75015 Paris") + expect(subject.registrant_contacts[0].city).to eq(nil) + expect(subject.registrant_contacts[0].zip).to eq(nil) + expect(subject.registrant_contacts[0].state).to eq(nil) + expect(subject.registrant_contacts[0].country).to eq(nil) + expect(subject.registrant_contacts[0].country_code).to eq("FR") + expect(subject.registrant_contacts[0].phone).to eq("+33 1 30 62 40 06") + expect(subject.registrant_contacts[0].fax).to eq(nil) + expect(subject.registrant_contacts[0].email).to eq("jmr@1c2.com") + expect(subject.registrant_contacts[0].updated_on).to eq(DateTime.parse("2016-09-22 07:52:47 UTC")) + expect(subject.admin_contacts).to be_a(Array) + expect(subject.admin_contacts.size).to eq(1) + expect(subject.admin_contacts[0]).to be_a(Whois::Parser::Contact) + expect(subject.admin_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_ADMINISTRATIVE) + expect(subject.admin_contacts[0].id).to eq("MO2494-FRNIC") + expect(subject.admin_contacts[0].name).to eq("Magic Online") + expect(subject.admin_contacts[0].organization).to eq("Magic Online") + expect(subject.admin_contacts[0].address).to eq("130, avenue President Wilson\n93100 Montreuil\nParis") + expect(subject.admin_contacts[0].city).to eq(nil) + expect(subject.admin_contacts[0].zip).to eq(nil) + expect(subject.admin_contacts[0].state).to eq(nil) + expect(subject.admin_contacts[0].country).to eq(nil) + expect(subject.admin_contacts[0].country_code).to eq("FR") + expect(subject.admin_contacts[0].phone).to eq("+33 1 41 58 22 50") + expect(subject.admin_contacts[0].fax).to eq("+33 1 56 72 93 30") + expect(subject.admin_contacts[0].email).to eq("hostmaster@magic.fr") + expect(subject.admin_contacts[0].updated_on).to eq(DateTime.parse("2014-03-31 16:13:52 UTC")) + expect(subject.technical_contacts).to be_a(Array) + expect(subject.technical_contacts.size).to eq(1) + expect(subject.technical_contacts[0]).to be_a(Whois::Parser::Contact) + expect(subject.technical_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_TECHNICAL) + expect(subject.technical_contacts[0].id).to eq("MO2556-FRNIC") + expect(subject.technical_contacts[0].name).to eq("Magic Online") + expect(subject.technical_contacts[0].organization).to eq("Magic Online") + expect(subject.technical_contacts[0].address).to eq("130-134, avenue du President Wilson\n93100 Montreuil\nFrance") + expect(subject.technical_contacts[0].city).to eq(nil) + expect(subject.technical_contacts[0].zip).to eq(nil) + expect(subject.technical_contacts[0].state).to eq(nil) + expect(subject.technical_contacts[0].country).to eq(nil) + expect(subject.technical_contacts[0].country_code).to eq("FR") + expect(subject.technical_contacts[0].phone).to eq("+33 1 41 58 22 50") + expect(subject.technical_contacts[0].fax).to eq("+33 1 56 72 93 30") + expect(subject.technical_contacts[0].email).to eq("production@magic.fr") + expect(subject.technical_contacts[0].updated_on).to eq(DateTime.parse("2014-05-20 15:07:08 UTC")) + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers.size).to eq(2) + expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[0].name).to eq("ns.magic.fr") + expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[1].name).to eq("ns2.magic.fr") end end diff --git a/spec/whois/parsers/responses/whois.nic.fr/tf/property_status_frozen_spec.rb b/spec/whois/parsers/responses/whois.nic.fr/tf/property_status_frozen_spec.rb index 05bc3dfd..b326e5a6 100644 --- a/spec/whois/parsers/responses/whois.nic.fr/tf/property_status_frozen_spec.rb +++ b/spec/whois/parsers/responses/whois.nic.fr/tf/property_status_frozen_spec.rb @@ -11,29 +11,18 @@ # require 'spec_helper' -require 'whois/parsers/whois.nic.fr.rb' -describe Whois::Parsers::WhoisNicFr, "property_status_frozen.expected" do +describe "whois.nic.fr", :aggregate_failures do subject do file = fixture("responses", "whois.nic.fr/tf/property_status_frozen.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.nic.fr") + Whois::Parser.parser_for(part) end - describe "#status" do - it do - expect(subject.status).to eq(:registered) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(false) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(true) - end + it "matches property_status_frozen.expected" do + expect(subject.status).to eq(:registered) + expect(subject.available?).to eq(false) + expect(subject.registered?).to eq(true) end end diff --git a/spec/whois/parsers/responses/whois.nic.fr/tf/response_throttled_spec.rb b/spec/whois/parsers/responses/whois.nic.fr/tf/response_throttled_spec.rb index 6e0c3a34..d6cbaa0b 100644 --- a/spec/whois/parsers/responses/whois.nic.fr/tf/response_throttled_spec.rb +++ b/spec/whois/parsers/responses/whois.nic.fr/tf/response_throttled_spec.rb @@ -11,19 +11,16 @@ # require 'spec_helper' -require 'whois/parsers/whois.nic.fr.rb' -describe Whois::Parsers::WhoisNicFr, "response_throttled.expected" do +describe "whois.nic.fr", :aggregate_failures do subject do file = fixture("responses", "whois.nic.fr/tf/response_throttled.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.nic.fr") + Whois::Parser.parser_for(part) end - describe "#response_throttled?" do - it do - expect(subject.response_throttled?).to eq(true) - end + it "matches response_throttled.expected" do + expect(subject.response_throttled?).to eq(true) end end diff --git a/spec/whois/parsers/responses/whois.nic.fr/tf/status_available_spec.rb b/spec/whois/parsers/responses/whois.nic.fr/tf/status_available_spec.rb index a6c138b0..d7033311 100644 --- a/spec/whois/parsers/responses/whois.nic.fr/tf/status_available_spec.rb +++ b/spec/whois/parsers/responses/whois.nic.fr/tf/status_available_spec.rb @@ -11,68 +11,29 @@ # require 'spec_helper' -require 'whois/parsers/whois.nic.fr.rb' -describe Whois::Parsers::WhoisNicFr, "status_available.expected" do +describe "whois.nic.fr", :aggregate_failures do subject do file = fixture("responses", "whois.nic.fr/tf/status_available.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.nic.fr") + Whois::Parser.parser_for(part) end - describe "#status" do - it do - expect(subject.status).to eq(:available) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(true) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(false) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to eq(nil) - end - end - describe "#updated_on" do - it do - expect(subject.updated_on).to eq(nil) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to eq(nil) - end - end - describe "#registrant_contacts" do - it do - expect(subject.registrant_contacts).to be_a(Array) - expect(subject.registrant_contacts).to eq([]) - end - end - describe "#admin_contacts" do - it do - expect(subject.admin_contacts).to be_a(Array) - expect(subject.admin_contacts).to eq([]) - end - end - describe "#technical_contacts" do - it do - expect(subject.technical_contacts).to be_a(Array) - expect(subject.technical_contacts).to eq([]) - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers).to eq([]) - end + it "matches status_available.expected" do + expect(subject.status).to eq(:available) + expect(subject.available?).to eq(true) + expect(subject.registered?).to eq(false) + expect(subject.created_on).to eq(nil) + expect(subject.updated_on).to eq(nil) + expect(subject.expires_on).to eq(nil) + expect(subject.registrant_contacts).to be_a(Array) + expect(subject.registrant_contacts).to eq([]) + expect(subject.admin_contacts).to be_a(Array) + expect(subject.admin_contacts).to eq([]) + expect(subject.technical_contacts).to be_a(Array) + expect(subject.technical_contacts).to eq([]) + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers).to eq([]) end end diff --git a/spec/whois/parsers/responses/whois.nic.fr/tf/status_registered_spec.rb b/spec/whois/parsers/responses/whois.nic.fr/tf/status_registered_spec.rb index 2e917a81..fda3d4ce 100644 --- a/spec/whois/parsers/responses/whois.nic.fr/tf/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.nic.fr/tf/status_registered_spec.rb @@ -11,122 +11,83 @@ # require 'spec_helper' -require 'whois/parsers/whois.nic.fr.rb' -describe Whois::Parsers::WhoisNicFr, "status_registered.expected" do +describe "whois.nic.fr", :aggregate_failures do subject do file = fixture("responses", "whois.nic.fr/tf/status_registered.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.nic.fr") + Whois::Parser.parser_for(part) end - describe "#status" do - it do - expect(subject.status).to eq(:registered) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(false) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(true) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to be_a(Time) - expect(subject.created_on).to eq(DateTime.parse("2004-10-25 22:00:00 UTC")) - end - end - describe "#updated_on" do - it do - expect(subject.updated_on).to be_a(Time) - expect(subject.updated_on).to eq(DateTime.parse("2018-10-25 22:34:00 UTC")) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to be_a(Time) - expect(subject.expires_on).to eq(DateTime.parse("2019-10-25 22:00:00 UTC")) - end - end - describe "#registrant_contacts" do - it do - expect(subject.registrant_contacts).to be_a(Array) - expect(subject.registrant_contacts.size).to eq(1) - expect(subject.registrant_contacts[0]).to be_a(Whois::Parser::Contact) - expect(subject.registrant_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_REGISTRANT) - expect(subject.registrant_contacts[0].id).to eq("AAEA9-FRNIC") - expect(subject.registrant_contacts[0].name).to eq(nil) - expect(subject.registrant_contacts[0].organization).to eq("Afnic (Terres Australes et Antarctiques - TOM)") - expect(subject.registrant_contacts[0].address).to eq("immeuble le Stephenson\n1, rue Stephenson\nHall A2 - 3eme etage\n78180 Montigny le Bretonneux") - expect(subject.registrant_contacts[0].city).to eq(nil) - expect(subject.registrant_contacts[0].zip).to eq(nil) - expect(subject.registrant_contacts[0].state).to eq(nil) - expect(subject.registrant_contacts[0].country).to eq(nil) - expect(subject.registrant_contacts[0].country_code).to eq("FR") - expect(subject.registrant_contacts[0].phone).to eq("+33 1 39 30 83 00") - expect(subject.registrant_contacts[0].fax).to eq("+33 1 39 30 83 01") - expect(subject.registrant_contacts[0].email).to eq("support@afnic.fr") - expect(subject.registrant_contacts[0].updated_on).to eq(DateTime.parse("2017-07-17 12:40:50 UTC")) - end - end - describe "#admin_contacts" do - it do - expect(subject.admin_contacts).to be_a(Array) - expect(subject.admin_contacts.size).to eq(1) - expect(subject.admin_contacts[0]).to be_a(Whois::Parser::Contact) - expect(subject.admin_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_ADMINISTRATIVE) - expect(subject.admin_contacts[0].id).to eq("NFC1-FRNIC") - expect(subject.admin_contacts[0].name).to eq("NIC France Contact") - expect(subject.admin_contacts[0].organization).to eq("AFNIC") - expect(subject.admin_contacts[0].address).to eq("immeuble le Stephenson\n1, rue Stephenson\nHall A2 - 3eme etage\n78180 Montigny-Le-Bretonneux") - expect(subject.admin_contacts[0].city).to eq(nil) - expect(subject.admin_contacts[0].zip).to eq(nil) - expect(subject.admin_contacts[0].state).to eq(nil) - expect(subject.admin_contacts[0].country).to eq(nil) - expect(subject.admin_contacts[0].country_code).to eq("FR") - expect(subject.admin_contacts[0].phone).to eq("+33 1 39 30 83 00") - expect(subject.admin_contacts[0].fax).to eq(nil) - expect(subject.admin_contacts[0].email).to eq("hostmaster@nic.fr") - expect(subject.admin_contacts[0].updated_on).to eq(DateTime.parse("2005-08-23 16:13:17 UTC")) - end - end - describe "#technical_contacts" do - it do - expect(subject.technical_contacts).to be_a(Array) - expect(subject.technical_contacts.size).to eq(1) - expect(subject.technical_contacts[0]).to be_a(Whois::Parser::Contact) - expect(subject.technical_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_TECHNICAL) - expect(subject.technical_contacts[0].id).to eq("NFC1-FRNIC") - expect(subject.technical_contacts[0].name).to eq("NIC France Contact") - expect(subject.technical_contacts[0].organization).to eq("AFNIC") - expect(subject.technical_contacts[0].address).to eq("immeuble le Stephenson\n1, rue Stephenson\nHall A2 - 3eme etage\n78180 Montigny-Le-Bretonneux") - expect(subject.technical_contacts[0].city).to eq(nil) - expect(subject.technical_contacts[0].zip).to eq(nil) - expect(subject.technical_contacts[0].state).to eq(nil) - expect(subject.technical_contacts[0].country).to eq(nil) - expect(subject.technical_contacts[0].country_code).to eq("FR") - expect(subject.technical_contacts[0].phone).to eq("+33 1 39 30 83 00") - expect(subject.technical_contacts[0].fax).to eq(nil) - expect(subject.technical_contacts[0].email).to eq("hostmaster@nic.fr") - expect(subject.technical_contacts[0].updated_on).to eq(DateTime.parse("2005-08-23 16:13:17 UTC")) - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers.size).to eq(3) - expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[0].name).to eq("ns1.nic.fr") - expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[1].name).to eq("ns2.nic.fr") - expect(subject.nameservers[2]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[2].name).to eq("ns3.nic.fr") - end + it "matches status_registered.expected" do + expect(subject.status).to eq(:registered) + expect(subject.available?).to eq(false) + expect(subject.registered?).to eq(true) + expect(subject.created_on).to be_a(Time) + expect(subject.created_on).to eq(DateTime.parse("2004-10-25 22:00:00 UTC")) + expect(subject.updated_on).to be_a(Time) + expect(subject.updated_on).to eq(DateTime.parse("2018-10-25 22:34:00 UTC")) + expect(subject.expires_on).to be_a(Time) + expect(subject.expires_on).to eq(DateTime.parse("2019-10-25 22:00:00 UTC")) + expect(subject.registrant_contacts).to be_a(Array) + expect(subject.registrant_contacts.size).to eq(1) + expect(subject.registrant_contacts[0]).to be_a(Whois::Parser::Contact) + expect(subject.registrant_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_REGISTRANT) + expect(subject.registrant_contacts[0].id).to eq("AAEA9-FRNIC") + expect(subject.registrant_contacts[0].name).to eq(nil) + expect(subject.registrant_contacts[0].organization).to eq("Afnic (Terres Australes et Antarctiques - TOM)") + expect(subject.registrant_contacts[0].address).to eq("immeuble le Stephenson\n1, rue Stephenson\nHall A2 - 3eme etage\n78180 Montigny le Bretonneux") + expect(subject.registrant_contacts[0].city).to eq(nil) + expect(subject.registrant_contacts[0].zip).to eq(nil) + expect(subject.registrant_contacts[0].state).to eq(nil) + expect(subject.registrant_contacts[0].country).to eq(nil) + expect(subject.registrant_contacts[0].country_code).to eq("FR") + expect(subject.registrant_contacts[0].phone).to eq("+33 1 39 30 83 00") + expect(subject.registrant_contacts[0].fax).to eq("+33 1 39 30 83 01") + expect(subject.registrant_contacts[0].email).to eq("support@afnic.fr") + expect(subject.registrant_contacts[0].updated_on).to eq(DateTime.parse("2017-07-17 12:40:50 UTC")) + expect(subject.admin_contacts).to be_a(Array) + expect(subject.admin_contacts.size).to eq(1) + expect(subject.admin_contacts[0]).to be_a(Whois::Parser::Contact) + expect(subject.admin_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_ADMINISTRATIVE) + expect(subject.admin_contacts[0].id).to eq("NFC1-FRNIC") + expect(subject.admin_contacts[0].name).to eq("NIC France Contact") + expect(subject.admin_contacts[0].organization).to eq("AFNIC") + expect(subject.admin_contacts[0].address).to eq("immeuble le Stephenson\n1, rue Stephenson\nHall A2 - 3eme etage\n78180 Montigny-Le-Bretonneux") + expect(subject.admin_contacts[0].city).to eq(nil) + expect(subject.admin_contacts[0].zip).to eq(nil) + expect(subject.admin_contacts[0].state).to eq(nil) + expect(subject.admin_contacts[0].country).to eq(nil) + expect(subject.admin_contacts[0].country_code).to eq("FR") + expect(subject.admin_contacts[0].phone).to eq("+33 1 39 30 83 00") + expect(subject.admin_contacts[0].fax).to eq(nil) + expect(subject.admin_contacts[0].email).to eq("hostmaster@nic.fr") + expect(subject.admin_contacts[0].updated_on).to eq(DateTime.parse("2005-08-23 16:13:17 UTC")) + expect(subject.technical_contacts).to be_a(Array) + expect(subject.technical_contacts.size).to eq(1) + expect(subject.technical_contacts[0]).to be_a(Whois::Parser::Contact) + expect(subject.technical_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_TECHNICAL) + expect(subject.technical_contacts[0].id).to eq("NFC1-FRNIC") + expect(subject.technical_contacts[0].name).to eq("NIC France Contact") + expect(subject.technical_contacts[0].organization).to eq("AFNIC") + expect(subject.technical_contacts[0].address).to eq("immeuble le Stephenson\n1, rue Stephenson\nHall A2 - 3eme etage\n78180 Montigny-Le-Bretonneux") + expect(subject.technical_contacts[0].city).to eq(nil) + expect(subject.technical_contacts[0].zip).to eq(nil) + expect(subject.technical_contacts[0].state).to eq(nil) + expect(subject.technical_contacts[0].country).to eq(nil) + expect(subject.technical_contacts[0].country_code).to eq("FR") + expect(subject.technical_contacts[0].phone).to eq("+33 1 39 30 83 00") + expect(subject.technical_contacts[0].fax).to eq(nil) + expect(subject.technical_contacts[0].email).to eq("hostmaster@nic.fr") + expect(subject.technical_contacts[0].updated_on).to eq(DateTime.parse("2005-08-23 16:13:17 UTC")) + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers.size).to eq(3) + expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[0].name).to eq("ns1.nic.fr") + expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[1].name).to eq("ns2.nic.fr") + expect(subject.nameservers[2]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[2].name).to eq("ns3.nic.fr") end end diff --git a/spec/whois/parsers/responses/whois.nic.gd/gd/status_available_spec.rb b/spec/whois/parsers/responses/whois.nic.gd/gd/status_available_spec.rb index 2d086415..78fb29e3 100644 --- a/spec/whois/parsers/responses/whois.nic.gd/gd/status_available_spec.rb +++ b/spec/whois/parsers/responses/whois.nic.gd/gd/status_available_spec.rb @@ -11,88 +11,33 @@ # require 'spec_helper' -require 'whois/parsers/whois.nic.gd.rb' -describe Whois::Parsers::WhoisNicGd, "status_available.expected" do +describe "whois.nic.gd", :aggregate_failures do subject do file = fixture("responses", "whois.nic.gd/gd/status_available.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.nic.gd") + Whois::Parser.parser_for(part) end - describe "#disclaimer" do - it do - expect(subject.disclaimer).to eq(nil) - end - end - describe "#domain" do - it do - expect(subject.domain).to eq(nil) - end - end - describe "#domain_id" do - it do - expect { subject.domain_id }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#status" do - it do - expect(subject.status).to eq(:available) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(true) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(false) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to eq(nil) - end - end - describe "#updated_on" do - it do - expect(subject.updated_on).to eq(nil) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to eq(nil) - end - end - describe "#registrar" do - it do - expect(subject.registrar).to eq(nil) - end - end - describe "#registrant_contacts" do - it do - expect(subject.registrant_contacts).to be_a(Array) - expect(subject.registrant_contacts).to eq([]) - end - end - describe "#admin_contacts" do - it do - expect(subject.admin_contacts).to be_a(Array) - expect(subject.admin_contacts).to eq([]) - end - end - describe "#technical_contacts" do - it do - expect(subject.technical_contacts).to be_a(Array) - expect(subject.technical_contacts).to eq([]) - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers).to eq([]) - end + it "matches status_available.expected" do + expect(subject.disclaimer).to eq(nil) + expect(subject.domain).to eq(nil) + expect { subject.domain_id }.to raise_error(Whois::AttributeNotSupported) + expect(subject.status).to eq(:available) + expect(subject.available?).to eq(true) + expect(subject.registered?).to eq(false) + expect(subject.created_on).to eq(nil) + expect(subject.updated_on).to eq(nil) + expect(subject.expires_on).to eq(nil) + expect(subject.registrar).to eq(nil) + expect(subject.registrant_contacts).to be_a(Array) + expect(subject.registrant_contacts).to eq([]) + expect(subject.admin_contacts).to be_a(Array) + expect(subject.admin_contacts).to eq([]) + expect(subject.technical_contacts).to be_a(Array) + expect(subject.technical_contacts).to eq([]) + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers).to eq([]) end end diff --git a/spec/whois/parsers/responses/whois.nic.gd/gd/status_registered_spec.rb b/spec/whois/parsers/responses/whois.nic.gd/gd/status_registered_spec.rb index 9995767e..b75900ff 100644 --- a/spec/whois/parsers/responses/whois.nic.gd/gd/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.nic.gd/gd/status_registered_spec.rb @@ -11,146 +11,91 @@ # require 'spec_helper' -require 'whois/parsers/whois.nic.gd.rb' -describe Whois::Parsers::WhoisNicGd, "status_registered.expected" do +describe "whois.nic.gd", :aggregate_failures do subject do file = fixture("responses", "whois.nic.gd/gd/status_registered.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.nic.gd") + Whois::Parser.parser_for(part) end - describe "#disclaimer" do - it do - expect(subject.disclaimer).to eq("The data in the WHOIS database of KSregistry GmbH is provided by KSregistry GmbH for information purposes, and to assist persons in obtaining information about or related to domain name registration records. KSregistry GmbH does not guarantee its accuracy. By submitting a WHOIS query, you agree that you will use this data only for lawful purposes and that, under no circumstances, you will use this data to 1) allow, enable, or otherwise support the transmission of mass unsolicited, commercial advertising or solicitations via E-mail (spam); or 2) enable high volume, automated, electronic processes that apply to KSregistry GmbH or its systems. KSregistry GmbH reserves the right to modify these terms. By submitting this query, you agree to abide by this policy.") - end - end - describe "#domain" do - it do - expect(subject.domain).to eq("google.gd") - end - end - describe "#domain_id" do - it do - expect { subject.domain_id }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#status" do - it do - expect(subject.status).to eq(:registered) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(false) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(true) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to be_a(Time) - expect(subject.created_on).to eq(DateTime.parse("2006-12-11 00:00:00")) - end - end - describe "#updated_on" do - it do - expect(subject.updated_on).to be_a(Time) - expect(subject.updated_on).to eq(DateTime.parse("2013-11-12 16:07:05")) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to be_a(Time) - expect(subject.expires_on).to eq(DateTime.parse("2014-12-11 00:00:00")) - end - end - describe "#registrar" do - it do - expect(subject.registrar).to be_a(Whois::Parser::Registrar) - expect(subject.registrar.id).to eq(nil) - expect(subject.registrar.name).to eq("MarkMonitor Inc.") - expect(subject.registrar.url).to eq("www.markmonitor.com") - end - end - describe "#registrant_contacts" do - it do - expect(subject.registrant_contacts).to be_a(Array) - expect(subject.registrant_contacts.size).to eq(1) - expect(subject.registrant_contacts[0]).to be_a(Whois::Parser::Contact) - expect(subject.registrant_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_REGISTRANT) - expect(subject.registrant_contacts[0].id).to eq("P-GXI35") - expect(subject.registrant_contacts[0].name).to eq("Google, Inc.") - expect(subject.registrant_contacts[0].organization).to eq("Google, Inc.") - expect(subject.registrant_contacts[0].address).to eq("1600 Amphitheatre Parkway") - expect(subject.registrant_contacts[0].city).to eq("Mountain View") - expect(subject.registrant_contacts[0].zip).to eq("94043") - expect(subject.registrant_contacts[0].state).to eq(nil) - expect(subject.registrant_contacts[0].country).to eq(nil) - expect(subject.registrant_contacts[0].country_code).to eq("US") - expect(subject.registrant_contacts[0].phone).to eq("+1.6503300100") - expect(subject.registrant_contacts[0].fax).to eq("+1.6506181499") - expect(subject.registrant_contacts[0].email).to eq("dns-admin@google.com") - expect(subject.registrant_contacts[0].created_on).to eq(nil) - expect(subject.registrant_contacts[0].updated_on).to eq(nil) - end - end - describe "#admin_contacts" do - it do - expect(subject.admin_contacts).to be_a(Array) - expect(subject.admin_contacts.size).to eq(1) - expect(subject.admin_contacts[0]).to be_a(Whois::Parser::Contact) - expect(subject.admin_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_ADMINISTRATIVE) - expect(subject.admin_contacts[0].id).to eq("P-GXI35") - expect(subject.admin_contacts[0].name).to eq("Google, Inc.") - expect(subject.admin_contacts[0].organization).to eq("Google, Inc.") - expect(subject.admin_contacts[0].address).to eq("1600 Amphitheatre Parkway") - expect(subject.admin_contacts[0].city).to eq("Mountain View") - expect(subject.admin_contacts[0].zip).to eq("94043") - expect(subject.admin_contacts[0].state).to eq(nil) - expect(subject.admin_contacts[0].country).to eq(nil) - expect(subject.admin_contacts[0].country_code).to eq("US") - expect(subject.admin_contacts[0].phone).to eq("+1.6503300100") - expect(subject.admin_contacts[0].fax).to eq("+1.6506181499") - expect(subject.admin_contacts[0].email).to eq("dns-admin@google.com") - expect(subject.admin_contacts[0].created_on).to eq(nil) - expect(subject.admin_contacts[0].updated_on).to eq(nil) - end - end - describe "#technical_contacts" do - it do - expect(subject.technical_contacts).to be_a(Array) - expect(subject.technical_contacts.size).to eq(1) - expect(subject.technical_contacts[0]).to be_a(Whois::Parser::Contact) - expect(subject.technical_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_TECHNICAL) - expect(subject.technical_contacts[0].id).to eq("P-GXI35") - expect(subject.technical_contacts[0].name).to eq("Google, Inc.") - expect(subject.technical_contacts[0].organization).to eq("Google, Inc.") - expect(subject.technical_contacts[0].address).to eq("1600 Amphitheatre Parkway") - expect(subject.technical_contacts[0].city).to eq("Mountain View") - expect(subject.technical_contacts[0].zip).to eq("94043") - expect(subject.technical_contacts[0].state).to eq(nil) - expect(subject.technical_contacts[0].country).to eq(nil) - expect(subject.technical_contacts[0].country_code).to eq("US") - expect(subject.technical_contacts[0].phone).to eq("+1.6503300100") - expect(subject.technical_contacts[0].fax).to eq("+1.6506181499") - expect(subject.technical_contacts[0].email).to eq("dns-admin@google.com") - expect(subject.technical_contacts[0].created_on).to eq(nil) - expect(subject.technical_contacts[0].updated_on).to eq(nil) - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers.size).to eq(2) - expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[0].name).to eq("ns1.google.com") - expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[1].name).to eq("ns2.google.com") - end + it "matches status_registered.expected" do + expect(subject.disclaimer).to eq("The data in the WHOIS database of KSregistry GmbH is provided by KSregistry GmbH for information purposes, and to assist persons in obtaining information about or related to domain name registration records. KSregistry GmbH does not guarantee its accuracy. By submitting a WHOIS query, you agree that you will use this data only for lawful purposes and that, under no circumstances, you will use this data to 1) allow, enable, or otherwise support the transmission of mass unsolicited, commercial advertising or solicitations via E-mail (spam); or 2) enable high volume, automated, electronic processes that apply to KSregistry GmbH or its systems. KSregistry GmbH reserves the right to modify these terms. By submitting this query, you agree to abide by this policy.") + expect(subject.domain).to eq("google.gd") + expect { subject.domain_id }.to raise_error(Whois::AttributeNotSupported) + expect(subject.status).to eq(:registered) + expect(subject.available?).to eq(false) + expect(subject.registered?).to eq(true) + expect(subject.created_on).to be_a(Time) + expect(subject.created_on).to eq(DateTime.parse("2006-12-11 00:00:00")) + expect(subject.updated_on).to be_a(Time) + expect(subject.updated_on).to eq(DateTime.parse("2013-11-12 16:07:05")) + expect(subject.expires_on).to be_a(Time) + expect(subject.expires_on).to eq(DateTime.parse("2014-12-11 00:00:00")) + expect(subject.registrar).to be_a(Whois::Parser::Registrar) + expect(subject.registrar.id).to eq(nil) + expect(subject.registrar.name).to eq("MarkMonitor Inc.") + expect(subject.registrar.url).to eq("www.markmonitor.com") + expect(subject.registrant_contacts).to be_a(Array) + expect(subject.registrant_contacts.size).to eq(1) + expect(subject.registrant_contacts[0]).to be_a(Whois::Parser::Contact) + expect(subject.registrant_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_REGISTRANT) + expect(subject.registrant_contacts[0].id).to eq("P-GXI35") + expect(subject.registrant_contacts[0].name).to eq("Google, Inc.") + expect(subject.registrant_contacts[0].organization).to eq("Google, Inc.") + expect(subject.registrant_contacts[0].address).to eq("1600 Amphitheatre Parkway") + expect(subject.registrant_contacts[0].city).to eq("Mountain View") + expect(subject.registrant_contacts[0].zip).to eq("94043") + expect(subject.registrant_contacts[0].state).to eq(nil) + expect(subject.registrant_contacts[0].country).to eq(nil) + expect(subject.registrant_contacts[0].country_code).to eq("US") + expect(subject.registrant_contacts[0].phone).to eq("+1.6503300100") + expect(subject.registrant_contacts[0].fax).to eq("+1.6506181499") + expect(subject.registrant_contacts[0].email).to eq("dns-admin@google.com") + expect(subject.registrant_contacts[0].created_on).to eq(nil) + expect(subject.registrant_contacts[0].updated_on).to eq(nil) + expect(subject.admin_contacts).to be_a(Array) + expect(subject.admin_contacts.size).to eq(1) + expect(subject.admin_contacts[0]).to be_a(Whois::Parser::Contact) + expect(subject.admin_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_ADMINISTRATIVE) + expect(subject.admin_contacts[0].id).to eq("P-GXI35") + expect(subject.admin_contacts[0].name).to eq("Google, Inc.") + expect(subject.admin_contacts[0].organization).to eq("Google, Inc.") + expect(subject.admin_contacts[0].address).to eq("1600 Amphitheatre Parkway") + expect(subject.admin_contacts[0].city).to eq("Mountain View") + expect(subject.admin_contacts[0].zip).to eq("94043") + expect(subject.admin_contacts[0].state).to eq(nil) + expect(subject.admin_contacts[0].country).to eq(nil) + expect(subject.admin_contacts[0].country_code).to eq("US") + expect(subject.admin_contacts[0].phone).to eq("+1.6503300100") + expect(subject.admin_contacts[0].fax).to eq("+1.6506181499") + expect(subject.admin_contacts[0].email).to eq("dns-admin@google.com") + expect(subject.admin_contacts[0].created_on).to eq(nil) + expect(subject.admin_contacts[0].updated_on).to eq(nil) + expect(subject.technical_contacts).to be_a(Array) + expect(subject.technical_contacts.size).to eq(1) + expect(subject.technical_contacts[0]).to be_a(Whois::Parser::Contact) + expect(subject.technical_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_TECHNICAL) + expect(subject.technical_contacts[0].id).to eq("P-GXI35") + expect(subject.technical_contacts[0].name).to eq("Google, Inc.") + expect(subject.technical_contacts[0].organization).to eq("Google, Inc.") + expect(subject.technical_contacts[0].address).to eq("1600 Amphitheatre Parkway") + expect(subject.technical_contacts[0].city).to eq("Mountain View") + expect(subject.technical_contacts[0].zip).to eq("94043") + expect(subject.technical_contacts[0].state).to eq(nil) + expect(subject.technical_contacts[0].country).to eq(nil) + expect(subject.technical_contacts[0].country_code).to eq("US") + expect(subject.technical_contacts[0].phone).to eq("+1.6503300100") + expect(subject.technical_contacts[0].fax).to eq("+1.6506181499") + expect(subject.technical_contacts[0].email).to eq("dns-admin@google.com") + expect(subject.technical_contacts[0].created_on).to eq(nil) + expect(subject.technical_contacts[0].updated_on).to eq(nil) + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers.size).to eq(2) + expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[0].name).to eq("ns1.google.com") + expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[1].name).to eq("ns2.google.com") end end diff --git a/spec/whois/parsers/responses/whois.nic.gd/gd/status_reserved_spec.rb b/spec/whois/parsers/responses/whois.nic.gd/gd/status_reserved_spec.rb index 7adc2b9c..ec1d1f9d 100644 --- a/spec/whois/parsers/responses/whois.nic.gd/gd/status_reserved_spec.rb +++ b/spec/whois/parsers/responses/whois.nic.gd/gd/status_reserved_spec.rb @@ -11,34 +11,19 @@ # require 'spec_helper' -require 'whois/parsers/whois.nic.gd.rb' -describe Whois::Parsers::WhoisNicGd, "status_reserved.expected" do +describe "whois.nic.gd", :aggregate_failures do subject do file = fixture("responses", "whois.nic.gd/gd/status_reserved.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.nic.gd") + Whois::Parser.parser_for(part) end - describe "#status" do - it do - expect(subject.status).to eq(:reserved) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(false) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(false) - end - end - describe "#reserved?" do - it do - expect(subject.reserved?).to eq(true) - end + it "matches status_reserved.expected" do + expect(subject.status).to eq(:reserved) + expect(subject.available?).to eq(false) + expect(subject.registered?).to eq(false) + expect(subject.reserved?).to eq(true) end end diff --git a/spec/whois/parsers/responses/whois.nic.gl/gl/status_available_spec.rb b/spec/whois/parsers/responses/whois.nic.gl/gl/status_available_spec.rb index 5c7468d1..f35ba25e 100644 --- a/spec/whois/parsers/responses/whois.nic.gl/gl/status_available_spec.rb +++ b/spec/whois/parsers/responses/whois.nic.gl/gl/status_available_spec.rb @@ -11,65 +11,26 @@ # require 'spec_helper' -require 'whois/parsers/whois.nic.gl.rb' -describe Whois::Parsers::WhoisNicGl, "status_available.expected" do +describe "whois.nic.gl", :aggregate_failures do subject do file = fixture("responses", "whois.nic.gl/gl/status_available.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.nic.gl") + Whois::Parser.parser_for(part) end - describe "#domain" do - it do - expect(subject.domain).to eq("u34jedzcq.gl") - end - end - describe "#domain_id" do - it do - expect(subject.domain_id).to eq(nil) - end - end - describe "#status" do - it do - expect(subject.status).to eq(:available) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(true) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(false) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to eq(nil) - end - end - describe "#updated_on" do - it do - expect(subject.updated_on).to eq(nil) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to eq(nil) - end - end - describe "#registrar" do - it do - expect(subject.registrar).to eq(nil) - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers).to eq([]) - end + it "matches status_available.expected" do + expect(subject.domain).to eq("u34jedzcq.gl") + expect(subject.domain_id).to eq(nil) + expect(subject.status).to eq(:available) + expect(subject.available?).to eq(true) + expect(subject.registered?).to eq(false) + expect(subject.created_on).to eq(nil) + expect(subject.updated_on).to eq(nil) + expect(subject.expires_on).to eq(nil) + expect(subject.registrar).to eq(nil) + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers).to eq([]) end end diff --git a/spec/whois/parsers/responses/whois.nic.gl/gl/status_registered_spec.rb b/spec/whois/parsers/responses/whois.nic.gl/gl/status_registered_spec.rb index f7ae01f8..01d3c108 100644 --- a/spec/whois/parsers/responses/whois.nic.gl/gl/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.nic.gl/gl/status_registered_spec.rb @@ -11,79 +11,40 @@ # require 'spec_helper' -require 'whois/parsers/whois.nic.gl.rb' -describe Whois::Parsers::WhoisNicGl, "status_registered.expected" do +describe "whois.nic.gl", :aggregate_failures do subject do file = fixture("responses", "whois.nic.gl/gl/status_registered.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.nic.gl") + Whois::Parser.parser_for(part) end - describe "#domain" do - it do - expect(subject.domain).to eq("google.gl") - end - end - describe "#domain_id" do - it do - expect(subject.domain_id).to eq("Imp669-GL") - end - end - describe "#status" do - it do - expect(subject.status).to eq(:registered) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(false) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(true) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to be_a(Time) - expect(subject.created_on).to eq(DateTime.parse("2003-03-11 03:00:00 UTC")) - end - end - describe "#updated_on" do - it do - expect(subject.updated_on).to be_a(Time) - expect(subject.updated_on).to eq(DateTime.parse("2013-12-02 19:11:52 UTC")) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to be_a(Time) - expect(subject.expires_on).to eq(DateTime.parse("2015-01-01 03:00:00 UTC")) - end - end - describe "#registrar" do - it do - expect(subject.registrar).to be_a(Whois::Parser::Registrar) - expect(subject.registrar.id).to eq(nil) - expect(subject.registrar.name).to eq("MarkMonitor") - expect(subject.registrar.url).to eq("http://www.markmonitor.com") - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers.size).to eq(2) - expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[0].name).to eq("ns1.google.com") - expect(subject.nameservers[0].ipv4).to eq(nil) - expect(subject.nameservers[0].ipv6).to eq(nil) - expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[1].name).to eq("ns2.google.com") - expect(subject.nameservers[1].ipv4).to eq(nil) - expect(subject.nameservers[1].ipv6).to eq(nil) - end + it "matches status_registered.expected" do + expect(subject.domain).to eq("google.gl") + expect(subject.domain_id).to eq("Imp669-GL") + expect(subject.status).to eq(:registered) + expect(subject.available?).to eq(false) + expect(subject.registered?).to eq(true) + expect(subject.created_on).to be_a(Time) + expect(subject.created_on).to eq(DateTime.parse("2003-03-11 03:00:00 UTC")) + expect(subject.updated_on).to be_a(Time) + expect(subject.updated_on).to eq(DateTime.parse("2013-12-02 19:11:52 UTC")) + expect(subject.expires_on).to be_a(Time) + expect(subject.expires_on).to eq(DateTime.parse("2015-01-01 03:00:00 UTC")) + expect(subject.registrar).to be_a(Whois::Parser::Registrar) + expect(subject.registrar.id).to eq(nil) + expect(subject.registrar.name).to eq("MarkMonitor") + expect(subject.registrar.url).to eq("http://www.markmonitor.com") + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers.size).to eq(2) + expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[0].name).to eq("ns1.google.com") + expect(subject.nameservers[0].ipv4).to eq(nil) + expect(subject.nameservers[0].ipv6).to eq(nil) + expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[1].name).to eq("ns2.google.com") + expect(subject.nameservers[1].ipv4).to eq(nil) + expect(subject.nameservers[1].ipv6).to eq(nil) end end diff --git a/spec/whois/parsers/responses/whois.nic.google/app/status_available_spec.rb b/spec/whois/parsers/responses/whois.nic.google/app/status_available_spec.rb index 6f01ffb2..905f4236 100644 --- a/spec/whois/parsers/responses/whois.nic.google/app/status_available_spec.rb +++ b/spec/whois/parsers/responses/whois.nic.google/app/status_available_spec.rb @@ -11,83 +11,32 @@ # require 'spec_helper' -require 'whois/parsers/whois.nic.google.rb' -describe Whois::Parsers::WhoisNicGoogle, "status_available.expected" do +describe "whois.nic.google", :aggregate_failures do subject do file = fixture("responses", "whois.nic.google/app/status_available.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.nic.google") + Whois::Parser.parser_for(part) end - describe "#domain" do - it do - expect(subject.domain).to eq(nil) - end - end - describe "#domain_id" do - it do - expect(subject.domain_id).to eq(nil) - end - end - describe "#status" do - it do - expect(subject.status).to eq(:available) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(true) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(false) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to eq(nil) - end - end - describe "#updated_on" do - it do - expect(subject.updated_on).to eq(nil) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to eq(nil) - end - end - describe "#registrar" do - it do - expect(subject.registrar).to eq(nil) - end - end - describe "#registrant_contacts" do - it do - expect(subject.registrant_contacts).to be_a(Array) - expect(subject.registrant_contacts).to eq([]) - end - end - describe "#admin_contacts" do - it do - expect(subject.admin_contacts).to be_a(Array) - expect(subject.admin_contacts).to eq([]) - end - end - describe "#technical_contacts" do - it do - expect(subject.technical_contacts).to be_a(Array) - expect(subject.technical_contacts).to eq([]) - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers).to eq([]) - end + it "matches status_available.expected" do + expect(subject.domain).to eq(nil) + expect(subject.domain_id).to eq(nil) + expect(subject.status).to eq(:available) + expect(subject.available?).to eq(true) + expect(subject.registered?).to eq(false) + expect(subject.created_on).to eq(nil) + expect(subject.updated_on).to eq(nil) + expect(subject.expires_on).to eq(nil) + expect(subject.registrar).to eq(nil) + expect(subject.registrant_contacts).to be_a(Array) + expect(subject.registrant_contacts).to eq([]) + expect(subject.admin_contacts).to be_a(Array) + expect(subject.admin_contacts).to eq([]) + expect(subject.technical_contacts).to be_a(Array) + expect(subject.technical_contacts).to eq([]) + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers).to eq([]) end end diff --git a/spec/whois/parsers/responses/whois.nic.google/app/status_registered_spec.rb b/spec/whois/parsers/responses/whois.nic.google/app/status_registered_spec.rb index 6bcee07f..294b18b9 100644 --- a/spec/whois/parsers/responses/whois.nic.google/app/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.nic.google/app/status_registered_spec.rb @@ -11,88 +11,45 @@ # require 'spec_helper' -require 'whois/parsers/whois.nic.google.rb' -describe Whois::Parsers::WhoisNicGoogle, "status_registered.expected" do +describe "whois.nic.google", :aggregate_failures do subject do file = fixture("responses", "whois.nic.google/app/status_registered.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.nic.google") + Whois::Parser.parser_for(part) end - describe "#domain" do - it do - expect(subject.domain).to eq("google.app") - end - end - describe "#domain_id" do - it do - expect(subject.domain_id).to eq("2C5A4BAFF-APP") - end - end - describe "#status" do - it do - expect(subject.status).to eq(:registered) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(false) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(true) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to be_a(Time) - expect(subject.created_on).to eq(DateTime.parse("2018-03-29T16:02:13Z")) - end - end - describe "#updated_on" do - it do - expect(subject.updated_on).to be_a(Time) - expect(subject.updated_on).to eq(DateTime.parse("2019-03-03T10:46:31Z")) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to be_a(Time) - expect(subject.expires_on).to eq(DateTime.parse("2020-03-29T16:02:13Z")) - end - end - describe "#registrar" do - it do - expect(subject.registrar).to be_a(Whois::Parser::Registrar) - expect(subject.registrar.id).to eq("292") - expect(subject.registrar.name).to eq("MarkMonitor Inc.") - end - end - describe "#registrant_contacts" do - it do - expect(subject.registrant_contacts).to be_a(Array) - expect(subject.registrant_contacts.size).to eq(1) - expect(subject.registrant_contacts[0]).to be_a(Whois::Parser::Contact) - expect(subject.registrant_contacts[0].organization).to eq("Google LLC") - expect(subject.registrant_contacts[0].state).to eq("CA") - expect(subject.registrant_contacts[0].country_code).to eq("US") - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers.size).to eq(4) - expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[0].name).to eq("ns1.googledomains.com") - expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[1].name).to eq("ns2.googledomains.com") - expect(subject.nameservers[2]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[2].name).to eq("ns3.googledomains.com") - expect(subject.nameservers[3]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[3].name).to eq("ns4.googledomains.com") - end + it "matches status_registered.expected" do + expect(subject.domain).to eq("google.app") + expect(subject.domain_id).to eq("2C5A4BAFF-APP") + expect(subject.status).to eq(:registered) + expect(subject.available?).to eq(false) + expect(subject.registered?).to eq(true) + expect(subject.created_on).to be_a(Time) + expect(subject.created_on).to eq(DateTime.parse("2018-03-29T16:02:13Z")) + expect(subject.updated_on).to be_a(Time) + expect(subject.updated_on).to eq(DateTime.parse("2019-03-03T10:46:31Z")) + expect(subject.expires_on).to be_a(Time) + expect(subject.expires_on).to eq(DateTime.parse("2020-03-29T16:02:13Z")) + expect(subject.registrar).to be_a(Whois::Parser::Registrar) + expect(subject.registrar.id).to eq("292") + expect(subject.registrar.name).to eq("MarkMonitor Inc.") + expect(subject.registrant_contacts).to be_a(Array) + expect(subject.registrant_contacts.size).to eq(1) + expect(subject.registrant_contacts[0]).to be_a(Whois::Parser::Contact) + expect(subject.registrant_contacts[0].organization).to eq("Google LLC") + expect(subject.registrant_contacts[0].state).to eq("CA") + expect(subject.registrant_contacts[0].country_code).to eq("US") + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers.size).to eq(4) + expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[0].name).to eq("ns1.googledomains.com") + expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[1].name).to eq("ns2.googledomains.com") + expect(subject.nameservers[2]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[2].name).to eq("ns3.googledomains.com") + expect(subject.nameservers[3]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[3].name).to eq("ns4.googledomains.com") end end diff --git a/spec/whois/parsers/responses/whois.nic.google/dev/status_available_spec.rb b/spec/whois/parsers/responses/whois.nic.google/dev/status_available_spec.rb index a31ecab3..492f8823 100644 --- a/spec/whois/parsers/responses/whois.nic.google/dev/status_available_spec.rb +++ b/spec/whois/parsers/responses/whois.nic.google/dev/status_available_spec.rb @@ -11,83 +11,32 @@ # require 'spec_helper' -require 'whois/parsers/whois.nic.google.rb' -describe Whois::Parsers::WhoisNicGoogle, "status_available.expected" do +describe "whois.nic.google", :aggregate_failures do subject do file = fixture("responses", "whois.nic.google/dev/status_available.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.nic.google") + Whois::Parser.parser_for(part) end - describe "#domain" do - it do - expect(subject.domain).to eq(nil) - end - end - describe "#domain_id" do - it do - expect(subject.domain_id).to eq(nil) - end - end - describe "#status" do - it do - expect(subject.status).to eq(:available) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(true) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(false) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to eq(nil) - end - end - describe "#updated_on" do - it do - expect(subject.updated_on).to eq(nil) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to eq(nil) - end - end - describe "#registrar" do - it do - expect(subject.registrar).to eq(nil) - end - end - describe "#registrant_contacts" do - it do - expect(subject.registrant_contacts).to be_a(Array) - expect(subject.registrant_contacts).to eq([]) - end - end - describe "#admin_contacts" do - it do - expect(subject.admin_contacts).to be_a(Array) - expect(subject.admin_contacts).to eq([]) - end - end - describe "#technical_contacts" do - it do - expect(subject.technical_contacts).to be_a(Array) - expect(subject.technical_contacts).to eq([]) - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers).to eq([]) - end + it "matches status_available.expected" do + expect(subject.domain).to eq(nil) + expect(subject.domain_id).to eq(nil) + expect(subject.status).to eq(:available) + expect(subject.available?).to eq(true) + expect(subject.registered?).to eq(false) + expect(subject.created_on).to eq(nil) + expect(subject.updated_on).to eq(nil) + expect(subject.expires_on).to eq(nil) + expect(subject.registrar).to eq(nil) + expect(subject.registrant_contacts).to be_a(Array) + expect(subject.registrant_contacts).to eq([]) + expect(subject.admin_contacts).to be_a(Array) + expect(subject.admin_contacts).to eq([]) + expect(subject.technical_contacts).to be_a(Array) + expect(subject.technical_contacts).to eq([]) + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers).to eq([]) end end diff --git a/spec/whois/parsers/responses/whois.nic.google/dev/status_registered_spec.rb b/spec/whois/parsers/responses/whois.nic.google/dev/status_registered_spec.rb index e2a0161b..484368fd 100644 --- a/spec/whois/parsers/responses/whois.nic.google/dev/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.nic.google/dev/status_registered_spec.rb @@ -11,88 +11,45 @@ # require 'spec_helper' -require 'whois/parsers/whois.nic.google.rb' -describe Whois::Parsers::WhoisNicGoogle, "status_registered.expected" do +describe "whois.nic.google", :aggregate_failures do subject do file = fixture("responses", "whois.nic.google/dev/status_registered.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.nic.google") + Whois::Parser.parser_for(part) end - describe "#domain" do - it do - expect(subject.domain).to eq("google.dev") - end - end - describe "#domain_id" do - it do - expect(subject.domain_id).to eq("2CF25B78E-DEV") - end - end - describe "#status" do - it do - expect(subject.status).to eq(:registered) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(false) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(true) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to be_a(Time) - expect(subject.created_on).to eq(DateTime.parse("2018-06-13T22:30:20Z")) - end - end - describe "#updated_on" do - it do - expect(subject.updated_on).to be_a(Time) - expect(subject.updated_on).to eq(DateTime.parse("2019-06-13T22:30:20Z")) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to be_a(Time) - expect(subject.expires_on).to eq(DateTime.parse("2020-06-13T22:30:20Z")) - end - end - describe "#registrar" do - it do - expect(subject.registrar).to be_a(Whois::Parser::Registrar) - expect(subject.registrar.id).to eq("9998") - expect(subject.registrar.name).to eq("Charleston Road Registry Billable") - end - end - describe "#registrant_contacts" do - it do - expect(subject.registrant_contacts).to be_a(Array) - expect(subject.registrant_contacts.size).to eq(1) - expect(subject.registrant_contacts[0]).to be_a(Whois::Parser::Contact) - expect(subject.registrant_contacts[0].organization).to eq("Charleston Road Registry, Inc.") - expect(subject.registrant_contacts[0].state).to eq("CA") - expect(subject.registrant_contacts[0].country_code).to eq("US") - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers.size).to eq(4) - expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[0].name).to eq("ns1.googledomains.com") - expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[1].name).to eq("ns2.googledomains.com") - expect(subject.nameservers[2]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[2].name).to eq("ns3.googledomains.com") - expect(subject.nameservers[3]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[3].name).to eq("ns4.googledomains.com") - end + it "matches status_registered.expected" do + expect(subject.domain).to eq("google.dev") + expect(subject.domain_id).to eq("2CF25B78E-DEV") + expect(subject.status).to eq(:registered) + expect(subject.available?).to eq(false) + expect(subject.registered?).to eq(true) + expect(subject.created_on).to be_a(Time) + expect(subject.created_on).to eq(DateTime.parse("2018-06-13T22:30:20Z")) + expect(subject.updated_on).to be_a(Time) + expect(subject.updated_on).to eq(DateTime.parse("2019-06-13T22:30:20Z")) + expect(subject.expires_on).to be_a(Time) + expect(subject.expires_on).to eq(DateTime.parse("2020-06-13T22:30:20Z")) + expect(subject.registrar).to be_a(Whois::Parser::Registrar) + expect(subject.registrar.id).to eq("9998") + expect(subject.registrar.name).to eq("Charleston Road Registry Billable") + expect(subject.registrant_contacts).to be_a(Array) + expect(subject.registrant_contacts.size).to eq(1) + expect(subject.registrant_contacts[0]).to be_a(Whois::Parser::Contact) + expect(subject.registrant_contacts[0].organization).to eq("Charleston Road Registry, Inc.") + expect(subject.registrant_contacts[0].state).to eq("CA") + expect(subject.registrant_contacts[0].country_code).to eq("US") + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers.size).to eq(4) + expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[0].name).to eq("ns1.googledomains.com") + expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[1].name).to eq("ns2.googledomains.com") + expect(subject.nameservers[2]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[2].name).to eq("ns3.googledomains.com") + expect(subject.nameservers[3]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[3].name).to eq("ns4.googledomains.com") end end diff --git a/spec/whois/parsers/responses/whois.nic.google/how/status_available_spec.rb b/spec/whois/parsers/responses/whois.nic.google/how/status_available_spec.rb index d13f36c6..43450bc3 100644 --- a/spec/whois/parsers/responses/whois.nic.google/how/status_available_spec.rb +++ b/spec/whois/parsers/responses/whois.nic.google/how/status_available_spec.rb @@ -11,83 +11,32 @@ # require 'spec_helper' -require 'whois/parsers/whois.nic.google.rb' -describe Whois::Parsers::WhoisNicGoogle, "status_available.expected" do +describe "whois.nic.google", :aggregate_failures do subject do file = fixture("responses", "whois.nic.google/how/status_available.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.nic.google") + Whois::Parser.parser_for(part) end - describe "#domain" do - it do - expect(subject.domain).to eq(nil) - end - end - describe "#domain_id" do - it do - expect(subject.domain_id).to eq(nil) - end - end - describe "#status" do - it do - expect(subject.status).to eq(:available) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(true) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(false) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to eq(nil) - end - end - describe "#updated_on" do - it do - expect(subject.updated_on).to eq(nil) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to eq(nil) - end - end - describe "#registrar" do - it do - expect(subject.registrar).to eq(nil) - end - end - describe "#registrant_contacts" do - it do - expect(subject.registrant_contacts).to be_a(Array) - expect(subject.registrant_contacts).to eq([]) - end - end - describe "#admin_contacts" do - it do - expect(subject.admin_contacts).to be_a(Array) - expect(subject.admin_contacts).to eq([]) - end - end - describe "#technical_contacts" do - it do - expect(subject.technical_contacts).to be_a(Array) - expect(subject.technical_contacts).to eq([]) - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers).to eq([]) - end + it "matches status_available.expected" do + expect(subject.domain).to eq(nil) + expect(subject.domain_id).to eq(nil) + expect(subject.status).to eq(:available) + expect(subject.available?).to eq(true) + expect(subject.registered?).to eq(false) + expect(subject.created_on).to eq(nil) + expect(subject.updated_on).to eq(nil) + expect(subject.expires_on).to eq(nil) + expect(subject.registrar).to eq(nil) + expect(subject.registrant_contacts).to be_a(Array) + expect(subject.registrant_contacts).to eq([]) + expect(subject.admin_contacts).to be_a(Array) + expect(subject.admin_contacts).to eq([]) + expect(subject.technical_contacts).to be_a(Array) + expect(subject.technical_contacts).to eq([]) + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers).to eq([]) end end diff --git a/spec/whois/parsers/responses/whois.nic.google/how/status_registered_spec.rb b/spec/whois/parsers/responses/whois.nic.google/how/status_registered_spec.rb index b449aeae..54fd65fc 100644 --- a/spec/whois/parsers/responses/whois.nic.google/how/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.nic.google/how/status_registered_spec.rb @@ -11,88 +11,45 @@ # require 'spec_helper' -require 'whois/parsers/whois.nic.google.rb' -describe Whois::Parsers::WhoisNicGoogle, "status_registered.expected" do +describe "whois.nic.google", :aggregate_failures do subject do file = fixture("responses", "whois.nic.google/how/status_registered.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.nic.google") + Whois::Parser.parser_for(part) end - describe "#domain" do - it do - expect(subject.domain).to eq("google.how") - end - end - describe "#domain_id" do - it do - expect(subject.domain_id).to eq("62CF6AF-HOW") - end - end - describe "#status" do - it do - expect(subject.status).to eq(:registered) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(false) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(true) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to be_a(Time) - expect(subject.created_on).to eq(DateTime.parse("2015-01-12T16:14:39Z")) - end - end - describe "#updated_on" do - it do - expect(subject.updated_on).to be_a(Time) - expect(subject.updated_on).to eq(DateTime.parse("2019-02-14T19:53:11Z")) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to be_a(Time) - expect(subject.expires_on).to eq(DateTime.parse("2020-01-12T16:14:39Z")) - end - end - describe "#registrar" do - it do - expect(subject.registrar).to be_a(Whois::Parser::Registrar) - expect(subject.registrar.id).to eq("292") - expect(subject.registrar.name).to eq("MarkMonitor Inc.") - end - end - describe "#registrant_contacts" do - it do - expect(subject.registrant_contacts).to be_a(Array) - expect(subject.registrant_contacts.size).to eq(1) - expect(subject.registrant_contacts[0]).to be_a(Whois::Parser::Contact) - expect(subject.registrant_contacts[0].organization).to eq("Google LLC") - expect(subject.registrant_contacts[0].state).to eq("CA") - expect(subject.registrant_contacts[0].country_code).to eq("US") - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers.size).to eq(4) - expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[0].name).to eq("ns1.googledomains.com") - expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[1].name).to eq("ns2.googledomains.com") - expect(subject.nameservers[2]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[2].name).to eq("ns3.googledomains.com") - expect(subject.nameservers[3]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[3].name).to eq("ns4.googledomains.com") - end + it "matches status_registered.expected" do + expect(subject.domain).to eq("google.how") + expect(subject.domain_id).to eq("62CF6AF-HOW") + expect(subject.status).to eq(:registered) + expect(subject.available?).to eq(false) + expect(subject.registered?).to eq(true) + expect(subject.created_on).to be_a(Time) + expect(subject.created_on).to eq(DateTime.parse("2015-01-12T16:14:39Z")) + expect(subject.updated_on).to be_a(Time) + expect(subject.updated_on).to eq(DateTime.parse("2019-02-14T19:53:11Z")) + expect(subject.expires_on).to be_a(Time) + expect(subject.expires_on).to eq(DateTime.parse("2020-01-12T16:14:39Z")) + expect(subject.registrar).to be_a(Whois::Parser::Registrar) + expect(subject.registrar.id).to eq("292") + expect(subject.registrar.name).to eq("MarkMonitor Inc.") + expect(subject.registrant_contacts).to be_a(Array) + expect(subject.registrant_contacts.size).to eq(1) + expect(subject.registrant_contacts[0]).to be_a(Whois::Parser::Contact) + expect(subject.registrant_contacts[0].organization).to eq("Google LLC") + expect(subject.registrant_contacts[0].state).to eq("CA") + expect(subject.registrant_contacts[0].country_code).to eq("US") + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers.size).to eq(4) + expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[0].name).to eq("ns1.googledomains.com") + expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[1].name).to eq("ns2.googledomains.com") + expect(subject.nameservers[2]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[2].name).to eq("ns3.googledomains.com") + expect(subject.nameservers[3]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[3].name).to eq("ns4.googledomains.com") end end diff --git a/spec/whois/parsers/responses/whois.nic.google/page/status_available_spec.rb b/spec/whois/parsers/responses/whois.nic.google/page/status_available_spec.rb index bf8d58ba..cd23b9e7 100644 --- a/spec/whois/parsers/responses/whois.nic.google/page/status_available_spec.rb +++ b/spec/whois/parsers/responses/whois.nic.google/page/status_available_spec.rb @@ -11,83 +11,32 @@ # require 'spec_helper' -require 'whois/parsers/whois.nic.google.rb' -describe Whois::Parsers::WhoisNicGoogle, "status_available.expected" do +describe "whois.nic.google", :aggregate_failures do subject do file = fixture("responses", "whois.nic.google/page/status_available.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.nic.google") + Whois::Parser.parser_for(part) end - describe "#domain" do - it do - expect(subject.domain).to eq(nil) - end - end - describe "#domain_id" do - it do - expect(subject.domain_id).to eq(nil) - end - end - describe "#status" do - it do - expect(subject.status).to eq(:available) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(true) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(false) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to eq(nil) - end - end - describe "#updated_on" do - it do - expect(subject.updated_on).to eq(nil) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to eq(nil) - end - end - describe "#registrar" do - it do - expect(subject.registrar).to eq(nil) - end - end - describe "#registrant_contacts" do - it do - expect(subject.registrant_contacts).to be_a(Array) - expect(subject.registrant_contacts).to eq([]) - end - end - describe "#admin_contacts" do - it do - expect(subject.admin_contacts).to be_a(Array) - expect(subject.admin_contacts).to eq([]) - end - end - describe "#technical_contacts" do - it do - expect(subject.technical_contacts).to be_a(Array) - expect(subject.technical_contacts).to eq([]) - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers).to eq([]) - end + it "matches status_available.expected" do + expect(subject.domain).to eq(nil) + expect(subject.domain_id).to eq(nil) + expect(subject.status).to eq(:available) + expect(subject.available?).to eq(true) + expect(subject.registered?).to eq(false) + expect(subject.created_on).to eq(nil) + expect(subject.updated_on).to eq(nil) + expect(subject.expires_on).to eq(nil) + expect(subject.registrar).to eq(nil) + expect(subject.registrant_contacts).to be_a(Array) + expect(subject.registrant_contacts).to eq([]) + expect(subject.admin_contacts).to be_a(Array) + expect(subject.admin_contacts).to eq([]) + expect(subject.technical_contacts).to be_a(Array) + expect(subject.technical_contacts).to eq([]) + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers).to eq([]) end end diff --git a/spec/whois/parsers/responses/whois.nic.google/page/status_registered_spec.rb b/spec/whois/parsers/responses/whois.nic.google/page/status_registered_spec.rb index 48f086aa..a8b120cd 100644 --- a/spec/whois/parsers/responses/whois.nic.google/page/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.nic.google/page/status_registered_spec.rb @@ -11,68 +11,33 @@ # require 'spec_helper' -require 'whois/parsers/whois.nic.google.rb' -describe Whois::Parsers::WhoisNicGoogle, "status_registered.expected" do +describe "whois.nic.google", :aggregate_failures do subject do file = fixture("responses", "whois.nic.google/page/status_registered.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.nic.google") + Whois::Parser.parser_for(part) end - describe "#domain" do - it do - expect(subject.domain).to eq("google.page") - end - end - describe "#domain_id" do - it do - expect(subject.domain_id).to eq("2D55CC686-PAGE") - end - end - describe "#status" do - it do - expect(subject.status).to eq(:registered) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(false) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(true) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to be_a(Time) - expect(subject.created_on).to eq(DateTime.parse("2018-08-13T21:29:41Z")) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to be_a(Time) - expect(subject.expires_on).to eq(DateTime.parse("2019-08-13T21:29:41Z")) - end - end - describe "#registrar" do - it do - expect(subject.registrar).to be_a(Whois::Parser::Registrar) - expect(subject.registrar.id).to eq("9998") - expect(subject.registrar.name).to eq("Charleston Road Registry Billable") - end - end - describe "#registrant_contacts" do - it do - expect(subject.registrant_contacts).to be_a(Array) - expect(subject.registrant_contacts.size).to eq(1) - expect(subject.registrant_contacts[0]).to be_a(Whois::Parser::Contact) - expect(subject.registrant_contacts[0].organization).to eq("Charleston Road Registry, Inc.") - expect(subject.registrant_contacts[0].state).to eq("CA") - expect(subject.registrant_contacts[0].country_code).to eq("US") - end + it "matches status_registered.expected" do + expect(subject.domain).to eq("google.page") + expect(subject.domain_id).to eq("2D55CC686-PAGE") + expect(subject.status).to eq(:registered) + expect(subject.available?).to eq(false) + expect(subject.registered?).to eq(true) + expect(subject.created_on).to be_a(Time) + expect(subject.created_on).to eq(DateTime.parse("2018-08-13T21:29:41Z")) + expect(subject.expires_on).to be_a(Time) + expect(subject.expires_on).to eq(DateTime.parse("2019-08-13T21:29:41Z")) + expect(subject.registrar).to be_a(Whois::Parser::Registrar) + expect(subject.registrar.id).to eq("9998") + expect(subject.registrar.name).to eq("Charleston Road Registry Billable") + expect(subject.registrant_contacts).to be_a(Array) + expect(subject.registrant_contacts.size).to eq(1) + expect(subject.registrant_contacts[0]).to be_a(Whois::Parser::Contact) + expect(subject.registrant_contacts[0].organization).to eq("Charleston Road Registry, Inc.") + expect(subject.registrant_contacts[0].state).to eq("CA") + expect(subject.registrant_contacts[0].country_code).to eq("US") end end diff --git a/spec/whois/parsers/responses/whois.nic.google/soy/status_available_spec.rb b/spec/whois/parsers/responses/whois.nic.google/soy/status_available_spec.rb index 14943ef5..4a6e53b9 100644 --- a/spec/whois/parsers/responses/whois.nic.google/soy/status_available_spec.rb +++ b/spec/whois/parsers/responses/whois.nic.google/soy/status_available_spec.rb @@ -11,83 +11,32 @@ # require 'spec_helper' -require 'whois/parsers/whois.nic.google.rb' -describe Whois::Parsers::WhoisNicGoogle, "status_available.expected" do +describe "whois.nic.google", :aggregate_failures do subject do file = fixture("responses", "whois.nic.google/soy/status_available.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.nic.google") + Whois::Parser.parser_for(part) end - describe "#domain" do - it do - expect(subject.domain).to eq(nil) - end - end - describe "#domain_id" do - it do - expect(subject.domain_id).to eq(nil) - end - end - describe "#status" do - it do - expect(subject.status).to eq(:available) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(true) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(false) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to eq(nil) - end - end - describe "#updated_on" do - it do - expect(subject.updated_on).to eq(nil) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to eq(nil) - end - end - describe "#registrar" do - it do - expect(subject.registrar).to eq(nil) - end - end - describe "#registrant_contacts" do - it do - expect(subject.registrant_contacts).to be_a(Array) - expect(subject.registrant_contacts).to eq([]) - end - end - describe "#admin_contacts" do - it do - expect(subject.admin_contacts).to be_a(Array) - expect(subject.admin_contacts).to eq([]) - end - end - describe "#technical_contacts" do - it do - expect(subject.technical_contacts).to be_a(Array) - expect(subject.technical_contacts).to eq([]) - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers).to eq([]) - end + it "matches status_available.expected" do + expect(subject.domain).to eq(nil) + expect(subject.domain_id).to eq(nil) + expect(subject.status).to eq(:available) + expect(subject.available?).to eq(true) + expect(subject.registered?).to eq(false) + expect(subject.created_on).to eq(nil) + expect(subject.updated_on).to eq(nil) + expect(subject.expires_on).to eq(nil) + expect(subject.registrar).to eq(nil) + expect(subject.registrant_contacts).to be_a(Array) + expect(subject.registrant_contacts).to eq([]) + expect(subject.admin_contacts).to be_a(Array) + expect(subject.admin_contacts).to eq([]) + expect(subject.technical_contacts).to be_a(Array) + expect(subject.technical_contacts).to eq([]) + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers).to eq([]) end end diff --git a/spec/whois/parsers/responses/whois.nic.google/soy/status_registered_spec.rb b/spec/whois/parsers/responses/whois.nic.google/soy/status_registered_spec.rb index fbb14569..ff8b8f1b 100644 --- a/spec/whois/parsers/responses/whois.nic.google/soy/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.nic.google/soy/status_registered_spec.rb @@ -11,88 +11,45 @@ # require 'spec_helper' -require 'whois/parsers/whois.nic.google.rb' -describe Whois::Parsers::WhoisNicGoogle, "status_registered.expected" do +describe "whois.nic.google", :aggregate_failures do subject do file = fixture("responses", "whois.nic.google/soy/status_registered.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.nic.google") + Whois::Parser.parser_for(part) end - describe "#domain" do - it do - expect(subject.domain).to eq("google.soy") - end - end - describe "#domain_id" do - it do - expect(subject.domain_id).to eq("88628D1-SOY") - end - end - describe "#status" do - it do - expect(subject.status).to eq(:registered) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(false) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(true) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to be_a(Time) - expect(subject.created_on).to eq(DateTime.parse("2014-12-01T21:58:34Z")) - end - end - describe "#updated_on" do - it do - expect(subject.updated_on).to be_a(Time) - expect(subject.updated_on).to eq(DateTime.parse("2019-02-14T19:53:13Z")) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to be_a(Time) - expect(subject.expires_on).to eq(DateTime.parse("2019-12-01T21:58:34Z")) - end - end - describe "#registrar" do - it do - expect(subject.registrar).to be_a(Whois::Parser::Registrar) - expect(subject.registrar.id).to eq("292") - expect(subject.registrar.name).to eq("MarkMonitor Inc.") - end - end - describe "#registrant_contacts" do - it do - expect(subject.registrant_contacts).to be_a(Array) - expect(subject.registrant_contacts.size).to eq(1) - expect(subject.registrant_contacts[0]).to be_a(Whois::Parser::Contact) - expect(subject.registrant_contacts[0].organization).to eq("Google LLC") - expect(subject.registrant_contacts[0].state).to eq("CA") - expect(subject.registrant_contacts[0].country_code).to eq("US") - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers.size).to eq(4) - expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[0].name).to eq("ns1.googledomains.com") - expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[1].name).to eq("ns2.googledomains.com") - expect(subject.nameservers[2]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[2].name).to eq("ns3.googledomains.com") - expect(subject.nameservers[3]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[3].name).to eq("ns4.googledomains.com") - end + it "matches status_registered.expected" do + expect(subject.domain).to eq("google.soy") + expect(subject.domain_id).to eq("88628D1-SOY") + expect(subject.status).to eq(:registered) + expect(subject.available?).to eq(false) + expect(subject.registered?).to eq(true) + expect(subject.created_on).to be_a(Time) + expect(subject.created_on).to eq(DateTime.parse("2014-12-01T21:58:34Z")) + expect(subject.updated_on).to be_a(Time) + expect(subject.updated_on).to eq(DateTime.parse("2019-02-14T19:53:13Z")) + expect(subject.expires_on).to be_a(Time) + expect(subject.expires_on).to eq(DateTime.parse("2019-12-01T21:58:34Z")) + expect(subject.registrar).to be_a(Whois::Parser::Registrar) + expect(subject.registrar.id).to eq("292") + expect(subject.registrar.name).to eq("MarkMonitor Inc.") + expect(subject.registrant_contacts).to be_a(Array) + expect(subject.registrant_contacts.size).to eq(1) + expect(subject.registrant_contacts[0]).to be_a(Whois::Parser::Contact) + expect(subject.registrant_contacts[0].organization).to eq("Google LLC") + expect(subject.registrant_contacts[0].state).to eq("CA") + expect(subject.registrant_contacts[0].country_code).to eq("US") + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers.size).to eq(4) + expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[0].name).to eq("ns1.googledomains.com") + expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[1].name).to eq("ns2.googledomains.com") + expect(subject.nameservers[2]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[2].name).to eq("ns3.googledomains.com") + expect(subject.nameservers[3]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[3].name).to eq("ns4.googledomains.com") end end diff --git a/spec/whois/parsers/responses/whois.nic.google/xn--q9jyb4c/status_available_spec.rb b/spec/whois/parsers/responses/whois.nic.google/xn--q9jyb4c/status_available_spec.rb index 9a88dace..a9d22860 100644 --- a/spec/whois/parsers/responses/whois.nic.google/xn--q9jyb4c/status_available_spec.rb +++ b/spec/whois/parsers/responses/whois.nic.google/xn--q9jyb4c/status_available_spec.rb @@ -11,83 +11,32 @@ # require 'spec_helper' -require 'whois/parsers/whois.nic.google.rb' -describe Whois::Parsers::WhoisNicGoogle, "status_available.expected" do +describe "whois.nic.google", :aggregate_failures do subject do file = fixture("responses", "whois.nic.google/xn--q9jyb4c/status_available.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.nic.google") + Whois::Parser.parser_for(part) end - describe "#domain" do - it do - expect(subject.domain).to eq(nil) - end - end - describe "#domain_id" do - it do - expect(subject.domain_id).to eq(nil) - end - end - describe "#status" do - it do - expect(subject.status).to eq(:available) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(true) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(false) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to eq(nil) - end - end - describe "#updated_on" do - it do - expect(subject.updated_on).to eq(nil) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to eq(nil) - end - end - describe "#registrar" do - it do - expect(subject.registrar).to eq(nil) - end - end - describe "#registrant_contacts" do - it do - expect(subject.registrant_contacts).to be_a(Array) - expect(subject.registrant_contacts).to eq([]) - end - end - describe "#admin_contacts" do - it do - expect(subject.admin_contacts).to be_a(Array) - expect(subject.admin_contacts).to eq([]) - end - end - describe "#technical_contacts" do - it do - expect(subject.technical_contacts).to be_a(Array) - expect(subject.technical_contacts).to eq([]) - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers).to eq([]) - end + it "matches status_available.expected" do + expect(subject.domain).to eq(nil) + expect(subject.domain_id).to eq(nil) + expect(subject.status).to eq(:available) + expect(subject.available?).to eq(true) + expect(subject.registered?).to eq(false) + expect(subject.created_on).to eq(nil) + expect(subject.updated_on).to eq(nil) + expect(subject.expires_on).to eq(nil) + expect(subject.registrar).to eq(nil) + expect(subject.registrant_contacts).to be_a(Array) + expect(subject.registrant_contacts).to eq([]) + expect(subject.admin_contacts).to be_a(Array) + expect(subject.admin_contacts).to eq([]) + expect(subject.technical_contacts).to be_a(Array) + expect(subject.technical_contacts).to eq([]) + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers).to eq([]) end end diff --git a/spec/whois/parsers/responses/whois.nic.google/xn--q9jyb4c/status_registered_spec.rb b/spec/whois/parsers/responses/whois.nic.google/xn--q9jyb4c/status_registered_spec.rb index fabf1336..1162c81d 100644 --- a/spec/whois/parsers/responses/whois.nic.google/xn--q9jyb4c/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.nic.google/xn--q9jyb4c/status_registered_spec.rb @@ -11,88 +11,45 @@ # require 'spec_helper' -require 'whois/parsers/whois.nic.google.rb' -describe Whois::Parsers::WhoisNicGoogle, "status_registered.expected" do +describe "whois.nic.google", :aggregate_failures do subject do file = fixture("responses", "whois.nic.google/xn--q9jyb4c/status_registered.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.nic.google") + Whois::Parser.parser_for(part) end - describe "#domain" do - it do - expect(subject.domain).to eq("google.xn--q9jyb4c") - end - end - describe "#domain_id" do - it do - expect(subject.domain_id).to eq("C176ED-Q9JYB4C") - end - end - describe "#status" do - it do - expect(subject.status).to eq(:registered) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(false) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(true) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to be_a(Time) - expect(subject.created_on).to eq(DateTime.parse("2014-03-04T19:45:32Z")) - end - end - describe "#updated_on" do - it do - expect(subject.updated_on).to be_a(Time) - expect(subject.updated_on).to eq(DateTime.parse("2019-02-05T10:39:55Z")) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to be_a(Time) - expect(subject.expires_on).to eq(DateTime.parse("2020-03-04T19:45:32Z")) - end - end - describe "#registrar" do - it do - expect(subject.registrar).to be_a(Whois::Parser::Registrar) - expect(subject.registrar.id).to eq("292") - expect(subject.registrar.name).to eq("MarkMonitor Inc.") - end - end - describe "#registrant_contacts" do - it do - expect(subject.registrant_contacts).to be_a(Array) - expect(subject.registrant_contacts.size).to eq(1) - expect(subject.registrant_contacts[0]).to be_a(Whois::Parser::Contact) - expect(subject.registrant_contacts[0].organization).to eq("Google Inc.") - expect(subject.registrant_contacts[0].state).to eq("CA") - expect(subject.registrant_contacts[0].country_code).to eq("US") - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers.size).to eq(4) - expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[0].name).to eq("ns1.googledomains.com") - expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[1].name).to eq("ns2.googledomains.com") - expect(subject.nameservers[2]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[2].name).to eq("ns3.googledomains.com") - expect(subject.nameservers[3]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[3].name).to eq("ns4.googledomains.com") - end + it "matches status_registered.expected" do + expect(subject.domain).to eq("google.xn--q9jyb4c") + expect(subject.domain_id).to eq("C176ED-Q9JYB4C") + expect(subject.status).to eq(:registered) + expect(subject.available?).to eq(false) + expect(subject.registered?).to eq(true) + expect(subject.created_on).to be_a(Time) + expect(subject.created_on).to eq(DateTime.parse("2014-03-04T19:45:32Z")) + expect(subject.updated_on).to be_a(Time) + expect(subject.updated_on).to eq(DateTime.parse("2019-02-05T10:39:55Z")) + expect(subject.expires_on).to be_a(Time) + expect(subject.expires_on).to eq(DateTime.parse("2020-03-04T19:45:32Z")) + expect(subject.registrar).to be_a(Whois::Parser::Registrar) + expect(subject.registrar.id).to eq("292") + expect(subject.registrar.name).to eq("MarkMonitor Inc.") + expect(subject.registrant_contacts).to be_a(Array) + expect(subject.registrant_contacts.size).to eq(1) + expect(subject.registrant_contacts[0]).to be_a(Whois::Parser::Contact) + expect(subject.registrant_contacts[0].organization).to eq("Google Inc.") + expect(subject.registrant_contacts[0].state).to eq("CA") + expect(subject.registrant_contacts[0].country_code).to eq("US") + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers.size).to eq(4) + expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[0].name).to eq("ns1.googledomains.com") + expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[1].name).to eq("ns2.googledomains.com") + expect(subject.nameservers[2]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[2].name).to eq("ns3.googledomains.com") + expect(subject.nameservers[3]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[3].name).to eq("ns4.googledomains.com") end end diff --git a/spec/whois/parsers/responses/whois.nic.gs/gs/property_status_available_spec.rb b/spec/whois/parsers/responses/whois.nic.gs/gs/property_status_available_spec.rb index 1ddf8a3a..c3c4c4ed 100644 --- a/spec/whois/parsers/responses/whois.nic.gs/gs/property_status_available_spec.rb +++ b/spec/whois/parsers/responses/whois.nic.gs/gs/property_status_available_spec.rb @@ -11,29 +11,18 @@ # require 'spec_helper' -require 'whois/parsers/whois.nic.gs.rb' -describe Whois::Parsers::WhoisNicGs, "property_status_available.expected" do +describe "whois.nic.gs", :aggregate_failures do subject do file = fixture("responses", "whois.nic.gs/gs/property_status_available.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.nic.gs") + Whois::Parser.parser_for(part) end - describe "#status" do - it do - expect(subject.status).to eq(:available) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(true) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(false) - end + it "matches property_status_available.expected" do + expect(subject.status).to eq(:available) + expect(subject.available?).to eq(true) + expect(subject.registered?).to eq(false) end end diff --git a/spec/whois/parsers/responses/whois.nic.gs/gs/property_status_ok_spec.rb b/spec/whois/parsers/responses/whois.nic.gs/gs/property_status_ok_spec.rb index 864173f7..cb2ae52e 100644 --- a/spec/whois/parsers/responses/whois.nic.gs/gs/property_status_ok_spec.rb +++ b/spec/whois/parsers/responses/whois.nic.gs/gs/property_status_ok_spec.rb @@ -11,29 +11,18 @@ # require 'spec_helper' -require 'whois/parsers/whois.nic.gs.rb' -describe Whois::Parsers::WhoisNicGs, "property_status_ok.expected" do +describe "whois.nic.gs", :aggregate_failures do subject do file = fixture("responses", "whois.nic.gs/gs/property_status_ok.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.nic.gs") + Whois::Parser.parser_for(part) end - describe "#status" do - it do - expect(subject.status).to eq(:registered) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(false) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(true) - end + it "matches property_status_ok.expected" do + expect(subject.status).to eq(:registered) + expect(subject.available?).to eq(false) + expect(subject.registered?).to eq(true) end end diff --git a/spec/whois/parsers/responses/whois.nic.gs/gs/status_available_spec.rb b/spec/whois/parsers/responses/whois.nic.gs/gs/status_available_spec.rb index b4ea566a..75b01afe 100644 --- a/spec/whois/parsers/responses/whois.nic.gs/gs/status_available_spec.rb +++ b/spec/whois/parsers/responses/whois.nic.gs/gs/status_available_spec.rb @@ -11,65 +11,26 @@ # require 'spec_helper' -require 'whois/parsers/whois.nic.gs.rb' -describe Whois::Parsers::WhoisNicGs, "status_available.expected" do +describe "whois.nic.gs", :aggregate_failures do subject do file = fixture("responses", "whois.nic.gs/gs/status_available.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.nic.gs") + Whois::Parser.parser_for(part) end - describe "#domain" do - it do - expect(subject.domain).to eq("u34jedzcq.gs") - end - end - describe "#domain_id" do - it do - expect(subject.domain_id).to eq(nil) - end - end - describe "#status" do - it do - expect(subject.status).to eq(:available) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(true) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(false) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to eq(nil) - end - end - describe "#updated_on" do - it do - expect(subject.updated_on).to eq(nil) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to eq(nil) - end - end - describe "#registrar" do - it do - expect(subject.registrar).to eq(nil) - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers).to eq([]) - end + it "matches status_available.expected" do + expect(subject.domain).to eq("u34jedzcq.gs") + expect(subject.domain_id).to eq(nil) + expect(subject.status).to eq(:available) + expect(subject.available?).to eq(true) + expect(subject.registered?).to eq(false) + expect(subject.created_on).to eq(nil) + expect(subject.updated_on).to eq(nil) + expect(subject.expires_on).to eq(nil) + expect(subject.registrar).to eq(nil) + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers).to eq([]) end end diff --git a/spec/whois/parsers/responses/whois.nic.gs/gs/status_registered_spec.rb b/spec/whois/parsers/responses/whois.nic.gs/gs/status_registered_spec.rb index 01693838..0b8a0682 100644 --- a/spec/whois/parsers/responses/whois.nic.gs/gs/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.nic.gs/gs/status_registered_spec.rb @@ -11,75 +11,36 @@ # require 'spec_helper' -require 'whois/parsers/whois.nic.gs.rb' -describe Whois::Parsers::WhoisNicGs, "status_registered.expected" do +describe "whois.nic.gs", :aggregate_failures do subject do file = fixture("responses", "whois.nic.gs/gs/status_registered.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.nic.gs") + Whois::Parser.parser_for(part) end - describe "#domain" do - it do - expect(subject.domain).to eq("google.gs") - end - end - describe "#domain_id" do - it do - expect(subject.domain_id).to eq("4258-CoCCA.gs") - end - end - describe "#status" do - it do - expect(subject.status).to eq(:registered) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(false) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(true) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to be_a(Time) - expect(subject.created_on).to eq(DateTime.parse("2004-07-08 12:00:00 UTC")) - end - end - describe "#updated_on" do - it do - expect(subject.updated_on).to be_a(Time) - expect(subject.updated_on).to eq(DateTime.parse("2013-12-06 07:35:24 UTC")) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to be_a(Time) - expect(subject.expires_on).to eq(DateTime.parse("2014-07-08 12:00:00 UTC")) - end - end - describe "#registrar" do - it do - expect(subject.registrar).to be_a(Whois::Parser::Registrar) - expect(subject.registrar.id).to eq(nil) - expect(subject.registrar.name).to eq("MarkMonitor") - expect(subject.registrar.url).to eq("http://www.markmonitor.com") - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers.size).to eq(2) - expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[0].name).to eq("ns1.google.com") - expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[1].name).to eq("ns2.google.com") - end + it "matches status_registered.expected" do + expect(subject.domain).to eq("google.gs") + expect(subject.domain_id).to eq("4258-CoCCA.gs") + expect(subject.status).to eq(:registered) + expect(subject.available?).to eq(false) + expect(subject.registered?).to eq(true) + expect(subject.created_on).to be_a(Time) + expect(subject.created_on).to eq(DateTime.parse("2004-07-08 12:00:00 UTC")) + expect(subject.updated_on).to be_a(Time) + expect(subject.updated_on).to eq(DateTime.parse("2013-12-06 07:35:24 UTC")) + expect(subject.expires_on).to be_a(Time) + expect(subject.expires_on).to eq(DateTime.parse("2014-07-08 12:00:00 UTC")) + expect(subject.registrar).to be_a(Whois::Parser::Registrar) + expect(subject.registrar.id).to eq(nil) + expect(subject.registrar.name).to eq("MarkMonitor") + expect(subject.registrar.url).to eq("http://www.markmonitor.com") + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers.size).to eq(2) + expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[0].name).to eq("ns1.google.com") + expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[1].name).to eq("ns2.google.com") end end diff --git a/spec/whois/parsers/responses/whois.nic.hn/hn/status_available_spec.rb b/spec/whois/parsers/responses/whois.nic.hn/hn/status_available_spec.rb index 31866bae..5e7740dc 100644 --- a/spec/whois/parsers/responses/whois.nic.hn/hn/status_available_spec.rb +++ b/spec/whois/parsers/responses/whois.nic.hn/hn/status_available_spec.rb @@ -11,65 +11,26 @@ # require 'spec_helper' -require 'whois/parsers/whois.nic.hn.rb' -describe Whois::Parsers::WhoisNicHn, "status_available.expected" do +describe "whois.nic.hn", :aggregate_failures do subject do file = fixture("responses", "whois.nic.hn/hn/status_available.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.nic.hn") + Whois::Parser.parser_for(part) end - describe "#domain" do - it do - expect(subject.domain).to eq("u34jedzcq.hn") - end - end - describe "#domain_id" do - it do - expect(subject.domain_id).to eq(nil) - end - end - describe "#status" do - it do - expect(subject.status).to eq(:available) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(true) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(false) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to eq(nil) - end - end - describe "#updated_on" do - it do - expect(subject.updated_on).to eq(nil) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to eq(nil) - end - end - describe "#registrar" do - it do - expect(subject.registrar).to eq(nil) - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers).to eq([]) - end + it "matches status_available.expected" do + expect(subject.domain).to eq("u34jedzcq.hn") + expect(subject.domain_id).to eq(nil) + expect(subject.status).to eq(:available) + expect(subject.available?).to eq(true) + expect(subject.registered?).to eq(false) + expect(subject.created_on).to eq(nil) + expect(subject.updated_on).to eq(nil) + expect(subject.expires_on).to eq(nil) + expect(subject.registrar).to eq(nil) + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers).to eq([]) end end diff --git a/spec/whois/parsers/responses/whois.nic.hn/hn/status_registered_spec.rb b/spec/whois/parsers/responses/whois.nic.hn/hn/status_registered_spec.rb index eea0e016..0fc8f3c1 100644 --- a/spec/whois/parsers/responses/whois.nic.hn/hn/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.nic.hn/hn/status_registered_spec.rb @@ -11,75 +11,36 @@ # require 'spec_helper' -require 'whois/parsers/whois.nic.hn.rb' -describe Whois::Parsers::WhoisNicHn, "status_registered.expected" do +describe "whois.nic.hn", :aggregate_failures do subject do file = fixture("responses", "whois.nic.hn/hn/status_registered.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.nic.hn") + Whois::Parser.parser_for(part) end - describe "#domain" do - it do - expect(subject.domain).to eq("google.hn") - end - end - describe "#domain_id" do - it do - expect(subject.domain_id).to eq("801220-CoCCA") - end - end - describe "#status" do - it do - expect(subject.status).to eq(:registered) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(false) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(true) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to be_a(Time) - expect(subject.created_on).to eq(DateTime.parse("2003-03-07 05:00:00 UTC")) - end - end - describe "#updated_on" do - it do - expect(subject.updated_on).to be_a(Time) - expect(subject.updated_on).to eq(DateTime.parse("2014-02-03 10:22:23 UTC")) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to be_a(Time) - expect(subject.expires_on).to eq(DateTime.parse("2015-03-07 05:00:00 UTC")) - end - end - describe "#registrar" do - it do - expect(subject.registrar).to be_a(Whois::Parser::Registrar) - expect(subject.registrar.id).to eq(nil) - expect(subject.registrar.name).to eq("MarkMonitor") - expect(subject.registrar.url).to eq("http://www.markmonitor.com") - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers.size).to eq(2) - expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[0].name).to eq("ns1.google.com") - expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[1].name).to eq("ns2.google.com") - end + it "matches status_registered.expected" do + expect(subject.domain).to eq("google.hn") + expect(subject.domain_id).to eq("801220-CoCCA") + expect(subject.status).to eq(:registered) + expect(subject.available?).to eq(false) + expect(subject.registered?).to eq(true) + expect(subject.created_on).to be_a(Time) + expect(subject.created_on).to eq(DateTime.parse("2003-03-07 05:00:00 UTC")) + expect(subject.updated_on).to be_a(Time) + expect(subject.updated_on).to eq(DateTime.parse("2014-02-03 10:22:23 UTC")) + expect(subject.expires_on).to be_a(Time) + expect(subject.expires_on).to eq(DateTime.parse("2015-03-07 05:00:00 UTC")) + expect(subject.registrar).to be_a(Whois::Parser::Registrar) + expect(subject.registrar.id).to eq(nil) + expect(subject.registrar.name).to eq("MarkMonitor") + expect(subject.registrar.url).to eq("http://www.markmonitor.com") + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers.size).to eq(2) + expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[0].name).to eq("ns1.google.com") + expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[1].name).to eq("ns2.google.com") end end diff --git a/spec/whois/parsers/responses/whois.nic.ht/ht/status_available_spec.rb b/spec/whois/parsers/responses/whois.nic.ht/ht/status_available_spec.rb index d93ebb59..4ac0a442 100644 --- a/spec/whois/parsers/responses/whois.nic.ht/ht/status_available_spec.rb +++ b/spec/whois/parsers/responses/whois.nic.ht/ht/status_available_spec.rb @@ -11,65 +11,26 @@ # require 'spec_helper' -require 'whois/parsers/whois.nic.ht.rb' -describe Whois::Parsers::WhoisNicHt, "status_available.expected" do +describe "whois.nic.ht", :aggregate_failures do subject do file = fixture("responses", "whois.nic.ht/ht/status_available.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.nic.ht") + Whois::Parser.parser_for(part) end - describe "#domain" do - it do - expect(subject.domain).to eq("u34jedzcq.ht") - end - end - describe "#domain_id" do - it do - expect(subject.domain_id).to eq(nil) - end - end - describe "#status" do - it do - expect(subject.status).to eq(:available) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(true) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(false) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to eq(nil) - end - end - describe "#updated_on" do - it do - expect(subject.updated_on).to eq(nil) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to eq(nil) - end - end - describe "#registrar" do - it do - expect(subject.registrar).to eq(nil) - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers).to eq([]) - end + it "matches status_available.expected" do + expect(subject.domain).to eq("u34jedzcq.ht") + expect(subject.domain_id).to eq(nil) + expect(subject.status).to eq(:available) + expect(subject.available?).to eq(true) + expect(subject.registered?).to eq(false) + expect(subject.created_on).to eq(nil) + expect(subject.updated_on).to eq(nil) + expect(subject.expires_on).to eq(nil) + expect(subject.registrar).to eq(nil) + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers).to eq([]) end end diff --git a/spec/whois/parsers/responses/whois.nic.ht/ht/status_registered_spec.rb b/spec/whois/parsers/responses/whois.nic.ht/ht/status_registered_spec.rb index 2b43bb88..56cdd413 100644 --- a/spec/whois/parsers/responses/whois.nic.ht/ht/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.nic.ht/ht/status_registered_spec.rb @@ -11,79 +11,40 @@ # require 'spec_helper' -require 'whois/parsers/whois.nic.ht.rb' -describe Whois::Parsers::WhoisNicHt, "status_registered.expected" do +describe "whois.nic.ht", :aggregate_failures do subject do file = fixture("responses", "whois.nic.ht/ht/status_registered.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.nic.ht") + Whois::Parser.parser_for(part) end - describe "#domain" do - it do - expect(subject.domain).to eq("google.ht") - end - end - describe "#domain_id" do - it do - expect(subject.domain_id).to eq("112029-CoCCA") - end - end - describe "#status" do - it do - expect(subject.status).to eq(:registered) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(false) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(true) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to be_a(Time) - expect(subject.created_on).to eq(DateTime.parse("2004-06-17 23:00:00 UTC")) - end - end - describe "#updated_on" do - it do - expect(subject.updated_on).to be_a(Time) - expect(subject.updated_on).to eq(DateTime.parse("2013-05-16 09:18:24 UTC")) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to be_a(Time) - expect(subject.expires_on).to eq(DateTime.parse("2014-06-17 23:00:00 UTC")) - end - end - describe "#registrar" do - it do - expect(subject.registrar).to be_a(Whois::Parser::Registrar) - expect(subject.registrar.id).to eq(nil) - expect(subject.registrar.name).to eq("MarkMonitor") - expect(subject.registrar.url).to eq("http://www.markmonitor.com") - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers.size).to eq(4) - expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[0].name).to eq("ns1.google.com") - expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[1].name).to eq("ns2.google.com") - expect(subject.nameservers[2]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[2].name).to eq("ns3.google.com") - expect(subject.nameservers[3]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[3].name).to eq("ns4.google.com") - end + it "matches status_registered.expected" do + expect(subject.domain).to eq("google.ht") + expect(subject.domain_id).to eq("112029-CoCCA") + expect(subject.status).to eq(:registered) + expect(subject.available?).to eq(false) + expect(subject.registered?).to eq(true) + expect(subject.created_on).to be_a(Time) + expect(subject.created_on).to eq(DateTime.parse("2004-06-17 23:00:00 UTC")) + expect(subject.updated_on).to be_a(Time) + expect(subject.updated_on).to eq(DateTime.parse("2013-05-16 09:18:24 UTC")) + expect(subject.expires_on).to be_a(Time) + expect(subject.expires_on).to eq(DateTime.parse("2014-06-17 23:00:00 UTC")) + expect(subject.registrar).to be_a(Whois::Parser::Registrar) + expect(subject.registrar.id).to eq(nil) + expect(subject.registrar.name).to eq("MarkMonitor") + expect(subject.registrar.url).to eq("http://www.markmonitor.com") + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers.size).to eq(4) + expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[0].name).to eq("ns1.google.com") + expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[1].name).to eq("ns2.google.com") + expect(subject.nameservers[2]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[2].name).to eq("ns3.google.com") + expect(subject.nameservers[3]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[3].name).to eq("ns4.google.com") end end diff --git a/spec/whois/parsers/responses/whois.nic.hu/hu/status_available_spec.rb b/spec/whois/parsers/responses/whois.nic.hu/hu/status_available_spec.rb index 60255c15..6fc17938 100644 --- a/spec/whois/parsers/responses/whois.nic.hu/hu/status_available_spec.rb +++ b/spec/whois/parsers/responses/whois.nic.hu/hu/status_available_spec.rb @@ -11,84 +11,29 @@ # require 'spec_helper' -require 'whois/parsers/whois.nic.hu.rb' -describe Whois::Parsers::WhoisNicHu, "status_available.expected" do +describe "whois.nic.hu", :aggregate_failures do subject do file = fixture("responses", "whois.nic.hu/hu/status_available.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.nic.hu") + Whois::Parser.parser_for(part) end - describe "#disclaimer" do - it do - expect { subject.disclaimer }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#domain" do - it do - expect(subject.domain).to eq(nil) - end - end - describe "#domain_id" do - it do - expect { subject.domain_id }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#status" do - it do - expect(subject.status).to eq(:available) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(true) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(false) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to eq(nil) - end - end - describe "#updated_on" do - it do - expect { subject.updated_on }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#expires_on" do - it do - expect { subject.expires_on }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#registrar" do - it do - expect { subject.registrar }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#registrant_contacts" do - it do - expect { subject.registrant_contacts }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#admin_contacts" do - it do - expect { subject.admin_contacts }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#technical_contacts" do - it do - expect { subject.technical_contacts }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#nameservers" do - it do - expect { subject.nameservers }.to raise_error(Whois::AttributeNotSupported) - end + it "matches status_available.expected" do + expect { subject.disclaimer }.to raise_error(Whois::AttributeNotSupported) + expect(subject.domain).to eq(nil) + expect { subject.domain_id }.to raise_error(Whois::AttributeNotSupported) + expect(subject.status).to eq(:available) + expect(subject.available?).to eq(true) + expect(subject.registered?).to eq(false) + expect(subject.created_on).to eq(nil) + expect { subject.updated_on }.to raise_error(Whois::AttributeNotSupported) + expect { subject.expires_on }.to raise_error(Whois::AttributeNotSupported) + expect { subject.registrar }.to raise_error(Whois::AttributeNotSupported) + expect { subject.registrant_contacts }.to raise_error(Whois::AttributeNotSupported) + expect { subject.admin_contacts }.to raise_error(Whois::AttributeNotSupported) + expect { subject.technical_contacts }.to raise_error(Whois::AttributeNotSupported) + expect { subject.nameservers }.to raise_error(Whois::AttributeNotSupported) end end diff --git a/spec/whois/parsers/responses/whois.nic.hu/hu/status_registered_spec.rb b/spec/whois/parsers/responses/whois.nic.hu/hu/status_registered_spec.rb index 41c93898..7d983092 100644 --- a/spec/whois/parsers/responses/whois.nic.hu/hu/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.nic.hu/hu/status_registered_spec.rb @@ -11,85 +11,30 @@ # require 'spec_helper' -require 'whois/parsers/whois.nic.hu.rb' -describe Whois::Parsers::WhoisNicHu, "status_registered.expected" do +describe "whois.nic.hu", :aggregate_failures do subject do file = fixture("responses", "whois.nic.hu/hu/status_registered.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.nic.hu") + Whois::Parser.parser_for(part) end - describe "#disclaimer" do - it do - expect { subject.disclaimer }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#domain" do - it do - expect(subject.domain).to eq("google.hu") - end - end - describe "#domain_id" do - it do - expect { subject.domain_id }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#status" do - it do - expect(subject.status).to eq(:registered) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(false) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(true) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to be_a(Time) - expect(subject.created_on).to eq(DateTime.parse("2000-03-25 23:20:39")) - end - end - describe "#updated_on" do - it do - expect { subject.updated_on }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#expires_on" do - it do - expect { subject.expires_on }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#registrar" do - it do - expect { subject.registrar }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#registrant_contacts" do - it do - expect { subject.registrant_contacts }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#admin_contacts" do - it do - expect { subject.admin_contacts }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#technical_contacts" do - it do - expect { subject.technical_contacts }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#nameservers" do - it do - expect { subject.nameservers }.to raise_error(Whois::AttributeNotSupported) - end + it "matches status_registered.expected" do + expect { subject.disclaimer }.to raise_error(Whois::AttributeNotSupported) + expect(subject.domain).to eq("google.hu") + expect { subject.domain_id }.to raise_error(Whois::AttributeNotSupported) + expect(subject.status).to eq(:registered) + expect(subject.available?).to eq(false) + expect(subject.registered?).to eq(true) + expect(subject.created_on).to be_a(Time) + expect(subject.created_on).to eq(DateTime.parse("2000-03-25 23:20:39")) + expect { subject.updated_on }.to raise_error(Whois::AttributeNotSupported) + expect { subject.expires_on }.to raise_error(Whois::AttributeNotSupported) + expect { subject.registrar }.to raise_error(Whois::AttributeNotSupported) + expect { subject.registrant_contacts }.to raise_error(Whois::AttributeNotSupported) + expect { subject.admin_contacts }.to raise_error(Whois::AttributeNotSupported) + expect { subject.technical_contacts }.to raise_error(Whois::AttributeNotSupported) + expect { subject.nameservers }.to raise_error(Whois::AttributeNotSupported) end end diff --git a/spec/whois/parsers/responses/whois.nic.im/im/status_available_spec.rb b/spec/whois/parsers/responses/whois.nic.im/im/status_available_spec.rb index c73dab14..9b427d66 100644 --- a/spec/whois/parsers/responses/whois.nic.im/im/status_available_spec.rb +++ b/spec/whois/parsers/responses/whois.nic.im/im/status_available_spec.rb @@ -11,50 +11,23 @@ # require 'spec_helper' -require 'whois/parsers/whois.nic.im.rb' -describe Whois::Parsers::WhoisNicIm, "status_available.expected" do +describe "whois.nic.im", :aggregate_failures do subject do file = fixture("responses", "whois.nic.im/im/status_available.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.nic.im") + Whois::Parser.parser_for(part) end - describe "#status" do - it do - expect(subject.status).to eq(:available) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(true) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(false) - end - end - describe "#created_on" do - it do - expect { subject.created_on }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#updated_on" do - it do - expect { subject.updated_on }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to eq(nil) - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers).to eq([]) - end + it "matches status_available.expected" do + expect(subject.status).to eq(:available) + expect(subject.available?).to eq(true) + expect(subject.registered?).to eq(false) + expect { subject.created_on }.to raise_error(Whois::AttributeNotSupported) + expect { subject.updated_on }.to raise_error(Whois::AttributeNotSupported) + expect(subject.expires_on).to eq(nil) + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers).to eq([]) end end diff --git a/spec/whois/parsers/responses/whois.nic.im/im/status_registered_spec.rb b/spec/whois/parsers/responses/whois.nic.im/im/status_registered_spec.rb index 53fe663c..c1c3c7de 100644 --- a/spec/whois/parsers/responses/whois.nic.im/im/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.nic.im/im/status_registered_spec.rb @@ -11,59 +11,32 @@ # require 'spec_helper' -require 'whois/parsers/whois.nic.im.rb' -describe Whois::Parsers::WhoisNicIm, "status_registered.expected" do +describe "whois.nic.im", :aggregate_failures do subject do file = fixture("responses", "whois.nic.im/im/status_registered.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.nic.im") + Whois::Parser.parser_for(part) end - describe "#status" do - it do - expect(subject.status).to eq(:registered) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(false) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(true) - end - end - describe "#created_on" do - it do - expect { subject.created_on }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#updated_on" do - it do - expect { subject.updated_on }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to be_a(Time) - expect(subject.expires_on).to eq(DateTime.parse("2014-08-03 23:59:52")) - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers.size).to eq(4) - expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[0].name).to eq("ns1.google.com") - expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[1].name).to eq("ns2.google.com") - expect(subject.nameservers[2]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[2].name).to eq("ns3.google.com") - expect(subject.nameservers[3]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[3].name).to eq("ns4.google.com") - end + it "matches status_registered.expected" do + expect(subject.status).to eq(:registered) + expect(subject.available?).to eq(false) + expect(subject.registered?).to eq(true) + expect { subject.created_on }.to raise_error(Whois::AttributeNotSupported) + expect { subject.updated_on }.to raise_error(Whois::AttributeNotSupported) + expect(subject.expires_on).to be_a(Time) + expect(subject.expires_on).to eq(DateTime.parse("2014-08-03 23:59:52")) + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers.size).to eq(4) + expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[0].name).to eq("ns1.google.com") + expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[1].name).to eq("ns2.google.com") + expect(subject.nameservers[2]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[2].name).to eq("ns3.google.com") + expect(subject.nameservers[3]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[3].name).to eq("ns4.google.com") end end diff --git a/spec/whois/parsers/responses/whois.nic.io/io/status_available_spec.rb b/spec/whois/parsers/responses/whois.nic.io/io/status_available_spec.rb index 31dd6350..36391f76 100644 --- a/spec/whois/parsers/responses/whois.nic.io/io/status_available_spec.rb +++ b/spec/whois/parsers/responses/whois.nic.io/io/status_available_spec.rb @@ -11,91 +11,32 @@ # require 'spec_helper' -require 'whois/parsers/whois.nic.io.rb' -describe Whois::Parsers::WhoisNicIo, "status_available.expected" do +describe "whois.nic.io", :aggregate_failures do subject do file = fixture("responses", "whois.nic.io/io/status_available.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.nic.io") + Whois::Parser.parser_for(part) end - describe "#disclaimer" do - it do - expect { subject.disclaimer }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#domain" do - it do - expect(subject.domain).to eq(nil) - end - end - describe "#domain_id" do - it do - expect(subject.domain_id).to eq(nil) - end - end - describe "#status" do - it do - expect(subject.status).to eq(:available) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(true) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(false) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to eq(nil) - end - end - describe "#updated_on" do - it do - expect(subject.updated_on).to eq(nil) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to eq(nil) - end - end - describe "#registrar" do - it do - expect(subject.registrar).to eq(nil) - end - end - describe "#registrant_contacts" do - it do - expect(subject.registrant_contacts).to be_a(Array) - expect(subject.registrant_contacts).to eq([]) - end - end - describe "#admin_contacts" do - it do - expect { subject.admin_contacts }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#technical_contacts" do - it do - expect { subject.technical_contacts }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers).to eq([]) - end - end - describe "#reserved?" do - it do - expect(subject.reserved?).to eq(false) - end + it "matches status_available.expected" do + expect { subject.disclaimer }.to raise_error(Whois::AttributeNotSupported) + expect(subject.domain).to eq(nil) + expect(subject.domain_id).to eq(nil) + expect(subject.status).to eq(:available) + expect(subject.available?).to eq(true) + expect(subject.registered?).to eq(false) + expect(subject.created_on).to eq(nil) + expect(subject.updated_on).to eq(nil) + expect(subject.expires_on).to eq(nil) + expect(subject.registrar).to eq(nil) + expect(subject.registrant_contacts).to be_a(Array) + expect(subject.registrant_contacts).to eq([]) + expect { subject.admin_contacts }.to raise_error(Whois::AttributeNotSupported) + expect { subject.technical_contacts }.to raise_error(Whois::AttributeNotSupported) + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers).to eq([]) + expect(subject.reserved?).to eq(false) end end diff --git a/spec/whois/parsers/responses/whois.nic.io/io/status_registered_spec.rb b/spec/whois/parsers/responses/whois.nic.io/io/status_registered_spec.rb index 48708998..72675d81 100644 --- a/spec/whois/parsers/responses/whois.nic.io/io/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.nic.io/io/status_registered_spec.rb @@ -11,121 +11,62 @@ # require 'spec_helper' -require 'whois/parsers/whois.nic.io.rb' -describe Whois::Parsers::WhoisNicIo, "status_registered.expected" do +describe "whois.nic.io", :aggregate_failures do subject do file = fixture("responses", "whois.nic.io/io/status_registered.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.nic.io") + Whois::Parser.parser_for(part) end - describe "#disclaimer" do - it do - expect { subject.disclaimer }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#domain" do - it do - expect(subject.domain).to eq("redis.io") - end - end - describe "#domain_id" do - it do - expect(subject.domain_id).to eq("D503300000040423931-LRMS") - end - end - describe "#status" do - it do - expect(subject.status).to eq(:registered) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(false) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(true) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to be_a(Time) - expect(subject.created_on).to eq(DateTime.parse("2010-05-28 22:09:44 UTC")) - end - end - describe "#updated_on" do - it do - expect(subject.updated_on).to be_a(Time) - expect(subject.updated_on).to eq(DateTime.parse("2019-05-06 17:24:58 UTC")) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to be_a(Time) - expect(subject.expires_on).to eq(DateTime.parse("2020-05-28 22:09:44 UTC")) - end - end - describe "#registrar" do - it do - expect(subject.registrar).to be_a(Whois::Parser::Registrar) - expect(subject.registrar.id).to eq("625") - expect(subject.registrar.name).to eq("Name.com LLC") - expect(subject.registrar.url).to eq("www.name.com") - end - end - describe "#registrant_contacts" do - it do - expect(subject.registrant_contacts).to be_a(Array) - expect(subject.registrant_contacts.size).to eq(1) - expect(subject.registrant_contacts[0]).to be_a(Whois::Parser::Contact) - expect(subject.registrant_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_REGISTRANT) - expect(subject.registrant_contacts[0].id).to eq(nil) - expect(subject.registrant_contacts[0].name).to eq(nil) - expect(subject.registrant_contacts[0].organization).to eq("Domain Protection Services, Inc.") - expect(subject.registrant_contacts[0].address).to eq(nil) - expect(subject.registrant_contacts[0].city).to eq(nil) - expect(subject.registrant_contacts[0].zip).to eq(nil) - expect(subject.registrant_contacts[0].state).to eq("CO") - expect(subject.registrant_contacts[0].country).to eq(nil) - expect(subject.registrant_contacts[0].country_code).to eq("US") - expect(subject.registrant_contacts[0].phone).to eq(nil) - expect(subject.registrant_contacts[0].fax).to eq(nil) - expect(subject.registrant_contacts[0].email).to eq(nil) - expect(subject.registrant_contacts[0].created_on).to eq(nil) - expect(subject.registrant_contacts[0].updated_on).to eq(nil) - end - end - describe "#admin_contacts" do - it do - expect { subject.admin_contacts }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#technical_contacts" do - it do - expect { subject.technical_contacts }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers.size).to eq(4) - expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[0].name).to eq("ns2kqz.name.com") - expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[1].name).to eq("ns1djs.name.com") - expect(subject.nameservers[2]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[2].name).to eq("ns4bht.name.com") - expect(subject.nameservers[3]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[3].name).to eq("ns3ckl.name.com") - end - end - describe "#reserved?" do - it do - expect(subject.reserved?).to eq(false) - end + it "matches status_registered.expected" do + expect { subject.disclaimer }.to raise_error(Whois::AttributeNotSupported) + expect(subject.domain).to eq("redis.io") + expect(subject.domain_id).to eq("D503300000040423931-LRMS") + expect(subject.status).to eq(:registered) + expect(subject.available?).to eq(false) + expect(subject.registered?).to eq(true) + expect(subject.created_on).to be_a(Time) + expect(subject.created_on).to eq(DateTime.parse("2010-05-28 22:09:44 UTC")) + expect(subject.updated_on).to be_a(Time) + expect(subject.updated_on).to eq(DateTime.parse("2019-05-06 17:24:58 UTC")) + expect(subject.expires_on).to be_a(Time) + expect(subject.expires_on).to eq(DateTime.parse("2020-05-28 22:09:44 UTC")) + expect(subject.registrar).to be_a(Whois::Parser::Registrar) + expect(subject.registrar.id).to eq("625") + expect(subject.registrar.name).to eq("Name.com LLC") + expect(subject.registrar.url).to eq("www.name.com") + expect(subject.registrant_contacts).to be_a(Array) + expect(subject.registrant_contacts.size).to eq(1) + expect(subject.registrant_contacts[0]).to be_a(Whois::Parser::Contact) + expect(subject.registrant_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_REGISTRANT) + expect(subject.registrant_contacts[0].id).to eq(nil) + expect(subject.registrant_contacts[0].name).to eq(nil) + expect(subject.registrant_contacts[0].organization).to eq("Domain Protection Services, Inc.") + expect(subject.registrant_contacts[0].address).to eq(nil) + expect(subject.registrant_contacts[0].city).to eq(nil) + expect(subject.registrant_contacts[0].zip).to eq(nil) + expect(subject.registrant_contacts[0].state).to eq("CO") + expect(subject.registrant_contacts[0].country).to eq(nil) + expect(subject.registrant_contacts[0].country_code).to eq("US") + expect(subject.registrant_contacts[0].phone).to eq(nil) + expect(subject.registrant_contacts[0].fax).to eq(nil) + expect(subject.registrant_contacts[0].email).to eq(nil) + expect(subject.registrant_contacts[0].created_on).to eq(nil) + expect(subject.registrant_contacts[0].updated_on).to eq(nil) + expect { subject.admin_contacts }.to raise_error(Whois::AttributeNotSupported) + expect { subject.technical_contacts }.to raise_error(Whois::AttributeNotSupported) + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers.size).to eq(4) + expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[0].name).to eq("ns2kqz.name.com") + expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[1].name).to eq("ns1djs.name.com") + expect(subject.nameservers[2]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[2].name).to eq("ns4bht.name.com") + expect(subject.nameservers[3]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[3].name).to eq("ns3ckl.name.com") + expect(subject.reserved?).to eq(false) end end diff --git a/spec/whois/parsers/responses/whois.nic.io/io/status_reserved_spec.rb b/spec/whois/parsers/responses/whois.nic.io/io/status_reserved_spec.rb index 996fd99e..83b02919 100644 --- a/spec/whois/parsers/responses/whois.nic.io/io/status_reserved_spec.rb +++ b/spec/whois/parsers/responses/whois.nic.io/io/status_reserved_spec.rb @@ -11,91 +11,32 @@ # require 'spec_helper' -require 'whois/parsers/whois.nic.io.rb' -describe Whois::Parsers::WhoisNicIo, "status_reserved.expected" do +describe "whois.nic.io", :aggregate_failures do subject do file = fixture("responses", "whois.nic.io/io/status_reserved.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.nic.io") + Whois::Parser.parser_for(part) end - describe "#disclaimer" do - it do - expect { subject.disclaimer }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#domain" do - it do - expect(subject.domain).to eq(nil) - end - end - describe "#domain_id" do - it do - expect(subject.domain_id).to eq(nil) - end - end - describe "#status" do - it do - expect(subject.status).to eq(:reserved) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(false) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(true) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to eq(nil) - end - end - describe "#updated_on" do - it do - expect(subject.updated_on).to eq(nil) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to eq(nil) - end - end - describe "#registrar" do - it do - expect(subject.registrar).to eq(nil) - end - end - describe "#registrant_contacts" do - it do - expect(subject.registrant_contacts).to be_a(Array) - expect(subject.registrant_contacts).to eq([]) - end - end - describe "#admin_contacts" do - it do - expect { subject.admin_contacts }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#technical_contacts" do - it do - expect { subject.technical_contacts }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers).to eq([]) - end - end - describe "#reserved?" do - it do - expect(subject.reserved?).to eq(true) - end + it "matches status_reserved.expected" do + expect { subject.disclaimer }.to raise_error(Whois::AttributeNotSupported) + expect(subject.domain).to eq(nil) + expect(subject.domain_id).to eq(nil) + expect(subject.status).to eq(:reserved) + expect(subject.available?).to eq(false) + expect(subject.registered?).to eq(true) + expect(subject.created_on).to eq(nil) + expect(subject.updated_on).to eq(nil) + expect(subject.expires_on).to eq(nil) + expect(subject.registrar).to eq(nil) + expect(subject.registrant_contacts).to be_a(Array) + expect(subject.registrant_contacts).to eq([]) + expect { subject.admin_contacts }.to raise_error(Whois::AttributeNotSupported) + expect { subject.technical_contacts }.to raise_error(Whois::AttributeNotSupported) + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers).to eq([]) + expect(subject.reserved?).to eq(true) end end diff --git a/spec/whois/parsers/responses/whois.nic.ir/ir/status_available_spec.rb b/spec/whois/parsers/responses/whois.nic.ir/ir/status_available_spec.rb index c7253c2f..c697b546 100644 --- a/spec/whois/parsers/responses/whois.nic.ir/ir/status_available_spec.rb +++ b/spec/whois/parsers/responses/whois.nic.ir/ir/status_available_spec.rb @@ -11,50 +11,23 @@ # require 'spec_helper' -require 'whois/parsers/whois.nic.ir.rb' -describe Whois::Parsers::WhoisNicIr, "status_available.expected" do +describe "whois.nic.ir", :aggregate_failures do subject do file = fixture("responses", "whois.nic.ir/ir/status_available.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.nic.ir") + Whois::Parser.parser_for(part) end - describe "#status" do - it do - expect(subject.status).to eq(:available) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(true) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(false) - end - end - describe "#created_on" do - it do - expect { subject.created_on }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#updated_on" do - it do - expect(subject.updated_on).to eq(nil) - end - end - describe "#expires_on" do - it do - expect { subject.expires_on }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers).to eq([]) - end + it "matches status_available.expected" do + expect(subject.status).to eq(:available) + expect(subject.available?).to eq(true) + expect(subject.registered?).to eq(false) + expect { subject.created_on }.to raise_error(Whois::AttributeNotSupported) + expect(subject.updated_on).to eq(nil) + expect { subject.expires_on }.to raise_error(Whois::AttributeNotSupported) + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers).to eq([]) end end diff --git a/spec/whois/parsers/responses/whois.nic.ir/ir/status_registered_spec.rb b/spec/whois/parsers/responses/whois.nic.ir/ir/status_registered_spec.rb index 19e38b84..e764cb63 100644 --- a/spec/whois/parsers/responses/whois.nic.ir/ir/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.nic.ir/ir/status_registered_spec.rb @@ -11,59 +11,32 @@ # require 'spec_helper' -require 'whois/parsers/whois.nic.ir.rb' -describe Whois::Parsers::WhoisNicIr, "status_registered.expected" do +describe "whois.nic.ir", :aggregate_failures do subject do file = fixture("responses", "whois.nic.ir/ir/status_registered.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.nic.ir") + Whois::Parser.parser_for(part) end - describe "#status" do - it do - expect(subject.status).to eq(:registered) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(false) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(true) - end - end - describe "#created_on" do - it do - expect { subject.created_on }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#updated_on" do - it do - expect(subject.updated_on).to be_a(Time) - expect(subject.updated_on).to eq(DateTime.parse("2014-02-17")) - end - end - describe "#expires_on" do - it do - expect { subject.expires_on }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers.size).to eq(4) - expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[0].name).to eq("ns3.google.com") - expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[1].name).to eq("ns4.google.com") - expect(subject.nameservers[2]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[2].name).to eq("ns1.google.com") - expect(subject.nameservers[3]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[3].name).to eq("ns2.google.com") - end + it "matches status_registered.expected" do + expect(subject.status).to eq(:registered) + expect(subject.available?).to eq(false) + expect(subject.registered?).to eq(true) + expect { subject.created_on }.to raise_error(Whois::AttributeNotSupported) + expect(subject.updated_on).to be_a(Time) + expect(subject.updated_on).to eq(DateTime.parse("2014-02-17")) + expect { subject.expires_on }.to raise_error(Whois::AttributeNotSupported) + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers.size).to eq(4) + expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[0].name).to eq("ns3.google.com") + expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[1].name).to eq("ns4.google.com") + expect(subject.nameservers[2]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[2].name).to eq("ns1.google.com") + expect(subject.nameservers[3]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[3].name).to eq("ns2.google.com") end end diff --git a/spec/whois/parsers/responses/whois.nic.it/it/property_contact_province_spec.rb b/spec/whois/parsers/responses/whois.nic.it/it/property_contact_province_spec.rb index 19cca0f7..20936797 100644 --- a/spec/whois/parsers/responses/whois.nic.it/it/property_contact_province_spec.rb +++ b/spec/whois/parsers/responses/whois.nic.it/it/property_contact_province_spec.rb @@ -11,32 +11,29 @@ # require 'spec_helper' -require 'whois/parsers/whois.nic.it.rb' -describe Whois::Parsers::WhoisNicIt, "property_contact_province.expected" do +describe "whois.nic.it", :aggregate_failures do subject do file = fixture("responses", "whois.nic.it/it/property_contact_province.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.nic.it") + Whois::Parser.parser_for(part) end - describe "#registrant_contacts" do - it do - expect(subject.registrant_contacts).to be_a(Array) - expect(subject.registrant_contacts.size).to eq(1) - expect(subject.registrant_contacts[0]).to be_a(Whois::Parser::Contact) - expect(subject.registrant_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_REGISTRANT) - expect(subject.registrant_contacts[0].id).to eq("HTML1-ITNIC") - expect(subject.registrant_contacts[0].name).to eq("HTML.it srl") - expect(subject.registrant_contacts[0].organization).to eq("HTML.it srl") - expect(subject.registrant_contacts[0].address).to eq("Viale Alessandrino, 595") - expect(subject.registrant_contacts[0].city).to eq("Roma") - expect(subject.registrant_contacts[0].zip).to eq("00172") - expect(subject.registrant_contacts[0].state).to eq("RM") - expect(subject.registrant_contacts[0].country_code).to eq("IT") - expect(subject.registrant_contacts[0].created_on).to eq(DateTime.parse("2007-03-01 10:28:08")) - expect(subject.registrant_contacts[0].updated_on).to eq(DateTime.parse("2007-03-01 10:28:08")) - end + it "matches property_contact_province.expected" do + expect(subject.registrant_contacts).to be_a(Array) + expect(subject.registrant_contacts.size).to eq(1) + expect(subject.registrant_contacts[0]).to be_a(Whois::Parser::Contact) + expect(subject.registrant_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_REGISTRANT) + expect(subject.registrant_contacts[0].id).to eq("HTML1-ITNIC") + expect(subject.registrant_contacts[0].name).to eq("HTML.it srl") + expect(subject.registrant_contacts[0].organization).to eq("HTML.it srl") + expect(subject.registrant_contacts[0].address).to eq("Viale Alessandrino, 595") + expect(subject.registrant_contacts[0].city).to eq("Roma") + expect(subject.registrant_contacts[0].zip).to eq("00172") + expect(subject.registrant_contacts[0].state).to eq("RM") + expect(subject.registrant_contacts[0].country_code).to eq("IT") + expect(subject.registrant_contacts[0].created_on).to eq(DateTime.parse("2007-03-01 10:28:08")) + expect(subject.registrant_contacts[0].updated_on).to eq(DateTime.parse("2007-03-01 10:28:08")) end end diff --git a/spec/whois/parsers/responses/whois.nic.it/it/property_contact_with_company_in_address_spec.rb b/spec/whois/parsers/responses/whois.nic.it/it/property_contact_with_company_in_address_spec.rb index 8d66e6c0..e8d1abb7 100644 --- a/spec/whois/parsers/responses/whois.nic.it/it/property_contact_with_company_in_address_spec.rb +++ b/spec/whois/parsers/responses/whois.nic.it/it/property_contact_with_company_in_address_spec.rb @@ -11,32 +11,29 @@ # require 'spec_helper' -require 'whois/parsers/whois.nic.it.rb' -describe Whois::Parsers::WhoisNicIt, "property_contact_with_company_in_address.expected" do +describe "whois.nic.it", :aggregate_failures do subject do file = fixture("responses", "whois.nic.it/it/property_contact_with_company_in_address.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.nic.it") + Whois::Parser.parser_for(part) end - describe "#technical_contacts" do - it do - expect(subject.technical_contacts).to be_a(Array) - expect(subject.technical_contacts.size).to eq(1) - expect(subject.technical_contacts[0]).to be_a(Whois::Parser::Contact) - expect(subject.technical_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_TECHNICAL) - expect(subject.technical_contacts[0].id).to eq("AARS1-ITNIC") - expect(subject.technical_contacts[0].name).to eq("Andrea Antonio Renato Stratta") - expect(subject.technical_contacts[0].organization).to eq("UCI Italia Srl") - expect(subject.technical_contacts[0].address).to eq("Via E. Fermi, 161") - expect(subject.technical_contacts[0].city).to eq("Roma") - expect(subject.technical_contacts[0].zip).to eq("00146") - expect(subject.technical_contacts[0].state).to eq("RM") - expect(subject.technical_contacts[0].country_code).to eq("IT") - expect(subject.technical_contacts[0].created_on).to eq(DateTime.parse("2006-08-16 00:00:00")) - expect(subject.technical_contacts[0].updated_on).to eq(DateTime.parse("2007-03-01 07:48:42")) - end + it "matches property_contact_with_company_in_address.expected" do + expect(subject.technical_contacts).to be_a(Array) + expect(subject.technical_contacts.size).to eq(1) + expect(subject.technical_contacts[0]).to be_a(Whois::Parser::Contact) + expect(subject.technical_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_TECHNICAL) + expect(subject.technical_contacts[0].id).to eq("AARS1-ITNIC") + expect(subject.technical_contacts[0].name).to eq("Andrea Antonio Renato Stratta") + expect(subject.technical_contacts[0].organization).to eq("UCI Italia Srl") + expect(subject.technical_contacts[0].address).to eq("Via E. Fermi, 161") + expect(subject.technical_contacts[0].city).to eq("Roma") + expect(subject.technical_contacts[0].zip).to eq("00146") + expect(subject.technical_contacts[0].state).to eq("RM") + expect(subject.technical_contacts[0].country_code).to eq("IT") + expect(subject.technical_contacts[0].created_on).to eq(DateTime.parse("2006-08-16 00:00:00")) + expect(subject.technical_contacts[0].updated_on).to eq(DateTime.parse("2007-03-01 07:48:42")) end end diff --git a/spec/whois/parsers/responses/whois.nic.it/it/property_contact_with_organization_spec.rb b/spec/whois/parsers/responses/whois.nic.it/it/property_contact_with_organization_spec.rb index 25f8dd79..715dbeca 100644 --- a/spec/whois/parsers/responses/whois.nic.it/it/property_contact_with_organization_spec.rb +++ b/spec/whois/parsers/responses/whois.nic.it/it/property_contact_with_organization_spec.rb @@ -11,32 +11,29 @@ # require 'spec_helper' -require 'whois/parsers/whois.nic.it.rb' -describe Whois::Parsers::WhoisNicIt, "property_contact_with_organization.expected" do +describe "whois.nic.it", :aggregate_failures do subject do file = fixture("responses", "whois.nic.it/it/property_contact_with_organization.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.nic.it") + Whois::Parser.parser_for(part) end - describe "#admin_contacts" do - it do - expect(subject.admin_contacts).to be_a(Array) - expect(subject.admin_contacts.size).to eq(1) - expect(subject.admin_contacts[0]).to be_a(Whois::Parser::Contact) - expect(subject.admin_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_ADMINISTRATIVE) - expect(subject.admin_contacts[0].id).to eq("TT4277-ITNIC") - expect(subject.admin_contacts[0].name).to eq("Tsao Tu") - expect(subject.admin_contacts[0].organization).to eq("Tu Tsao") - expect(subject.admin_contacts[0].address).to eq("30 Herbert Street") - expect(subject.admin_contacts[0].city).to eq("Dublin") - expect(subject.admin_contacts[0].zip).to eq("2") - expect(subject.admin_contacts[0].state).to eq("IE") - expect(subject.admin_contacts[0].country_code).to eq("IE") - expect(subject.admin_contacts[0].created_on).to eq(DateTime.parse("2008-11-27 16:47:22")) - expect(subject.admin_contacts[0].updated_on).to eq(DateTime.parse("2008-11-27 16:47:22")) - end + it "matches property_contact_with_organization.expected" do + expect(subject.admin_contacts).to be_a(Array) + expect(subject.admin_contacts.size).to eq(1) + expect(subject.admin_contacts[0]).to be_a(Whois::Parser::Contact) + expect(subject.admin_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_ADMINISTRATIVE) + expect(subject.admin_contacts[0].id).to eq("TT4277-ITNIC") + expect(subject.admin_contacts[0].name).to eq("Tsao Tu") + expect(subject.admin_contacts[0].organization).to eq("Tu Tsao") + expect(subject.admin_contacts[0].address).to eq("30 Herbert Street") + expect(subject.admin_contacts[0].city).to eq("Dublin") + expect(subject.admin_contacts[0].zip).to eq("2") + expect(subject.admin_contacts[0].state).to eq("IE") + expect(subject.admin_contacts[0].country_code).to eq("IE") + expect(subject.admin_contacts[0].created_on).to eq(DateTime.parse("2008-11-27 16:47:22")) + expect(subject.admin_contacts[0].updated_on).to eq(DateTime.parse("2008-11-27 16:47:22")) end end diff --git a/spec/whois/parsers/responses/whois.nic.it/it/property_status_available_spec.rb b/spec/whois/parsers/responses/whois.nic.it/it/property_status_available_spec.rb index b88e4ce2..976239e1 100644 --- a/spec/whois/parsers/responses/whois.nic.it/it/property_status_available_spec.rb +++ b/spec/whois/parsers/responses/whois.nic.it/it/property_status_available_spec.rb @@ -11,29 +11,18 @@ # require 'spec_helper' -require 'whois/parsers/whois.nic.it.rb' -describe Whois::Parsers::WhoisNicIt, "property_status_available.expected" do +describe "whois.nic.it", :aggregate_failures do subject do file = fixture("responses", "whois.nic.it/it/property_status_available.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.nic.it") + Whois::Parser.parser_for(part) end - describe "#status" do - it do - expect(subject.status).to eq(:available) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(true) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(false) - end + it "matches property_status_available.expected" do + expect(subject.status).to eq(:available) + expect(subject.available?).to eq(true) + expect(subject.registered?).to eq(false) end end diff --git a/spec/whois/parsers/responses/whois.nic.it/it/property_status_client_spec.rb b/spec/whois/parsers/responses/whois.nic.it/it/property_status_client_spec.rb index a76cdb5e..3e455b9d 100644 --- a/spec/whois/parsers/responses/whois.nic.it/it/property_status_client_spec.rb +++ b/spec/whois/parsers/responses/whois.nic.it/it/property_status_client_spec.rb @@ -11,29 +11,18 @@ # require 'spec_helper' -require 'whois/parsers/whois.nic.it.rb' -describe Whois::Parsers::WhoisNicIt, "property_status_client.expected" do +describe "whois.nic.it", :aggregate_failures do subject do file = fixture("responses", "whois.nic.it/it/property_status_client.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.nic.it") + Whois::Parser.parser_for(part) end - describe "#status" do - it do - expect(subject.status).to eq(:registered) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(false) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(true) - end + it "matches property_status_client.expected" do + expect(subject.status).to eq(:registered) + expect(subject.available?).to eq(false) + expect(subject.registered?).to eq(true) end end diff --git a/spec/whois/parsers/responses/whois.nic.it/it/property_status_graceperiod_spec.rb b/spec/whois/parsers/responses/whois.nic.it/it/property_status_graceperiod_spec.rb index 8ae9e59a..e090b5bd 100644 --- a/spec/whois/parsers/responses/whois.nic.it/it/property_status_graceperiod_spec.rb +++ b/spec/whois/parsers/responses/whois.nic.it/it/property_status_graceperiod_spec.rb @@ -11,29 +11,18 @@ # require 'spec_helper' -require 'whois/parsers/whois.nic.it.rb' -describe Whois::Parsers::WhoisNicIt, "property_status_graceperiod.expected" do +describe "whois.nic.it", :aggregate_failures do subject do file = fixture("responses", "whois.nic.it/it/property_status_graceperiod.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.nic.it") + Whois::Parser.parser_for(part) end - describe "#status" do - it do - expect(subject.status).to eq(:registered) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(false) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(true) - end + it "matches property_status_graceperiod.expected" do + expect(subject.status).to eq(:registered) + expect(subject.available?).to eq(false) + expect(subject.registered?).to eq(true) end end diff --git a/spec/whois/parsers/responses/whois.nic.it/it/property_status_inactive_noregistrar_spec.rb b/spec/whois/parsers/responses/whois.nic.it/it/property_status_inactive_noregistrar_spec.rb index 2cded470..13dfc6f5 100644 --- a/spec/whois/parsers/responses/whois.nic.it/it/property_status_inactive_noregistrar_spec.rb +++ b/spec/whois/parsers/responses/whois.nic.it/it/property_status_inactive_noregistrar_spec.rb @@ -11,29 +11,18 @@ # require 'spec_helper' -require 'whois/parsers/whois.nic.it.rb' -describe Whois::Parsers::WhoisNicIt, "property_status_inactive_noregistrar.expected" do +describe "whois.nic.it", :aggregate_failures do subject do file = fixture("responses", "whois.nic.it/it/property_status_inactive_noregistrar.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.nic.it") + Whois::Parser.parser_for(part) end - describe "#status" do - it do - expect(subject.status).to eq(:inactive) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(false) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(true) - end + it "matches property_status_inactive_noregistrar.expected" do + expect(subject.status).to eq(:inactive) + expect(subject.available?).to eq(false) + expect(subject.registered?).to eq(true) end end diff --git a/spec/whois/parsers/responses/whois.nic.it/it/property_status_no_provider_spec.rb b/spec/whois/parsers/responses/whois.nic.it/it/property_status_no_provider_spec.rb index 2d0f642a..42c47d98 100644 --- a/spec/whois/parsers/responses/whois.nic.it/it/property_status_no_provider_spec.rb +++ b/spec/whois/parsers/responses/whois.nic.it/it/property_status_no_provider_spec.rb @@ -11,29 +11,18 @@ # require 'spec_helper' -require 'whois/parsers/whois.nic.it.rb' -describe Whois::Parsers::WhoisNicIt, "property_status_no_provider.expected" do +describe "whois.nic.it", :aggregate_failures do subject do file = fixture("responses", "whois.nic.it/it/property_status_no_provider.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.nic.it") + Whois::Parser.parser_for(part) end - describe "#status" do - it do - expect(subject.status).to eq(:registered) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(false) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(true) - end + it "matches property_status_no_provider.expected" do + expect(subject.status).to eq(:registered) + expect(subject.available?).to eq(false) + expect(subject.registered?).to eq(true) end end diff --git a/spec/whois/parsers/responses/whois.nic.it/it/property_status_ok_autorenew_spec.rb b/spec/whois/parsers/responses/whois.nic.it/it/property_status_ok_autorenew_spec.rb index 87066193..3dde0229 100644 --- a/spec/whois/parsers/responses/whois.nic.it/it/property_status_ok_autorenew_spec.rb +++ b/spec/whois/parsers/responses/whois.nic.it/it/property_status_ok_autorenew_spec.rb @@ -11,29 +11,18 @@ # require 'spec_helper' -require 'whois/parsers/whois.nic.it.rb' -describe Whois::Parsers::WhoisNicIt, "property_status_ok_autorenew.expected" do +describe "whois.nic.it", :aggregate_failures do subject do file = fixture("responses", "whois.nic.it/it/property_status_ok_autorenew.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.nic.it") + Whois::Parser.parser_for(part) end - describe "#status" do - it do - expect(subject.status).to eq(:registered) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(false) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(true) - end + it "matches property_status_ok_autorenew.expected" do + expect(subject.status).to eq(:registered) + expect(subject.available?).to eq(false) + expect(subject.registered?).to eq(true) end end diff --git a/spec/whois/parsers/responses/whois.nic.it/it/property_status_ok_spec.rb b/spec/whois/parsers/responses/whois.nic.it/it/property_status_ok_spec.rb index 414c88eb..3c64b448 100644 --- a/spec/whois/parsers/responses/whois.nic.it/it/property_status_ok_spec.rb +++ b/spec/whois/parsers/responses/whois.nic.it/it/property_status_ok_spec.rb @@ -11,29 +11,18 @@ # require 'spec_helper' -require 'whois/parsers/whois.nic.it.rb' -describe Whois::Parsers::WhoisNicIt, "property_status_ok.expected" do +describe "whois.nic.it", :aggregate_failures do subject do file = fixture("responses", "whois.nic.it/it/property_status_ok.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.nic.it") + Whois::Parser.parser_for(part) end - describe "#status" do - it do - expect(subject.status).to eq(:registered) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(false) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(true) - end + it "matches property_status_ok.expected" do + expect(subject.status).to eq(:registered) + expect(subject.available?).to eq(false) + expect(subject.registered?).to eq(true) end end diff --git a/spec/whois/parsers/responses/whois.nic.it/it/property_status_pending-delete_spec.rb b/spec/whois/parsers/responses/whois.nic.it/it/property_status_pending-delete_spec.rb index 1efed93d..905c8716 100644 --- a/spec/whois/parsers/responses/whois.nic.it/it/property_status_pending-delete_spec.rb +++ b/spec/whois/parsers/responses/whois.nic.it/it/property_status_pending-delete_spec.rb @@ -11,29 +11,18 @@ # require 'spec_helper' -require 'whois/parsers/whois.nic.it.rb' -describe Whois::Parsers::WhoisNicIt, "property_status_pending-delete.expected" do +describe "whois.nic.it", :aggregate_failures do subject do file = fixture("responses", "whois.nic.it/it/property_status_pending-delete.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.nic.it") + Whois::Parser.parser_for(part) end - describe "#status" do - it do - expect(subject.status).to eq(:redemption) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(false) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(true) - end + it "matches property_status_pending-delete.expected" do + expect(subject.status).to eq(:redemption) + expect(subject.available?).to eq(false) + expect(subject.registered?).to eq(true) end end diff --git a/spec/whois/parsers/responses/whois.nic.it/it/property_status_pendingdelete_pendingdelete_spec.rb b/spec/whois/parsers/responses/whois.nic.it/it/property_status_pendingdelete_pendingdelete_spec.rb index 0a6d1388..ac8a2ea0 100644 --- a/spec/whois/parsers/responses/whois.nic.it/it/property_status_pendingdelete_pendingdelete_spec.rb +++ b/spec/whois/parsers/responses/whois.nic.it/it/property_status_pendingdelete_pendingdelete_spec.rb @@ -11,29 +11,18 @@ # require 'spec_helper' -require 'whois/parsers/whois.nic.it.rb' -describe Whois::Parsers::WhoisNicIt, "property_status_pendingdelete_pendingdelete.expected" do +describe "whois.nic.it", :aggregate_failures do subject do file = fixture("responses", "whois.nic.it/it/property_status_pendingdelete_pendingdelete.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.nic.it") + Whois::Parser.parser_for(part) end - describe "#status" do - it do - expect(subject.status).to eq(:redemption) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(false) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(true) - end + it "matches property_status_pendingdelete_pendingdelete.expected" do + expect(subject.status).to eq(:redemption) + expect(subject.available?).to eq(false) + expect(subject.registered?).to eq(true) end end diff --git a/spec/whois/parsers/responses/whois.nic.it/it/property_status_pendingdelete_redemptionperiod_spec.rb b/spec/whois/parsers/responses/whois.nic.it/it/property_status_pendingdelete_redemptionperiod_spec.rb index f7bb5455..85ba9e2e 100644 --- a/spec/whois/parsers/responses/whois.nic.it/it/property_status_pendingdelete_redemptionperiod_spec.rb +++ b/spec/whois/parsers/responses/whois.nic.it/it/property_status_pendingdelete_redemptionperiod_spec.rb @@ -11,29 +11,18 @@ # require 'spec_helper' -require 'whois/parsers/whois.nic.it.rb' -describe Whois::Parsers::WhoisNicIt, "property_status_pendingdelete_redemptionperiod.expected" do +describe "whois.nic.it", :aggregate_failures do subject do file = fixture("responses", "whois.nic.it/it/property_status_pendingdelete_redemptionperiod.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.nic.it") + Whois::Parser.parser_for(part) end - describe "#status" do - it do - expect(subject.status).to eq(:redemption) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(false) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(true) - end + it "matches property_status_pendingdelete_redemptionperiod.expected" do + expect(subject.status).to eq(:redemption) + expect(subject.available?).to eq(false) + expect(subject.registered?).to eq(true) end end diff --git a/spec/whois/parsers/responses/whois.nic.it/it/property_status_pendingtransfer_autorenewperiod_spec.rb b/spec/whois/parsers/responses/whois.nic.it/it/property_status_pendingtransfer_autorenewperiod_spec.rb index 8c7c873b..d94e0015 100644 --- a/spec/whois/parsers/responses/whois.nic.it/it/property_status_pendingtransfer_autorenewperiod_spec.rb +++ b/spec/whois/parsers/responses/whois.nic.it/it/property_status_pendingtransfer_autorenewperiod_spec.rb @@ -11,29 +11,18 @@ # require 'spec_helper' -require 'whois/parsers/whois.nic.it.rb' -describe Whois::Parsers::WhoisNicIt, "property_status_pendingtransfer_autorenewperiod.expected" do +describe "whois.nic.it", :aggregate_failures do subject do file = fixture("responses", "whois.nic.it/it/property_status_pendingtransfer_autorenewperiod.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.nic.it") + Whois::Parser.parser_for(part) end - describe "#status" do - it do - expect(subject.status).to eq(:registered) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(false) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(true) - end + it "matches property_status_pendingtransfer_autorenewperiod.expected" do + expect(subject.status).to eq(:registered) + expect(subject.available?).to eq(false) + expect(subject.registered?).to eq(true) end end diff --git a/spec/whois/parsers/responses/whois.nic.it/it/property_status_pendingtransfer_spec.rb b/spec/whois/parsers/responses/whois.nic.it/it/property_status_pendingtransfer_spec.rb index a4663ab7..549646ea 100644 --- a/spec/whois/parsers/responses/whois.nic.it/it/property_status_pendingtransfer_spec.rb +++ b/spec/whois/parsers/responses/whois.nic.it/it/property_status_pendingtransfer_spec.rb @@ -11,29 +11,18 @@ # require 'spec_helper' -require 'whois/parsers/whois.nic.it.rb' -describe Whois::Parsers::WhoisNicIt, "property_status_pendingtransfer.expected" do +describe "whois.nic.it", :aggregate_failures do subject do file = fixture("responses", "whois.nic.it/it/property_status_pendingtransfer.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.nic.it") + Whois::Parser.parser_for(part) end - describe "#status" do - it do - expect(subject.status).to eq(:registered) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(false) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(true) - end + it "matches property_status_pendingtransfer.expected" do + expect(subject.status).to eq(:registered) + expect(subject.available?).to eq(false) + expect(subject.registered?).to eq(true) end end diff --git a/spec/whois/parsers/responses/whois.nic.it/it/property_status_pendingupdate_autorenewperiod_spec.rb b/spec/whois/parsers/responses/whois.nic.it/it/property_status_pendingupdate_autorenewperiod_spec.rb index 5bd89854..b2818699 100644 --- a/spec/whois/parsers/responses/whois.nic.it/it/property_status_pendingupdate_autorenewperiod_spec.rb +++ b/spec/whois/parsers/responses/whois.nic.it/it/property_status_pendingupdate_autorenewperiod_spec.rb @@ -11,29 +11,18 @@ # require 'spec_helper' -require 'whois/parsers/whois.nic.it.rb' -describe Whois::Parsers::WhoisNicIt, "property_status_pendingupdate_autorenewperiod.expected" do +describe "whois.nic.it", :aggregate_failures do subject do file = fixture("responses", "whois.nic.it/it/property_status_pendingupdate_autorenewperiod.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.nic.it") + Whois::Parser.parser_for(part) end - describe "#status" do - it do - expect(subject.status).to eq(:registered) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(false) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(true) - end + it "matches property_status_pendingupdate_autorenewperiod.expected" do + expect(subject.status).to eq(:registered) + expect(subject.available?).to eq(false) + expect(subject.registered?).to eq(true) end end diff --git a/spec/whois/parsers/responses/whois.nic.it/it/property_status_pendingupdate_spec.rb b/spec/whois/parsers/responses/whois.nic.it/it/property_status_pendingupdate_spec.rb index 5d58d60e..97e53fc0 100644 --- a/spec/whois/parsers/responses/whois.nic.it/it/property_status_pendingupdate_spec.rb +++ b/spec/whois/parsers/responses/whois.nic.it/it/property_status_pendingupdate_spec.rb @@ -11,29 +11,18 @@ # require 'spec_helper' -require 'whois/parsers/whois.nic.it.rb' -describe Whois::Parsers::WhoisNicIt, "property_status_pendingupdate.expected" do +describe "whois.nic.it", :aggregate_failures do subject do file = fixture("responses", "whois.nic.it/it/property_status_pendingupdate.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.nic.it") + Whois::Parser.parser_for(part) end - describe "#status" do - it do - expect(subject.status).to eq(:registered) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(false) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(true) - end + it "matches property_status_pendingupdate.expected" do + expect(subject.status).to eq(:registered) + expect(subject.available?).to eq(false) + expect(subject.registered?).to eq(true) end end diff --git a/spec/whois/parsers/responses/whois.nic.it/it/property_status_redemption_no_provider_spec.rb b/spec/whois/parsers/responses/whois.nic.it/it/property_status_redemption_no_provider_spec.rb index 29cf6ebe..74413a7f 100644 --- a/spec/whois/parsers/responses/whois.nic.it/it/property_status_redemption_no_provider_spec.rb +++ b/spec/whois/parsers/responses/whois.nic.it/it/property_status_redemption_no_provider_spec.rb @@ -11,29 +11,18 @@ # require 'spec_helper' -require 'whois/parsers/whois.nic.it.rb' -describe Whois::Parsers::WhoisNicIt, "property_status_redemption_no_provider.expected" do +describe "whois.nic.it", :aggregate_failures do subject do file = fixture("responses", "whois.nic.it/it/property_status_redemption_no_provider.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.nic.it") + Whois::Parser.parser_for(part) end - describe "#status" do - it do - expect(subject.status).to eq(:redemption) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(false) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(true) - end + it "matches property_status_redemption_no_provider.expected" do + expect(subject.status).to eq(:redemption) + expect(subject.available?).to eq(false) + expect(subject.registered?).to eq(true) end end diff --git a/spec/whois/parsers/responses/whois.nic.it/it/property_status_reserved_spec.rb b/spec/whois/parsers/responses/whois.nic.it/it/property_status_reserved_spec.rb index 516b2aca..7e00d726 100644 --- a/spec/whois/parsers/responses/whois.nic.it/it/property_status_reserved_spec.rb +++ b/spec/whois/parsers/responses/whois.nic.it/it/property_status_reserved_spec.rb @@ -11,29 +11,18 @@ # require 'spec_helper' -require 'whois/parsers/whois.nic.it.rb' -describe Whois::Parsers::WhoisNicIt, "property_status_reserved.expected" do +describe "whois.nic.it", :aggregate_failures do subject do file = fixture("responses", "whois.nic.it/it/property_status_reserved.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.nic.it") + Whois::Parser.parser_for(part) end - describe "#status" do - it do - expect(subject.status).to eq(:reserved) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(false) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(true) - end + it "matches property_status_reserved.expected" do + expect(subject.status).to eq(:reserved) + expect(subject.available?).to eq(false) + expect(subject.registered?).to eq(true) end end diff --git a/spec/whois/parsers/responses/whois.nic.it/it/property_status_unassignable_spec.rb b/spec/whois/parsers/responses/whois.nic.it/it/property_status_unassignable_spec.rb index 638d2bee..c0b38682 100644 --- a/spec/whois/parsers/responses/whois.nic.it/it/property_status_unassignable_spec.rb +++ b/spec/whois/parsers/responses/whois.nic.it/it/property_status_unassignable_spec.rb @@ -11,29 +11,18 @@ # require 'spec_helper' -require 'whois/parsers/whois.nic.it.rb' -describe Whois::Parsers::WhoisNicIt, "property_status_unassignable.expected" do +describe "whois.nic.it", :aggregate_failures do subject do file = fixture("responses", "whois.nic.it/it/property_status_unassignable.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.nic.it") + Whois::Parser.parser_for(part) end - describe "#status" do - it do - expect(subject.status).to eq(:unavailable) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(false) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(false) - end + it "matches property_status_unassignable.expected" do + expect(subject.status).to eq(:unavailable) + expect(subject.available?).to eq(false) + expect(subject.registered?).to eq(false) end end diff --git a/spec/whois/parsers/responses/whois.nic.it/it/property_technical_contact_spec.rb b/spec/whois/parsers/responses/whois.nic.it/it/property_technical_contact_spec.rb index ac2232bd..0cd1655f 100644 --- a/spec/whois/parsers/responses/whois.nic.it/it/property_technical_contact_spec.rb +++ b/spec/whois/parsers/responses/whois.nic.it/it/property_technical_contact_spec.rb @@ -11,24 +11,21 @@ # require 'spec_helper' -require 'whois/parsers/whois.nic.it.rb' -describe Whois::Parsers::WhoisNicIt, "property_technical_contact.expected" do +describe "whois.nic.it", :aggregate_failures do subject do file = fixture("responses", "whois.nic.it/it/property_technical_contact.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.nic.it") + Whois::Parser.parser_for(part) end - describe "#technical_contacts" do - it do - expect(subject.technical_contacts).to be_a(Array) - expect(subject.technical_contacts.size).to eq(1) - expect(subject.technical_contacts[0]).to be_a(Whois::Parser::Contact) - expect(subject.technical_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_TECHNICAL) - expect(subject.technical_contacts[0].id).to eq("TS7016-ITNIC") - expect(subject.technical_contacts[0].name).to eq("Technical Services") - end + it "matches property_technical_contact.expected" do + expect(subject.technical_contacts).to be_a(Array) + expect(subject.technical_contacts.size).to eq(1) + expect(subject.technical_contacts[0]).to be_a(Whois::Parser::Contact) + expect(subject.technical_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_TECHNICAL) + expect(subject.technical_contacts[0].id).to eq("TS7016-ITNIC") + expect(subject.technical_contacts[0].name).to eq("Technical Services") end end diff --git a/spec/whois/parsers/responses/whois.nic.it/it/response_unavailable_spec.rb b/spec/whois/parsers/responses/whois.nic.it/it/response_unavailable_spec.rb index 3635b166..21ff350d 100644 --- a/spec/whois/parsers/responses/whois.nic.it/it/response_unavailable_spec.rb +++ b/spec/whois/parsers/responses/whois.nic.it/it/response_unavailable_spec.rb @@ -11,19 +11,16 @@ # require 'spec_helper' -require 'whois/parsers/whois.nic.it.rb' -describe Whois::Parsers::WhoisNicIt, "response_unavailable.expected" do +describe "whois.nic.it", :aggregate_failures do subject do file = fixture("responses", "whois.nic.it/it/response_unavailable.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.nic.it") + Whois::Parser.parser_for(part) end - describe "#response_unavailable?" do - it do - expect(subject.response_unavailable?).to eq(true) - end + it "matches response_unavailable.expected" do + expect(subject.response_unavailable?).to eq(true) end end diff --git a/spec/whois/parsers/responses/whois.nic.it/it/status_available_spec.rb b/spec/whois/parsers/responses/whois.nic.it/it/status_available_spec.rb index fec1fc64..9b163bfc 100644 --- a/spec/whois/parsers/responses/whois.nic.it/it/status_available_spec.rb +++ b/spec/whois/parsers/responses/whois.nic.it/it/status_available_spec.rb @@ -11,93 +11,34 @@ # require 'spec_helper' -require 'whois/parsers/whois.nic.it.rb' -describe Whois::Parsers::WhoisNicIt, "status_available.expected" do +describe "whois.nic.it", :aggregate_failures do subject do file = fixture("responses", "whois.nic.it/it/status_available.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.nic.it") + Whois::Parser.parser_for(part) end - describe "#disclaimer" do - it do - expect(subject.disclaimer).to eq(nil) - end - end - describe "#domain" do - it do - expect(subject.domain).to eq("u34jedzcq.it") - end - end - describe "#domain_id" do - it do - expect { subject.domain_id }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#status" do - it do - expect(subject.status).to eq(:available) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(true) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(false) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to eq(nil) - end - end - describe "#updated_on" do - it do - expect(subject.updated_on).to eq(nil) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to eq(nil) - end - end - describe "#registrar" do - it do - expect(subject.registrar).to eq(nil) - end - end - describe "#registrant_contacts" do - it do - expect(subject.registrant_contacts).to be_a(Array) - expect(subject.registrant_contacts).to eq([]) - end - end - describe "#admin_contacts" do - it do - expect(subject.admin_contacts).to be_a(Array) - expect(subject.admin_contacts).to eq([]) - end - end - describe "#technical_contacts" do - it do - expect(subject.technical_contacts).to be_a(Array) - expect(subject.technical_contacts).to eq([]) - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers).to eq([]) - end - end - describe "#response_unavailable?" do - it do - expect(subject.response_unavailable?).to eq(false) - end + it "matches status_available.expected" do + expect(subject.disclaimer).to eq(nil) + expect(subject.domain).to eq("u34jedzcq.it") + expect { subject.domain_id }.to raise_error(Whois::AttributeNotSupported) + expect(subject.status).to eq(:available) + expect(subject.available?).to eq(true) + expect(subject.registered?).to eq(false) + expect(subject.created_on).to eq(nil) + expect(subject.updated_on).to eq(nil) + expect(subject.expires_on).to eq(nil) + expect(subject.registrar).to eq(nil) + expect(subject.registrant_contacts).to be_a(Array) + expect(subject.registrant_contacts).to eq([]) + expect(subject.admin_contacts).to be_a(Array) + expect(subject.admin_contacts).to eq([]) + expect(subject.technical_contacts).to be_a(Array) + expect(subject.technical_contacts).to eq([]) + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers).to eq([]) + expect(subject.response_unavailable?).to eq(false) end end diff --git a/spec/whois/parsers/responses/whois.nic.it/it/status_registered_spec.rb b/spec/whois/parsers/responses/whois.nic.it/it/status_registered_spec.rb index ccee8946..d4ca0ea1 100644 --- a/spec/whois/parsers/responses/whois.nic.it/it/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.nic.it/it/status_registered_spec.rb @@ -11,152 +11,93 @@ # require 'spec_helper' -require 'whois/parsers/whois.nic.it.rb' -describe Whois::Parsers::WhoisNicIt, "status_registered.expected" do +describe "whois.nic.it", :aggregate_failures do subject do file = fixture("responses", "whois.nic.it/it/status_registered.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.nic.it") + Whois::Parser.parser_for(part) end - describe "#disclaimer" do - it do - expect(subject.disclaimer).to eq("Please note that the following result could be a subgroup of the data contained in the database. Additional information can be visualized at: http://www.nic.it/cgi-bin/Whois/whois.cgi") - end - end - describe "#domain" do - it do - expect(subject.domain).to eq("google.it") - end - end - describe "#domain_id" do - it do - expect { subject.domain_id }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#status" do - it do - expect(subject.status).to eq(:registered) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(false) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(true) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to be_a(Time) - expect(subject.created_on).to eq(DateTime.parse("1999-12-10 00:00:00")) - end - end - describe "#updated_on" do - it do - expect(subject.updated_on).to be_a(Time) - expect(subject.updated_on).to eq(DateTime.parse("2013-04-21 01:05:35")) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to be_a(Time) - expect(subject.expires_on).to eq(DateTime.parse("2014-04-21 00:00:00")) - end - end - describe "#registrar" do - it do - expect(subject.registrar).to be_a(Whois::Parser::Registrar) - expect(subject.registrar.id).to eq("MARKMONITOR-REG") - expect(subject.registrar.name).to eq("MARKMONITOR-REG") - expect(subject.registrar.organization).to eq("MarkMonitor International Limited") - expect(subject.registrar.url).to eq("https://www.markmonitor.com/") - end - end - describe "#registrant_contacts" do - it do - expect(subject.registrant_contacts).to be_a(Array) - expect(subject.registrant_contacts.size).to eq(1) - expect(subject.registrant_contacts[0]).to be_a(Whois::Parser::Contact) - expect(subject.registrant_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_REGISTRANT) - expect(subject.registrant_contacts[0].id).to eq("DUP430692088") - expect(subject.registrant_contacts[0].name).to eq("Google Ireland Holdings") - expect(subject.registrant_contacts[0].organization).to eq("Google Ireland Holdings") - expect(subject.registrant_contacts[0].address).to eq("70 Sir John Rogersons Quay") - expect(subject.registrant_contacts[0].city).to eq("Dublin") - expect(subject.registrant_contacts[0].zip).to eq("2") - expect(subject.registrant_contacts[0].state).to eq("IE") - expect(subject.registrant_contacts[0].country).to eq(nil) - expect(subject.registrant_contacts[0].country_code).to eq("IE") - expect(subject.registrant_contacts[0].phone).to eq(nil) - expect(subject.registrant_contacts[0].fax).to eq(nil) - expect(subject.registrant_contacts[0].email).to eq(nil) - expect(subject.registrant_contacts[0].created_on).to eq(DateTime.parse("2013-04-21 01:05:35")) - expect(subject.registrant_contacts[0].updated_on).to eq(DateTime.parse("2013-04-21 01:05:35")) - end - end - describe "#admin_contacts" do - it do - expect(subject.admin_contacts).to be_a(Array) - expect(subject.admin_contacts.size).to eq(1) - expect(subject.admin_contacts[0]).to be_a(Whois::Parser::Contact) - expect(subject.admin_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_ADMINISTRATIVE) - expect(subject.admin_contacts[0].id).to eq("DUP142437129") - expect(subject.admin_contacts[0].name).to eq("Tsao Tu") - expect(subject.admin_contacts[0].organization).to eq("Tu Tsao") - expect(subject.admin_contacts[0].address).to eq("70 Sir John Rogersons Quay") - expect(subject.admin_contacts[0].city).to eq("Dublin") - expect(subject.admin_contacts[0].zip).to eq("2") - expect(subject.admin_contacts[0].state).to eq("IE") - expect(subject.admin_contacts[0].country).to eq(nil) - expect(subject.admin_contacts[0].country_code).to eq("IE") - expect(subject.admin_contacts[0].phone).to eq(nil) - expect(subject.admin_contacts[0].fax).to eq(nil) - expect(subject.admin_contacts[0].email).to eq(nil) - expect(subject.admin_contacts[0].created_on).to eq(DateTime.parse("2013-04-21 01:05:35")) - expect(subject.admin_contacts[0].updated_on).to eq(DateTime.parse("2013-04-21 01:05:35")) - end - end - describe "#technical_contacts" do - it do - expect(subject.technical_contacts[0].id).to eq("DUP430692088") - expect(subject.technical_contacts[0].name).to eq("Google Ireland Holdings") - expect(subject.technical_contacts[0].organization).to eq("Google Ireland Holdings") - expect(subject.technical_contacts[0].address).to eq("70 Sir John Rogersons Quay") - expect(subject.technical_contacts[0].city).to eq("Dublin") - expect(subject.technical_contacts[0].zip).to eq("2") - expect(subject.technical_contacts[0].state).to eq("IE") - expect(subject.technical_contacts[0].country).to eq(nil) - expect(subject.technical_contacts[0].country_code).to eq("IE") - expect(subject.technical_contacts[0].phone).to eq(nil) - expect(subject.technical_contacts[0].fax).to eq(nil) - expect(subject.technical_contacts[0].email).to eq(nil) - expect(subject.technical_contacts[0].created_on).to eq(DateTime.parse("2013-04-21 01:05:35")) - expect(subject.technical_contacts[0].updated_on).to eq(DateTime.parse("2013-04-21 01:05:35")) - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers.size).to eq(4) - expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[0].name).to eq("ns1.google.com") - expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[1].name).to eq("ns4.google.com") - expect(subject.nameservers[2]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[2].name).to eq("ns2.google.com") - expect(subject.nameservers[3]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[3].name).to eq("ns3.google.com") - end - end - describe "#response_unavailable?" do - it do - expect(subject.response_unavailable?).to eq(false) - end + it "matches status_registered.expected" do + expect(subject.disclaimer).to eq("Please note that the following result could be a subgroup of the data contained in the database. Additional information can be visualized at: http://www.nic.it/cgi-bin/Whois/whois.cgi") + expect(subject.domain).to eq("google.it") + expect { subject.domain_id }.to raise_error(Whois::AttributeNotSupported) + expect(subject.status).to eq(:registered) + expect(subject.available?).to eq(false) + expect(subject.registered?).to eq(true) + expect(subject.created_on).to be_a(Time) + expect(subject.created_on).to eq(DateTime.parse("1999-12-10 00:00:00")) + expect(subject.updated_on).to be_a(Time) + expect(subject.updated_on).to eq(DateTime.parse("2013-04-21 01:05:35")) + expect(subject.expires_on).to be_a(Time) + expect(subject.expires_on).to eq(DateTime.parse("2014-04-21 00:00:00")) + expect(subject.registrar).to be_a(Whois::Parser::Registrar) + expect(subject.registrar.id).to eq("MARKMONITOR-REG") + expect(subject.registrar.name).to eq("MARKMONITOR-REG") + expect(subject.registrar.organization).to eq("MarkMonitor International Limited") + expect(subject.registrar.url).to eq("https://www.markmonitor.com/") + expect(subject.registrant_contacts).to be_a(Array) + expect(subject.registrant_contacts.size).to eq(1) + expect(subject.registrant_contacts[0]).to be_a(Whois::Parser::Contact) + expect(subject.registrant_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_REGISTRANT) + expect(subject.registrant_contacts[0].id).to eq("DUP430692088") + expect(subject.registrant_contacts[0].name).to eq("Google Ireland Holdings") + expect(subject.registrant_contacts[0].organization).to eq("Google Ireland Holdings") + expect(subject.registrant_contacts[0].address).to eq("70 Sir John Rogersons Quay") + expect(subject.registrant_contacts[0].city).to eq("Dublin") + expect(subject.registrant_contacts[0].zip).to eq("2") + expect(subject.registrant_contacts[0].state).to eq("IE") + expect(subject.registrant_contacts[0].country).to eq(nil) + expect(subject.registrant_contacts[0].country_code).to eq("IE") + expect(subject.registrant_contacts[0].phone).to eq(nil) + expect(subject.registrant_contacts[0].fax).to eq(nil) + expect(subject.registrant_contacts[0].email).to eq(nil) + expect(subject.registrant_contacts[0].created_on).to eq(DateTime.parse("2013-04-21 01:05:35")) + expect(subject.registrant_contacts[0].updated_on).to eq(DateTime.parse("2013-04-21 01:05:35")) + expect(subject.admin_contacts).to be_a(Array) + expect(subject.admin_contacts.size).to eq(1) + expect(subject.admin_contacts[0]).to be_a(Whois::Parser::Contact) + expect(subject.admin_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_ADMINISTRATIVE) + expect(subject.admin_contacts[0].id).to eq("DUP142437129") + expect(subject.admin_contacts[0].name).to eq("Tsao Tu") + expect(subject.admin_contacts[0].organization).to eq("Tu Tsao") + expect(subject.admin_contacts[0].address).to eq("70 Sir John Rogersons Quay") + expect(subject.admin_contacts[0].city).to eq("Dublin") + expect(subject.admin_contacts[0].zip).to eq("2") + expect(subject.admin_contacts[0].state).to eq("IE") + expect(subject.admin_contacts[0].country).to eq(nil) + expect(subject.admin_contacts[0].country_code).to eq("IE") + expect(subject.admin_contacts[0].phone).to eq(nil) + expect(subject.admin_contacts[0].fax).to eq(nil) + expect(subject.admin_contacts[0].email).to eq(nil) + expect(subject.admin_contacts[0].created_on).to eq(DateTime.parse("2013-04-21 01:05:35")) + expect(subject.admin_contacts[0].updated_on).to eq(DateTime.parse("2013-04-21 01:05:35")) + expect(subject.technical_contacts[0].id).to eq("DUP430692088") + expect(subject.technical_contacts[0].name).to eq("Google Ireland Holdings") + expect(subject.technical_contacts[0].organization).to eq("Google Ireland Holdings") + expect(subject.technical_contacts[0].address).to eq("70 Sir John Rogersons Quay") + expect(subject.technical_contacts[0].city).to eq("Dublin") + expect(subject.technical_contacts[0].zip).to eq("2") + expect(subject.technical_contacts[0].state).to eq("IE") + expect(subject.technical_contacts[0].country).to eq(nil) + expect(subject.technical_contacts[0].country_code).to eq("IE") + expect(subject.technical_contacts[0].phone).to eq(nil) + expect(subject.technical_contacts[0].fax).to eq(nil) + expect(subject.technical_contacts[0].email).to eq(nil) + expect(subject.technical_contacts[0].created_on).to eq(DateTime.parse("2013-04-21 01:05:35")) + expect(subject.technical_contacts[0].updated_on).to eq(DateTime.parse("2013-04-21 01:05:35")) + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers.size).to eq(4) + expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[0].name).to eq("ns1.google.com") + expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[1].name).to eq("ns4.google.com") + expect(subject.nameservers[2]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[2].name).to eq("ns2.google.com") + expect(subject.nameservers[3]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[3].name).to eq("ns3.google.com") + expect(subject.response_unavailable?).to eq(false) end end diff --git a/spec/whois/parsers/responses/whois.nic.it/it/status_unavailable_spec.rb b/spec/whois/parsers/responses/whois.nic.it/it/status_unavailable_spec.rb index 56344b33..fb38fed2 100644 --- a/spec/whois/parsers/responses/whois.nic.it/it/status_unavailable_spec.rb +++ b/spec/whois/parsers/responses/whois.nic.it/it/status_unavailable_spec.rb @@ -11,29 +11,18 @@ # require 'spec_helper' -require 'whois/parsers/whois.nic.it.rb' -describe Whois::Parsers::WhoisNicIt, "status_unavailable.expected" do +describe "whois.nic.it", :aggregate_failures do subject do file = fixture("responses", "whois.nic.it/it/status_unavailable.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.nic.it") + Whois::Parser.parser_for(part) end - describe "#status" do - it do - expect(subject.status).to eq(:unavailable) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(false) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(false) - end + it "matches status_unavailable.expected" do + expect(subject.status).to eq(:unavailable) + expect(subject.available?).to eq(false) + expect(subject.registered?).to eq(false) end end diff --git a/spec/whois/parsers/responses/whois.nic.jobs/jobs/property_nameserver_no_nameserver_spec.rb b/spec/whois/parsers/responses/whois.nic.jobs/jobs/property_nameserver_no_nameserver_spec.rb index 748504d0..3e9161cb 100644 --- a/spec/whois/parsers/responses/whois.nic.jobs/jobs/property_nameserver_no_nameserver_spec.rb +++ b/spec/whois/parsers/responses/whois.nic.jobs/jobs/property_nameserver_no_nameserver_spec.rb @@ -11,20 +11,17 @@ # require 'spec_helper' -require 'whois/parsers/whois.nic.jobs.rb' -describe Whois::Parsers::WhoisNicJobs, "property_nameserver_no_nameserver.expected" do +describe "whois.nic.jobs", :aggregate_failures do subject do file = fixture("responses", "whois.nic.jobs/jobs/property_nameserver_no_nameserver.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.nic.jobs") + Whois::Parser.parser_for(part) end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers).to eq([]) - end + it "matches property_nameserver_no_nameserver.expected" do + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers).to eq([]) end end diff --git a/spec/whois/parsers/responses/whois.nic.jobs/jobs/status_available_spec.rb b/spec/whois/parsers/responses/whois.nic.jobs/jobs/status_available_spec.rb index 195652e8..e52b2892 100644 --- a/spec/whois/parsers/responses/whois.nic.jobs/jobs/status_available_spec.rb +++ b/spec/whois/parsers/responses/whois.nic.jobs/jobs/status_available_spec.rb @@ -11,80 +11,29 @@ # require 'spec_helper' -require 'whois/parsers/whois.nic.jobs.rb' -describe Whois::Parsers::WhoisNicJobs, "status_available.expected" do +describe "whois.nic.jobs", :aggregate_failures do subject do file = fixture("responses", "whois.nic.jobs/jobs/status_available.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.nic.jobs") + Whois::Parser.parser_for(part) end - describe "#disclaimer" do - it do - expect(subject.disclaimer).to eq("TERMS OF USE: You are not authorized to access or query our Whois database through the use of electronic processes that are high-volume and automated except as reasonably necessary to register domain names or modify existing registrations; the Data in VeriSign's (\"VeriSign\") Whois database is provided by VeriSign for information purposes only, and to assist persons in obtaining information about or related to a domain name registration record. VeriSign does not guarantee its accuracy. By submitting a Whois query, you agree to abide by the following terms of use: You agree that you may use this Data only for lawful purposes and that under no circumstances will you use this Data to: (1) allow, enable, or otherwise support the transmission of mass unsolicited, commercial advertising or solicitations via e-mail, telephone, or facsimile; or (2) enable high volume, automated, electronic processes that apply to VeriSign (or its computer systems). The compilation, repackaging, dissemination or other use of this Data is expressly prohibited without the prior written consent of VeriSign. You agree not to use electronic processes that are automated and high-volume to access or query the Whois database except as reasonably necessary to register domain names or modify existing registrations. VeriSign reserves the right to restrict your access to the Whois database in its sole discretion to ensure operational stability. VeriSign may restrict or terminate your access to the Whois database for failure to abide by these terms of use. VeriSign reserves the right to modify these terms at any time.") - end - end - describe "#domain" do - it do - expect(subject.domain).to eq("u34jedzcq.jobs") - end - end - describe "#domain_id" do - it do - expect(subject.domain_id).to eq(nil) - end - end - describe "#status" do - it do - expect(subject.status).to eq(:available) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(true) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(false) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to eq(nil) - end - end - describe "#updated_on" do - it do - expect(subject.updated_on).to eq(nil) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to eq(nil) - end - end - describe "#registrar" do - it do - expect(subject.registrar).to eq(nil) - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers).to eq([]) - end - end - describe "#referral_whois" do - it do - expect(subject.referral_whois).to eq(nil) - end - end - describe "#referral_url" do - it do - expect(subject.referral_url).to eq(nil) - end + it "matches status_available.expected" do + expect(subject.disclaimer).to eq("TERMS OF USE: You are not authorized to access or query our Whois database through the use of electronic processes that are high-volume and automated except as reasonably necessary to register domain names or modify existing registrations; the Data in VeriSign's (\"VeriSign\") Whois database is provided by VeriSign for information purposes only, and to assist persons in obtaining information about or related to a domain name registration record. VeriSign does not guarantee its accuracy. By submitting a Whois query, you agree to abide by the following terms of use: You agree that you may use this Data only for lawful purposes and that under no circumstances will you use this Data to: (1) allow, enable, or otherwise support the transmission of mass unsolicited, commercial advertising or solicitations via e-mail, telephone, or facsimile; or (2) enable high volume, automated, electronic processes that apply to VeriSign (or its computer systems). The compilation, repackaging, dissemination or other use of this Data is expressly prohibited without the prior written consent of VeriSign. You agree not to use electronic processes that are automated and high-volume to access or query the Whois database except as reasonably necessary to register domain names or modify existing registrations. VeriSign reserves the right to restrict your access to the Whois database in its sole discretion to ensure operational stability. VeriSign may restrict or terminate your access to the Whois database for failure to abide by these terms of use. VeriSign reserves the right to modify these terms at any time.") + expect(subject.domain).to eq("u34jedzcq.jobs") + expect(subject.domain_id).to eq(nil) + expect(subject.status).to eq(:available) + expect(subject.available?).to eq(true) + expect(subject.registered?).to eq(false) + expect(subject.created_on).to eq(nil) + expect(subject.updated_on).to eq(nil) + expect(subject.expires_on).to eq(nil) + expect(subject.registrar).to eq(nil) + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers).to eq([]) + expect(subject.referral_whois).to eq(nil) + expect(subject.referral_url).to eq(nil) end end diff --git a/spec/whois/parsers/responses/whois.nic.jobs/jobs/status_registered_spec.rb b/spec/whois/parsers/responses/whois.nic.jobs/jobs/status_registered_spec.rb index bca1fc20..95cb1202 100644 --- a/spec/whois/parsers/responses/whois.nic.jobs/jobs/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.nic.jobs/jobs/status_registered_spec.rb @@ -11,94 +11,43 @@ # require 'spec_helper' -require 'whois/parsers/whois.nic.jobs.rb' -describe Whois::Parsers::WhoisNicJobs, "status_registered.expected" do +describe "whois.nic.jobs", :aggregate_failures do subject do file = fixture("responses", "whois.nic.jobs/jobs/status_registered.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.nic.jobs") + Whois::Parser.parser_for(part) end - describe "#disclaimer" do - it do - expect(subject.disclaimer).to eq("TERMS OF USE: You are not authorized to access or query our Whois database through the use of electronic processes that are high-volume and automated except as reasonably necessary to register domain names or modify existing registrations; the Data in VeriSign's (\"VeriSign\") Whois database is provided by VeriSign for information purposes only, and to assist persons in obtaining information about or related to a domain name registration record. VeriSign does not guarantee its accuracy. By submitting a Whois query, you agree to abide by the following terms of use: You agree that you may use this Data only for lawful purposes and that under no circumstances will you use this Data to: (1) allow, enable, or otherwise support the transmission of mass unsolicited, commercial advertising or solicitations via e-mail, telephone, or facsimile; or (2) enable high volume, automated, electronic processes that apply to VeriSign (or its computer systems). The compilation, repackaging, dissemination or other use of this Data is expressly prohibited without the prior written consent of VeriSign. You agree not to use electronic processes that are automated and high-volume to access or query the Whois database except as reasonably necessary to register domain names or modify existing registrations. VeriSign reserves the right to restrict your access to the Whois database in its sole discretion to ensure operational stability. VeriSign may restrict or terminate your access to the Whois database for failure to abide by these terms of use. VeriSign reserves the right to modify these terms at any time.") - end - end - describe "#domain" do - it do - expect(subject.domain).to eq("google.jobs") - end - end - describe "#domain_id" do - it do - expect(subject.domain_id).to eq("86932313_DOMAIN_JOBS-VRSN") - end - end - describe "#status" do - it do - expect(subject.status).to eq(:registered) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(false) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(true) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to be_a(Time) - expect(subject.created_on).to eq(DateTime.parse("2005-09-15 04:00:00 UTC")) - end - end - describe "#updated_on" do - it do - expect(subject.updated_on).to be_a(Time) - expect(subject.updated_on).to eq(DateTime.parse("2017-07-27 20:59:01 UTC")) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to be_a(Time) - expect(subject.expires_on).to eq(DateTime.parse("2017-09-15 04:00:00 UTC")) - end - end - describe "#registrar" do - it do - expect(subject.registrar).to be_a(Whois::Parser::Registrar) - expect(subject.registrar.id).to eq("292") - expect(subject.registrar.name).to eq("MARKMONITOR INC.") - expect(subject.registrar.url).to eq("http://www.markmonitor.com") - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers.size).to eq(2) - expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[0].name).to eq("ns1.google.com") - expect(subject.nameservers[0].ipv4).to eq(nil) - expect(subject.nameservers[0].ipv6).to eq(nil) - expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[1].name).to eq("ns2.google.com") - expect(subject.nameservers[1].ipv4).to eq(nil) - expect(subject.nameservers[1].ipv6).to eq(nil) - end - end - describe "#referral_whois" do - it do - expect(subject.referral_whois).to eq("whois.markmonitor.com") - end - end - describe "#referral_url" do - it do - expect(subject.referral_url).to eq("http://www.markmonitor.com") - end + it "matches status_registered.expected" do + expect(subject.disclaimer).to eq("TERMS OF USE: You are not authorized to access or query our Whois database through the use of electronic processes that are high-volume and automated except as reasonably necessary to register domain names or modify existing registrations; the Data in VeriSign's (\"VeriSign\") Whois database is provided by VeriSign for information purposes only, and to assist persons in obtaining information about or related to a domain name registration record. VeriSign does not guarantee its accuracy. By submitting a Whois query, you agree to abide by the following terms of use: You agree that you may use this Data only for lawful purposes and that under no circumstances will you use this Data to: (1) allow, enable, or otherwise support the transmission of mass unsolicited, commercial advertising or solicitations via e-mail, telephone, or facsimile; or (2) enable high volume, automated, electronic processes that apply to VeriSign (or its computer systems). The compilation, repackaging, dissemination or other use of this Data is expressly prohibited without the prior written consent of VeriSign. You agree not to use electronic processes that are automated and high-volume to access or query the Whois database except as reasonably necessary to register domain names or modify existing registrations. VeriSign reserves the right to restrict your access to the Whois database in its sole discretion to ensure operational stability. VeriSign may restrict or terminate your access to the Whois database for failure to abide by these terms of use. VeriSign reserves the right to modify these terms at any time.") + expect(subject.domain).to eq("google.jobs") + expect(subject.domain_id).to eq("86932313_DOMAIN_JOBS-VRSN") + expect(subject.status).to eq(:registered) + expect(subject.available?).to eq(false) + expect(subject.registered?).to eq(true) + expect(subject.created_on).to be_a(Time) + expect(subject.created_on).to eq(DateTime.parse("2005-09-15 04:00:00 UTC")) + expect(subject.updated_on).to be_a(Time) + expect(subject.updated_on).to eq(DateTime.parse("2017-07-27 20:59:01 UTC")) + expect(subject.expires_on).to be_a(Time) + expect(subject.expires_on).to eq(DateTime.parse("2017-09-15 04:00:00 UTC")) + expect(subject.registrar).to be_a(Whois::Parser::Registrar) + expect(subject.registrar.id).to eq("292") + expect(subject.registrar.name).to eq("MARKMONITOR INC.") + expect(subject.registrar.url).to eq("http://www.markmonitor.com") + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers.size).to eq(2) + expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[0].name).to eq("ns1.google.com") + expect(subject.nameservers[0].ipv4).to eq(nil) + expect(subject.nameservers[0].ipv6).to eq(nil) + expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[1].name).to eq("ns2.google.com") + expect(subject.nameservers[1].ipv4).to eq(nil) + expect(subject.nameservers[1].ipv6).to eq(nil) + expect(subject.referral_whois).to eq("whois.markmonitor.com") + expect(subject.referral_url).to eq("http://www.markmonitor.com") end end diff --git a/spec/whois/parsers/responses/whois.nic.ki/ki/status_available_spec.rb b/spec/whois/parsers/responses/whois.nic.ki/ki/status_available_spec.rb index 9a18d295..18e8ea47 100644 --- a/spec/whois/parsers/responses/whois.nic.ki/ki/status_available_spec.rb +++ b/spec/whois/parsers/responses/whois.nic.ki/ki/status_available_spec.rb @@ -11,65 +11,26 @@ # require 'spec_helper' -require 'whois/parsers/whois.nic.ki.rb' -describe Whois::Parsers::WhoisNicKi, "status_available.expected" do +describe "whois.nic.ki", :aggregate_failures do subject do file = fixture("responses", "whois.nic.ki/ki/status_available.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.nic.ki") + Whois::Parser.parser_for(part) end - describe "#domain" do - it do - expect(subject.domain).to eq("u34jedzcq.ki") - end - end - describe "#domain_id" do - it do - expect(subject.domain_id).to eq(nil) - end - end - describe "#status" do - it do - expect(subject.status).to eq(:available) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(true) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(false) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to eq(nil) - end - end - describe "#updated_on" do - it do - expect(subject.updated_on).to eq(nil) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to eq(nil) - end - end - describe "#registrar" do - it do - expect(subject.registrar).to eq(nil) - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers).to eq([]) - end + it "matches status_available.expected" do + expect(subject.domain).to eq("u34jedzcq.ki") + expect(subject.domain_id).to eq(nil) + expect(subject.status).to eq(:available) + expect(subject.available?).to eq(true) + expect(subject.registered?).to eq(false) + expect(subject.created_on).to eq(nil) + expect(subject.updated_on).to eq(nil) + expect(subject.expires_on).to eq(nil) + expect(subject.registrar).to eq(nil) + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers).to eq([]) end end diff --git a/spec/whois/parsers/responses/whois.nic.ki/ki/status_registered_spec.rb b/spec/whois/parsers/responses/whois.nic.ki/ki/status_registered_spec.rb index e3014f23..b88ba2ab 100644 --- a/spec/whois/parsers/responses/whois.nic.ki/ki/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.nic.ki/ki/status_registered_spec.rb @@ -11,79 +11,40 @@ # require 'spec_helper' -require 'whois/parsers/whois.nic.ki.rb' -describe Whois::Parsers::WhoisNicKi, "status_registered.expected" do +describe "whois.nic.ki", :aggregate_failures do subject do file = fixture("responses", "whois.nic.ki/ki/status_registered.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.nic.ki") + Whois::Parser.parser_for(part) end - describe "#domain" do - it do - expect(subject.domain).to eq("google.ki") - end - end - describe "#domain_id" do - it do - expect(subject.domain_id).to eq("18030-CoCCA") - end - end - describe "#status" do - it do - expect(subject.status).to eq(:registered) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(false) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(true) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to be_a(Time) - expect(subject.created_on).to eq(DateTime.parse("2006-05-15 12:00:00 UTC")) - end - end - describe "#updated_on" do - it do - expect(subject.updated_on).to be_a(Time) - expect(subject.updated_on).to eq(DateTime.parse("2013-12-06 07:34:23 UTC")) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to be_a(Time) - expect(subject.expires_on).to eq(DateTime.parse("2014-11-27 11:00:00 UTC")) - end - end - describe "#registrar" do - it do - expect(subject.registrar).to be_a(Whois::Parser::Registrar) - expect(subject.registrar.id).to eq(nil) - expect(subject.registrar.name).to eq("MarkMonitor") - expect(subject.registrar.url).to eq("http://www.markmonitor.com") - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers.size).to eq(4) - expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[0].name).to eq("ns1.google.com") - expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[1].name).to eq("ns2.google.com") - expect(subject.nameservers[2]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[2].name).to eq("ns3.google.com") - expect(subject.nameservers[3]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[3].name).to eq("ns4.google.com") - end + it "matches status_registered.expected" do + expect(subject.domain).to eq("google.ki") + expect(subject.domain_id).to eq("18030-CoCCA") + expect(subject.status).to eq(:registered) + expect(subject.available?).to eq(false) + expect(subject.registered?).to eq(true) + expect(subject.created_on).to be_a(Time) + expect(subject.created_on).to eq(DateTime.parse("2006-05-15 12:00:00 UTC")) + expect(subject.updated_on).to be_a(Time) + expect(subject.updated_on).to eq(DateTime.parse("2013-12-06 07:34:23 UTC")) + expect(subject.expires_on).to be_a(Time) + expect(subject.expires_on).to eq(DateTime.parse("2014-11-27 11:00:00 UTC")) + expect(subject.registrar).to be_a(Whois::Parser::Registrar) + expect(subject.registrar.id).to eq(nil) + expect(subject.registrar.name).to eq("MarkMonitor") + expect(subject.registrar.url).to eq("http://www.markmonitor.com") + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers.size).to eq(4) + expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[0].name).to eq("ns1.google.com") + expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[1].name).to eq("ns2.google.com") + expect(subject.nameservers[2]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[2].name).to eq("ns3.google.com") + expect(subject.nameservers[3]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[3].name).to eq("ns4.google.com") end end diff --git a/spec/whois/parsers/responses/whois.nic.kz/kz/property_status_missing_spec.rb b/spec/whois/parsers/responses/whois.nic.kz/kz/property_status_missing_spec.rb index 35ff1e0d..a7b66f37 100644 --- a/spec/whois/parsers/responses/whois.nic.kz/kz/property_status_missing_spec.rb +++ b/spec/whois/parsers/responses/whois.nic.kz/kz/property_status_missing_spec.rb @@ -11,29 +11,18 @@ # require 'spec_helper' -require 'whois/parsers/whois.nic.kz.rb' -describe Whois::Parsers::WhoisNicKz, "property_status_missing.expected" do +describe "whois.nic.kz", :aggregate_failures do subject do file = fixture("responses", "whois.nic.kz/kz/property_status_missing.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.nic.kz") + Whois::Parser.parser_for(part) end - describe "#status" do - it do - expect(subject.status).to eq(nil) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(true) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(false) - end + it "matches property_status_missing.expected" do + expect(subject.status).to eq(nil) + expect(subject.available?).to eq(true) + expect(subject.registered?).to eq(false) end end diff --git a/spec/whois/parsers/responses/whois.nic.kz/kz/property_status_multiple_spec.rb b/spec/whois/parsers/responses/whois.nic.kz/kz/property_status_multiple_spec.rb index 44b7bb6e..a049eec2 100644 --- a/spec/whois/parsers/responses/whois.nic.kz/kz/property_status_multiple_spec.rb +++ b/spec/whois/parsers/responses/whois.nic.kz/kz/property_status_multiple_spec.rb @@ -11,29 +11,18 @@ # require 'spec_helper' -require 'whois/parsers/whois.nic.kz.rb' -describe Whois::Parsers::WhoisNicKz, "property_status_multiple.expected" do +describe "whois.nic.kz", :aggregate_failures do subject do file = fixture("responses", "whois.nic.kz/kz/property_status_multiple.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.nic.kz") + Whois::Parser.parser_for(part) end - describe "#status" do - it do - expect(subject.status).to eq(["clientDeleteProhibited", "clientRenewProhibited", "clientTransferProhibited"]) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(false) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(true) - end + it "matches property_status_multiple.expected" do + expect(subject.status).to eq(["clientDeleteProhibited", "clientRenewProhibited", "clientTransferProhibited"]) + expect(subject.available?).to eq(false) + expect(subject.registered?).to eq(true) end end diff --git a/spec/whois/parsers/responses/whois.nic.kz/kz/property_status_ok_spec.rb b/spec/whois/parsers/responses/whois.nic.kz/kz/property_status_ok_spec.rb index 4a892315..f557831a 100644 --- a/spec/whois/parsers/responses/whois.nic.kz/kz/property_status_ok_spec.rb +++ b/spec/whois/parsers/responses/whois.nic.kz/kz/property_status_ok_spec.rb @@ -11,29 +11,18 @@ # require 'spec_helper' -require 'whois/parsers/whois.nic.kz.rb' -describe Whois::Parsers::WhoisNicKz, "property_status_ok.expected" do +describe "whois.nic.kz", :aggregate_failures do subject do file = fixture("responses", "whois.nic.kz/kz/property_status_ok.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.nic.kz") + Whois::Parser.parser_for(part) end - describe "#status" do - it do - expect(subject.status).to eq(["ok"]) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(false) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(true) - end + it "matches property_status_ok.expected" do + expect(subject.status).to eq(["ok"]) + expect(subject.available?).to eq(false) + expect(subject.registered?).to eq(true) end end diff --git a/spec/whois/parsers/responses/whois.nic.kz/kz/property_updated_on_blank_spec.rb b/spec/whois/parsers/responses/whois.nic.kz/kz/property_updated_on_blank_spec.rb index a60f8ab0..ed7ab3bc 100644 --- a/spec/whois/parsers/responses/whois.nic.kz/kz/property_updated_on_blank_spec.rb +++ b/spec/whois/parsers/responses/whois.nic.kz/kz/property_updated_on_blank_spec.rb @@ -11,19 +11,16 @@ # require 'spec_helper' -require 'whois/parsers/whois.nic.kz.rb' -describe Whois::Parsers::WhoisNicKz, "property_updated_on_blank.expected" do +describe "whois.nic.kz", :aggregate_failures do subject do file = fixture("responses", "whois.nic.kz/kz/property_updated_on_blank.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.nic.kz") + Whois::Parser.parser_for(part) end - describe "#updated_on" do - it do - expect(subject.updated_on).to eq(nil) - end + it "matches property_updated_on_blank.expected" do + expect(subject.updated_on).to eq(nil) end end diff --git a/spec/whois/parsers/responses/whois.nic.kz/kz/status_available_spec.rb b/spec/whois/parsers/responses/whois.nic.kz/kz/status_available_spec.rb index 8e427db4..476350a3 100644 --- a/spec/whois/parsers/responses/whois.nic.kz/kz/status_available_spec.rb +++ b/spec/whois/parsers/responses/whois.nic.kz/kz/status_available_spec.rb @@ -11,50 +11,23 @@ # require 'spec_helper' -require 'whois/parsers/whois.nic.kz.rb' -describe Whois::Parsers::WhoisNicKz, "status_available.expected" do +describe "whois.nic.kz", :aggregate_failures do subject do file = fixture("responses", "whois.nic.kz/kz/status_available.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.nic.kz") + Whois::Parser.parser_for(part) end - describe "#status" do - it do - expect(subject.status).to eq(nil) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(true) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(false) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to eq(nil) - end - end - describe "#updated_on" do - it do - expect(subject.updated_on).to eq(nil) - end - end - describe "#expires_on" do - it do - expect { subject.expires_on }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers).to eq([]) - end + it "matches status_available.expected" do + expect(subject.status).to eq(nil) + expect(subject.available?).to eq(true) + expect(subject.registered?).to eq(false) + expect(subject.created_on).to eq(nil) + expect(subject.updated_on).to eq(nil) + expect { subject.expires_on }.to raise_error(Whois::AttributeNotSupported) + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers).to eq([]) end end diff --git a/spec/whois/parsers/responses/whois.nic.kz/kz/status_registered_spec.rb b/spec/whois/parsers/responses/whois.nic.kz/kz/status_registered_spec.rb index d8948971..6117e825 100644 --- a/spec/whois/parsers/responses/whois.nic.kz/kz/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.nic.kz/kz/status_registered_spec.rb @@ -11,56 +11,29 @@ # require 'spec_helper' -require 'whois/parsers/whois.nic.kz.rb' -describe Whois::Parsers::WhoisNicKz, "status_registered.expected" do +describe "whois.nic.kz", :aggregate_failures do subject do file = fixture("responses", "whois.nic.kz/kz/status_registered.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.nic.kz") + Whois::Parser.parser_for(part) end - describe "#status" do - it do - expect(subject.status).to eq(["ok"]) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(false) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(true) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to be_a(Time) - expect(subject.created_on).to eq(DateTime.parse("1999-06-07 13:01:43")) - end - end - describe "#updated_on" do - it do - expect(subject.updated_on).to be_a(Time) - expect(subject.updated_on).to eq(DateTime.parse("2012-11-28 03:16:59")) - end - end - describe "#expires_on" do - it do - expect { subject.expires_on }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers.size).to eq(2) - expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[0].name).to eq("ns1.google.com") - expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[1].name).to eq("ns2.google.com") - end + it "matches status_registered.expected" do + expect(subject.status).to eq(["ok"]) + expect(subject.available?).to eq(false) + expect(subject.registered?).to eq(true) + expect(subject.created_on).to be_a(Time) + expect(subject.created_on).to eq(DateTime.parse("1999-06-07 13:01:43")) + expect(subject.updated_on).to be_a(Time) + expect(subject.updated_on).to eq(DateTime.parse("2012-11-28 03:16:59")) + expect { subject.expires_on }.to raise_error(Whois::AttributeNotSupported) + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers.size).to eq(2) + expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[0].name).to eq("ns1.google.com") + expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[1].name).to eq("ns2.google.com") end end diff --git a/spec/whois/parsers/responses/whois.nic.la/la/property_status_multiple_spec.rb b/spec/whois/parsers/responses/whois.nic.la/la/property_status_multiple_spec.rb index 3bee9603..2fc7a40e 100644 --- a/spec/whois/parsers/responses/whois.nic.la/la/property_status_multiple_spec.rb +++ b/spec/whois/parsers/responses/whois.nic.la/la/property_status_multiple_spec.rb @@ -11,19 +11,16 @@ # require 'spec_helper' -require 'whois/parsers/whois.nic.la.rb' -describe Whois::Parsers::WhoisNicLa, "property_status_multiple.expected" do +describe "whois.nic.la", :aggregate_failures do subject do file = fixture("responses", "whois.nic.la/la/property_status_multiple.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.nic.la") + Whois::Parser.parser_for(part) end - describe "#status" do - it do - expect(subject.status).to eq(["TRANSFER PROHIBITED", "RENEW PERIOD"]) - end + it "matches property_status_multiple.expected" do + expect(subject.status).to eq(["TRANSFER PROHIBITED", "RENEW PERIOD"]) end end diff --git a/spec/whois/parsers/responses/whois.nic.la/la/property_status_single_spec.rb b/spec/whois/parsers/responses/whois.nic.la/la/property_status_single_spec.rb index e20328dd..7a1bad26 100644 --- a/spec/whois/parsers/responses/whois.nic.la/la/property_status_single_spec.rb +++ b/spec/whois/parsers/responses/whois.nic.la/la/property_status_single_spec.rb @@ -11,19 +11,16 @@ # require 'spec_helper' -require 'whois/parsers/whois.nic.la.rb' -describe Whois::Parsers::WhoisNicLa, "property_status_single.expected" do +describe "whois.nic.la", :aggregate_failures do subject do file = fixture("responses", "whois.nic.la/la/property_status_single.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.nic.la") + Whois::Parser.parser_for(part) end - describe "#status" do - it do - expect(subject.status).to eq(["OK"]) - end + it "matches property_status_single.expected" do + expect(subject.status).to eq(["OK"]) end end diff --git a/spec/whois/parsers/responses/whois.nic.la/la/status_available_spec.rb b/spec/whois/parsers/responses/whois.nic.la/la/status_available_spec.rb index 568f15a2..9ffd3e72 100644 --- a/spec/whois/parsers/responses/whois.nic.la/la/status_available_spec.rb +++ b/spec/whois/parsers/responses/whois.nic.la/la/status_available_spec.rb @@ -11,88 +11,33 @@ # require 'spec_helper' -require 'whois/parsers/whois.nic.la.rb' -describe Whois::Parsers::WhoisNicLa, "status_available.expected" do +describe "whois.nic.la", :aggregate_failures do subject do file = fixture("responses", "whois.nic.la/la/status_available.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.nic.la") + Whois::Parser.parser_for(part) end - describe "#disclaimer" do - it do - expect(subject.disclaimer).to eq(nil) - end - end - describe "#domain" do - it do - expect(subject.domain).to eq(nil) - end - end - describe "#domain_id" do - it do - expect(subject.domain_id).to eq(nil) - end - end - describe "#status" do - it do - expect(subject.status).to eq([]) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(true) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(false) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to eq(nil) - end - end - describe "#updated_on" do - it do - expect(subject.updated_on).to eq(nil) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to eq(nil) - end - end - describe "#registrar" do - it do - expect(subject.registrar).to eq(nil) - end - end - describe "#registrant_contacts" do - it do - expect(subject.registrant_contacts).to be_a(Array) - expect(subject.registrant_contacts).to eq([]) - end - end - describe "#admin_contacts" do - it do - expect(subject.admin_contacts).to be_a(Array) - expect(subject.admin_contacts).to eq([]) - end - end - describe "#technical_contacts" do - it do - expect(subject.technical_contacts).to be_a(Array) - expect(subject.technical_contacts).to eq([]) - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers).to eq([]) - end + it "matches status_available.expected" do + expect(subject.disclaimer).to eq(nil) + expect(subject.domain).to eq(nil) + expect(subject.domain_id).to eq(nil) + expect(subject.status).to eq([]) + expect(subject.available?).to eq(true) + expect(subject.registered?).to eq(false) + expect(subject.created_on).to eq(nil) + expect(subject.updated_on).to eq(nil) + expect(subject.expires_on).to eq(nil) + expect(subject.registrar).to eq(nil) + expect(subject.registrant_contacts).to be_a(Array) + expect(subject.registrant_contacts).to eq([]) + expect(subject.admin_contacts).to be_a(Array) + expect(subject.admin_contacts).to eq([]) + expect(subject.technical_contacts).to be_a(Array) + expect(subject.technical_contacts).to eq([]) + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers).to eq([]) end end diff --git a/spec/whois/parsers/responses/whois.nic.la/la/status_registered_spec.rb b/spec/whois/parsers/responses/whois.nic.la/la/status_registered_spec.rb index 9dbef1c5..cd44236c 100644 --- a/spec/whois/parsers/responses/whois.nic.la/la/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.nic.la/la/status_registered_spec.rb @@ -11,144 +11,89 @@ # require 'spec_helper' -require 'whois/parsers/whois.nic.la.rb' -describe Whois::Parsers::WhoisNicLa, "status_registered.expected" do +describe "whois.nic.la", :aggregate_failures do subject do file = fixture("responses", "whois.nic.la/la/status_registered.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.nic.la") + Whois::Parser.parser_for(part) end - describe "#disclaimer" do - it do - expect(subject.disclaimer).to eq("This whois service is provided by CentralNic Ltd and only contains information pertaining to Internet domain names we have registered for our customers. By using this service you are agreeing (1) not to use any information presented here for any purpose other than determining ownership of domain names, (2) not to store or reproduce this data in any way, (3) not to use any high-volume, automated, electronic processes to obtain data from this service. Abuse of this service is monitored and actions in contravention of these terms will result in being permanently blacklisted. All data is (c) CentralNic Ltd https://www.centralnic.com/") - end - end - describe "#domain" do - it do - expect(subject.domain).to eq("google.la") - end - end - describe "#domain_id" do - it do - expect(subject.domain_id).to eq("CNIC-DO471480") - end - end - describe "#status" do - it do - expect(subject.status).to eq(["clientTransferProhibited", "serverTransferProhibited"]) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(false) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(true) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to be_a(Time) - expect(subject.created_on).to eq(DateTime.parse("2002-07-18 01:00:00 UTC")) - end - end - describe "#updated_on" do - it do - expect(subject.updated_on).to be_a(Time) - expect(subject.updated_on).to eq(DateTime.parse("2013-08-01 15:09:21 UTC")) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to be_a(Time) - expect(subject.expires_on).to eq(DateTime.parse("2014-07-18 23:59:59 UTC")) - end - end - describe "#registrar" do - it do - expect(subject.registrar).to be_a(Whois::Parser::Registrar) - expect(subject.registrar.id).to eq("H2948863") - expect(subject.registrar.name).to eq("TLD Registrar Solutions Ltd") - expect(subject.registrar.url).to eq("www.tldregistrarsolutions.com") - end - end - describe "#registrant_contacts" do - it do - expect(subject.registrant_contacts).to be_a(Array) - expect(subject.registrant_contacts.size).to eq(1) - expect(subject.registrant_contacts[0]).to be_a(Whois::Parser::Contact) - expect(subject.registrant_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_REGISTRANT) - expect(subject.registrant_contacts[0].id).to eq("ndn-96955") - expect(subject.registrant_contacts[0].name).to eq("Google Inc") - expect(subject.registrant_contacts[0].organization).to eq("Google Inc") - expect(subject.registrant_contacts[0].address).to eq("1600 Amphitheatre Parkway") - expect(subject.registrant_contacts[0].city).to eq("Mountain View") - expect(subject.registrant_contacts[0].zip).to eq("94043") - expect(subject.registrant_contacts[0].state).to eq("Ca") - expect(subject.registrant_contacts[0].country).to eq(nil) - expect(subject.registrant_contacts[0].country_code).to eq("US") - expect(subject.registrant_contacts[0].phone).to eq("+1.6502530000") - expect(subject.registrant_contacts[0].fax).to eq("+1.65067188571") - expect(subject.registrant_contacts[0].email).to eq("dns-admin@google.com") - end - end - describe "#admin_contacts" do - it do - expect(subject.admin_contacts).to be_a(Array) - expect(subject.admin_contacts.size).to eq(1) - expect(subject.admin_contacts[0]).to be_a(Whois::Parser::Contact) - expect(subject.admin_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_ADMINISTRATIVE) - expect(subject.admin_contacts[0].id).to eq("ndn-96955") - expect(subject.admin_contacts[0].name).to eq("Google Inc") - expect(subject.admin_contacts[0].organization).to eq("Google Inc") - expect(subject.admin_contacts[0].address).to eq("1600 Amphitheatre Parkway") - expect(subject.admin_contacts[0].city).to eq("Mountain View") - expect(subject.admin_contacts[0].zip).to eq("94043") - expect(subject.admin_contacts[0].state).to eq("Ca") - expect(subject.admin_contacts[0].country).to eq(nil) - expect(subject.admin_contacts[0].country_code).to eq("US") - expect(subject.admin_contacts[0].phone).to eq("+1.6502530000") - expect(subject.admin_contacts[0].fax).to eq("+1.65067188571") - expect(subject.admin_contacts[0].email).to eq("dns-admin@google.com") - end - end - describe "#technical_contacts" do - it do - expect(subject.technical_contacts).to be_a(Array) - expect(subject.technical_contacts.size).to eq(1) - expect(subject.technical_contacts[0]).to be_a(Whois::Parser::Contact) - expect(subject.technical_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_TECHNICAL) - expect(subject.technical_contacts[0].id).to eq("ndn-96955") - expect(subject.technical_contacts[0].name).to eq("Google Inc") - expect(subject.technical_contacts[0].organization).to eq("Google Inc") - expect(subject.technical_contacts[0].address).to eq("1600 Amphitheatre Parkway") - expect(subject.technical_contacts[0].city).to eq("Mountain View") - expect(subject.technical_contacts[0].zip).to eq("94043") - expect(subject.technical_contacts[0].state).to eq("Ca") - expect(subject.technical_contacts[0].country).to eq(nil) - expect(subject.technical_contacts[0].country_code).to eq("US") - expect(subject.technical_contacts[0].phone).to eq("+1.6502530000") - expect(subject.technical_contacts[0].fax).to eq("+1.65067188571") - expect(subject.technical_contacts[0].email).to eq("dns-admin@google.com") - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers.size).to eq(4) - expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[0].name).to eq("ns1.google.com") - expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[1].name).to eq("ns2.google.com") - expect(subject.nameservers[2]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[2].name).to eq("ns3.google.com") - expect(subject.nameservers[3]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[3].name).to eq("ns4.google.com") - end + it "matches status_registered.expected" do + expect(subject.disclaimer).to eq("This whois service is provided by CentralNic Ltd and only contains information pertaining to Internet domain names we have registered for our customers. By using this service you are agreeing (1) not to use any information presented here for any purpose other than determining ownership of domain names, (2) not to store or reproduce this data in any way, (3) not to use any high-volume, automated, electronic processes to obtain data from this service. Abuse of this service is monitored and actions in contravention of these terms will result in being permanently blacklisted. All data is (c) CentralNic Ltd https://www.centralnic.com/") + expect(subject.domain).to eq("google.la") + expect(subject.domain_id).to eq("CNIC-DO471480") + expect(subject.status).to eq(["clientTransferProhibited", "serverTransferProhibited"]) + expect(subject.available?).to eq(false) + expect(subject.registered?).to eq(true) + expect(subject.created_on).to be_a(Time) + expect(subject.created_on).to eq(DateTime.parse("2002-07-18 01:00:00 UTC")) + expect(subject.updated_on).to be_a(Time) + expect(subject.updated_on).to eq(DateTime.parse("2013-08-01 15:09:21 UTC")) + expect(subject.expires_on).to be_a(Time) + expect(subject.expires_on).to eq(DateTime.parse("2014-07-18 23:59:59 UTC")) + expect(subject.registrar).to be_a(Whois::Parser::Registrar) + expect(subject.registrar.id).to eq("H2948863") + expect(subject.registrar.name).to eq("TLD Registrar Solutions Ltd") + expect(subject.registrar.url).to eq("www.tldregistrarsolutions.com") + expect(subject.registrant_contacts).to be_a(Array) + expect(subject.registrant_contacts.size).to eq(1) + expect(subject.registrant_contacts[0]).to be_a(Whois::Parser::Contact) + expect(subject.registrant_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_REGISTRANT) + expect(subject.registrant_contacts[0].id).to eq("ndn-96955") + expect(subject.registrant_contacts[0].name).to eq("Google Inc") + expect(subject.registrant_contacts[0].organization).to eq("Google Inc") + expect(subject.registrant_contacts[0].address).to eq("1600 Amphitheatre Parkway") + expect(subject.registrant_contacts[0].city).to eq("Mountain View") + expect(subject.registrant_contacts[0].zip).to eq("94043") + expect(subject.registrant_contacts[0].state).to eq("Ca") + expect(subject.registrant_contacts[0].country).to eq(nil) + expect(subject.registrant_contacts[0].country_code).to eq("US") + expect(subject.registrant_contacts[0].phone).to eq("+1.6502530000") + expect(subject.registrant_contacts[0].fax).to eq("+1.65067188571") + expect(subject.registrant_contacts[0].email).to eq("dns-admin@google.com") + expect(subject.admin_contacts).to be_a(Array) + expect(subject.admin_contacts.size).to eq(1) + expect(subject.admin_contacts[0]).to be_a(Whois::Parser::Contact) + expect(subject.admin_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_ADMINISTRATIVE) + expect(subject.admin_contacts[0].id).to eq("ndn-96955") + expect(subject.admin_contacts[0].name).to eq("Google Inc") + expect(subject.admin_contacts[0].organization).to eq("Google Inc") + expect(subject.admin_contacts[0].address).to eq("1600 Amphitheatre Parkway") + expect(subject.admin_contacts[0].city).to eq("Mountain View") + expect(subject.admin_contacts[0].zip).to eq("94043") + expect(subject.admin_contacts[0].state).to eq("Ca") + expect(subject.admin_contacts[0].country).to eq(nil) + expect(subject.admin_contacts[0].country_code).to eq("US") + expect(subject.admin_contacts[0].phone).to eq("+1.6502530000") + expect(subject.admin_contacts[0].fax).to eq("+1.65067188571") + expect(subject.admin_contacts[0].email).to eq("dns-admin@google.com") + expect(subject.technical_contacts).to be_a(Array) + expect(subject.technical_contacts.size).to eq(1) + expect(subject.technical_contacts[0]).to be_a(Whois::Parser::Contact) + expect(subject.technical_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_TECHNICAL) + expect(subject.technical_contacts[0].id).to eq("ndn-96955") + expect(subject.technical_contacts[0].name).to eq("Google Inc") + expect(subject.technical_contacts[0].organization).to eq("Google Inc") + expect(subject.technical_contacts[0].address).to eq("1600 Amphitheatre Parkway") + expect(subject.technical_contacts[0].city).to eq("Mountain View") + expect(subject.technical_contacts[0].zip).to eq("94043") + expect(subject.technical_contacts[0].state).to eq("Ca") + expect(subject.technical_contacts[0].country).to eq(nil) + expect(subject.technical_contacts[0].country_code).to eq("US") + expect(subject.technical_contacts[0].phone).to eq("+1.6502530000") + expect(subject.technical_contacts[0].fax).to eq("+1.65067188571") + expect(subject.technical_contacts[0].email).to eq("dns-admin@google.com") + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers.size).to eq(4) + expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[0].name).to eq("ns1.google.com") + expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[1].name).to eq("ns2.google.com") + expect(subject.nameservers[2]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[2].name).to eq("ns3.google.com") + expect(subject.nameservers[3]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[3].name).to eq("ns4.google.com") end end diff --git a/spec/whois/parsers/responses/whois.nic.li/li/status_available_spec.rb b/spec/whois/parsers/responses/whois.nic.li/li/status_available_spec.rb index 1aeaa8c6..4bd93b0a 100644 --- a/spec/whois/parsers/responses/whois.nic.li/li/status_available_spec.rb +++ b/spec/whois/parsers/responses/whois.nic.li/li/status_available_spec.rb @@ -11,50 +11,23 @@ # require 'spec_helper' -require 'whois/parsers/whois.nic.li.rb' -describe Whois::Parsers::WhoisNicLi, "status_available.expected" do +describe "whois.nic.li", :aggregate_failures do subject do file = fixture("responses", "whois.nic.li/li/status_available.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.nic.li") + Whois::Parser.parser_for(part) end - describe "#status" do - it do - expect(subject.status).to eq(:available) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(true) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(false) - end - end - describe "#created_on" do - it do - expect { subject.created_on }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#updated_on" do - it do - expect { subject.updated_on }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#expires_on" do - it do - expect { subject.expires_on }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers).to eq([]) - end + it "matches status_available.expected" do + expect(subject.status).to eq(:available) + expect(subject.available?).to eq(true) + expect(subject.registered?).to eq(false) + expect { subject.created_on }.to raise_error(Whois::AttributeNotSupported) + expect { subject.updated_on }.to raise_error(Whois::AttributeNotSupported) + expect { subject.expires_on }.to raise_error(Whois::AttributeNotSupported) + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers).to eq([]) end end diff --git a/spec/whois/parsers/responses/whois.nic.li/li/status_registered_spec.rb b/spec/whois/parsers/responses/whois.nic.li/li/status_registered_spec.rb index c26dd207..e9be0575 100644 --- a/spec/whois/parsers/responses/whois.nic.li/li/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.nic.li/li/status_registered_spec.rb @@ -11,58 +11,31 @@ # require 'spec_helper' -require 'whois/parsers/whois.nic.li.rb' -describe Whois::Parsers::WhoisNicLi, "status_registered.expected" do +describe "whois.nic.li", :aggregate_failures do subject do file = fixture("responses", "whois.nic.li/li/status_registered.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.nic.li") + Whois::Parser.parser_for(part) end - describe "#status" do - it do - expect(subject.status).to eq(:registered) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(false) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(true) - end - end - describe "#created_on" do - it do - expect { subject.created_on }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#updated_on" do - it do - expect { subject.updated_on }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#expires_on" do - it do - expect { subject.expires_on }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers.size).to eq(4) - expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[0].name).to eq("ns1.google.com") - expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[1].name).to eq("ns2.google.com") - expect(subject.nameservers[2]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[2].name).to eq("ns3.google.com") - expect(subject.nameservers[3]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[3].name).to eq("ns4.google.com") - end + it "matches status_registered.expected" do + expect(subject.status).to eq(:registered) + expect(subject.available?).to eq(false) + expect(subject.registered?).to eq(true) + expect { subject.created_on }.to raise_error(Whois::AttributeNotSupported) + expect { subject.updated_on }.to raise_error(Whois::AttributeNotSupported) + expect { subject.expires_on }.to raise_error(Whois::AttributeNotSupported) + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers.size).to eq(4) + expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[0].name).to eq("ns1.google.com") + expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[1].name).to eq("ns2.google.com") + expect(subject.nameservers[2]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[2].name).to eq("ns3.google.com") + expect(subject.nameservers[3]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[3].name).to eq("ns4.google.com") end end diff --git a/spec/whois/parsers/responses/whois.nic.lk/lk/property_created_on_null_spec.rb b/spec/whois/parsers/responses/whois.nic.lk/lk/property_created_on_null_spec.rb index f0eeaf3e..4a847052 100644 --- a/spec/whois/parsers/responses/whois.nic.lk/lk/property_created_on_null_spec.rb +++ b/spec/whois/parsers/responses/whois.nic.lk/lk/property_created_on_null_spec.rb @@ -11,19 +11,16 @@ # require 'spec_helper' -require 'whois/parsers/whois.nic.lk.rb' -describe Whois::Parsers::WhoisNicLk, "property_created_on_null.expected" do +describe "whois.nic.lk", :aggregate_failures do subject do file = fixture("responses", "whois.nic.lk/lk/property_created_on_null.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.nic.lk") + Whois::Parser.parser_for(part) end - describe "#created_on" do - it do - expect(subject.created_on).to eq(nil) - end + it "matches property_created_on_null.expected" do + expect(subject.created_on).to eq(nil) end end diff --git a/spec/whois/parsers/responses/whois.nic.lk/lk/property_updated_on_null_spec.rb b/spec/whois/parsers/responses/whois.nic.lk/lk/property_updated_on_null_spec.rb index bc9529cc..3b1c058d 100644 --- a/spec/whois/parsers/responses/whois.nic.lk/lk/property_updated_on_null_spec.rb +++ b/spec/whois/parsers/responses/whois.nic.lk/lk/property_updated_on_null_spec.rb @@ -11,19 +11,16 @@ # require 'spec_helper' -require 'whois/parsers/whois.nic.lk.rb' -describe Whois::Parsers::WhoisNicLk, "property_updated_on_null.expected" do +describe "whois.nic.lk", :aggregate_failures do subject do file = fixture("responses", "whois.nic.lk/lk/property_updated_on_null.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.nic.lk") + Whois::Parser.parser_for(part) end - describe "#updated_on" do - it do - expect(subject.updated_on).to eq(nil) - end + it "matches property_updated_on_null.expected" do + expect(subject.updated_on).to eq(nil) end end diff --git a/spec/whois/parsers/responses/whois.nic.lk/lk/status_available_spec.rb b/spec/whois/parsers/responses/whois.nic.lk/lk/status_available_spec.rb index 04737d69..70637022 100644 --- a/spec/whois/parsers/responses/whois.nic.lk/lk/status_available_spec.rb +++ b/spec/whois/parsers/responses/whois.nic.lk/lk/status_available_spec.rb @@ -11,86 +11,31 @@ # require 'spec_helper' -require 'whois/parsers/whois.nic.lk.rb' -describe Whois::Parsers::WhoisNicLk, "status_available.expected" do +describe "whois.nic.lk", :aggregate_failures do subject do file = fixture("responses", "whois.nic.lk/lk/status_available.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.nic.lk") + Whois::Parser.parser_for(part) end - describe "#disclaimer" do - it do - expect { subject.disclaimer }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#domain" do - it do - expect(subject.domain).to eq(nil) - end - end - describe "#domain_id" do - it do - expect { subject.domain_id }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#status" do - it do - expect(subject.status).to eq(:available) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(true) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(false) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to eq(nil) - end - end - describe "#updated_on" do - it do - expect(subject.updated_on).to eq(nil) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to eq(nil) - end - end - describe "#registrar" do - it do - expect { subject.registrar }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#registrant_contacts" do - it do - expect(subject.registrant_contacts).to be_a(Array) - expect(subject.registrant_contacts).to eq([]) - end - end - describe "#admin_contacts" do - it do - expect { subject.admin_contacts }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#technical_contacts" do - it do - expect { subject.technical_contacts }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers).to eq([]) - end + it "matches status_available.expected" do + expect { subject.disclaimer }.to raise_error(Whois::AttributeNotSupported) + expect(subject.domain).to eq(nil) + expect { subject.domain_id }.to raise_error(Whois::AttributeNotSupported) + expect(subject.status).to eq(:available) + expect(subject.available?).to eq(true) + expect(subject.registered?).to eq(false) + expect(subject.created_on).to eq(nil) + expect(subject.updated_on).to eq(nil) + expect(subject.expires_on).to eq(nil) + expect { subject.registrar }.to raise_error(Whois::AttributeNotSupported) + expect(subject.registrant_contacts).to be_a(Array) + expect(subject.registrant_contacts).to eq([]) + expect { subject.admin_contacts }.to raise_error(Whois::AttributeNotSupported) + expect { subject.technical_contacts }.to raise_error(Whois::AttributeNotSupported) + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers).to eq([]) end end diff --git a/spec/whois/parsers/responses/whois.nic.lk/lk/status_registered_spec.rb b/spec/whois/parsers/responses/whois.nic.lk/lk/status_registered_spec.rb index ba406671..ad23ffd0 100644 --- a/spec/whois/parsers/responses/whois.nic.lk/lk/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.nic.lk/lk/status_registered_spec.rb @@ -11,101 +11,46 @@ # require 'spec_helper' -require 'whois/parsers/whois.nic.lk.rb' -describe Whois::Parsers::WhoisNicLk, "status_registered.expected" do +describe "whois.nic.lk", :aggregate_failures do subject do file = fixture("responses", "whois.nic.lk/lk/status_registered.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.nic.lk") + Whois::Parser.parser_for(part) end - describe "#disclaimer" do - it do - expect { subject.disclaimer }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#domain" do - it do - expect(subject.domain).to eq("google.lk") - end - end - describe "#domain_id" do - it do - expect { subject.domain_id }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#status" do - it do - expect(subject.status).to eq(:registered) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(false) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(true) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to be_a(Time) - expect(subject.created_on).to eq(DateTime.parse("2003-04-01")) - end - end - describe "#updated_on" do - it do - expect(subject.updated_on).to be_a(Time) - expect(subject.updated_on).to eq(DateTime.parse("2013-03-09")) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to be_a(Time) - expect(subject.expires_on).to eq(DateTime.parse("2014-04-01")) - end - end - describe "#registrar" do - it do - expect { subject.registrar }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#registrant_contacts" do - it do - expect(subject.registrant_contacts).to be_a(Array) - expect(subject.registrant_contacts.size).to eq(1) - expect(subject.registrant_contacts[0]).to be_a(Whois::Parser::Contact) - expect(subject.registrant_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_REGISTRANT) - expect(subject.registrant_contacts[0].id).to eq(nil) - expect(subject.registrant_contacts[0].name).to eq("Google Inc.") - expect(subject.registrant_contacts[0].address).to eq(nil) - expect(subject.registrant_contacts[0].email).to eq(nil) - end - end - describe "#admin_contacts" do - it do - expect { subject.admin_contacts }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#technical_contacts" do - it do - expect { subject.technical_contacts }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers.size).to eq(2) - expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[0].name).to eq("ns1.google.com") - expect(subject.nameservers[0].ipv4).to eq(nil) - expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[1].name).to eq("ns2.google.com") - expect(subject.nameservers[1].ipv4).to eq(nil) - end + it "matches status_registered.expected" do + expect { subject.disclaimer }.to raise_error(Whois::AttributeNotSupported) + expect(subject.domain).to eq("google.lk") + expect { subject.domain_id }.to raise_error(Whois::AttributeNotSupported) + expect(subject.status).to eq(:registered) + expect(subject.available?).to eq(false) + expect(subject.registered?).to eq(true) + expect(subject.created_on).to be_a(Time) + expect(subject.created_on).to eq(DateTime.parse("2003-04-01")) + expect(subject.updated_on).to be_a(Time) + expect(subject.updated_on).to eq(DateTime.parse("2013-03-09")) + expect(subject.expires_on).to be_a(Time) + expect(subject.expires_on).to eq(DateTime.parse("2014-04-01")) + expect { subject.registrar }.to raise_error(Whois::AttributeNotSupported) + expect(subject.registrant_contacts).to be_a(Array) + expect(subject.registrant_contacts.size).to eq(1) + expect(subject.registrant_contacts[0]).to be_a(Whois::Parser::Contact) + expect(subject.registrant_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_REGISTRANT) + expect(subject.registrant_contacts[0].id).to eq(nil) + expect(subject.registrant_contacts[0].name).to eq("Google Inc.") + expect(subject.registrant_contacts[0].address).to eq(nil) + expect(subject.registrant_contacts[0].email).to eq(nil) + expect { subject.admin_contacts }.to raise_error(Whois::AttributeNotSupported) + expect { subject.technical_contacts }.to raise_error(Whois::AttributeNotSupported) + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers.size).to eq(2) + expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[0].name).to eq("ns1.google.com") + expect(subject.nameservers[0].ipv4).to eq(nil) + expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[1].name).to eq("ns2.google.com") + expect(subject.nameservers[1].ipv4).to eq(nil) end end diff --git a/spec/whois/parsers/responses/whois.nic.lv/lv/status_available_spec.rb b/spec/whois/parsers/responses/whois.nic.lv/lv/status_available_spec.rb index 370a8c15..501bc2a2 100644 --- a/spec/whois/parsers/responses/whois.nic.lv/lv/status_available_spec.rb +++ b/spec/whois/parsers/responses/whois.nic.lv/lv/status_available_spec.rb @@ -11,50 +11,23 @@ # require 'spec_helper' -require 'whois/parsers/whois.nic.lv.rb' -describe Whois::Parsers::WhoisNicLv, "status_available.expected" do +describe "whois.nic.lv", :aggregate_failures do subject do file = fixture("responses", "whois.nic.lv/lv/status_available.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.nic.lv") + Whois::Parser.parser_for(part) end - describe "#status" do - it do - expect(subject.status).to eq(:available) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(true) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(false) - end - end - describe "#created_on" do - it do - expect { subject.created_on }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#updated_on" do - it do - expect(subject.updated_on).to eq(nil) - end - end - describe "#expires_on" do - it do - expect { subject.expires_on }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers).to eq([]) - end + it "matches status_available.expected" do + expect(subject.status).to eq(:available) + expect(subject.available?).to eq(true) + expect(subject.registered?).to eq(false) + expect { subject.created_on }.to raise_error(Whois::AttributeNotSupported) + expect(subject.updated_on).to eq(nil) + expect { subject.expires_on }.to raise_error(Whois::AttributeNotSupported) + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers).to eq([]) end end diff --git a/spec/whois/parsers/responses/whois.nic.lv/lv/status_registered_spec.rb b/spec/whois/parsers/responses/whois.nic.lv/lv/status_registered_spec.rb index 96ff7a7e..605b91f3 100644 --- a/spec/whois/parsers/responses/whois.nic.lv/lv/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.nic.lv/lv/status_registered_spec.rb @@ -11,59 +11,32 @@ # require 'spec_helper' -require 'whois/parsers/whois.nic.lv.rb' -describe Whois::Parsers::WhoisNicLv, "status_registered.expected" do +describe "whois.nic.lv", :aggregate_failures do subject do file = fixture("responses", "whois.nic.lv/lv/status_registered.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.nic.lv") + Whois::Parser.parser_for(part) end - describe "#status" do - it do - expect(subject.status).to eq(:registered) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(false) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(true) - end - end - describe "#created_on" do - it do - expect { subject.created_on }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#updated_on" do - it do - expect(subject.updated_on).to be_a(Time) - expect(subject.updated_on).to eq(DateTime.parse("2013-07-08T19:35:53+03:00")) - end - end - describe "#expires_on" do - it do - expect { subject.expires_on }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers.size).to eq(4) - expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[0].name).to eq("ns1.google.com") - expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[1].name).to eq("ns2.google.com") - expect(subject.nameservers[2]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[2].name).to eq("ns3.google.com") - expect(subject.nameservers[3]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[3].name).to eq("ns4.google.com") - end + it "matches status_registered.expected" do + expect(subject.status).to eq(:registered) + expect(subject.available?).to eq(false) + expect(subject.registered?).to eq(true) + expect { subject.created_on }.to raise_error(Whois::AttributeNotSupported) + expect(subject.updated_on).to be_a(Time) + expect(subject.updated_on).to eq(DateTime.parse("2013-07-08T19:35:53+03:00")) + expect { subject.expires_on }.to raise_error(Whois::AttributeNotSupported) + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers.size).to eq(4) + expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[0].name).to eq("ns1.google.com") + expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[1].name).to eq("ns2.google.com") + expect(subject.nameservers[2]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[2].name).to eq("ns3.google.com") + expect(subject.nameservers[3]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[3].name).to eq("ns4.google.com") end end diff --git a/spec/whois/parsers/responses/whois.nic.ly/ly/status_available_spec.rb b/spec/whois/parsers/responses/whois.nic.ly/ly/status_available_spec.rb index c9aaa989..a41d92b6 100644 --- a/spec/whois/parsers/responses/whois.nic.ly/ly/status_available_spec.rb +++ b/spec/whois/parsers/responses/whois.nic.ly/ly/status_available_spec.rb @@ -11,50 +11,23 @@ # require 'spec_helper' -require 'whois/parsers/whois.nic.ly.rb' -describe Whois::Parsers::WhoisNicLy, "status_available.expected" do +describe "whois.nic.ly", :aggregate_failures do subject do file = fixture("responses", "whois.nic.ly/ly/status_available.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.nic.ly") + Whois::Parser.parser_for(part) end - describe "#status" do - it do - expect(subject.status).to eq(:available) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(true) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(false) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to eq(nil) - end - end - describe "#updated_on" do - it do - expect(subject.updated_on).to eq(nil) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to eq(nil) - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers).to eq([]) - end + it "matches status_available.expected" do + expect(subject.status).to eq(:available) + expect(subject.available?).to eq(true) + expect(subject.registered?).to eq(false) + expect(subject.created_on).to eq(nil) + expect(subject.updated_on).to eq(nil) + expect(subject.expires_on).to eq(nil) + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers).to eq([]) end end diff --git a/spec/whois/parsers/responses/whois.nic.ly/ly/status_registered_spec.rb b/spec/whois/parsers/responses/whois.nic.ly/ly/status_registered_spec.rb index df43ae97..20fa8369 100644 --- a/spec/whois/parsers/responses/whois.nic.ly/ly/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.nic.ly/ly/status_registered_spec.rb @@ -11,61 +11,34 @@ # require 'spec_helper' -require 'whois/parsers/whois.nic.ly.rb' -describe Whois::Parsers::WhoisNicLy, "status_registered.expected" do +describe "whois.nic.ly", :aggregate_failures do subject do file = fixture("responses", "whois.nic.ly/ly/status_registered.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.nic.ly") + Whois::Parser.parser_for(part) end - describe "#status" do - it do - expect(subject.status).to eq(:registered) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(false) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(true) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to be_a(Time) - expect(subject.created_on).to eq(DateTime.parse("2007-10-03 13:36:48")) - end - end - describe "#updated_on" do - it do - expect(subject.updated_on).to be_a(Time) - expect(subject.updated_on).to eq(DateTime.parse("2009-08-07 22:52:02")) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to be_a(Time) - expect(subject.expires_on).to eq(DateTime.parse("2010-10-03 13:36:48")) - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers.size).to eq(4) - expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[0].name).to eq("ns2.google.com") - expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[1].name).to eq("ns1.google.com") - expect(subject.nameservers[2]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[2].name).to eq("ns4.google.com") - expect(subject.nameservers[3]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[3].name).to eq("ns3.google.com") - end + it "matches status_registered.expected" do + expect(subject.status).to eq(:registered) + expect(subject.available?).to eq(false) + expect(subject.registered?).to eq(true) + expect(subject.created_on).to be_a(Time) + expect(subject.created_on).to eq(DateTime.parse("2007-10-03 13:36:48")) + expect(subject.updated_on).to be_a(Time) + expect(subject.updated_on).to eq(DateTime.parse("2009-08-07 22:52:02")) + expect(subject.expires_on).to be_a(Time) + expect(subject.expires_on).to eq(DateTime.parse("2010-10-03 13:36:48")) + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers.size).to eq(4) + expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[0].name).to eq("ns2.google.com") + expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[1].name).to eq("ns1.google.com") + expect(subject.nameservers[2]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[2].name).to eq("ns4.google.com") + expect(subject.nameservers[3]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[3].name).to eq("ns3.google.com") end end diff --git a/spec/whois/parsers/responses/whois.nic.md/md/status_available_spec.rb b/spec/whois/parsers/responses/whois.nic.md/md/status_available_spec.rb index 1e376c57..18c27cf2 100644 --- a/spec/whois/parsers/responses/whois.nic.md/md/status_available_spec.rb +++ b/spec/whois/parsers/responses/whois.nic.md/md/status_available_spec.rb @@ -11,86 +11,31 @@ # require 'spec_helper' -require 'whois/parsers/whois.nic.md.rb' -describe Whois::Parsers::WhoisNicMd, "status_available.expected" do +describe "whois.nic.md", :aggregate_failures do subject do file = fixture("responses", "whois.nic.md/md/status_available.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.nic.md") + Whois::Parser.parser_for(part) end - describe "#disclaimer" do - it do - expect { subject.disclaimer }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#domain" do - it do - expect(subject.domain).to eq(nil) - end - end - describe "#domain_id" do - it do - expect { subject.domain_id }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#status" do - it do - expect(subject.status).to eq(:available) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(true) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(false) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to eq(nil) - end - end - describe "#updated_on" do - it do - expect { subject.updated_on }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to eq(nil) - end - end - describe "#registrar" do - it do - expect { subject.registrar }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#registrant_contacts" do - it do - expect(subject.registrant_contacts).to be_a(Array) - expect(subject.registrant_contacts).to eq([]) - end - end - describe "#admin_contacts" do - it do - expect { subject.admin_contacts }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#technical_contacts" do - it do - expect { subject.technical_contacts }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers).to eq([]) - end + it "matches status_available.expected" do + expect { subject.disclaimer }.to raise_error(Whois::AttributeNotSupported) + expect(subject.domain).to eq(nil) + expect { subject.domain_id }.to raise_error(Whois::AttributeNotSupported) + expect(subject.status).to eq(:available) + expect(subject.available?).to eq(true) + expect(subject.registered?).to eq(false) + expect(subject.created_on).to eq(nil) + expect { subject.updated_on }.to raise_error(Whois::AttributeNotSupported) + expect(subject.expires_on).to eq(nil) + expect { subject.registrar }.to raise_error(Whois::AttributeNotSupported) + expect(subject.registrant_contacts).to be_a(Array) + expect(subject.registrant_contacts).to eq([]) + expect { subject.admin_contacts }.to raise_error(Whois::AttributeNotSupported) + expect { subject.technical_contacts }.to raise_error(Whois::AttributeNotSupported) + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers).to eq([]) end end diff --git a/spec/whois/parsers/responses/whois.nic.md/md/status_registered_spec.rb b/spec/whois/parsers/responses/whois.nic.md/md/status_registered_spec.rb index 2a57e801..afb22eb5 100644 --- a/spec/whois/parsers/responses/whois.nic.md/md/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.nic.md/md/status_registered_spec.rb @@ -11,98 +11,43 @@ # require 'spec_helper' -require 'whois/parsers/whois.nic.md.rb' -describe Whois::Parsers::WhoisNicMd, "status_registered.expected" do +describe "whois.nic.md", :aggregate_failures do subject do file = fixture("responses", "whois.nic.md/md/status_registered.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.nic.md") + Whois::Parser.parser_for(part) end - describe "#disclaimer" do - it do - expect { subject.disclaimer }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#domain" do - it do - expect(subject.domain).to eq("google.md") - end - end - describe "#domain_id" do - it do - expect { subject.domain_id }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#status" do - it do - expect(subject.status).to eq(:registered) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(false) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(true) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to be_a(Time) - expect(subject.created_on).to eq(DateTime.parse("2006-05-02")) - end - end - describe "#updated_on" do - it do - expect { subject.updated_on }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to be_a(Time) - expect(subject.expires_on).to eq(DateTime.parse("2014-05-02")) - end - end - describe "#registrar" do - it do - expect { subject.registrar }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#registrant_contacts" do - it do - expect(subject.registrant_contacts).to be_a(Array) - expect(subject.registrant_contacts.size).to eq(1) - expect(subject.registrant_contacts[0]).to be_a(Whois::Parser::Contact) - expect(subject.registrant_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_REGISTRANT) - expect(subject.registrant_contacts[0].id).to eq(nil) - expect(subject.registrant_contacts[0].name).to eq("Google Inc.") - end - end - describe "#admin_contacts" do - it do - expect { subject.admin_contacts }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#technical_contacts" do - it do - expect { subject.technical_contacts }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers.size).to eq(2) - expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[0].name).to eq("ns1.google.com") - expect(subject.nameservers[0].ipv4).to eq("216.239.32.10") - expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[1].name).to eq("ns2.google.com") - expect(subject.nameservers[1].ipv4).to eq("216.239.34.10") - end + it "matches status_registered.expected" do + expect { subject.disclaimer }.to raise_error(Whois::AttributeNotSupported) + expect(subject.domain).to eq("google.md") + expect { subject.domain_id }.to raise_error(Whois::AttributeNotSupported) + expect(subject.status).to eq(:registered) + expect(subject.available?).to eq(false) + expect(subject.registered?).to eq(true) + expect(subject.created_on).to be_a(Time) + expect(subject.created_on).to eq(DateTime.parse("2006-05-02")) + expect { subject.updated_on }.to raise_error(Whois::AttributeNotSupported) + expect(subject.expires_on).to be_a(Time) + expect(subject.expires_on).to eq(DateTime.parse("2014-05-02")) + expect { subject.registrar }.to raise_error(Whois::AttributeNotSupported) + expect(subject.registrant_contacts).to be_a(Array) + expect(subject.registrant_contacts.size).to eq(1) + expect(subject.registrant_contacts[0]).to be_a(Whois::Parser::Contact) + expect(subject.registrant_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_REGISTRANT) + expect(subject.registrant_contacts[0].id).to eq(nil) + expect(subject.registrant_contacts[0].name).to eq("Google Inc.") + expect { subject.admin_contacts }.to raise_error(Whois::AttributeNotSupported) + expect { subject.technical_contacts }.to raise_error(Whois::AttributeNotSupported) + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers.size).to eq(2) + expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[0].name).to eq("ns1.google.com") + expect(subject.nameservers[0].ipv4).to eq("216.239.32.10") + expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[1].name).to eq("ns2.google.com") + expect(subject.nameservers[1].ipv4).to eq("216.239.34.10") end end diff --git a/spec/whois/parsers/responses/whois.nic.me/me/property_nameservers_is_blank_spec.rb b/spec/whois/parsers/responses/whois.nic.me/me/property_nameservers_is_blank_spec.rb index 8b599731..bc6adbc6 100644 --- a/spec/whois/parsers/responses/whois.nic.me/me/property_nameservers_is_blank_spec.rb +++ b/spec/whois/parsers/responses/whois.nic.me/me/property_nameservers_is_blank_spec.rb @@ -11,20 +11,17 @@ # require 'spec_helper' -require 'whois/parsers/whois.nic.me.rb' -describe Whois::Parsers::WhoisNicMe, "property_nameservers_is_blank.expected" do +describe "whois.nic.me", :aggregate_failures do subject do file = fixture("responses", "whois.nic.me/me/property_nameservers_is_blank.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.nic.me") + Whois::Parser.parser_for(part) end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers).to eq([]) - end + it "matches property_nameservers_is_blank.expected" do + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers).to eq([]) end end diff --git a/spec/whois/parsers/responses/whois.nic.me/me/property_updated_on_is_blank_spec.rb b/spec/whois/parsers/responses/whois.nic.me/me/property_updated_on_is_blank_spec.rb index e646ec1c..7fff4cec 100644 --- a/spec/whois/parsers/responses/whois.nic.me/me/property_updated_on_is_blank_spec.rb +++ b/spec/whois/parsers/responses/whois.nic.me/me/property_updated_on_is_blank_spec.rb @@ -11,19 +11,16 @@ # require 'spec_helper' -require 'whois/parsers/whois.nic.me.rb' -describe Whois::Parsers::WhoisNicMe, "property_updated_on_is_blank.expected" do +describe "whois.nic.me", :aggregate_failures do subject do file = fixture("responses", "whois.nic.me/me/property_updated_on_is_blank.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.nic.me") + Whois::Parser.parser_for(part) end - describe "#updated_on" do - it do - expect(subject.updated_on).to be_nil - end + it "matches property_updated_on_is_blank.expected" do + expect(subject.updated_on).to be_nil end end diff --git a/spec/whois/parsers/responses/whois.nic.me/me/response_throttled_spec.rb b/spec/whois/parsers/responses/whois.nic.me/me/response_throttled_spec.rb index f1fc3296..d7d88782 100644 --- a/spec/whois/parsers/responses/whois.nic.me/me/response_throttled_spec.rb +++ b/spec/whois/parsers/responses/whois.nic.me/me/response_throttled_spec.rb @@ -11,19 +11,16 @@ # require 'spec_helper' -require 'whois/parsers/whois.nic.me.rb' -describe Whois::Parsers::WhoisNicMe, "response_throttled.expected" do +describe "whois.nic.me", :aggregate_failures do subject do file = fixture("responses", "whois.nic.me/me/response_throttled.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.nic.me") + Whois::Parser.parser_for(part) end - describe "#response_throttled?" do - it do - expect(subject.response_throttled?).to eq(true) - end + it "matches response_throttled.expected" do + expect(subject.response_throttled?).to eq(true) end end diff --git a/spec/whois/parsers/responses/whois.nic.me/me/status_available_spec.rb b/spec/whois/parsers/responses/whois.nic.me/me/status_available_spec.rb index f9dff9e6..a75dd470 100644 --- a/spec/whois/parsers/responses/whois.nic.me/me/status_available_spec.rb +++ b/spec/whois/parsers/responses/whois.nic.me/me/status_available_spec.rb @@ -11,88 +11,33 @@ # require 'spec_helper' -require 'whois/parsers/whois.nic.me.rb' -describe Whois::Parsers::WhoisNicMe, "status_available.expected" do +describe "whois.nic.me", :aggregate_failures do subject do file = fixture("responses", "whois.nic.me/me/status_available.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.nic.me") + Whois::Parser.parser_for(part) end - describe "#disclaimer" do - it do - expect(subject.disclaimer).to eq("Access to WHOIS information is provided to assist persons in determining the contents of a domain name registration record in the registry database. The data in this record is provided by The Registry Operator for informational purposes only, and accuracy is not guaranteed. 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. Registry Operator reserves the right to modify these terms at any time. By submitting this query, you agree to abide by this policy. The Registrar of Record identified in this output may have an RDDS service that can be queried for additional information on how to contact the Registrant, Admin, or Tech contact of the queried domain name.") - end - end - describe "#domain" do - it do - expect(subject.domain).to eq(nil) - end - end - describe "#domain_id" do - it do - expect(subject.domain_id).to eq(nil) - end - end - describe "#status" do - it do - expect(subject.status).to eq([]) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(true) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(false) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to eq(nil) - end - end - describe "#updated_on" do - it do - expect(subject.updated_on).to eq(nil) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to eq(nil) - end - end - describe "#registrar" do - it do - expect(subject.registrar).to eq(nil) - end - end - describe "#registrant_contacts" do - it do - expect(subject.registrant_contacts).to be_a(Array) - expect(subject.registrant_contacts).to eq([]) - end - end - describe "#admin_contacts" do - it do - expect(subject.admin_contacts).to be_a(Array) - expect(subject.admin_contacts).to eq([]) - end - end - describe "#technical_contacts" do - it do - expect(subject.technical_contacts).to be_a(Array) - expect(subject.technical_contacts).to eq([]) - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers).to eq([]) - end + it "matches status_available.expected" do + expect(subject.disclaimer).to eq("Access to WHOIS information is provided to assist persons in determining the contents of a domain name registration record in the registry database. The data in this record is provided by The Registry Operator for informational purposes only, and accuracy is not guaranteed. 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. Registry Operator reserves the right to modify these terms at any time. By submitting this query, you agree to abide by this policy. The Registrar of Record identified in this output may have an RDDS service that can be queried for additional information on how to contact the Registrant, Admin, or Tech contact of the queried domain name.") + expect(subject.domain).to eq(nil) + expect(subject.domain_id).to eq(nil) + expect(subject.status).to eq([]) + expect(subject.available?).to eq(true) + expect(subject.registered?).to eq(false) + expect(subject.created_on).to eq(nil) + expect(subject.updated_on).to eq(nil) + expect(subject.expires_on).to eq(nil) + expect(subject.registrar).to eq(nil) + expect(subject.registrant_contacts).to be_a(Array) + expect(subject.registrant_contacts).to eq([]) + expect(subject.admin_contacts).to be_a(Array) + expect(subject.admin_contacts).to eq([]) + expect(subject.technical_contacts).to be_a(Array) + expect(subject.technical_contacts).to eq([]) + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers).to eq([]) end end diff --git a/spec/whois/parsers/responses/whois.nic.me/me/status_registered_spec.rb b/spec/whois/parsers/responses/whois.nic.me/me/status_registered_spec.rb index dc26ec97..a4f454ed 100644 --- a/spec/whois/parsers/responses/whois.nic.me/me/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.nic.me/me/status_registered_spec.rb @@ -11,115 +11,60 @@ # require 'spec_helper' -require 'whois/parsers/whois.nic.me.rb' -describe Whois::Parsers::WhoisNicMe, "status_registered.expected" do +describe "whois.nic.me", :aggregate_failures do subject do file = fixture("responses", "whois.nic.me/me/status_registered.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.nic.me") + Whois::Parser.parser_for(part) end - describe "#disclaimer" do - it do - expect(subject.disclaimer).to eq("Access to WHOIS information is provided to assist persons in determining the contents of a domain name registration record in the registry database. The data in this record is provided by The Registry Operator for informational purposes only, and accuracy is not guaranteed. 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. Registry Operator reserves the right to modify these terms at any time. By submitting this query, you agree to abide by this policy. The Registrar of Record identified in this output may have an RDDS service that can be queried for additional information on how to contact the Registrant, Admin, or Tech contact of the queried domain name.") - end - end - describe "#domain" do - it do - expect(subject.domain).to eq("google.me") - end - end - describe "#domain_id" do - it do - expect(subject.domain_id).to eq("D108500000000011599-AGRS") - end - end - describe "#status" do - it do - expect(subject.status).to eq(["clientDeleteProhibited https://icann.org/epp#clientDeleteProhibited", "clientTransferProhibited https://icann.org/epp#clientTransferProhibited", "clientUpdateProhibited https://icann.org/epp#clientUpdateProhibited", "serverDeleteProhibited https://icann.org/epp#serverDeleteProhibited", "serverTransferProhibited https://icann.org/epp#serverTransferProhibited", "serverUpdateProhibited https://icann.org/epp#serverUpdateProhibited"]) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(false) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(true) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to be_a(Time) - expect(subject.created_on).to eq(DateTime.parse("2008-06-13 17:17:40 UTC")) - end - end - describe "#updated_on" do - it do - expect(subject.updated_on).to be_a(Time) - expect(subject.updated_on).to eq(DateTime.parse("2021-05-12 09:39:59 UTC")) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to be_a(Time) - expect(subject.expires_on).to eq(DateTime.parse("2022-06-13 17:17:40 UTC")) - end - end - describe "#registrar" do - it do - expect(subject.registrar).to be_a(Whois::Parser::Registrar) - expect(subject.registrar.id).to eq("292") - expect(subject.registrar.name).to eq("MarkMonitor Inc.") - expect(subject.registrar.url).to eq("http://www.markmonitor.com") - end - end - describe "#registrant_contacts" do - it do - expect(subject.registrant_contacts).to be_a(Array) - expect(subject.registrant_contacts.size).to eq(1) - expect(subject.registrant_contacts[0]).to be_a(Whois::Parser::Contact) - expect(subject.registrant_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_REGISTRANT) - expect(subject.registrant_contacts[0].id).to eq(nil) - expect(subject.registrant_contacts[0].name).to eq(nil) - expect(subject.registrant_contacts[0].organization).to eq("Google LLC") - expect(subject.registrant_contacts[0].address).to eq(nil) - expect(subject.registrant_contacts[0].city).to eq(nil) - expect(subject.registrant_contacts[0].zip).to eq(nil) - expect(subject.registrant_contacts[0].state).to eq("CA") - expect(subject.registrant_contacts[0].country_code).to eq("US") - expect(subject.registrant_contacts[0].phone).to eq(nil) - expect(subject.registrant_contacts[0].fax).to eq(nil) - expect(subject.registrant_contacts[0].email).to eq(nil) - end - end - describe "#admin_contacts" do - it do - expect(subject.admin_contacts).to be_a(Array) - expect(subject.admin_contacts.size).to eq(0) - end - end - describe "#technical_contacts" do - it do - expect(subject.technical_contacts).to be_a(Array) - expect(subject.technical_contacts.size).to eq(0) - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers.size).to eq(4) - expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[0].name).to eq("ns1.google.com") - expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[1].name).to eq("ns2.google.com") - expect(subject.nameservers[2]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[2].name).to eq("ns4.google.com") - expect(subject.nameservers[3]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[3].name).to eq("ns3.google.com") - end + it "matches status_registered.expected" do + expect(subject.disclaimer).to eq("Access to WHOIS information is provided to assist persons in determining the contents of a domain name registration record in the registry database. The data in this record is provided by The Registry Operator for informational purposes only, and accuracy is not guaranteed. 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. Registry Operator reserves the right to modify these terms at any time. By submitting this query, you agree to abide by this policy. The Registrar of Record identified in this output may have an RDDS service that can be queried for additional information on how to contact the Registrant, Admin, or Tech contact of the queried domain name.") + expect(subject.domain).to eq("google.me") + expect(subject.domain_id).to eq("D108500000000011599-AGRS") + expect(subject.status).to eq(["clientDeleteProhibited https://icann.org/epp#clientDeleteProhibited", "clientTransferProhibited https://icann.org/epp#clientTransferProhibited", "clientUpdateProhibited https://icann.org/epp#clientUpdateProhibited", "serverDeleteProhibited https://icann.org/epp#serverDeleteProhibited", "serverTransferProhibited https://icann.org/epp#serverTransferProhibited", "serverUpdateProhibited https://icann.org/epp#serverUpdateProhibited"]) + expect(subject.available?).to eq(false) + expect(subject.registered?).to eq(true) + expect(subject.created_on).to be_a(Time) + expect(subject.created_on).to eq(DateTime.parse("2008-06-13 17:17:40 UTC")) + expect(subject.updated_on).to be_a(Time) + expect(subject.updated_on).to eq(DateTime.parse("2021-05-12 09:39:59 UTC")) + expect(subject.expires_on).to be_a(Time) + expect(subject.expires_on).to eq(DateTime.parse("2022-06-13 17:17:40 UTC")) + expect(subject.registrar).to be_a(Whois::Parser::Registrar) + expect(subject.registrar.id).to eq("292") + expect(subject.registrar.name).to eq("MarkMonitor Inc.") + expect(subject.registrar.url).to eq("http://www.markmonitor.com") + expect(subject.registrant_contacts).to be_a(Array) + expect(subject.registrant_contacts.size).to eq(1) + expect(subject.registrant_contacts[0]).to be_a(Whois::Parser::Contact) + expect(subject.registrant_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_REGISTRANT) + expect(subject.registrant_contacts[0].id).to eq(nil) + expect(subject.registrant_contacts[0].name).to eq(nil) + expect(subject.registrant_contacts[0].organization).to eq("Google LLC") + expect(subject.registrant_contacts[0].address).to eq(nil) + expect(subject.registrant_contacts[0].city).to eq(nil) + expect(subject.registrant_contacts[0].zip).to eq(nil) + expect(subject.registrant_contacts[0].state).to eq("CA") + expect(subject.registrant_contacts[0].country_code).to eq("US") + expect(subject.registrant_contacts[0].phone).to eq(nil) + expect(subject.registrant_contacts[0].fax).to eq(nil) + expect(subject.registrant_contacts[0].email).to eq(nil) + expect(subject.admin_contacts).to be_a(Array) + expect(subject.admin_contacts.size).to eq(0) + expect(subject.technical_contacts).to be_a(Array) + expect(subject.technical_contacts.size).to eq(0) + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers.size).to eq(4) + expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[0].name).to eq("ns1.google.com") + expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[1].name).to eq("ns2.google.com") + expect(subject.nameservers[2]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[2].name).to eq("ns4.google.com") + expect(subject.nameservers[3]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[3].name).to eq("ns3.google.com") end end diff --git a/spec/whois/parsers/responses/whois.nic.mg/mg/status_available_spec.rb b/spec/whois/parsers/responses/whois.nic.mg/mg/status_available_spec.rb index cde3569e..9cb6ed80 100644 --- a/spec/whois/parsers/responses/whois.nic.mg/mg/status_available_spec.rb +++ b/spec/whois/parsers/responses/whois.nic.mg/mg/status_available_spec.rb @@ -11,65 +11,26 @@ # require 'spec_helper' -require 'whois/parsers/whois.nic.mg.rb' -describe Whois::Parsers::WhoisNicMg, "status_available.expected" do +describe "whois.nic.mg", :aggregate_failures do subject do file = fixture("responses", "whois.nic.mg/mg/status_available.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.nic.mg") + Whois::Parser.parser_for(part) end - describe "#domain" do - it do - expect(subject.domain).to eq("u34jedzcq.mg") - end - end - describe "#domain_id" do - it do - expect(subject.domain_id).to eq(nil) - end - end - describe "#status" do - it do - expect(subject.status).to eq(:available) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(true) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(false) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to eq(nil) - end - end - describe "#updated_on" do - it do - expect(subject.updated_on).to eq(nil) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to eq(nil) - end - end - describe "#registrar" do - it do - expect(subject.registrar).to eq(nil) - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers).to eq([]) - end + it "matches status_available.expected" do + expect(subject.domain).to eq("u34jedzcq.mg") + expect(subject.domain_id).to eq(nil) + expect(subject.status).to eq(:available) + expect(subject.available?).to eq(true) + expect(subject.registered?).to eq(false) + expect(subject.created_on).to eq(nil) + expect(subject.updated_on).to eq(nil) + expect(subject.expires_on).to eq(nil) + expect(subject.registrar).to eq(nil) + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers).to eq([]) end end diff --git a/spec/whois/parsers/responses/whois.nic.mg/mg/status_registered_spec.rb b/spec/whois/parsers/responses/whois.nic.mg/mg/status_registered_spec.rb index 8e39aa6f..794cc84f 100644 --- a/spec/whois/parsers/responses/whois.nic.mg/mg/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.nic.mg/mg/status_registered_spec.rb @@ -11,79 +11,40 @@ # require 'spec_helper' -require 'whois/parsers/whois.nic.mg.rb' -describe Whois::Parsers::WhoisNicMg, "status_registered.expected" do +describe "whois.nic.mg", :aggregate_failures do subject do file = fixture("responses", "whois.nic.mg/mg/status_registered.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.nic.mg") + Whois::Parser.parser_for(part) end - describe "#domain" do - it do - expect(subject.domain).to eq("google.mg") - end - end - describe "#domain_id" do - it do - expect(subject.domain_id).to eq("1915-nicmg") - end - end - describe "#status" do - it do - expect(subject.status).to eq(:registered) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(false) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(true) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to be_a(Time) - expect(subject.created_on).to eq(DateTime.parse("2009-06-18 08:38:20 UTC")) - end - end - describe "#updated_on" do - it do - expect(subject.updated_on).to be_a(Time) - expect(subject.updated_on).to eq(DateTime.parse("2013-10-29 15:13:49 UTC")) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to be_a(Time) - expect(subject.expires_on).to eq(DateTime.parse("2014-11-26 21:00:00 UTC")) - end - end - describe "#registrar" do - it do - expect(subject.registrar).to be_a(Whois::Parser::Registrar) - expect(subject.registrar.id).to eq(nil) - expect(subject.registrar.name).to eq("MarkMonitor") - expect(subject.registrar.url).to eq("http://www.markmonitor.com") - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers.size).to eq(4) - expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[0].name).to eq("ns1.google.com") - expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[1].name).to eq("ns2.google.com") - expect(subject.nameservers[2]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[2].name).to eq("ns3.google.com") - expect(subject.nameservers[3]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[3].name).to eq("ns4.google.com") - end + it "matches status_registered.expected" do + expect(subject.domain).to eq("google.mg") + expect(subject.domain_id).to eq("1915-nicmg") + expect(subject.status).to eq(:registered) + expect(subject.available?).to eq(false) + expect(subject.registered?).to eq(true) + expect(subject.created_on).to be_a(Time) + expect(subject.created_on).to eq(DateTime.parse("2009-06-18 08:38:20 UTC")) + expect(subject.updated_on).to be_a(Time) + expect(subject.updated_on).to eq(DateTime.parse("2013-10-29 15:13:49 UTC")) + expect(subject.expires_on).to be_a(Time) + expect(subject.expires_on).to eq(DateTime.parse("2014-11-26 21:00:00 UTC")) + expect(subject.registrar).to be_a(Whois::Parser::Registrar) + expect(subject.registrar.id).to eq(nil) + expect(subject.registrar.name).to eq("MarkMonitor") + expect(subject.registrar.url).to eq("http://www.markmonitor.com") + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers.size).to eq(4) + expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[0].name).to eq("ns1.google.com") + expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[1].name).to eq("ns2.google.com") + expect(subject.nameservers[2]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[2].name).to eq("ns3.google.com") + expect(subject.nameservers[3]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[3].name).to eq("ns4.google.com") end end diff --git a/spec/whois/parsers/responses/whois.nic.ms/ms/status_available_spec.rb b/spec/whois/parsers/responses/whois.nic.ms/ms/status_available_spec.rb index 3b1d48cd..8e17440c 100644 --- a/spec/whois/parsers/responses/whois.nic.ms/ms/status_available_spec.rb +++ b/spec/whois/parsers/responses/whois.nic.ms/ms/status_available_spec.rb @@ -11,65 +11,26 @@ # require 'spec_helper' -require 'whois/parsers/whois.nic.ms.rb' -describe Whois::Parsers::WhoisNicMs, "status_available.expected" do +describe "whois.nic.ms", :aggregate_failures do subject do file = fixture("responses", "whois.nic.ms/ms/status_available.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.nic.ms") + Whois::Parser.parser_for(part) end - describe "#domain" do - it do - expect(subject.domain).to eq("u34jedzcq.ms") - end - end - describe "#domain_id" do - it do - expect(subject.domain_id).to eq(nil) - end - end - describe "#status" do - it do - expect(subject.status).to eq(:available) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(true) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(false) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to eq(nil) - end - end - describe "#updated_on" do - it do - expect(subject.updated_on).to eq(nil) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to eq(nil) - end - end - describe "#registrar" do - it do - expect(subject.registrar).to eq(nil) - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers).to eq([]) - end + it "matches status_available.expected" do + expect(subject.domain).to eq("u34jedzcq.ms") + expect(subject.domain_id).to eq(nil) + expect(subject.status).to eq(:available) + expect(subject.available?).to eq(true) + expect(subject.registered?).to eq(false) + expect(subject.created_on).to eq(nil) + expect(subject.updated_on).to eq(nil) + expect(subject.expires_on).to eq(nil) + expect(subject.registrar).to eq(nil) + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers).to eq([]) end end diff --git a/spec/whois/parsers/responses/whois.nic.ms/ms/status_registered_spec.rb b/spec/whois/parsers/responses/whois.nic.ms/ms/status_registered_spec.rb index 8cca36c1..f32e1818 100644 --- a/spec/whois/parsers/responses/whois.nic.ms/ms/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.nic.ms/ms/status_registered_spec.rb @@ -11,75 +11,36 @@ # require 'spec_helper' -require 'whois/parsers/whois.nic.ms.rb' -describe Whois::Parsers::WhoisNicMs, "status_registered.expected" do +describe "whois.nic.ms", :aggregate_failures do subject do file = fixture("responses", "whois.nic.ms/ms/status_registered.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.nic.ms") + Whois::Parser.parser_for(part) end - describe "#domain" do - it do - expect(subject.domain).to eq("google.ms") - end - end - describe "#domain_id" do - it do - expect(subject.domain_id).to eq("23725-CoCCA") - end - end - describe "#status" do - it do - expect(subject.status).to eq(:registered) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(false) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(true) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to be_a(Time) - expect(subject.created_on).to eq(DateTime.parse("1999-06-04 12:00:00 UTC")) - end - end - describe "#updated_on" do - it do - expect(subject.updated_on).to be_a(Time) - expect(subject.updated_on).to eq(DateTime.parse("2013-12-06 08:14:24 UTC")) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to be_a(Time) - expect(subject.expires_on).to eq(DateTime.parse("2014-06-04 12:00:00 UTC")) - end - end - describe "#registrar" do - it do - expect(subject.registrar).to be_a(Whois::Parser::Registrar) - expect(subject.registrar.id).to eq(nil) - expect(subject.registrar.name).to eq("MarkMonitor") - expect(subject.registrar.url).to eq("http://www.markmonitor.com") - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers.size).to eq(2) - expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[0].name).to eq("ns1.google.com") - expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[1].name).to eq("ns2.google.com") - end + it "matches status_registered.expected" do + expect(subject.domain).to eq("google.ms") + expect(subject.domain_id).to eq("23725-CoCCA") + expect(subject.status).to eq(:registered) + expect(subject.available?).to eq(false) + expect(subject.registered?).to eq(true) + expect(subject.created_on).to be_a(Time) + expect(subject.created_on).to eq(DateTime.parse("1999-06-04 12:00:00 UTC")) + expect(subject.updated_on).to be_a(Time) + expect(subject.updated_on).to eq(DateTime.parse("2013-12-06 08:14:24 UTC")) + expect(subject.expires_on).to be_a(Time) + expect(subject.expires_on).to eq(DateTime.parse("2014-06-04 12:00:00 UTC")) + expect(subject.registrar).to be_a(Whois::Parser::Registrar) + expect(subject.registrar.id).to eq(nil) + expect(subject.registrar.name).to eq("MarkMonitor") + expect(subject.registrar.url).to eq("http://www.markmonitor.com") + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers.size).to eq(2) + expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[0].name).to eq("ns1.google.com") + expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[1].name).to eq("ns2.google.com") end end diff --git a/spec/whois/parsers/responses/whois.nic.mu/mu/status_available_spec.rb b/spec/whois/parsers/responses/whois.nic.mu/mu/status_available_spec.rb index 40b6e79e..46e62052 100644 --- a/spec/whois/parsers/responses/whois.nic.mu/mu/status_available_spec.rb +++ b/spec/whois/parsers/responses/whois.nic.mu/mu/status_available_spec.rb @@ -11,65 +11,26 @@ # require 'spec_helper' -require 'whois/parsers/whois.nic.mu.rb' -describe Whois::Parsers::WhoisNicMu, "status_available.expected" do +describe "whois.nic.mu", :aggregate_failures do subject do file = fixture("responses", "whois.nic.mu/mu/status_available.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.nic.mu") + Whois::Parser.parser_for(part) end - describe "#domain" do - it do - expect(subject.domain).to eq("u34jedzcq.mu") - end - end - describe "#domain_id" do - it do - expect(subject.domain_id).to eq(nil) - end - end - describe "#status" do - it do - expect(subject.status).to eq(:available) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(true) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(false) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to eq(nil) - end - end - describe "#updated_on" do - it do - expect(subject.updated_on).to eq(nil) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to eq(nil) - end - end - describe "#registrar" do - it do - expect(subject.registrar).to eq(nil) - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers).to eq([]) - end + it "matches status_available.expected" do + expect(subject.domain).to eq("u34jedzcq.mu") + expect(subject.domain_id).to eq(nil) + expect(subject.status).to eq(:available) + expect(subject.available?).to eq(true) + expect(subject.registered?).to eq(false) + expect(subject.created_on).to eq(nil) + expect(subject.updated_on).to eq(nil) + expect(subject.expires_on).to eq(nil) + expect(subject.registrar).to eq(nil) + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers).to eq([]) end end diff --git a/spec/whois/parsers/responses/whois.nic.mu/mu/status_registered_spec.rb b/spec/whois/parsers/responses/whois.nic.mu/mu/status_registered_spec.rb index eb9ef229..d54550ac 100644 --- a/spec/whois/parsers/responses/whois.nic.mu/mu/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.nic.mu/mu/status_registered_spec.rb @@ -11,79 +11,40 @@ # require 'spec_helper' -require 'whois/parsers/whois.nic.mu.rb' -describe Whois::Parsers::WhoisNicMu, "status_registered.expected" do +describe "whois.nic.mu", :aggregate_failures do subject do file = fixture("responses", "whois.nic.mu/mu/status_registered.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.nic.mu") + Whois::Parser.parser_for(part) end - describe "#domain" do - it do - expect(subject.domain).to eq("google.mu") - end - end - describe "#domain_id" do - it do - expect(subject.domain_id).to eq("70557-CoCCA") - end - end - describe "#status" do - it do - expect(subject.status).to eq(:registered) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(false) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(true) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to be_a(Time) - expect(subject.created_on).to eq(DateTime.parse("2000-12-20 13:00:00 UTC")) - end - end - describe "#updated_on" do - it do - expect(subject.updated_on).to be_a(Time) - expect(subject.updated_on).to eq(DateTime.parse("2013-11-17 10:20:08 UTC")) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to be_a(Time) - expect(subject.expires_on).to eq(DateTime.parse("2014-12-19 13:00:00 UTC")) - end - end - describe "#registrar" do - it do - expect(subject.registrar).to be_a(Whois::Parser::Registrar) - expect(subject.registrar.id).to eq(nil) - expect(subject.registrar.name).to eq("MarkMonitor") - expect(subject.registrar.url).to eq("http://www.markmonitor.com") - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers.size).to eq(4) - expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[0].name).to eq("ns1.google.com") - expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[1].name).to eq("ns2.google.com") - expect(subject.nameservers[2]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[2].name).to eq("ns3.google.com") - expect(subject.nameservers[3]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[3].name).to eq("ns4.google.com") - end + it "matches status_registered.expected" do + expect(subject.domain).to eq("google.mu") + expect(subject.domain_id).to eq("70557-CoCCA") + expect(subject.status).to eq(:registered) + expect(subject.available?).to eq(false) + expect(subject.registered?).to eq(true) + expect(subject.created_on).to be_a(Time) + expect(subject.created_on).to eq(DateTime.parse("2000-12-20 13:00:00 UTC")) + expect(subject.updated_on).to be_a(Time) + expect(subject.updated_on).to eq(DateTime.parse("2013-11-17 10:20:08 UTC")) + expect(subject.expires_on).to be_a(Time) + expect(subject.expires_on).to eq(DateTime.parse("2014-12-19 13:00:00 UTC")) + expect(subject.registrar).to be_a(Whois::Parser::Registrar) + expect(subject.registrar.id).to eq(nil) + expect(subject.registrar.name).to eq("MarkMonitor") + expect(subject.registrar.url).to eq("http://www.markmonitor.com") + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers.size).to eq(4) + expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[0].name).to eq("ns1.google.com") + expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[1].name).to eq("ns2.google.com") + expect(subject.nameservers[2]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[2].name).to eq("ns3.google.com") + expect(subject.nameservers[3]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[3].name).to eq("ns4.google.com") end end diff --git a/spec/whois/parsers/responses/whois.nic.mx/mx/property_nameservers_with_ip_spec.rb b/spec/whois/parsers/responses/whois.nic.mx/mx/property_nameservers_with_ip_spec.rb index 0dd87601..2e0fa20f 100644 --- a/spec/whois/parsers/responses/whois.nic.mx/mx/property_nameservers_with_ip_spec.rb +++ b/spec/whois/parsers/responses/whois.nic.mx/mx/property_nameservers_with_ip_spec.rb @@ -11,26 +11,23 @@ # require 'spec_helper' -require 'whois/parsers/whois.nic.mx.rb' -describe Whois::Parsers::WhoisNicMx, "property_nameservers_with_ip.expected" do +describe "whois.nic.mx", :aggregate_failures do subject do file = fixture("responses", "whois.nic.mx/mx/property_nameservers_with_ip.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.nic.mx") + Whois::Parser.parser_for(part) end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers.size).to eq(2) - expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[0].name).to eq("dns1.mpsnet.net.mx") - expect(subject.nameservers[0].ipv4).to eq("200.4.48.15") - expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[1].name).to eq("dns2.mpsnet.net.mx") - expect(subject.nameservers[1].ipv4).to eq("200.4.48.16") - end + it "matches property_nameservers_with_ip.expected" do + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers.size).to eq(2) + expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[0].name).to eq("dns1.mpsnet.net.mx") + expect(subject.nameservers[0].ipv4).to eq("200.4.48.15") + expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[1].name).to eq("dns2.mpsnet.net.mx") + expect(subject.nameservers[1].ipv4).to eq("200.4.48.16") end end diff --git a/spec/whois/parsers/responses/whois.nic.mx/mx/status_available_spec.rb b/spec/whois/parsers/responses/whois.nic.mx/mx/status_available_spec.rb index cf90da82..8105dee9 100644 --- a/spec/whois/parsers/responses/whois.nic.mx/mx/status_available_spec.rb +++ b/spec/whois/parsers/responses/whois.nic.mx/mx/status_available_spec.rb @@ -11,45 +11,22 @@ # require 'spec_helper' -require 'whois/parsers/whois.nic.mx.rb' -describe Whois::Parsers::WhoisNicMx, "status_available.expected" do +describe "whois.nic.mx", :aggregate_failures do subject do file = fixture("responses", "whois.nic.mx/mx/status_available.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.nic.mx") + Whois::Parser.parser_for(part) end - describe "#status" do - it do - expect(subject.status).to eq(:available) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(true) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(false) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to eq(nil) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to eq(nil) - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers).to eq([]) - end + it "matches status_available.expected" do + expect(subject.status).to eq(:available) + expect(subject.available?).to eq(true) + expect(subject.registered?).to eq(false) + expect(subject.created_on).to eq(nil) + expect(subject.expires_on).to eq(nil) + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers).to eq([]) end end diff --git a/spec/whois/parsers/responses/whois.nic.mx/mx/status_registered_spec.rb b/spec/whois/parsers/responses/whois.nic.mx/mx/status_registered_spec.rb index 9c1f17a6..9d989d91 100644 --- a/spec/whois/parsers/responses/whois.nic.mx/mx/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.nic.mx/mx/status_registered_spec.rb @@ -11,63 +11,40 @@ # require 'spec_helper' -require 'whois/parsers/whois.nic.mx.rb' -describe Whois::Parsers::WhoisNicMx, "status_registered.expected" do +describe "whois.nic.mx", :aggregate_failures do subject do file = fixture("responses", "whois.nic.mx/mx/status_registered.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.nic.mx") + Whois::Parser.parser_for(part) end - describe "#status" do - it do - expect(subject.status).to eq(:registered) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(false) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(true) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to be_a(Time) - expect(subject.created_on).to eq(DateTime.parse("2009-05-12")) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to be_a(Time) - expect(subject.expires_on).to eq(DateTime.parse("2016-05-11")) - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers.size).to eq(4) - expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[0].name).to eq("ns2.google.com") - expect(subject.nameservers[0].ipv4).to eq(nil) - expect(subject.nameservers[0].ipv6).to eq(nil) - expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[1].name).to eq("ns4.google.com") - expect(subject.nameservers[1].ipv4).to eq(nil) - expect(subject.nameservers[1].ipv6).to eq(nil) - expect(subject.nameservers[2]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[2].name).to eq("ns3.google.com") - expect(subject.nameservers[2].ipv4).to eq(nil) - expect(subject.nameservers[2].ipv6).to eq(nil) - expect(subject.nameservers[3]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[3].name).to eq("ns1.google.com") - expect(subject.nameservers[3].ipv4).to eq(nil) - expect(subject.nameservers[3].ipv6).to eq(nil) - end + it "matches status_registered.expected" do + expect(subject.status).to eq(:registered) + expect(subject.available?).to eq(false) + expect(subject.registered?).to eq(true) + expect(subject.created_on).to be_a(Time) + expect(subject.created_on).to eq(DateTime.parse("2009-05-12")) + expect(subject.expires_on).to be_a(Time) + expect(subject.expires_on).to eq(DateTime.parse("2016-05-11")) + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers.size).to eq(4) + expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[0].name).to eq("ns2.google.com") + expect(subject.nameservers[0].ipv4).to eq(nil) + expect(subject.nameservers[0].ipv6).to eq(nil) + expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[1].name).to eq("ns4.google.com") + expect(subject.nameservers[1].ipv4).to eq(nil) + expect(subject.nameservers[1].ipv6).to eq(nil) + expect(subject.nameservers[2]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[2].name).to eq("ns3.google.com") + expect(subject.nameservers[2].ipv4).to eq(nil) + expect(subject.nameservers[2].ipv6).to eq(nil) + expect(subject.nameservers[3]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[3].name).to eq("ns1.google.com") + expect(subject.nameservers[3].ipv4).to eq(nil) + expect(subject.nameservers[3].ipv6).to eq(nil) end end diff --git a/spec/whois/parsers/responses/whois.nic.name/name/status_available_spec.rb b/spec/whois/parsers/responses/whois.nic.name/name/status_available_spec.rb index 264c396e..1e6a69a8 100644 --- a/spec/whois/parsers/responses/whois.nic.name/name/status_available_spec.rb +++ b/spec/whois/parsers/responses/whois.nic.name/name/status_available_spec.rb @@ -11,50 +11,23 @@ # require 'spec_helper' -require 'whois/parsers/whois.nic.name.rb' -describe Whois::Parsers::WhoisNicName, "status_available.expected" do +describe "whois.nic.name", :aggregate_failures do subject do file = fixture("responses", "whois.nic.name/name/status_available.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.nic.name") + Whois::Parser.parser_for(part) end - describe "#status" do - it do - expect(subject.status).to eq([]) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(true) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(false) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to eq(nil) - end - end - describe "#updated_on" do - it do - expect(subject.updated_on).to eq(nil) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to eq(nil) - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers).to eq([]) - end + it "matches status_available.expected" do + expect(subject.status).to eq([]) + expect(subject.available?).to eq(true) + expect(subject.registered?).to eq(false) + expect(subject.created_on).to eq(nil) + expect(subject.updated_on).to eq(nil) + expect(subject.expires_on).to eq(nil) + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers).to eq([]) end end diff --git a/spec/whois/parsers/responses/whois.nic.name/name/status_registered_spec.rb b/spec/whois/parsers/responses/whois.nic.name/name/status_registered_spec.rb index 40e8240c..cd7b4113 100644 --- a/spec/whois/parsers/responses/whois.nic.name/name/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.nic.name/name/status_registered_spec.rb @@ -11,69 +11,42 @@ # require 'spec_helper' -require 'whois/parsers/whois.nic.name.rb' -describe Whois::Parsers::WhoisNicName, "status_registered.expected" do +describe "whois.nic.name", :aggregate_failures do subject do file = fixture("responses", "whois.nic.name/name/status_registered.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.nic.name") + Whois::Parser.parser_for(part) end - describe "#status" do - it do - expect(subject.status).to eq(["clientTransferProhibited"]) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(false) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(true) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to be_a(Time) - expect(subject.created_on).to eq(DateTime.parse("2006-04-19 12:22:08 UTC")) - end - end - describe "#updated_on" do - it do - expect(subject.updated_on).to be_a(Time) - expect(subject.updated_on).to eq(DateTime.parse("2013-11-30 18:51:55 UTC")) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to be_a(Time) - expect(subject.expires_on).to eq(DateTime.parse("2014-04-19 12:22:08 UTC")) - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers.size).to eq(4) - expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[0].name).to eq("ns1.dnsimple.com") - expect(subject.nameservers[0].ipv4).to eq(nil) - expect(subject.nameservers[0].ipv6).to eq(nil) - expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[1].name).to eq("ns2.dnsimple.com") - expect(subject.nameservers[1].ipv4).to eq(nil) - expect(subject.nameservers[1].ipv6).to eq(nil) - expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[2].name).to eq("ns3.dnsimple.com") - expect(subject.nameservers[2].ipv4).to eq(nil) - expect(subject.nameservers[2].ipv6).to eq(nil) - expect(subject.nameservers[3]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[3].name).to eq("ns4.dnsimple.com") - expect(subject.nameservers[3].ipv4).to eq(nil) - expect(subject.nameservers[3].ipv6).to eq(nil) - end + it "matches status_registered.expected" do + expect(subject.status).to eq(["clientTransferProhibited"]) + expect(subject.available?).to eq(false) + expect(subject.registered?).to eq(true) + expect(subject.created_on).to be_a(Time) + expect(subject.created_on).to eq(DateTime.parse("2006-04-19 12:22:08 UTC")) + expect(subject.updated_on).to be_a(Time) + expect(subject.updated_on).to eq(DateTime.parse("2013-11-30 18:51:55 UTC")) + expect(subject.expires_on).to be_a(Time) + expect(subject.expires_on).to eq(DateTime.parse("2014-04-19 12:22:08 UTC")) + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers.size).to eq(4) + expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[0].name).to eq("ns1.dnsimple.com") + expect(subject.nameservers[0].ipv4).to eq(nil) + expect(subject.nameservers[0].ipv6).to eq(nil) + expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[1].name).to eq("ns2.dnsimple.com") + expect(subject.nameservers[1].ipv4).to eq(nil) + expect(subject.nameservers[1].ipv6).to eq(nil) + expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[2].name).to eq("ns3.dnsimple.com") + expect(subject.nameservers[2].ipv4).to eq(nil) + expect(subject.nameservers[2].ipv6).to eq(nil) + expect(subject.nameservers[3]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[3].name).to eq("ns4.dnsimple.com") + expect(subject.nameservers[3].ipv4).to eq(nil) + expect(subject.nameservers[3].ipv6).to eq(nil) end end diff --git a/spec/whois/parsers/responses/whois.nic.net.ng/ng/property_status_available_spec.rb b/spec/whois/parsers/responses/whois.nic.net.ng/ng/property_status_available_spec.rb index 85d43d95..21397777 100644 --- a/spec/whois/parsers/responses/whois.nic.net.ng/ng/property_status_available_spec.rb +++ b/spec/whois/parsers/responses/whois.nic.net.ng/ng/property_status_available_spec.rb @@ -11,29 +11,18 @@ # require 'spec_helper' -require 'whois/parsers/whois.nic.net.ng.rb' -describe Whois::Parsers::WhoisNicNetNg, "property_status_available.expected" do +describe "whois.nic.net.ng", :aggregate_failures do subject do file = fixture("responses", "whois.nic.net.ng/ng/property_status_available.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.nic.net.ng") + Whois::Parser.parser_for(part) end - describe "#status" do - it do - expect(subject.status).to eq(:available) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(true) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(false) - end + it "matches property_status_available.expected" do + expect(subject.status).to eq(:available) + expect(subject.available?).to eq(true) + expect(subject.registered?).to eq(false) end end diff --git a/spec/whois/parsers/responses/whois.nic.net.ng/ng/property_status_ok_spec.rb b/spec/whois/parsers/responses/whois.nic.net.ng/ng/property_status_ok_spec.rb index f220b5cc..80f9fc0f 100644 --- a/spec/whois/parsers/responses/whois.nic.net.ng/ng/property_status_ok_spec.rb +++ b/spec/whois/parsers/responses/whois.nic.net.ng/ng/property_status_ok_spec.rb @@ -11,29 +11,18 @@ # require 'spec_helper' -require 'whois/parsers/whois.nic.net.ng.rb' -describe Whois::Parsers::WhoisNicNetNg, "property_status_ok.expected" do +describe "whois.nic.net.ng", :aggregate_failures do subject do file = fixture("responses", "whois.nic.net.ng/ng/property_status_ok.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.nic.net.ng") + Whois::Parser.parser_for(part) end - describe "#status" do - it do - expect(subject.status).to eq(:registered) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(false) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(true) - end + it "matches property_status_ok.expected" do + expect(subject.status).to eq(:registered) + expect(subject.available?).to eq(false) + expect(subject.registered?).to eq(true) end end diff --git a/spec/whois/parsers/responses/whois.nic.net.ng/ng/status_available_spec.rb b/spec/whois/parsers/responses/whois.nic.net.ng/ng/status_available_spec.rb index 84928ab0..bd316da4 100644 --- a/spec/whois/parsers/responses/whois.nic.net.ng/ng/status_available_spec.rb +++ b/spec/whois/parsers/responses/whois.nic.net.ng/ng/status_available_spec.rb @@ -11,65 +11,26 @@ # require 'spec_helper' -require 'whois/parsers/whois.nic.net.ng.rb' -describe Whois::Parsers::WhoisNicNetNg, "status_available.expected" do +describe "whois.nic.net.ng", :aggregate_failures do subject do file = fixture("responses", "whois.nic.net.ng/ng/status_available.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.nic.net.ng") + Whois::Parser.parser_for(part) end - describe "#domain" do - it do - expect(subject.domain).to eq("u34jedzcq.ng") - end - end - describe "#domain_id" do - it do - expect(subject.domain_id).to eq(nil) - end - end - describe "#status" do - it do - expect(subject.status).to eq(:available) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(true) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(false) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to eq(nil) - end - end - describe "#updated_on" do - it do - expect(subject.updated_on).to eq(nil) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to eq(nil) - end - end - describe "#registrar" do - it do - expect(subject.registrar).to eq(nil) - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers).to eq([]) - end + it "matches status_available.expected" do + expect(subject.domain).to eq("u34jedzcq.ng") + expect(subject.domain_id).to eq(nil) + expect(subject.status).to eq(:available) + expect(subject.available?).to eq(true) + expect(subject.registered?).to eq(false) + expect(subject.created_on).to eq(nil) + expect(subject.updated_on).to eq(nil) + expect(subject.expires_on).to eq(nil) + expect(subject.registrar).to eq(nil) + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers).to eq([]) end end diff --git a/spec/whois/parsers/responses/whois.nic.net.ng/ng/status_registered_spec.rb b/spec/whois/parsers/responses/whois.nic.net.ng/ng/status_registered_spec.rb index 5bb72878..bc03b177 100644 --- a/spec/whois/parsers/responses/whois.nic.net.ng/ng/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.nic.net.ng/ng/status_registered_spec.rb @@ -11,79 +11,40 @@ # require 'spec_helper' -require 'whois/parsers/whois.nic.net.ng.rb' -describe Whois::Parsers::WhoisNicNetNg, "status_registered.expected" do +describe "whois.nic.net.ng", :aggregate_failures do subject do file = fixture("responses", "whois.nic.net.ng/ng/status_registered.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.nic.net.ng") + Whois::Parser.parser_for(part) end - describe "#domain" do - it do - expect(subject.domain).to eq("nic.net.ng") - end - end - describe "#domain_id" do - it do - expect(subject.domain_id).to eq("6808-NIRA") - end - end - describe "#status" do - it do - expect(subject.status).to eq(:registered) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(false) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(true) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to be_a(Time) - expect(subject.created_on).to eq(DateTime.parse("2009-05-13 14:27:27 UTC")) - end - end - describe "#updated_on" do - it do - expect(subject.updated_on).to be_a(Time) - expect(subject.updated_on).to eq(DateTime.parse("2012-08-24 13:46:14 UTC")) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to be_a(Time) - expect(subject.expires_on).to eq(DateTime.parse("2020-07-30 23:00:00 UTC")) - end - end - describe "#registrar" do - it do - expect(subject.registrar).to be_a(Whois::Parser::Registrar) - expect(subject.registrar.id).to eq(nil) - expect(subject.registrar.name).to eq("nira") - expect(subject.registrar.url).to eq(nil) - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers.size).to eq(4) - expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[0].name).to eq("rns1.nic.net.ng") - expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[1].name).to eq("rns2.nic.net.ng") - expect(subject.nameservers[2]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[2].name).to eq("rns3.nic.net.ng") - expect(subject.nameservers[3]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[3].name).to eq("rns4.nic.net.ng") - end + it "matches status_registered.expected" do + expect(subject.domain).to eq("nic.net.ng") + expect(subject.domain_id).to eq("6808-NIRA") + expect(subject.status).to eq(:registered) + expect(subject.available?).to eq(false) + expect(subject.registered?).to eq(true) + expect(subject.created_on).to be_a(Time) + expect(subject.created_on).to eq(DateTime.parse("2009-05-13 14:27:27 UTC")) + expect(subject.updated_on).to be_a(Time) + expect(subject.updated_on).to eq(DateTime.parse("2012-08-24 13:46:14 UTC")) + expect(subject.expires_on).to be_a(Time) + expect(subject.expires_on).to eq(DateTime.parse("2020-07-30 23:00:00 UTC")) + expect(subject.registrar).to be_a(Whois::Parser::Registrar) + expect(subject.registrar.id).to eq(nil) + expect(subject.registrar.name).to eq("nira") + expect(subject.registrar.url).to eq(nil) + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers.size).to eq(4) + expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[0].name).to eq("rns1.nic.net.ng") + expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[1].name).to eq("rns2.nic.net.ng") + expect(subject.nameservers[2]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[2].name).to eq("rns3.nic.net.ng") + expect(subject.nameservers[3]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[3].name).to eq("rns4.nic.net.ng") end end diff --git a/spec/whois/parsers/responses/whois.nic.net.sa/sa/status_available_spec.rb b/spec/whois/parsers/responses/whois.nic.net.sa/sa/status_available_spec.rb index c8ed8543..c52bcf68 100644 --- a/spec/whois/parsers/responses/whois.nic.net.sa/sa/status_available_spec.rb +++ b/spec/whois/parsers/responses/whois.nic.net.sa/sa/status_available_spec.rb @@ -11,50 +11,23 @@ # require 'spec_helper' -require 'whois/parsers/whois.nic.net.sa.rb' -describe Whois::Parsers::WhoisNicNetSa, "status_available.expected" do +describe "whois.nic.net.sa", :aggregate_failures do subject do file = fixture("responses", "whois.nic.net.sa/sa/status_available.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.nic.net.sa") + Whois::Parser.parser_for(part) end - describe "#status" do - it do - expect(subject.status).to eq(:available) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(true) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(false) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to eq(nil) - end - end - describe "#updated_on" do - it do - expect(subject.updated_on).to eq(nil) - end - end - describe "#expires_on" do - it do - expect { subject.expires_on }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers).to eq([]) - end + it "matches status_available.expected" do + expect(subject.status).to eq(:available) + expect(subject.available?).to eq(true) + expect(subject.registered?).to eq(false) + expect(subject.created_on).to eq(nil) + expect(subject.updated_on).to eq(nil) + expect { subject.expires_on }.to raise_error(Whois::AttributeNotSupported) + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers).to eq([]) end end diff --git a/spec/whois/parsers/responses/whois.nic.net.sa/sa/status_registered_spec.rb b/spec/whois/parsers/responses/whois.nic.net.sa/sa/status_registered_spec.rb index 6b8b705b..f480c1e9 100644 --- a/spec/whois/parsers/responses/whois.nic.net.sa/sa/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.nic.net.sa/sa/status_registered_spec.rb @@ -11,60 +11,33 @@ # require 'spec_helper' -require 'whois/parsers/whois.nic.net.sa.rb' -describe Whois::Parsers::WhoisNicNetSa, "status_registered.expected" do +describe "whois.nic.net.sa", :aggregate_failures do subject do file = fixture("responses", "whois.nic.net.sa/sa/status_registered.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.nic.net.sa") + Whois::Parser.parser_for(part) end - describe "#status" do - it do - expect(subject.status).to eq(:registered) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(false) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(true) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to be_a(Time) - expect(subject.created_on).to eq(DateTime.parse("2000-09-11")) - end - end - describe "#updated_on" do - it do - expect(subject.updated_on).to be_a(Time) - expect(subject.updated_on).to eq(DateTime.parse("2000-09-11")) - end - end - describe "#expires_on" do - it do - expect { subject.expires_on }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers.size).to eq(2) - expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[0].name).to eq("ns1.peer1.net") - expect(subject.nameservers[0].ipv4).to eq(nil) - expect(subject.nameservers[0].ipv6).to eq(nil) - expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[1].name).to eq("ns2.peer1.net") - expect(subject.nameservers[1].ipv4).to eq(nil) - expect(subject.nameservers[1].ipv6).to eq(nil) - end + it "matches status_registered.expected" do + expect(subject.status).to eq(:registered) + expect(subject.available?).to eq(false) + expect(subject.registered?).to eq(true) + expect(subject.created_on).to be_a(Time) + expect(subject.created_on).to eq(DateTime.parse("2000-09-11")) + expect(subject.updated_on).to be_a(Time) + expect(subject.updated_on).to eq(DateTime.parse("2000-09-11")) + expect { subject.expires_on }.to raise_error(Whois::AttributeNotSupported) + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers.size).to eq(2) + expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[0].name).to eq("ns1.peer1.net") + expect(subject.nameservers[0].ipv4).to eq(nil) + expect(subject.nameservers[0].ipv6).to eq(nil) + expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[1].name).to eq("ns2.peer1.net") + expect(subject.nameservers[1].ipv4).to eq(nil) + expect(subject.nameservers[1].ipv6).to eq(nil) end end diff --git a/spec/whois/parsers/responses/whois.nic.net.sb/sb/property_status_available_spec.rb b/spec/whois/parsers/responses/whois.nic.net.sb/sb/property_status_available_spec.rb index 02d4efbf..3863bb9e 100644 --- a/spec/whois/parsers/responses/whois.nic.net.sb/sb/property_status_available_spec.rb +++ b/spec/whois/parsers/responses/whois.nic.net.sb/sb/property_status_available_spec.rb @@ -11,29 +11,18 @@ # require 'spec_helper' -require 'whois/parsers/whois.nic.net.sb.rb' -describe Whois::Parsers::WhoisNicNetSb, "property_status_available.expected" do +describe "whois.nic.net.sb", :aggregate_failures do subject do file = fixture("responses", "whois.nic.net.sb/sb/property_status_available.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.nic.net.sb") + Whois::Parser.parser_for(part) end - describe "#status" do - it do - expect(subject.status).to eq(:available) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(true) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(false) - end + it "matches property_status_available.expected" do + expect(subject.status).to eq(:available) + expect(subject.available?).to eq(true) + expect(subject.registered?).to eq(false) end end diff --git a/spec/whois/parsers/responses/whois.nic.net.sb/sb/property_status_ok_spec.rb b/spec/whois/parsers/responses/whois.nic.net.sb/sb/property_status_ok_spec.rb index bb6d74da..74a17c3c 100644 --- a/spec/whois/parsers/responses/whois.nic.net.sb/sb/property_status_ok_spec.rb +++ b/spec/whois/parsers/responses/whois.nic.net.sb/sb/property_status_ok_spec.rb @@ -11,29 +11,18 @@ # require 'spec_helper' -require 'whois/parsers/whois.nic.net.sb.rb' -describe Whois::Parsers::WhoisNicNetSb, "property_status_ok.expected" do +describe "whois.nic.net.sb", :aggregate_failures do subject do file = fixture("responses", "whois.nic.net.sb/sb/property_status_ok.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.nic.net.sb") + Whois::Parser.parser_for(part) end - describe "#status" do - it do - expect(subject.status).to eq(:registered) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(false) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(true) - end + it "matches property_status_ok.expected" do + expect(subject.status).to eq(:registered) + expect(subject.available?).to eq(false) + expect(subject.registered?).to eq(true) end end diff --git a/spec/whois/parsers/responses/whois.nic.net.sb/sb/status_available_spec.rb b/spec/whois/parsers/responses/whois.nic.net.sb/sb/status_available_spec.rb index 8252126a..770cf431 100644 --- a/spec/whois/parsers/responses/whois.nic.net.sb/sb/status_available_spec.rb +++ b/spec/whois/parsers/responses/whois.nic.net.sb/sb/status_available_spec.rb @@ -11,65 +11,26 @@ # require 'spec_helper' -require 'whois/parsers/whois.nic.net.sb.rb' -describe Whois::Parsers::WhoisNicNetSb, "status_available.expected" do +describe "whois.nic.net.sb", :aggregate_failures do subject do file = fixture("responses", "whois.nic.net.sb/sb/status_available.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.nic.net.sb") + Whois::Parser.parser_for(part) end - describe "#domain" do - it do - expect(subject.domain).to eq("u34jedzcq.sb") - end - end - describe "#domain_id" do - it do - expect(subject.domain_id).to eq(nil) - end - end - describe "#status" do - it do - expect(subject.status).to eq(:available) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(true) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(false) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to eq(nil) - end - end - describe "#updated_on" do - it do - expect(subject.updated_on).to eq(nil) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to eq(nil) - end - end - describe "#registrar" do - it do - expect(subject.registrar).to eq(nil) - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers).to eq([]) - end + it "matches status_available.expected" do + expect(subject.domain).to eq("u34jedzcq.sb") + expect(subject.domain_id).to eq(nil) + expect(subject.status).to eq(:available) + expect(subject.available?).to eq(true) + expect(subject.registered?).to eq(false) + expect(subject.created_on).to eq(nil) + expect(subject.updated_on).to eq(nil) + expect(subject.expires_on).to eq(nil) + expect(subject.registrar).to eq(nil) + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers).to eq([]) end end diff --git a/spec/whois/parsers/responses/whois.nic.net.sb/sb/status_registered_spec.rb b/spec/whois/parsers/responses/whois.nic.net.sb/sb/status_registered_spec.rb index 65ec0d1c..14b2117c 100644 --- a/spec/whois/parsers/responses/whois.nic.net.sb/sb/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.nic.net.sb/sb/status_registered_spec.rb @@ -11,75 +11,36 @@ # require 'spec_helper' -require 'whois/parsers/whois.nic.net.sb.rb' -describe Whois::Parsers::WhoisNicNetSb, "status_registered.expected" do +describe "whois.nic.net.sb", :aggregate_failures do subject do file = fixture("responses", "whois.nic.net.sb/sb/status_registered.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.nic.net.sb") + Whois::Parser.parser_for(part) end - describe "#domain" do - it do - expect(subject.domain).to eq("baidu.com.sb") - end - end - describe "#domain_id" do - it do - expect(subject.domain_id).to eq("404765-CoCCA") - end - end - describe "#status" do - it do - expect(subject.status).to eq(:registered) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(false) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(true) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to be_a(Time) - expect(subject.created_on).to eq(DateTime.parse("2010-03-27 04:29:19 UTC")) - end - end - describe "#updated_on" do - it do - expect(subject.updated_on).to be_a(Time) - expect(subject.updated_on).to eq(DateTime.parse("2012-02-26 05:08:41 UTC")) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to be_a(Time) - expect(subject.expires_on).to eq(DateTime.parse("2013-03-27 04:29:19 UTC")) - end - end - describe "#registrar" do - it do - expect(subject.registrar).to be_a(Whois::Parser::Registrar) - expect(subject.registrar.id).to eq(nil) - expect(subject.registrar.name).to eq("Key-Systems") - expect(subject.registrar.url).to eq("http://www.key-systems.net") - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers.size).to eq(2) - expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[0].name).to eq("f1g1ns1.dnspod.net") - expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[1].name).to eq("f1g1ns2.dnspod.net") - end + it "matches status_registered.expected" do + expect(subject.domain).to eq("baidu.com.sb") + expect(subject.domain_id).to eq("404765-CoCCA") + expect(subject.status).to eq(:registered) + expect(subject.available?).to eq(false) + expect(subject.registered?).to eq(true) + expect(subject.created_on).to be_a(Time) + expect(subject.created_on).to eq(DateTime.parse("2010-03-27 04:29:19 UTC")) + expect(subject.updated_on).to be_a(Time) + expect(subject.updated_on).to eq(DateTime.parse("2012-02-26 05:08:41 UTC")) + expect(subject.expires_on).to be_a(Time) + expect(subject.expires_on).to eq(DateTime.parse("2013-03-27 04:29:19 UTC")) + expect(subject.registrar).to be_a(Whois::Parser::Registrar) + expect(subject.registrar.id).to eq(nil) + expect(subject.registrar.name).to eq("Key-Systems") + expect(subject.registrar.url).to eq("http://www.key-systems.net") + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers.size).to eq(2) + expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[0].name).to eq("f1g1ns1.dnspod.net") + expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[1].name).to eq("f1g1ns2.dnspod.net") end end diff --git a/spec/whois/parsers/responses/whois.nic.nf/nf/status_available_spec.rb b/spec/whois/parsers/responses/whois.nic.nf/nf/status_available_spec.rb index 889ec52e..cbadc336 100644 --- a/spec/whois/parsers/responses/whois.nic.nf/nf/status_available_spec.rb +++ b/spec/whois/parsers/responses/whois.nic.nf/nf/status_available_spec.rb @@ -11,65 +11,26 @@ # require 'spec_helper' -require 'whois/parsers/whois.nic.nf.rb' -describe Whois::Parsers::WhoisNicNf, "status_available.expected" do +describe "whois.nic.nf", :aggregate_failures do subject do file = fixture("responses", "whois.nic.nf/nf/status_available.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.nic.nf") + Whois::Parser.parser_for(part) end - describe "#domain" do - it do - expect(subject.domain).to eq("u34jedzcq.nf") - end - end - describe "#domain_id" do - it do - expect(subject.domain_id).to eq(nil) - end - end - describe "#status" do - it do - expect(subject.status).to eq(:available) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(true) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(false) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to eq(nil) - end - end - describe "#updated_on" do - it do - expect(subject.updated_on).to eq(nil) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to eq(nil) - end - end - describe "#registrar" do - it do - expect(subject.registrar).to eq(nil) - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers).to eq([]) - end + it "matches status_available.expected" do + expect(subject.domain).to eq("u34jedzcq.nf") + expect(subject.domain_id).to eq(nil) + expect(subject.status).to eq(:available) + expect(subject.available?).to eq(true) + expect(subject.registered?).to eq(false) + expect(subject.created_on).to eq(nil) + expect(subject.updated_on).to eq(nil) + expect(subject.expires_on).to eq(nil) + expect(subject.registrar).to eq(nil) + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers).to eq([]) end end diff --git a/spec/whois/parsers/responses/whois.nic.nf/nf/status_registered_spec.rb b/spec/whois/parsers/responses/whois.nic.nf/nf/status_registered_spec.rb index 3606a5f9..4bf374ac 100644 --- a/spec/whois/parsers/responses/whois.nic.nf/nf/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.nic.nf/nf/status_registered_spec.rb @@ -11,79 +11,40 @@ # require 'spec_helper' -require 'whois/parsers/whois.nic.nf.rb' -describe Whois::Parsers::WhoisNicNf, "status_registered.expected" do +describe "whois.nic.nf", :aggregate_failures do subject do file = fixture("responses", "whois.nic.nf/nf/status_registered.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.nic.nf") + Whois::Parser.parser_for(part) end - describe "#domain" do - it do - expect(subject.domain).to eq("google.nf") - end - end - describe "#domain_id" do - it do - expect(subject.domain_id).to eq("26552-CoCCA") - end - end - describe "#status" do - it do - expect(subject.status).to eq(:registered) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(false) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(true) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to be_a(Time) - expect(subject.created_on).to eq(DateTime.parse("2005-11-27 11:00:00 UTC")) - end - end - describe "#updated_on" do - it do - expect(subject.updated_on).to be_a(Time) - expect(subject.updated_on).to eq(DateTime.parse("2013-12-06 07:35:49 UTC")) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to be_a(Time) - expect(subject.expires_on).to eq(DateTime.parse("2014-11-27 11:00:00 UTC")) - end - end - describe "#registrar" do - it do - expect(subject.registrar).to be_a(Whois::Parser::Registrar) - expect(subject.registrar.id).to eq(nil) - expect(subject.registrar.name).to eq("MarkMonitor") - expect(subject.registrar.url).to eq("http://www.markmonitor.com") - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers.size).to eq(4) - expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[0].name).to eq("ns1.google.com") - expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[1].name).to eq("ns2.google.com") - expect(subject.nameservers[2]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[2].name).to eq("ns3.google.com") - expect(subject.nameservers[3]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[3].name).to eq("ns4.google.com") - end + it "matches status_registered.expected" do + expect(subject.domain).to eq("google.nf") + expect(subject.domain_id).to eq("26552-CoCCA") + expect(subject.status).to eq(:registered) + expect(subject.available?).to eq(false) + expect(subject.registered?).to eq(true) + expect(subject.created_on).to be_a(Time) + expect(subject.created_on).to eq(DateTime.parse("2005-11-27 11:00:00 UTC")) + expect(subject.updated_on).to be_a(Time) + expect(subject.updated_on).to eq(DateTime.parse("2013-12-06 07:35:49 UTC")) + expect(subject.expires_on).to be_a(Time) + expect(subject.expires_on).to eq(DateTime.parse("2014-11-27 11:00:00 UTC")) + expect(subject.registrar).to be_a(Whois::Parser::Registrar) + expect(subject.registrar.id).to eq(nil) + expect(subject.registrar.name).to eq("MarkMonitor") + expect(subject.registrar.url).to eq("http://www.markmonitor.com") + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers.size).to eq(4) + expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[0].name).to eq("ns1.google.com") + expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[1].name).to eq("ns2.google.com") + expect(subject.nameservers[2]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[2].name).to eq("ns3.google.com") + expect(subject.nameservers[3]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[3].name).to eq("ns4.google.com") end end diff --git a/spec/whois/parsers/responses/whois.nic.org.uy/uy/property_updated_on_empty_spec.rb b/spec/whois/parsers/responses/whois.nic.org.uy/uy/property_updated_on_empty_spec.rb index 09a307fd..408b8cf3 100644 --- a/spec/whois/parsers/responses/whois.nic.org.uy/uy/property_updated_on_empty_spec.rb +++ b/spec/whois/parsers/responses/whois.nic.org.uy/uy/property_updated_on_empty_spec.rb @@ -11,19 +11,16 @@ # require 'spec_helper' -require 'whois/parsers/whois.nic.org.uy.rb' -describe Whois::Parsers::WhoisNicOrgUy, "property_updated_on_empty.expected" do +describe "whois.nic.org.uy", :aggregate_failures do subject do file = fixture("responses", "whois.nic.org.uy/uy/property_updated_on_empty.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.nic.org.uy") + Whois::Parser.parser_for(part) end - describe "#updated_on" do - it do - expect(subject.updated_on).to eq(nil) - end + it "matches property_updated_on_empty.expected" do + expect(subject.updated_on).to eq(nil) end end diff --git a/spec/whois/parsers/responses/whois.nic.org.uy/uy/status_available_spec.rb b/spec/whois/parsers/responses/whois.nic.org.uy/uy/status_available_spec.rb index b76a1cd6..563ef692 100644 --- a/spec/whois/parsers/responses/whois.nic.org.uy/uy/status_available_spec.rb +++ b/spec/whois/parsers/responses/whois.nic.org.uy/uy/status_available_spec.rb @@ -11,50 +11,23 @@ # require 'spec_helper' -require 'whois/parsers/whois.nic.org.uy.rb' -describe Whois::Parsers::WhoisNicOrgUy, "status_available.expected" do +describe "whois.nic.org.uy", :aggregate_failures do subject do file = fixture("responses", "whois.nic.org.uy/uy/status_available.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.nic.org.uy") + Whois::Parser.parser_for(part) end - describe "#status" do - it do - expect(subject.status).to eq(:available) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(true) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(false) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to eq(nil) - end - end - describe "#updated_on" do - it do - expect(subject.updated_on).to eq(nil) - end - end - describe "#expires_on" do - it do - expect { subject.expires_on }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers).to eq([]) - end + it "matches status_available.expected" do + expect(subject.status).to eq(:available) + expect(subject.available?).to eq(true) + expect(subject.registered?).to eq(false) + expect(subject.created_on).to eq(nil) + expect(subject.updated_on).to eq(nil) + expect { subject.expires_on }.to raise_error(Whois::AttributeNotSupported) + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers).to eq([]) end end diff --git a/spec/whois/parsers/responses/whois.nic.org.uy/uy/status_registered_spec.rb b/spec/whois/parsers/responses/whois.nic.org.uy/uy/status_registered_spec.rb index a5ec8e0e..dc05d616 100644 --- a/spec/whois/parsers/responses/whois.nic.org.uy/uy/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.nic.org.uy/uy/status_registered_spec.rb @@ -11,60 +11,33 @@ # require 'spec_helper' -require 'whois/parsers/whois.nic.org.uy.rb' -describe Whois::Parsers::WhoisNicOrgUy, "status_registered.expected" do +describe "whois.nic.org.uy", :aggregate_failures do subject do file = fixture("responses", "whois.nic.org.uy/uy/status_registered.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.nic.org.uy") + Whois::Parser.parser_for(part) end - describe "#status" do - it do - expect(subject.status).to eq(:registered) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(false) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(true) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to be_a(Time) - expect(subject.created_on).to eq(DateTime.parse("2012-07-03 20:58:58")) - end - end - describe "#updated_on" do - it do - expect(subject.updated_on).to be_a(Time) - expect(subject.updated_on).to eq(DateTime.parse("2012-09-12 02:32:59")) - end - end - describe "#expires_on" do - it do - expect { subject.expires_on }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers.size).to eq(2) - expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[0].name).to eq("ns1.markmonitor.com") - expect(subject.nameservers[0].ipv4).to eq(nil) - expect(subject.nameservers[0].ipv6).to eq(nil) - expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[1].name).to eq("ns3.markmonitor.com") - expect(subject.nameservers[1].ipv4).to eq(nil) - expect(subject.nameservers[1].ipv6).to eq(nil) - end + it "matches status_registered.expected" do + expect(subject.status).to eq(:registered) + expect(subject.available?).to eq(false) + expect(subject.registered?).to eq(true) + expect(subject.created_on).to be_a(Time) + expect(subject.created_on).to eq(DateTime.parse("2012-07-03 20:58:58")) + expect(subject.updated_on).to be_a(Time) + expect(subject.updated_on).to eq(DateTime.parse("2012-09-12 02:32:59")) + expect { subject.expires_on }.to raise_error(Whois::AttributeNotSupported) + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers.size).to eq(2) + expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[0].name).to eq("ns1.markmonitor.com") + expect(subject.nameservers[0].ipv4).to eq(nil) + expect(subject.nameservers[0].ipv6).to eq(nil) + expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[1].name).to eq("ns3.markmonitor.com") + expect(subject.nameservers[1].ipv4).to eq(nil) + expect(subject.nameservers[1].ipv6).to eq(nil) end end diff --git a/spec/whois/parsers/responses/whois.nic.pm/pm/property_nameservers_with_ipv4_and_ipv6_spec.rb b/spec/whois/parsers/responses/whois.nic.pm/pm/property_nameservers_with_ipv4_and_ipv6_spec.rb index e69c08da..7d34402e 100644 --- a/spec/whois/parsers/responses/whois.nic.pm/pm/property_nameservers_with_ipv4_and_ipv6_spec.rb +++ b/spec/whois/parsers/responses/whois.nic.pm/pm/property_nameservers_with_ipv4_and_ipv6_spec.rb @@ -11,32 +11,29 @@ # require 'spec_helper' -require 'whois/parsers/whois.nic.pm.rb' -describe Whois::Parsers::WhoisNicPm, "property_nameservers_with_ipv4_and_ipv6.expected" do +describe "whois.nic.pm", :aggregate_failures do subject do file = fixture("responses", "whois.nic.pm/pm/property_nameservers_with_ipv4_and_ipv6.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.nic.pm") + Whois::Parser.parser_for(part) end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers.size).to eq(3) - expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[0].name).to eq("ns1.nic.fr") - expect(subject.nameservers[0].ipv4).to eq("192.93.0.1") - expect(subject.nameservers[0].ipv6).to eq("2001:660:3005:1::1:1") - expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[1].name).to eq("ns2.nic.fr") - expect(subject.nameservers[1].ipv4).to eq("192.93.0.4") - expect(subject.nameservers[1].ipv6).to eq("2001:660:3005:1::1:2") - expect(subject.nameservers[2]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[2].name).to eq("ns3.nic.fr") - expect(subject.nameservers[2].ipv4).to eq("192.134.0.49") - expect(subject.nameservers[2].ipv6).to eq("2001:660:3006:1::1:1") - end + it "matches property_nameservers_with_ipv4_and_ipv6.expected" do + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers.size).to eq(3) + expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[0].name).to eq("ns1.nic.fr") + expect(subject.nameservers[0].ipv4).to eq("192.93.0.1") + expect(subject.nameservers[0].ipv6).to eq("2001:660:3005:1::1:1") + expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[1].name).to eq("ns2.nic.fr") + expect(subject.nameservers[1].ipv4).to eq("192.93.0.4") + expect(subject.nameservers[1].ipv6).to eq("2001:660:3005:1::1:2") + expect(subject.nameservers[2]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[2].name).to eq("ns3.nic.fr") + expect(subject.nameservers[2].ipv4).to eq("192.134.0.49") + expect(subject.nameservers[2].ipv6).to eq("2001:660:3006:1::1:1") end end diff --git a/spec/whois/parsers/responses/whois.nic.pm/pm/response_throttled_spec.rb b/spec/whois/parsers/responses/whois.nic.pm/pm/response_throttled_spec.rb index 400a69a1..ee535622 100644 --- a/spec/whois/parsers/responses/whois.nic.pm/pm/response_throttled_spec.rb +++ b/spec/whois/parsers/responses/whois.nic.pm/pm/response_throttled_spec.rb @@ -11,19 +11,16 @@ # require 'spec_helper' -require 'whois/parsers/whois.nic.pm.rb' -describe Whois::Parsers::WhoisNicPm, "response_throttled.expected" do +describe "whois.nic.pm", :aggregate_failures do subject do file = fixture("responses", "whois.nic.pm/pm/response_throttled.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.nic.pm") + Whois::Parser.parser_for(part) end - describe "#response_throttled?" do - it do - expect(subject.response_throttled?).to eq(true) - end + it "matches response_throttled.expected" do + expect(subject.response_throttled?).to eq(true) end end diff --git a/spec/whois/parsers/responses/whois.nic.pm/pm/status_available_spec.rb b/spec/whois/parsers/responses/whois.nic.pm/pm/status_available_spec.rb index 43bd039d..399bce8e 100644 --- a/spec/whois/parsers/responses/whois.nic.pm/pm/status_available_spec.rb +++ b/spec/whois/parsers/responses/whois.nic.pm/pm/status_available_spec.rb @@ -11,68 +11,29 @@ # require 'spec_helper' -require 'whois/parsers/whois.nic.pm.rb' -describe Whois::Parsers::WhoisNicPm, "status_available.expected" do +describe "whois.nic.pm", :aggregate_failures do subject do file = fixture("responses", "whois.nic.pm/pm/status_available.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.nic.pm") + Whois::Parser.parser_for(part) end - describe "#status" do - it do - expect(subject.status).to eq(:available) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(true) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(false) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to eq(nil) - end - end - describe "#updated_on" do - it do - expect(subject.updated_on).to eq(nil) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to eq(nil) - end - end - describe "#registrant_contacts" do - it do - expect(subject.registrant_contacts).to be_a(Array) - expect(subject.registrant_contacts).to eq([]) - end - end - describe "#admin_contacts" do - it do - expect(subject.admin_contacts).to be_a(Array) - expect(subject.admin_contacts).to eq([]) - end - end - describe "#technical_contacts" do - it do - expect(subject.technical_contacts).to be_a(Array) - expect(subject.technical_contacts).to eq([]) - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers).to eq([]) - end + it "matches status_available.expected" do + expect(subject.status).to eq(:available) + expect(subject.available?).to eq(true) + expect(subject.registered?).to eq(false) + expect(subject.created_on).to eq(nil) + expect(subject.updated_on).to eq(nil) + expect(subject.expires_on).to eq(nil) + expect(subject.registrant_contacts).to be_a(Array) + expect(subject.registrant_contacts).to eq([]) + expect(subject.admin_contacts).to be_a(Array) + expect(subject.admin_contacts).to eq([]) + expect(subject.technical_contacts).to be_a(Array) + expect(subject.technical_contacts).to eq([]) + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers).to eq([]) end end diff --git a/spec/whois/parsers/responses/whois.nic.pm/pm/status_registered_spec.rb b/spec/whois/parsers/responses/whois.nic.pm/pm/status_registered_spec.rb index c9534b0f..1957cd0a 100644 --- a/spec/whois/parsers/responses/whois.nic.pm/pm/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.nic.pm/pm/status_registered_spec.rb @@ -11,122 +11,83 @@ # require 'spec_helper' -require 'whois/parsers/whois.nic.pm.rb' -describe Whois::Parsers::WhoisNicPm, "status_registered.expected" do +describe "whois.nic.pm", :aggregate_failures do subject do file = fixture("responses", "whois.nic.pm/pm/status_registered.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.nic.pm") + Whois::Parser.parser_for(part) end - describe "#status" do - it do - expect(subject.status).to eq(:registered) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(false) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(true) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to be_a(Time) - expect(subject.created_on).to eq(DateTime.parse("1994-12-31 23:00:00 UTC")) - end - end - describe "#updated_on" do - it do - expect(subject.updated_on).to be_a(Time) - expect(subject.updated_on).to eq(DateTime.parse("2018-12-31 23:33:19 UTC")) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to be_a(Time) - expect(subject.expires_on).to eq(DateTime.parse("2019-12-31 23:00:00 UTC")) - end - end - describe "#registrant_contacts" do - it do - expect(subject.registrant_contacts).to be_a(Array) - expect(subject.registrant_contacts.size).to eq(1) - expect(subject.registrant_contacts[0]).to be_a(Whois::Parser::Contact) - expect(subject.registrant_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_REGISTRANT) - expect(subject.registrant_contacts[0].id).to eq("APEM2-FRNIC") - expect(subject.registrant_contacts[0].name).to eq(nil) - expect(subject.registrant_contacts[0].organization).to eq("Afnic (Saint-Pierre et Miquelon - CTOM)") - expect(subject.registrant_contacts[0].address).to eq("immeuble le Stephenson\n1, rue Stephenson\nHall A2 - 3eme etage\n78180 Montigny le Bretonneux") - expect(subject.registrant_contacts[0].city).to eq(nil) - expect(subject.registrant_contacts[0].zip).to eq(nil) - expect(subject.registrant_contacts[0].state).to eq(nil) - expect(subject.registrant_contacts[0].country).to eq(nil) - expect(subject.registrant_contacts[0].country_code).to eq("FR") - expect(subject.registrant_contacts[0].phone).to eq("+33 1 39 30 83 00") - expect(subject.registrant_contacts[0].fax).to eq("+33 1 39 30 83 01") - expect(subject.registrant_contacts[0].email).to eq("support@afnic.fr") - expect(subject.registrant_contacts[0].updated_on).to eq(DateTime.parse("2017-07-17 12:39:46 UTC")) - end - end - describe "#admin_contacts" do - it do - expect(subject.admin_contacts).to be_a(Array) - expect(subject.admin_contacts.size).to eq(1) - expect(subject.admin_contacts[0]).to be_a(Whois::Parser::Contact) - expect(subject.admin_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_ADMINISTRATIVE) - expect(subject.admin_contacts[0].id).to eq("NFC1-FRNIC") - expect(subject.admin_contacts[0].name).to eq("NIC France Contact") - expect(subject.admin_contacts[0].organization).to eq("AFNIC") - expect(subject.admin_contacts[0].address).to eq("immeuble le Stephenson\n1, rue Stephenson\nHall A2 - 3eme etage\n78180 Montigny-Le-Bretonneux") - expect(subject.admin_contacts[0].city).to eq(nil) - expect(subject.admin_contacts[0].zip).to eq(nil) - expect(subject.admin_contacts[0].state).to eq(nil) - expect(subject.admin_contacts[0].country).to eq(nil) - expect(subject.admin_contacts[0].country_code).to eq("FR") - expect(subject.admin_contacts[0].phone).to eq("+33 1 39 30 83 00") - expect(subject.admin_contacts[0].fax).to eq(nil) - expect(subject.admin_contacts[0].email).to eq("hostmaster@nic.fr") - expect(subject.admin_contacts[0].updated_on).to eq(DateTime.parse("2005-08-23 16:13:17 UTC")) - end - end - describe "#technical_contacts" do - it do - expect(subject.technical_contacts).to be_a(Array) - expect(subject.technical_contacts.size).to eq(1) - expect(subject.technical_contacts[0]).to be_a(Whois::Parser::Contact) - expect(subject.technical_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_TECHNICAL) - expect(subject.technical_contacts[0].id).to eq("NFC1-FRNIC") - expect(subject.technical_contacts[0].name).to eq("NIC France Contact") - expect(subject.technical_contacts[0].organization).to eq("AFNIC") - expect(subject.technical_contacts[0].address).to eq("immeuble le Stephenson\n1, rue Stephenson\nHall A2 - 3eme etage\n78180 Montigny-Le-Bretonneux") - expect(subject.technical_contacts[0].city).to eq(nil) - expect(subject.technical_contacts[0].zip).to eq(nil) - expect(subject.technical_contacts[0].state).to eq(nil) - expect(subject.technical_contacts[0].country).to eq(nil) - expect(subject.technical_contacts[0].country_code).to eq("FR") - expect(subject.technical_contacts[0].phone).to eq("+33 1 39 30 83 00") - expect(subject.technical_contacts[0].fax).to eq(nil) - expect(subject.technical_contacts[0].email).to eq("hostmaster@nic.fr") - expect(subject.technical_contacts[0].updated_on).to eq(DateTime.parse("2005-08-23 16:13:17 UTC")) - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers.size).to eq(3) - expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[0].name).to eq("ns1.nic.fr") - expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[1].name).to eq("ns2.nic.fr") - expect(subject.nameservers[2]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[2].name).to eq("ns3.nic.fr") - end + it "matches status_registered.expected" do + expect(subject.status).to eq(:registered) + expect(subject.available?).to eq(false) + expect(subject.registered?).to eq(true) + expect(subject.created_on).to be_a(Time) + expect(subject.created_on).to eq(DateTime.parse("1994-12-31 23:00:00 UTC")) + expect(subject.updated_on).to be_a(Time) + expect(subject.updated_on).to eq(DateTime.parse("2018-12-31 23:33:19 UTC")) + expect(subject.expires_on).to be_a(Time) + expect(subject.expires_on).to eq(DateTime.parse("2019-12-31 23:00:00 UTC")) + expect(subject.registrant_contacts).to be_a(Array) + expect(subject.registrant_contacts.size).to eq(1) + expect(subject.registrant_contacts[0]).to be_a(Whois::Parser::Contact) + expect(subject.registrant_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_REGISTRANT) + expect(subject.registrant_contacts[0].id).to eq("APEM2-FRNIC") + expect(subject.registrant_contacts[0].name).to eq(nil) + expect(subject.registrant_contacts[0].organization).to eq("Afnic (Saint-Pierre et Miquelon - CTOM)") + expect(subject.registrant_contacts[0].address).to eq("immeuble le Stephenson\n1, rue Stephenson\nHall A2 - 3eme etage\n78180 Montigny le Bretonneux") + expect(subject.registrant_contacts[0].city).to eq(nil) + expect(subject.registrant_contacts[0].zip).to eq(nil) + expect(subject.registrant_contacts[0].state).to eq(nil) + expect(subject.registrant_contacts[0].country).to eq(nil) + expect(subject.registrant_contacts[0].country_code).to eq("FR") + expect(subject.registrant_contacts[0].phone).to eq("+33 1 39 30 83 00") + expect(subject.registrant_contacts[0].fax).to eq("+33 1 39 30 83 01") + expect(subject.registrant_contacts[0].email).to eq("support@afnic.fr") + expect(subject.registrant_contacts[0].updated_on).to eq(DateTime.parse("2017-07-17 12:39:46 UTC")) + expect(subject.admin_contacts).to be_a(Array) + expect(subject.admin_contacts.size).to eq(1) + expect(subject.admin_contacts[0]).to be_a(Whois::Parser::Contact) + expect(subject.admin_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_ADMINISTRATIVE) + expect(subject.admin_contacts[0].id).to eq("NFC1-FRNIC") + expect(subject.admin_contacts[0].name).to eq("NIC France Contact") + expect(subject.admin_contacts[0].organization).to eq("AFNIC") + expect(subject.admin_contacts[0].address).to eq("immeuble le Stephenson\n1, rue Stephenson\nHall A2 - 3eme etage\n78180 Montigny-Le-Bretonneux") + expect(subject.admin_contacts[0].city).to eq(nil) + expect(subject.admin_contacts[0].zip).to eq(nil) + expect(subject.admin_contacts[0].state).to eq(nil) + expect(subject.admin_contacts[0].country).to eq(nil) + expect(subject.admin_contacts[0].country_code).to eq("FR") + expect(subject.admin_contacts[0].phone).to eq("+33 1 39 30 83 00") + expect(subject.admin_contacts[0].fax).to eq(nil) + expect(subject.admin_contacts[0].email).to eq("hostmaster@nic.fr") + expect(subject.admin_contacts[0].updated_on).to eq(DateTime.parse("2005-08-23 16:13:17 UTC")) + expect(subject.technical_contacts).to be_a(Array) + expect(subject.technical_contacts.size).to eq(1) + expect(subject.technical_contacts[0]).to be_a(Whois::Parser::Contact) + expect(subject.technical_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_TECHNICAL) + expect(subject.technical_contacts[0].id).to eq("NFC1-FRNIC") + expect(subject.technical_contacts[0].name).to eq("NIC France Contact") + expect(subject.technical_contacts[0].organization).to eq("AFNIC") + expect(subject.technical_contacts[0].address).to eq("immeuble le Stephenson\n1, rue Stephenson\nHall A2 - 3eme etage\n78180 Montigny-Le-Bretonneux") + expect(subject.technical_contacts[0].city).to eq(nil) + expect(subject.technical_contacts[0].zip).to eq(nil) + expect(subject.technical_contacts[0].state).to eq(nil) + expect(subject.technical_contacts[0].country).to eq(nil) + expect(subject.technical_contacts[0].country_code).to eq("FR") + expect(subject.technical_contacts[0].phone).to eq("+33 1 39 30 83 00") + expect(subject.technical_contacts[0].fax).to eq(nil) + expect(subject.technical_contacts[0].email).to eq("hostmaster@nic.fr") + expect(subject.technical_contacts[0].updated_on).to eq(DateTime.parse("2005-08-23 16:13:17 UTC")) + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers.size).to eq(3) + expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[0].name).to eq("ns1.nic.fr") + expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[1].name).to eq("ns2.nic.fr") + expect(subject.nameservers[2]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[2].name).to eq("ns3.nic.fr") end end diff --git a/spec/whois/parsers/responses/whois.nic.pr/pr/status_available_spec.rb b/spec/whois/parsers/responses/whois.nic.pr/pr/status_available_spec.rb index 0cd7fe6d..50b921a9 100644 --- a/spec/whois/parsers/responses/whois.nic.pr/pr/status_available_spec.rb +++ b/spec/whois/parsers/responses/whois.nic.pr/pr/status_available_spec.rb @@ -11,80 +11,29 @@ # require 'spec_helper' -require 'whois/parsers/whois.nic.pr.rb' -describe Whois::Parsers::WhoisNicPr, "status_available.expected" do +describe "whois.nic.pr", :aggregate_failures do subject do file = fixture("responses", "whois.nic.pr/pr/status_available.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.nic.pr") + Whois::Parser.parser_for(part) end - describe "#domain" do - it do - expect(subject.domain).to eq("u34jedzcq.pr") - end - end - describe "#domain_id" do - it do - expect { subject.domain_id }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#status" do - it do - expect(subject.status).to eq(:available) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(true) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(false) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to eq(nil) - end - end - describe "#updated_on" do - it do - expect { subject.updated_on }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to eq(nil) - end - end - describe "#registrar" do - it do - expect { subject.registrar }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#registrant_contacts" do - it do - expect { subject.registrant_contacts }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#admin_contacts" do - it do - expect { subject.admin_contacts }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#technical_contacts" do - it do - expect { subject.technical_contacts }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers).to eq([]) - end + it "matches status_available.expected" do + expect(subject.domain).to eq("u34jedzcq.pr") + expect { subject.domain_id }.to raise_error(Whois::AttributeNotSupported) + expect(subject.status).to eq(:available) + expect(subject.available?).to eq(true) + expect(subject.registered?).to eq(false) + expect(subject.created_on).to eq(nil) + expect { subject.updated_on }.to raise_error(Whois::AttributeNotSupported) + expect(subject.expires_on).to eq(nil) + expect { subject.registrar }.to raise_error(Whois::AttributeNotSupported) + expect { subject.registrant_contacts }.to raise_error(Whois::AttributeNotSupported) + expect { subject.admin_contacts }.to raise_error(Whois::AttributeNotSupported) + expect { subject.technical_contacts }.to raise_error(Whois::AttributeNotSupported) + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers).to eq([]) end end diff --git a/spec/whois/parsers/responses/whois.nic.pr/pr/status_registered_spec.rb b/spec/whois/parsers/responses/whois.nic.pr/pr/status_registered_spec.rb index 15738456..d3aea02a 100644 --- a/spec/whois/parsers/responses/whois.nic.pr/pr/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.nic.pr/pr/status_registered_spec.rb @@ -11,90 +11,39 @@ # require 'spec_helper' -require 'whois/parsers/whois.nic.pr.rb' -describe Whois::Parsers::WhoisNicPr, "status_registered.expected" do +describe "whois.nic.pr", :aggregate_failures do subject do file = fixture("responses", "whois.nic.pr/pr/status_registered.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.nic.pr") + Whois::Parser.parser_for(part) end - describe "#domain" do - it do - expect(subject.domain).to eq("google.pr") - end - end - describe "#domain_id" do - it do - expect { subject.domain_id }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#status" do - it do - expect(subject.status).to eq(:registered) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(false) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(true) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to be_a(Time) - expect(subject.created_on).to eq(DateTime.parse("2005-09-15")) - end - end - describe "#updated_on" do - it do - expect { subject.updated_on }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to be_a(Time) - expect(subject.expires_on).to eq(DateTime.parse("2014-09-15")) - end - end - describe "#registrar" do - it do - expect { subject.registrar }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#registrant_contacts" do - it do - expect { subject.registrant_contacts }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#admin_contacts" do - it do - expect { subject.admin_contacts }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#technical_contacts" do - it do - expect { subject.technical_contacts }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers.size).to eq(4) - expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[0].name).to eq("ns1.google.com") - expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[1].name).to eq("ns2.google.com") - expect(subject.nameservers[2]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[2].name).to eq("ns3.google.com") - expect(subject.nameservers[3]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[3].name).to eq("ns4.google.com") - end + it "matches status_registered.expected" do + expect(subject.domain).to eq("google.pr") + expect { subject.domain_id }.to raise_error(Whois::AttributeNotSupported) + expect(subject.status).to eq(:registered) + expect(subject.available?).to eq(false) + expect(subject.registered?).to eq(true) + expect(subject.created_on).to be_a(Time) + expect(subject.created_on).to eq(DateTime.parse("2005-09-15")) + expect { subject.updated_on }.to raise_error(Whois::AttributeNotSupported) + expect(subject.expires_on).to be_a(Time) + expect(subject.expires_on).to eq(DateTime.parse("2014-09-15")) + expect { subject.registrar }.to raise_error(Whois::AttributeNotSupported) + expect { subject.registrant_contacts }.to raise_error(Whois::AttributeNotSupported) + expect { subject.admin_contacts }.to raise_error(Whois::AttributeNotSupported) + expect { subject.technical_contacts }.to raise_error(Whois::AttributeNotSupported) + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers.size).to eq(4) + expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[0].name).to eq("ns1.google.com") + expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[1].name).to eq("ns2.google.com") + expect(subject.nameservers[2]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[2].name).to eq("ns3.google.com") + expect(subject.nameservers[3]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[3].name).to eq("ns4.google.com") end end diff --git a/spec/whois/parsers/responses/whois.nic.priv.at/at/status_available_spec.rb b/spec/whois/parsers/responses/whois.nic.priv.at/at/status_available_spec.rb index 89660745..65bcb086 100644 --- a/spec/whois/parsers/responses/whois.nic.priv.at/at/status_available_spec.rb +++ b/spec/whois/parsers/responses/whois.nic.priv.at/at/status_available_spec.rb @@ -11,49 +11,22 @@ # require 'spec_helper' -require 'whois/parsers/whois.nic.priv.at.rb' -describe Whois::Parsers::WhoisNicPrivAt, "status_available.expected" do +describe "whois.nic.priv.at", :aggregate_failures do subject do file = fixture("responses", "whois.nic.priv.at/at/status_available.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.nic.priv.at") + Whois::Parser.parser_for(part) end - describe "#status" do - it do - expect(subject.status).to eq(:available) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(true) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(false) - end - end - describe "#created_on" do - it do - expect { subject.created_on }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#updated_on" do - it do - expect(subject.updated_on).to eq(nil) - end - end - describe "#expires_on" do - it do - expect { subject.expires_on }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#nameservers" do - it do - expect { subject.nameservers }.to raise_error(Whois::AttributeNotSupported) - end + it "matches status_available.expected" do + expect(subject.status).to eq(:available) + expect(subject.available?).to eq(true) + expect(subject.registered?).to eq(false) + expect { subject.created_on }.to raise_error(Whois::AttributeNotSupported) + expect(subject.updated_on).to eq(nil) + expect { subject.expires_on }.to raise_error(Whois::AttributeNotSupported) + expect { subject.nameservers }.to raise_error(Whois::AttributeNotSupported) end end diff --git a/spec/whois/parsers/responses/whois.nic.priv.at/at/status_registered_spec.rb b/spec/whois/parsers/responses/whois.nic.priv.at/at/status_registered_spec.rb index ee09d1da..9b760034 100644 --- a/spec/whois/parsers/responses/whois.nic.priv.at/at/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.nic.priv.at/at/status_registered_spec.rb @@ -11,50 +11,23 @@ # require 'spec_helper' -require 'whois/parsers/whois.nic.priv.at.rb' -describe Whois::Parsers::WhoisNicPrivAt, "status_registered.expected" do +describe "whois.nic.priv.at", :aggregate_failures do subject do file = fixture("responses", "whois.nic.priv.at/at/status_registered.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.nic.priv.at") + Whois::Parser.parser_for(part) end - describe "#status" do - it do - expect(subject.status).to eq(:registered) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(false) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(true) - end - end - describe "#created_on" do - it do - expect { subject.created_on }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#updated_on" do - it do - expect(subject.updated_on).to be_a(Time) - expect(subject.updated_on).to eq(DateTime.parse("2002-10-13")) - end - end - describe "#expires_on" do - it do - expect { subject.expires_on }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#nameservers" do - it do - expect { subject.nameservers }.to raise_error(Whois::AttributeNotSupported) - end + it "matches status_registered.expected" do + expect(subject.status).to eq(:registered) + expect(subject.available?).to eq(false) + expect(subject.registered?).to eq(true) + expect { subject.created_on }.to raise_error(Whois::AttributeNotSupported) + expect(subject.updated_on).to be_a(Time) + expect(subject.updated_on).to eq(DateTime.parse("2002-10-13")) + expect { subject.expires_on }.to raise_error(Whois::AttributeNotSupported) + expect { subject.nameservers }.to raise_error(Whois::AttributeNotSupported) end end diff --git a/spec/whois/parsers/responses/whois.nic.pw/pw/status_available_spec.rb b/spec/whois/parsers/responses/whois.nic.pw/pw/status_available_spec.rb index f4d9cac5..e909d4ef 100644 --- a/spec/whois/parsers/responses/whois.nic.pw/pw/status_available_spec.rb +++ b/spec/whois/parsers/responses/whois.nic.pw/pw/status_available_spec.rb @@ -11,88 +11,33 @@ # require 'spec_helper' -require 'whois/parsers/whois.nic.pw.rb' -describe Whois::Parsers::WhoisNicPw, "status_available.expected" do +describe "whois.nic.pw", :aggregate_failures do subject do file = fixture("responses", "whois.nic.pw/pw/status_available.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.nic.pw") + Whois::Parser.parser_for(part) end - describe "#disclaimer" do - it do - expect(subject.disclaimer).to eq(nil) - end - end - describe "#domain" do - it do - expect(subject.domain).to eq(nil) - end - end - describe "#domain_id" do - it do - expect(subject.domain_id).to eq(nil) - end - end - describe "#status" do - it do - expect(subject.status).to eq([]) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(true) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(false) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to eq(nil) - end - end - describe "#updated_on" do - it do - expect(subject.updated_on).to eq(nil) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to eq(nil) - end - end - describe "#registrar" do - it do - expect(subject.registrar).to eq(nil) - end - end - describe "#registrant_contacts" do - it do - expect(subject.registrant_contacts).to be_a(Array) - expect(subject.registrant_contacts).to eq([]) - end - end - describe "#admin_contacts" do - it do - expect(subject.admin_contacts).to be_a(Array) - expect(subject.admin_contacts).to eq([]) - end - end - describe "#technical_contacts" do - it do - expect(subject.technical_contacts).to be_a(Array) - expect(subject.technical_contacts).to eq([]) - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers).to eq([]) - end + it "matches status_available.expected" do + expect(subject.disclaimer).to eq(nil) + expect(subject.domain).to eq(nil) + expect(subject.domain_id).to eq(nil) + expect(subject.status).to eq([]) + expect(subject.available?).to eq(true) + expect(subject.registered?).to eq(false) + expect(subject.created_on).to eq(nil) + expect(subject.updated_on).to eq(nil) + expect(subject.expires_on).to eq(nil) + expect(subject.registrar).to eq(nil) + expect(subject.registrant_contacts).to be_a(Array) + expect(subject.registrant_contacts).to eq([]) + expect(subject.admin_contacts).to be_a(Array) + expect(subject.admin_contacts).to eq([]) + expect(subject.technical_contacts).to be_a(Array) + expect(subject.technical_contacts).to eq([]) + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers).to eq([]) end end diff --git a/spec/whois/parsers/responses/whois.nic.pw/pw/status_registered_spec.rb b/spec/whois/parsers/responses/whois.nic.pw/pw/status_registered_spec.rb index 564eca7c..c2a6ba22 100644 --- a/spec/whois/parsers/responses/whois.nic.pw/pw/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.nic.pw/pw/status_registered_spec.rb @@ -11,164 +11,109 @@ # require 'spec_helper' -require 'whois/parsers/whois.nic.pw.rb' -describe Whois::Parsers::WhoisNicPw, "status_registered.expected" do +describe "whois.nic.pw", :aggregate_failures do subject do file = fixture("responses", "whois.nic.pw/pw/status_registered.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.nic.pw") + Whois::Parser.parser_for(part) end - describe "#disclaimer" do - it do - expect(subject.disclaimer).to eq("This whois service is provided by CentralNic Ltd and only contains information pertaining to Internet domain names we have registered for our customers. By using this service you are agreeing (1) not to use any information presented here for any purpose other than determining ownership of domain names, (2) not to store or reproduce this data in any way, (3) not to use any high-volume, automated, electronic processes to obtain data from this service. Abuse of this service is monitored and actions in contravention of these terms will result in being permanently blacklisted. All data is (c) CentralNic Ltd https://www.centralnic.com/") - end - end - describe "#domain" do - it do - expect(subject.domain).to eq("google.pw") - end - end - describe "#domain_id" do - it do - expect(subject.domain_id).to eq("CNIC-DO949924") - end - end - describe "#status" do - it do - expect(subject.status).to eq(["clientTransferProhibited", "clientUpdateProhibited", "clientDeleteProhibited", "serverTransferProhibited"]) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(false) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(true) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to be_a(Time) - expect(subject.created_on).to eq(DateTime.parse("2012-10-12 10:19:46 UTC")) - end - end - describe "#updated_on" do - it do - expect(subject.updated_on).to be_a(Time) - expect(subject.updated_on).to eq(DateTime.parse("2014-01-18 00:13:36 UTC")) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to be_a(Time) - expect(subject.expires_on).to eq(DateTime.parse("2017-02-10 23:59:59 UTC")) - end - end - describe "#registrar" do - it do - expect(subject.registrar).to be_a(Whois::Parser::Registrar) - expect(subject.registrar.id).to eq("7061-EM") - expect(subject.registrar.name).to eq("MarkMonitor, Inc.") - expect(subject.registrar.url).to eq("http://www.markmonitor.com/") - end - end - describe "#registrant_contacts" do - it do - expect(subject.registrant_contacts).to be_a(Array) - expect(subject.registrant_contacts.size).to eq(1) - expect(subject.registrant_contacts[0]).to be_a(Whois::Parser::Contact) - expect(subject.registrant_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_REGISTRANT) - expect(subject.registrant_contacts[0].id).to eq("H2396041") - expect(subject.registrant_contacts[0].name).to eq("DNS Admin - Google Inc") - expect(subject.registrant_contacts[0].organization).to eq("Google Inc") - expect(subject.registrant_contacts[0].address).to eq("1600 Amphitheatre Parkway") - expect(subject.registrant_contacts[0].city).to eq("Mountain View") - expect(subject.registrant_contacts[0].zip).to eq("94043") - expect(subject.registrant_contacts[0].state).to eq("CA") - expect(subject.registrant_contacts[0].country).to eq(nil) - expect(subject.registrant_contacts[0].country_code).to eq("US") - expect(subject.registrant_contacts[0].phone).to eq("+1.6502530000") - expect(subject.registrant_contacts[0].fax).to eq("+1.6502530001") - expect(subject.registrant_contacts[0].email).to eq("dns-admin@google.com") - end - end - describe "#admin_contacts" do - it do - expect(subject.admin_contacts).to be_a(Array) - expect(subject.admin_contacts.size).to eq(1) - expect(subject.admin_contacts[0]).to be_a(Whois::Parser::Contact) - expect(subject.admin_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_ADMINISTRATIVE) - expect(subject.admin_contacts[0].id).to eq("H2396041") - expect(subject.admin_contacts[0].name).to eq("DNS Admin - Google Inc") - expect(subject.admin_contacts[0].organization).to eq("Google Inc") - expect(subject.admin_contacts[0].address).to eq("1600 Amphitheatre Parkway") - expect(subject.admin_contacts[0].city).to eq("Mountain View") - expect(subject.admin_contacts[0].zip).to eq("94043") - expect(subject.admin_contacts[0].state).to eq("CA") - expect(subject.admin_contacts[0].country).to eq(nil) - expect(subject.admin_contacts[0].country_code).to eq("US") - expect(subject.admin_contacts[0].phone).to eq("+1.6502530000") - expect(subject.admin_contacts[0].fax).to eq("+1.6502530001") - expect(subject.admin_contacts[0].email).to eq("dns-admin@google.com") - end - end - describe "#technical_contacts" do - it do - expect(subject.technical_contacts).to be_a(Array) - expect(subject.technical_contacts.size).to eq(1) - expect(subject.technical_contacts[0]).to be_a(Whois::Parser::Contact) - expect(subject.technical_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_TECHNICAL) - expect(subject.technical_contacts[0].id).to eq("H2396041") - expect(subject.technical_contacts[0].name).to eq("DNS Admin - Google Inc") - expect(subject.technical_contacts[0].organization).to eq("Google Inc") - expect(subject.technical_contacts[0].address).to eq("1600 Amphitheatre Parkway") - expect(subject.technical_contacts[0].city).to eq("Mountain View") - expect(subject.technical_contacts[0].zip).to eq("94043") - expect(subject.technical_contacts[0].state).to eq("CA") - expect(subject.technical_contacts[0].country).to eq(nil) - expect(subject.technical_contacts[0].country_code).to eq("US") - expect(subject.technical_contacts[0].phone).to eq("+1.6502530000") - expect(subject.technical_contacts[0].fax).to eq("+1.6502530001") - expect(subject.technical_contacts[0].email).to eq("dns-admin@google.com") - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers.size).to eq(7) - expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[0].name).to eq("ns1.markmonitor.com") - expect(subject.nameservers[0].ipv4).to eq(nil) - expect(subject.nameservers[0].ipv6).to eq(nil) - expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[1].name).to eq("ns2.markmonitor.com") - expect(subject.nameservers[1].ipv4).to eq(nil) - expect(subject.nameservers[1].ipv6).to eq(nil) - expect(subject.nameservers[2]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[2].name).to eq("ns3.markmonitor.com") - expect(subject.nameservers[2].ipv4).to eq(nil) - expect(subject.nameservers[2].ipv6).to eq(nil) - expect(subject.nameservers[3]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[3].name).to eq("ns4.markmonitor.com") - expect(subject.nameservers[3].ipv4).to eq(nil) - expect(subject.nameservers[3].ipv6).to eq(nil) - expect(subject.nameservers[4]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[4].name).to eq("ns5.markmonitor.com") - expect(subject.nameservers[4].ipv4).to eq(nil) - expect(subject.nameservers[4].ipv6).to eq(nil) - expect(subject.nameservers[5]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[5].name).to eq("ns6.markmonitor.com") - expect(subject.nameservers[5].ipv4).to eq(nil) - expect(subject.nameservers[5].ipv6).to eq(nil) - expect(subject.nameservers[6]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[6].name).to eq("ns7.markmonitor.com") - expect(subject.nameservers[6].ipv4).to eq(nil) - expect(subject.nameservers[6].ipv6).to eq(nil) - end + it "matches status_registered.expected" do + expect(subject.disclaimer).to eq("This whois service is provided by CentralNic Ltd and only contains information pertaining to Internet domain names we have registered for our customers. By using this service you are agreeing (1) not to use any information presented here for any purpose other than determining ownership of domain names, (2) not to store or reproduce this data in any way, (3) not to use any high-volume, automated, electronic processes to obtain data from this service. Abuse of this service is monitored and actions in contravention of these terms will result in being permanently blacklisted. All data is (c) CentralNic Ltd https://www.centralnic.com/") + expect(subject.domain).to eq("google.pw") + expect(subject.domain_id).to eq("CNIC-DO949924") + expect(subject.status).to eq(["clientTransferProhibited", "clientUpdateProhibited", "clientDeleteProhibited", "serverTransferProhibited"]) + expect(subject.available?).to eq(false) + expect(subject.registered?).to eq(true) + expect(subject.created_on).to be_a(Time) + expect(subject.created_on).to eq(DateTime.parse("2012-10-12 10:19:46 UTC")) + expect(subject.updated_on).to be_a(Time) + expect(subject.updated_on).to eq(DateTime.parse("2014-01-18 00:13:36 UTC")) + expect(subject.expires_on).to be_a(Time) + expect(subject.expires_on).to eq(DateTime.parse("2017-02-10 23:59:59 UTC")) + expect(subject.registrar).to be_a(Whois::Parser::Registrar) + expect(subject.registrar.id).to eq("7061-EM") + expect(subject.registrar.name).to eq("MarkMonitor, Inc.") + expect(subject.registrar.url).to eq("http://www.markmonitor.com/") + expect(subject.registrant_contacts).to be_a(Array) + expect(subject.registrant_contacts.size).to eq(1) + expect(subject.registrant_contacts[0]).to be_a(Whois::Parser::Contact) + expect(subject.registrant_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_REGISTRANT) + expect(subject.registrant_contacts[0].id).to eq("H2396041") + expect(subject.registrant_contacts[0].name).to eq("DNS Admin - Google Inc") + expect(subject.registrant_contacts[0].organization).to eq("Google Inc") + expect(subject.registrant_contacts[0].address).to eq("1600 Amphitheatre Parkway") + expect(subject.registrant_contacts[0].city).to eq("Mountain View") + expect(subject.registrant_contacts[0].zip).to eq("94043") + expect(subject.registrant_contacts[0].state).to eq("CA") + expect(subject.registrant_contacts[0].country).to eq(nil) + expect(subject.registrant_contacts[0].country_code).to eq("US") + expect(subject.registrant_contacts[0].phone).to eq("+1.6502530000") + expect(subject.registrant_contacts[0].fax).to eq("+1.6502530001") + expect(subject.registrant_contacts[0].email).to eq("dns-admin@google.com") + expect(subject.admin_contacts).to be_a(Array) + expect(subject.admin_contacts.size).to eq(1) + expect(subject.admin_contacts[0]).to be_a(Whois::Parser::Contact) + expect(subject.admin_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_ADMINISTRATIVE) + expect(subject.admin_contacts[0].id).to eq("H2396041") + expect(subject.admin_contacts[0].name).to eq("DNS Admin - Google Inc") + expect(subject.admin_contacts[0].organization).to eq("Google Inc") + expect(subject.admin_contacts[0].address).to eq("1600 Amphitheatre Parkway") + expect(subject.admin_contacts[0].city).to eq("Mountain View") + expect(subject.admin_contacts[0].zip).to eq("94043") + expect(subject.admin_contacts[0].state).to eq("CA") + expect(subject.admin_contacts[0].country).to eq(nil) + expect(subject.admin_contacts[0].country_code).to eq("US") + expect(subject.admin_contacts[0].phone).to eq("+1.6502530000") + expect(subject.admin_contacts[0].fax).to eq("+1.6502530001") + expect(subject.admin_contacts[0].email).to eq("dns-admin@google.com") + expect(subject.technical_contacts).to be_a(Array) + expect(subject.technical_contacts.size).to eq(1) + expect(subject.technical_contacts[0]).to be_a(Whois::Parser::Contact) + expect(subject.technical_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_TECHNICAL) + expect(subject.technical_contacts[0].id).to eq("H2396041") + expect(subject.technical_contacts[0].name).to eq("DNS Admin - Google Inc") + expect(subject.technical_contacts[0].organization).to eq("Google Inc") + expect(subject.technical_contacts[0].address).to eq("1600 Amphitheatre Parkway") + expect(subject.technical_contacts[0].city).to eq("Mountain View") + expect(subject.technical_contacts[0].zip).to eq("94043") + expect(subject.technical_contacts[0].state).to eq("CA") + expect(subject.technical_contacts[0].country).to eq(nil) + expect(subject.technical_contacts[0].country_code).to eq("US") + expect(subject.technical_contacts[0].phone).to eq("+1.6502530000") + expect(subject.technical_contacts[0].fax).to eq("+1.6502530001") + expect(subject.technical_contacts[0].email).to eq("dns-admin@google.com") + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers.size).to eq(7) + expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[0].name).to eq("ns1.markmonitor.com") + expect(subject.nameservers[0].ipv4).to eq(nil) + expect(subject.nameservers[0].ipv6).to eq(nil) + expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[1].name).to eq("ns2.markmonitor.com") + expect(subject.nameservers[1].ipv4).to eq(nil) + expect(subject.nameservers[1].ipv6).to eq(nil) + expect(subject.nameservers[2]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[2].name).to eq("ns3.markmonitor.com") + expect(subject.nameservers[2].ipv4).to eq(nil) + expect(subject.nameservers[2].ipv6).to eq(nil) + expect(subject.nameservers[3]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[3].name).to eq("ns4.markmonitor.com") + expect(subject.nameservers[3].ipv4).to eq(nil) + expect(subject.nameservers[3].ipv6).to eq(nil) + expect(subject.nameservers[4]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[4].name).to eq("ns5.markmonitor.com") + expect(subject.nameservers[4].ipv4).to eq(nil) + expect(subject.nameservers[4].ipv6).to eq(nil) + expect(subject.nameservers[5]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[5].name).to eq("ns6.markmonitor.com") + expect(subject.nameservers[5].ipv4).to eq(nil) + expect(subject.nameservers[5].ipv6).to eq(nil) + expect(subject.nameservers[6]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[6].name).to eq("ns7.markmonitor.com") + expect(subject.nameservers[6].ipv4).to eq(nil) + expect(subject.nameservers[6].ipv6).to eq(nil) end end diff --git a/spec/whois/parsers/responses/whois.nic.re/re/property_nameservers_with_ipv4_and_ipv6_spec.rb b/spec/whois/parsers/responses/whois.nic.re/re/property_nameservers_with_ipv4_and_ipv6_spec.rb index 8227a161..264b02bd 100644 --- a/spec/whois/parsers/responses/whois.nic.re/re/property_nameservers_with_ipv4_and_ipv6_spec.rb +++ b/spec/whois/parsers/responses/whois.nic.re/re/property_nameservers_with_ipv4_and_ipv6_spec.rb @@ -11,32 +11,29 @@ # require 'spec_helper' -require 'whois/parsers/whois.nic.re.rb' -describe Whois::Parsers::WhoisNicRe, "property_nameservers_with_ipv4_and_ipv6.expected" do +describe "whois.nic.re", :aggregate_failures do subject do file = fixture("responses", "whois.nic.re/re/property_nameservers_with_ipv4_and_ipv6.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.nic.re") + Whois::Parser.parser_for(part) end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers.size).to eq(3) - expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[0].name).to eq("ns1.nic.fr") - expect(subject.nameservers[0].ipv4).to eq("192.93.0.1") - expect(subject.nameservers[0].ipv6).to eq("2001:660:3005:1::1:1") - expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[1].name).to eq("ns2.nic.fr") - expect(subject.nameservers[1].ipv4).to eq("192.93.0.4") - expect(subject.nameservers[1].ipv6).to eq("2001:660:3005:1::1:2") - expect(subject.nameservers[2]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[2].name).to eq("ns3.nic.fr") - expect(subject.nameservers[2].ipv4).to eq("192.134.0.49") - expect(subject.nameservers[2].ipv6).to eq("2001:660:3006:1::1:1") - end + it "matches property_nameservers_with_ipv4_and_ipv6.expected" do + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers.size).to eq(3) + expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[0].name).to eq("ns1.nic.fr") + expect(subject.nameservers[0].ipv4).to eq("192.93.0.1") + expect(subject.nameservers[0].ipv6).to eq("2001:660:3005:1::1:1") + expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[1].name).to eq("ns2.nic.fr") + expect(subject.nameservers[1].ipv4).to eq("192.93.0.4") + expect(subject.nameservers[1].ipv6).to eq("2001:660:3005:1::1:2") + expect(subject.nameservers[2]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[2].name).to eq("ns3.nic.fr") + expect(subject.nameservers[2].ipv4).to eq("192.134.0.49") + expect(subject.nameservers[2].ipv6).to eq("2001:660:3006:1::1:1") end end diff --git a/spec/whois/parsers/responses/whois.nic.re/re/response_throttled_spec.rb b/spec/whois/parsers/responses/whois.nic.re/re/response_throttled_spec.rb index f97475e4..59a4b2ae 100644 --- a/spec/whois/parsers/responses/whois.nic.re/re/response_throttled_spec.rb +++ b/spec/whois/parsers/responses/whois.nic.re/re/response_throttled_spec.rb @@ -11,19 +11,16 @@ # require 'spec_helper' -require 'whois/parsers/whois.nic.re.rb' -describe Whois::Parsers::WhoisNicRe, "response_throttled.expected" do +describe "whois.nic.re", :aggregate_failures do subject do file = fixture("responses", "whois.nic.re/re/response_throttled.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.nic.re") + Whois::Parser.parser_for(part) end - describe "#response_throttled?" do - it do - expect(subject.response_throttled?).to eq(true) - end + it "matches response_throttled.expected" do + expect(subject.response_throttled?).to eq(true) end end diff --git a/spec/whois/parsers/responses/whois.nic.re/re/status_available_spec.rb b/spec/whois/parsers/responses/whois.nic.re/re/status_available_spec.rb index d18c1ea0..4a1fbf85 100644 --- a/spec/whois/parsers/responses/whois.nic.re/re/status_available_spec.rb +++ b/spec/whois/parsers/responses/whois.nic.re/re/status_available_spec.rb @@ -11,68 +11,29 @@ # require 'spec_helper' -require 'whois/parsers/whois.nic.re.rb' -describe Whois::Parsers::WhoisNicRe, "status_available.expected" do +describe "whois.nic.re", :aggregate_failures do subject do file = fixture("responses", "whois.nic.re/re/status_available.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.nic.re") + Whois::Parser.parser_for(part) end - describe "#status" do - it do - expect(subject.status).to eq(:available) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(true) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(false) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to eq(nil) - end - end - describe "#updated_on" do - it do - expect(subject.updated_on).to eq(nil) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to eq(nil) - end - end - describe "#registrant_contacts" do - it do - expect(subject.registrant_contacts).to be_a(Array) - expect(subject.registrant_contacts).to eq([]) - end - end - describe "#admin_contacts" do - it do - expect(subject.admin_contacts).to be_a(Array) - expect(subject.admin_contacts).to eq([]) - end - end - describe "#technical_contacts" do - it do - expect(subject.technical_contacts).to be_a(Array) - expect(subject.technical_contacts).to eq([]) - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers).to eq([]) - end + it "matches status_available.expected" do + expect(subject.status).to eq(:available) + expect(subject.available?).to eq(true) + expect(subject.registered?).to eq(false) + expect(subject.created_on).to eq(nil) + expect(subject.updated_on).to eq(nil) + expect(subject.expires_on).to eq(nil) + expect(subject.registrant_contacts).to be_a(Array) + expect(subject.registrant_contacts).to eq([]) + expect(subject.admin_contacts).to be_a(Array) + expect(subject.admin_contacts).to eq([]) + expect(subject.technical_contacts).to be_a(Array) + expect(subject.technical_contacts).to eq([]) + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers).to eq([]) end end diff --git a/spec/whois/parsers/responses/whois.nic.re/re/status_registered_spec.rb b/spec/whois/parsers/responses/whois.nic.re/re/status_registered_spec.rb index 8fa4b83a..4c462065 100644 --- a/spec/whois/parsers/responses/whois.nic.re/re/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.nic.re/re/status_registered_spec.rb @@ -11,122 +11,83 @@ # require 'spec_helper' -require 'whois/parsers/whois.nic.re.rb' -describe Whois::Parsers::WhoisNicRe, "status_registered.expected" do +describe "whois.nic.re", :aggregate_failures do subject do file = fixture("responses", "whois.nic.re/re/status_registered.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.nic.re") + Whois::Parser.parser_for(part) end - describe "#status" do - it do - expect(subject.status).to eq(:registered) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(false) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(true) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to be_a(Time) - expect(subject.created_on).to eq(DateTime.parse("1994-12-31 23:00:00 UTC")) - end - end - describe "#updated_on" do - it do - expect(subject.updated_on).to be_a(Time) - expect(subject.updated_on).to eq(DateTime.parse("2018-12-31 23:33:19 UTC")) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to be_a(Time) - expect(subject.expires_on).to eq(DateTime.parse("2019-12-31 23:00:00 UTC")) - end - end - describe "#registrant_contacts" do - it do - expect(subject.registrant_contacts).to be_a(Array) - expect(subject.registrant_contacts.size).to eq(1) - expect(subject.registrant_contacts[0]).to be_a(Whois::Parser::Contact) - expect(subject.registrant_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_REGISTRANT) - expect(subject.registrant_contacts[0].id).to eq("A1967-FRNIC") - expect(subject.registrant_contacts[0].name).to eq(nil) - expect(subject.registrant_contacts[0].organization).to eq("AFNIC") - expect(subject.registrant_contacts[0].address).to eq("immeuble le Stephenson\n1, rue Stephenson\nHall A2 - 3eme etage\n78180 Montigny le Bretonneux") - expect(subject.registrant_contacts[0].city).to eq(nil) - expect(subject.registrant_contacts[0].zip).to eq(nil) - expect(subject.registrant_contacts[0].state).to eq(nil) - expect(subject.registrant_contacts[0].country).to eq(nil) - expect(subject.registrant_contacts[0].country_code).to eq("FR") - expect(subject.registrant_contacts[0].phone).to eq("+33 1 39 30 83 00") - expect(subject.registrant_contacts[0].fax).to eq("+33 1 39 30 83 01") - expect(subject.registrant_contacts[0].email).to eq("support@afnic.fr") - expect(subject.registrant_contacts[0].updated_on).to eq(DateTime.parse("2017-07-17 12:40:19 UTC")) - end - end - describe "#admin_contacts" do - it do - expect(subject.admin_contacts).to be_a(Array) - expect(subject.admin_contacts.size).to eq(1) - expect(subject.admin_contacts[0]).to be_a(Whois::Parser::Contact) - expect(subject.admin_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_ADMINISTRATIVE) - expect(subject.admin_contacts[0].id).to eq("NFC1-FRNIC") - expect(subject.admin_contacts[0].name).to eq("NIC France Contact") - expect(subject.admin_contacts[0].organization).to eq("AFNIC") - expect(subject.admin_contacts[0].address).to eq("immeuble le Stephenson\n1, rue Stephenson\nHall A2 - 3eme etage\n78180 Montigny-Le-Bretonneux") - expect(subject.admin_contacts[0].city).to eq(nil) - expect(subject.admin_contacts[0].zip).to eq(nil) - expect(subject.admin_contacts[0].state).to eq(nil) - expect(subject.admin_contacts[0].country).to eq(nil) - expect(subject.admin_contacts[0].country_code).to eq("FR") - expect(subject.admin_contacts[0].phone).to eq("+33 1 39 30 83 00") - expect(subject.admin_contacts[0].fax).to eq(nil) - expect(subject.admin_contacts[0].email).to eq("hostmaster@nic.fr") - expect(subject.admin_contacts[0].updated_on).to eq(DateTime.parse("2005-08-23 16:13:17 UTC")) - end - end - describe "#technical_contacts" do - it do - expect(subject.technical_contacts).to be_a(Array) - expect(subject.technical_contacts.size).to eq(1) - expect(subject.technical_contacts[0]).to be_a(Whois::Parser::Contact) - expect(subject.technical_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_TECHNICAL) - expect(subject.technical_contacts[0].id).to eq("NFC1-FRNIC") - expect(subject.technical_contacts[0].name).to eq("NIC France Contact") - expect(subject.technical_contacts[0].organization).to eq("AFNIC") - expect(subject.technical_contacts[0].address).to eq("immeuble le Stephenson\n1, rue Stephenson\nHall A2 - 3eme etage\n78180 Montigny-Le-Bretonneux") - expect(subject.technical_contacts[0].city).to eq(nil) - expect(subject.technical_contacts[0].zip).to eq(nil) - expect(subject.technical_contacts[0].state).to eq(nil) - expect(subject.technical_contacts[0].country).to eq(nil) - expect(subject.technical_contacts[0].country_code).to eq("FR") - expect(subject.technical_contacts[0].phone).to eq("+33 1 39 30 83 00") - expect(subject.technical_contacts[0].fax).to eq(nil) - expect(subject.technical_contacts[0].email).to eq("hostmaster@nic.fr") - expect(subject.technical_contacts[0].updated_on).to eq(DateTime.parse("2005-08-23 16:13:17 UTC")) - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers.size).to eq(3) - expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[0].name).to eq("ns1.nic.fr") - expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[1].name).to eq("ns2.nic.fr") - expect(subject.nameservers[2]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[2].name).to eq("ns3.nic.fr") - end + it "matches status_registered.expected" do + expect(subject.status).to eq(:registered) + expect(subject.available?).to eq(false) + expect(subject.registered?).to eq(true) + expect(subject.created_on).to be_a(Time) + expect(subject.created_on).to eq(DateTime.parse("1994-12-31 23:00:00 UTC")) + expect(subject.updated_on).to be_a(Time) + expect(subject.updated_on).to eq(DateTime.parse("2018-12-31 23:33:19 UTC")) + expect(subject.expires_on).to be_a(Time) + expect(subject.expires_on).to eq(DateTime.parse("2019-12-31 23:00:00 UTC")) + expect(subject.registrant_contacts).to be_a(Array) + expect(subject.registrant_contacts.size).to eq(1) + expect(subject.registrant_contacts[0]).to be_a(Whois::Parser::Contact) + expect(subject.registrant_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_REGISTRANT) + expect(subject.registrant_contacts[0].id).to eq("A1967-FRNIC") + expect(subject.registrant_contacts[0].name).to eq(nil) + expect(subject.registrant_contacts[0].organization).to eq("AFNIC") + expect(subject.registrant_contacts[0].address).to eq("immeuble le Stephenson\n1, rue Stephenson\nHall A2 - 3eme etage\n78180 Montigny le Bretonneux") + expect(subject.registrant_contacts[0].city).to eq(nil) + expect(subject.registrant_contacts[0].zip).to eq(nil) + expect(subject.registrant_contacts[0].state).to eq(nil) + expect(subject.registrant_contacts[0].country).to eq(nil) + expect(subject.registrant_contacts[0].country_code).to eq("FR") + expect(subject.registrant_contacts[0].phone).to eq("+33 1 39 30 83 00") + expect(subject.registrant_contacts[0].fax).to eq("+33 1 39 30 83 01") + expect(subject.registrant_contacts[0].email).to eq("support@afnic.fr") + expect(subject.registrant_contacts[0].updated_on).to eq(DateTime.parse("2017-07-17 12:40:19 UTC")) + expect(subject.admin_contacts).to be_a(Array) + expect(subject.admin_contacts.size).to eq(1) + expect(subject.admin_contacts[0]).to be_a(Whois::Parser::Contact) + expect(subject.admin_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_ADMINISTRATIVE) + expect(subject.admin_contacts[0].id).to eq("NFC1-FRNIC") + expect(subject.admin_contacts[0].name).to eq("NIC France Contact") + expect(subject.admin_contacts[0].organization).to eq("AFNIC") + expect(subject.admin_contacts[0].address).to eq("immeuble le Stephenson\n1, rue Stephenson\nHall A2 - 3eme etage\n78180 Montigny-Le-Bretonneux") + expect(subject.admin_contacts[0].city).to eq(nil) + expect(subject.admin_contacts[0].zip).to eq(nil) + expect(subject.admin_contacts[0].state).to eq(nil) + expect(subject.admin_contacts[0].country).to eq(nil) + expect(subject.admin_contacts[0].country_code).to eq("FR") + expect(subject.admin_contacts[0].phone).to eq("+33 1 39 30 83 00") + expect(subject.admin_contacts[0].fax).to eq(nil) + expect(subject.admin_contacts[0].email).to eq("hostmaster@nic.fr") + expect(subject.admin_contacts[0].updated_on).to eq(DateTime.parse("2005-08-23 16:13:17 UTC")) + expect(subject.technical_contacts).to be_a(Array) + expect(subject.technical_contacts.size).to eq(1) + expect(subject.technical_contacts[0]).to be_a(Whois::Parser::Contact) + expect(subject.technical_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_TECHNICAL) + expect(subject.technical_contacts[0].id).to eq("NFC1-FRNIC") + expect(subject.technical_contacts[0].name).to eq("NIC France Contact") + expect(subject.technical_contacts[0].organization).to eq("AFNIC") + expect(subject.technical_contacts[0].address).to eq("immeuble le Stephenson\n1, rue Stephenson\nHall A2 - 3eme etage\n78180 Montigny-Le-Bretonneux") + expect(subject.technical_contacts[0].city).to eq(nil) + expect(subject.technical_contacts[0].zip).to eq(nil) + expect(subject.technical_contacts[0].state).to eq(nil) + expect(subject.technical_contacts[0].country).to eq(nil) + expect(subject.technical_contacts[0].country_code).to eq("FR") + expect(subject.technical_contacts[0].phone).to eq("+33 1 39 30 83 00") + expect(subject.technical_contacts[0].fax).to eq(nil) + expect(subject.technical_contacts[0].email).to eq("hostmaster@nic.fr") + expect(subject.technical_contacts[0].updated_on).to eq(DateTime.parse("2005-08-23 16:13:17 UTC")) + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers.size).to eq(3) + expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[0].name).to eq("ns1.nic.fr") + expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[1].name).to eq("ns2.nic.fr") + expect(subject.nameservers[2]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[2].name).to eq("ns3.nic.fr") end end diff --git a/spec/whois/parsers/responses/whois.nic.sh/sh/status_available_spec.rb b/spec/whois/parsers/responses/whois.nic.sh/sh/status_available_spec.rb index 5bd2ae95..991f9c5c 100644 --- a/spec/whois/parsers/responses/whois.nic.sh/sh/status_available_spec.rb +++ b/spec/whois/parsers/responses/whois.nic.sh/sh/status_available_spec.rb @@ -11,86 +11,31 @@ # require 'spec_helper' -require 'whois/parsers/whois.nic.sh.rb' -describe Whois::Parsers::WhoisNicSh, "status_available.expected" do +describe "whois.nic.sh", :aggregate_failures do subject do file = fixture("responses", "whois.nic.sh/sh/status_available.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.nic.sh") + Whois::Parser.parser_for(part) end - describe "#disclaimer" do - it do - expect { subject.disclaimer }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#domain" do - it do - expect(subject.domain).to eq(nil) - end - end - describe "#domain_id" do - it do - expect(subject.domain_id).to eq(nil) - end - end - describe "#status" do - it do - expect(subject.status).to eq(:available) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(true) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(false) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to eq(nil) - end - end - describe "#updated_on" do - it do - expect(subject.updated_on).to eq(nil) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to eq(nil) - end - end - describe "#registrar" do - it do - expect(subject.registrar).to eq(nil) - end - end - describe "#registrant_contacts" do - it do - expect(subject.registrant_contacts).to be_a(Array) - expect(subject.registrant_contacts).to eq([]) - end - end - describe "#admin_contacts" do - it do - expect { subject.admin_contacts }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#technical_contacts" do - it do - expect { subject.technical_contacts }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers).to eq([]) - end + it "matches status_available.expected" do + expect { subject.disclaimer }.to raise_error(Whois::AttributeNotSupported) + expect(subject.domain).to eq(nil) + expect(subject.domain_id).to eq(nil) + expect(subject.status).to eq(:available) + expect(subject.available?).to eq(true) + expect(subject.registered?).to eq(false) + expect(subject.created_on).to eq(nil) + expect(subject.updated_on).to eq(nil) + expect(subject.expires_on).to eq(nil) + expect(subject.registrar).to eq(nil) + expect(subject.registrant_contacts).to be_a(Array) + expect(subject.registrant_contacts).to eq([]) + expect { subject.admin_contacts }.to raise_error(Whois::AttributeNotSupported) + expect { subject.technical_contacts }.to raise_error(Whois::AttributeNotSupported) + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers).to eq([]) end end diff --git a/spec/whois/parsers/responses/whois.nic.sh/sh/status_registered_spec.rb b/spec/whois/parsers/responses/whois.nic.sh/sh/status_registered_spec.rb index 6b2b48cb..4c75e88e 100644 --- a/spec/whois/parsers/responses/whois.nic.sh/sh/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.nic.sh/sh/status_registered_spec.rb @@ -11,112 +11,57 @@ # require 'spec_helper' -require 'whois/parsers/whois.nic.sh.rb' -describe Whois::Parsers::WhoisNicSh, "status_registered.expected" do +describe "whois.nic.sh", :aggregate_failures do subject do file = fixture("responses", "whois.nic.sh/sh/status_registered.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.nic.sh") + Whois::Parser.parser_for(part) end - describe "#disclaimer" do - it do - expect { subject.disclaimer }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#domain" do - it do - expect(subject.domain).to eq("google.sh") - end - end - describe "#domain_id" do - it do - expect(subject.domain_id).to eq("D503300000040555710-LRMS") - end - end - describe "#status" do - it do - expect(subject.status).to eq(:registered) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(false) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(true) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to be_a(Time) - expect(subject.created_on).to eq(DateTime.parse("1999-06-07 17:23:46 UTC")) - end - end - describe "#updated_on" do - it do - expect(subject.updated_on).to be_a(Time) - expect(subject.updated_on).to eq(DateTime.parse("2019-05-05 09:40:45 UTC")) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to be_a(Time) - expect(subject.expires_on).to eq(DateTime.parse("2020-06-06 17:23:46 UTC")) - end - end - describe "#registrar" do - it do - expect(subject.registrar).to be_a(Whois::Parser::Registrar) - expect(subject.registrar.id).to eq("292") - expect(subject.registrar.name).to eq("MarkMonitor Inc.") - expect(subject.registrar.url).to eq("http://www.markmonitor.com") - end - end - describe "#registrant_contacts" do - it do - expect(subject.registrant_contacts).to be_a(Array) - expect(subject.registrant_contacts.size).to eq(1) - expect(subject.registrant_contacts[0]).to be_a(Whois::Parser::Contact) - expect(subject.registrant_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_REGISTRANT) - expect(subject.registrant_contacts[0].id).to eq(nil) - expect(subject.registrant_contacts[0].name).to eq(nil) - expect(subject.registrant_contacts[0].organization).to eq("Google Inc.") - expect(subject.registrant_contacts[0].address).to eq(nil) - expect(subject.registrant_contacts[0].city).to eq(nil) - expect(subject.registrant_contacts[0].zip).to eq(nil) - expect(subject.registrant_contacts[0].state).to eq("CA") - expect(subject.registrant_contacts[0].country).to eq(nil) - expect(subject.registrant_contacts[0].country_code).to eq("US") - expect(subject.registrant_contacts[0].phone).to eq(nil) - expect(subject.registrant_contacts[0].fax).to eq(nil) - expect(subject.registrant_contacts[0].email).to eq(nil) - expect(subject.registrant_contacts[0].created_on).to eq(nil) - expect(subject.registrant_contacts[0].updated_on).to eq(nil) - end - end - describe "#admin_contacts" do - it do - expect { subject.admin_contacts }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#technical_contacts" do - it do - expect { subject.technical_contacts }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers.size).to eq(2) - expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[0].name).to eq("ns1.google.com") - expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[1].name).to eq("ns2.google.com") - end + it "matches status_registered.expected" do + expect { subject.disclaimer }.to raise_error(Whois::AttributeNotSupported) + expect(subject.domain).to eq("google.sh") + expect(subject.domain_id).to eq("D503300000040555710-LRMS") + expect(subject.status).to eq(:registered) + expect(subject.available?).to eq(false) + expect(subject.registered?).to eq(true) + expect(subject.created_on).to be_a(Time) + expect(subject.created_on).to eq(DateTime.parse("1999-06-07 17:23:46 UTC")) + expect(subject.updated_on).to be_a(Time) + expect(subject.updated_on).to eq(DateTime.parse("2019-05-05 09:40:45 UTC")) + expect(subject.expires_on).to be_a(Time) + expect(subject.expires_on).to eq(DateTime.parse("2020-06-06 17:23:46 UTC")) + expect(subject.registrar).to be_a(Whois::Parser::Registrar) + expect(subject.registrar.id).to eq("292") + expect(subject.registrar.name).to eq("MarkMonitor Inc.") + expect(subject.registrar.url).to eq("http://www.markmonitor.com") + expect(subject.registrant_contacts).to be_a(Array) + expect(subject.registrant_contacts.size).to eq(1) + expect(subject.registrant_contacts[0]).to be_a(Whois::Parser::Contact) + expect(subject.registrant_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_REGISTRANT) + expect(subject.registrant_contacts[0].id).to eq(nil) + expect(subject.registrant_contacts[0].name).to eq(nil) + expect(subject.registrant_contacts[0].organization).to eq("Google Inc.") + expect(subject.registrant_contacts[0].address).to eq(nil) + expect(subject.registrant_contacts[0].city).to eq(nil) + expect(subject.registrant_contacts[0].zip).to eq(nil) + expect(subject.registrant_contacts[0].state).to eq("CA") + expect(subject.registrant_contacts[0].country).to eq(nil) + expect(subject.registrant_contacts[0].country_code).to eq("US") + expect(subject.registrant_contacts[0].phone).to eq(nil) + expect(subject.registrant_contacts[0].fax).to eq(nil) + expect(subject.registrant_contacts[0].email).to eq(nil) + expect(subject.registrant_contacts[0].created_on).to eq(nil) + expect(subject.registrant_contacts[0].updated_on).to eq(nil) + expect { subject.admin_contacts }.to raise_error(Whois::AttributeNotSupported) + expect { subject.technical_contacts }.to raise_error(Whois::AttributeNotSupported) + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers.size).to eq(2) + expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[0].name).to eq("ns1.google.com") + expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[1].name).to eq("ns2.google.com") end end diff --git a/spec/whois/parsers/responses/whois.nic.sl/sl/status_available_spec.rb b/spec/whois/parsers/responses/whois.nic.sl/sl/status_available_spec.rb index a633eb25..b0f3ccd6 100644 --- a/spec/whois/parsers/responses/whois.nic.sl/sl/status_available_spec.rb +++ b/spec/whois/parsers/responses/whois.nic.sl/sl/status_available_spec.rb @@ -11,50 +11,23 @@ # require 'spec_helper' -require 'whois/parsers/whois.nic.sl.rb' -describe Whois::Parsers::WhoisNicSl, "status_available.expected" do +describe "whois.nic.sl", :aggregate_failures do subject do file = fixture("responses", "whois.nic.sl/sl/status_available.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.nic.sl") + Whois::Parser.parser_for(part) end - describe "#status" do - it do - expect(subject.status).to eq(:available) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(true) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(false) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to eq(nil) - end - end - describe "#updated_on" do - it do - expect(subject.updated_on).to eq(nil) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to eq(nil) - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers).to eq([]) - end + it "matches status_available.expected" do + expect(subject.status).to eq(:available) + expect(subject.available?).to eq(true) + expect(subject.registered?).to eq(false) + expect(subject.created_on).to eq(nil) + expect(subject.updated_on).to eq(nil) + expect(subject.expires_on).to eq(nil) + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers).to eq([]) end end diff --git a/spec/whois/parsers/responses/whois.nic.sl/sl/status_registered_spec.rb b/spec/whois/parsers/responses/whois.nic.sl/sl/status_registered_spec.rb index 74bb1705..6cc64484 100644 --- a/spec/whois/parsers/responses/whois.nic.sl/sl/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.nic.sl/sl/status_registered_spec.rb @@ -11,60 +11,33 @@ # require 'spec_helper' -require 'whois/parsers/whois.nic.sl.rb' -describe Whois::Parsers::WhoisNicSl, "status_registered.expected" do +describe "whois.nic.sl", :aggregate_failures do subject do file = fixture("responses", "whois.nic.sl/sl/status_registered.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.nic.sl") + Whois::Parser.parser_for(part) end - describe "#status" do - it do - expect(subject.status).to eq(:registered) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(false) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(true) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to be_a(Time) - expect(subject.created_on).to eq(DateTime.parse("2008-05-18")) - end - end - describe "#updated_on" do - it do - expect(subject.updated_on).to eq(nil) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to be_a(Time) - expect(subject.expires_on).to eq(DateTime.parse("2011-05-18")) - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers.size).to eq(4) - expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[0].name).to eq("ns1.google.com") - expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[1].name).to eq("ns2.google.com") - expect(subject.nameservers[2]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[2].name).to eq("ns3.google.com") - expect(subject.nameservers[3]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[3].name).to eq("ns4.google.com") - end + it "matches status_registered.expected" do + expect(subject.status).to eq(:registered) + expect(subject.available?).to eq(false) + expect(subject.registered?).to eq(true) + expect(subject.created_on).to be_a(Time) + expect(subject.created_on).to eq(DateTime.parse("2008-05-18")) + expect(subject.updated_on).to eq(nil) + expect(subject.expires_on).to be_a(Time) + expect(subject.expires_on).to eq(DateTime.parse("2011-05-18")) + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers.size).to eq(4) + expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[0].name).to eq("ns1.google.com") + expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[1].name).to eq("ns2.google.com") + expect(subject.nameservers[2]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[2].name).to eq("ns3.google.com") + expect(subject.nameservers[3]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[3].name).to eq("ns4.google.com") end end diff --git a/spec/whois/parsers/responses/whois.nic.sm/sm/status_available_spec.rb b/spec/whois/parsers/responses/whois.nic.sm/sm/status_available_spec.rb index 39454c2a..1418264e 100644 --- a/spec/whois/parsers/responses/whois.nic.sm/sm/status_available_spec.rb +++ b/spec/whois/parsers/responses/whois.nic.sm/sm/status_available_spec.rb @@ -11,50 +11,23 @@ # require 'spec_helper' -require 'whois/parsers/whois.nic.sm.rb' -describe Whois::Parsers::WhoisNicSm, "status_available.expected" do +describe "whois.nic.sm", :aggregate_failures do subject do file = fixture("responses", "whois.nic.sm/sm/status_available.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.nic.sm") + Whois::Parser.parser_for(part) end - describe "#status" do - it do - expect(subject.status).to eq(:available) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(true) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(false) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to eq(nil) - end - end - describe "#updated_on" do - it do - expect(subject.updated_on).to eq(nil) - end - end - describe "#expires_on" do - it do - expect { subject.expires_on }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers).to eq([]) - end + it "matches status_available.expected" do + expect(subject.status).to eq(:available) + expect(subject.available?).to eq(true) + expect(subject.registered?).to eq(false) + expect(subject.created_on).to eq(nil) + expect(subject.updated_on).to eq(nil) + expect { subject.expires_on }.to raise_error(Whois::AttributeNotSupported) + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers).to eq([]) end end diff --git a/spec/whois/parsers/responses/whois.nic.sm/sm/status_registered_spec.rb b/spec/whois/parsers/responses/whois.nic.sm/sm/status_registered_spec.rb index d64aa09a..72cc2adc 100644 --- a/spec/whois/parsers/responses/whois.nic.sm/sm/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.nic.sm/sm/status_registered_spec.rb @@ -11,60 +11,33 @@ # require 'spec_helper' -require 'whois/parsers/whois.nic.sm.rb' -describe Whois::Parsers::WhoisNicSm, "status_registered.expected" do +describe "whois.nic.sm", :aggregate_failures do subject do file = fixture("responses", "whois.nic.sm/sm/status_registered.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.nic.sm") + Whois::Parser.parser_for(part) end - describe "#status" do - it do - expect(subject.status).to eq(:registered) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(false) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(true) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to be_a(Time) - expect(subject.created_on).to eq(DateTime.parse("2003-04-03 00:00:00 UTC")) - end - end - describe "#updated_on" do - it do - expect(subject.updated_on).to be_a(Time) - expect(subject.updated_on).to eq(DateTime.parse("2008-08-01 00:00:00 UTC")) - end - end - describe "#expires_on" do - it do - expect { subject.expires_on }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers.size).to eq(4) - expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[0].name).to eq("ns1.google.com") - expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[1].name).to eq("ns2.google.com") - expect(subject.nameservers[2]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[2].name).to eq("ns3.google.com") - expect(subject.nameservers[3]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[3].name).to eq("ns4.google.com") - end + it "matches status_registered.expected" do + expect(subject.status).to eq(:registered) + expect(subject.available?).to eq(false) + expect(subject.registered?).to eq(true) + expect(subject.created_on).to be_a(Time) + expect(subject.created_on).to eq(DateTime.parse("2003-04-03 00:00:00 UTC")) + expect(subject.updated_on).to be_a(Time) + expect(subject.updated_on).to eq(DateTime.parse("2008-08-01 00:00:00 UTC")) + expect { subject.expires_on }.to raise_error(Whois::AttributeNotSupported) + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers.size).to eq(4) + expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[0].name).to eq("ns1.google.com") + expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[1].name).to eq("ns2.google.com") + expect(subject.nameservers[2]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[2].name).to eq("ns3.google.com") + expect(subject.nameservers[3]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[3].name).to eq("ns4.google.com") end end diff --git a/spec/whois/parsers/responses/whois.nic.sn/sn/status_available_spec.rb b/spec/whois/parsers/responses/whois.nic.sn/sn/status_available_spec.rb index 2a634ffb..19567195 100644 --- a/spec/whois/parsers/responses/whois.nic.sn/sn/status_available_spec.rb +++ b/spec/whois/parsers/responses/whois.nic.sn/sn/status_available_spec.rb @@ -11,88 +11,33 @@ # require 'spec_helper' -require 'whois/parsers/whois.nic.sn.rb' -describe Whois::Parsers::WhoisNicSn, "status_available.expected" do +describe "whois.nic.sn", :aggregate_failures do subject do file = fixture("responses", "whois.nic.sn/sn/status_available.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.nic.sn") + Whois::Parser.parser_for(part) end - describe "#disclaimer" do - it do - expect { subject.disclaimer }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#domain" do - it do - expect(subject.domain).to eq("u34jedzcq.sn") - end - end - describe "#domain_id" do - it do - expect { subject.domain_id }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#status" do - it do - expect(subject.status).to eq(:available) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(true) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(false) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to eq(nil) - end - end - describe "#updated_on" do - it do - expect { subject.updated_on }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#expires_on" do - it do - expect { subject.expires_on }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#registrar" do - it do - expect(subject.registrar).to eq(nil) - end - end - describe "#registrant_contacts" do - it do - expect(subject.registrant_contacts).to be_a(Array) - expect(subject.registrant_contacts).to eq([]) - end - end - describe "#admin_contacts" do - it do - expect(subject.admin_contacts).to be_a(Array) - expect(subject.admin_contacts).to eq([]) - end - end - describe "#technical_contacts" do - it do - expect(subject.technical_contacts).to be_a(Array) - expect(subject.technical_contacts).to eq([]) - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers).to eq([]) - end + it "matches status_available.expected" do + expect { subject.disclaimer }.to raise_error(Whois::AttributeNotSupported) + expect(subject.domain).to eq("u34jedzcq.sn") + expect { subject.domain_id }.to raise_error(Whois::AttributeNotSupported) + expect(subject.status).to eq(:available) + expect(subject.available?).to eq(true) + expect(subject.registered?).to eq(false) + expect(subject.created_on).to eq(nil) + expect { subject.updated_on }.to raise_error(Whois::AttributeNotSupported) + expect { subject.expires_on }.to raise_error(Whois::AttributeNotSupported) + expect(subject.registrar).to eq(nil) + expect(subject.registrant_contacts).to be_a(Array) + expect(subject.registrant_contacts).to eq([]) + expect(subject.admin_contacts).to be_a(Array) + expect(subject.admin_contacts).to eq([]) + expect(subject.technical_contacts).to be_a(Array) + expect(subject.technical_contacts).to eq([]) + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers).to eq([]) end end diff --git a/spec/whois/parsers/responses/whois.nic.sn/sn/status_registered_spec.rb b/spec/whois/parsers/responses/whois.nic.sn/sn/status_registered_spec.rb index 92040999..67a325cd 100644 --- a/spec/whois/parsers/responses/whois.nic.sn/sn/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.nic.sn/sn/status_registered_spec.rb @@ -11,111 +11,56 @@ # require 'spec_helper' -require 'whois/parsers/whois.nic.sn.rb' -describe Whois::Parsers::WhoisNicSn, "status_registered.expected" do +describe "whois.nic.sn", :aggregate_failures do subject do file = fixture("responses", "whois.nic.sn/sn/status_registered.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.nic.sn") + Whois::Parser.parser_for(part) end - describe "#disclaimer" do - it do - expect { subject.disclaimer }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#domain" do - it do - expect(subject.domain).to eq("google.sn") - end - end - describe "#domain_id" do - it do - expect { subject.domain_id }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#status" do - it do - expect(subject.status).to eq(:registered) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(false) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(true) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to be_a(Time) - expect(subject.created_on).to eq(DateTime.parse("2008-05-08 17:59:38")) - end - end - describe "#updated_on" do - it do - expect { subject.updated_on }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#expires_on" do - it do - expect { subject.expires_on }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#registrar" do - it do - expect(subject.registrar).to be_a(Whois::Parser::Registrar) - expect(subject.registrar.id).to eq("registry") - expect(subject.registrar.name).to eq("registry") - end - end - describe "#registrant_contacts" do - it do - expect(subject.registrant_contacts).to be_a(Array) - expect(subject.registrant_contacts.size).to eq(1) - expect(subject.registrant_contacts[0]).to be_a(Whois::Parser::Contact) - expect(subject.registrant_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_REGISTRANT) - expect(subject.registrant_contacts[0].id).to eq("C4-SN") - expect(subject.registrant_contacts[0].name).to eq("C4-SN") - end - end - describe "#admin_contacts" do - it do - expect(subject.admin_contacts).to be_a(Array) - expect(subject.admin_contacts.size).to eq(1) - expect(subject.admin_contacts[0]).to be_a(Whois::Parser::Contact) - expect(subject.admin_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_ADMINISTRATIVE) - expect(subject.admin_contacts[0].id).to eq("C5-SN") - expect(subject.admin_contacts[0].name).to eq("C5-SN") - end - end - describe "#technical_contacts" do - it do - expect(subject.technical_contacts).to be_a(Array) - expect(subject.technical_contacts.size).to eq(1) - expect(subject.technical_contacts[0]).to be_a(Whois::Parser::Contact) - expect(subject.technical_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_TECHNICAL) - expect(subject.technical_contacts[0].id).to eq("C6-SN") - expect(subject.technical_contacts[0].name).to eq("C6-SN") - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers.size).to eq(4) - expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[0].name).to eq("ns1.google.com") - expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[1].name).to eq("ns2.google.com") - expect(subject.nameservers[2]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[2].name).to eq("ns3.google.com") - expect(subject.nameservers[3]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[3].name).to eq("ns4.google.com") - end + it "matches status_registered.expected" do + expect { subject.disclaimer }.to raise_error(Whois::AttributeNotSupported) + expect(subject.domain).to eq("google.sn") + expect { subject.domain_id }.to raise_error(Whois::AttributeNotSupported) + expect(subject.status).to eq(:registered) + expect(subject.available?).to eq(false) + expect(subject.registered?).to eq(true) + expect(subject.created_on).to be_a(Time) + expect(subject.created_on).to eq(DateTime.parse("2008-05-08 17:59:38")) + expect { subject.updated_on }.to raise_error(Whois::AttributeNotSupported) + expect { subject.expires_on }.to raise_error(Whois::AttributeNotSupported) + expect(subject.registrar).to be_a(Whois::Parser::Registrar) + expect(subject.registrar.id).to eq("registry") + expect(subject.registrar.name).to eq("registry") + expect(subject.registrant_contacts).to be_a(Array) + expect(subject.registrant_contacts.size).to eq(1) + expect(subject.registrant_contacts[0]).to be_a(Whois::Parser::Contact) + expect(subject.registrant_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_REGISTRANT) + expect(subject.registrant_contacts[0].id).to eq("C4-SN") + expect(subject.registrant_contacts[0].name).to eq("C4-SN") + expect(subject.admin_contacts).to be_a(Array) + expect(subject.admin_contacts.size).to eq(1) + expect(subject.admin_contacts[0]).to be_a(Whois::Parser::Contact) + expect(subject.admin_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_ADMINISTRATIVE) + expect(subject.admin_contacts[0].id).to eq("C5-SN") + expect(subject.admin_contacts[0].name).to eq("C5-SN") + expect(subject.technical_contacts).to be_a(Array) + expect(subject.technical_contacts.size).to eq(1) + expect(subject.technical_contacts[0]).to be_a(Whois::Parser::Contact) + expect(subject.technical_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_TECHNICAL) + expect(subject.technical_contacts[0].id).to eq("C6-SN") + expect(subject.technical_contacts[0].name).to eq("C6-SN") + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers.size).to eq(4) + expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[0].name).to eq("ns1.google.com") + expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[1].name).to eq("ns2.google.com") + expect(subject.nameservers[2]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[2].name).to eq("ns3.google.com") + expect(subject.nameservers[3]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[3].name).to eq("ns4.google.com") end end diff --git a/spec/whois/parsers/responses/whois.nic.so/so/status_available_spec.rb b/spec/whois/parsers/responses/whois.nic.so/so/status_available_spec.rb index d47a5418..71420ee6 100644 --- a/spec/whois/parsers/responses/whois.nic.so/so/status_available_spec.rb +++ b/spec/whois/parsers/responses/whois.nic.so/so/status_available_spec.rb @@ -11,50 +11,23 @@ # require 'spec_helper' -require 'whois/parsers/whois.nic.so.rb' -describe Whois::Parsers::WhoisNicSo, "status_available.expected" do +describe "whois.nic.so", :aggregate_failures do subject do file = fixture("responses", "whois.nic.so/so/status_available.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.nic.so") + Whois::Parser.parser_for(part) end - describe "#status" do - it do - expect(subject.status).to eq([]) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(true) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(false) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to eq(nil) - end - end - describe "#updated_on" do - it do - expect(subject.updated_on).to eq(nil) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to eq(nil) - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers).to eq([]) - end + it "matches status_available.expected" do + expect(subject.status).to eq([]) + expect(subject.available?).to eq(true) + expect(subject.registered?).to eq(false) + expect(subject.created_on).to eq(nil) + expect(subject.updated_on).to eq(nil) + expect(subject.expires_on).to eq(nil) + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers).to eq([]) end end diff --git a/spec/whois/parsers/responses/whois.nic.so/so/status_registered_spec.rb b/spec/whois/parsers/responses/whois.nic.so/so/status_registered_spec.rb index 7e5cb473..60a67cc2 100644 --- a/spec/whois/parsers/responses/whois.nic.so/so/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.nic.so/so/status_registered_spec.rb @@ -11,61 +11,34 @@ # require 'spec_helper' -require 'whois/parsers/whois.nic.so.rb' -describe Whois::Parsers::WhoisNicSo, "status_registered.expected" do +describe "whois.nic.so", :aggregate_failures do subject do file = fixture("responses", "whois.nic.so/so/status_registered.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.nic.so") + Whois::Parser.parser_for(part) end - describe "#status" do - it do - expect(subject.status).to eq(["serverDeleteProhibited", "serverTransferProhibited"]) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(false) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(true) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to be_a(Time) - expect(subject.created_on).to eq(DateTime.parse("2011-01-24 02:22:24 UTC")) - end - end - describe "#updated_on" do - it do - expect(subject.updated_on).to be_a(Time) - expect(subject.updated_on).to eq(DateTime.parse("2011-01-25 04:20:26 UTC")) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to be_a(Time) - expect(subject.expires_on).to eq(DateTime.parse("2014-01-24 02:22:24 UTC")) - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers.size).to eq(4) - expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[0].name).to eq("ns1.google.com") - expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[1].name).to eq("ns2.google.com") - expect(subject.nameservers[2]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[2].name).to eq("ns3.google.com") - expect(subject.nameservers[3]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[3].name).to eq("ns4.google.com") - end + it "matches status_registered.expected" do + expect(subject.status).to eq(["serverDeleteProhibited", "serverTransferProhibited"]) + expect(subject.available?).to eq(false) + expect(subject.registered?).to eq(true) + expect(subject.created_on).to be_a(Time) + expect(subject.created_on).to eq(DateTime.parse("2011-01-24 02:22:24 UTC")) + expect(subject.updated_on).to be_a(Time) + expect(subject.updated_on).to eq(DateTime.parse("2011-01-25 04:20:26 UTC")) + expect(subject.expires_on).to be_a(Time) + expect(subject.expires_on).to eq(DateTime.parse("2014-01-24 02:22:24 UTC")) + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers.size).to eq(4) + expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[0].name).to eq("ns1.google.com") + expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[1].name).to eq("ns2.google.com") + expect(subject.nameservers[2]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[2].name).to eq("ns3.google.com") + expect(subject.nameservers[3]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[3].name).to eq("ns4.google.com") end end diff --git a/spec/whois/parsers/responses/whois.nic.space/space/status_available_spec.rb b/spec/whois/parsers/responses/whois.nic.space/space/status_available_spec.rb index 0292936a..d1f369d3 100644 --- a/spec/whois/parsers/responses/whois.nic.space/space/status_available_spec.rb +++ b/spec/whois/parsers/responses/whois.nic.space/space/status_available_spec.rb @@ -11,88 +11,33 @@ # require 'spec_helper' -require 'whois/parsers/whois.nic.space.rb' -describe Whois::Parsers::WhoisNicSpace, "status_available.expected" do +describe "whois.nic.space", :aggregate_failures do subject do file = fixture("responses", "whois.nic.space/space/status_available.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.nic.space") + Whois::Parser.parser_for(part) end - describe "#disclaimer" do - it do - expect(subject.disclaimer).to eq(nil) - end - end - describe "#domain" do - it do - expect(subject.domain).to eq(nil) - end - end - describe "#domain_id" do - it do - expect(subject.domain_id).to eq(nil) - end - end - describe "#status" do - it do - expect(subject.status).to eq([]) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(true) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(false) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to eq(nil) - end - end - describe "#updated_on" do - it do - expect(subject.updated_on).to eq(nil) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to eq(nil) - end - end - describe "#registrar" do - it do - expect(subject.registrar).to eq(nil) - end - end - describe "#registrant_contacts" do - it do - expect(subject.registrant_contacts).to be_a(Array) - expect(subject.registrant_contacts).to eq([]) - end - end - describe "#admin_contacts" do - it do - expect(subject.admin_contacts).to be_a(Array) - expect(subject.admin_contacts).to eq([]) - end - end - describe "#technical_contacts" do - it do - expect(subject.technical_contacts).to be_a(Array) - expect(subject.technical_contacts).to eq([]) - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers).to eq([]) - end + it "matches status_available.expected" do + expect(subject.disclaimer).to eq(nil) + expect(subject.domain).to eq(nil) + expect(subject.domain_id).to eq(nil) + expect(subject.status).to eq([]) + expect(subject.available?).to eq(true) + expect(subject.registered?).to eq(false) + expect(subject.created_on).to eq(nil) + expect(subject.updated_on).to eq(nil) + expect(subject.expires_on).to eq(nil) + expect(subject.registrar).to eq(nil) + expect(subject.registrant_contacts).to be_a(Array) + expect(subject.registrant_contacts).to eq([]) + expect(subject.admin_contacts).to be_a(Array) + expect(subject.admin_contacts).to eq([]) + expect(subject.technical_contacts).to be_a(Array) + expect(subject.technical_contacts).to eq([]) + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers).to eq([]) end end diff --git a/spec/whois/parsers/responses/whois.nic.space/space/status_registered_spec.rb b/spec/whois/parsers/responses/whois.nic.space/space/status_registered_spec.rb index 5ae31d31..28f97da6 100644 --- a/spec/whois/parsers/responses/whois.nic.space/space/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.nic.space/space/status_registered_spec.rb @@ -11,154 +11,99 @@ # require 'spec_helper' -require 'whois/parsers/whois.nic.space.rb' -describe Whois::Parsers::WhoisNicSpace, "status_registered.expected" do +describe "whois.nic.space", :aggregate_failures do subject do file = fixture("responses", "whois.nic.space/space/status_registered.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.nic.space") + Whois::Parser.parser_for(part) end - describe "#disclaimer" do - it do - expect(subject.disclaimer).to eq("Access to the whois service is rate limited. For more information, please see https://registrar-console.centralnic.com/pub/whois_guidance.") - end - end - describe "#domain" do - it do - expect(subject.domain).to eq("nic.space") - end - end - describe "#domain_id" do - it do - expect(subject.domain_id).to eq("D2361836-CNIC") - end - end - describe "#status" do - it do - expect(subject.status).to eq(["ok https://icann.org/epp#ok"]) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(false) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(true) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to be_a(Time) - expect(subject.created_on).to eq(DateTime.parse("2014-04-10T09:14:07.0Z")) - end - end - describe "#updated_on" do - it do - expect(subject.updated_on).to be_a(Time) - expect(subject.updated_on).to eq(DateTime.parse("2015-04-04T00:14:21.0Z")) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to be_a(Time) - expect(subject.expires_on).to eq(DateTime.parse("2016-04-10T23:59:59.0Z")) - end - end - describe "#registrar" do - it do - expect(subject.registrar).to be_a(Whois::Parser::Registrar) - expect(subject.registrar.id).to eq("9999") - expect(subject.registrar.name).to eq("CentralNic Ltd") - expect(subject.registrar.url).to eq(nil) - end - end - describe "#registrant_contacts" do - it do - expect(subject.registrant_contacts).to be_a(Array) - expect(subject.registrant_contacts.size).to eq(1) - expect(subject.registrant_contacts[0]).to be_a(Whois::Parser::Contact) - expect(subject.registrant_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_REGISTRANT) - expect(subject.registrant_contacts[0].id).to eq("C11480") - expect(subject.registrant_contacts[0].name).to eq("Domain Administrator") - expect(subject.registrant_contacts[0].organization).to eq("CentralNic Ltd") - expect(subject.registrant_contacts[0].address).to eq("35-39 Moorgate") - expect(subject.registrant_contacts[0].city).to eq("London") - expect(subject.registrant_contacts[0].zip).to eq("EC2R 6AR") - expect(subject.registrant_contacts[0].state).to eq("") - expect(subject.registrant_contacts[0].country).to eq(nil) - expect(subject.registrant_contacts[0].country_code).to eq("GB") - expect(subject.registrant_contacts[0].phone).to eq("+44.2033880600") - expect(subject.registrant_contacts[0].fax).to eq("+44.2033880601") - expect(subject.registrant_contacts[0].email).to eq("domains@centralnic.com") - expect(subject.registrant_contacts[0].created_on).to eq(nil) - expect(subject.registrant_contacts[0].updated_on).to eq(nil) - end - end - describe "#admin_contacts" do - it do - expect(subject.admin_contacts).to be_a(Array) - expect(subject.admin_contacts.size).to eq(1) - expect(subject.admin_contacts[0]).to be_a(Whois::Parser::Contact) - expect(subject.admin_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_ADMINISTRATIVE) - expect(subject.admin_contacts[0].id).to eq("C11480") - expect(subject.admin_contacts[0].name).to eq("Domain Administrator") - expect(subject.admin_contacts[0].organization).to eq("CentralNic Ltd") - expect(subject.admin_contacts[0].address).to eq("35-39 Moorgate") - expect(subject.admin_contacts[0].city).to eq("London") - expect(subject.admin_contacts[0].zip).to eq("EC2R 6AR") - expect(subject.admin_contacts[0].state).to eq("") - expect(subject.admin_contacts[0].country).to eq(nil) - expect(subject.admin_contacts[0].country_code).to eq("GB") - expect(subject.admin_contacts[0].phone).to eq("+44.2033880600") - expect(subject.admin_contacts[0].fax).to eq("+44.2033880601") - expect(subject.admin_contacts[0].email).to eq("domains@centralnic.com") - expect(subject.admin_contacts[0].created_on).to eq(nil) - expect(subject.admin_contacts[0].updated_on).to eq(nil) - end - end - describe "#technical_contacts" do - it do - expect(subject.technical_contacts).to be_a(Array) - expect(subject.technical_contacts.size).to eq(1) - expect(subject.technical_contacts[0]).to be_a(Whois::Parser::Contact) - expect(subject.technical_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_TECHNICAL) - expect(subject.technical_contacts[0].id).to eq("C11480") - expect(subject.technical_contacts[0].name).to eq("Domain Administrator") - expect(subject.technical_contacts[0].organization).to eq("CentralNic Ltd") - expect(subject.technical_contacts[0].address).to eq("35-39 Moorgate") - expect(subject.technical_contacts[0].city).to eq("London") - expect(subject.technical_contacts[0].zip).to eq("EC2R 6AR") - expect(subject.technical_contacts[0].state).to eq("") - expect(subject.technical_contacts[0].country).to eq(nil) - expect(subject.technical_contacts[0].country_code).to eq("GB") - expect(subject.technical_contacts[0].phone).to eq("+44.2033880600") - expect(subject.technical_contacts[0].fax).to eq("+44.2033880601") - expect(subject.technical_contacts[0].email).to eq("domains@centralnic.com") - expect(subject.technical_contacts[0].created_on).to eq(nil) - expect(subject.technical_contacts[0].updated_on).to eq(nil) - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers.size).to eq(6) - expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[0].name).to eq("ns0.centralnic-dns.com") - expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[1].name).to eq("ns1.centralnic-dns.com") - expect(subject.nameservers[2]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[2].name).to eq("ns2.centralnic-dns.com") - expect(subject.nameservers[3]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[3].name).to eq("ns3.centralnic-dns.com") - expect(subject.nameservers[4]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[4].name).to eq("ns4.centralnic-dns.com") - expect(subject.nameservers[5]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[5].name).to eq("ns5.centralnic-dns.com") - end + it "matches status_registered.expected" do + expect(subject.disclaimer).to eq("Access to the whois service is rate limited. For more information, please see https://registrar-console.centralnic.com/pub/whois_guidance.") + expect(subject.domain).to eq("nic.space") + expect(subject.domain_id).to eq("D2361836-CNIC") + expect(subject.status).to eq(["ok https://icann.org/epp#ok"]) + expect(subject.available?).to eq(false) + expect(subject.registered?).to eq(true) + expect(subject.created_on).to be_a(Time) + expect(subject.created_on).to eq(DateTime.parse("2014-04-10T09:14:07.0Z")) + expect(subject.updated_on).to be_a(Time) + expect(subject.updated_on).to eq(DateTime.parse("2015-04-04T00:14:21.0Z")) + expect(subject.expires_on).to be_a(Time) + expect(subject.expires_on).to eq(DateTime.parse("2016-04-10T23:59:59.0Z")) + expect(subject.registrar).to be_a(Whois::Parser::Registrar) + expect(subject.registrar.id).to eq("9999") + expect(subject.registrar.name).to eq("CentralNic Ltd") + expect(subject.registrar.url).to eq(nil) + expect(subject.registrant_contacts).to be_a(Array) + expect(subject.registrant_contacts.size).to eq(1) + expect(subject.registrant_contacts[0]).to be_a(Whois::Parser::Contact) + expect(subject.registrant_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_REGISTRANT) + expect(subject.registrant_contacts[0].id).to eq("C11480") + expect(subject.registrant_contacts[0].name).to eq("Domain Administrator") + expect(subject.registrant_contacts[0].organization).to eq("CentralNic Ltd") + expect(subject.registrant_contacts[0].address).to eq("35-39 Moorgate") + expect(subject.registrant_contacts[0].city).to eq("London") + expect(subject.registrant_contacts[0].zip).to eq("EC2R 6AR") + expect(subject.registrant_contacts[0].state).to eq("") + expect(subject.registrant_contacts[0].country).to eq(nil) + expect(subject.registrant_contacts[0].country_code).to eq("GB") + expect(subject.registrant_contacts[0].phone).to eq("+44.2033880600") + expect(subject.registrant_contacts[0].fax).to eq("+44.2033880601") + expect(subject.registrant_contacts[0].email).to eq("domains@centralnic.com") + expect(subject.registrant_contacts[0].created_on).to eq(nil) + expect(subject.registrant_contacts[0].updated_on).to eq(nil) + expect(subject.admin_contacts).to be_a(Array) + expect(subject.admin_contacts.size).to eq(1) + expect(subject.admin_contacts[0]).to be_a(Whois::Parser::Contact) + expect(subject.admin_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_ADMINISTRATIVE) + expect(subject.admin_contacts[0].id).to eq("C11480") + expect(subject.admin_contacts[0].name).to eq("Domain Administrator") + expect(subject.admin_contacts[0].organization).to eq("CentralNic Ltd") + expect(subject.admin_contacts[0].address).to eq("35-39 Moorgate") + expect(subject.admin_contacts[0].city).to eq("London") + expect(subject.admin_contacts[0].zip).to eq("EC2R 6AR") + expect(subject.admin_contacts[0].state).to eq("") + expect(subject.admin_contacts[0].country).to eq(nil) + expect(subject.admin_contacts[0].country_code).to eq("GB") + expect(subject.admin_contacts[0].phone).to eq("+44.2033880600") + expect(subject.admin_contacts[0].fax).to eq("+44.2033880601") + expect(subject.admin_contacts[0].email).to eq("domains@centralnic.com") + expect(subject.admin_contacts[0].created_on).to eq(nil) + expect(subject.admin_contacts[0].updated_on).to eq(nil) + expect(subject.technical_contacts).to be_a(Array) + expect(subject.technical_contacts.size).to eq(1) + expect(subject.technical_contacts[0]).to be_a(Whois::Parser::Contact) + expect(subject.technical_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_TECHNICAL) + expect(subject.technical_contacts[0].id).to eq("C11480") + expect(subject.technical_contacts[0].name).to eq("Domain Administrator") + expect(subject.technical_contacts[0].organization).to eq("CentralNic Ltd") + expect(subject.technical_contacts[0].address).to eq("35-39 Moorgate") + expect(subject.technical_contacts[0].city).to eq("London") + expect(subject.technical_contacts[0].zip).to eq("EC2R 6AR") + expect(subject.technical_contacts[0].state).to eq("") + expect(subject.technical_contacts[0].country).to eq(nil) + expect(subject.technical_contacts[0].country_code).to eq("GB") + expect(subject.technical_contacts[0].phone).to eq("+44.2033880600") + expect(subject.technical_contacts[0].fax).to eq("+44.2033880601") + expect(subject.technical_contacts[0].email).to eq("domains@centralnic.com") + expect(subject.technical_contacts[0].created_on).to eq(nil) + expect(subject.technical_contacts[0].updated_on).to eq(nil) + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers.size).to eq(6) + expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[0].name).to eq("ns0.centralnic-dns.com") + expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[1].name).to eq("ns1.centralnic-dns.com") + expect(subject.nameservers[2]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[2].name).to eq("ns2.centralnic-dns.com") + expect(subject.nameservers[3]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[3].name).to eq("ns3.centralnic-dns.com") + expect(subject.nameservers[4]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[4].name).to eq("ns4.centralnic-dns.com") + expect(subject.nameservers[5]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[5].name).to eq("ns5.centralnic-dns.com") end end diff --git a/spec/whois/parsers/responses/whois.nic.st/st/status_available_spec.rb b/spec/whois/parsers/responses/whois.nic.st/st/status_available_spec.rb index dc3e13a8..7aca2bdb 100644 --- a/spec/whois/parsers/responses/whois.nic.st/st/status_available_spec.rb +++ b/spec/whois/parsers/responses/whois.nic.st/st/status_available_spec.rb @@ -11,50 +11,23 @@ # require 'spec_helper' -require 'whois/parsers/whois.nic.st.rb' -describe Whois::Parsers::WhoisNicSt, "status_available.expected" do +describe "whois.nic.st", :aggregate_failures do subject do file = fixture("responses", "whois.nic.st/st/status_available.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.nic.st") + Whois::Parser.parser_for(part) end - describe "#status" do - it do - expect(subject.status).to eq(:available) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(true) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(false) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to eq(nil) - end - end - describe "#updated_on" do - it do - expect(subject.updated_on).to eq(nil) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to eq(nil) - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers).to eq([]) - end + it "matches status_available.expected" do + expect(subject.status).to eq(:available) + expect(subject.available?).to eq(true) + expect(subject.registered?).to eq(false) + expect(subject.created_on).to eq(nil) + expect(subject.updated_on).to eq(nil) + expect(subject.expires_on).to eq(nil) + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers).to eq([]) end end diff --git a/spec/whois/parsers/responses/whois.nic.st/st/status_registered_spec.rb b/spec/whois/parsers/responses/whois.nic.st/st/status_registered_spec.rb index d86af077..931a55d8 100644 --- a/spec/whois/parsers/responses/whois.nic.st/st/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.nic.st/st/status_registered_spec.rb @@ -11,61 +11,34 @@ # require 'spec_helper' -require 'whois/parsers/whois.nic.st.rb' -describe Whois::Parsers::WhoisNicSt, "status_registered.expected" do +describe "whois.nic.st", :aggregate_failures do subject do file = fixture("responses", "whois.nic.st/st/status_registered.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.nic.st") + Whois::Parser.parser_for(part) end - describe "#status" do - it do - expect(subject.status).to eq(:registered) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(false) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(true) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to be_a(Time) - expect(subject.created_on).to eq(DateTime.parse("2004-06-15")) - end - end - describe "#updated_on" do - it do - expect(subject.updated_on).to be_a(Time) - expect(subject.updated_on).to eq(DateTime.parse("2017-05-14")) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to be_a(Time) - expect(subject.expires_on).to eq(DateTime.parse("2018-06-15")) - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers.size).to eq(4) - expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[0].name).to eq("ns3.google.com") - expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[1].name).to eq("ns1.google.com") - expect(subject.nameservers[2]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[2].name).to eq("ns4.google.com") - expect(subject.nameservers[3]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[3].name).to eq("ns2.google.com") - end + it "matches status_registered.expected" do + expect(subject.status).to eq(:registered) + expect(subject.available?).to eq(false) + expect(subject.registered?).to eq(true) + expect(subject.created_on).to be_a(Time) + expect(subject.created_on).to eq(DateTime.parse("2004-06-15")) + expect(subject.updated_on).to be_a(Time) + expect(subject.updated_on).to eq(DateTime.parse("2017-05-14")) + expect(subject.expires_on).to be_a(Time) + expect(subject.expires_on).to eq(DateTime.parse("2018-06-15")) + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers.size).to eq(4) + expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[0].name).to eq("ns3.google.com") + expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[1].name).to eq("ns1.google.com") + expect(subject.nameservers[2]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[2].name).to eq("ns4.google.com") + expect(subject.nameservers[3]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[3].name).to eq("ns2.google.com") end end diff --git a/spec/whois/parsers/responses/whois.nic.systems/systems/status_available_premium_spec.rb b/spec/whois/parsers/responses/whois.nic.systems/systems/status_available_premium_spec.rb new file mode 100644 index 00000000..9113a884 --- /dev/null +++ b/spec/whois/parsers/responses/whois.nic.systems/systems/status_available_premium_spec.rb @@ -0,0 +1,42 @@ +# encoding: utf-8 + +# This file is autogenerated. Do not edit it manually. +# If you want change the content of this file, edit +# +# /spec/fixtures/responses/whois.nic.systems/systems/status_available_premium.expected +# +# and regenerate the tests with the following rake task +# +# $ rake spec:generate +# + +require 'spec_helper' + +describe "whois.nic.systems", :aggregate_failures do + + subject do + file = fixture("responses", "whois.nic.systems/systems/status_available_premium.txt") + part = Whois::Record::Part.new(body: File.read(file), host: "whois.nic.systems") + Whois::Parser.parser_for(part) + end + + it "matches status_available_premium.expected" do + expect(subject.domain).to eq(nil) + expect(subject.domain_id).to eq(nil) + expect(subject.status).to eq(:available) + expect(subject.available?).to eq(true) + expect(subject.registered?).to eq(false) + expect(subject.created_on).to eq(nil) + expect(subject.updated_on).to eq(nil) + expect(subject.expires_on).to eq(nil) + expect(subject.registrar).to eq(nil) + expect(subject.registrant_contacts).to be_a(Array) + expect(subject.registrant_contacts).to eq([]) + expect(subject.admin_contacts).to be_a(Array) + expect(subject.admin_contacts).to eq([]) + expect(subject.technical_contacts).to be_a(Array) + expect(subject.technical_contacts).to eq([]) + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers).to eq([]) + end +end diff --git a/spec/whois/parsers/responses/whois.nic.systems/systems/status_available_spec.rb b/spec/whois/parsers/responses/whois.nic.systems/systems/status_available_spec.rb new file mode 100644 index 00000000..989dde8d --- /dev/null +++ b/spec/whois/parsers/responses/whois.nic.systems/systems/status_available_spec.rb @@ -0,0 +1,42 @@ +# encoding: utf-8 + +# This file is autogenerated. Do not edit it manually. +# If you want change the content of this file, edit +# +# /spec/fixtures/responses/whois.nic.systems/systems/status_available.expected +# +# and regenerate the tests with the following rake task +# +# $ rake spec:generate +# + +require 'spec_helper' + +describe "whois.nic.systems", :aggregate_failures do + + subject do + file = fixture("responses", "whois.nic.systems/systems/status_available.txt") + part = Whois::Record::Part.new(body: File.read(file), host: "whois.nic.systems") + Whois::Parser.parser_for(part) + end + + it "matches status_available.expected" do + expect(subject.domain).to eq(nil) + expect(subject.domain_id).to eq(nil) + expect(subject.status).to eq(:available) + expect(subject.available?).to eq(true) + expect(subject.registered?).to eq(false) + expect(subject.created_on).to eq(nil) + expect(subject.updated_on).to eq(nil) + expect(subject.expires_on).to eq(nil) + expect(subject.registrar).to eq(nil) + expect(subject.registrant_contacts).to be_a(Array) + expect(subject.registrant_contacts).to eq([]) + expect(subject.admin_contacts).to be_a(Array) + expect(subject.admin_contacts).to eq([]) + expect(subject.technical_contacts).to be_a(Array) + expect(subject.technical_contacts).to eq([]) + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers).to eq([]) + end +end diff --git a/spec/whois/parsers/responses/whois.nic.systems/systems/status_registered_spec.rb b/spec/whois/parsers/responses/whois.nic.systems/systems/status_registered_spec.rb new file mode 100644 index 00000000..5326fe2d --- /dev/null +++ b/spec/whois/parsers/responses/whois.nic.systems/systems/status_registered_spec.rb @@ -0,0 +1,95 @@ +# encoding: utf-8 + +# This file is autogenerated. Do not edit it manually. +# If you want change the content of this file, edit +# +# /spec/fixtures/responses/whois.nic.systems/systems/status_registered.expected +# +# and regenerate the tests with the following rake task +# +# $ rake spec:generate +# + +require 'spec_helper' + +describe "whois.nic.systems", :aggregate_failures do + + subject do + file = fixture("responses", "whois.nic.systems/systems/status_registered.txt") + part = Whois::Record::Part.new(body: File.read(file), host: "whois.nic.systems") + Whois::Parser.parser_for(part) + end + + it "matches status_registered.expected" do + expect(subject.domain).to eq("donuts.systems") + expect(subject.domain_id).to eq("c73f4743486e4a1d8cb725fe0b0d26d7-DONUTS") + expect(subject.status).to eq(:registered) + expect(subject.available?).to eq(false) + expect(subject.registered?).to eq(true) + expect(subject.created_on).to be_a(Time) + expect(subject.created_on).to eq(DateTime.parse("2014-02-28 17:19:53 GMT")) + expect(subject.updated_on).to be_a(Time) + expect(subject.updated_on).to eq(DateTime.parse("2018-02-07 18:00:53 GMT")) + expect(subject.expires_on).to be_a(Time) + expect(subject.expires_on).to eq(DateTime.parse("2024-02-28 17:19:53 GMT")) + expect(subject.registrar).to be_a(Whois::Parser::Registrar) + expect(subject.registrar.id).to eq("9998") + expect(subject.registrar.name).to eq("Donuts Internal (9998)") + expect(subject.registrar.url).to eq("http://www.donuts.co") + expect(subject.registrant_contacts).to be_a(Array) + expect(subject.registrant_contacts.size).to eq(1) + expect(subject.registrant_contacts[0]).to be_a(Whois::Parser::Contact) + expect(subject.registrant_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_REGISTRANT) + expect(subject.registrant_contacts[0].id).to eq("REDACTED FOR PRIVACY") + expect(subject.registrant_contacts[0].name).to eq("REDACTED FOR PRIVACY") + expect(subject.registrant_contacts[0].organization).to eq("Donuts Inc.") + expect(subject.registrant_contacts[0].address).to eq("REDACTED FOR PRIVACY") + expect(subject.registrant_contacts[0].city).to eq("REDACTED FOR PRIVACY") + expect(subject.registrant_contacts[0].zip).to eq("REDACTED FOR PRIVACY") + expect(subject.registrant_contacts[0].state).to eq("WA") + expect(subject.registrant_contacts[0].country_code).to eq("US") + expect(subject.registrant_contacts[0].phone).to eq("REDACTED FOR PRIVACY ext: REDACTED FOR PRIVACY") + expect(subject.registrant_contacts[0].fax).to eq("REDACTED FOR PRIVACY ext: REDACTED FOR PRIVACY") + expect(subject.registrant_contacts[0].email).to eq("Please query the RDDS service of the Registrar of Record identified in this output for information on how to contact the Registrant, Admin, or Tech contact of the queried domain name.") + expect(subject.admin_contacts).to be_a(Array) + expect(subject.admin_contacts.size).to eq(1) + expect(subject.admin_contacts[0]).to be_a(Whois::Parser::Contact) + expect(subject.admin_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_ADMINISTRATIVE) + expect(subject.admin_contacts[0].id).to eq("REDACTED FOR PRIVACY") + expect(subject.admin_contacts[0].name).to eq("REDACTED FOR PRIVACY") + expect(subject.admin_contacts[0].organization).to eq("REDACTED FOR PRIVACY") + expect(subject.admin_contacts[0].address).to eq("REDACTED FOR PRIVACY") + expect(subject.admin_contacts[0].city).to eq("REDACTED FOR PRIVACY") + expect(subject.admin_contacts[0].zip).to eq("REDACTED FOR PRIVACY") + expect(subject.admin_contacts[0].state).to eq("REDACTED FOR PRIVACY") + expect(subject.admin_contacts[0].country_code).to eq("REDACTED FOR PRIVACY") + expect(subject.admin_contacts[0].phone).to eq("REDACTED FOR PRIVACY ext: REDACTED FOR PRIVACY") + expect(subject.admin_contacts[0].fax).to eq("REDACTED FOR PRIVACY ext: REDACTED FOR PRIVACY") + expect(subject.admin_contacts[0].email).to eq("Please query the RDDS service of the Registrar of Record identified in this output for information on how to contact the Registrant, Admin, or Tech contact of the queried domain name.") + expect(subject.technical_contacts).to be_a(Array) + expect(subject.technical_contacts.size).to eq(1) + expect(subject.technical_contacts[0]).to be_a(Whois::Parser::Contact) + expect(subject.technical_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_TECHNICAL) + expect(subject.technical_contacts[0].id).to eq("REDACTED FOR PRIVACY") + expect(subject.technical_contacts[0].name).to eq("REDACTED FOR PRIVACY") + expect(subject.technical_contacts[0].organization).to eq("REDACTED FOR PRIVACY") + expect(subject.technical_contacts[0].address).to eq("REDACTED FOR PRIVACY") + expect(subject.technical_contacts[0].city).to eq("REDACTED FOR PRIVACY") + expect(subject.technical_contacts[0].zip).to eq("REDACTED FOR PRIVACY") + expect(subject.technical_contacts[0].state).to eq("REDACTED FOR PRIVACY") + expect(subject.technical_contacts[0].country_code).to eq("REDACTED FOR PRIVACY") + expect(subject.technical_contacts[0].phone).to eq("REDACTED FOR PRIVACY ext: REDACTED FOR PRIVACY") + expect(subject.technical_contacts[0].fax).to eq("REDACTED FOR PRIVACY ext: REDACTED FOR PRIVACY") + expect(subject.technical_contacts[0].email).to eq("Please query the RDDS service of the Registrar of Record identified in this output for information on how to contact the Registrant, Admin, or Tech contact of the queried domain name.") + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers.size).to eq(4) + expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[0].name).to eq("ns-1501.awsdns-59.org") + expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[1].name).to eq("ns-380.awsdns-47.com") + expect(subject.nameservers[2]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[2].name).to eq("ns-811.awsdns-37.net") + expect(subject.nameservers[3]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[3].name).to eq("ns-1597.awsdns-07.co.uk") + end +end diff --git a/spec/whois/parsers/responses/whois.nic.systems/systems/status_reserved_spec.rb b/spec/whois/parsers/responses/whois.nic.systems/systems/status_reserved_spec.rb new file mode 100644 index 00000000..af92e263 --- /dev/null +++ b/spec/whois/parsers/responses/whois.nic.systems/systems/status_reserved_spec.rb @@ -0,0 +1,42 @@ +# encoding: utf-8 + +# This file is autogenerated. Do not edit it manually. +# If you want change the content of this file, edit +# +# /spec/fixtures/responses/whois.nic.systems/systems/status_reserved.expected +# +# and regenerate the tests with the following rake task +# +# $ rake spec:generate +# + +require 'spec_helper' + +describe "whois.nic.systems", :aggregate_failures do + + subject do + file = fixture("responses", "whois.nic.systems/systems/status_reserved.txt") + part = Whois::Record::Part.new(body: File.read(file), host: "whois.nic.systems") + Whois::Parser.parser_for(part) + end + + it "matches status_reserved.expected" do + expect(subject.domain).to eq(nil) + expect(subject.domain_id).to eq(nil) + expect(subject.status).to eq(:reserved) + expect(subject.available?).to eq(false) + expect(subject.registered?).to eq(true) + expect(subject.created_on).to eq(nil) + expect(subject.updated_on).to eq(nil) + expect(subject.expires_on).to eq(nil) + expect(subject.registrar).to eq(nil) + expect(subject.registrant_contacts).to be_a(Array) + expect(subject.registrant_contacts).to eq([]) + expect(subject.admin_contacts).to be_a(Array) + expect(subject.admin_contacts).to eq([]) + expect(subject.technical_contacts).to be_a(Array) + expect(subject.technical_contacts).to eq([]) + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers).to eq([]) + end +end diff --git a/spec/whois/parsers/responses/whois.nic.tc/tc/status_available_spec.rb b/spec/whois/parsers/responses/whois.nic.tc/tc/status_available_spec.rb index 15be694b..a2047576 100644 --- a/spec/whois/parsers/responses/whois.nic.tc/tc/status_available_spec.rb +++ b/spec/whois/parsers/responses/whois.nic.tc/tc/status_available_spec.rb @@ -11,65 +11,26 @@ # require 'spec_helper' -require 'whois/parsers/whois.nic.tc.rb' -describe Whois::Parsers::WhoisNicTc, "status_available.expected" do +describe "whois.nic.tc", :aggregate_failures do subject do file = fixture("responses", "whois.nic.tc/tc/status_available.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.nic.tc") + Whois::Parser.parser_for(part) end - describe "#domain" do - it do - expect(subject.domain).to eq("u34jedzcq.tc") - end - end - describe "#domain_id" do - it do - expect(subject.domain_id).to eq(nil) - end - end - describe "#status" do - it do - expect(subject.status).to eq(:available) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(true) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(false) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to eq(nil) - end - end - describe "#updated_on" do - it do - expect(subject.updated_on).to eq(nil) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to eq(nil) - end - end - describe "#registrar" do - it do - expect(subject.registrar).to eq(nil) - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers).to eq([]) - end + it "matches status_available.expected" do + expect(subject.domain).to eq("u34jedzcq.tc") + expect(subject.domain_id).to eq(nil) + expect(subject.status).to eq(:available) + expect(subject.available?).to eq(true) + expect(subject.registered?).to eq(false) + expect(subject.created_on).to eq(nil) + expect(subject.updated_on).to eq(nil) + expect(subject.expires_on).to eq(nil) + expect(subject.registrar).to eq(nil) + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers).to eq([]) end end diff --git a/spec/whois/parsers/responses/whois.nic.tc/tc/status_registered_spec.rb b/spec/whois/parsers/responses/whois.nic.tc/tc/status_registered_spec.rb index a56b4d7c..ffe30a59 100644 --- a/spec/whois/parsers/responses/whois.nic.tc/tc/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.nic.tc/tc/status_registered_spec.rb @@ -11,78 +11,39 @@ # require 'spec_helper' -require 'whois/parsers/whois.nic.tc.rb' -describe Whois::Parsers::WhoisNicTc, "status_registered.expected" do +describe "whois.nic.tc", :aggregate_failures do subject do file = fixture("responses", "whois.nic.tc/tc/status_registered.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.nic.tc") + Whois::Parser.parser_for(part) end - describe "#domain" do - it do - expect(subject.domain).to eq("google.tc") - end - end - describe "#domain_id" do - it do - expect(subject.domain_id).to eq(nil) - end - end - describe "#status" do - it do - expect(subject.status).to eq(:registered) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(false) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(true) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to be_a(Time) - expect(subject.created_on).to eq(DateTime.parse("2006-10-11 21:00:00 UTC")) - end - end - describe "#updated_on" do - it do - expect(subject.updated_on).to eq(nil) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to be_a(Time) - expect(subject.expires_on).to eq(DateTime.parse("2014-10-12 21:00:00 UTC")) - end - end - describe "#registrar" do - it do - expect(subject.registrar).to be_a(Whois::Parser::Registrar) - expect(subject.registrar.id).to eq("292") - expect(subject.registrar.name).to eq("MarkMonitor") - expect(subject.registrar.url).to eq(nil) - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers.size).to eq(4) - expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[0].name).to eq("ns1.google.com") - expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[1].name).to eq("ns2.google.com") - expect(subject.nameservers[2]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[2].name).to eq("ns3.google.com") - expect(subject.nameservers[3]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[3].name).to eq("ns4.google.com") - end + it "matches status_registered.expected" do + expect(subject.domain).to eq("google.tc") + expect(subject.domain_id).to eq(nil) + expect(subject.status).to eq(:registered) + expect(subject.available?).to eq(false) + expect(subject.registered?).to eq(true) + expect(subject.created_on).to be_a(Time) + expect(subject.created_on).to eq(DateTime.parse("2006-10-11 21:00:00 UTC")) + expect(subject.updated_on).to eq(nil) + expect(subject.expires_on).to be_a(Time) + expect(subject.expires_on).to eq(DateTime.parse("2014-10-12 21:00:00 UTC")) + expect(subject.registrar).to be_a(Whois::Parser::Registrar) + expect(subject.registrar.id).to eq("292") + expect(subject.registrar.name).to eq("MarkMonitor") + expect(subject.registrar.url).to eq(nil) + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers.size).to eq(4) + expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[0].name).to eq("ns1.google.com") + expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[1].name).to eq("ns2.google.com") + expect(subject.nameservers[2]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[2].name).to eq("ns3.google.com") + expect(subject.nameservers[3]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[3].name).to eq("ns4.google.com") end end diff --git a/spec/whois/parsers/responses/whois.nic.tech/tech/status_available_spec.rb b/spec/whois/parsers/responses/whois.nic.tech/tech/status_available_spec.rb index a382d930..005f0eb7 100644 --- a/spec/whois/parsers/responses/whois.nic.tech/tech/status_available_spec.rb +++ b/spec/whois/parsers/responses/whois.nic.tech/tech/status_available_spec.rb @@ -11,88 +11,33 @@ # require 'spec_helper' -require 'whois/parsers/whois.nic.tech.rb' -describe Whois::Parsers::WhoisNicTech, "status_available.expected" do +describe "whois.nic.tech", :aggregate_failures do subject do file = fixture("responses", "whois.nic.tech/tech/status_available.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.nic.tech") + Whois::Parser.parser_for(part) end - describe "#disclaimer" do - it do - expect(subject.disclaimer).to eq(nil) - end - end - describe "#domain" do - it do - expect(subject.domain).to eq(nil) - end - end - describe "#domain_id" do - it do - expect(subject.domain_id).to eq(nil) - end - end - describe "#status" do - it do - expect(subject.status).to eq([]) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(true) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(false) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to eq(nil) - end - end - describe "#updated_on" do - it do - expect(subject.updated_on).to eq(nil) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to eq(nil) - end - end - describe "#registrar" do - it do - expect(subject.registrar).to eq(nil) - end - end - describe "#registrant_contacts" do - it do - expect(subject.registrant_contacts).to be_a(Array) - expect(subject.registrant_contacts).to eq([]) - end - end - describe "#admin_contacts" do - it do - expect(subject.admin_contacts).to be_a(Array) - expect(subject.admin_contacts).to eq([]) - end - end - describe "#technical_contacts" do - it do - expect(subject.technical_contacts).to be_a(Array) - expect(subject.technical_contacts).to eq([]) - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers).to eq([]) - end + it "matches status_available.expected" do + expect(subject.disclaimer).to eq(nil) + expect(subject.domain).to eq(nil) + expect(subject.domain_id).to eq(nil) + expect(subject.status).to eq([]) + expect(subject.available?).to eq(true) + expect(subject.registered?).to eq(false) + expect(subject.created_on).to eq(nil) + expect(subject.updated_on).to eq(nil) + expect(subject.expires_on).to eq(nil) + expect(subject.registrar).to eq(nil) + expect(subject.registrant_contacts).to be_a(Array) + expect(subject.registrant_contacts).to eq([]) + expect(subject.admin_contacts).to be_a(Array) + expect(subject.admin_contacts).to eq([]) + expect(subject.technical_contacts).to be_a(Array) + expect(subject.technical_contacts).to eq([]) + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers).to eq([]) end end diff --git a/spec/whois/parsers/responses/whois.nic.tech/tech/status_registered_spec.rb b/spec/whois/parsers/responses/whois.nic.tech/tech/status_registered_spec.rb index a34179b1..3f677aca 100644 --- a/spec/whois/parsers/responses/whois.nic.tech/tech/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.nic.tech/tech/status_registered_spec.rb @@ -11,152 +11,97 @@ # require 'spec_helper' -require 'whois/parsers/whois.nic.tech.rb' -describe Whois::Parsers::WhoisNicTech, "status_registered.expected" do +describe "whois.nic.tech", :aggregate_failures do subject do file = fixture("responses", "whois.nic.tech/tech/status_registered.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.nic.tech") + Whois::Parser.parser_for(part) end - describe "#disclaimer" do - it do - expect(subject.disclaimer).to eq("Access to the whois service is rate limited. For more information, please see https://registrar-console.centralnic.com/pub/whois_guidance.") - end - end - describe "#domain" do - it do - expect(subject.domain).to eq("google.tech") - end - end - describe "#domain_id" do - it do - expect(subject.domain_id).to eq("D9157622-CNIC") - end - end - describe "#status" do - it do - expect(subject.status).to eq(["serverTransferProhibited https://icann.org/epp#serverTransferProhibited", "clientTransferProhibited https://icann.org/epp#clientTransferProhibited", "clientUpdateProhibited https://icann.org/epp#clientUpdateProhibited", "clientDeleteProhibited https://icann.org/epp#clientDeleteProhibited"]) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(false) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(true) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to be_a(Time) - expect(subject.created_on).to eq(DateTime.parse("2015-07-29 00:00:00 UTC")) - end - end - describe "#updated_on" do - it do - expect(subject.updated_on).to be_a(Time) - expect(subject.updated_on).to eq(DateTime.parse("2015-08-04 09:00:43 UTC")) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to be_a(Time) - expect(subject.expires_on).to eq(DateTime.parse("2017-07-29 23:59:59 UTC")) - end - end - describe "#registrar" do - it do - expect(subject.registrar).to be_a(Whois::Parser::Registrar) - expect(subject.registrar.id).to eq("292") - expect(subject.registrar.name).to eq("MarkMonitor, Inc (TLDs)") - expect(subject.registrar.url).to eq(nil) - end - end - describe "#registrant_contacts" do - it do - expect(subject.registrant_contacts).to be_a(Array) - expect(subject.registrant_contacts.size).to eq(1) - expect(subject.registrant_contacts[0]).to be_a(Whois::Parser::Contact) - expect(subject.registrant_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_REGISTRANT) - expect(subject.registrant_contacts[0].id).to eq("mmr-87489") - expect(subject.registrant_contacts[0].name).to eq("DNS Admin") - expect(subject.registrant_contacts[0].organization).to eq("Google Inc.") - expect(subject.registrant_contacts[0].address).to eq("1600 Amphitheatre Parkway") - expect(subject.registrant_contacts[0].city).to eq("Mountain View") - expect(subject.registrant_contacts[0].zip).to eq("94043") - expect(subject.registrant_contacts[0].state).to eq("CA") - expect(subject.registrant_contacts[0].country).to eq(nil) - expect(subject.registrant_contacts[0].country_code).to eq("US") - expect(subject.registrant_contacts[0].phone).to eq("+1.6502530000") - expect(subject.registrant_contacts[0].fax).to eq("+1.6502530001") - expect(subject.registrant_contacts[0].email).to eq("dns-admin@google.com") - end - end - describe "#admin_contacts" do - it do - expect(subject.admin_contacts).to be_a(Array) - expect(subject.admin_contacts.size).to eq(1) - expect(subject.admin_contacts[0]).to be_a(Whois::Parser::Contact) - expect(subject.admin_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_ADMINISTRATIVE) - expect(subject.admin_contacts[0].id).to eq("mmr-87489") - expect(subject.admin_contacts[0].name).to eq("DNS Admin") - expect(subject.admin_contacts[0].organization).to eq("Google Inc.") - expect(subject.admin_contacts[0].address).to eq("1600 Amphitheatre Parkway") - expect(subject.admin_contacts[0].city).to eq("Mountain View") - expect(subject.admin_contacts[0].zip).to eq("94043") - expect(subject.admin_contacts[0].state).to eq("CA") - expect(subject.admin_contacts[0].country).to eq(nil) - expect(subject.admin_contacts[0].country_code).to eq("US") - expect(subject.admin_contacts[0].phone).to eq("+1.6502530000") - expect(subject.admin_contacts[0].fax).to eq("+1.6502530001") - expect(subject.admin_contacts[0].email).to eq("dns-admin@google.com") - end - end - describe "#technical_contacts" do - it do - expect(subject.technical_contacts).to be_a(Array) - expect(subject.technical_contacts.size).to eq(1) - expect(subject.technical_contacts[0]).to be_a(Whois::Parser::Contact) - expect(subject.technical_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_TECHNICAL) - expect(subject.technical_contacts[0].id).to eq("mmr-87489") - expect(subject.technical_contacts[0].name).to eq("DNS Admin") - expect(subject.technical_contacts[0].organization).to eq("Google Inc.") - expect(subject.technical_contacts[0].address).to eq("1600 Amphitheatre Parkway") - expect(subject.technical_contacts[0].city).to eq("Mountain View") - expect(subject.technical_contacts[0].zip).to eq("94043") - expect(subject.technical_contacts[0].state).to eq("CA") - expect(subject.technical_contacts[0].country).to eq(nil) - expect(subject.technical_contacts[0].country_code).to eq("US") - expect(subject.technical_contacts[0].phone).to eq("+1.6502530000") - expect(subject.technical_contacts[0].fax).to eq("+1.6502530001") - expect(subject.technical_contacts[0].email).to eq("dns-admin@google.com") - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers.size).to eq(4) - expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[0].name).to eq("ns2.google.com") - expect(subject.nameservers[0].ipv4).to eq(nil) - expect(subject.nameservers[0].ipv6).to eq(nil) - expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[1].name).to eq("ns4.google.com") - expect(subject.nameservers[1].ipv4).to eq(nil) - expect(subject.nameservers[1].ipv6).to eq(nil) - expect(subject.nameservers[2]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[2].name).to eq("ns3.google.com") - expect(subject.nameservers[2].ipv4).to eq(nil) - expect(subject.nameservers[2].ipv6).to eq(nil) - expect(subject.nameservers[3]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[3].name).to eq("ns1.google.com") - expect(subject.nameservers[3].ipv4).to eq(nil) - expect(subject.nameservers[3].ipv6).to eq(nil) - end + it "matches status_registered.expected" do + expect(subject.disclaimer).to eq("Access to the whois service is rate limited. For more information, please see https://registrar-console.centralnic.com/pub/whois_guidance.") + expect(subject.domain).to eq("google.tech") + expect(subject.domain_id).to eq("D9157622-CNIC") + expect(subject.status).to eq(["serverTransferProhibited https://icann.org/epp#serverTransferProhibited", "clientTransferProhibited https://icann.org/epp#clientTransferProhibited", "clientUpdateProhibited https://icann.org/epp#clientUpdateProhibited", "clientDeleteProhibited https://icann.org/epp#clientDeleteProhibited"]) + expect(subject.available?).to eq(false) + expect(subject.registered?).to eq(true) + expect(subject.created_on).to be_a(Time) + expect(subject.created_on).to eq(DateTime.parse("2015-07-29 00:00:00 UTC")) + expect(subject.updated_on).to be_a(Time) + expect(subject.updated_on).to eq(DateTime.parse("2015-08-04 09:00:43 UTC")) + expect(subject.expires_on).to be_a(Time) + expect(subject.expires_on).to eq(DateTime.parse("2017-07-29 23:59:59 UTC")) + expect(subject.registrar).to be_a(Whois::Parser::Registrar) + expect(subject.registrar.id).to eq("292") + expect(subject.registrar.name).to eq("MarkMonitor, Inc (TLDs)") + expect(subject.registrar.url).to eq(nil) + expect(subject.registrant_contacts).to be_a(Array) + expect(subject.registrant_contacts.size).to eq(1) + expect(subject.registrant_contacts[0]).to be_a(Whois::Parser::Contact) + expect(subject.registrant_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_REGISTRANT) + expect(subject.registrant_contacts[0].id).to eq("mmr-87489") + expect(subject.registrant_contacts[0].name).to eq("DNS Admin") + expect(subject.registrant_contacts[0].organization).to eq("Google Inc.") + expect(subject.registrant_contacts[0].address).to eq("1600 Amphitheatre Parkway") + expect(subject.registrant_contacts[0].city).to eq("Mountain View") + expect(subject.registrant_contacts[0].zip).to eq("94043") + expect(subject.registrant_contacts[0].state).to eq("CA") + expect(subject.registrant_contacts[0].country).to eq(nil) + expect(subject.registrant_contacts[0].country_code).to eq("US") + expect(subject.registrant_contacts[0].phone).to eq("+1.6502530000") + expect(subject.registrant_contacts[0].fax).to eq("+1.6502530001") + expect(subject.registrant_contacts[0].email).to eq("dns-admin@google.com") + expect(subject.admin_contacts).to be_a(Array) + expect(subject.admin_contacts.size).to eq(1) + expect(subject.admin_contacts[0]).to be_a(Whois::Parser::Contact) + expect(subject.admin_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_ADMINISTRATIVE) + expect(subject.admin_contacts[0].id).to eq("mmr-87489") + expect(subject.admin_contacts[0].name).to eq("DNS Admin") + expect(subject.admin_contacts[0].organization).to eq("Google Inc.") + expect(subject.admin_contacts[0].address).to eq("1600 Amphitheatre Parkway") + expect(subject.admin_contacts[0].city).to eq("Mountain View") + expect(subject.admin_contacts[0].zip).to eq("94043") + expect(subject.admin_contacts[0].state).to eq("CA") + expect(subject.admin_contacts[0].country).to eq(nil) + expect(subject.admin_contacts[0].country_code).to eq("US") + expect(subject.admin_contacts[0].phone).to eq("+1.6502530000") + expect(subject.admin_contacts[0].fax).to eq("+1.6502530001") + expect(subject.admin_contacts[0].email).to eq("dns-admin@google.com") + expect(subject.technical_contacts).to be_a(Array) + expect(subject.technical_contacts.size).to eq(1) + expect(subject.technical_contacts[0]).to be_a(Whois::Parser::Contact) + expect(subject.technical_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_TECHNICAL) + expect(subject.technical_contacts[0].id).to eq("mmr-87489") + expect(subject.technical_contacts[0].name).to eq("DNS Admin") + expect(subject.technical_contacts[0].organization).to eq("Google Inc.") + expect(subject.technical_contacts[0].address).to eq("1600 Amphitheatre Parkway") + expect(subject.technical_contacts[0].city).to eq("Mountain View") + expect(subject.technical_contacts[0].zip).to eq("94043") + expect(subject.technical_contacts[0].state).to eq("CA") + expect(subject.technical_contacts[0].country).to eq(nil) + expect(subject.technical_contacts[0].country_code).to eq("US") + expect(subject.technical_contacts[0].phone).to eq("+1.6502530000") + expect(subject.technical_contacts[0].fax).to eq("+1.6502530001") + expect(subject.technical_contacts[0].email).to eq("dns-admin@google.com") + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers.size).to eq(4) + expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[0].name).to eq("ns2.google.com") + expect(subject.nameservers[0].ipv4).to eq(nil) + expect(subject.nameservers[0].ipv6).to eq(nil) + expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[1].name).to eq("ns4.google.com") + expect(subject.nameservers[1].ipv4).to eq(nil) + expect(subject.nameservers[1].ipv6).to eq(nil) + expect(subject.nameservers[2]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[2].name).to eq("ns3.google.com") + expect(subject.nameservers[2].ipv4).to eq(nil) + expect(subject.nameservers[2].ipv6).to eq(nil) + expect(subject.nameservers[3]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[3].name).to eq("ns1.google.com") + expect(subject.nameservers[3].ipv4).to eq(nil) + expect(subject.nameservers[3].ipv6).to eq(nil) end end diff --git a/spec/whois/parsers/responses/whois.nic.tel/tel/status_available_spec.rb b/spec/whois/parsers/responses/whois.nic.tel/tel/status_available_spec.rb index d14e6706..31a52292 100644 --- a/spec/whois/parsers/responses/whois.nic.tel/tel/status_available_spec.rb +++ b/spec/whois/parsers/responses/whois.nic.tel/tel/status_available_spec.rb @@ -11,83 +11,32 @@ # require 'spec_helper' -require 'whois/parsers/whois.nic.tel.rb' -describe Whois::Parsers::WhoisNicTel, "status_available.expected" do +describe "whois.nic.tel", :aggregate_failures do subject do file = fixture("responses", "whois.nic.tel/tel/status_available.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.nic.tel") + Whois::Parser.parser_for(part) end - describe "#domain" do - it do - expect(subject.domain).to eq("u34jedzcq.tel") - end - end - describe "#domain_id" do - it do - expect(subject.domain_id).to eq(nil) - end - end - describe "#status" do - it do - expect(subject.status).to eq(nil) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(true) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(false) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to eq(nil) - end - end - describe "#updated_on" do - it do - expect(subject.updated_on).to eq(nil) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to eq(nil) - end - end - describe "#registrar" do - it do - expect(subject.registrar).to eq(nil) - end - end - describe "#registrant_contacts" do - it do - expect(subject.registrant_contacts).to be_a(Array) - expect(subject.registrant_contacts).to eq([]) - end - end - describe "#admin_contacts" do - it do - expect(subject.admin_contacts).to be_a(Array) - expect(subject.admin_contacts).to eq([]) - end - end - describe "#technical_contacts" do - it do - expect(subject.technical_contacts).to be_a(Array) - expect(subject.technical_contacts).to eq([]) - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers).to eq([]) - end + it "matches status_available.expected" do + expect(subject.domain).to eq("u34jedzcq.tel") + expect(subject.domain_id).to eq(nil) + expect(subject.status).to eq(nil) + expect(subject.available?).to eq(true) + expect(subject.registered?).to eq(false) + expect(subject.created_on).to eq(nil) + expect(subject.updated_on).to eq(nil) + expect(subject.expires_on).to eq(nil) + expect(subject.registrar).to eq(nil) + expect(subject.registrant_contacts).to be_a(Array) + expect(subject.registrant_contacts).to eq([]) + expect(subject.admin_contacts).to be_a(Array) + expect(subject.admin_contacts).to eq([]) + expect(subject.technical_contacts).to be_a(Array) + expect(subject.technical_contacts).to eq([]) + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers).to eq([]) end end diff --git a/spec/whois/parsers/responses/whois.nic.tel/tel/status_registered_spec.rb b/spec/whois/parsers/responses/whois.nic.tel/tel/status_registered_spec.rb index 5a385a72..aa78e4db 100644 --- a/spec/whois/parsers/responses/whois.nic.tel/tel/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.nic.tel/tel/status_registered_spec.rb @@ -11,140 +11,89 @@ # require 'spec_helper' -require 'whois/parsers/whois.nic.tel.rb' -describe Whois::Parsers::WhoisNicTel, "status_registered.expected" do +describe "whois.nic.tel", :aggregate_failures do subject do file = fixture("responses", "whois.nic.tel/tel/status_registered.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.nic.tel") + Whois::Parser.parser_for(part) end - describe "#domain" do - it do - expect(subject.domain).to eq("google.tel") - end - end - describe "#domain_id" do - it do - expect(subject.domain_id).to eq("D587349-TEL") - end - end - describe "#status" do - it do - expect(subject.status).to eq(["clientDeleteProhibited", "clientTransferProhibited", "clientUpdateProhibited"]) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(false) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(true) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to be_a(Time) - expect(subject.created_on).to eq(DateTime.parse("2009-03-23 23:59:59 GMT")) - end - end - describe "#updated_on" do - it do - expect(subject.updated_on).to be_a(Time) - expect(subject.updated_on).to eq(DateTime.parse("2013-02-19 10:23:33 GMT")) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to be_a(Time) - expect(subject.expires_on).to eq(DateTime.parse("2014-03-22 23:59:59 GMT")) - end - end - describe "#registrar" do - it do - expect(subject.registrar).to be_a(Whois::Parser::Registrar) - expect(subject.registrar.id).to eq("292") - expect(subject.registrar.name).to eq("MARKMONITOR, INC.") - end - end - describe "#registrant_contacts" do - it do - expect(subject.registrant_contacts).to be_a(Array) - expect(subject.registrant_contacts.size).to eq(1) - expect(subject.registrant_contacts[0]).to be_a(Whois::Parser::Contact) - expect(subject.registrant_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_REGISTRANT) - expect(subject.registrant_contacts[0].id).to eq("MMR-2383") - expect(subject.registrant_contacts[0].name).to eq("DNS Admin") - expect(subject.registrant_contacts[0].organization).to eq("Google Inc.") - expect(subject.registrant_contacts[0].address).to eq("1600 Amphitheatre Parkway") - expect(subject.registrant_contacts[0].city).to eq("Mountain View") - expect(subject.registrant_contacts[0].zip).to eq("94043") - expect(subject.registrant_contacts[0].state).to eq("CA") - expect(subject.registrant_contacts[0].country).to eq("United States") - expect(subject.registrant_contacts[0].country_code).to eq("US") - expect(subject.registrant_contacts[0].phone).to eq("+1.6502530000") - expect(subject.registrant_contacts[0].fax).to eq("+1.6506188571") - expect(subject.registrant_contacts[0].email).to eq("dns-admin@google.com") - end - end - describe "#admin_contacts" do - it do - expect(subject.admin_contacts).to be_a(Array) - expect(subject.admin_contacts.size).to eq(1) - expect(subject.admin_contacts[0]).to be_a(Whois::Parser::Contact) - expect(subject.admin_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_ADMINISTRATIVE) - expect(subject.admin_contacts[0].id).to eq("MMR-2383") - expect(subject.admin_contacts[0].name).to eq("DNS Admin") - expect(subject.admin_contacts[0].organization).to eq("Google Inc.") - expect(subject.admin_contacts[0].address).to eq("1600 Amphitheatre Parkway") - expect(subject.admin_contacts[0].city).to eq("Mountain View") - expect(subject.admin_contacts[0].zip).to eq("94043") - expect(subject.admin_contacts[0].state).to eq("CA") - expect(subject.admin_contacts[0].country).to eq("United States") - expect(subject.admin_contacts[0].country_code).to eq("US") - expect(subject.admin_contacts[0].phone).to eq("+1.6502530000") - expect(subject.admin_contacts[0].fax).to eq("+1.6506188571") - expect(subject.admin_contacts[0].email).to eq("dns-admin@google.com") - end - end - describe "#technical_contacts" do - it do - expect(subject.technical_contacts).to be_a(Array) - expect(subject.technical_contacts.size).to eq(1) - expect(subject.technical_contacts[0]).to be_a(Whois::Parser::Contact) - expect(subject.technical_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_TECHNICAL) - expect(subject.technical_contacts[0].id).to eq("MMR-2383") - expect(subject.technical_contacts[0].name).to eq("DNS Admin") - expect(subject.technical_contacts[0].organization).to eq("Google Inc.") - expect(subject.technical_contacts[0].address).to eq("1600 Amphitheatre Parkway") - expect(subject.technical_contacts[0].city).to eq("Mountain View") - expect(subject.technical_contacts[0].zip).to eq("94043") - expect(subject.technical_contacts[0].state).to eq("CA") - expect(subject.technical_contacts[0].country).to eq("United States") - expect(subject.technical_contacts[0].country_code).to eq("US") - expect(subject.technical_contacts[0].phone).to eq("+1.6502530000") - expect(subject.technical_contacts[0].fax).to eq("+1.6506188571") - expect(subject.technical_contacts[0].email).to eq("dns-admin@google.com") - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers.size).to eq(5) - expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[0].name).to eq("a0.cth.dns.nic.tel") - expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[1].name).to eq("d0.cth.dns.nic.tel") - expect(subject.nameservers[2]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[2].name).to eq("n0.cth.dns.nic.tel") - expect(subject.nameservers[3]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[3].name).to eq("s0.cth.dns.nic.tel") - expect(subject.nameservers[4]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[4].name).to eq("t0.cth.dns.nic.tel") - end + it "matches status_registered.expected" do + expect(subject.domain).to eq("google.tel") + expect(subject.domain_id).to eq("D587349-TEL") + expect(subject.status).to eq(["clientDeleteProhibited", "clientTransferProhibited", "clientUpdateProhibited"]) + expect(subject.available?).to eq(false) + expect(subject.registered?).to eq(true) + expect(subject.created_on).to be_a(Time) + expect(subject.created_on).to eq(DateTime.parse("2009-03-23 23:59:59 GMT")) + expect(subject.updated_on).to be_a(Time) + expect(subject.updated_on).to eq(DateTime.parse("2013-02-19 10:23:33 GMT")) + expect(subject.expires_on).to be_a(Time) + expect(subject.expires_on).to eq(DateTime.parse("2014-03-22 23:59:59 GMT")) + expect(subject.registrar).to be_a(Whois::Parser::Registrar) + expect(subject.registrar.id).to eq("292") + expect(subject.registrar.name).to eq("MARKMONITOR, INC.") + expect(subject.registrant_contacts).to be_a(Array) + expect(subject.registrant_contacts.size).to eq(1) + expect(subject.registrant_contacts[0]).to be_a(Whois::Parser::Contact) + expect(subject.registrant_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_REGISTRANT) + expect(subject.registrant_contacts[0].id).to eq("MMR-2383") + expect(subject.registrant_contacts[0].name).to eq("DNS Admin") + expect(subject.registrant_contacts[0].organization).to eq("Google Inc.") + expect(subject.registrant_contacts[0].address).to eq("1600 Amphitheatre Parkway") + expect(subject.registrant_contacts[0].city).to eq("Mountain View") + expect(subject.registrant_contacts[0].zip).to eq("94043") + expect(subject.registrant_contacts[0].state).to eq("CA") + expect(subject.registrant_contacts[0].country).to eq("United States") + expect(subject.registrant_contacts[0].country_code).to eq("US") + expect(subject.registrant_contacts[0].phone).to eq("+1.6502530000") + expect(subject.registrant_contacts[0].fax).to eq("+1.6506188571") + expect(subject.registrant_contacts[0].email).to eq("dns-admin@google.com") + expect(subject.admin_contacts).to be_a(Array) + expect(subject.admin_contacts.size).to eq(1) + expect(subject.admin_contacts[0]).to be_a(Whois::Parser::Contact) + expect(subject.admin_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_ADMINISTRATIVE) + expect(subject.admin_contacts[0].id).to eq("MMR-2383") + expect(subject.admin_contacts[0].name).to eq("DNS Admin") + expect(subject.admin_contacts[0].organization).to eq("Google Inc.") + expect(subject.admin_contacts[0].address).to eq("1600 Amphitheatre Parkway") + expect(subject.admin_contacts[0].city).to eq("Mountain View") + expect(subject.admin_contacts[0].zip).to eq("94043") + expect(subject.admin_contacts[0].state).to eq("CA") + expect(subject.admin_contacts[0].country).to eq("United States") + expect(subject.admin_contacts[0].country_code).to eq("US") + expect(subject.admin_contacts[0].phone).to eq("+1.6502530000") + expect(subject.admin_contacts[0].fax).to eq("+1.6506188571") + expect(subject.admin_contacts[0].email).to eq("dns-admin@google.com") + expect(subject.technical_contacts).to be_a(Array) + expect(subject.technical_contacts.size).to eq(1) + expect(subject.technical_contacts[0]).to be_a(Whois::Parser::Contact) + expect(subject.technical_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_TECHNICAL) + expect(subject.technical_contacts[0].id).to eq("MMR-2383") + expect(subject.technical_contacts[0].name).to eq("DNS Admin") + expect(subject.technical_contacts[0].organization).to eq("Google Inc.") + expect(subject.technical_contacts[0].address).to eq("1600 Amphitheatre Parkway") + expect(subject.technical_contacts[0].city).to eq("Mountain View") + expect(subject.technical_contacts[0].zip).to eq("94043") + expect(subject.technical_contacts[0].state).to eq("CA") + expect(subject.technical_contacts[0].country).to eq("United States") + expect(subject.technical_contacts[0].country_code).to eq("US") + expect(subject.technical_contacts[0].phone).to eq("+1.6502530000") + expect(subject.technical_contacts[0].fax).to eq("+1.6506188571") + expect(subject.technical_contacts[0].email).to eq("dns-admin@google.com") + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers.size).to eq(5) + expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[0].name).to eq("a0.cth.dns.nic.tel") + expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[1].name).to eq("d0.cth.dns.nic.tel") + expect(subject.nameservers[2]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[2].name).to eq("n0.cth.dns.nic.tel") + expect(subject.nameservers[3]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[3].name).to eq("s0.cth.dns.nic.tel") + expect(subject.nameservers[4]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[4].name).to eq("t0.cth.dns.nic.tel") end end diff --git a/spec/whois/parsers/responses/whois.nic.tl/tl/status_available_spec.rb b/spec/whois/parsers/responses/whois.nic.tl/tl/status_available_spec.rb index 24029658..32350224 100644 --- a/spec/whois/parsers/responses/whois.nic.tl/tl/status_available_spec.rb +++ b/spec/whois/parsers/responses/whois.nic.tl/tl/status_available_spec.rb @@ -11,65 +11,26 @@ # require 'spec_helper' -require 'whois/parsers/whois.nic.tl.rb' -describe Whois::Parsers::WhoisNicTl, "status_available.expected" do +describe "whois.nic.tl", :aggregate_failures do subject do file = fixture("responses", "whois.nic.tl/tl/status_available.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.nic.tl") + Whois::Parser.parser_for(part) end - describe "#domain" do - it do - expect(subject.domain).to eq("u34jedzcq.tl") - end - end - describe "#domain_id" do - it do - expect(subject.domain_id).to eq(nil) - end - end - describe "#status" do - it do - expect(subject.status).to eq(:available) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(true) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(false) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to eq(nil) - end - end - describe "#updated_on" do - it do - expect(subject.updated_on).to eq(nil) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to eq(nil) - end - end - describe "#registrar" do - it do - expect(subject.registrar).to eq(nil) - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers).to eq([]) - end + it "matches status_available.expected" do + expect(subject.domain).to eq("u34jedzcq.tl") + expect(subject.domain_id).to eq(nil) + expect(subject.status).to eq(:available) + expect(subject.available?).to eq(true) + expect(subject.registered?).to eq(false) + expect(subject.created_on).to eq(nil) + expect(subject.updated_on).to eq(nil) + expect(subject.expires_on).to eq(nil) + expect(subject.registrar).to eq(nil) + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers).to eq([]) end end diff --git a/spec/whois/parsers/responses/whois.nic.tl/tl/status_registered_spec.rb b/spec/whois/parsers/responses/whois.nic.tl/tl/status_registered_spec.rb index e4b81eb3..f3e3f21b 100644 --- a/spec/whois/parsers/responses/whois.nic.tl/tl/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.nic.tl/tl/status_registered_spec.rb @@ -11,75 +11,36 @@ # require 'spec_helper' -require 'whois/parsers/whois.nic.tl.rb' -describe Whois::Parsers::WhoisNicTl, "status_registered.expected" do +describe "whois.nic.tl", :aggregate_failures do subject do file = fixture("responses", "whois.nic.tl/tl/status_registered.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.nic.tl") + Whois::Parser.parser_for(part) end - describe "#domain" do - it do - expect(subject.domain).to eq("google.tl") - end - end - describe "#domain_id" do - it do - expect(subject.domain_id).to eq("19785-CoCCA") - end - end - describe "#status" do - it do - expect(subject.status).to eq(:registered) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(false) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(true) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to be_a(Time) - expect(subject.created_on).to eq(DateTime.parse("2003-05-23 12:00:00 UTC")) - end - end - describe "#updated_on" do - it do - expect(subject.updated_on).to be_a(Time) - expect(subject.updated_on).to eq(DateTime.parse("2013-12-06 07:41:57 UTC")) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to be_a(Time) - expect(subject.expires_on).to eq(DateTime.parse("2014-05-23 12:00:00 UTC")) - end - end - describe "#registrar" do - it do - expect(subject.registrar).to be_a(Whois::Parser::Registrar) - expect(subject.registrar.id).to eq(nil) - expect(subject.registrar.name).to eq("MarkMonitor") - expect(subject.registrar.url).to eq("http://www.markmonitor.com") - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers.size).to eq(2) - expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[0].name).to eq("ns1.google.com") - expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[1].name).to eq("ns2.google.com") - end + it "matches status_registered.expected" do + expect(subject.domain).to eq("google.tl") + expect(subject.domain_id).to eq("19785-CoCCA") + expect(subject.status).to eq(:registered) + expect(subject.available?).to eq(false) + expect(subject.registered?).to eq(true) + expect(subject.created_on).to be_a(Time) + expect(subject.created_on).to eq(DateTime.parse("2003-05-23 12:00:00 UTC")) + expect(subject.updated_on).to be_a(Time) + expect(subject.updated_on).to eq(DateTime.parse("2013-12-06 07:41:57 UTC")) + expect(subject.expires_on).to be_a(Time) + expect(subject.expires_on).to eq(DateTime.parse("2014-05-23 12:00:00 UTC")) + expect(subject.registrar).to be_a(Whois::Parser::Registrar) + expect(subject.registrar.id).to eq(nil) + expect(subject.registrar.name).to eq("MarkMonitor") + expect(subject.registrar.url).to eq("http://www.markmonitor.com") + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers.size).to eq(2) + expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[0].name).to eq("ns1.google.com") + expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[1].name).to eq("ns2.google.com") end end diff --git a/spec/whois/parsers/responses/whois.nic.tm/tm/status_available_spec.rb b/spec/whois/parsers/responses/whois.nic.tm/tm/status_available_spec.rb index 4d72a502..9a88131a 100644 --- a/spec/whois/parsers/responses/whois.nic.tm/tm/status_available_spec.rb +++ b/spec/whois/parsers/responses/whois.nic.tm/tm/status_available_spec.rb @@ -11,86 +11,31 @@ # require 'spec_helper' -require 'whois/parsers/whois.nic.tm.rb' -describe Whois::Parsers::WhoisNicTm, "status_available.expected" do +describe "whois.nic.tm", :aggregate_failures do subject do file = fixture("responses", "whois.nic.tm/tm/status_available.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.nic.tm") + Whois::Parser.parser_for(part) end - describe "#disclaimer" do - it do - expect { subject.disclaimer }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#domain" do - it do - expect(subject.domain).to eq("u34jedzcq.tm") - end - end - describe "#domain_id" do - it do - expect { subject.domain_id }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#status" do - it do - expect(subject.status).to eq(:available) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(true) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(false) - end - end - describe "#created_on" do - it do - expect { subject.created_on }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#updated_on" do - it do - expect { subject.updated_on }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to eq(nil) - end - end - describe "#registrar" do - it do - expect { subject.registrar }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#registrant_contacts" do - it do - expect(subject.registrant_contacts).to be_a(Array) - expect(subject.registrant_contacts).to eq([]) - end - end - describe "#admin_contacts" do - it do - expect { subject.admin_contacts }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#technical_contacts" do - it do - expect { subject.technical_contacts }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers).to eq([]) - end + it "matches status_available.expected" do + expect { subject.disclaimer }.to raise_error(Whois::AttributeNotSupported) + expect(subject.domain).to eq("u34jedzcq.tm") + expect { subject.domain_id }.to raise_error(Whois::AttributeNotSupported) + expect(subject.status).to eq(:available) + expect(subject.available?).to eq(true) + expect(subject.registered?).to eq(false) + expect { subject.created_on }.to raise_error(Whois::AttributeNotSupported) + expect { subject.updated_on }.to raise_error(Whois::AttributeNotSupported) + expect(subject.expires_on).to eq(nil) + expect { subject.registrar }.to raise_error(Whois::AttributeNotSupported) + expect(subject.registrant_contacts).to be_a(Array) + expect(subject.registrant_contacts).to eq([]) + expect { subject.admin_contacts }.to raise_error(Whois::AttributeNotSupported) + expect { subject.technical_contacts }.to raise_error(Whois::AttributeNotSupported) + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers).to eq([]) end end diff --git a/spec/whois/parsers/responses/whois.nic.tm/tm/status_registered_spec.rb b/spec/whois/parsers/responses/whois.nic.tm/tm/status_registered_spec.rb index 10685ac2..1fd7d93c 100644 --- a/spec/whois/parsers/responses/whois.nic.tm/tm/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.nic.tm/tm/status_registered_spec.rb @@ -11,95 +11,40 @@ # require 'spec_helper' -require 'whois/parsers/whois.nic.tm.rb' -describe Whois::Parsers::WhoisNicTm, "status_registered.expected" do +describe "whois.nic.tm", :aggregate_failures do subject do file = fixture("responses", "whois.nic.tm/tm/status_registered.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.nic.tm") + Whois::Parser.parser_for(part) end - describe "#disclaimer" do - it do - expect { subject.disclaimer }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#domain" do - it do - expect(subject.domain).to eq("google.tm") - end - end - describe "#domain_id" do - it do - expect { subject.domain_id }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#status" do - it do - expect(subject.status).to eq(:registered) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(false) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(true) - end - end - describe "#created_on" do - it do - expect { subject.created_on }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#updated_on" do - it do - expect { subject.updated_on }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to be_a(Time) - expect(subject.expires_on).to eq(DateTime.parse("2020-01-30")) - end - end - describe "#registrar" do - it do - expect { subject.registrar }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#registrant_contacts" do - it do - expect(subject.registrant_contacts).to be_a(Array) - expect(subject.registrant_contacts).to eq([]) - end - end - describe "#admin_contacts" do - it do - expect { subject.admin_contacts }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#technical_contacts" do - it do - expect { subject.technical_contacts }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers.size).to eq(4) - expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[0].name).to eq("ns1.google.com") - expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[1].name).to eq("ns2.google.com") - expect(subject.nameservers[2]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[2].name).to eq("ns3.google.com") - expect(subject.nameservers[3]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[3].name).to eq("ns4.google.com") - end + it "matches status_registered.expected" do + expect { subject.disclaimer }.to raise_error(Whois::AttributeNotSupported) + expect(subject.domain).to eq("google.tm") + expect { subject.domain_id }.to raise_error(Whois::AttributeNotSupported) + expect(subject.status).to eq(:registered) + expect(subject.available?).to eq(false) + expect(subject.registered?).to eq(true) + expect { subject.created_on }.to raise_error(Whois::AttributeNotSupported) + expect { subject.updated_on }.to raise_error(Whois::AttributeNotSupported) + expect(subject.expires_on).to be_a(Time) + expect(subject.expires_on).to eq(DateTime.parse("2020-01-30")) + expect { subject.registrar }.to raise_error(Whois::AttributeNotSupported) + expect(subject.registrant_contacts).to be_a(Array) + expect(subject.registrant_contacts).to eq([]) + expect { subject.admin_contacts }.to raise_error(Whois::AttributeNotSupported) + expect { subject.technical_contacts }.to raise_error(Whois::AttributeNotSupported) + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers.size).to eq(4) + expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[0].name).to eq("ns1.google.com") + expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[1].name).to eq("ns2.google.com") + expect(subject.nameservers[2]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[2].name).to eq("ns3.google.com") + expect(subject.nameservers[3]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[3].name).to eq("ns4.google.com") end end diff --git a/spec/whois/parsers/responses/whois.nic.tr/tr/property_nameservers_with_ip_spec.rb b/spec/whois/parsers/responses/whois.nic.tr/tr/property_nameservers_with_ip_spec.rb index 894e2aa3..3a5fec84 100644 --- a/spec/whois/parsers/responses/whois.nic.tr/tr/property_nameservers_with_ip_spec.rb +++ b/spec/whois/parsers/responses/whois.nic.tr/tr/property_nameservers_with_ip_spec.rb @@ -11,29 +11,26 @@ # require 'spec_helper' -require 'whois/parsers/whois.nic.tr.rb' -describe Whois::Parsers::WhoisNicTr, "property_nameservers_with_ip.expected" do +describe "whois.nic.tr", :aggregate_failures do subject do file = fixture("responses", "whois.nic.tr/tr/property_nameservers_with_ip.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.nic.tr") + Whois::Parser.parser_for(part) end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers.size).to eq(3) - expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[0].name).to eq("titan.radore.com") - expect(subject.nameservers[0].ipv4).to eq(nil) - expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[1].name).to eq("janus.radore.com") - expect(subject.nameservers[1].ipv4).to eq(nil) - expect(subject.nameservers[2]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[2].name).to eq("mimas.rh.com.tr") - expect(subject.nameservers[2].ipv4).to eq("77.75.34.2") - end + it "matches property_nameservers_with_ip.expected" do + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers.size).to eq(3) + expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[0].name).to eq("titan.radore.com") + expect(subject.nameservers[0].ipv4).to eq(nil) + expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[1].name).to eq("janus.radore.com") + expect(subject.nameservers[1].ipv4).to eq(nil) + expect(subject.nameservers[2]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[2].name).to eq("mimas.rh.com.tr") + expect(subject.nameservers[2].ipv4).to eq("77.75.34.2") end end diff --git a/spec/whois/parsers/responses/whois.nic.tr/tr/property_nameservers_with_trailing_space_spec.rb b/spec/whois/parsers/responses/whois.nic.tr/tr/property_nameservers_with_trailing_space_spec.rb index c948af9c..1a42f819 100644 --- a/spec/whois/parsers/responses/whois.nic.tr/tr/property_nameservers_with_trailing_space_spec.rb +++ b/spec/whois/parsers/responses/whois.nic.tr/tr/property_nameservers_with_trailing_space_spec.rb @@ -11,24 +11,21 @@ # require 'spec_helper' -require 'whois/parsers/whois.nic.tr.rb' -describe Whois::Parsers::WhoisNicTr, "property_nameservers_with_trailing_space.expected" do +describe "whois.nic.tr", :aggregate_failures do subject do file = fixture("responses", "whois.nic.tr/tr/property_nameservers_with_trailing_space.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.nic.tr") + Whois::Parser.parser_for(part) end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers.size).to eq(2) - expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[0].name).to eq("ns1.phpsunucu.com") - expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[1].name).to eq("ns2.phpsunucu.com") - end + it "matches property_nameservers_with_trailing_space.expected" do + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers.size).to eq(2) + expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[0].name).to eq("ns1.phpsunucu.com") + expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[1].name).to eq("ns2.phpsunucu.com") end end diff --git a/spec/whois/parsers/responses/whois.nic.tr/tr/property_registrant_contact_outside_cityinoneline_spec.rb b/spec/whois/parsers/responses/whois.nic.tr/tr/property_registrant_contact_outside_cityinoneline_spec.rb index ea22f944..168eb12f 100644 --- a/spec/whois/parsers/responses/whois.nic.tr/tr/property_registrant_contact_outside_cityinoneline_spec.rb +++ b/spec/whois/parsers/responses/whois.nic.tr/tr/property_registrant_contact_outside_cityinoneline_spec.rb @@ -11,34 +11,31 @@ # require 'spec_helper' -require 'whois/parsers/whois.nic.tr.rb' -describe Whois::Parsers::WhoisNicTr, "property_registrant_contact_outside_cityinoneline.expected" do +describe "whois.nic.tr", :aggregate_failures do subject do file = fixture("responses", "whois.nic.tr/tr/property_registrant_contact_outside_cityinoneline.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.nic.tr") + Whois::Parser.parser_for(part) end - describe "#registrant_contacts" do - it do - expect(subject.registrant_contacts).to be_a(Array) - expect(subject.registrant_contacts.size).to eq(1) - expect(subject.registrant_contacts[0]).to be_a(Whois::Parser::Contact) - expect(subject.registrant_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_REGISTRANT) - expect(subject.registrant_contacts[0].id).to eq(nil) - expect(subject.registrant_contacts[0].name).to eq("Yahoo Ýnc.") - expect(subject.registrant_contacts[0].organization).to eq(nil) - expect(subject.registrant_contacts[0].address).to eq("701 First Avenue Sunnyvale Ca 94089") - expect(subject.registrant_contacts[0].city).to eq(nil) - expect(subject.registrant_contacts[0].zip).to eq(nil) - expect(subject.registrant_contacts[0].state).to eq(nil) - expect(subject.registrant_contacts[0].country).to eq("United States of America") - expect(subject.registrant_contacts[0].country_code).to eq(nil) - expect(subject.registrant_contacts[0].phone).to eq("+ 901-408-3493300-") - expect(subject.registrant_contacts[0].fax).to eq("+ 901-408-3493301") - expect(subject.registrant_contacts[0].email).to eq("domainadmin@yahoo-inc.com") - end + it "matches property_registrant_contact_outside_cityinoneline.expected" do + expect(subject.registrant_contacts).to be_a(Array) + expect(subject.registrant_contacts.size).to eq(1) + expect(subject.registrant_contacts[0]).to be_a(Whois::Parser::Contact) + expect(subject.registrant_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_REGISTRANT) + expect(subject.registrant_contacts[0].id).to eq(nil) + expect(subject.registrant_contacts[0].name).to eq("Yahoo Ýnc.") + expect(subject.registrant_contacts[0].organization).to eq(nil) + expect(subject.registrant_contacts[0].address).to eq("701 First Avenue Sunnyvale Ca 94089") + expect(subject.registrant_contacts[0].city).to eq(nil) + expect(subject.registrant_contacts[0].zip).to eq(nil) + expect(subject.registrant_contacts[0].state).to eq(nil) + expect(subject.registrant_contacts[0].country).to eq("United States of America") + expect(subject.registrant_contacts[0].country_code).to eq(nil) + expect(subject.registrant_contacts[0].phone).to eq("+ 901-408-3493300-") + expect(subject.registrant_contacts[0].fax).to eq("+ 901-408-3493301") + expect(subject.registrant_contacts[0].email).to eq("domainadmin@yahoo-inc.com") end end diff --git a/spec/whois/parsers/responses/whois.nic.tr/tr/property_registrant_contact_outside_citynextline_spec.rb b/spec/whois/parsers/responses/whois.nic.tr/tr/property_registrant_contact_outside_citynextline_spec.rb index df32e578..378ee28e 100644 --- a/spec/whois/parsers/responses/whois.nic.tr/tr/property_registrant_contact_outside_citynextline_spec.rb +++ b/spec/whois/parsers/responses/whois.nic.tr/tr/property_registrant_contact_outside_citynextline_spec.rb @@ -11,34 +11,31 @@ # require 'spec_helper' -require 'whois/parsers/whois.nic.tr.rb' -describe Whois::Parsers::WhoisNicTr, "property_registrant_contact_outside_citynextline.expected" do +describe "whois.nic.tr", :aggregate_failures do subject do file = fixture("responses", "whois.nic.tr/tr/property_registrant_contact_outside_citynextline.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.nic.tr") + Whois::Parser.parser_for(part) end - describe "#registrant_contacts" do - it do - expect(subject.registrant_contacts).to be_a(Array) - expect(subject.registrant_contacts.size).to eq(1) - expect(subject.registrant_contacts[0]).to be_a(Whois::Parser::Contact) - expect(subject.registrant_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_REGISTRANT) - expect(subject.registrant_contacts[0].id).to eq(nil) - expect(subject.registrant_contacts[0].name).to eq("Google Inc.") - expect(subject.registrant_contacts[0].organization).to eq(nil) - expect(subject.registrant_contacts[0].address).to eq("1600 Amphitheatre Parkway\nMountain View CA") - expect(subject.registrant_contacts[0].city).to eq(nil) - expect(subject.registrant_contacts[0].zip).to eq(nil) - expect(subject.registrant_contacts[0].state).to eq(nil) - expect(subject.registrant_contacts[0].country).to eq("United States of America") - expect(subject.registrant_contacts[0].country_code).to eq(nil) - expect(subject.registrant_contacts[0].phone).to eq("+ 1-650-2530000-") - expect(subject.registrant_contacts[0].fax).to eq("+ 1-650-2530001-") - expect(subject.registrant_contacts[0].email).to eq("dns-admin@google.com") - end + it "matches property_registrant_contact_outside_citynextline.expected" do + expect(subject.registrant_contacts).to be_a(Array) + expect(subject.registrant_contacts.size).to eq(1) + expect(subject.registrant_contacts[0]).to be_a(Whois::Parser::Contact) + expect(subject.registrant_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_REGISTRANT) + expect(subject.registrant_contacts[0].id).to eq(nil) + expect(subject.registrant_contacts[0].name).to eq("Google Inc.") + expect(subject.registrant_contacts[0].organization).to eq(nil) + expect(subject.registrant_contacts[0].address).to eq("1600 Amphitheatre Parkway\nMountain View CA") + expect(subject.registrant_contacts[0].city).to eq(nil) + expect(subject.registrant_contacts[0].zip).to eq(nil) + expect(subject.registrant_contacts[0].state).to eq(nil) + expect(subject.registrant_contacts[0].country).to eq("United States of America") + expect(subject.registrant_contacts[0].country_code).to eq(nil) + expect(subject.registrant_contacts[0].phone).to eq("+ 1-650-2530000-") + expect(subject.registrant_contacts[0].fax).to eq("+ 1-650-2530001-") + expect(subject.registrant_contacts[0].email).to eq("dns-admin@google.com") end end diff --git a/spec/whois/parsers/responses/whois.nic.tr/tr/property_registrant_contact_turkey_spec.rb b/spec/whois/parsers/responses/whois.nic.tr/tr/property_registrant_contact_turkey_spec.rb index b6cde7d9..0dc48eef 100644 --- a/spec/whois/parsers/responses/whois.nic.tr/tr/property_registrant_contact_turkey_spec.rb +++ b/spec/whois/parsers/responses/whois.nic.tr/tr/property_registrant_contact_turkey_spec.rb @@ -11,34 +11,31 @@ # require 'spec_helper' -require 'whois/parsers/whois.nic.tr.rb' -describe Whois::Parsers::WhoisNicTr, "property_registrant_contact_turkey.expected" do +describe "whois.nic.tr", :aggregate_failures do subject do file = fixture("responses", "whois.nic.tr/tr/property_registrant_contact_turkey.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.nic.tr") + Whois::Parser.parser_for(part) end - describe "#registrant_contacts" do - it do - expect(subject.registrant_contacts).to be_a(Array) - expect(subject.registrant_contacts.size).to eq(1) - expect(subject.registrant_contacts[0]).to be_a(Whois::Parser::Contact) - expect(subject.registrant_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_REGISTRANT) - expect(subject.registrant_contacts[0].id).to eq(nil) - expect(subject.registrant_contacts[0].name).to eq("Hotel Bilgisayar Hizmetleri San. Tic. Turizm Ltd. Þti.") - expect(subject.registrant_contacts[0].organization).to eq(nil) - expect(subject.registrant_contacts[0].address).to eq("Cumhuriyet Cd. No:61 Bingül Han Asma Kat\nElmadað") - expect(subject.registrant_contacts[0].city).to eq("Ýstanbul") - expect(subject.registrant_contacts[0].zip).to eq(nil) - expect(subject.registrant_contacts[0].state).to eq(nil) - expect(subject.registrant_contacts[0].country).to eq("Türkiye") - expect(subject.registrant_contacts[0].country_code).to eq(nil) - expect(subject.registrant_contacts[0].phone).to eq("+ 90-212-2473997-") - expect(subject.registrant_contacts[0].fax).to eq("+ 90-212-2473995") - expect(subject.registrant_contacts[0].email).to eq("romeo6860@yahoo.com") - end + it "matches property_registrant_contact_turkey.expected" do + expect(subject.registrant_contacts).to be_a(Array) + expect(subject.registrant_contacts.size).to eq(1) + expect(subject.registrant_contacts[0]).to be_a(Whois::Parser::Contact) + expect(subject.registrant_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_REGISTRANT) + expect(subject.registrant_contacts[0].id).to eq(nil) + expect(subject.registrant_contacts[0].name).to eq("Hotel Bilgisayar Hizmetleri San. Tic. Turizm Ltd. Þti.") + expect(subject.registrant_contacts[0].organization).to eq(nil) + expect(subject.registrant_contacts[0].address).to eq("Cumhuriyet Cd. No:61 Bingül Han Asma Kat\nElmadað") + expect(subject.registrant_contacts[0].city).to eq("Ýstanbul") + expect(subject.registrant_contacts[0].zip).to eq(nil) + expect(subject.registrant_contacts[0].state).to eq(nil) + expect(subject.registrant_contacts[0].country).to eq("Türkiye") + expect(subject.registrant_contacts[0].country_code).to eq(nil) + expect(subject.registrant_contacts[0].phone).to eq("+ 90-212-2473997-") + expect(subject.registrant_contacts[0].fax).to eq("+ 90-212-2473995") + expect(subject.registrant_contacts[0].email).to eq("romeo6860@yahoo.com") end end diff --git a/spec/whois/parsers/responses/whois.nic.tr/tr/response_error_invalid_input_spec.rb b/spec/whois/parsers/responses/whois.nic.tr/tr/response_error_invalid_input_spec.rb index 8476c88e..f80cc5c1 100644 --- a/spec/whois/parsers/responses/whois.nic.tr/tr/response_error_invalid_input_spec.rb +++ b/spec/whois/parsers/responses/whois.nic.tr/tr/response_error_invalid_input_spec.rb @@ -11,29 +11,18 @@ # require 'spec_helper' -require 'whois/parsers/whois.nic.tr.rb' -describe Whois::Parsers::WhoisNicTr, "response_error_invalid_input.expected" do +describe "whois.nic.tr", :aggregate_failures do subject do file = fixture("responses", "whois.nic.tr/tr/response_error_invalid_input.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.nic.tr") + Whois::Parser.parser_for(part) end - describe "#status" do - it do - expect(subject.status).to eq(:invalid) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(false) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(false) - end + it "matches response_error_invalid_input.expected" do + expect(subject.status).to eq(:invalid) + expect(subject.available?).to eq(false) + expect(subject.registered?).to eq(false) end end diff --git a/spec/whois/parsers/responses/whois.nic.tr/tr/status_available_spec.rb b/spec/whois/parsers/responses/whois.nic.tr/tr/status_available_spec.rb index ca957a64..6d9368af 100644 --- a/spec/whois/parsers/responses/whois.nic.tr/tr/status_available_spec.rb +++ b/spec/whois/parsers/responses/whois.nic.tr/tr/status_available_spec.rb @@ -11,88 +11,33 @@ # require 'spec_helper' -require 'whois/parsers/whois.nic.tr.rb' -describe Whois::Parsers::WhoisNicTr, "status_available.expected" do +describe "whois.nic.tr", :aggregate_failures do subject do file = fixture("responses", "whois.nic.tr/tr/status_available.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.nic.tr") + Whois::Parser.parser_for(part) end - describe "#disclaimer" do - it do - expect { subject.disclaimer }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#domain" do - it do - expect { subject.domain }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#domain_id" do - it do - expect { subject.domain_id }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#status" do - it do - expect(subject.status).to eq(:available) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(true) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(false) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to eq(nil) - end - end - describe "#updated_on" do - it do - expect { subject.updated_on }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to eq(nil) - end - end - describe "#registrar" do - it do - expect { subject.registrar }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#registrant_contacts" do - it do - expect(subject.registrant_contacts).to be_a(Array) - expect(subject.registrant_contacts).to eq([]) - end - end - describe "#admin_contacts" do - it do - expect(subject.admin_contacts).to be_a(Array) - expect(subject.admin_contacts).to eq([]) - end - end - describe "#technical_contacts" do - it do - expect(subject.technical_contacts).to be_a(Array) - expect(subject.technical_contacts).to eq([]) - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers).to eq([]) - end + it "matches status_available.expected" do + expect { subject.disclaimer }.to raise_error(Whois::AttributeNotSupported) + expect { subject.domain }.to raise_error(Whois::AttributeNotSupported) + expect { subject.domain_id }.to raise_error(Whois::AttributeNotSupported) + expect(subject.status).to eq(:available) + expect(subject.available?).to eq(true) + expect(subject.registered?).to eq(false) + expect(subject.created_on).to eq(nil) + expect { subject.updated_on }.to raise_error(Whois::AttributeNotSupported) + expect(subject.expires_on).to eq(nil) + expect { subject.registrar }.to raise_error(Whois::AttributeNotSupported) + expect(subject.registrant_contacts).to be_a(Array) + expect(subject.registrant_contacts).to eq([]) + expect(subject.admin_contacts).to be_a(Array) + expect(subject.admin_contacts).to eq([]) + expect(subject.technical_contacts).to be_a(Array) + expect(subject.technical_contacts).to eq([]) + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers).to eq([]) end end diff --git a/spec/whois/parsers/responses/whois.nic.tr/tr/status_invalid_spec.rb b/spec/whois/parsers/responses/whois.nic.tr/tr/status_invalid_spec.rb index 82203368..ebd6cda7 100644 --- a/spec/whois/parsers/responses/whois.nic.tr/tr/status_invalid_spec.rb +++ b/spec/whois/parsers/responses/whois.nic.tr/tr/status_invalid_spec.rb @@ -11,88 +11,33 @@ # require 'spec_helper' -require 'whois/parsers/whois.nic.tr.rb' -describe Whois::Parsers::WhoisNicTr, "status_invalid.expected" do +describe "whois.nic.tr", :aggregate_failures do subject do file = fixture("responses", "whois.nic.tr/tr/status_invalid.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.nic.tr") + Whois::Parser.parser_for(part) end - describe "#disclaimer" do - it do - expect { subject.disclaimer }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#domain" do - it do - expect { subject.domain }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#domain_id" do - it do - expect { subject.domain_id }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#status" do - it do - expect(subject.status).to eq(:invalid) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(false) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(false) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to eq(nil) - end - end - describe "#updated_on" do - it do - expect { subject.updated_on }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to eq(nil) - end - end - describe "#registrar" do - it do - expect { subject.registrar }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#registrant_contacts" do - it do - expect(subject.registrant_contacts).to be_a(Array) - expect(subject.registrant_contacts).to eq([]) - end - end - describe "#admin_contacts" do - it do - expect(subject.admin_contacts).to be_a(Array) - expect(subject.admin_contacts).to eq([]) - end - end - describe "#technical_contacts" do - it do - expect(subject.technical_contacts).to be_a(Array) - expect(subject.technical_contacts).to eq([]) - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers).to eq([]) - end + it "matches status_invalid.expected" do + expect { subject.disclaimer }.to raise_error(Whois::AttributeNotSupported) + expect { subject.domain }.to raise_error(Whois::AttributeNotSupported) + expect { subject.domain_id }.to raise_error(Whois::AttributeNotSupported) + expect(subject.status).to eq(:invalid) + expect(subject.available?).to eq(false) + expect(subject.registered?).to eq(false) + expect(subject.created_on).to eq(nil) + expect { subject.updated_on }.to raise_error(Whois::AttributeNotSupported) + expect(subject.expires_on).to eq(nil) + expect { subject.registrar }.to raise_error(Whois::AttributeNotSupported) + expect(subject.registrant_contacts).to be_a(Array) + expect(subject.registrant_contacts).to eq([]) + expect(subject.admin_contacts).to be_a(Array) + expect(subject.admin_contacts).to eq([]) + expect(subject.technical_contacts).to be_a(Array) + expect(subject.technical_contacts).to eq([]) + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers).to eq([]) end end diff --git a/spec/whois/parsers/responses/whois.nic.tr/tr/status_registered_spec.rb b/spec/whois/parsers/responses/whois.nic.tr/tr/status_registered_spec.rb index d98e1b13..b306bb3f 100644 --- a/spec/whois/parsers/responses/whois.nic.tr/tr/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.nic.tr/tr/status_registered_spec.rb @@ -11,140 +11,85 @@ # require 'spec_helper' -require 'whois/parsers/whois.nic.tr.rb' -describe Whois::Parsers::WhoisNicTr, "status_registered.expected" do +describe "whois.nic.tr", :aggregate_failures do subject do file = fixture("responses", "whois.nic.tr/tr/status_registered.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.nic.tr") + Whois::Parser.parser_for(part) end - describe "#disclaimer" do - it do - expect { subject.disclaimer }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#domain" do - it do - expect { subject.domain }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#domain_id" do - it do - expect { subject.domain_id }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#status" do - it do - expect(subject.status).to eq(:registered) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(false) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(true) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to be_a(Time) - expect(subject.created_on).to eq(DateTime.parse("2001-08-23 00:00:00 UTC")) - end - end - describe "#updated_on" do - it do - expect { subject.updated_on }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to be_a(Time) - expect(subject.expires_on).to eq(DateTime.parse("2014-08-22 00:00:00 UTC")) - end - end - describe "#registrar" do - it do - expect { subject.registrar }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#registrant_contacts" do - it do - expect(subject.registrant_contacts).to be_a(Array) - expect(subject.registrant_contacts.size).to eq(1) - expect(subject.registrant_contacts[0]).to be_a(Whois::Parser::Contact) - expect(subject.registrant_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_REGISTRANT) - expect(subject.registrant_contacts[0].id).to eq(nil) - expect(subject.registrant_contacts[0].name).to eq("Google Inc.") - expect(subject.registrant_contacts[0].organization).to eq(nil) - expect(subject.registrant_contacts[0].address).to eq("1600 Amphitheatre Parkway\nMountain View CA") - expect(subject.registrant_contacts[0].city).to eq(nil) - expect(subject.registrant_contacts[0].zip).to eq(nil) - expect(subject.registrant_contacts[0].state).to eq(nil) - expect(subject.registrant_contacts[0].country).to eq("United States of America") - expect(subject.registrant_contacts[0].country_code).to eq(nil) - expect(subject.registrant_contacts[0].phone).to eq("+ 1-650-2530000-") - expect(subject.registrant_contacts[0].fax).to eq("+ 1-650-2530001-") - expect(subject.registrant_contacts[0].email).to eq("dns-admin@google.com") - end - end - describe "#admin_contacts" do - it do - expect(subject.admin_contacts).to be_a(Array) - expect(subject.admin_contacts.size).to eq(1) - expect(subject.admin_contacts[0]).to be_a(Whois::Parser::Contact) - expect(subject.admin_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_ADMINISTRATIVE) - expect(subject.admin_contacts[0].id).to eq("mi154-metu") - expect(subject.admin_contacts[0].name).to eq(nil) - expect(subject.admin_contacts[0].organization).to eq("MarkMonitor, Inc") - expect(subject.admin_contacts[0].address).to eq("Hidden upon user request") - expect(subject.admin_contacts[0].city).to eq(nil) - expect(subject.admin_contacts[0].zip).to eq(nil) - expect(subject.admin_contacts[0].state).to eq(nil) - expect(subject.admin_contacts[0].country).to eq(nil) - expect(subject.admin_contacts[0].country_code).to eq(nil) - expect(subject.admin_contacts[0].phone).to eq("Hidden upon user request") - expect(subject.admin_contacts[0].fax).to eq("Hidden upon user request") - expect(subject.admin_contacts[0].email).to eq(nil) - end - end - describe "#technical_contacts" do - it do - expect(subject.technical_contacts).to be_a(Array) - expect(subject.technical_contacts.size).to eq(1) - expect(subject.technical_contacts[0]).to be_a(Whois::Parser::Contact) - expect(subject.technical_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_TECHNICAL) - expect(subject.technical_contacts[0].id).to eq("btl1-metu") - expect(subject.technical_contacts[0].name).to eq(nil) - expect(subject.technical_contacts[0].organization).to eq("BERÝL TEKNOLOJÝ LTD. ÞTÝ.") - expect(subject.technical_contacts[0].address).to eq("Ceyhun Atuf Kansu Cad. Bayraktar Ýþ Merkezi\nNo:114 G-4 Balgat\nAnkara,06520\nTürkiye") - expect(subject.technical_contacts[0].city).to eq(nil) - expect(subject.technical_contacts[0].zip).to eq(nil) - expect(subject.technical_contacts[0].state).to eq(nil) - expect(subject.technical_contacts[0].country).to eq(nil) - expect(subject.technical_contacts[0].country_code).to eq(nil) - expect(subject.technical_contacts[0].phone).to eq("+ 90-312-4733035-") - expect(subject.technical_contacts[0].fax).to eq("+ 90-312-4733039-") - expect(subject.technical_contacts[0].email).to eq(nil) - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers.size).to eq(4) - expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[0].name).to eq("ns1.google.com") - expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[1].name).to eq("ns2.google.com") - expect(subject.nameservers[2]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[2].name).to eq("ns3.google.com") - expect(subject.nameservers[3]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[3].name).to eq("ns4.google.com") - end + it "matches status_registered.expected" do + expect { subject.disclaimer }.to raise_error(Whois::AttributeNotSupported) + expect { subject.domain }.to raise_error(Whois::AttributeNotSupported) + expect { subject.domain_id }.to raise_error(Whois::AttributeNotSupported) + expect(subject.status).to eq(:registered) + expect(subject.available?).to eq(false) + expect(subject.registered?).to eq(true) + expect(subject.created_on).to be_a(Time) + expect(subject.created_on).to eq(DateTime.parse("2001-08-23 00:00:00 UTC")) + expect { subject.updated_on }.to raise_error(Whois::AttributeNotSupported) + expect(subject.expires_on).to be_a(Time) + expect(subject.expires_on).to eq(DateTime.parse("2014-08-22 00:00:00 UTC")) + expect { subject.registrar }.to raise_error(Whois::AttributeNotSupported) + expect(subject.registrant_contacts).to be_a(Array) + expect(subject.registrant_contacts.size).to eq(1) + expect(subject.registrant_contacts[0]).to be_a(Whois::Parser::Contact) + expect(subject.registrant_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_REGISTRANT) + expect(subject.registrant_contacts[0].id).to eq(nil) + expect(subject.registrant_contacts[0].name).to eq("Google Inc.") + expect(subject.registrant_contacts[0].organization).to eq(nil) + expect(subject.registrant_contacts[0].address).to eq("1600 Amphitheatre Parkway\nMountain View CA") + expect(subject.registrant_contacts[0].city).to eq(nil) + expect(subject.registrant_contacts[0].zip).to eq(nil) + expect(subject.registrant_contacts[0].state).to eq(nil) + expect(subject.registrant_contacts[0].country).to eq("United States of America") + expect(subject.registrant_contacts[0].country_code).to eq(nil) + expect(subject.registrant_contacts[0].phone).to eq("+ 1-650-2530000-") + expect(subject.registrant_contacts[0].fax).to eq("+ 1-650-2530001-") + expect(subject.registrant_contacts[0].email).to eq("dns-admin@google.com") + expect(subject.admin_contacts).to be_a(Array) + expect(subject.admin_contacts.size).to eq(1) + expect(subject.admin_contacts[0]).to be_a(Whois::Parser::Contact) + expect(subject.admin_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_ADMINISTRATIVE) + expect(subject.admin_contacts[0].id).to eq("mi154-metu") + expect(subject.admin_contacts[0].name).to eq(nil) + expect(subject.admin_contacts[0].organization).to eq("MarkMonitor, Inc") + expect(subject.admin_contacts[0].address).to eq("Hidden upon user request") + expect(subject.admin_contacts[0].city).to eq(nil) + expect(subject.admin_contacts[0].zip).to eq(nil) + expect(subject.admin_contacts[0].state).to eq(nil) + expect(subject.admin_contacts[0].country).to eq(nil) + expect(subject.admin_contacts[0].country_code).to eq(nil) + expect(subject.admin_contacts[0].phone).to eq("Hidden upon user request") + expect(subject.admin_contacts[0].fax).to eq("Hidden upon user request") + expect(subject.admin_contacts[0].email).to eq(nil) + expect(subject.technical_contacts).to be_a(Array) + expect(subject.technical_contacts.size).to eq(1) + expect(subject.technical_contacts[0]).to be_a(Whois::Parser::Contact) + expect(subject.technical_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_TECHNICAL) + expect(subject.technical_contacts[0].id).to eq("btl1-metu") + expect(subject.technical_contacts[0].name).to eq(nil) + expect(subject.technical_contacts[0].organization).to eq("BERÝL TEKNOLOJÝ LTD. ÞTÝ.") + expect(subject.technical_contacts[0].address).to eq("Ceyhun Atuf Kansu Cad. Bayraktar Ýþ Merkezi\nNo:114 G-4 Balgat\nAnkara,06520\nTürkiye") + expect(subject.technical_contacts[0].city).to eq(nil) + expect(subject.technical_contacts[0].zip).to eq(nil) + expect(subject.technical_contacts[0].state).to eq(nil) + expect(subject.technical_contacts[0].country).to eq(nil) + expect(subject.technical_contacts[0].country_code).to eq(nil) + expect(subject.technical_contacts[0].phone).to eq("+ 90-312-4733035-") + expect(subject.technical_contacts[0].fax).to eq("+ 90-312-4733039-") + expect(subject.technical_contacts[0].email).to eq(nil) + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers.size).to eq(4) + expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[0].name).to eq("ns1.google.com") + expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[1].name).to eq("ns2.google.com") + expect(subject.nameservers[2]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[2].name).to eq("ns3.google.com") + expect(subject.nameservers[3]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[3].name).to eq("ns4.google.com") end end diff --git a/spec/whois/parsers/responses/whois.nic.travel/travel/property_status_multiple_spec.rb b/spec/whois/parsers/responses/whois.nic.travel/travel/property_status_multiple_spec.rb deleted file mode 100644 index 944a66f1..00000000 --- a/spec/whois/parsers/responses/whois.nic.travel/travel/property_status_multiple_spec.rb +++ /dev/null @@ -1,29 +0,0 @@ -# encoding: utf-8 - -# This file is autogenerated. Do not edit it manually. -# If you want change the content of this file, edit -# -# /spec/fixtures/responses/whois.nic.travel/travel/property_status_multiple.expected -# -# and regenerate the tests with the following rake task -# -# $ rake spec:generate -# - -require 'spec_helper' -require 'whois/parsers/whois.nic.travel.rb' - -describe Whois::Parsers::WhoisNicTravel, "property_status_multiple.expected" do - - subject do - file = fixture("responses", "whois.nic.travel/travel/property_status_multiple.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) - end - - describe "#status" do - it do - expect(subject.status).to eq(["clientDeleteProhibited", "clientTransferProhibited"]) - end - end -end diff --git a/spec/whois/parsers/responses/whois.nic.travel/travel/property_status_single_spec.rb b/spec/whois/parsers/responses/whois.nic.travel/travel/property_status_single_spec.rb deleted file mode 100644 index 2f8aae83..00000000 --- a/spec/whois/parsers/responses/whois.nic.travel/travel/property_status_single_spec.rb +++ /dev/null @@ -1,29 +0,0 @@ -# encoding: utf-8 - -# This file is autogenerated. Do not edit it manually. -# If you want change the content of this file, edit -# -# /spec/fixtures/responses/whois.nic.travel/travel/property_status_single.expected -# -# and regenerate the tests with the following rake task -# -# $ rake spec:generate -# - -require 'spec_helper' -require 'whois/parsers/whois.nic.travel.rb' - -describe Whois::Parsers::WhoisNicTravel, "property_status_single.expected" do - - subject do - file = fixture("responses", "whois.nic.travel/travel/property_status_single.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) - end - - describe "#status" do - it do - expect(subject.status).to eq(["ok"]) - end - end -end diff --git a/spec/whois/parsers/responses/whois.nic.travel/travel/status_available_spec.rb b/spec/whois/parsers/responses/whois.nic.travel/travel/status_available_spec.rb index e8c471e6..2094f793 100644 --- a/spec/whois/parsers/responses/whois.nic.travel/travel/status_available_spec.rb +++ b/spec/whois/parsers/responses/whois.nic.travel/travel/status_available_spec.rb @@ -11,83 +11,32 @@ # require 'spec_helper' -require 'whois/parsers/whois.nic.travel.rb' -describe Whois::Parsers::WhoisNicTravel, "status_available.expected" do +describe "whois.nic.travel", :aggregate_failures do subject do file = fixture("responses", "whois.nic.travel/travel/status_available.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.nic.travel") + Whois::Parser.parser_for(part) end - describe "#domain" do - it do - expect(subject.domain).to eq("u34jedzcq.travel") - end - end - describe "#domain_id" do - it do - expect(subject.domain_id).to eq(nil) - end - end - describe "#status" do - it do - expect(subject.status).to eq(nil) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(true) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(false) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to eq(nil) - end - end - describe "#updated_on" do - it do - expect(subject.updated_on).to eq(nil) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to eq(nil) - end - end - describe "#registrar" do - it do - expect(subject.registrar).to eq(nil) - end - end - describe "#registrant_contacts" do - it do - expect(subject.registrant_contacts).to be_a(Array) - expect(subject.registrant_contacts).to eq([]) - end - end - describe "#admin_contacts" do - it do - expect(subject.admin_contacts).to be_a(Array) - expect(subject.admin_contacts).to eq([]) - end - end - describe "#technical_contacts" do - it do - expect(subject.technical_contacts).to be_a(Array) - expect(subject.technical_contacts).to eq([]) - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers).to eq([]) - end + it "matches status_available.expected" do + expect(subject.domain).to eq(nil) + expect(subject.domain_id).to eq(nil) + expect(subject.status).to eq(:available) + expect(subject.available?).to eq(true) + expect(subject.registered?).to eq(false) + expect(subject.created_on).to eq(nil) + expect(subject.updated_on).to eq(nil) + expect(subject.expires_on).to eq(nil) + expect(subject.registrar).to eq(nil) + expect(subject.registrant_contacts).to be_a(Array) + expect(subject.registrant_contacts).to eq([]) + expect(subject.admin_contacts).to be_a(Array) + expect(subject.admin_contacts).to eq([]) + expect(subject.technical_contacts).to be_a(Array) + expect(subject.technical_contacts).to eq([]) + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers).to eq([]) end end diff --git a/spec/whois/parsers/responses/whois.nic.travel/travel/status_registered_spec.rb b/spec/whois/parsers/responses/whois.nic.travel/travel/status_registered_spec.rb index ccc6463a..483ba4f9 100644 --- a/spec/whois/parsers/responses/whois.nic.travel/travel/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.nic.travel/travel/status_registered_spec.rb @@ -11,134 +11,85 @@ # require 'spec_helper' -require 'whois/parsers/whois.nic.travel.rb' -describe Whois::Parsers::WhoisNicTravel, "status_registered.expected" do +describe "whois.nic.travel", :aggregate_failures do subject do file = fixture("responses", "whois.nic.travel/travel/status_registered.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.nic.travel") + Whois::Parser.parser_for(part) end - describe "#domain" do - it do - expect(subject.domain).to eq("travel.travel") - end - end - describe "#domain_id" do - it do - expect(subject.domain_id).to eq("D24096-TRAVEL") - end - end - describe "#status" do - it do - expect(subject.status).to eq(["ok"]) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(false) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(true) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to be_a(Time) - expect(subject.created_on).to eq(DateTime.parse("2005-10-04 21:44:27 GMT")) - end - end - describe "#updated_on" do - it do - expect(subject.updated_on).to be_a(Time) - expect(subject.updated_on).to eq(DateTime.parse("2013-09-18 15:13:32 GMT")) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to be_a(Time) - expect(subject.expires_on).to eq(DateTime.parse("2021-10-03 23:59:59 GMT")) - end - end - describe "#registrar" do - it do - expect(subject.registrar).to be_a(Whois::Parser::Registrar) - expect(subject.registrar.id).to eq(nil) - expect(subject.registrar.name).to eq("NEUSTAR GATEWAY") - end - end - describe "#registrant_contacts" do - it do - expect(subject.registrant_contacts).to be_a(Array) - expect(subject.registrant_contacts.size).to eq(1) - expect(subject.registrant_contacts[0]).to be_a(Whois::Parser::Contact) - expect(subject.registrant_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_REGISTRANT) - expect(subject.registrant_contacts[0].id).to eq("TRALLIANCE") - expect(subject.registrant_contacts[0].name).to eq("Tralliance Corporation") - expect(subject.registrant_contacts[0].organization).to eq(nil) - expect(subject.registrant_contacts[0].address).to eq("110 East Broward Blvd, 14th floor") - expect(subject.registrant_contacts[0].city).to eq("Fort Lauderdale") - expect(subject.registrant_contacts[0].zip).to eq("33301") - expect(subject.registrant_contacts[0].state).to eq("FL") - expect(subject.registrant_contacts[0].country).to eq("United States") - expect(subject.registrant_contacts[0].country_code).to eq("US") - expect(subject.registrant_contacts[0].phone).to eq("+1.9547695999") - expect(subject.registrant_contacts[0].fax).to eq(nil) - expect(subject.registrant_contacts[0].email).to eq("info@tralliance.travel") - end - end - describe "#admin_contacts" do - it do - expect(subject.admin_contacts).to be_a(Array) - expect(subject.admin_contacts.size).to eq(1) - expect(subject.admin_contacts[0]).to be_a(Whois::Parser::Contact) - expect(subject.admin_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_ADMINISTRATIVE) - expect(subject.admin_contacts[0].id).to eq("TRALLIANCE") - expect(subject.admin_contacts[0].name).to eq("Tralliance Corporation") - expect(subject.admin_contacts[0].organization).to eq(nil) - expect(subject.admin_contacts[0].address).to eq("110 East Broward Blvd, 14th floor") - expect(subject.admin_contacts[0].city).to eq("Fort Lauderdale") - expect(subject.admin_contacts[0].zip).to eq("33301") - expect(subject.admin_contacts[0].state).to eq("FL") - expect(subject.admin_contacts[0].country).to eq("United States") - expect(subject.admin_contacts[0].country_code).to eq("US") - expect(subject.admin_contacts[0].phone).to eq("+1.9547695999") - expect(subject.admin_contacts[0].fax).to eq(nil) - expect(subject.admin_contacts[0].email).to eq("info@tralliance.travel") - end - end - describe "#technical_contacts" do - it do - expect(subject.technical_contacts).to be_a(Array) - expect(subject.technical_contacts.size).to eq(1) - expect(subject.technical_contacts[0]).to be_a(Whois::Parser::Contact) - expect(subject.technical_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_TECHNICAL) - expect(subject.technical_contacts[0].id).to eq("TRALLIANCE") - expect(subject.technical_contacts[0].name).to eq("Tralliance Corporation") - expect(subject.technical_contacts[0].organization).to eq(nil) - expect(subject.technical_contacts[0].address).to eq("110 East Broward Blvd, 14th floor") - expect(subject.technical_contacts[0].city).to eq("Fort Lauderdale") - expect(subject.technical_contacts[0].zip).to eq("33301") - expect(subject.technical_contacts[0].state).to eq("FL") - expect(subject.technical_contacts[0].country).to eq("United States") - expect(subject.technical_contacts[0].country_code).to eq("US") - expect(subject.technical_contacts[0].phone).to eq("+1.9547695999") - expect(subject.technical_contacts[0].fax).to eq(nil) - expect(subject.technical_contacts[0].email).to eq("info@tralliance.travel") - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers.size).to eq(2) - expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[0].name).to eq("ns01-mia.theglobe.com") - expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[1].name).to eq("netsys.com") - end + it "matches status_registered.expected" do + expect(subject.domain).to eq("travel.travel") + expect(subject.domain_id).to eq("ff0390f7114c4ad99ac46ae56c00300f-DONUTS") + expect(subject.status).to eq(:registered) + expect(subject.available?).to eq(false) + expect(subject.registered?).to eq(true) + expect(subject.created_on).to be_a(Time) + expect(subject.created_on).to eq(DateTime.parse("2005-10-04 21:44:27 GMT")) + expect(subject.updated_on).to be_a(Time) + expect(subject.updated_on).to eq(DateTime.parse("2018-05-25 19:29:32 GMT")) + expect(subject.expires_on).to be_a(Time) + expect(subject.expires_on).to eq(DateTime.parse("2022-10-03 23:59:59 GMT")) + expect(subject.registrar).to be_a(Whois::Parser::Registrar) + expect(subject.registrar.id).to eq("9998") + expect(subject.registrar.name).to eq("Donuts Internal (9998)") + expect(subject.registrar.url).to eq("http://www.donuts.co") + expect(subject.registrant_contacts).to be_a(Array) + expect(subject.registrant_contacts.size).to eq(1) + expect(subject.registrant_contacts[0]).to be_a(Whois::Parser::Contact) + expect(subject.registrant_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_REGISTRANT) + expect(subject.registrant_contacts[0].id).to eq("REDACTED FOR PRIVACY") + expect(subject.registrant_contacts[0].name).to eq("REDACTED FOR PRIVACY") + expect(subject.registrant_contacts[0].organization).to eq("Donuts Inc.") + expect(subject.registrant_contacts[0].address).to eq("REDACTED FOR PRIVACY") + expect(subject.registrant_contacts[0].city).to eq("REDACTED FOR PRIVACY") + expect(subject.registrant_contacts[0].zip).to eq("REDACTED FOR PRIVACY") + expect(subject.registrant_contacts[0].state).to eq("WA") + expect(subject.registrant_contacts[0].country_code).to eq("us") + expect(subject.registrant_contacts[0].phone).to eq("REDACTED FOR PRIVACY ext: REDACTED FOR PRIVACY") + expect(subject.registrant_contacts[0].fax).to eq("REDACTED FOR PRIVACY ext: REDACTED FOR PRIVACY") + expect(subject.registrant_contacts[0].email).to eq("Please query the RDDS service of the Registrar of Record identified in this output for information on how to contact the Registrant, Admin, or Tech contact of the queried domain name.") + expect(subject.admin_contacts).to be_a(Array) + expect(subject.admin_contacts.size).to eq(1) + expect(subject.admin_contacts[0]).to be_a(Whois::Parser::Contact) + expect(subject.admin_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_ADMINISTRATIVE) + expect(subject.admin_contacts[0].id).to eq("REDACTED FOR PRIVACY") + expect(subject.admin_contacts[0].name).to eq("REDACTED FOR PRIVACY") + expect(subject.admin_contacts[0].organization).to eq("REDACTED FOR PRIVACY") + expect(subject.admin_contacts[0].address).to eq("REDACTED FOR PRIVACY") + expect(subject.admin_contacts[0].city).to eq("REDACTED FOR PRIVACY") + expect(subject.admin_contacts[0].zip).to eq("REDACTED FOR PRIVACY") + expect(subject.admin_contacts[0].state).to eq("REDACTED FOR PRIVACY") + expect(subject.admin_contacts[0].country_code).to eq("REDACTED FOR PRIVACY") + expect(subject.admin_contacts[0].phone).to eq("REDACTED FOR PRIVACY ext: REDACTED FOR PRIVACY") + expect(subject.admin_contacts[0].fax).to eq("REDACTED FOR PRIVACY ext: REDACTED FOR PRIVACY") + expect(subject.admin_contacts[0].email).to eq("Please query the RDDS service of the Registrar of Record identified in this output for information on how to contact the Registrant, Admin, or Tech contact of the queried domain name.") + expect(subject.technical_contacts).to be_a(Array) + expect(subject.technical_contacts.size).to eq(1) + expect(subject.technical_contacts[0]).to be_a(Whois::Parser::Contact) + expect(subject.technical_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_TECHNICAL) + expect(subject.technical_contacts[0].id).to eq("REDACTED FOR PRIVACY") + expect(subject.technical_contacts[0].name).to eq("REDACTED FOR PRIVACY") + expect(subject.technical_contacts[0].organization).to eq("REDACTED FOR PRIVACY") + expect(subject.technical_contacts[0].address).to eq("REDACTED FOR PRIVACY") + expect(subject.technical_contacts[0].city).to eq("REDACTED FOR PRIVACY") + expect(subject.technical_contacts[0].zip).to eq("REDACTED FOR PRIVACY") + expect(subject.technical_contacts[0].state).to eq("REDACTED FOR PRIVACY") + expect(subject.technical_contacts[0].country_code).to eq("REDACTED FOR PRIVACY") + expect(subject.technical_contacts[0].phone).to eq("REDACTED FOR PRIVACY ext: REDACTED FOR PRIVACY") + expect(subject.technical_contacts[0].fax).to eq("REDACTED FOR PRIVACY ext: REDACTED FOR PRIVACY") + expect(subject.technical_contacts[0].email).to eq("Please query the RDDS service of the Registrar of Record identified in this output for information on how to contact the Registrant, Admin, or Tech contact of the queried domain name.") + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers.size).to eq(4) + expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[0].name).to eq("ns-1812.awsdns-34.co.uk") + expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[1].name).to eq("ns-458.awsdns-57.com") + expect(subject.nameservers[2]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[2].name).to eq("ns-935.awsdns-52.net") + expect(subject.nameservers[3]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[3].name).to eq("ns-1480.awsdns-57.org") end end diff --git a/spec/whois/parsers/responses/whois.nic.uk/uk/property_nameservers_with_ip_spec.rb b/spec/whois/parsers/responses/whois.nic.uk/uk/property_nameservers_with_ip_spec.rb index eece433c..26b2ea91 100644 --- a/spec/whois/parsers/responses/whois.nic.uk/uk/property_nameservers_with_ip_spec.rb +++ b/spec/whois/parsers/responses/whois.nic.uk/uk/property_nameservers_with_ip_spec.rb @@ -11,26 +11,23 @@ # require 'spec_helper' -require 'whois/parsers/whois.nic.uk.rb' -describe Whois::Parsers::WhoisNicUk, "property_nameservers_with_ip.expected" do +describe "whois.nic.uk", :aggregate_failures do subject do file = fixture("responses", "whois.nic.uk/uk/property_nameservers_with_ip.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.nic.uk") + Whois::Parser.parser_for(part) end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers.size).to eq(2) - expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[0].name).to eq("ns0.netbenefit.co.uk") - expect(subject.nameservers[0].ipv4).to eq("212.53.64.30") - expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[1].name).to eq("ns1.netbenefit.co.uk") - expect(subject.nameservers[1].ipv4).to eq("212.53.77.30") - end + it "matches property_nameservers_with_ip.expected" do + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers.size).to eq(2) + expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[0].name).to eq("ns0.netbenefit.co.uk") + expect(subject.nameservers[0].ipv4).to eq("212.53.64.30") + expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[1].name).to eq("ns1.netbenefit.co.uk") + expect(subject.nameservers[1].ipv4).to eq("212.53.77.30") end end diff --git a/spec/whois/parsers/responses/whois.nic.uk/uk/property_registrar_godaddy_spec.rb b/spec/whois/parsers/responses/whois.nic.uk/uk/property_registrar_godaddy_spec.rb index 74cd9dd6..27bdfb12 100644 --- a/spec/whois/parsers/responses/whois.nic.uk/uk/property_registrar_godaddy_spec.rb +++ b/spec/whois/parsers/responses/whois.nic.uk/uk/property_registrar_godaddy_spec.rb @@ -11,23 +11,20 @@ # require 'spec_helper' -require 'whois/parsers/whois.nic.uk.rb' -describe Whois::Parsers::WhoisNicUk, "property_registrar_godaddy.expected" do +describe "whois.nic.uk", :aggregate_failures do subject do file = fixture("responses", "whois.nic.uk/uk/property_registrar_godaddy.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.nic.uk") + Whois::Parser.parser_for(part) end - describe "#registrar" do - it do - expect(subject.registrar).to be_a(Whois::Parser::Registrar) - expect(subject.registrar.id).to eq("GODADDY") - expect(subject.registrar.name).to eq("GoDaddy.com, LLP.") - expect(subject.registrar.name).to eq("GoDaddy.com, LLP.") - expect(subject.registrar.url).to eq(nil) - end + it "matches property_registrar_godaddy.expected" do + expect(subject.registrar).to be_a(Whois::Parser::Registrar) + expect(subject.registrar.id).to eq("GODADDY") + expect(subject.registrar.name).to eq("GoDaddy.com, LLP.") + expect(subject.registrar.name).to eq("GoDaddy.com, LLP.") + expect(subject.registrar.url).to eq(nil) end end diff --git a/spec/whois/parsers/responses/whois.nic.uk/uk/property_registrar_without_trading_name_spec.rb b/spec/whois/parsers/responses/whois.nic.uk/uk/property_registrar_without_trading_name_spec.rb index 274c3202..05ec0908 100644 --- a/spec/whois/parsers/responses/whois.nic.uk/uk/property_registrar_without_trading_name_spec.rb +++ b/spec/whois/parsers/responses/whois.nic.uk/uk/property_registrar_without_trading_name_spec.rb @@ -11,23 +11,20 @@ # require 'spec_helper' -require 'whois/parsers/whois.nic.uk.rb' -describe Whois::Parsers::WhoisNicUk, "property_registrar_without_trading_name.expected" do +describe "whois.nic.uk", :aggregate_failures do subject do file = fixture("responses", "whois.nic.uk/uk/property_registrar_without_trading_name.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.nic.uk") + Whois::Parser.parser_for(part) end - describe "#registrar" do - it do - expect(subject.registrar).to be_a(Whois::Parser::Registrar) - expect(subject.registrar.id).to eq("NETNAMES") - expect(subject.registrar.name).to eq("NetNames Limited") - expect(subject.registrar.name).to eq("NetNames Limited") - expect(subject.registrar.url).to eq("http://www.netnames.co.uk") - end + it "matches property_registrar_without_trading_name.expected" do + expect(subject.registrar).to be_a(Whois::Parser::Registrar) + expect(subject.registrar.id).to eq("NETNAMES") + expect(subject.registrar.name).to eq("NetNames Limited") + expect(subject.registrar.name).to eq("NetNames Limited") + expect(subject.registrar.url).to eq("http://www.netnames.co.uk") end end diff --git a/spec/whois/parsers/responses/whois.nic.uk/uk/property_status_missing_spec.rb b/spec/whois/parsers/responses/whois.nic.uk/uk/property_status_missing_spec.rb index a53b4fec..80fe6805 100644 --- a/spec/whois/parsers/responses/whois.nic.uk/uk/property_status_missing_spec.rb +++ b/spec/whois/parsers/responses/whois.nic.uk/uk/property_status_missing_spec.rb @@ -11,29 +11,18 @@ # require 'spec_helper' -require 'whois/parsers/whois.nic.uk.rb' -describe Whois::Parsers::WhoisNicUk, "property_status_missing.expected" do +describe "whois.nic.uk", :aggregate_failures do subject do file = fixture("responses", "whois.nic.uk/uk/property_status_missing.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.nic.uk") + Whois::Parser.parser_for(part) end - describe "#status" do - it do - expect(subject.status).to eq(:available) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(true) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(false) - end + it "matches property_status_missing.expected" do + expect(subject.status).to eq(:available) + expect(subject.available?).to eq(true) + expect(subject.registered?).to eq(false) end end diff --git a/spec/whois/parsers/responses/whois.nic.uk/uk/property_status_no_longer_required_spec.rb b/spec/whois/parsers/responses/whois.nic.uk/uk/property_status_no_longer_required_spec.rb index f79a3284..cec90929 100644 --- a/spec/whois/parsers/responses/whois.nic.uk/uk/property_status_no_longer_required_spec.rb +++ b/spec/whois/parsers/responses/whois.nic.uk/uk/property_status_no_longer_required_spec.rb @@ -11,29 +11,18 @@ # require 'spec_helper' -require 'whois/parsers/whois.nic.uk.rb' -describe Whois::Parsers::WhoisNicUk, "property_status_no_longer_required.expected" do +describe "whois.nic.uk", :aggregate_failures do subject do file = fixture("responses", "whois.nic.uk/uk/property_status_no_longer_required.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.nic.uk") + Whois::Parser.parser_for(part) end - describe "#status" do - it do - expect(subject.status).to eq(:registered) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(false) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(true) - end + it "matches property_status_no_longer_required.expected" do + expect(subject.status).to eq(:registered) + expect(subject.available?).to eq(false) + expect(subject.registered?).to eq(true) end end diff --git a/spec/whois/parsers/responses/whois.nic.uk/uk/property_status_no_status_listed_spec.rb b/spec/whois/parsers/responses/whois.nic.uk/uk/property_status_no_status_listed_spec.rb index 6974cc97..144a3d7f 100644 --- a/spec/whois/parsers/responses/whois.nic.uk/uk/property_status_no_status_listed_spec.rb +++ b/spec/whois/parsers/responses/whois.nic.uk/uk/property_status_no_status_listed_spec.rb @@ -11,29 +11,18 @@ # require 'spec_helper' -require 'whois/parsers/whois.nic.uk.rb' -describe Whois::Parsers::WhoisNicUk, "property_status_no_status_listed.expected" do +describe "whois.nic.uk", :aggregate_failures do subject do file = fixture("responses", "whois.nic.uk/uk/property_status_no_status_listed.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.nic.uk") + Whois::Parser.parser_for(part) end - describe "#status" do - it do - expect(subject.status).to eq(:reserved) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(false) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(true) - end + it "matches property_status_no_status_listed.expected" do + expect(subject.status).to eq(:reserved) + expect(subject.available?).to eq(false) + expect(subject.registered?).to eq(true) end end diff --git a/spec/whois/parsers/responses/whois.nic.uk/uk/property_status_processing_registration_spec.rb b/spec/whois/parsers/responses/whois.nic.uk/uk/property_status_processing_registration_spec.rb index c5af118f..414f7413 100644 --- a/spec/whois/parsers/responses/whois.nic.uk/uk/property_status_processing_registration_spec.rb +++ b/spec/whois/parsers/responses/whois.nic.uk/uk/property_status_processing_registration_spec.rb @@ -11,29 +11,18 @@ # require 'spec_helper' -require 'whois/parsers/whois.nic.uk.rb' -describe Whois::Parsers::WhoisNicUk, "property_status_processing_registration.expected" do +describe "whois.nic.uk", :aggregate_failures do subject do file = fixture("responses", "whois.nic.uk/uk/property_status_processing_registration.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.nic.uk") + Whois::Parser.parser_for(part) end - describe "#status" do - it do - expect(subject.status).to eq(:registered) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(false) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(true) - end + it "matches property_status_processing_registration.expected" do + expect(subject.status).to eq(:registered) + expect(subject.available?).to eq(false) + expect(subject.registered?).to eq(true) end end diff --git a/spec/whois/parsers/responses/whois.nic.uk/uk/property_status_processing_renewal_spec.rb b/spec/whois/parsers/responses/whois.nic.uk/uk/property_status_processing_renewal_spec.rb index ac09b68d..9a010fce 100644 --- a/spec/whois/parsers/responses/whois.nic.uk/uk/property_status_processing_renewal_spec.rb +++ b/spec/whois/parsers/responses/whois.nic.uk/uk/property_status_processing_renewal_spec.rb @@ -11,29 +11,18 @@ # require 'spec_helper' -require 'whois/parsers/whois.nic.uk.rb' -describe Whois::Parsers::WhoisNicUk, "property_status_processing_renewal.expected" do +describe "whois.nic.uk", :aggregate_failures do subject do file = fixture("responses", "whois.nic.uk/uk/property_status_processing_renewal.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.nic.uk") + Whois::Parser.parser_for(part) end - describe "#status" do - it do - expect(subject.status).to eq(:registered) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(false) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(true) - end + it "matches property_status_processing_renewal.expected" do + expect(subject.status).to eq(:registered) + expect(subject.available?).to eq(false) + expect(subject.registered?).to eq(true) end end diff --git a/spec/whois/parsers/responses/whois.nic.uk/uk/property_status_registered_until_expiry_date_spec.rb b/spec/whois/parsers/responses/whois.nic.uk/uk/property_status_registered_until_expiry_date_spec.rb index 6dc57f0d..ed109673 100644 --- a/spec/whois/parsers/responses/whois.nic.uk/uk/property_status_registered_until_expiry_date_spec.rb +++ b/spec/whois/parsers/responses/whois.nic.uk/uk/property_status_registered_until_expiry_date_spec.rb @@ -11,29 +11,18 @@ # require 'spec_helper' -require 'whois/parsers/whois.nic.uk.rb' -describe Whois::Parsers::WhoisNicUk, "property_status_registered_until_expiry_date.expected" do +describe "whois.nic.uk", :aggregate_failures do subject do file = fixture("responses", "whois.nic.uk/uk/property_status_registered_until_expiry_date.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.nic.uk") + Whois::Parser.parser_for(part) end - describe "#status" do - it do - expect(subject.status).to eq(:registered) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(false) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(true) - end + it "matches property_status_registered_until_expiry_date.expected" do + expect(subject.status).to eq(:registered) + expect(subject.available?).to eq(false) + expect(subject.registered?).to eq(true) end end diff --git a/spec/whois/parsers/responses/whois.nic.uk/uk/property_status_suspended_spec.rb b/spec/whois/parsers/responses/whois.nic.uk/uk/property_status_suspended_spec.rb index 03804af8..59b84e4b 100644 --- a/spec/whois/parsers/responses/whois.nic.uk/uk/property_status_suspended_spec.rb +++ b/spec/whois/parsers/responses/whois.nic.uk/uk/property_status_suspended_spec.rb @@ -11,29 +11,18 @@ # require 'spec_helper' -require 'whois/parsers/whois.nic.uk.rb' -describe Whois::Parsers::WhoisNicUk, "property_status_suspended.expected" do +describe "whois.nic.uk", :aggregate_failures do subject do file = fixture("responses", "whois.nic.uk/uk/property_status_suspended.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.nic.uk") + Whois::Parser.parser_for(part) end - describe "#status" do - it do - expect(subject.status).to eq(:registered) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(false) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(true) - end + it "matches property_status_suspended.expected" do + expect(subject.status).to eq(:registered) + expect(subject.available?).to eq(false) + expect(subject.registered?).to eq(true) end end diff --git a/spec/whois/parsers/responses/whois.nic.uk/uk/response_throttled_spec.rb b/spec/whois/parsers/responses/whois.nic.uk/uk/response_throttled_spec.rb index 372925c6..929b2011 100644 --- a/spec/whois/parsers/responses/whois.nic.uk/uk/response_throttled_spec.rb +++ b/spec/whois/parsers/responses/whois.nic.uk/uk/response_throttled_spec.rb @@ -11,19 +11,16 @@ # require 'spec_helper' -require 'whois/parsers/whois.nic.uk.rb' -describe Whois::Parsers::WhoisNicUk, "response_throttled.expected" do +describe "whois.nic.uk", :aggregate_failures do subject do file = fixture("responses", "whois.nic.uk/uk/response_throttled.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.nic.uk") + Whois::Parser.parser_for(part) end - describe "#response_throttled?" do - it do - expect(subject.response_throttled?).to eq(true) - end + it "matches response_throttled.expected" do + expect(subject.response_throttled?).to eq(true) end end diff --git a/spec/whois/parsers/responses/whois.nic.uk/uk/status_available_spec.rb b/spec/whois/parsers/responses/whois.nic.uk/uk/status_available_spec.rb index cafc4fd7..79e9a97f 100644 --- a/spec/whois/parsers/responses/whois.nic.uk/uk/status_available_spec.rb +++ b/spec/whois/parsers/responses/whois.nic.uk/uk/status_available_spec.rb @@ -11,70 +11,27 @@ # require 'spec_helper' -require 'whois/parsers/whois.nic.uk.rb' -describe Whois::Parsers::WhoisNicUk, "status_available.expected" do +describe "whois.nic.uk", :aggregate_failures do subject do file = fixture("responses", "whois.nic.uk/uk/status_available.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.nic.uk") + Whois::Parser.parser_for(part) end - describe "#status" do - it do - expect(subject.status).to eq(:available) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(true) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(false) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to eq(nil) - end - end - describe "#updated_on" do - it do - expect(subject.updated_on).to eq(nil) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to eq(nil) - end - end - describe "#registrar" do - it do - expect(subject.registrar).to eq(nil) - end - end - describe "#registrant_contacts" do - it do - expect(subject.registrant_contacts).to eq([]) - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers).to eq([]) - end - end - describe "#valid?" do - it do - expect(subject.valid?).to eq(true) - end - end - describe "#invalid?" do - it do - expect(subject.invalid?).to eq(false) - end + it "matches status_available.expected" do + expect(subject.status).to eq(:available) + expect(subject.available?).to eq(true) + expect(subject.registered?).to eq(false) + expect(subject.created_on).to eq(nil) + expect(subject.updated_on).to eq(nil) + expect(subject.expires_on).to eq(nil) + expect(subject.registrar).to eq(nil) + expect(subject.registrant_contacts).to eq([]) + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers).to eq([]) + expect(subject.valid?).to eq(true) + expect(subject.invalid?).to eq(false) end end diff --git a/spec/whois/parsers/responses/whois.nic.uk/uk/status_invalid_spec.rb b/spec/whois/parsers/responses/whois.nic.uk/uk/status_invalid_spec.rb index 8cc6a6d6..9db9b0c7 100644 --- a/spec/whois/parsers/responses/whois.nic.uk/uk/status_invalid_spec.rb +++ b/spec/whois/parsers/responses/whois.nic.uk/uk/status_invalid_spec.rb @@ -11,29 +11,18 @@ # require 'spec_helper' -require 'whois/parsers/whois.nic.uk.rb' -describe Whois::Parsers::WhoisNicUk, "status_invalid.expected" do +describe "whois.nic.uk", :aggregate_failures do subject do file = fixture("responses", "whois.nic.uk/uk/status_invalid.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.nic.uk") + Whois::Parser.parser_for(part) end - describe "#status" do - it do - expect(subject.status).to eq(:invalid) - end - end - describe "#valid?" do - it do - expect(subject.valid?).to eq(false) - end - end - describe "#invalid?" do - it do - expect(subject.invalid?).to eq(true) - end + it "matches status_invalid.expected" do + expect(subject.status).to eq(:invalid) + expect(subject.valid?).to eq(false) + expect(subject.invalid?).to eq(true) end end diff --git a/spec/whois/parsers/responses/whois.nic.uk/uk/status_registered_spec.rb b/spec/whois/parsers/responses/whois.nic.uk/uk/status_registered_spec.rb index d66fb97f..60034775 100644 --- a/spec/whois/parsers/responses/whois.nic.uk/uk/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.nic.uk/uk/status_registered_spec.rb @@ -11,101 +11,54 @@ # require 'spec_helper' -require 'whois/parsers/whois.nic.uk.rb' -describe Whois::Parsers::WhoisNicUk, "status_registered.expected" do +describe "whois.nic.uk", :aggregate_failures do subject do file = fixture("responses", "whois.nic.uk/uk/status_registered.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.nic.uk") + Whois::Parser.parser_for(part) end - describe "#status" do - it do - expect(subject.status).to eq(:registered) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(false) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(true) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to be_a(Time) - expect(subject.created_on).to eq(DateTime.parse("1999-02-14")) - end - end - describe "#updated_on" do - it do - expect(subject.updated_on).to be_a(Time) - expect(subject.updated_on).to eq(DateTime.parse("2014-01-13")) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to be_a(Time) - expect(subject.expires_on).to eq(DateTime.parse("2015-02-14")) - end - end - describe "#registrar" do - it do - expect(subject.registrar).to be_a(Whois::Parser::Registrar) - expect(subject.registrar.id).to eq("MARKMONITOR") - expect(subject.registrar.name).to eq("Markmonitor") - expect(subject.registrar.organization).to eq("Markmonitor Inc.") - expect(subject.registrar.url).to eq("http://www.markmonitor.com") - end - end - describe "#registrant_contacts" do - it do - expect(subject.registrant_contacts).to be_a(Array) - expect(subject.registrant_contacts.size).to eq(1) - expect(subject.registrant_contacts[0]).to be_a(Whois::Parser::Contact) - expect(subject.registrant_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_REGISTRANT) - expect(subject.registrant_contacts[0].id).to eq(nil) - expect(subject.registrant_contacts[0].name).to eq("Google Inc.") - expect(subject.registrant_contacts[0].organization).to eq(nil) - expect(subject.registrant_contacts[0].address).to eq("1600 Amphitheatre Parkway") - expect(subject.registrant_contacts[0].city).to eq("Mountain View") - expect(subject.registrant_contacts[0].zip).to eq("94043") - expect(subject.registrant_contacts[0].state).to eq("CA") - expect(subject.registrant_contacts[0].country).to eq("United States") - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers.size).to eq(4) - expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[0].name).to eq("ns1.google.com") - expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[1].name).to eq("ns2.google.com") - expect(subject.nameservers[2]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[2].name).to eq("ns3.google.com") - expect(subject.nameservers[3]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[3].name).to eq("ns4.google.com") - end - end - describe "#response_throttled?" do - it do - expect(subject.response_throttled?).to eq(false) - end - end - describe "#valid?" do - it do - expect(subject.valid?).to eq(true) - end - end - describe "#invalid?" do - it do - expect(subject.invalid?).to eq(false) - end + it "matches status_registered.expected" do + expect(subject.status).to eq(:registered) + expect(subject.available?).to eq(false) + expect(subject.registered?).to eq(true) + expect(subject.created_on).to be_a(Time) + expect(subject.created_on).to eq(DateTime.parse("1999-02-14")) + expect(subject.updated_on).to be_a(Time) + expect(subject.updated_on).to eq(DateTime.parse("2014-01-13")) + expect(subject.expires_on).to be_a(Time) + expect(subject.expires_on).to eq(DateTime.parse("2015-02-14")) + expect(subject.registrar).to be_a(Whois::Parser::Registrar) + expect(subject.registrar.id).to eq("MARKMONITOR") + expect(subject.registrar.name).to eq("Markmonitor") + expect(subject.registrar.organization).to eq("Markmonitor Inc.") + expect(subject.registrar.url).to eq("http://www.markmonitor.com") + expect(subject.registrant_contacts).to be_a(Array) + expect(subject.registrant_contacts.size).to eq(1) + expect(subject.registrant_contacts[0]).to be_a(Whois::Parser::Contact) + expect(subject.registrant_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_REGISTRANT) + expect(subject.registrant_contacts[0].id).to eq(nil) + expect(subject.registrant_contacts[0].name).to eq("Google Inc.") + expect(subject.registrant_contacts[0].organization).to eq(nil) + expect(subject.registrant_contacts[0].address).to eq("1600 Amphitheatre Parkway") + expect(subject.registrant_contacts[0].city).to eq("Mountain View") + expect(subject.registrant_contacts[0].zip).to eq("94043") + expect(subject.registrant_contacts[0].state).to eq("CA") + expect(subject.registrant_contacts[0].country).to eq("United States") + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers.size).to eq(4) + expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[0].name).to eq("ns1.google.com") + expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[1].name).to eq("ns2.google.com") + expect(subject.nameservers[2]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[2].name).to eq("ns3.google.com") + expect(subject.nameservers[3]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[3].name).to eq("ns4.google.com") + expect(subject.response_throttled?).to eq(false) + expect(subject.valid?).to eq(true) + expect(subject.invalid?).to eq(false) end end diff --git a/spec/whois/parsers/responses/whois.nic.uk/uk/status_reserved_spec.rb b/spec/whois/parsers/responses/whois.nic.uk/uk/status_reserved_spec.rb index de7408cd..f8d0d1bb 100644 --- a/spec/whois/parsers/responses/whois.nic.uk/uk/status_reserved_spec.rb +++ b/spec/whois/parsers/responses/whois.nic.uk/uk/status_reserved_spec.rb @@ -11,104 +11,57 @@ # require 'spec_helper' -require 'whois/parsers/whois.nic.uk.rb' -describe Whois::Parsers::WhoisNicUk, "status_reserved.expected" do +describe "whois.nic.uk", :aggregate_failures do subject do file = fixture("responses", "whois.nic.uk/uk/status_reserved.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.nic.uk") + Whois::Parser.parser_for(part) end - describe "#status" do - it do - expect(subject.status).to eq(:reserved) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(false) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(true) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to be_a(Time) - expect(subject.created_on).to eq(DateTime.parse("1996-08-01")) - end - end - describe "#updated_on" do - it do - expect(subject.updated_on).to be_a(Time) - expect(subject.updated_on).to eq(DateTime.parse("2012-03-23")) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to eq(nil) - end - end - describe "#registrar" do - it do - expect(subject.registrar).to be_a(Whois::Parser::Registrar) - expect(subject.registrar.id).to eq(nil) - expect(subject.registrar.name).to eq("Nominet") - expect(subject.registrar.organization).to eq("Nominet UK") - expect(subject.registrar.url).to eq("http://www.nic.uk/") - end - end - describe "#registrant_contacts" do - it do - expect(subject.registrant_contacts).to be_a(Array) - expect(subject.registrant_contacts.size).to eq(1) - expect(subject.registrant_contacts[0]).to be_a(Whois::Parser::Contact) - expect(subject.registrant_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_REGISTRANT) - expect(subject.registrant_contacts[0].id).to eq(nil) - expect(subject.registrant_contacts[0].name).to eq("Nominet UK") - expect(subject.registrant_contacts[0].organization).to eq(nil) - expect(subject.registrant_contacts[0].address).to eq("Minerva House, Edmund Halley Road\nOxford Science Park") - expect(subject.registrant_contacts[0].city).to eq("Oxford") - expect(subject.registrant_contacts[0].zip).to eq("OX4 4DQ") - expect(subject.registrant_contacts[0].state).to eq("Oxon") - expect(subject.registrant_contacts[0].country).to eq("United Kingdom") - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers.size).to eq(3) - expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[0].name).to eq("nom-ns1.nominet.org.uk") - expect(subject.nameservers[0].ipv4).to eq("213.248.199.16") - expect(subject.nameservers[0].ipv6).to eq(nil) - expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[1].name).to eq("nom-ns2.nominet.org.uk") - expect(subject.nameservers[1].ipv4).to eq("195.66.240.250") - expect(subject.nameservers[1].ipv6).to eq("2a01:40:1001:37::2") - expect(subject.nameservers[2]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[2].name).to eq("nom-ns3.nominet.org.uk") - expect(subject.nameservers[2].ipv4).to eq("213.219.13.194") - expect(subject.nameservers[2].ipv6).to eq(nil) - end - end - describe "#response_throttled?" do - it do - expect(subject.response_throttled?).to eq(false) - end - end - describe "#valid?" do - it do - expect(subject.valid?).to eq(true) - end - end - describe "#invalid?" do - it do - expect(subject.invalid?).to eq(false) - end + it "matches status_reserved.expected" do + expect(subject.status).to eq(:reserved) + expect(subject.available?).to eq(false) + expect(subject.registered?).to eq(true) + expect(subject.created_on).to be_a(Time) + expect(subject.created_on).to eq(DateTime.parse("1996-08-01")) + expect(subject.updated_on).to be_a(Time) + expect(subject.updated_on).to eq(DateTime.parse("2012-03-23")) + expect(subject.expires_on).to eq(nil) + expect(subject.registrar).to be_a(Whois::Parser::Registrar) + expect(subject.registrar.id).to eq(nil) + expect(subject.registrar.name).to eq("Nominet") + expect(subject.registrar.organization).to eq("Nominet UK") + expect(subject.registrar.url).to eq("http://www.nic.uk/") + expect(subject.registrant_contacts).to be_a(Array) + expect(subject.registrant_contacts.size).to eq(1) + expect(subject.registrant_contacts[0]).to be_a(Whois::Parser::Contact) + expect(subject.registrant_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_REGISTRANT) + expect(subject.registrant_contacts[0].id).to eq(nil) + expect(subject.registrant_contacts[0].name).to eq("Nominet UK") + expect(subject.registrant_contacts[0].organization).to eq(nil) + expect(subject.registrant_contacts[0].address).to eq("Minerva House, Edmund Halley Road\nOxford Science Park") + expect(subject.registrant_contacts[0].city).to eq("Oxford") + expect(subject.registrant_contacts[0].zip).to eq("OX4 4DQ") + expect(subject.registrant_contacts[0].state).to eq("Oxon") + expect(subject.registrant_contacts[0].country).to eq("United Kingdom") + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers.size).to eq(3) + expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[0].name).to eq("nom-ns1.nominet.org.uk") + expect(subject.nameservers[0].ipv4).to eq("213.248.199.16") + expect(subject.nameservers[0].ipv6).to eq(nil) + expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[1].name).to eq("nom-ns2.nominet.org.uk") + expect(subject.nameservers[1].ipv4).to eq("195.66.240.250") + expect(subject.nameservers[1].ipv6).to eq("2a01:40:1001:37::2") + expect(subject.nameservers[2]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[2].name).to eq("nom-ns3.nominet.org.uk") + expect(subject.nameservers[2].ipv4).to eq("213.219.13.194") + expect(subject.nameservers[2].ipv6).to eq(nil) + expect(subject.response_throttled?).to eq(false) + expect(subject.valid?).to eq(true) + expect(subject.invalid?).to eq(false) end end diff --git a/spec/whois/parsers/responses/whois.nic.uk/uk/status_suspended_spec.rb b/spec/whois/parsers/responses/whois.nic.uk/uk/status_suspended_spec.rb index 8cc4bc42..e4b9a721 100644 --- a/spec/whois/parsers/responses/whois.nic.uk/uk/status_suspended_spec.rb +++ b/spec/whois/parsers/responses/whois.nic.uk/uk/status_suspended_spec.rb @@ -11,62 +11,31 @@ # require 'spec_helper' -require 'whois/parsers/whois.nic.uk.rb' -describe Whois::Parsers::WhoisNicUk, "status_suspended.expected" do +describe "whois.nic.uk", :aggregate_failures do subject do file = fixture("responses", "whois.nic.uk/uk/status_suspended.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.nic.uk") + Whois::Parser.parser_for(part) end - describe "#status" do - it do - expect(subject.status).to eq(:registered) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(false) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(true) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to be_a(Time) - expect(subject.created_on).to eq(DateTime.parse("2008-08-30")) - end - end - describe "#updated_on" do - it do - expect(subject.updated_on).to be_a(Time) - expect(subject.updated_on).to eq(DateTime.parse("2012-02-09")) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to be_a(Time) - expect(subject.expires_on).to eq(DateTime.parse("2010-08-30")) - end - end - describe "#registrar" do - it do - expect(subject.registrar).to be_a(Whois::Parser::Registrar) - expect(subject.registrar.id).to eq("KEY-SYSTEMS-DE") - expect(subject.registrar.name).to eq("Key-Systems GmbH") - expect(subject.registrar.name).to eq("Key-Systems GmbH") - expect(subject.registrar.url).to eq("http://www.Key-Systems.net") - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers).to eq([]) - end + it "matches status_suspended.expected" do + expect(subject.status).to eq(:registered) + expect(subject.available?).to eq(false) + expect(subject.registered?).to eq(true) + expect(subject.created_on).to be_a(Time) + expect(subject.created_on).to eq(DateTime.parse("2008-08-30")) + expect(subject.updated_on).to be_a(Time) + expect(subject.updated_on).to eq(DateTime.parse("2012-02-09")) + expect(subject.expires_on).to be_a(Time) + expect(subject.expires_on).to eq(DateTime.parse("2010-08-30")) + expect(subject.registrar).to be_a(Whois::Parser::Registrar) + expect(subject.registrar.id).to eq("KEY-SYSTEMS-DE") + expect(subject.registrar.name).to eq("Key-Systems GmbH") + expect(subject.registrar.name).to eq("Key-Systems GmbH") + expect(subject.registrar.url).to eq("http://www.Key-Systems.net") + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers).to eq([]) end end diff --git a/spec/whois/parsers/responses/whois.nic.us/us/status_available_spec.rb b/spec/whois/parsers/responses/whois.nic.us/us/status_available_spec.rb index eac0a679..41ecf6d3 100644 --- a/spec/whois/parsers/responses/whois.nic.us/us/status_available_spec.rb +++ b/spec/whois/parsers/responses/whois.nic.us/us/status_available_spec.rb @@ -11,83 +11,32 @@ # require 'spec_helper' -require 'whois/parsers/whois.nic.us.rb' -describe Whois::Parsers::WhoisNicUs, "status_available.expected" do +describe "whois.nic.us", :aggregate_failures do subject do file = fixture("responses", "whois.nic.us/us/status_available.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.nic.us") + Whois::Parser.parser_for(part) end - describe "#domain" do - it do - expect(subject.domain).to eq("u34jedzcq.us") - end - end - describe "#domain_id" do - it do - expect(subject.domain_id).to eq(nil) - end - end - describe "#status" do - it do - expect(subject.status).to eq(nil) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(true) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(false) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to eq(nil) - end - end - describe "#updated_on" do - it do - expect(subject.updated_on).to eq(nil) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to eq(nil) - end - end - describe "#registrar" do - it do - expect(subject.registrar).to eq(nil) - end - end - describe "#registrant_contacts" do - it do - expect(subject.registrant_contacts).to be_a(Array) - expect(subject.registrant_contacts).to eq([]) - end - end - describe "#admin_contacts" do - it do - expect(subject.admin_contacts).to be_a(Array) - expect(subject.admin_contacts).to eq([]) - end - end - describe "#technical_contacts" do - it do - expect(subject.technical_contacts).to be_a(Array) - expect(subject.technical_contacts).to eq([]) - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers).to eq([]) - end + it "matches status_available.expected" do + expect(subject.domain).to eq("u34jedzcq.us") + expect(subject.domain_id).to eq(nil) + expect(subject.status).to eq(nil) + expect(subject.available?).to eq(true) + expect(subject.registered?).to eq(false) + expect(subject.created_on).to eq(nil) + expect(subject.updated_on).to eq(nil) + expect(subject.expires_on).to eq(nil) + expect(subject.registrar).to eq(nil) + expect(subject.registrant_contacts).to be_a(Array) + expect(subject.registrant_contacts).to eq([]) + expect(subject.admin_contacts).to be_a(Array) + expect(subject.admin_contacts).to eq([]) + expect(subject.technical_contacts).to be_a(Array) + expect(subject.technical_contacts).to eq([]) + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers).to eq([]) end end diff --git a/spec/whois/parsers/responses/whois.nic.us/us/status_registered_spec.rb b/spec/whois/parsers/responses/whois.nic.us/us/status_registered_spec.rb index 1c51b3e2..eb4ca8d4 100644 --- a/spec/whois/parsers/responses/whois.nic.us/us/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.nic.us/us/status_registered_spec.rb @@ -11,138 +11,87 @@ # require 'spec_helper' -require 'whois/parsers/whois.nic.us.rb' -describe Whois::Parsers::WhoisNicUs, "status_registered.expected" do +describe "whois.nic.us", :aggregate_failures do subject do file = fixture("responses", "whois.nic.us/us/status_registered.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.nic.us") + Whois::Parser.parser_for(part) end - describe "#domain" do - it do - expect(subject.domain).to eq("google.us") - end - end - describe "#domain_id" do - it do - expect(subject.domain_id).to eq("D775573-US") - end - end - describe "#status" do - it do - expect(subject.status).to eq(["clientDeleteProhibited", "clientTransferProhibited", "clientUpdateProhibited"]) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(false) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(true) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to be_a(Time) - expect(subject.created_on).to eq(DateTime.parse("2002-04-19 23:15:57 GMT")) - end - end - describe "#updated_on" do - it do - expect(subject.updated_on).to be_a(Time) - expect(subject.updated_on).to eq(DateTime.parse("2013-03-17 09:44:30 GMT")) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to be_a(Time) - expect(subject.expires_on).to eq(DateTime.parse("2014-04-18 23:59:59 GMT")) - end - end - describe "#registrar" do - it do - expect(subject.registrar).to be_a(Whois::Parser::Registrar) - expect(subject.registrar.id).to eq("292") - expect(subject.registrar.name).to eq("MARKMONITOR, INC.") - end - end - describe "#registrant_contacts" do - it do - expect(subject.registrant_contacts).to be_a(Array) - expect(subject.registrant_contacts.size).to eq(1) - expect(subject.registrant_contacts[0]).to be_a(Whois::Parser::Contact) - expect(subject.registrant_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_REGISTRANT) - expect(subject.registrant_contacts[0].id).to eq("MMR-135878") - expect(subject.registrant_contacts[0].name).to eq("Google Inc") - expect(subject.registrant_contacts[0].organization).to eq("Google Inc.") - expect(subject.registrant_contacts[0].address).to eq("1600 Amphitheatre Parkway") - expect(subject.registrant_contacts[0].city).to eq("Mountain View") - expect(subject.registrant_contacts[0].zip).to eq("94043") - expect(subject.registrant_contacts[0].state).to eq("CA") - expect(subject.registrant_contacts[0].country).to eq("United States") - expect(subject.registrant_contacts[0].country_code).to eq("US") - expect(subject.registrant_contacts[0].phone).to eq("+1.6502530000") - expect(subject.registrant_contacts[0].fax).to eq("+1.6502530001") - expect(subject.registrant_contacts[0].email).to eq("dns-admin@google.com") - end - end - describe "#admin_contacts" do - it do - expect(subject.admin_contacts).to be_a(Array) - expect(subject.admin_contacts.size).to eq(1) - expect(subject.admin_contacts[0]).to be_a(Whois::Parser::Contact) - expect(subject.admin_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_ADMINISTRATIVE) - expect(subject.admin_contacts[0].id).to eq("MMR-136042") - expect(subject.admin_contacts[0].name).to eq("Christina Chiou") - expect(subject.admin_contacts[0].organization).to eq("Google Inc.") - expect(subject.admin_contacts[0].address).to eq("1600 Amphitheatre Parkway") - expect(subject.admin_contacts[0].city).to eq("Mountain View") - expect(subject.admin_contacts[0].zip).to eq("94043") - expect(subject.admin_contacts[0].state).to eq("CA") - expect(subject.admin_contacts[0].country).to eq("United States") - expect(subject.admin_contacts[0].country_code).to eq("US") - expect(subject.admin_contacts[0].phone).to eq("+1.6502530000") - expect(subject.admin_contacts[0].fax).to eq("+1.6502530001") - expect(subject.admin_contacts[0].email).to eq("dns-admin@google.com") - end - end - describe "#technical_contacts" do - it do - expect(subject.technical_contacts).to be_a(Array) - expect(subject.technical_contacts.size).to eq(1) - expect(subject.technical_contacts[0]).to be_a(Whois::Parser::Contact) - expect(subject.technical_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_TECHNICAL) - expect(subject.technical_contacts[0].id).to eq("MMR-136042") - expect(subject.technical_contacts[0].name).to eq("Christina Chiou") - expect(subject.technical_contacts[0].organization).to eq("Google Inc.") - expect(subject.technical_contacts[0].address).to eq("1600 Amphitheatre Parkway") - expect(subject.technical_contacts[0].city).to eq("Mountain View") - expect(subject.technical_contacts[0].zip).to eq("94043") - expect(subject.technical_contacts[0].state).to eq("CA") - expect(subject.technical_contacts[0].country).to eq("United States") - expect(subject.technical_contacts[0].country_code).to eq("US") - expect(subject.technical_contacts[0].phone).to eq("+1.6502530000") - expect(subject.technical_contacts[0].fax).to eq("+1.6502530001") - expect(subject.technical_contacts[0].email).to eq("dns-admin@google.com") - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers.size).to eq(4) - expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[0].name).to eq("ns1.google.com") - expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[1].name).to eq("ns2.google.com") - expect(subject.nameservers[2]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[2].name).to eq("ns3.google.com") - expect(subject.nameservers[3]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[3].name).to eq("ns4.google.com") - end + it "matches status_registered.expected" do + expect(subject.domain).to eq("google.us") + expect(subject.domain_id).to eq("D775573-US") + expect(subject.status).to eq(["clientDeleteProhibited", "clientTransferProhibited", "clientUpdateProhibited"]) + expect(subject.available?).to eq(false) + expect(subject.registered?).to eq(true) + expect(subject.created_on).to be_a(Time) + expect(subject.created_on).to eq(DateTime.parse("2002-04-19 23:15:57 GMT")) + expect(subject.updated_on).to be_a(Time) + expect(subject.updated_on).to eq(DateTime.parse("2013-03-17 09:44:30 GMT")) + expect(subject.expires_on).to be_a(Time) + expect(subject.expires_on).to eq(DateTime.parse("2014-04-18 23:59:59 GMT")) + expect(subject.registrar).to be_a(Whois::Parser::Registrar) + expect(subject.registrar.id).to eq("292") + expect(subject.registrar.name).to eq("MARKMONITOR, INC.") + expect(subject.registrant_contacts).to be_a(Array) + expect(subject.registrant_contacts.size).to eq(1) + expect(subject.registrant_contacts[0]).to be_a(Whois::Parser::Contact) + expect(subject.registrant_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_REGISTRANT) + expect(subject.registrant_contacts[0].id).to eq("MMR-135878") + expect(subject.registrant_contacts[0].name).to eq("Google Inc") + expect(subject.registrant_contacts[0].organization).to eq("Google Inc.") + expect(subject.registrant_contacts[0].address).to eq("1600 Amphitheatre Parkway") + expect(subject.registrant_contacts[0].city).to eq("Mountain View") + expect(subject.registrant_contacts[0].zip).to eq("94043") + expect(subject.registrant_contacts[0].state).to eq("CA") + expect(subject.registrant_contacts[0].country).to eq("United States") + expect(subject.registrant_contacts[0].country_code).to eq("US") + expect(subject.registrant_contacts[0].phone).to eq("+1.6502530000") + expect(subject.registrant_contacts[0].fax).to eq("+1.6502530001") + expect(subject.registrant_contacts[0].email).to eq("dns-admin@google.com") + expect(subject.admin_contacts).to be_a(Array) + expect(subject.admin_contacts.size).to eq(1) + expect(subject.admin_contacts[0]).to be_a(Whois::Parser::Contact) + expect(subject.admin_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_ADMINISTRATIVE) + expect(subject.admin_contacts[0].id).to eq("MMR-136042") + expect(subject.admin_contacts[0].name).to eq("Christina Chiou") + expect(subject.admin_contacts[0].organization).to eq("Google Inc.") + expect(subject.admin_contacts[0].address).to eq("1600 Amphitheatre Parkway") + expect(subject.admin_contacts[0].city).to eq("Mountain View") + expect(subject.admin_contacts[0].zip).to eq("94043") + expect(subject.admin_contacts[0].state).to eq("CA") + expect(subject.admin_contacts[0].country).to eq("United States") + expect(subject.admin_contacts[0].country_code).to eq("US") + expect(subject.admin_contacts[0].phone).to eq("+1.6502530000") + expect(subject.admin_contacts[0].fax).to eq("+1.6502530001") + expect(subject.admin_contacts[0].email).to eq("dns-admin@google.com") + expect(subject.technical_contacts).to be_a(Array) + expect(subject.technical_contacts.size).to eq(1) + expect(subject.technical_contacts[0]).to be_a(Whois::Parser::Contact) + expect(subject.technical_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_TECHNICAL) + expect(subject.technical_contacts[0].id).to eq("MMR-136042") + expect(subject.technical_contacts[0].name).to eq("Christina Chiou") + expect(subject.technical_contacts[0].organization).to eq("Google Inc.") + expect(subject.technical_contacts[0].address).to eq("1600 Amphitheatre Parkway") + expect(subject.technical_contacts[0].city).to eq("Mountain View") + expect(subject.technical_contacts[0].zip).to eq("94043") + expect(subject.technical_contacts[0].state).to eq("CA") + expect(subject.technical_contacts[0].country).to eq("United States") + expect(subject.technical_contacts[0].country_code).to eq("US") + expect(subject.technical_contacts[0].phone).to eq("+1.6502530000") + expect(subject.technical_contacts[0].fax).to eq("+1.6502530001") + expect(subject.technical_contacts[0].email).to eq("dns-admin@google.com") + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers.size).to eq(4) + expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[0].name).to eq("ns1.google.com") + expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[1].name).to eq("ns2.google.com") + expect(subject.nameservers[2]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[2].name).to eq("ns3.google.com") + expect(subject.nameservers[3]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[3].name).to eq("ns4.google.com") end end diff --git a/spec/whois/parsers/responses/whois.nic.ve/ve/property_expires_on_missing_spec.rb b/spec/whois/parsers/responses/whois.nic.ve/ve/property_expires_on_missing_spec.rb index bed27714..9bdc0181 100644 --- a/spec/whois/parsers/responses/whois.nic.ve/ve/property_expires_on_missing_spec.rb +++ b/spec/whois/parsers/responses/whois.nic.ve/ve/property_expires_on_missing_spec.rb @@ -11,19 +11,16 @@ # require 'spec_helper' -require 'whois/parsers/whois.nic.ve.rb' -describe Whois::Parsers::WhoisNicVe, "property_expires_on_missing.expected" do +describe "whois.nic.ve", :aggregate_failures do subject do file = fixture("responses", "whois.nic.ve/ve/property_expires_on_missing.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.nic.ve") + Whois::Parser.parser_for(part) end - describe "#expires_on" do - it do - expect(subject.expires_on).to eq(nil) - end + it "matches property_expires_on_missing.expected" do + expect(subject.expires_on).to eq(nil) end end diff --git a/spec/whois/parsers/responses/whois.nic.ve/ve/property_nameservers_missing_spec.rb b/spec/whois/parsers/responses/whois.nic.ve/ve/property_nameservers_missing_spec.rb index 4e7eb52d..432c3a3a 100644 --- a/spec/whois/parsers/responses/whois.nic.ve/ve/property_nameservers_missing_spec.rb +++ b/spec/whois/parsers/responses/whois.nic.ve/ve/property_nameservers_missing_spec.rb @@ -11,20 +11,17 @@ # require 'spec_helper' -require 'whois/parsers/whois.nic.ve.rb' -describe Whois::Parsers::WhoisNicVe, "property_nameservers_missing.expected" do +describe "whois.nic.ve", :aggregate_failures do subject do file = fixture("responses", "whois.nic.ve/ve/property_nameservers_missing.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.nic.ve") + Whois::Parser.parser_for(part) end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers).to eq([]) - end + it "matches property_nameservers_missing.expected" do + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers).to eq([]) end end diff --git a/spec/whois/parsers/responses/whois.nic.ve/ve/property_nameservers_spec.rb b/spec/whois/parsers/responses/whois.nic.ve/ve/property_nameservers_spec.rb index 41a975cb..14408882 100644 --- a/spec/whois/parsers/responses/whois.nic.ve/ve/property_nameservers_spec.rb +++ b/spec/whois/parsers/responses/whois.nic.ve/ve/property_nameservers_spec.rb @@ -11,24 +11,21 @@ # require 'spec_helper' -require 'whois/parsers/whois.nic.ve.rb' -describe Whois::Parsers::WhoisNicVe, "property_nameservers.expected" do +describe "whois.nic.ve", :aggregate_failures do subject do file = fixture("responses", "whois.nic.ve/ve/property_nameservers.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.nic.ve") + Whois::Parser.parser_for(part) end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers.size).to eq(2) - expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[0].name).to eq("avalon.ula.ve") - expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[1].name).to eq("azmodan.ula.ve") - end + it "matches property_nameservers.expected" do + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers.size).to eq(2) + expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[0].name).to eq("avalon.ula.ve") + expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[1].name).to eq("azmodan.ula.ve") end end diff --git a/spec/whois/parsers/responses/whois.nic.ve/ve/property_status_activo_spec.rb b/spec/whois/parsers/responses/whois.nic.ve/ve/property_status_activo_spec.rb index b48c1678..f7483ee3 100644 --- a/spec/whois/parsers/responses/whois.nic.ve/ve/property_status_activo_spec.rb +++ b/spec/whois/parsers/responses/whois.nic.ve/ve/property_status_activo_spec.rb @@ -11,29 +11,18 @@ # require 'spec_helper' -require 'whois/parsers/whois.nic.ve.rb' -describe Whois::Parsers::WhoisNicVe, "property_status_activo.expected" do +describe "whois.nic.ve", :aggregate_failures do subject do file = fixture("responses", "whois.nic.ve/ve/property_status_activo.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.nic.ve") + Whois::Parser.parser_for(part) end - describe "#status" do - it do - expect(subject.status).to eq(:registered) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(false) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(true) - end + it "matches property_status_activo.expected" do + expect(subject.status).to eq(:registered) + expect(subject.available?).to eq(false) + expect(subject.registered?).to eq(true) end end diff --git a/spec/whois/parsers/responses/whois.nic.ve/ve/property_status_missing_spec.rb b/spec/whois/parsers/responses/whois.nic.ve/ve/property_status_missing_spec.rb index 7a1566ae..4011630e 100644 --- a/spec/whois/parsers/responses/whois.nic.ve/ve/property_status_missing_spec.rb +++ b/spec/whois/parsers/responses/whois.nic.ve/ve/property_status_missing_spec.rb @@ -11,29 +11,18 @@ # require 'spec_helper' -require 'whois/parsers/whois.nic.ve.rb' -describe Whois::Parsers::WhoisNicVe, "property_status_missing.expected" do +describe "whois.nic.ve", :aggregate_failures do subject do file = fixture("responses", "whois.nic.ve/ve/property_status_missing.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.nic.ve") + Whois::Parser.parser_for(part) end - describe "#status" do - it do - expect(subject.status).to eq(:available) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(true) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(false) - end + it "matches property_status_missing.expected" do + expect(subject.status).to eq(:available) + expect(subject.available?).to eq(true) + expect(subject.registered?).to eq(false) end end diff --git a/spec/whois/parsers/responses/whois.nic.ve/ve/property_status_suspendido_spec.rb b/spec/whois/parsers/responses/whois.nic.ve/ve/property_status_suspendido_spec.rb index ffeb1bb3..5c119dc2 100644 --- a/spec/whois/parsers/responses/whois.nic.ve/ve/property_status_suspendido_spec.rb +++ b/spec/whois/parsers/responses/whois.nic.ve/ve/property_status_suspendido_spec.rb @@ -11,29 +11,18 @@ # require 'spec_helper' -require 'whois/parsers/whois.nic.ve.rb' -describe Whois::Parsers::WhoisNicVe, "property_status_suspendido.expected" do +describe "whois.nic.ve", :aggregate_failures do subject do file = fixture("responses", "whois.nic.ve/ve/property_status_suspendido.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.nic.ve") + Whois::Parser.parser_for(part) end - describe "#status" do - it do - expect(subject.status).to eq(:inactive) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(false) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(true) - end + it "matches property_status_suspendido.expected" do + expect(subject.status).to eq(:inactive) + expect(subject.available?).to eq(false) + expect(subject.registered?).to eq(true) end end diff --git a/spec/whois/parsers/responses/whois.nic.ve/ve/property_updated_on_blank_spec.rb b/spec/whois/parsers/responses/whois.nic.ve/ve/property_updated_on_blank_spec.rb index 94ee5f23..d867860b 100644 --- a/spec/whois/parsers/responses/whois.nic.ve/ve/property_updated_on_blank_spec.rb +++ b/spec/whois/parsers/responses/whois.nic.ve/ve/property_updated_on_blank_spec.rb @@ -11,19 +11,16 @@ # require 'spec_helper' -require 'whois/parsers/whois.nic.ve.rb' -describe Whois::Parsers::WhoisNicVe, "property_updated_on_blank.expected" do +describe "whois.nic.ve", :aggregate_failures do subject do file = fixture("responses", "whois.nic.ve/ve/property_updated_on_blank.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.nic.ve") + Whois::Parser.parser_for(part) end - describe "#updated_on" do - it do - expect(subject.updated_on).to eq(nil) - end + it "matches property_updated_on_blank.expected" do + expect(subject.updated_on).to eq(nil) end end diff --git a/spec/whois/parsers/responses/whois.nic.ve/ve/property_updated_on_spec.rb b/spec/whois/parsers/responses/whois.nic.ve/ve/property_updated_on_spec.rb index e0cc55d2..a74f9cdf 100644 --- a/spec/whois/parsers/responses/whois.nic.ve/ve/property_updated_on_spec.rb +++ b/spec/whois/parsers/responses/whois.nic.ve/ve/property_updated_on_spec.rb @@ -11,20 +11,17 @@ # require 'spec_helper' -require 'whois/parsers/whois.nic.ve.rb' -describe Whois::Parsers::WhoisNicVe, "property_updated_on.expected" do +describe "whois.nic.ve", :aggregate_failures do subject do file = fixture("responses", "whois.nic.ve/ve/property_updated_on.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.nic.ve") + Whois::Parser.parser_for(part) end - describe "#updated_on" do - it do - expect(subject.updated_on).to be_a(Time) - expect(subject.updated_on).to eq(DateTime.parse("2005-11-17 21:16:31")) - end + it "matches property_updated_on.expected" do + expect(subject.updated_on).to be_a(Time) + expect(subject.updated_on).to eq(DateTime.parse("2005-11-17 21:16:31")) end end diff --git a/spec/whois/parsers/responses/whois.nic.ve/ve/status_available_spec.rb b/spec/whois/parsers/responses/whois.nic.ve/ve/status_available_spec.rb index 62b96871..c4c2d2b3 100644 --- a/spec/whois/parsers/responses/whois.nic.ve/ve/status_available_spec.rb +++ b/spec/whois/parsers/responses/whois.nic.ve/ve/status_available_spec.rb @@ -11,50 +11,23 @@ # require 'spec_helper' -require 'whois/parsers/whois.nic.ve.rb' -describe Whois::Parsers::WhoisNicVe, "status_available.expected" do +describe "whois.nic.ve", :aggregate_failures do subject do file = fixture("responses", "whois.nic.ve/ve/status_available.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.nic.ve") + Whois::Parser.parser_for(part) end - describe "#status" do - it do - expect(subject.status).to eq(:available) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(true) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(false) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to eq(nil) - end - end - describe "#updated_on" do - it do - expect(subject.updated_on).to eq(nil) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to eq(nil) - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers).to eq([]) - end + it "matches status_available.expected" do + expect(subject.status).to eq(:available) + expect(subject.available?).to eq(true) + expect(subject.registered?).to eq(false) + expect(subject.created_on).to eq(nil) + expect(subject.updated_on).to eq(nil) + expect(subject.expires_on).to eq(nil) + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers).to eq([]) end end diff --git a/spec/whois/parsers/responses/whois.nic.ve/ve/status_inactive_spec.rb b/spec/whois/parsers/responses/whois.nic.ve/ve/status_inactive_spec.rb index 9d4f88c2..485e9afe 100644 --- a/spec/whois/parsers/responses/whois.nic.ve/ve/status_inactive_spec.rb +++ b/spec/whois/parsers/responses/whois.nic.ve/ve/status_inactive_spec.rb @@ -11,57 +11,30 @@ # require 'spec_helper' -require 'whois/parsers/whois.nic.ve.rb' -describe Whois::Parsers::WhoisNicVe, "status_inactive.expected" do +describe "whois.nic.ve", :aggregate_failures do subject do file = fixture("responses", "whois.nic.ve/ve/status_inactive.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.nic.ve") + Whois::Parser.parser_for(part) end - describe "#status" do - it do - expect(subject.status).to eq(:inactive) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(false) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(true) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to be_a(Time) - expect(subject.created_on).to eq(DateTime.parse("2005-11-21 15:21:32")) - end - end - describe "#updated_on" do - it do - expect(subject.updated_on).to be_a(Time) - expect(subject.updated_on).to eq(DateTime.parse("2006-06-08 21:54:41")) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to be_a(Time) - expect(subject.expires_on).to eq(DateTime.parse("2010-11-21 15:21:32")) - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers.size).to eq(2) - expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[0].name).to eq("ns10.tepuyserver.net") - expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[1].name).to eq("ns9.tepuyserver.net") - end + it "matches status_inactive.expected" do + expect(subject.status).to eq(:inactive) + expect(subject.available?).to eq(false) + expect(subject.registered?).to eq(true) + expect(subject.created_on).to be_a(Time) + expect(subject.created_on).to eq(DateTime.parse("2005-11-21 15:21:32")) + expect(subject.updated_on).to be_a(Time) + expect(subject.updated_on).to eq(DateTime.parse("2006-06-08 21:54:41")) + expect(subject.expires_on).to be_a(Time) + expect(subject.expires_on).to eq(DateTime.parse("2010-11-21 15:21:32")) + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers.size).to eq(2) + expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[0].name).to eq("ns10.tepuyserver.net") + expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[1].name).to eq("ns9.tepuyserver.net") end end diff --git a/spec/whois/parsers/responses/whois.nic.ve/ve/status_registered_spec.rb b/spec/whois/parsers/responses/whois.nic.ve/ve/status_registered_spec.rb index feec49ce..041b6f7b 100644 --- a/spec/whois/parsers/responses/whois.nic.ve/ve/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.nic.ve/ve/status_registered_spec.rb @@ -11,52 +11,25 @@ # require 'spec_helper' -require 'whois/parsers/whois.nic.ve.rb' -describe Whois::Parsers::WhoisNicVe, "status_registered.expected" do +describe "whois.nic.ve", :aggregate_failures do subject do file = fixture("responses", "whois.nic.ve/ve/status_registered.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.nic.ve") + Whois::Parser.parser_for(part) end - describe "#status" do - it do - expect(subject.status).to eq(:registered) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(false) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(true) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to be_a(Time) - expect(subject.created_on).to eq(DateTime.parse("2010-10-27 12:23:43")) - end - end - describe "#updated_on" do - it do - expect(subject.updated_on).to eq(nil) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to be_a(Time) - expect(subject.expires_on).to eq(DateTime.parse("2011-10-27 12:23:43")) - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers).to eq([]) - end + it "matches status_registered.expected" do + expect(subject.status).to eq(:registered) + expect(subject.available?).to eq(false) + expect(subject.registered?).to eq(true) + expect(subject.created_on).to be_a(Time) + expect(subject.created_on).to eq(DateTime.parse("2010-10-27 12:23:43")) + expect(subject.updated_on).to eq(nil) + expect(subject.expires_on).to be_a(Time) + expect(subject.expires_on).to eq(DateTime.parse("2011-10-27 12:23:43")) + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers).to eq([]) end end diff --git a/spec/whois/parsers/responses/whois.nic.wf/wf/response_throttled_spec.rb b/spec/whois/parsers/responses/whois.nic.wf/wf/response_throttled_spec.rb index 8dbcf9d4..467c3855 100644 --- a/spec/whois/parsers/responses/whois.nic.wf/wf/response_throttled_spec.rb +++ b/spec/whois/parsers/responses/whois.nic.wf/wf/response_throttled_spec.rb @@ -11,19 +11,16 @@ # require 'spec_helper' -require 'whois/parsers/whois.nic.wf.rb' -describe Whois::Parsers::WhoisNicWf, "response_throttled.expected" do +describe "whois.nic.wf", :aggregate_failures do subject do file = fixture("responses", "whois.nic.wf/wf/response_throttled.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.nic.wf") + Whois::Parser.parser_for(part) end - describe "#response_throttled?" do - it do - expect(subject.response_throttled?).to eq(true) - end + it "matches response_throttled.expected" do + expect(subject.response_throttled?).to eq(true) end end diff --git a/spec/whois/parsers/responses/whois.nic.wf/wf/status_available_spec.rb b/spec/whois/parsers/responses/whois.nic.wf/wf/status_available_spec.rb index 7f809e02..b37eb4de 100644 --- a/spec/whois/parsers/responses/whois.nic.wf/wf/status_available_spec.rb +++ b/spec/whois/parsers/responses/whois.nic.wf/wf/status_available_spec.rb @@ -11,68 +11,29 @@ # require 'spec_helper' -require 'whois/parsers/whois.nic.wf.rb' -describe Whois::Parsers::WhoisNicWf, "status_available.expected" do +describe "whois.nic.wf", :aggregate_failures do subject do file = fixture("responses", "whois.nic.wf/wf/status_available.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.nic.wf") + Whois::Parser.parser_for(part) end - describe "#status" do - it do - expect(subject.status).to eq(:available) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(true) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(false) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to eq(nil) - end - end - describe "#updated_on" do - it do - expect(subject.updated_on).to eq(nil) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to eq(nil) - end - end - describe "#registrant_contacts" do - it do - expect(subject.registrant_contacts).to be_a(Array) - expect(subject.registrant_contacts).to eq([]) - end - end - describe "#admin_contacts" do - it do - expect(subject.admin_contacts).to be_a(Array) - expect(subject.admin_contacts).to eq([]) - end - end - describe "#technical_contacts" do - it do - expect(subject.technical_contacts).to be_a(Array) - expect(subject.technical_contacts).to eq([]) - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers).to eq([]) - end + it "matches status_available.expected" do + expect(subject.status).to eq(:available) + expect(subject.available?).to eq(true) + expect(subject.registered?).to eq(false) + expect(subject.created_on).to eq(nil) + expect(subject.updated_on).to eq(nil) + expect(subject.expires_on).to eq(nil) + expect(subject.registrant_contacts).to be_a(Array) + expect(subject.registrant_contacts).to eq([]) + expect(subject.admin_contacts).to be_a(Array) + expect(subject.admin_contacts).to eq([]) + expect(subject.technical_contacts).to be_a(Array) + expect(subject.technical_contacts).to eq([]) + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers).to eq([]) end end diff --git a/spec/whois/parsers/responses/whois.nic.wf/wf/status_registered_spec.rb b/spec/whois/parsers/responses/whois.nic.wf/wf/status_registered_spec.rb index 65c17c04..377ca2fe 100644 --- a/spec/whois/parsers/responses/whois.nic.wf/wf/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.nic.wf/wf/status_registered_spec.rb @@ -11,122 +11,83 @@ # require 'spec_helper' -require 'whois/parsers/whois.nic.wf.rb' -describe Whois::Parsers::WhoisNicWf, "status_registered.expected" do +describe "whois.nic.wf", :aggregate_failures do subject do file = fixture("responses", "whois.nic.wf/wf/status_registered.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.nic.wf") + Whois::Parser.parser_for(part) end - describe "#status" do - it do - expect(subject.status).to eq(:registered) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(false) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(true) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to be_a(Time) - expect(subject.created_on).to eq(DateTime.parse("1994-12-31 23:00:00 UTC")) - end - end - describe "#updated_on" do - it do - expect(subject.updated_on).to be_a(Time) - expect(subject.updated_on).to eq(DateTime.parse("2018-12-31 23:33:39 UTC")) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to be_a(Time) - expect(subject.expires_on).to eq(DateTime.parse("2019-12-31 23:00:00 UTC")) - end - end - describe "#registrant_contacts" do - it do - expect(subject.registrant_contacts).to be_a(Array) - expect(subject.registrant_contacts.size).to eq(1) - expect(subject.registrant_contacts[0]).to be_a(Whois::Parser::Contact) - expect(subject.registrant_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_REGISTRANT) - expect(subject.registrant_contacts[0].id).to eq("AEFT2-FRNIC") - expect(subject.registrant_contacts[0].name).to eq(nil) - expect(subject.registrant_contacts[0].organization).to eq("Afnic (Wallis et Futuna - TOM)") - expect(subject.registrant_contacts[0].address).to eq("immeuble le Stephenson\n1, rue Stephenson\nHall A2 - 3eme etage\n78180 Montigny le Bretonneux") - expect(subject.registrant_contacts[0].city).to eq(nil) - expect(subject.registrant_contacts[0].zip).to eq(nil) - expect(subject.registrant_contacts[0].state).to eq(nil) - expect(subject.registrant_contacts[0].country).to eq(nil) - expect(subject.registrant_contacts[0].country_code).to eq("FR") - expect(subject.registrant_contacts[0].phone).to eq("+33 1 39 30 83 00") - expect(subject.registrant_contacts[0].fax).to eq("+33 1 39 30 83 01") - expect(subject.registrant_contacts[0].email).to eq("support@afnic.fr") - expect(subject.registrant_contacts[0].updated_on).to eq(DateTime.parse("2017-07-17 12:41:18 UTC")) - end - end - describe "#admin_contacts" do - it do - expect(subject.admin_contacts).to be_a(Array) - expect(subject.admin_contacts.size).to eq(1) - expect(subject.admin_contacts[0]).to be_a(Whois::Parser::Contact) - expect(subject.admin_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_ADMINISTRATIVE) - expect(subject.admin_contacts[0].id).to eq("NFC1-FRNIC") - expect(subject.admin_contacts[0].name).to eq("NIC France Contact") - expect(subject.admin_contacts[0].organization).to eq("AFNIC") - expect(subject.admin_contacts[0].address).to eq("immeuble le Stephenson\n1, rue Stephenson\nHall A2 - 3eme etage\n78180 Montigny-Le-Bretonneux") - expect(subject.admin_contacts[0].city).to eq(nil) - expect(subject.admin_contacts[0].zip).to eq(nil) - expect(subject.admin_contacts[0].state).to eq(nil) - expect(subject.admin_contacts[0].country).to eq(nil) - expect(subject.admin_contacts[0].country_code).to eq("FR") - expect(subject.admin_contacts[0].phone).to eq("+33 1 39 30 83 00") - expect(subject.admin_contacts[0].fax).to eq(nil) - expect(subject.admin_contacts[0].email).to eq("hostmaster@nic.fr") - expect(subject.admin_contacts[0].updated_on).to eq(DateTime.parse("2005-08-23 16:13:17 UTC")) - end - end - describe "#technical_contacts" do - it do - expect(subject.technical_contacts).to be_a(Array) - expect(subject.technical_contacts.size).to eq(1) - expect(subject.technical_contacts[0]).to be_a(Whois::Parser::Contact) - expect(subject.technical_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_TECHNICAL) - expect(subject.technical_contacts[0].id).to eq("NFC1-FRNIC") - expect(subject.technical_contacts[0].name).to eq("NIC France Contact") - expect(subject.technical_contacts[0].organization).to eq("AFNIC") - expect(subject.technical_contacts[0].address).to eq("immeuble le Stephenson\n1, rue Stephenson\nHall A2 - 3eme etage\n78180 Montigny-Le-Bretonneux") - expect(subject.technical_contacts[0].city).to eq(nil) - expect(subject.technical_contacts[0].zip).to eq(nil) - expect(subject.technical_contacts[0].state).to eq(nil) - expect(subject.technical_contacts[0].country).to eq(nil) - expect(subject.technical_contacts[0].country_code).to eq("FR") - expect(subject.technical_contacts[0].phone).to eq("+33 1 39 30 83 00") - expect(subject.technical_contacts[0].fax).to eq(nil) - expect(subject.technical_contacts[0].email).to eq("hostmaster@nic.fr") - expect(subject.technical_contacts[0].updated_on).to eq(DateTime.parse("2005-08-23 16:13:17 UTC")) - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers.size).to eq(3) - expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[0].name).to eq("ns1.nic.fr") - expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[1].name).to eq("ns2.nic.fr") - expect(subject.nameservers[2]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[2].name).to eq("ns3.nic.fr") - end + it "matches status_registered.expected" do + expect(subject.status).to eq(:registered) + expect(subject.available?).to eq(false) + expect(subject.registered?).to eq(true) + expect(subject.created_on).to be_a(Time) + expect(subject.created_on).to eq(DateTime.parse("1994-12-31 23:00:00 UTC")) + expect(subject.updated_on).to be_a(Time) + expect(subject.updated_on).to eq(DateTime.parse("2018-12-31 23:33:39 UTC")) + expect(subject.expires_on).to be_a(Time) + expect(subject.expires_on).to eq(DateTime.parse("2019-12-31 23:00:00 UTC")) + expect(subject.registrant_contacts).to be_a(Array) + expect(subject.registrant_contacts.size).to eq(1) + expect(subject.registrant_contacts[0]).to be_a(Whois::Parser::Contact) + expect(subject.registrant_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_REGISTRANT) + expect(subject.registrant_contacts[0].id).to eq("AEFT2-FRNIC") + expect(subject.registrant_contacts[0].name).to eq(nil) + expect(subject.registrant_contacts[0].organization).to eq("Afnic (Wallis et Futuna - TOM)") + expect(subject.registrant_contacts[0].address).to eq("immeuble le Stephenson\n1, rue Stephenson\nHall A2 - 3eme etage\n78180 Montigny le Bretonneux") + expect(subject.registrant_contacts[0].city).to eq(nil) + expect(subject.registrant_contacts[0].zip).to eq(nil) + expect(subject.registrant_contacts[0].state).to eq(nil) + expect(subject.registrant_contacts[0].country).to eq(nil) + expect(subject.registrant_contacts[0].country_code).to eq("FR") + expect(subject.registrant_contacts[0].phone).to eq("+33 1 39 30 83 00") + expect(subject.registrant_contacts[0].fax).to eq("+33 1 39 30 83 01") + expect(subject.registrant_contacts[0].email).to eq("support@afnic.fr") + expect(subject.registrant_contacts[0].updated_on).to eq(DateTime.parse("2017-07-17 12:41:18 UTC")) + expect(subject.admin_contacts).to be_a(Array) + expect(subject.admin_contacts.size).to eq(1) + expect(subject.admin_contacts[0]).to be_a(Whois::Parser::Contact) + expect(subject.admin_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_ADMINISTRATIVE) + expect(subject.admin_contacts[0].id).to eq("NFC1-FRNIC") + expect(subject.admin_contacts[0].name).to eq("NIC France Contact") + expect(subject.admin_contacts[0].organization).to eq("AFNIC") + expect(subject.admin_contacts[0].address).to eq("immeuble le Stephenson\n1, rue Stephenson\nHall A2 - 3eme etage\n78180 Montigny-Le-Bretonneux") + expect(subject.admin_contacts[0].city).to eq(nil) + expect(subject.admin_contacts[0].zip).to eq(nil) + expect(subject.admin_contacts[0].state).to eq(nil) + expect(subject.admin_contacts[0].country).to eq(nil) + expect(subject.admin_contacts[0].country_code).to eq("FR") + expect(subject.admin_contacts[0].phone).to eq("+33 1 39 30 83 00") + expect(subject.admin_contacts[0].fax).to eq(nil) + expect(subject.admin_contacts[0].email).to eq("hostmaster@nic.fr") + expect(subject.admin_contacts[0].updated_on).to eq(DateTime.parse("2005-08-23 16:13:17 UTC")) + expect(subject.technical_contacts).to be_a(Array) + expect(subject.technical_contacts.size).to eq(1) + expect(subject.technical_contacts[0]).to be_a(Whois::Parser::Contact) + expect(subject.technical_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_TECHNICAL) + expect(subject.technical_contacts[0].id).to eq("NFC1-FRNIC") + expect(subject.technical_contacts[0].name).to eq("NIC France Contact") + expect(subject.technical_contacts[0].organization).to eq("AFNIC") + expect(subject.technical_contacts[0].address).to eq("immeuble le Stephenson\n1, rue Stephenson\nHall A2 - 3eme etage\n78180 Montigny-Le-Bretonneux") + expect(subject.technical_contacts[0].city).to eq(nil) + expect(subject.technical_contacts[0].zip).to eq(nil) + expect(subject.technical_contacts[0].state).to eq(nil) + expect(subject.technical_contacts[0].country).to eq(nil) + expect(subject.technical_contacts[0].country_code).to eq("FR") + expect(subject.technical_contacts[0].phone).to eq("+33 1 39 30 83 00") + expect(subject.technical_contacts[0].fax).to eq(nil) + expect(subject.technical_contacts[0].email).to eq("hostmaster@nic.fr") + expect(subject.technical_contacts[0].updated_on).to eq(DateTime.parse("2005-08-23 16:13:17 UTC")) + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers.size).to eq(3) + expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[0].name).to eq("ns1.nic.fr") + expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[1].name).to eq("ns2.nic.fr") + expect(subject.nameservers[2]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[2].name).to eq("ns3.nic.fr") end end diff --git a/spec/whois/parsers/responses/whois.nic.world/world/status_available_spec.rb b/spec/whois/parsers/responses/whois.nic.world/world/status_available_spec.rb index 812fb7cb..5f7f2797 100644 --- a/spec/whois/parsers/responses/whois.nic.world/world/status_available_spec.rb +++ b/spec/whois/parsers/responses/whois.nic.world/world/status_available_spec.rb @@ -11,83 +11,32 @@ # require 'spec_helper' -require 'whois/parsers/whois.nic.world.rb' -describe Whois::Parsers::WhoisNicWorld, "status_available.expected" do +describe "whois.nic.world", :aggregate_failures do subject do file = fixture("responses", "whois.nic.world/world/status_available.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.nic.world") + Whois::Parser.parser_for(part) end - describe "#domain" do - it do - expect(subject.domain).to eq(nil) - end - end - describe "#domain_id" do - it do - expect(subject.domain_id).to eq(nil) - end - end - describe "#status" do - it do - expect(subject.status).to eq(:available) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(true) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(false) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to eq(nil) - end - end - describe "#updated_on" do - it do - expect(subject.updated_on).to eq(nil) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to eq(nil) - end - end - describe "#registrar" do - it do - expect(subject.registrar).to eq(nil) - end - end - describe "#registrant_contacts" do - it do - expect(subject.registrant_contacts).to be_a(Array) - expect(subject.registrant_contacts).to eq([]) - end - end - describe "#admin_contacts" do - it do - expect(subject.admin_contacts).to be_a(Array) - expect(subject.admin_contacts).to eq([]) - end - end - describe "#technical_contacts" do - it do - expect(subject.technical_contacts).to be_a(Array) - expect(subject.technical_contacts).to eq([]) - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers).to eq([]) - end + it "matches status_available.expected" do + expect(subject.domain).to eq(nil) + expect(subject.domain_id).to eq(nil) + expect(subject.status).to eq(:available) + expect(subject.available?).to eq(true) + expect(subject.registered?).to eq(false) + expect(subject.created_on).to eq(nil) + expect(subject.updated_on).to eq(nil) + expect(subject.expires_on).to eq(nil) + expect(subject.registrar).to eq(nil) + expect(subject.registrant_contacts).to be_a(Array) + expect(subject.registrant_contacts).to eq([]) + expect(subject.admin_contacts).to be_a(Array) + expect(subject.admin_contacts).to eq([]) + expect(subject.technical_contacts).to be_a(Array) + expect(subject.technical_contacts).to eq([]) + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers).to eq([]) end end diff --git a/spec/whois/parsers/responses/whois.nic.world/world/status_registered_spec.rb b/spec/whois/parsers/responses/whois.nic.world/world/status_registered_spec.rb index ccb7872f..d9638f31 100644 --- a/spec/whois/parsers/responses/whois.nic.world/world/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.nic.world/world/status_registered_spec.rb @@ -11,132 +11,81 @@ # require 'spec_helper' -require 'whois/parsers/whois.nic.world.rb' -describe Whois::Parsers::WhoisNicWorld, "status_registered.expected" do +describe "whois.nic.world", :aggregate_failures do subject do file = fixture("responses", "whois.nic.world/world/status_registered.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.nic.world") + Whois::Parser.parser_for(part) end - describe "#domain" do - it do - expect(subject.domain).to eq("solex.world") - end - end - describe "#domain_id" do - it do - expect(subject.domain_id).to eq("0bd73f47b47f436cac3ee5b20df18ef5-DONUTS") - end - end - describe "#status" do - it do - expect(subject.status).to eq(:registered) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(false) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(true) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to be_a(Time) - expect(subject.created_on).to eq(DateTime.parse("2017-10-03 11:12:14 GMT")) - end - end - describe "#updated_on" do - it do - expect(subject.updated_on).to be_a(Time) - expect(subject.updated_on).to eq(DateTime.parse("2021-10-06 14:58:38 GMT")) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to be_a(Time) - expect(subject.expires_on).to eq(DateTime.parse("2022-10-03 11:12:14 GMT")) - end - end - describe "#registrar" do - it do - expect(subject.registrar).to be_a(Whois::Parser::Registrar) - expect(subject.registrar.id).to eq("433") - expect(subject.registrar.name).to eq("OVH SAS") - expect(subject.registrar.url).to eq("http://www.ovh.com") - end - end - describe "#registrant_contacts" do - it do - expect(subject.registrant_contacts).to be_a(Array) - expect(subject.registrant_contacts.size).to eq(1) - expect(subject.registrant_contacts[0]).to be_a(Whois::Parser::Contact) - expect(subject.registrant_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_REGISTRANT) - expect(subject.registrant_contacts[0].id).to eq("REDACTED FOR PRIVACY") - expect(subject.registrant_contacts[0].name).to eq("REDACTED FOR PRIVACY") - expect(subject.registrant_contacts[0].organization).to eq("") - expect(subject.registrant_contacts[0].address).to eq("REDACTED FOR PRIVACY") - expect(subject.registrant_contacts[0].city).to eq("REDACTED FOR PRIVACY") - expect(subject.registrant_contacts[0].zip).to eq("REDACTED FOR PRIVACY") - expect(subject.registrant_contacts[0].state).to eq("") - expect(subject.registrant_contacts[0].country_code).to eq("FR") - expect(subject.registrant_contacts[0].phone).to eq("REDACTED FOR PRIVACY ext: REDACTED FOR PRIVACY") - expect(subject.registrant_contacts[0].fax).to eq("REDACTED FOR PRIVACY ext: REDACTED FOR PRIVACY") - expect(subject.registrant_contacts[0].email).to eq("Please query the RDDS service of the Registrar of Record identified in this output for information on how to contact the Registrant, Admin, or Tech contact of the queried domain name.") - end - end - describe "#admin_contacts" do - it do - expect(subject.admin_contacts).to be_a(Array) - expect(subject.admin_contacts.size).to eq(1) - expect(subject.admin_contacts[0]).to be_a(Whois::Parser::Contact) - expect(subject.admin_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_ADMINISTRATIVE) - expect(subject.admin_contacts[0].id).to eq("REDACTED FOR PRIVACY") - expect(subject.admin_contacts[0].name).to eq("REDACTED FOR PRIVACY") - expect(subject.admin_contacts[0].organization).to eq("REDACTED FOR PRIVACY") - expect(subject.admin_contacts[0].address).to eq("REDACTED FOR PRIVACY") - expect(subject.admin_contacts[0].city).to eq("REDACTED FOR PRIVACY") - expect(subject.admin_contacts[0].zip).to eq("REDACTED FOR PRIVACY") - expect(subject.admin_contacts[0].state).to eq("REDACTED FOR PRIVACY") - expect(subject.admin_contacts[0].country_code).to eq("REDACTED FOR PRIVACY") - expect(subject.admin_contacts[0].phone).to eq("REDACTED FOR PRIVACY ext: REDACTED FOR PRIVACY") - expect(subject.admin_contacts[0].fax).to eq("REDACTED FOR PRIVACY ext: REDACTED FOR PRIVACY") - expect(subject.admin_contacts[0].email).to eq("Please query the RDDS service of the Registrar of Record identified in this output for information on how to contact the Registrant, Admin, or Tech contact of the queried domain name.") - end - end - describe "#technical_contacts" do - it do - expect(subject.technical_contacts).to be_a(Array) - expect(subject.technical_contacts.size).to eq(1) - expect(subject.technical_contacts[0]).to be_a(Whois::Parser::Contact) - expect(subject.technical_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_TECHNICAL) - expect(subject.technical_contacts[0].id).to eq("REDACTED FOR PRIVACY") - expect(subject.technical_contacts[0].name).to eq("REDACTED FOR PRIVACY") - expect(subject.technical_contacts[0].organization).to eq("REDACTED FOR PRIVACY") - expect(subject.technical_contacts[0].address).to eq("REDACTED FOR PRIVACY") - expect(subject.technical_contacts[0].city).to eq("REDACTED FOR PRIVACY") - expect(subject.technical_contacts[0].zip).to eq("REDACTED FOR PRIVACY") - expect(subject.technical_contacts[0].state).to eq("REDACTED FOR PRIVACY") - expect(subject.technical_contacts[0].country_code).to eq("REDACTED FOR PRIVACY") - expect(subject.technical_contacts[0].phone).to eq("REDACTED FOR PRIVACY ext: REDACTED FOR PRIVACY") - expect(subject.technical_contacts[0].fax).to eq("REDACTED FOR PRIVACY ext: REDACTED FOR PRIVACY") - expect(subject.technical_contacts[0].email).to eq("Please query the RDDS service of the Registrar of Record identified in this output for information on how to contact the Registrant, Admin, or Tech contact of the queried domain name.") - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers.size).to eq(2) - expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[0].name).to eq("dns104.ovh.net") - expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[1].name).to eq("ns104.ovh.net") - end + it "matches status_registered.expected" do + expect(subject.domain).to eq("solex.world") + expect(subject.domain_id).to eq("0bd73f47b47f436cac3ee5b20df18ef5-DONUTS") + expect(subject.status).to eq(:registered) + expect(subject.available?).to eq(false) + expect(subject.registered?).to eq(true) + expect(subject.created_on).to be_a(Time) + expect(subject.created_on).to eq(DateTime.parse("2017-10-03 11:12:14 GMT")) + expect(subject.updated_on).to be_a(Time) + expect(subject.updated_on).to eq(DateTime.parse("2021-10-06 14:58:38 GMT")) + expect(subject.expires_on).to be_a(Time) + expect(subject.expires_on).to eq(DateTime.parse("2022-10-03 11:12:14 GMT")) + expect(subject.registrar).to be_a(Whois::Parser::Registrar) + expect(subject.registrar.id).to eq("433") + expect(subject.registrar.name).to eq("OVH SAS") + expect(subject.registrar.url).to eq("http://www.ovh.com") + expect(subject.registrant_contacts).to be_a(Array) + expect(subject.registrant_contacts.size).to eq(1) + expect(subject.registrant_contacts[0]).to be_a(Whois::Parser::Contact) + expect(subject.registrant_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_REGISTRANT) + expect(subject.registrant_contacts[0].id).to eq("REDACTED FOR PRIVACY") + expect(subject.registrant_contacts[0].name).to eq("REDACTED FOR PRIVACY") + expect(subject.registrant_contacts[0].organization).to eq("") + expect(subject.registrant_contacts[0].address).to eq("REDACTED FOR PRIVACY") + expect(subject.registrant_contacts[0].city).to eq("REDACTED FOR PRIVACY") + expect(subject.registrant_contacts[0].zip).to eq("REDACTED FOR PRIVACY") + expect(subject.registrant_contacts[0].state).to eq("") + expect(subject.registrant_contacts[0].country_code).to eq("FR") + expect(subject.registrant_contacts[0].phone).to eq("REDACTED FOR PRIVACY ext: REDACTED FOR PRIVACY") + expect(subject.registrant_contacts[0].fax).to eq("REDACTED FOR PRIVACY ext: REDACTED FOR PRIVACY") + expect(subject.registrant_contacts[0].email).to eq("Please query the RDDS service of the Registrar of Record identified in this output for information on how to contact the Registrant, Admin, or Tech contact of the queried domain name.") + expect(subject.admin_contacts).to be_a(Array) + expect(subject.admin_contacts.size).to eq(1) + expect(subject.admin_contacts[0]).to be_a(Whois::Parser::Contact) + expect(subject.admin_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_ADMINISTRATIVE) + expect(subject.admin_contacts[0].id).to eq("REDACTED FOR PRIVACY") + expect(subject.admin_contacts[0].name).to eq("REDACTED FOR PRIVACY") + expect(subject.admin_contacts[0].organization).to eq("REDACTED FOR PRIVACY") + expect(subject.admin_contacts[0].address).to eq("REDACTED FOR PRIVACY") + expect(subject.admin_contacts[0].city).to eq("REDACTED FOR PRIVACY") + expect(subject.admin_contacts[0].zip).to eq("REDACTED FOR PRIVACY") + expect(subject.admin_contacts[0].state).to eq("REDACTED FOR PRIVACY") + expect(subject.admin_contacts[0].country_code).to eq("REDACTED FOR PRIVACY") + expect(subject.admin_contacts[0].phone).to eq("REDACTED FOR PRIVACY ext: REDACTED FOR PRIVACY") + expect(subject.admin_contacts[0].fax).to eq("REDACTED FOR PRIVACY ext: REDACTED FOR PRIVACY") + expect(subject.admin_contacts[0].email).to eq("Please query the RDDS service of the Registrar of Record identified in this output for information on how to contact the Registrant, Admin, or Tech contact of the queried domain name.") + expect(subject.technical_contacts).to be_a(Array) + expect(subject.technical_contacts.size).to eq(1) + expect(subject.technical_contacts[0]).to be_a(Whois::Parser::Contact) + expect(subject.technical_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_TECHNICAL) + expect(subject.technical_contacts[0].id).to eq("REDACTED FOR PRIVACY") + expect(subject.technical_contacts[0].name).to eq("REDACTED FOR PRIVACY") + expect(subject.technical_contacts[0].organization).to eq("REDACTED FOR PRIVACY") + expect(subject.technical_contacts[0].address).to eq("REDACTED FOR PRIVACY") + expect(subject.technical_contacts[0].city).to eq("REDACTED FOR PRIVACY") + expect(subject.technical_contacts[0].zip).to eq("REDACTED FOR PRIVACY") + expect(subject.technical_contacts[0].state).to eq("REDACTED FOR PRIVACY") + expect(subject.technical_contacts[0].country_code).to eq("REDACTED FOR PRIVACY") + expect(subject.technical_contacts[0].phone).to eq("REDACTED FOR PRIVACY ext: REDACTED FOR PRIVACY") + expect(subject.technical_contacts[0].fax).to eq("REDACTED FOR PRIVACY ext: REDACTED FOR PRIVACY") + expect(subject.technical_contacts[0].email).to eq("Please query the RDDS service of the Registrar of Record identified in this output for information on how to contact the Registrant, Admin, or Tech contact of the queried domain name.") + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers.size).to eq(2) + expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[0].name).to eq("dns104.ovh.net") + expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[1].name).to eq("ns104.ovh.net") end end diff --git a/spec/whois/parsers/responses/whois.nic.xxx/xxx/status_available_spec.rb b/spec/whois/parsers/responses/whois.nic.xxx/xxx/status_available_spec.rb index 63790b84..6a9c7191 100644 --- a/spec/whois/parsers/responses/whois.nic.xxx/xxx/status_available_spec.rb +++ b/spec/whois/parsers/responses/whois.nic.xxx/xxx/status_available_spec.rb @@ -11,93 +11,34 @@ # require 'spec_helper' -require 'whois/parsers/whois.nic.xxx.rb' -describe Whois::Parsers::WhoisNicXxx, "status_available.expected" do +describe "whois.nic.xxx", :aggregate_failures do subject do file = fixture("responses", "whois.nic.xxx/xxx/status_available.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.nic.xxx") + Whois::Parser.parser_for(part) end - describe "#disclaimer" do - it do - expect(subject.disclaimer).to eq("The Service is provided so that you may look up certain information in relation to domain names that we store in our database. Use of the Service is subject to our policies, in particular you should familiarise yourself with our Acceptable Use Policy and our Privacy Policy. The information provided by this Service is 'as is' and we make no guarantee of it its accuracy. You agree that by your use of the Service you will not use the information provided by us in a way which is: * inconsistent with any applicable laws, * inconsistent with any policy issued by us, * to generate, distribute, or facilitate unsolicited mass email, promotions, advertisings or other solicitations, or * to enable high volume, automated, electronic processes that apply to the Service. You acknowledge that: * a response from the Service that a domain name is 'available', does not guarantee that is able to be registered, * we may restrict, suspend or terminate your access to the Service at any time, and * the copying, compilation, repackaging, dissemination or other use of the information provided by the Service is not permitted, without our express written consent. This information has been prepared and published in order to represent administrative and technical management of the TLD. We may discontinue or amend any part or the whole of these Terms of Service from time to time at our absolute discretion.") - end - end - describe "#domain" do - it do - expect(subject.domain).to eq(nil) - end - end - describe "#domain_id" do - it do - expect(subject.domain_id).to eq(nil) - end - end - describe "#status" do - it do - expect(subject.status).to eq(:available) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(true) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(false) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to eq(nil) - end - end - describe "#updated_on" do - it do - expect(subject.updated_on).to eq(nil) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to eq(nil) - end - end - describe "#registrar" do - it do - expect(subject.registrar).to eq(nil) - end - end - describe "#registrant_contacts" do - it do - expect(subject.registrant_contacts).to be_a(Array) - expect(subject.registrant_contacts).to eq([]) - end - end - describe "#admin_contacts" do - it do - expect(subject.admin_contacts).to be_a(Array) - expect(subject.admin_contacts).to eq([]) - end - end - describe "#technical_contacts" do - it do - expect(subject.technical_contacts).to be_a(Array) - expect(subject.technical_contacts).to eq([]) - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers).to eq([]) - end - end - describe "#reserved?" do - it do - expect(subject.reserved?).to eq(false) - end + it "matches status_available.expected" do + expect(subject.disclaimer).to eq("The Service is provided so that you may look up certain information in relation to domain names that we store in our database. Use of the Service is subject to our policies, in particular you should familiarise yourself with our Acceptable Use Policy and our Privacy Policy. The information provided by this Service is 'as is' and we make no guarantee of it its accuracy. You agree that by your use of the Service you will not use the information provided by us in a way which is: * inconsistent with any applicable laws, * inconsistent with any policy issued by us, * to generate, distribute, or facilitate unsolicited mass email, promotions, advertisings or other solicitations, or * to enable high volume, automated, electronic processes that apply to the Service. You acknowledge that: * a response from the Service that a domain name is 'available', does not guarantee that is able to be registered, * we may restrict, suspend or terminate your access to the Service at any time, and * the copying, compilation, repackaging, dissemination or other use of the information provided by the Service is not permitted, without our express written consent. This information has been prepared and published in order to represent administrative and technical management of the TLD. We may discontinue or amend any part or the whole of these Terms of Service from time to time at our absolute discretion.") + expect(subject.domain).to eq(nil) + expect(subject.domain_id).to eq(nil) + expect(subject.status).to eq(:available) + expect(subject.available?).to eq(true) + expect(subject.registered?).to eq(false) + expect(subject.created_on).to eq(nil) + expect(subject.updated_on).to eq(nil) + expect(subject.expires_on).to eq(nil) + expect(subject.registrar).to eq(nil) + expect(subject.registrant_contacts).to be_a(Array) + expect(subject.registrant_contacts).to eq([]) + expect(subject.admin_contacts).to be_a(Array) + expect(subject.admin_contacts).to eq([]) + expect(subject.technical_contacts).to be_a(Array) + expect(subject.technical_contacts).to eq([]) + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers).to eq([]) + expect(subject.reserved?).to eq(false) end end diff --git a/spec/whois/parsers/responses/whois.nic.xxx/xxx/status_registered_spec.rb b/spec/whois/parsers/responses/whois.nic.xxx/xxx/status_registered_spec.rb index a3980d52..001f0bed 100644 --- a/spec/whois/parsers/responses/whois.nic.xxx/xxx/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.nic.xxx/xxx/status_registered_spec.rb @@ -11,149 +11,90 @@ # require 'spec_helper' -require 'whois/parsers/whois.nic.xxx.rb' -describe Whois::Parsers::WhoisNicXxx, "status_registered.expected" do +describe "whois.nic.xxx", :aggregate_failures do subject do file = fixture("responses", "whois.nic.xxx/xxx/status_registered.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.nic.xxx") + Whois::Parser.parser_for(part) end - describe "#disclaimer" do - it do - expect(subject.disclaimer).to eq("The Service is provided so that you may look up certain information in relation to domain names that we store in our database. Use of the Service is subject to our policies, in particular you should familiarise yourself with our Acceptable Use Policy and our Privacy Policy. The information provided by this Service is 'as is' and we make no guarantee of it its accuracy. You agree that by your use of the Service you will not use the information provided by us in a way which is: * inconsistent with any applicable laws, * inconsistent with any policy issued by us, * to generate, distribute, or facilitate unsolicited mass email, promotions, advertisings or other solicitations, or * to enable high volume, automated, electronic processes that apply to the Service. You acknowledge that: * a response from the Service that a domain name is 'available', does not guarantee that is able to be registered, * we may restrict, suspend or terminate your access to the Service at any time, and * the copying, compilation, repackaging, dissemination or other use of the information provided by the Service is not permitted, without our express written consent. This information has been prepared and published in order to represent administrative and technical management of the TLD. We may discontinue or amend any part or the whole of these Terms of Service from time to time at our absolute discretion.") - end - end - describe "#domain" do - it do - expect(subject.domain).to eq("sex.xxx") - end - end - describe "#domain_id" do - it do - expect(subject.domain_id).to eq("D855895-GDREG") - end - end - describe "#status" do - it do - expect(subject.status).to eq(:registered) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(false) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(true) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to be_a(Time) - expect(subject.created_on).to eq(DateTime.parse("2012-05-31 14:58:50 UTC")) - end - end - describe "#updated_on" do - it do - expect(subject.updated_on).to be_a(Time) - expect(subject.updated_on).to eq(DateTime.parse("2021-05-01 08:25:32 UTC")) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to be_a(Time) - expect(subject.expires_on).to eq(DateTime.parse("2022-05-31 14:58:50 UTC")) - end - end - describe "#registrar" do - it do - expect(subject.registrar).to be_a(Whois::Parser::Registrar) - expect(subject.registrar.id).to eq("625") - expect(subject.registrar.name).to eq("Name.com, Inc.") - expect(subject.registrar.url).to eq("www.name.com") - end - end - describe "#registrant_contacts" do - it do - expect(subject.registrant_contacts).to be_a(Array) - expect(subject.registrant_contacts.size).to eq(1) - expect(subject.registrant_contacts[0]).to be_a(Whois::Parser::Contact) - expect(subject.registrant_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_REGISTRANT) - expect(subject.registrant_contacts[0].id).to eq("REDACTED FOR PRIVACY") - expect(subject.registrant_contacts[0].name).to eq("REDACTED FOR PRIVACY") - expect(subject.registrant_contacts[0].organization).to eq("Domain Protection Services, Inc.") - expect(subject.registrant_contacts[0].address).to eq("REDACTED FOR PRIVACY, REDACTED FOR PRIVACY, REDACTED FOR PRIVACY") - expect(subject.registrant_contacts[0].city).to eq("REDACTED FOR PRIVACY") - expect(subject.registrant_contacts[0].zip).to eq("REDACTED FOR PRIVACY") - expect(subject.registrant_contacts[0].state).to eq("") - expect(subject.registrant_contacts[0].country).to eq(nil) - expect(subject.registrant_contacts[0].country_code).to eq("US") - expect(subject.registrant_contacts[0].phone).to eq("REDACTED FOR PRIVACY ext: REDACTED FOR PRIVACY") - expect(subject.registrant_contacts[0].fax).to eq("REDACTED FOR PRIVACY ext: REDACTED FOR PRIVACY") - expect(subject.registrant_contacts[0].email).to eq("Please query the RDDS service of the Registrar of Record identified in this output for information on how to contact the Registrant, Admin, or Tech contact of the queried domain name.") - end - end - describe "#admin_contacts" do - it do - expect(subject.admin_contacts).to be_a(Array) - expect(subject.admin_contacts.size).to eq(1) - expect(subject.admin_contacts[0]).to be_a(Whois::Parser::Contact) - expect(subject.admin_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_ADMINISTRATIVE) - expect(subject.admin_contacts[0].id).to eq("REDACTED FOR PRIVACY") - expect(subject.admin_contacts[0].name).to eq("REDACTED FOR PRIVACY") - expect(subject.admin_contacts[0].organization).to eq("REDACTED FOR PRIVACY") - expect(subject.admin_contacts[0].address).to eq("REDACTED FOR PRIVACY, REDACTED FOR PRIVACY, REDACTED FOR PRIVACY") - expect(subject.admin_contacts[0].city).to eq("REDACTED FOR PRIVACY") - expect(subject.admin_contacts[0].zip).to eq("REDACTED FOR PRIVACY") - expect(subject.admin_contacts[0].state).to eq("REDACTED FOR PRIVACY") - expect(subject.admin_contacts[0].country).to eq(nil) - expect(subject.admin_contacts[0].country_code).to eq("REDACTED FOR PRIVACY") - expect(subject.admin_contacts[0].phone).to eq("REDACTED FOR PRIVACY ext: REDACTED FOR PRIVACY") - expect(subject.admin_contacts[0].fax).to eq("REDACTED FOR PRIVACY ext: REDACTED FOR PRIVACY") - expect(subject.admin_contacts[0].email).to eq("Please query the RDDS service of the Registrar of Record identified in this output for information on how to contact the Registrant, Admin, or Tech contact of the queried domain name.") - end - end - describe "#technical_contacts" do - it do - expect(subject.technical_contacts).to be_a(Array) - expect(subject.technical_contacts.size).to eq(1) - expect(subject.technical_contacts[0]).to be_a(Whois::Parser::Contact) - expect(subject.technical_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_TECHNICAL) - expect(subject.technical_contacts[0].id).to eq("REDACTED FOR PRIVACY") - expect(subject.technical_contacts[0].name).to eq("REDACTED FOR PRIVACY") - expect(subject.technical_contacts[0].organization).to eq("REDACTED FOR PRIVACY") - expect(subject.technical_contacts[0].address).to eq("REDACTED FOR PRIVACY, REDACTED FOR PRIVACY, REDACTED FOR PRIVACY") - expect(subject.technical_contacts[0].city).to eq("REDACTED FOR PRIVACY") - expect(subject.technical_contacts[0].zip).to eq("REDACTED FOR PRIVACY") - expect(subject.technical_contacts[0].state).to eq("REDACTED FOR PRIVACY") - expect(subject.technical_contacts[0].country).to eq(nil) - expect(subject.technical_contacts[0].country_code).to eq("REDACTED FOR PRIVACY") - expect(subject.technical_contacts[0].phone).to eq("REDACTED FOR PRIVACY ext: REDACTED FOR PRIVACY") - expect(subject.technical_contacts[0].fax).to eq("REDACTED FOR PRIVACY ext: REDACTED FOR PRIVACY") - expect(subject.technical_contacts[0].email).to eq("Please query the RDDS service of the Registrar of Record identified in this output for information on how to contact the Registrant, Admin, or Tech contact of the queried domain name.") - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers.size).to eq(4) - expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[0].name).to eq("ns4.imlns.com") - expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[1].name).to eq("ns3.imlns.com") - expect(subject.nameservers[2]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[2].name).to eq("ns1.imlns.com") - expect(subject.nameservers[3]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[3].name).to eq("ns.imlns.com") - end - end - describe "#reserved?" do - it do - expect(subject.reserved?).to eq(false) - end + it "matches status_registered.expected" do + expect(subject.disclaimer).to eq("The Service is provided so that you may look up certain information in relation to domain names that we store in our database. Use of the Service is subject to our policies, in particular you should familiarise yourself with our Acceptable Use Policy and our Privacy Policy. The information provided by this Service is 'as is' and we make no guarantee of it its accuracy. You agree that by your use of the Service you will not use the information provided by us in a way which is: * inconsistent with any applicable laws, * inconsistent with any policy issued by us, * to generate, distribute, or facilitate unsolicited mass email, promotions, advertisings or other solicitations, or * to enable high volume, automated, electronic processes that apply to the Service. You acknowledge that: * a response from the Service that a domain name is 'available', does not guarantee that is able to be registered, * we may restrict, suspend or terminate your access to the Service at any time, and * the copying, compilation, repackaging, dissemination or other use of the information provided by the Service is not permitted, without our express written consent. This information has been prepared and published in order to represent administrative and technical management of the TLD. We may discontinue or amend any part or the whole of these Terms of Service from time to time at our absolute discretion.") + expect(subject.domain).to eq("sex.xxx") + expect(subject.domain_id).to eq("D855895-GDREG") + expect(subject.status).to eq(:registered) + expect(subject.available?).to eq(false) + expect(subject.registered?).to eq(true) + expect(subject.created_on).to be_a(Time) + expect(subject.created_on).to eq(DateTime.parse("2012-05-31 14:58:50 UTC")) + expect(subject.updated_on).to be_a(Time) + expect(subject.updated_on).to eq(DateTime.parse("2021-05-01 08:25:32 UTC")) + expect(subject.expires_on).to be_a(Time) + expect(subject.expires_on).to eq(DateTime.parse("2022-05-31 14:58:50 UTC")) + expect(subject.registrar).to be_a(Whois::Parser::Registrar) + expect(subject.registrar.id).to eq("625") + expect(subject.registrar.name).to eq("Name.com, Inc.") + expect(subject.registrar.url).to eq("www.name.com") + expect(subject.registrant_contacts).to be_a(Array) + expect(subject.registrant_contacts.size).to eq(1) + expect(subject.registrant_contacts[0]).to be_a(Whois::Parser::Contact) + expect(subject.registrant_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_REGISTRANT) + expect(subject.registrant_contacts[0].id).to eq("REDACTED FOR PRIVACY") + expect(subject.registrant_contacts[0].name).to eq("REDACTED FOR PRIVACY") + expect(subject.registrant_contacts[0].organization).to eq("Domain Protection Services, Inc.") + expect(subject.registrant_contacts[0].address).to eq("REDACTED FOR PRIVACY, REDACTED FOR PRIVACY, REDACTED FOR PRIVACY") + expect(subject.registrant_contacts[0].city).to eq("REDACTED FOR PRIVACY") + expect(subject.registrant_contacts[0].zip).to eq("REDACTED FOR PRIVACY") + expect(subject.registrant_contacts[0].state).to eq("") + expect(subject.registrant_contacts[0].country).to eq(nil) + expect(subject.registrant_contacts[0].country_code).to eq("US") + expect(subject.registrant_contacts[0].phone).to eq("REDACTED FOR PRIVACY ext: REDACTED FOR PRIVACY") + expect(subject.registrant_contacts[0].fax).to eq("REDACTED FOR PRIVACY ext: REDACTED FOR PRIVACY") + expect(subject.registrant_contacts[0].email).to eq("Please query the RDDS service of the Registrar of Record identified in this output for information on how to contact the Registrant, Admin, or Tech contact of the queried domain name.") + expect(subject.admin_contacts).to be_a(Array) + expect(subject.admin_contacts.size).to eq(1) + expect(subject.admin_contacts[0]).to be_a(Whois::Parser::Contact) + expect(subject.admin_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_ADMINISTRATIVE) + expect(subject.admin_contacts[0].id).to eq("REDACTED FOR PRIVACY") + expect(subject.admin_contacts[0].name).to eq("REDACTED FOR PRIVACY") + expect(subject.admin_contacts[0].organization).to eq("REDACTED FOR PRIVACY") + expect(subject.admin_contacts[0].address).to eq("REDACTED FOR PRIVACY, REDACTED FOR PRIVACY, REDACTED FOR PRIVACY") + expect(subject.admin_contacts[0].city).to eq("REDACTED FOR PRIVACY") + expect(subject.admin_contacts[0].zip).to eq("REDACTED FOR PRIVACY") + expect(subject.admin_contacts[0].state).to eq("REDACTED FOR PRIVACY") + expect(subject.admin_contacts[0].country).to eq(nil) + expect(subject.admin_contacts[0].country_code).to eq("REDACTED FOR PRIVACY") + expect(subject.admin_contacts[0].phone).to eq("REDACTED FOR PRIVACY ext: REDACTED FOR PRIVACY") + expect(subject.admin_contacts[0].fax).to eq("REDACTED FOR PRIVACY ext: REDACTED FOR PRIVACY") + expect(subject.admin_contacts[0].email).to eq("Please query the RDDS service of the Registrar of Record identified in this output for information on how to contact the Registrant, Admin, or Tech contact of the queried domain name.") + expect(subject.technical_contacts).to be_a(Array) + expect(subject.technical_contacts.size).to eq(1) + expect(subject.technical_contacts[0]).to be_a(Whois::Parser::Contact) + expect(subject.technical_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_TECHNICAL) + expect(subject.technical_contacts[0].id).to eq("REDACTED FOR PRIVACY") + expect(subject.technical_contacts[0].name).to eq("REDACTED FOR PRIVACY") + expect(subject.technical_contacts[0].organization).to eq("REDACTED FOR PRIVACY") + expect(subject.technical_contacts[0].address).to eq("REDACTED FOR PRIVACY, REDACTED FOR PRIVACY, REDACTED FOR PRIVACY") + expect(subject.technical_contacts[0].city).to eq("REDACTED FOR PRIVACY") + expect(subject.technical_contacts[0].zip).to eq("REDACTED FOR PRIVACY") + expect(subject.technical_contacts[0].state).to eq("REDACTED FOR PRIVACY") + expect(subject.technical_contacts[0].country).to eq(nil) + expect(subject.technical_contacts[0].country_code).to eq("REDACTED FOR PRIVACY") + expect(subject.technical_contacts[0].phone).to eq("REDACTED FOR PRIVACY ext: REDACTED FOR PRIVACY") + expect(subject.technical_contacts[0].fax).to eq("REDACTED FOR PRIVACY ext: REDACTED FOR PRIVACY") + expect(subject.technical_contacts[0].email).to eq("Please query the RDDS service of the Registrar of Record identified in this output for information on how to contact the Registrant, Admin, or Tech contact of the queried domain name.") + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers.size).to eq(4) + expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[0].name).to eq("ns4.imlns.com") + expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[1].name).to eq("ns3.imlns.com") + expect(subject.nameservers[2]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[2].name).to eq("ns1.imlns.com") + expect(subject.nameservers[3]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[3].name).to eq("ns.imlns.com") + expect(subject.reserved?).to eq(false) end end diff --git a/spec/whois/parsers/responses/whois.nic.xxx/xxx/status_reserved_spec.rb b/spec/whois/parsers/responses/whois.nic.xxx/xxx/status_reserved_spec.rb index d2019ccf..e3a4ca97 100644 --- a/spec/whois/parsers/responses/whois.nic.xxx/xxx/status_reserved_spec.rb +++ b/spec/whois/parsers/responses/whois.nic.xxx/xxx/status_reserved_spec.rb @@ -11,34 +11,19 @@ # require 'spec_helper' -require 'whois/parsers/whois.nic.xxx.rb' -describe Whois::Parsers::WhoisNicXxx, "status_reserved.expected" do +describe "whois.nic.xxx", :aggregate_failures do subject do file = fixture("responses", "whois.nic.xxx/xxx/status_reserved.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.nic.xxx") + Whois::Parser.parser_for(part) end - describe "#status" do - it do - expect(subject.status).to eq(:reserved) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(false) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(true) - end - end - describe "#reserved?" do - it do - expect(subject.reserved?).to eq(true) - end + it "matches status_reserved.expected" do + expect(subject.status).to eq(:reserved) + expect(subject.available?).to eq(false) + expect(subject.registered?).to eq(true) + expect(subject.reserved?).to eq(true) end end diff --git a/spec/whois/parsers/responses/whois.nic.xyz/xyz/status_available_spec.rb b/spec/whois/parsers/responses/whois.nic.xyz/xyz/status_available_spec.rb index 7dce8d32..c1d1d0b6 100644 --- a/spec/whois/parsers/responses/whois.nic.xyz/xyz/status_available_spec.rb +++ b/spec/whois/parsers/responses/whois.nic.xyz/xyz/status_available_spec.rb @@ -11,88 +11,33 @@ # require 'spec_helper' -require 'whois/parsers/whois.nic.xyz.rb' -describe Whois::Parsers::WhoisNicXyz, "status_available.expected" do +describe "whois.nic.xyz", :aggregate_failures do subject do file = fixture("responses", "whois.nic.xyz/xyz/status_available.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.nic.xyz") + Whois::Parser.parser_for(part) end - describe "#disclaimer" do - it do - expect(subject.disclaimer).to eq(nil) - end - end - describe "#domain" do - it do - expect(subject.domain).to eq(nil) - end - end - describe "#domain_id" do - it do - expect(subject.domain_id).to eq(nil) - end - end - describe "#status" do - it do - expect(subject.status).to eq([]) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(true) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(false) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to eq(nil) - end - end - describe "#updated_on" do - it do - expect(subject.updated_on).to eq(nil) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to eq(nil) - end - end - describe "#registrar" do - it do - expect(subject.registrar).to eq(nil) - end - end - describe "#registrant_contacts" do - it do - expect(subject.registrant_contacts).to be_a(Array) - expect(subject.registrant_contacts).to eq([]) - end - end - describe "#admin_contacts" do - it do - expect(subject.admin_contacts).to be_a(Array) - expect(subject.admin_contacts).to eq([]) - end - end - describe "#technical_contacts" do - it do - expect(subject.technical_contacts).to be_a(Array) - expect(subject.technical_contacts).to eq([]) - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers).to eq([]) - end + it "matches status_available.expected" do + expect(subject.disclaimer).to eq(nil) + expect(subject.domain).to eq(nil) + expect(subject.domain_id).to eq(nil) + expect(subject.status).to eq([]) + expect(subject.available?).to eq(true) + expect(subject.registered?).to eq(false) + expect(subject.created_on).to eq(nil) + expect(subject.updated_on).to eq(nil) + expect(subject.expires_on).to eq(nil) + expect(subject.registrar).to eq(nil) + expect(subject.registrant_contacts).to be_a(Array) + expect(subject.registrant_contacts).to eq([]) + expect(subject.admin_contacts).to be_a(Array) + expect(subject.admin_contacts).to eq([]) + expect(subject.technical_contacts).to be_a(Array) + expect(subject.technical_contacts).to eq([]) + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers).to eq([]) end end diff --git a/spec/whois/parsers/responses/whois.nic.xyz/xyz/status_registered_spec.rb b/spec/whois/parsers/responses/whois.nic.xyz/xyz/status_registered_spec.rb index e1731af6..41bfefd3 100644 --- a/spec/whois/parsers/responses/whois.nic.xyz/xyz/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.nic.xyz/xyz/status_registered_spec.rb @@ -11,161 +11,106 @@ # require 'spec_helper' -require 'whois/parsers/whois.nic.xyz.rb' -describe Whois::Parsers::WhoisNicXyz, "status_registered.expected" do +describe "whois.nic.xyz", :aggregate_failures do subject do file = fixture("responses", "whois.nic.xyz/xyz/status_registered.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.nic.xyz") + Whois::Parser.parser_for(part) end - describe "#disclaimer" do - it do - expect(subject.disclaimer).to eq("Access to the whois service is rate limited. For more information, please see https://registrar-console.centralnic.com/pub/whois_guidance.") - end - end - describe "#domain" do - it do - expect(subject.domain).to eq("abc.xyz") - end - end - describe "#domain_id" do - it do - expect(subject.domain_id).to eq("D2192285-CNIC") - end - end - describe "#status" do - it do - expect(subject.status).to eq(["clientTransferProhibited https://icann.org/epp#clientTransferProhibited", "clientUpdateProhibited https://icann.org/epp#clientUpdateProhibited", "clientDeleteProhibited https://icann.org/epp#clientDeleteProhibited"]) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(false) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(true) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to be_a(Time) - expect(subject.created_on).to eq(DateTime.parse("2014-03-20 12:59:17 UTC")) - end - end - describe "#updated_on" do - it do - expect(subject.updated_on).to be_a(Time) - expect(subject.updated_on).to eq(DateTime.parse("2015-08-18 15:09:36 UTC")) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to be_a(Time) - expect(subject.expires_on).to eq(DateTime.parse("2025-03-20 23:59:59 UTC")) - end - end - describe "#registrar" do - it do - expect(subject.registrar).to be_a(Whois::Parser::Registrar) - expect(subject.registrar.id).to eq("292") - expect(subject.registrar.name).to eq("MarkMonitor, Inc (TLDs)") - expect(subject.registrar.url).to eq(nil) - end - end - describe "#registrant_contacts" do - it do - expect(subject.registrant_contacts).to be_a(Array) - expect(subject.registrant_contacts.size).to eq(1) - expect(subject.registrant_contacts[0]).to be_a(Whois::Parser::Contact) - expect(subject.registrant_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_REGISTRANT) - expect(subject.registrant_contacts[0].id).to eq("mmr-87489") - expect(subject.registrant_contacts[0].name).to eq("DNS Admin") - expect(subject.registrant_contacts[0].organization).to eq("Google Inc.") - expect(subject.registrant_contacts[0].address).to eq("1600 Amphitheatre Parkway") - expect(subject.registrant_contacts[0].city).to eq("Mountain View") - expect(subject.registrant_contacts[0].zip).to eq("94043") - expect(subject.registrant_contacts[0].state).to eq("CA") - expect(subject.registrant_contacts[0].country).to eq(nil) - expect(subject.registrant_contacts[0].country_code).to eq("US") - expect(subject.registrant_contacts[0].phone).to eq("+1.6502530000") - expect(subject.registrant_contacts[0].fax).to eq("+1.6502530001") - expect(subject.registrant_contacts[0].email).to eq("dns-admin@google.com") - expect(subject.registrant_contacts[0].url).to eq(nil) - expect(subject.registrant_contacts[0].created_on).to eq(nil) - expect(subject.registrant_contacts[0].updated_on).to eq(nil) - end - end - describe "#admin_contacts" do - it do - expect(subject.admin_contacts).to be_a(Array) - expect(subject.admin_contacts.size).to eq(1) - expect(subject.admin_contacts[0]).to be_a(Whois::Parser::Contact) - expect(subject.admin_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_ADMINISTRATIVE) - expect(subject.admin_contacts[0].id).to eq("mmr-87489") - expect(subject.admin_contacts[0].name).to eq("DNS Admin") - expect(subject.admin_contacts[0].organization).to eq("Google Inc.") - expect(subject.admin_contacts[0].address).to eq("1600 Amphitheatre Parkway") - expect(subject.admin_contacts[0].city).to eq("Mountain View") - expect(subject.admin_contacts[0].zip).to eq("94043") - expect(subject.admin_contacts[0].state).to eq("CA") - expect(subject.admin_contacts[0].country).to eq(nil) - expect(subject.admin_contacts[0].country_code).to eq("US") - expect(subject.admin_contacts[0].phone).to eq("+1.6502530000") - expect(subject.admin_contacts[0].fax).to eq("+1.6502530001") - expect(subject.admin_contacts[0].email).to eq("dns-admin@google.com") - expect(subject.admin_contacts[0].url).to eq(nil) - expect(subject.admin_contacts[0].created_on).to eq(nil) - expect(subject.admin_contacts[0].updated_on).to eq(nil) - end - end - describe "#technical_contacts" do - it do - expect(subject.technical_contacts).to be_a(Array) - expect(subject.technical_contacts.size).to eq(1) - expect(subject.technical_contacts[0]).to be_a(Whois::Parser::Contact) - expect(subject.technical_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_TECHNICAL) - expect(subject.technical_contacts[0].id).to eq("mmr-87489") - expect(subject.technical_contacts[0].name).to eq("DNS Admin") - expect(subject.technical_contacts[0].organization).to eq("Google Inc.") - expect(subject.technical_contacts[0].address).to eq("1600 Amphitheatre Parkway") - expect(subject.technical_contacts[0].city).to eq("Mountain View") - expect(subject.technical_contacts[0].zip).to eq("94043") - expect(subject.technical_contacts[0].state).to eq("CA") - expect(subject.technical_contacts[0].country).to eq(nil) - expect(subject.technical_contacts[0].country_code).to eq("US") - expect(subject.technical_contacts[0].phone).to eq("+1.6502530000") - expect(subject.technical_contacts[0].fax).to eq("+1.6502530001") - expect(subject.technical_contacts[0].email).to eq("dns-admin@google.com") - expect(subject.technical_contacts[0].url).to eq(nil) - expect(subject.technical_contacts[0].created_on).to eq(nil) - expect(subject.technical_contacts[0].updated_on).to eq(nil) - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers.size).to eq(4) - expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[0].name).to eq("ns2.google.com") - expect(subject.nameservers[0].ipv4).to eq(nil) - expect(subject.nameservers[0].ipv6).to eq(nil) - expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[1].name).to eq("ns4.google.com") - expect(subject.nameservers[1].ipv4).to eq(nil) - expect(subject.nameservers[1].ipv6).to eq(nil) - expect(subject.nameservers[2]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[2].name).to eq("ns3.google.com") - expect(subject.nameservers[2].ipv4).to eq(nil) - expect(subject.nameservers[2].ipv6).to eq(nil) - expect(subject.nameservers[3]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[3].name).to eq("ns1.google.com") - expect(subject.nameservers[3].ipv4).to eq(nil) - expect(subject.nameservers[3].ipv6).to eq(nil) - end + it "matches status_registered.expected" do + expect(subject.disclaimer).to eq("Access to the whois service is rate limited. For more information, please see https://registrar-console.centralnic.com/pub/whois_guidance.") + expect(subject.domain).to eq("abc.xyz") + expect(subject.domain_id).to eq("D2192285-CNIC") + expect(subject.status).to eq(["clientTransferProhibited https://icann.org/epp#clientTransferProhibited", "clientUpdateProhibited https://icann.org/epp#clientUpdateProhibited", "clientDeleteProhibited https://icann.org/epp#clientDeleteProhibited"]) + expect(subject.available?).to eq(false) + expect(subject.registered?).to eq(true) + expect(subject.created_on).to be_a(Time) + expect(subject.created_on).to eq(DateTime.parse("2014-03-20 12:59:17 UTC")) + expect(subject.updated_on).to be_a(Time) + expect(subject.updated_on).to eq(DateTime.parse("2015-08-18 15:09:36 UTC")) + expect(subject.expires_on).to be_a(Time) + expect(subject.expires_on).to eq(DateTime.parse("2025-03-20 23:59:59 UTC")) + expect(subject.registrar).to be_a(Whois::Parser::Registrar) + expect(subject.registrar.id).to eq("292") + expect(subject.registrar.name).to eq("MarkMonitor, Inc (TLDs)") + expect(subject.registrar.url).to eq(nil) + expect(subject.registrant_contacts).to be_a(Array) + expect(subject.registrant_contacts.size).to eq(1) + expect(subject.registrant_contacts[0]).to be_a(Whois::Parser::Contact) + expect(subject.registrant_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_REGISTRANT) + expect(subject.registrant_contacts[0].id).to eq("mmr-87489") + expect(subject.registrant_contacts[0].name).to eq("DNS Admin") + expect(subject.registrant_contacts[0].organization).to eq("Google Inc.") + expect(subject.registrant_contacts[0].address).to eq("1600 Amphitheatre Parkway") + expect(subject.registrant_contacts[0].city).to eq("Mountain View") + expect(subject.registrant_contacts[0].zip).to eq("94043") + expect(subject.registrant_contacts[0].state).to eq("CA") + expect(subject.registrant_contacts[0].country).to eq(nil) + expect(subject.registrant_contacts[0].country_code).to eq("US") + expect(subject.registrant_contacts[0].phone).to eq("+1.6502530000") + expect(subject.registrant_contacts[0].fax).to eq("+1.6502530001") + expect(subject.registrant_contacts[0].email).to eq("dns-admin@google.com") + expect(subject.registrant_contacts[0].url).to eq(nil) + expect(subject.registrant_contacts[0].created_on).to eq(nil) + expect(subject.registrant_contacts[0].updated_on).to eq(nil) + expect(subject.admin_contacts).to be_a(Array) + expect(subject.admin_contacts.size).to eq(1) + expect(subject.admin_contacts[0]).to be_a(Whois::Parser::Contact) + expect(subject.admin_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_ADMINISTRATIVE) + expect(subject.admin_contacts[0].id).to eq("mmr-87489") + expect(subject.admin_contacts[0].name).to eq("DNS Admin") + expect(subject.admin_contacts[0].organization).to eq("Google Inc.") + expect(subject.admin_contacts[0].address).to eq("1600 Amphitheatre Parkway") + expect(subject.admin_contacts[0].city).to eq("Mountain View") + expect(subject.admin_contacts[0].zip).to eq("94043") + expect(subject.admin_contacts[0].state).to eq("CA") + expect(subject.admin_contacts[0].country).to eq(nil) + expect(subject.admin_contacts[0].country_code).to eq("US") + expect(subject.admin_contacts[0].phone).to eq("+1.6502530000") + expect(subject.admin_contacts[0].fax).to eq("+1.6502530001") + expect(subject.admin_contacts[0].email).to eq("dns-admin@google.com") + expect(subject.admin_contacts[0].url).to eq(nil) + expect(subject.admin_contacts[0].created_on).to eq(nil) + expect(subject.admin_contacts[0].updated_on).to eq(nil) + expect(subject.technical_contacts).to be_a(Array) + expect(subject.technical_contacts.size).to eq(1) + expect(subject.technical_contacts[0]).to be_a(Whois::Parser::Contact) + expect(subject.technical_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_TECHNICAL) + expect(subject.technical_contacts[0].id).to eq("mmr-87489") + expect(subject.technical_contacts[0].name).to eq("DNS Admin") + expect(subject.technical_contacts[0].organization).to eq("Google Inc.") + expect(subject.technical_contacts[0].address).to eq("1600 Amphitheatre Parkway") + expect(subject.technical_contacts[0].city).to eq("Mountain View") + expect(subject.technical_contacts[0].zip).to eq("94043") + expect(subject.technical_contacts[0].state).to eq("CA") + expect(subject.technical_contacts[0].country).to eq(nil) + expect(subject.technical_contacts[0].country_code).to eq("US") + expect(subject.technical_contacts[0].phone).to eq("+1.6502530000") + expect(subject.technical_contacts[0].fax).to eq("+1.6502530001") + expect(subject.technical_contacts[0].email).to eq("dns-admin@google.com") + expect(subject.technical_contacts[0].url).to eq(nil) + expect(subject.technical_contacts[0].created_on).to eq(nil) + expect(subject.technical_contacts[0].updated_on).to eq(nil) + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers.size).to eq(4) + expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[0].name).to eq("ns2.google.com") + expect(subject.nameservers[0].ipv4).to eq(nil) + expect(subject.nameservers[0].ipv6).to eq(nil) + expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[1].name).to eq("ns4.google.com") + expect(subject.nameservers[1].ipv4).to eq(nil) + expect(subject.nameservers[1].ipv6).to eq(nil) + expect(subject.nameservers[2]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[2].name).to eq("ns3.google.com") + expect(subject.nameservers[2].ipv4).to eq(nil) + expect(subject.nameservers[2].ipv6).to eq(nil) + expect(subject.nameservers[3]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[3].name).to eq("ns1.google.com") + expect(subject.nameservers[3].ipv4).to eq(nil) + expect(subject.nameservers[3].ipv6).to eq(nil) end end diff --git a/spec/whois/parsers/responses/whois.nic.yt/yt/response_throttled_spec.rb b/spec/whois/parsers/responses/whois.nic.yt/yt/response_throttled_spec.rb index 8417ce59..05e54d84 100644 --- a/spec/whois/parsers/responses/whois.nic.yt/yt/response_throttled_spec.rb +++ b/spec/whois/parsers/responses/whois.nic.yt/yt/response_throttled_spec.rb @@ -11,19 +11,16 @@ # require 'spec_helper' -require 'whois/parsers/whois.nic.yt.rb' -describe Whois::Parsers::WhoisNicYt, "response_throttled.expected" do +describe "whois.nic.yt", :aggregate_failures do subject do file = fixture("responses", "whois.nic.yt/yt/response_throttled.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.nic.yt") + Whois::Parser.parser_for(part) end - describe "#response_throttled?" do - it do - expect(subject.response_throttled?).to eq(true) - end + it "matches response_throttled.expected" do + expect(subject.response_throttled?).to eq(true) end end diff --git a/spec/whois/parsers/responses/whois.nic.yt/yt/status_available_spec.rb b/spec/whois/parsers/responses/whois.nic.yt/yt/status_available_spec.rb index a59f9805..3dac3dcf 100644 --- a/spec/whois/parsers/responses/whois.nic.yt/yt/status_available_spec.rb +++ b/spec/whois/parsers/responses/whois.nic.yt/yt/status_available_spec.rb @@ -11,68 +11,29 @@ # require 'spec_helper' -require 'whois/parsers/whois.nic.yt.rb' -describe Whois::Parsers::WhoisNicYt, "status_available.expected" do +describe "whois.nic.yt", :aggregate_failures do subject do file = fixture("responses", "whois.nic.yt/yt/status_available.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.nic.yt") + Whois::Parser.parser_for(part) end - describe "#status" do - it do - expect(subject.status).to eq(:available) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(true) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(false) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to eq(nil) - end - end - describe "#updated_on" do - it do - expect(subject.updated_on).to eq(nil) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to eq(nil) - end - end - describe "#registrant_contacts" do - it do - expect(subject.registrant_contacts).to be_a(Array) - expect(subject.registrant_contacts).to eq([]) - end - end - describe "#admin_contacts" do - it do - expect(subject.admin_contacts).to be_a(Array) - expect(subject.admin_contacts).to eq([]) - end - end - describe "#technical_contacts" do - it do - expect(subject.technical_contacts).to be_a(Array) - expect(subject.technical_contacts).to eq([]) - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers).to eq([]) - end + it "matches status_available.expected" do + expect(subject.status).to eq(:available) + expect(subject.available?).to eq(true) + expect(subject.registered?).to eq(false) + expect(subject.created_on).to eq(nil) + expect(subject.updated_on).to eq(nil) + expect(subject.expires_on).to eq(nil) + expect(subject.registrant_contacts).to be_a(Array) + expect(subject.registrant_contacts).to eq([]) + expect(subject.admin_contacts).to be_a(Array) + expect(subject.admin_contacts).to eq([]) + expect(subject.technical_contacts).to be_a(Array) + expect(subject.technical_contacts).to eq([]) + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers).to eq([]) end end diff --git a/spec/whois/parsers/responses/whois.nic.yt/yt/status_registered_spec.rb b/spec/whois/parsers/responses/whois.nic.yt/yt/status_registered_spec.rb index d7027e7a..7f5f1c59 100644 --- a/spec/whois/parsers/responses/whois.nic.yt/yt/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.nic.yt/yt/status_registered_spec.rb @@ -11,122 +11,83 @@ # require 'spec_helper' -require 'whois/parsers/whois.nic.yt.rb' -describe Whois::Parsers::WhoisNicYt, "status_registered.expected" do +describe "whois.nic.yt", :aggregate_failures do subject do file = fixture("responses", "whois.nic.yt/yt/status_registered.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.nic.yt") + Whois::Parser.parser_for(part) end - describe "#status" do - it do - expect(subject.status).to eq(:registered) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(false) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(true) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to be_a(Time) - expect(subject.created_on).to eq(DateTime.parse("1994-12-31 23:00:00 UTC")) - end - end - describe "#updated_on" do - it do - expect(subject.updated_on).to be_a(Time) - expect(subject.updated_on).to eq(DateTime.parse("2018-12-31 23:33:38 UTC")) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to be_a(Time) - expect(subject.expires_on).to eq(DateTime.parse("2019-12-31 23:00:00 UTC")) - end - end - describe "#registrant_contacts" do - it do - expect(subject.registrant_contacts).to be_a(Array) - expect(subject.registrant_contacts.size).to eq(1) - expect(subject.registrant_contacts[0]).to be_a(Whois::Parser::Contact) - expect(subject.registrant_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_REGISTRANT) - expect(subject.registrant_contacts[0].id).to eq("AC3598-FRNIC") - expect(subject.registrant_contacts[0].name).to eq(nil) - expect(subject.registrant_contacts[0].organization).to eq("Afnic (Mayotte - CTOM)") - expect(subject.registrant_contacts[0].address).to eq("immeuble le Stephenson\n1, rue Stephenson\nHall A2 - 3eme etage\n78180 Montigny le Bretonneux") - expect(subject.registrant_contacts[0].city).to eq(nil) - expect(subject.registrant_contacts[0].zip).to eq(nil) - expect(subject.registrant_contacts[0].state).to eq(nil) - expect(subject.registrant_contacts[0].country).to eq(nil) - expect(subject.registrant_contacts[0].country_code).to eq("FR") - expect(subject.registrant_contacts[0].phone).to eq("+33 1 39 30 83 00") - expect(subject.registrant_contacts[0].fax).to eq("+33 1 39 30 83 01") - expect(subject.registrant_contacts[0].email).to eq("support@afnic.fr") - expect(subject.registrant_contacts[0].updated_on).to eq(DateTime.parse("2017-07-17 12:41:44 UTC")) - end - end - describe "#admin_contacts" do - it do - expect(subject.admin_contacts).to be_a(Array) - expect(subject.admin_contacts.size).to eq(1) - expect(subject.admin_contacts[0]).to be_a(Whois::Parser::Contact) - expect(subject.admin_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_ADMINISTRATIVE) - expect(subject.admin_contacts[0].id).to eq("NFC1-FRNIC") - expect(subject.admin_contacts[0].name).to eq("NIC France Contact") - expect(subject.admin_contacts[0].organization).to eq("AFNIC") - expect(subject.admin_contacts[0].address).to eq("immeuble le Stephenson\n1, rue Stephenson\nHall A2 - 3eme etage\n78180 Montigny-Le-Bretonneux") - expect(subject.admin_contacts[0].city).to eq(nil) - expect(subject.admin_contacts[0].zip).to eq(nil) - expect(subject.admin_contacts[0].state).to eq(nil) - expect(subject.admin_contacts[0].country).to eq(nil) - expect(subject.admin_contacts[0].country_code).to eq("FR") - expect(subject.admin_contacts[0].phone).to eq("+33 1 39 30 83 00") - expect(subject.admin_contacts[0].fax).to eq(nil) - expect(subject.admin_contacts[0].email).to eq("hostmaster@nic.fr") - expect(subject.admin_contacts[0].updated_on).to eq(DateTime.parse("2005-08-23 16:13:17 UTC")) - end - end - describe "#technical_contacts" do - it do - expect(subject.technical_contacts).to be_a(Array) - expect(subject.technical_contacts.size).to eq(1) - expect(subject.technical_contacts[0]).to be_a(Whois::Parser::Contact) - expect(subject.technical_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_TECHNICAL) - expect(subject.technical_contacts[0].id).to eq("NFC1-FRNIC") - expect(subject.technical_contacts[0].name).to eq("NIC France Contact") - expect(subject.technical_contacts[0].organization).to eq("AFNIC") - expect(subject.technical_contacts[0].address).to eq("immeuble le Stephenson\n1, rue Stephenson\nHall A2 - 3eme etage\n78180 Montigny-Le-Bretonneux") - expect(subject.technical_contacts[0].city).to eq(nil) - expect(subject.technical_contacts[0].zip).to eq(nil) - expect(subject.technical_contacts[0].state).to eq(nil) - expect(subject.technical_contacts[0].country).to eq(nil) - expect(subject.technical_contacts[0].country_code).to eq("FR") - expect(subject.technical_contacts[0].phone).to eq("+33 1 39 30 83 00") - expect(subject.technical_contacts[0].fax).to eq(nil) - expect(subject.technical_contacts[0].email).to eq("hostmaster@nic.fr") - expect(subject.technical_contacts[0].updated_on).to eq(DateTime.parse("2005-08-23 16:13:17 UTC")) - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers.size).to eq(3) - expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[0].name).to eq("ns1.nic.fr") - expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[1].name).to eq("ns2.nic.fr") - expect(subject.nameservers[2]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[2].name).to eq("ns3.nic.fr") - end + it "matches status_registered.expected" do + expect(subject.status).to eq(:registered) + expect(subject.available?).to eq(false) + expect(subject.registered?).to eq(true) + expect(subject.created_on).to be_a(Time) + expect(subject.created_on).to eq(DateTime.parse("1994-12-31 23:00:00 UTC")) + expect(subject.updated_on).to be_a(Time) + expect(subject.updated_on).to eq(DateTime.parse("2018-12-31 23:33:38 UTC")) + expect(subject.expires_on).to be_a(Time) + expect(subject.expires_on).to eq(DateTime.parse("2019-12-31 23:00:00 UTC")) + expect(subject.registrant_contacts).to be_a(Array) + expect(subject.registrant_contacts.size).to eq(1) + expect(subject.registrant_contacts[0]).to be_a(Whois::Parser::Contact) + expect(subject.registrant_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_REGISTRANT) + expect(subject.registrant_contacts[0].id).to eq("AC3598-FRNIC") + expect(subject.registrant_contacts[0].name).to eq(nil) + expect(subject.registrant_contacts[0].organization).to eq("Afnic (Mayotte - CTOM)") + expect(subject.registrant_contacts[0].address).to eq("immeuble le Stephenson\n1, rue Stephenson\nHall A2 - 3eme etage\n78180 Montigny le Bretonneux") + expect(subject.registrant_contacts[0].city).to eq(nil) + expect(subject.registrant_contacts[0].zip).to eq(nil) + expect(subject.registrant_contacts[0].state).to eq(nil) + expect(subject.registrant_contacts[0].country).to eq(nil) + expect(subject.registrant_contacts[0].country_code).to eq("FR") + expect(subject.registrant_contacts[0].phone).to eq("+33 1 39 30 83 00") + expect(subject.registrant_contacts[0].fax).to eq("+33 1 39 30 83 01") + expect(subject.registrant_contacts[0].email).to eq("support@afnic.fr") + expect(subject.registrant_contacts[0].updated_on).to eq(DateTime.parse("2017-07-17 12:41:44 UTC")) + expect(subject.admin_contacts).to be_a(Array) + expect(subject.admin_contacts.size).to eq(1) + expect(subject.admin_contacts[0]).to be_a(Whois::Parser::Contact) + expect(subject.admin_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_ADMINISTRATIVE) + expect(subject.admin_contacts[0].id).to eq("NFC1-FRNIC") + expect(subject.admin_contacts[0].name).to eq("NIC France Contact") + expect(subject.admin_contacts[0].organization).to eq("AFNIC") + expect(subject.admin_contacts[0].address).to eq("immeuble le Stephenson\n1, rue Stephenson\nHall A2 - 3eme etage\n78180 Montigny-Le-Bretonneux") + expect(subject.admin_contacts[0].city).to eq(nil) + expect(subject.admin_contacts[0].zip).to eq(nil) + expect(subject.admin_contacts[0].state).to eq(nil) + expect(subject.admin_contacts[0].country).to eq(nil) + expect(subject.admin_contacts[0].country_code).to eq("FR") + expect(subject.admin_contacts[0].phone).to eq("+33 1 39 30 83 00") + expect(subject.admin_contacts[0].fax).to eq(nil) + expect(subject.admin_contacts[0].email).to eq("hostmaster@nic.fr") + expect(subject.admin_contacts[0].updated_on).to eq(DateTime.parse("2005-08-23 16:13:17 UTC")) + expect(subject.technical_contacts).to be_a(Array) + expect(subject.technical_contacts.size).to eq(1) + expect(subject.technical_contacts[0]).to be_a(Whois::Parser::Contact) + expect(subject.technical_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_TECHNICAL) + expect(subject.technical_contacts[0].id).to eq("NFC1-FRNIC") + expect(subject.technical_contacts[0].name).to eq("NIC France Contact") + expect(subject.technical_contacts[0].organization).to eq("AFNIC") + expect(subject.technical_contacts[0].address).to eq("immeuble le Stephenson\n1, rue Stephenson\nHall A2 - 3eme etage\n78180 Montigny-Le-Bretonneux") + expect(subject.technical_contacts[0].city).to eq(nil) + expect(subject.technical_contacts[0].zip).to eq(nil) + expect(subject.technical_contacts[0].state).to eq(nil) + expect(subject.technical_contacts[0].country).to eq(nil) + expect(subject.technical_contacts[0].country_code).to eq("FR") + expect(subject.technical_contacts[0].phone).to eq("+33 1 39 30 83 00") + expect(subject.technical_contacts[0].fax).to eq(nil) + expect(subject.technical_contacts[0].email).to eq("hostmaster@nic.fr") + expect(subject.technical_contacts[0].updated_on).to eq(DateTime.parse("2005-08-23 16:13:17 UTC")) + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers.size).to eq(3) + expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[0].name).to eq("ns1.nic.fr") + expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[1].name).to eq("ns2.nic.fr") + expect(subject.nameservers[2]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[2].name).to eq("ns3.nic.fr") end end diff --git a/spec/whois/parsers/responses/whois.norid.no/no/status_available_spec.rb b/spec/whois/parsers/responses/whois.norid.no/no/status_available_spec.rb index abf820a2..3e868ae9 100644 --- a/spec/whois/parsers/responses/whois.norid.no/no/status_available_spec.rb +++ b/spec/whois/parsers/responses/whois.norid.no/no/status_available_spec.rb @@ -11,44 +11,21 @@ # require 'spec_helper' -require 'whois/parsers/whois.norid.no.rb' -describe Whois::Parsers::WhoisNoridNo, "status_available.expected" do +describe "whois.norid.no", :aggregate_failures do subject do file = fixture("responses", "whois.norid.no/no/status_available.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.norid.no") + Whois::Parser.parser_for(part) end - describe "#status" do - it do - expect(subject.status).to eq(:available) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(true) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(false) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to eq(nil) - end - end - describe "#updated_on" do - it do - expect(subject.updated_on).to eq(nil) - end - end - describe "#expires_on" do - it do - expect { subject.expires_on }.to raise_error(Whois::AttributeNotSupported) - end + it "matches status_available.expected" do + expect(subject.status).to eq(:available) + expect(subject.available?).to eq(true) + expect(subject.registered?).to eq(false) + expect(subject.created_on).to eq(nil) + expect(subject.updated_on).to eq(nil) + expect { subject.expires_on }.to raise_error(Whois::AttributeNotSupported) end end diff --git a/spec/whois/parsers/responses/whois.norid.no/no/status_registered_spec.rb b/spec/whois/parsers/responses/whois.norid.no/no/status_registered_spec.rb index 74747e68..df0082f7 100644 --- a/spec/whois/parsers/responses/whois.norid.no/no/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.norid.no/no/status_registered_spec.rb @@ -11,46 +11,23 @@ # require 'spec_helper' -require 'whois/parsers/whois.norid.no.rb' -describe Whois::Parsers::WhoisNoridNo, "status_registered.expected" do +describe "whois.norid.no", :aggregate_failures do subject do file = fixture("responses", "whois.norid.no/no/status_registered.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.norid.no") + Whois::Parser.parser_for(part) end - describe "#status" do - it do - expect(subject.status).to eq(:registered) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(false) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(true) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to be_a(Time) - expect(subject.created_on).to eq(DateTime.parse("2001-02-26")) - end - end - describe "#updated_on" do - it do - expect(subject.updated_on).to be_a(Time) - expect(subject.updated_on).to eq(DateTime.parse("2015-01-27")) - end - end - describe "#expires_on" do - it do - expect { subject.expires_on }.to raise_error(Whois::AttributeNotSupported) - end + it "matches status_registered.expected" do + expect(subject.status).to eq(:registered) + expect(subject.available?).to eq(false) + expect(subject.registered?).to eq(true) + expect(subject.created_on).to be_a(Time) + expect(subject.created_on).to eq(DateTime.parse("2001-02-26")) + expect(subject.updated_on).to be_a(Time) + expect(subject.updated_on).to eq(DateTime.parse("2015-01-27")) + expect { subject.expires_on }.to raise_error(Whois::AttributeNotSupported) end end diff --git a/spec/whois/parsers/responses/whois.pairnic.com/status_available_spec.rb b/spec/whois/parsers/responses/whois.pairnic.com/status_available_spec.rb index f7ee2777..5b90308a 100644 --- a/spec/whois/parsers/responses/whois.pairnic.com/status_available_spec.rb +++ b/spec/whois/parsers/responses/whois.pairnic.com/status_available_spec.rb @@ -11,83 +11,32 @@ # require 'spec_helper' -require 'whois/parsers/whois.pairnic.com.rb' -describe Whois::Parsers::WhoisPairnicCom, "status_available.expected" do +describe "whois.pairnic.com", :aggregate_failures do subject do file = fixture("responses", "whois.pairnic.com/status_available.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.pairnic.com") + Whois::Parser.parser_for(part) end - describe "#domain" do - it do - expect(subject.domain).to eq(nil) - end - end - describe "#domain_id" do - it do - expect(subject.domain_id).to eq(nil) - end - end - describe "#status" do - it do - expect(subject.status).to eq(:available) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(true) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(false) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to eq(nil) - end - end - describe "#updated_on" do - it do - expect(subject.updated_on).to eq(nil) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to eq(nil) - end - end - describe "#registrar" do - it do - expect(subject.registrar).to eq(nil) - end - end - describe "#registrant_contacts" do - it do - expect(subject.registrant_contacts).to be_a(Array) - expect(subject.registrant_contacts).to eq([]) - end - end - describe "#admin_contacts" do - it do - expect(subject.admin_contacts).to be_a(Array) - expect(subject.admin_contacts).to eq([]) - end - end - describe "#technical_contacts" do - it do - expect(subject.technical_contacts).to be_a(Array) - expect(subject.technical_contacts).to eq([]) - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers).to eq([]) - end + it "matches status_available.expected" do + expect(subject.domain).to eq(nil) + expect(subject.domain_id).to eq(nil) + expect(subject.status).to eq(:available) + expect(subject.available?).to eq(true) + expect(subject.registered?).to eq(false) + expect(subject.created_on).to eq(nil) + expect(subject.updated_on).to eq(nil) + expect(subject.expires_on).to eq(nil) + expect(subject.registrar).to eq(nil) + expect(subject.registrant_contacts).to be_a(Array) + expect(subject.registrant_contacts).to eq([]) + expect(subject.admin_contacts).to be_a(Array) + expect(subject.admin_contacts).to eq([]) + expect(subject.technical_contacts).to be_a(Array) + expect(subject.technical_contacts).to eq([]) + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers).to eq([]) end end diff --git a/spec/whois/parsers/responses/whois.pairnic.com/status_registered_spec.rb b/spec/whois/parsers/responses/whois.pairnic.com/status_registered_spec.rb index fe97e2b8..ccca01c9 100644 --- a/spec/whois/parsers/responses/whois.pairnic.com/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.pairnic.com/status_registered_spec.rb @@ -11,132 +11,81 @@ # require 'spec_helper' -require 'whois/parsers/whois.pairnic.com.rb' -describe Whois::Parsers::WhoisPairnicCom, "status_registered.expected" do +describe "whois.pairnic.com", :aggregate_failures do subject do file = fixture("responses", "whois.pairnic.com/status_registered.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.pairnic.com") + Whois::Parser.parser_for(part) end - describe "#domain" do - it do - expect(subject.domain).to eq("pairnic.com") - end - end - describe "#domain_id" do - it do - expect(subject.domain_id).to eq("2806983_DOMAIN_COM-VRSN") - end - end - describe "#status" do - it do - expect(subject.status).to eq(:registered) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(false) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(true) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to be_a(Time) - expect(subject.created_on).to eq(DateTime.parse("1998-12-19T05:00:00.0000Z")) - end - end - describe "#updated_on" do - it do - expect(subject.updated_on).to be_a(Time) - expect(subject.updated_on).to eq(DateTime.parse("2012-09-04T13:55:30.0000Z")) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to be_a(Time) - expect(subject.expires_on).to eq(DateTime.parse("2017-12-18T19:00:-0500Z")) - end - end - describe "#registrar" do - it do - expect(subject.registrar).to be_a(Whois::Parser::Registrar) - expect(subject.registrar.id).to eq("99") - expect(subject.registrar.name).to eq("pairNIC INC") - expect(subject.registrar.url).to eq("https://www.pairnic.com") - end - end - describe "#registrant_contacts" do - it do - expect(subject.registrant_contacts).to be_a(Array) - expect(subject.registrant_contacts.size).to eq(1) - expect(subject.registrant_contacts[0]).to be_a(Whois::Parser::Contact) - expect(subject.registrant_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_REGISTRANT) - expect(subject.registrant_contacts[0].id).to eq("753531") - expect(subject.registrant_contacts[0].name).to eq("Domain Administrator") - expect(subject.registrant_contacts[0].organization).to eq("pair Networks, Inc.") - expect(subject.registrant_contacts[0].address).to eq("2403 Sidney Street Suite 210") - expect(subject.registrant_contacts[0].city).to eq("Pittsburgh") - expect(subject.registrant_contacts[0].zip).to eq("15203") - expect(subject.registrant_contacts[0].state).to eq("PA") - expect(subject.registrant_contacts[0].country_code).to eq("US") - expect(subject.registrant_contacts[0].phone).to eq("") - expect(subject.registrant_contacts[0].fax).to eq("") - expect(subject.registrant_contacts[0].email).to eq("") - end - end - describe "#admin_contacts" do - it do - expect(subject.admin_contacts).to be_a(Array) - expect(subject.admin_contacts.size).to eq(1) - expect(subject.admin_contacts[0]).to be_a(Whois::Parser::Contact) - expect(subject.admin_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_ADMINISTRATIVE) - expect(subject.admin_contacts[0].id).to eq("753250") - expect(subject.admin_contacts[0].name).to eq("Domain Administrator") - expect(subject.admin_contacts[0].organization).to eq("pair Networks, Inc.") - expect(subject.admin_contacts[0].address).to eq("2403 Sidney Street Suite 210") - expect(subject.admin_contacts[0].city).to eq("Pittsburgh") - expect(subject.admin_contacts[0].zip).to eq("15203") - expect(subject.admin_contacts[0].state).to eq("PA") - expect(subject.admin_contacts[0].country_code).to eq("US") - expect(subject.admin_contacts[0].phone).to eq("+1.4123817247") - expect(subject.admin_contacts[0].fax).to eq("+1.4123819997") - expect(subject.admin_contacts[0].email).to eq("domain@pair.com") - end - end - describe "#technical_contacts" do - it do - expect(subject.technical_contacts).to be_a(Array) - expect(subject.technical_contacts.size).to eq(1) - expect(subject.technical_contacts[0]).to be_a(Whois::Parser::Contact) - expect(subject.technical_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_TECHNICAL) - expect(subject.technical_contacts[0].id).to eq("753250") - expect(subject.technical_contacts[0].name).to eq("Domain Administrator") - expect(subject.technical_contacts[0].organization).to eq("pair Networks, Inc.") - expect(subject.technical_contacts[0].address).to eq("2403 Sidney Street Suite 210") - expect(subject.technical_contacts[0].city).to eq("Pittsburgh") - expect(subject.technical_contacts[0].zip).to eq("15203") - expect(subject.technical_contacts[0].state).to eq("PA") - expect(subject.technical_contacts[0].country_code).to eq("US") - expect(subject.technical_contacts[0].phone).to eq("+1.4123817247") - expect(subject.technical_contacts[0].fax).to eq("+1.4123819997") - expect(subject.technical_contacts[0].email).to eq("domain@pair.com") - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers.size).to eq(2) - expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[0].name).to eq("ns0.ns0.com") - expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[1].name).to eq("ns00.ns0.com") - end + it "matches status_registered.expected" do + expect(subject.domain).to eq("pairnic.com") + expect(subject.domain_id).to eq("2806983_DOMAIN_COM-VRSN") + expect(subject.status).to eq(:registered) + expect(subject.available?).to eq(false) + expect(subject.registered?).to eq(true) + expect(subject.created_on).to be_a(Time) + expect(subject.created_on).to eq(DateTime.parse("1998-12-19T05:00:00.0000Z")) + expect(subject.updated_on).to be_a(Time) + expect(subject.updated_on).to eq(DateTime.parse("2012-09-04T13:55:30.0000Z")) + expect(subject.expires_on).to be_a(Time) + expect(subject.expires_on).to eq(DateTime.parse("2017-12-18T19:00:-0500Z")) + expect(subject.registrar).to be_a(Whois::Parser::Registrar) + expect(subject.registrar.id).to eq("99") + expect(subject.registrar.name).to eq("pairNIC INC") + expect(subject.registrar.url).to eq("https://www.pairnic.com") + expect(subject.registrant_contacts).to be_a(Array) + expect(subject.registrant_contacts.size).to eq(1) + expect(subject.registrant_contacts[0]).to be_a(Whois::Parser::Contact) + expect(subject.registrant_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_REGISTRANT) + expect(subject.registrant_contacts[0].id).to eq("753531") + expect(subject.registrant_contacts[0].name).to eq("Domain Administrator") + expect(subject.registrant_contacts[0].organization).to eq("pair Networks, Inc.") + expect(subject.registrant_contacts[0].address).to eq("2403 Sidney Street Suite 210") + expect(subject.registrant_contacts[0].city).to eq("Pittsburgh") + expect(subject.registrant_contacts[0].zip).to eq("15203") + expect(subject.registrant_contacts[0].state).to eq("PA") + expect(subject.registrant_contacts[0].country_code).to eq("US") + expect(subject.registrant_contacts[0].phone).to eq("") + expect(subject.registrant_contacts[0].fax).to eq("") + expect(subject.registrant_contacts[0].email).to eq("") + expect(subject.admin_contacts).to be_a(Array) + expect(subject.admin_contacts.size).to eq(1) + expect(subject.admin_contacts[0]).to be_a(Whois::Parser::Contact) + expect(subject.admin_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_ADMINISTRATIVE) + expect(subject.admin_contacts[0].id).to eq("753250") + expect(subject.admin_contacts[0].name).to eq("Domain Administrator") + expect(subject.admin_contacts[0].organization).to eq("pair Networks, Inc.") + expect(subject.admin_contacts[0].address).to eq("2403 Sidney Street Suite 210") + expect(subject.admin_contacts[0].city).to eq("Pittsburgh") + expect(subject.admin_contacts[0].zip).to eq("15203") + expect(subject.admin_contacts[0].state).to eq("PA") + expect(subject.admin_contacts[0].country_code).to eq("US") + expect(subject.admin_contacts[0].phone).to eq("+1.4123817247") + expect(subject.admin_contacts[0].fax).to eq("+1.4123819997") + expect(subject.admin_contacts[0].email).to eq("domain@pair.com") + expect(subject.technical_contacts).to be_a(Array) + expect(subject.technical_contacts.size).to eq(1) + expect(subject.technical_contacts[0]).to be_a(Whois::Parser::Contact) + expect(subject.technical_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_TECHNICAL) + expect(subject.technical_contacts[0].id).to eq("753250") + expect(subject.technical_contacts[0].name).to eq("Domain Administrator") + expect(subject.technical_contacts[0].organization).to eq("pair Networks, Inc.") + expect(subject.technical_contacts[0].address).to eq("2403 Sidney Street Suite 210") + expect(subject.technical_contacts[0].city).to eq("Pittsburgh") + expect(subject.technical_contacts[0].zip).to eq("15203") + expect(subject.technical_contacts[0].state).to eq("PA") + expect(subject.technical_contacts[0].country_code).to eq("US") + expect(subject.technical_contacts[0].phone).to eq("+1.4123817247") + expect(subject.technical_contacts[0].fax).to eq("+1.4123819997") + expect(subject.technical_contacts[0].email).to eq("domain@pair.com") + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers.size).to eq(2) + expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[0].name).to eq("ns0.ns0.com") + expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[1].name).to eq("ns00.ns0.com") end end diff --git a/spec/whois/parsers/responses/whois.pandi.or.id/id/status_available_spec.rb b/spec/whois/parsers/responses/whois.pandi.or.id/id/status_available_spec.rb index f26b2415..11b2aab2 100644 --- a/spec/whois/parsers/responses/whois.pandi.or.id/id/status_available_spec.rb +++ b/spec/whois/parsers/responses/whois.pandi.or.id/id/status_available_spec.rb @@ -11,88 +11,33 @@ # require 'spec_helper' -require 'whois/parsers/whois.pandi.or.id.rb' -describe Whois::Parsers::WhoisPandiOrId, "status_available.expected" do +describe "whois.pandi.or.id", :aggregate_failures do subject do file = fixture("responses", "whois.pandi.or.id/id/status_available.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.pandi.or.id") + Whois::Parser.parser_for(part) end - describe "#disclaimer" do - it do - expect(subject.disclaimer).to eq(nil) - end - end - describe "#domain" do - it do - expect(subject.domain).to eq(nil) - end - end - describe "#domain_id" do - it do - expect(subject.domain_id).to eq(nil) - end - end - describe "#status" do - it do - expect(subject.status).to eq([]) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(true) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(false) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to eq(nil) - end - end - describe "#updated_on" do - it do - expect(subject.updated_on).to eq(nil) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to eq(nil) - end - end - describe "#registrar" do - it do - expect(subject.registrar).to eq(nil) - end - end - describe "#registrant_contacts" do - it do - expect(subject.registrant_contacts).to be_a(Array) - expect(subject.registrant_contacts).to eq([]) - end - end - describe "#admin_contacts" do - it do - expect(subject.admin_contacts).to be_a(Array) - expect(subject.admin_contacts).to eq([]) - end - end - describe "#technical_contacts" do - it do - expect(subject.technical_contacts).to be_a(Array) - expect(subject.technical_contacts).to eq([]) - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers).to eq([]) - end + it "matches status_available.expected" do + expect(subject.disclaimer).to eq(nil) + expect(subject.domain).to eq(nil) + expect(subject.domain_id).to eq(nil) + expect(subject.status).to eq([]) + expect(subject.available?).to eq(true) + expect(subject.registered?).to eq(false) + expect(subject.created_on).to eq(nil) + expect(subject.updated_on).to eq(nil) + expect(subject.expires_on).to eq(nil) + expect(subject.registrar).to eq(nil) + expect(subject.registrant_contacts).to be_a(Array) + expect(subject.registrant_contacts).to eq([]) + expect(subject.admin_contacts).to be_a(Array) + expect(subject.admin_contacts).to eq([]) + expect(subject.technical_contacts).to be_a(Array) + expect(subject.technical_contacts).to eq([]) + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers).to eq([]) end end diff --git a/spec/whois/parsers/responses/whois.pandi.or.id/id/status_registered_spec.rb b/spec/whois/parsers/responses/whois.pandi.or.id/id/status_registered_spec.rb index 77d23b16..d20daca0 100644 --- a/spec/whois/parsers/responses/whois.pandi.or.id/id/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.pandi.or.id/id/status_registered_spec.rb @@ -11,152 +11,97 @@ # require 'spec_helper' -require 'whois/parsers/whois.pandi.or.id.rb' -describe Whois::Parsers::WhoisPandiOrId, "status_registered.expected" do +describe "whois.pandi.or.id", :aggregate_failures do subject do file = fixture("responses", "whois.pandi.or.id/id/status_registered.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.pandi.or.id") + Whois::Parser.parser_for(part) end - describe "#disclaimer" do - it do - expect(subject.disclaimer).to eq(nil) - end - end - describe "#domain" do - it do - expect(subject.domain).to eq("google.co.id") - end - end - describe "#domain_id" do - it do - expect(subject.domain_id).to eq("PANDI-DO246796") - end - end - describe "#status" do - it do - expect(subject.status).to eq(["clientTransferProhibited", "serverTransferProhibited"]) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(false) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(true) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to be_a(Time) - expect(subject.created_on).to eq(DateTime.parse("2004-12-18 13:33:21 UTC")) - end - end - describe "#updated_on" do - it do - expect(subject.updated_on).to be_a(Time) - expect(subject.updated_on).to eq(DateTime.parse("2013-09-20 23:24:51 UTC")) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to be_a(Time) - expect(subject.expires_on).to eq(DateTime.parse("2014-09-01 23:59:59 UTC")) - end - end - describe "#registrar" do - it do - expect(subject.registrar).to be_a(Whois::Parser::Registrar) - expect(subject.registrar.id).to eq("digitalreg") - expect(subject.registrar.name).to eq("Digital Registra") - expect(subject.registrar.url).to eq(nil) - end - end - describe "#registrant_contacts" do - it do - expect(subject.registrant_contacts).to be_a(Array) - expect(subject.registrant_contacts.size).to eq(1) - expect(subject.registrant_contacts[0]).to be_a(Whois::Parser::Contact) - expect(subject.registrant_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_REGISTRANT) - expect(subject.registrant_contacts[0].id).to eq("0123459P2ZC") - expect(subject.registrant_contacts[0].name).to eq("Domain Administrator") - expect(subject.registrant_contacts[0].organization).to eq("PT Google Indonesia") - expect(subject.registrant_contacts[0].address).to eq("Menara BCA Grand Indonesia\nRegus Grand Indonesia") - expect(subject.registrant_contacts[0].city).to eq("Jakarta") - expect(subject.registrant_contacts[0].zip).to eq("10310") - expect(subject.registrant_contacts[0].state).to eq("Jakarta") - expect(subject.registrant_contacts[0].country).to eq(nil) - expect(subject.registrant_contacts[0].country_code).to eq("ID") - expect(subject.registrant_contacts[0].phone).to eq("+62.2123584400") - expect(subject.registrant_contacts[0].fax).to eq("+62.2123584400") - expect(subject.registrant_contacts[0].email).to eq("dns-admin@google.com") - end - end - describe "#admin_contacts" do - it do - expect(subject.admin_contacts).to be_a(Array) - expect(subject.admin_contacts.size).to eq(1) - expect(subject.admin_contacts[0]).to be_a(Whois::Parser::Contact) - expect(subject.admin_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_ADMINISTRATIVE) - expect(subject.admin_contacts[0].id).to eq("0123459P2ZC") - expect(subject.admin_contacts[0].name).to eq("Domain Administrator") - expect(subject.admin_contacts[0].organization).to eq("PT Google Indonesia") - expect(subject.admin_contacts[0].address).to eq("Menara BCA Grand Indonesia\nRegus Grand Indonesia") - expect(subject.admin_contacts[0].city).to eq("Jakarta") - expect(subject.admin_contacts[0].zip).to eq("10310") - expect(subject.admin_contacts[0].state).to eq("Jakarta") - expect(subject.admin_contacts[0].country).to eq(nil) - expect(subject.admin_contacts[0].country_code).to eq("ID") - expect(subject.admin_contacts[0].phone).to eq("+62.2123584400") - expect(subject.admin_contacts[0].fax).to eq("+62.2123584400") - expect(subject.admin_contacts[0].email).to eq("dns-admin@google.com") - end - end - describe "#technical_contacts" do - it do - expect(subject.technical_contacts).to be_a(Array) - expect(subject.technical_contacts.size).to eq(1) - expect(subject.technical_contacts[0]).to be_a(Whois::Parser::Contact) - expect(subject.technical_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_TECHNICAL) - expect(subject.technical_contacts[0].id).to eq("01234616RFG") - expect(subject.technical_contacts[0].name).to eq("DNS Admin") - expect(subject.technical_contacts[0].organization).to eq("Google Inc.") - expect(subject.technical_contacts[0].address).to eq("1600 Amphitheatre Parkway") - expect(subject.technical_contacts[0].city).to eq("Mountain View") - expect(subject.technical_contacts[0].zip).to eq("94043") - expect(subject.technical_contacts[0].state).to eq("CA") - expect(subject.technical_contacts[0].country).to eq(nil) - expect(subject.technical_contacts[0].country_code).to eq("US") - expect(subject.technical_contacts[0].phone).to eq("+1.65030000") - expect(subject.technical_contacts[0].fax).to eq("+1.65030001") - expect(subject.technical_contacts[0].email).to eq("dns-admin@google.com") - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers.size).to eq(4) - expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[0].name).to eq("ns1.google.com") - expect(subject.nameservers[0].ipv4).to eq(nil) - expect(subject.nameservers[0].ipv6).to eq(nil) - expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[1].name).to eq("ns2.google.com") - expect(subject.nameservers[1].ipv4).to eq(nil) - expect(subject.nameservers[1].ipv6).to eq(nil) - expect(subject.nameservers[2]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[2].name).to eq("ns3.google.com") - expect(subject.nameservers[2].ipv4).to eq(nil) - expect(subject.nameservers[2].ipv6).to eq(nil) - expect(subject.nameservers[3]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[3].name).to eq("ns4.google.com") - expect(subject.nameservers[3].ipv4).to eq(nil) - expect(subject.nameservers[3].ipv6).to eq(nil) - end + it "matches status_registered.expected" do + expect(subject.disclaimer).to eq(nil) + expect(subject.domain).to eq("google.co.id") + expect(subject.domain_id).to eq("PANDI-DO246796") + expect(subject.status).to eq(["clientTransferProhibited", "serverTransferProhibited"]) + expect(subject.available?).to eq(false) + expect(subject.registered?).to eq(true) + expect(subject.created_on).to be_a(Time) + expect(subject.created_on).to eq(DateTime.parse("2004-12-18 13:33:21 UTC")) + expect(subject.updated_on).to be_a(Time) + expect(subject.updated_on).to eq(DateTime.parse("2013-09-20 23:24:51 UTC")) + expect(subject.expires_on).to be_a(Time) + expect(subject.expires_on).to eq(DateTime.parse("2014-09-01 23:59:59 UTC")) + expect(subject.registrar).to be_a(Whois::Parser::Registrar) + expect(subject.registrar.id).to eq("digitalreg") + expect(subject.registrar.name).to eq("Digital Registra") + expect(subject.registrar.url).to eq(nil) + expect(subject.registrant_contacts).to be_a(Array) + expect(subject.registrant_contacts.size).to eq(1) + expect(subject.registrant_contacts[0]).to be_a(Whois::Parser::Contact) + expect(subject.registrant_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_REGISTRANT) + expect(subject.registrant_contacts[0].id).to eq("0123459P2ZC") + expect(subject.registrant_contacts[0].name).to eq("Domain Administrator") + expect(subject.registrant_contacts[0].organization).to eq("PT Google Indonesia") + expect(subject.registrant_contacts[0].address).to eq("Menara BCA Grand Indonesia\nRegus Grand Indonesia") + expect(subject.registrant_contacts[0].city).to eq("Jakarta") + expect(subject.registrant_contacts[0].zip).to eq("10310") + expect(subject.registrant_contacts[0].state).to eq("Jakarta") + expect(subject.registrant_contacts[0].country).to eq(nil) + expect(subject.registrant_contacts[0].country_code).to eq("ID") + expect(subject.registrant_contacts[0].phone).to eq("+62.2123584400") + expect(subject.registrant_contacts[0].fax).to eq("+62.2123584400") + expect(subject.registrant_contacts[0].email).to eq("dns-admin@google.com") + expect(subject.admin_contacts).to be_a(Array) + expect(subject.admin_contacts.size).to eq(1) + expect(subject.admin_contacts[0]).to be_a(Whois::Parser::Contact) + expect(subject.admin_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_ADMINISTRATIVE) + expect(subject.admin_contacts[0].id).to eq("0123459P2ZC") + expect(subject.admin_contacts[0].name).to eq("Domain Administrator") + expect(subject.admin_contacts[0].organization).to eq("PT Google Indonesia") + expect(subject.admin_contacts[0].address).to eq("Menara BCA Grand Indonesia\nRegus Grand Indonesia") + expect(subject.admin_contacts[0].city).to eq("Jakarta") + expect(subject.admin_contacts[0].zip).to eq("10310") + expect(subject.admin_contacts[0].state).to eq("Jakarta") + expect(subject.admin_contacts[0].country).to eq(nil) + expect(subject.admin_contacts[0].country_code).to eq("ID") + expect(subject.admin_contacts[0].phone).to eq("+62.2123584400") + expect(subject.admin_contacts[0].fax).to eq("+62.2123584400") + expect(subject.admin_contacts[0].email).to eq("dns-admin@google.com") + expect(subject.technical_contacts).to be_a(Array) + expect(subject.technical_contacts.size).to eq(1) + expect(subject.technical_contacts[0]).to be_a(Whois::Parser::Contact) + expect(subject.technical_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_TECHNICAL) + expect(subject.technical_contacts[0].id).to eq("01234616RFG") + expect(subject.technical_contacts[0].name).to eq("DNS Admin") + expect(subject.technical_contacts[0].organization).to eq("Google Inc.") + expect(subject.technical_contacts[0].address).to eq("1600 Amphitheatre Parkway") + expect(subject.technical_contacts[0].city).to eq("Mountain View") + expect(subject.technical_contacts[0].zip).to eq("94043") + expect(subject.technical_contacts[0].state).to eq("CA") + expect(subject.technical_contacts[0].country).to eq(nil) + expect(subject.technical_contacts[0].country_code).to eq("US") + expect(subject.technical_contacts[0].phone).to eq("+1.65030000") + expect(subject.technical_contacts[0].fax).to eq("+1.65030001") + expect(subject.technical_contacts[0].email).to eq("dns-admin@google.com") + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers.size).to eq(4) + expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[0].name).to eq("ns1.google.com") + expect(subject.nameservers[0].ipv4).to eq(nil) + expect(subject.nameservers[0].ipv6).to eq(nil) + expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[1].name).to eq("ns2.google.com") + expect(subject.nameservers[1].ipv4).to eq(nil) + expect(subject.nameservers[1].ipv6).to eq(nil) + expect(subject.nameservers[2]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[2].name).to eq("ns3.google.com") + expect(subject.nameservers[2].ipv4).to eq(nil) + expect(subject.nameservers[2].ipv6).to eq(nil) + expect(subject.nameservers[3]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[3].name).to eq("ns4.google.com") + expect(subject.nameservers[3].ipv4).to eq(nil) + expect(subject.nameservers[3].ipv6).to eq(nil) end end diff --git a/spec/whois/parsers/responses/whois.pir.org/org/response_throttled_spec.rb b/spec/whois/parsers/responses/whois.pir.org/org/response_throttled_spec.rb index 55773a10..daa9c87d 100644 --- a/spec/whois/parsers/responses/whois.pir.org/org/response_throttled_spec.rb +++ b/spec/whois/parsers/responses/whois.pir.org/org/response_throttled_spec.rb @@ -11,19 +11,16 @@ # require 'spec_helper' -require 'whois/parsers/whois.pir.org.rb' -describe Whois::Parsers::WhoisPirOrg, "response_throttled.expected" do +describe "whois.pir.org", :aggregate_failures do subject do file = fixture("responses", "whois.pir.org/org/response_throttled.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.pir.org") + Whois::Parser.parser_for(part) end - describe "#response_throttled?" do - it do - expect(subject.response_throttled?).to eq(true) - end + it "matches response_throttled.expected" do + expect(subject.response_throttled?).to eq(true) end end diff --git a/spec/whois/parsers/responses/whois.pir.org/org/status_available_spec.rb b/spec/whois/parsers/responses/whois.pir.org/org/status_available_spec.rb index 2eefba62..dea74f52 100644 --- a/spec/whois/parsers/responses/whois.pir.org/org/status_available_spec.rb +++ b/spec/whois/parsers/responses/whois.pir.org/org/status_available_spec.rb @@ -11,88 +11,33 @@ # require 'spec_helper' -require 'whois/parsers/whois.pir.org.rb' -describe Whois::Parsers::WhoisPirOrg, "status_available.expected" do +describe "whois.pir.org", :aggregate_failures do subject do file = fixture("responses", "whois.pir.org/org/status_available.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.pir.org") + Whois::Parser.parser_for(part) end - describe "#disclaimer" do - it do - expect(subject.disclaimer).to eq("Access to Public Interest Registry WHOIS information is provided to assist persons in determining the contents of a domain name registration record in the Public Interest Registry registry database. The data in this record is provided by Public Interest Registry for informational purposes only, and Public Interest Registry 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. Public Interest Registry reserves the right to modify these terms at any time. By submitting this query, you agree to abide by this policy. The Registrar of Record identified in this output may have an RDDS service that can be queried for additional information on how to contact the Registrant, Admin, or Tech contact of the queried domain name.") - end - end - describe "#domain" do - it do - expect(subject.domain).to eq(nil) - end - end - describe "#domain_id" do - it do - expect(subject.domain_id).to eq(nil) - end - end - describe "#status" do - it do - expect(subject.status).to eq([]) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(true) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(false) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to eq(nil) - end - end - describe "#updated_on" do - it do - expect(subject.updated_on).to eq(nil) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to eq(nil) - end - end - describe "#registrar" do - it do - expect(subject.registrar).to eq(nil) - end - end - describe "#registrant_contacts" do - it do - expect(subject.registrant_contacts).to be_a(Array) - expect(subject.registrant_contacts).to eq([]) - end - end - describe "#admin_contacts" do - it do - expect(subject.admin_contacts).to be_a(Array) - expect(subject.admin_contacts).to eq([]) - end - end - describe "#technical_contacts" do - it do - expect(subject.technical_contacts).to be_a(Array) - expect(subject.technical_contacts).to eq([]) - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers).to eq([]) - end + it "matches status_available.expected" do + expect(subject.disclaimer).to eq("Access to Public Interest Registry WHOIS information is provided to assist persons in determining the contents of a domain name registration record in the Public Interest Registry registry database. The data in this record is provided by Public Interest Registry for informational purposes only, and Public Interest Registry 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. Public Interest Registry reserves the right to modify these terms at any time. By submitting this query, you agree to abide by this policy. The Registrar of Record identified in this output may have an RDDS service that can be queried for additional information on how to contact the Registrant, Admin, or Tech contact of the queried domain name.") + expect(subject.domain).to eq(nil) + expect(subject.domain_id).to eq(nil) + expect(subject.status).to eq([]) + expect(subject.available?).to eq(true) + expect(subject.registered?).to eq(false) + expect(subject.created_on).to eq(nil) + expect(subject.updated_on).to eq(nil) + expect(subject.expires_on).to eq(nil) + expect(subject.registrar).to eq(nil) + expect(subject.registrant_contacts).to be_a(Array) + expect(subject.registrant_contacts).to eq([]) + expect(subject.admin_contacts).to be_a(Array) + expect(subject.admin_contacts).to eq([]) + expect(subject.technical_contacts).to be_a(Array) + expect(subject.technical_contacts).to eq([]) + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers).to eq([]) end end diff --git a/spec/whois/parsers/responses/whois.pir.org/org/status_registered_spec.rb b/spec/whois/parsers/responses/whois.pir.org/org/status_registered_spec.rb index 1f2f5306..8bafad3f 100644 --- a/spec/whois/parsers/responses/whois.pir.org/org/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.pir.org/org/status_registered_spec.rb @@ -11,120 +11,61 @@ # require 'spec_helper' -require 'whois/parsers/whois.pir.org.rb' -describe Whois::Parsers::WhoisPirOrg, "status_registered.expected" do +describe "whois.pir.org", :aggregate_failures do subject do file = fixture("responses", "whois.pir.org/org/status_registered.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.pir.org") + Whois::Parser.parser_for(part) end - describe "#disclaimer" do - it do - expect(subject.disclaimer).to eq("Access to Public Interest Registry WHOIS information is provided to assist persons in determining the contents of a domain name registration record in the Public Interest Registry registry database. The data in this record is provided by Public Interest Registry for informational purposes only, and Public Interest Registry 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. Public Interest Registry reserves the right to modify these terms at any time. By submitting this query, you agree to abide by this policy. The Registrar of Record identified in this output may have an RDDS service that can be queried for additional information on how to contact the Registrant, Admin, or Tech contact of the queried domain name.") - end - end - describe "#domain" do - it do - expect(subject.domain).to eq("google.org") - end - end - describe "#domain_id" do - it do - expect(subject.domain_id).to eq("D2244233-LROR") - end - end - describe "#status" do - it do - expect(subject.status).to eq(["clientDeleteProhibited https://icann.org/epp#clientDeleteProhibited", "clientTransferProhibited https://icann.org/epp#clientTransferProhibited", "clientUpdateProhibited https://icann.org/epp#clientUpdateProhibited", "serverDeleteProhibited https://icann.org/epp#serverDeleteProhibited", "serverTransferProhibited https://icann.org/epp#serverTransferProhibited", "serverUpdateProhibited https://icann.org/epp#serverUpdateProhibited"]) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(false) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(true) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to be_a(Time) - expect(subject.created_on).to eq(DateTime.parse("1998-10-21 04:00:00 UTC")) - end - end - describe "#updated_on" do - it do - expect(subject.updated_on).to be_a(Time) - expect(subject.updated_on).to eq(DateTime.parse("2021-09-18 09:24:00 UTC")) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to be_a(Time) - expect(subject.expires_on).to eq(DateTime.parse("2022-10-20 04:00:00 UTC")) - end - end - describe "#registrar" do - it do - expect(subject.registrar).to be_a(Whois::Parser::Registrar) - expect(subject.registrar.id).to eq("292") - expect(subject.registrar.name).to eq("MarkMonitor Inc.") - expect(subject.registrar.url).to eq("http://www.markmonitor.com") - end - end - describe "#registrant_contacts" do - it do - expect(subject.registrant_contacts).to be_a(Array) - expect(subject.registrant_contacts.size).to eq(1) - expect(subject.registrant_contacts[0]).to be_a(Whois::Parser::Contact) - expect(subject.registrant_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_REGISTRANT) - expect(subject.registrant_contacts[0].id).to eq(nil) - expect(subject.registrant_contacts[0].name).to eq(nil) - expect(subject.registrant_contacts[0].organization).to eq("Google Inc.") - expect(subject.registrant_contacts[0].address).to eq(nil) - expect(subject.registrant_contacts[0].city).to eq(nil) - expect(subject.registrant_contacts[0].zip).to eq(nil) - expect(subject.registrant_contacts[0].state).to eq("CA") - expect(subject.registrant_contacts[0].country_code).to eq("US") - expect(subject.registrant_contacts[0].phone).to eq(nil) - expect(subject.registrant_contacts[0].fax).to eq(nil) - expect(subject.registrant_contacts[0].email).to eq(nil) - end - end - describe "#admin_contacts" do - it do - expect(subject.admin_contacts).to be_a(Array) - expect(subject.admin_contacts.size).to eq(0) - end - end - describe "#technical_contacts" do - it do - expect(subject.technical_contacts).to be_a(Array) - expect(subject.technical_contacts.size).to eq(0) - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers.size).to eq(4) - expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[0].name).to eq("ns2.google.com") - expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[1].name).to eq("ns1.google.com") - expect(subject.nameservers[2]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[2].name).to eq("ns3.google.com") - expect(subject.nameservers[3]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[3].name).to eq("ns4.google.com") - end - end - describe "#response_throttled?" do - it do - expect(subject.response_throttled?).to eq(false) - end + it "matches status_registered.expected" do + expect(subject.disclaimer).to eq("Access to Public Interest Registry WHOIS information is provided to assist persons in determining the contents of a domain name registration record in the Public Interest Registry registry database. The data in this record is provided by Public Interest Registry for informational purposes only, and Public Interest Registry 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. Public Interest Registry reserves the right to modify these terms at any time. By submitting this query, you agree to abide by this policy. The Registrar of Record identified in this output may have an RDDS service that can be queried for additional information on how to contact the Registrant, Admin, or Tech contact of the queried domain name.") + expect(subject.domain).to eq("google.org") + expect(subject.domain_id).to eq("D2244233-LROR") + expect(subject.status).to eq(["clientDeleteProhibited https://icann.org/epp#clientDeleteProhibited", "clientTransferProhibited https://icann.org/epp#clientTransferProhibited", "clientUpdateProhibited https://icann.org/epp#clientUpdateProhibited", "serverDeleteProhibited https://icann.org/epp#serverDeleteProhibited", "serverTransferProhibited https://icann.org/epp#serverTransferProhibited", "serverUpdateProhibited https://icann.org/epp#serverUpdateProhibited"]) + expect(subject.available?).to eq(false) + expect(subject.registered?).to eq(true) + expect(subject.created_on).to be_a(Time) + expect(subject.created_on).to eq(DateTime.parse("1998-10-21 04:00:00 UTC")) + expect(subject.updated_on).to be_a(Time) + expect(subject.updated_on).to eq(DateTime.parse("2021-09-18 09:24:00 UTC")) + expect(subject.expires_on).to be_a(Time) + expect(subject.expires_on).to eq(DateTime.parse("2022-10-20 04:00:00 UTC")) + expect(subject.registrar).to be_a(Whois::Parser::Registrar) + expect(subject.registrar.id).to eq("292") + expect(subject.registrar.name).to eq("MarkMonitor Inc.") + expect(subject.registrar.url).to eq("http://www.markmonitor.com") + expect(subject.registrant_contacts).to be_a(Array) + expect(subject.registrant_contacts.size).to eq(1) + expect(subject.registrant_contacts[0]).to be_a(Whois::Parser::Contact) + expect(subject.registrant_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_REGISTRANT) + expect(subject.registrant_contacts[0].id).to eq(nil) + expect(subject.registrant_contacts[0].name).to eq(nil) + expect(subject.registrant_contacts[0].organization).to eq("Google Inc.") + expect(subject.registrant_contacts[0].address).to eq(nil) + expect(subject.registrant_contacts[0].city).to eq(nil) + expect(subject.registrant_contacts[0].zip).to eq(nil) + expect(subject.registrant_contacts[0].state).to eq("CA") + expect(subject.registrant_contacts[0].country_code).to eq("US") + expect(subject.registrant_contacts[0].phone).to eq(nil) + expect(subject.registrant_contacts[0].fax).to eq(nil) + expect(subject.registrant_contacts[0].email).to eq(nil) + expect(subject.admin_contacts).to be_a(Array) + expect(subject.admin_contacts.size).to eq(0) + expect(subject.technical_contacts).to be_a(Array) + expect(subject.technical_contacts.size).to eq(0) + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers.size).to eq(4) + expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[0].name).to eq("ns2.google.com") + expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[1].name).to eq("ns1.google.com") + expect(subject.nameservers[2]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[2].name).to eq("ns3.google.com") + expect(subject.nameservers[3]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[3].name).to eq("ns4.google.com") + expect(subject.response_throttled?).to eq(false) end end diff --git a/spec/whois/parsers/responses/whois.pnina.ps/ps/status_available_spec.rb b/spec/whois/parsers/responses/whois.pnina.ps/ps/status_available_spec.rb index 9ee6fa2e..777746f7 100644 --- a/spec/whois/parsers/responses/whois.pnina.ps/ps/status_available_spec.rb +++ b/spec/whois/parsers/responses/whois.pnina.ps/ps/status_available_spec.rb @@ -11,65 +11,26 @@ # require 'spec_helper' -require 'whois/parsers/whois.pnina.ps.rb' -describe Whois::Parsers::WhoisPninaPs, "status_available.expected" do +describe "whois.pnina.ps", :aggregate_failures do subject do file = fixture("responses", "whois.pnina.ps/ps/status_available.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.pnina.ps") + Whois::Parser.parser_for(part) end - describe "#domain" do - it do - expect(subject.domain).to eq("u34jedzcq.ps") - end - end - describe "#domain_id" do - it do - expect(subject.domain_id).to eq(nil) - end - end - describe "#status" do - it do - expect(subject.status).to eq(:available) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(true) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(false) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to eq(nil) - end - end - describe "#updated_on" do - it do - expect(subject.updated_on).to eq(nil) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to eq(nil) - end - end - describe "#registrar" do - it do - expect(subject.registrar).to eq(nil) - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers).to eq([]) - end + it "matches status_available.expected" do + expect(subject.domain).to eq("u34jedzcq.ps") + expect(subject.domain_id).to eq(nil) + expect(subject.status).to eq(:available) + expect(subject.available?).to eq(true) + expect(subject.registered?).to eq(false) + expect(subject.created_on).to eq(nil) + expect(subject.updated_on).to eq(nil) + expect(subject.expires_on).to eq(nil) + expect(subject.registrar).to eq(nil) + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers).to eq([]) end end diff --git a/spec/whois/parsers/responses/whois.pnina.ps/ps/status_registered_spec.rb b/spec/whois/parsers/responses/whois.pnina.ps/ps/status_registered_spec.rb index a1f2f82e..d05e0a0e 100644 --- a/spec/whois/parsers/responses/whois.pnina.ps/ps/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.pnina.ps/ps/status_registered_spec.rb @@ -11,82 +11,43 @@ # require 'spec_helper' -require 'whois/parsers/whois.pnina.ps.rb' -describe Whois::Parsers::WhoisPninaPs, "status_registered.expected" do +describe "whois.pnina.ps", :aggregate_failures do subject do file = fixture("responses", "whois.pnina.ps/ps/status_registered.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.pnina.ps") + Whois::Parser.parser_for(part) end - describe "#domain" do - it do - expect(subject.domain).to eq("google.ps") - end - end - describe "#domain_id" do - it do - expect(subject.domain_id).to eq("21665-PS") - end - end - describe "#status" do - it do - expect(subject.status).to eq(:registered) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(false) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(true) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to be_a(Time) - expect(subject.created_on).to eq(DateTime.parse("2004-05-18 22:00:00 UTC")) - end - end - describe "#updated_on" do - it do - expect(subject.updated_on).to eq(nil) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to be_a(Time) - expect(subject.expires_on).to eq(DateTime.parse("2014-05-18 22:00:00 UTC")) - end - end - describe "#registrar" do - it do - expect(subject.registrar).to be_a(Whois::Parser::Registrar) - expect(subject.registrar.id).to eq(nil) - expect(subject.registrar.name).to eq("MarkMonitor Inc.") - expect(subject.registrar.url).to eq(nil) - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers.size).to eq(3) - expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[0].name).to eq("ns1.google.com") - expect(subject.nameservers[0].ipv4).to eq(nil) - expect(subject.nameservers[0].ipv6).to eq(nil) - expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[1].name).to eq("ns2.google.com") - expect(subject.nameservers[1].ipv4).to eq(nil) - expect(subject.nameservers[1].ipv6).to eq(nil) - expect(subject.nameservers[2]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[2].name).to eq("ns3.google.com") - expect(subject.nameservers[2].ipv4).to eq(nil) - expect(subject.nameservers[2].ipv6).to eq(nil) - end + it "matches status_registered.expected" do + expect(subject.domain).to eq("google.ps") + expect(subject.domain_id).to eq("21665-PS") + expect(subject.status).to eq(:registered) + expect(subject.available?).to eq(false) + expect(subject.registered?).to eq(true) + expect(subject.created_on).to be_a(Time) + expect(subject.created_on).to eq(DateTime.parse("2004-05-18 22:00:00 UTC")) + expect(subject.updated_on).to eq(nil) + expect(subject.expires_on).to be_a(Time) + expect(subject.expires_on).to eq(DateTime.parse("2014-05-18 22:00:00 UTC")) + expect(subject.registrar).to be_a(Whois::Parser::Registrar) + expect(subject.registrar.id).to eq(nil) + expect(subject.registrar.name).to eq("MarkMonitor Inc.") + expect(subject.registrar.url).to eq(nil) + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers.size).to eq(3) + expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[0].name).to eq("ns1.google.com") + expect(subject.nameservers[0].ipv4).to eq(nil) + expect(subject.nameservers[0].ipv6).to eq(nil) + expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[1].name).to eq("ns2.google.com") + expect(subject.nameservers[1].ipv4).to eq(nil) + expect(subject.nameservers[1].ipv6).to eq(nil) + expect(subject.nameservers[2]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[2].name).to eq("ns3.google.com") + expect(subject.nameservers[2].ipv4).to eq(nil) + expect(subject.nameservers[2].ipv6).to eq(nil) end end diff --git a/spec/whois/parsers/responses/whois.register.bg/bg/property_nameservers_with_ip_spec.rb b/spec/whois/parsers/responses/whois.register.bg/bg/property_nameservers_with_ip_spec.rb index df6f8983..d1efa19a 100644 --- a/spec/whois/parsers/responses/whois.register.bg/bg/property_nameservers_with_ip_spec.rb +++ b/spec/whois/parsers/responses/whois.register.bg/bg/property_nameservers_with_ip_spec.rb @@ -11,26 +11,23 @@ # require 'spec_helper' -require 'whois/parsers/whois.register.bg.rb' -describe Whois::Parsers::WhoisRegisterBg, "property_nameservers_with_ip.expected" do +describe "whois.register.bg", :aggregate_failures do subject do file = fixture("responses", "whois.register.bg/bg/property_nameservers_with_ip.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.register.bg") + Whois::Parser.parser_for(part) end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers.size).to eq(2) - expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[0].name).to eq("chicken.orbitel.bg") - expect(subject.nameservers[0].ipv4).to eq("195.24.32.5") - expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[1].name).to eq("ns.orbitel.bg") - expect(subject.nameservers[1].ipv4).to eq("195.24.32.2") - end + it "matches property_nameservers_with_ip.expected" do + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers.size).to eq(2) + expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[0].name).to eq("chicken.orbitel.bg") + expect(subject.nameservers[0].ipv4).to eq("195.24.32.5") + expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[1].name).to eq("ns.orbitel.bg") + expect(subject.nameservers[1].ipv4).to eq("195.24.32.2") end end diff --git a/spec/whois/parsers/responses/whois.register.bg/bg/status_available_spec.rb b/spec/whois/parsers/responses/whois.register.bg/bg/status_available_spec.rb index 1a5479c8..2ace5602 100644 --- a/spec/whois/parsers/responses/whois.register.bg/bg/status_available_spec.rb +++ b/spec/whois/parsers/responses/whois.register.bg/bg/status_available_spec.rb @@ -11,50 +11,23 @@ # require 'spec_helper' -require 'whois/parsers/whois.register.bg.rb' -describe Whois::Parsers::WhoisRegisterBg, "status_available.expected" do +describe "whois.register.bg", :aggregate_failures do subject do file = fixture("responses", "whois.register.bg/bg/status_available.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.register.bg") + Whois::Parser.parser_for(part) end - describe "#status" do - it do - expect(subject.status).to eq(:available) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(true) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(false) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to eq(nil) - end - end - describe "#updated_on" do - it do - expect { subject.updated_on }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to eq(nil) - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers).to eq([]) - end + it "matches status_available.expected" do + expect(subject.status).to eq(:available) + expect(subject.available?).to eq(true) + expect(subject.registered?).to eq(false) + expect(subject.created_on).to eq(nil) + expect { subject.updated_on }.to raise_error(Whois::AttributeNotSupported) + expect(subject.expires_on).to eq(nil) + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers).to eq([]) end end diff --git a/spec/whois/parsers/responses/whois.register.bg/bg/status_registered_spec.rb b/spec/whois/parsers/responses/whois.register.bg/bg/status_registered_spec.rb index 39ae6429..6b3e5f13 100644 --- a/spec/whois/parsers/responses/whois.register.bg/bg/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.register.bg/bg/status_registered_spec.rb @@ -11,60 +11,33 @@ # require 'spec_helper' -require 'whois/parsers/whois.register.bg.rb' -describe Whois::Parsers::WhoisRegisterBg, "status_registered.expected" do +describe "whois.register.bg", :aggregate_failures do subject do file = fixture("responses", "whois.register.bg/bg/status_registered.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.register.bg") + Whois::Parser.parser_for(part) end - describe "#status" do - it do - expect(subject.status).to eq(:registered) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(false) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(true) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to be_a(Time) - expect(subject.created_on).to eq(DateTime.parse("2003-06-30 00:00:00 EEST")) - end - end - describe "#updated_on" do - it do - expect { subject.updated_on }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to be_a(Time) - expect(subject.expires_on).to eq(DateTime.parse("2014-06-30 00:00:00 EEST")) - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers.size).to eq(4) - expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[0].name).to eq("ns4.google.com") - expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[1].name).to eq("ns1.google.com") - expect(subject.nameservers[2]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[2].name).to eq("ns3.google.com") - expect(subject.nameservers[3]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[3].name).to eq("ns2.google.com") - end + it "matches status_registered.expected" do + expect(subject.status).to eq(:registered) + expect(subject.available?).to eq(false) + expect(subject.registered?).to eq(true) + expect(subject.created_on).to be_a(Time) + expect(subject.created_on).to eq(DateTime.parse("2003-06-30 00:00:00 EEST")) + expect { subject.updated_on }.to raise_error(Whois::AttributeNotSupported) + expect(subject.expires_on).to be_a(Time) + expect(subject.expires_on).to eq(DateTime.parse("2014-06-30 00:00:00 EEST")) + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers.size).to eq(4) + expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[0].name).to eq("ns4.google.com") + expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[1].name).to eq("ns1.google.com") + expect(subject.nameservers[2]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[2].name).to eq("ns3.google.com") + expect(subject.nameservers[3]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[3].name).to eq("ns2.google.com") end end diff --git a/spec/whois/parsers/responses/whois.register.com/registered_without_updated_on_spec.rb b/spec/whois/parsers/responses/whois.register.com/registered_without_updated_on_spec.rb index 27953d85..b20fc5da 100644 --- a/spec/whois/parsers/responses/whois.register.com/registered_without_updated_on_spec.rb +++ b/spec/whois/parsers/responses/whois.register.com/registered_without_updated_on_spec.rb @@ -11,19 +11,16 @@ # require 'spec_helper' -require 'whois/parsers/whois.register.com.rb' -describe Whois::Parsers::WhoisRegisterCom, "registered_without_updated_on.expected" do +describe "whois.register.com", :aggregate_failures do subject do file = fixture("responses", "whois.register.com/registered_without_updated_on.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.register.com") + Whois::Parser.parser_for(part) end - describe "#updated_on" do - it do - expect(subject.updated_on).to eq(nil) - end + it "matches registered_without_updated_on.expected" do + expect(subject.updated_on).to eq(nil) end end diff --git a/spec/whois/parsers/responses/whois.register.com/status_registered_spec.rb b/spec/whois/parsers/responses/whois.register.com/status_registered_spec.rb index f2a22776..e63da86a 100644 --- a/spec/whois/parsers/responses/whois.register.com/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.register.com/status_registered_spec.rb @@ -11,137 +11,86 @@ # require 'spec_helper' -require 'whois/parsers/whois.register.com.rb' -describe Whois::Parsers::WhoisRegisterCom, "status_registered.expected" do +describe "whois.register.com", :aggregate_failures do subject do file = fixture("responses", "whois.register.com/status_registered.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.register.com") + Whois::Parser.parser_for(part) end - describe "#domain" do - it do - expect(subject.domain).to eq("register.com") - end - end - describe "#domain_id" do - it do - expect(subject.domain_id).to eq("") - end - end - describe "#status" do - it do - expect(subject.status).to eq(:registered) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(false) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(true) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to be_a(Time) - expect(subject.created_on).to eq(DateTime.parse("1994-11-01T00:00:00-0500")) - end - end - describe "#updated_on" do - it do - expect(subject.updated_on).to be_a(Time) - expect(subject.updated_on).to eq(DateTime.parse("2009-08-26T00:00:00-0400")) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to be_a(Time) - expect(subject.expires_on).to eq(DateTime.parse("2019-08-04T00:00:00-0400")) - end - end - describe "#registrar" do - it do - expect(subject.registrar).to be_a(Whois::Parser::Registrar) - expect(subject.registrar.id).to eq("9") - expect(subject.registrar.name).to eq("Register.com") - expect(subject.registrar.url).to eq("http://www.register.com") - end - end - describe "#registrant_contacts" do - it do - expect(subject.registrant_contacts).to be_a(Array) - expect(subject.registrant_contacts.size).to eq(1) - expect(subject.registrant_contacts[0]).to be_a(Whois::Parser::Contact) - expect(subject.registrant_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_REGISTRANT) - expect(subject.registrant_contacts[0].name).to eq("Domain Registrar") - expect(subject.registrant_contacts[0].organization).to eq("Register.Com, Inc.") - expect(subject.registrant_contacts[0].address).to eq("575 8th Avenue") - expect(subject.registrant_contacts[0].city).to eq("New York") - expect(subject.registrant_contacts[0].zip).to eq("10018") - expect(subject.registrant_contacts[0].state).to eq("NY") - expect(subject.registrant_contacts[0].country_code).to eq("US") - expect(subject.registrant_contacts[0].phone).to eq("+1.9027492701") - expect(subject.registrant_contacts[0].fax).to eq("") - expect(subject.registrant_contacts[0].email).to eq("domainregistrar@register.com") - end - end - describe "#admin_contacts" do - it do - expect(subject.admin_contacts).to be_a(Array) - expect(subject.admin_contacts.size).to eq(1) - expect(subject.admin_contacts[0]).to be_a(Whois::Parser::Contact) - expect(subject.admin_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_ADMINISTRATIVE) - expect(subject.admin_contacts[0].name).to eq("Domain Registrar") - expect(subject.admin_contacts[0].organization).to eq("Register.Com, Inc.") - expect(subject.admin_contacts[0].address).to eq("575 8th Avenue") - expect(subject.admin_contacts[0].city).to eq("New York") - expect(subject.admin_contacts[0].zip).to eq("10018") - expect(subject.admin_contacts[0].state).to eq("NY") - expect(subject.admin_contacts[0].country_code).to eq("US") - expect(subject.admin_contacts[0].phone).to eq("+1.9027492701") - expect(subject.admin_contacts[0].fax).to eq("") - expect(subject.admin_contacts[0].email).to eq("domainregistrar@register.com") - end - end - describe "#technical_contacts" do - it do - expect(subject.technical_contacts).to be_a(Array) - expect(subject.technical_contacts.size).to eq(1) - expect(subject.technical_contacts[0]).to be_a(Whois::Parser::Contact) - expect(subject.technical_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_TECHNICAL) - expect(subject.technical_contacts[0].name).to eq("Domain Registrar") - expect(subject.technical_contacts[0].organization).to eq("Register.Com, Inc.") - expect(subject.technical_contacts[0].address).to eq("575 8th Avenue") - expect(subject.technical_contacts[0].city).to eq("New York") - expect(subject.technical_contacts[0].zip).to eq("10018") - expect(subject.technical_contacts[0].state).to eq("NY") - expect(subject.technical_contacts[0].country_code).to eq("US") - expect(subject.technical_contacts[0].phone).to eq("+1.9027492701") - expect(subject.technical_contacts[0].fax).to eq("") - expect(subject.technical_contacts[0].email).to eq("domainregistrar@register.com") - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers.size).to eq(6) - expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[0].name).to eq("ns2.register.com") - expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[1].name).to eq("ns3.register.com") - expect(subject.nameservers[2]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[2].name).to eq("ns4.register.com") - expect(subject.nameservers[3]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[3].name).to eq("ns5.register.com") - expect(subject.nameservers[4]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[4].name).to eq("ns6.register.com") - expect(subject.nameservers[5]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[5].name).to eq("ns1.register.com") - end + it "matches status_registered.expected" do + expect(subject.domain).to eq("register.com") + expect(subject.domain_id).to eq("") + expect(subject.status).to eq(:registered) + expect(subject.available?).to eq(false) + expect(subject.registered?).to eq(true) + expect(subject.created_on).to be_a(Time) + expect(subject.created_on).to eq(DateTime.parse("1994-11-01T00:00:00-0500")) + expect(subject.updated_on).to be_a(Time) + expect(subject.updated_on).to eq(DateTime.parse("2009-08-26T00:00:00-0400")) + expect(subject.expires_on).to be_a(Time) + expect(subject.expires_on).to eq(DateTime.parse("2019-08-04T00:00:00-0400")) + expect(subject.registrar).to be_a(Whois::Parser::Registrar) + expect(subject.registrar.id).to eq("9") + expect(subject.registrar.name).to eq("Register.com") + expect(subject.registrar.url).to eq("http://www.register.com") + expect(subject.registrant_contacts).to be_a(Array) + expect(subject.registrant_contacts.size).to eq(1) + expect(subject.registrant_contacts[0]).to be_a(Whois::Parser::Contact) + expect(subject.registrant_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_REGISTRANT) + expect(subject.registrant_contacts[0].name).to eq("Domain Registrar") + expect(subject.registrant_contacts[0].organization).to eq("Register.Com, Inc.") + expect(subject.registrant_contacts[0].address).to eq("575 8th Avenue") + expect(subject.registrant_contacts[0].city).to eq("New York") + expect(subject.registrant_contacts[0].zip).to eq("10018") + expect(subject.registrant_contacts[0].state).to eq("NY") + expect(subject.registrant_contacts[0].country_code).to eq("US") + expect(subject.registrant_contacts[0].phone).to eq("+1.9027492701") + expect(subject.registrant_contacts[0].fax).to eq("") + expect(subject.registrant_contacts[0].email).to eq("domainregistrar@register.com") + expect(subject.admin_contacts).to be_a(Array) + expect(subject.admin_contacts.size).to eq(1) + expect(subject.admin_contacts[0]).to be_a(Whois::Parser::Contact) + expect(subject.admin_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_ADMINISTRATIVE) + expect(subject.admin_contacts[0].name).to eq("Domain Registrar") + expect(subject.admin_contacts[0].organization).to eq("Register.Com, Inc.") + expect(subject.admin_contacts[0].address).to eq("575 8th Avenue") + expect(subject.admin_contacts[0].city).to eq("New York") + expect(subject.admin_contacts[0].zip).to eq("10018") + expect(subject.admin_contacts[0].state).to eq("NY") + expect(subject.admin_contacts[0].country_code).to eq("US") + expect(subject.admin_contacts[0].phone).to eq("+1.9027492701") + expect(subject.admin_contacts[0].fax).to eq("") + expect(subject.admin_contacts[0].email).to eq("domainregistrar@register.com") + expect(subject.technical_contacts).to be_a(Array) + expect(subject.technical_contacts.size).to eq(1) + expect(subject.technical_contacts[0]).to be_a(Whois::Parser::Contact) + expect(subject.technical_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_TECHNICAL) + expect(subject.technical_contacts[0].name).to eq("Domain Registrar") + expect(subject.technical_contacts[0].organization).to eq("Register.Com, Inc.") + expect(subject.technical_contacts[0].address).to eq("575 8th Avenue") + expect(subject.technical_contacts[0].city).to eq("New York") + expect(subject.technical_contacts[0].zip).to eq("10018") + expect(subject.technical_contacts[0].state).to eq("NY") + expect(subject.technical_contacts[0].country_code).to eq("US") + expect(subject.technical_contacts[0].phone).to eq("+1.9027492701") + expect(subject.technical_contacts[0].fax).to eq("") + expect(subject.technical_contacts[0].email).to eq("domainregistrar@register.com") + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers.size).to eq(6) + expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[0].name).to eq("ns2.register.com") + expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[1].name).to eq("ns3.register.com") + expect(subject.nameservers[2]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[2].name).to eq("ns4.register.com") + expect(subject.nameservers[3]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[3].name).to eq("ns5.register.com") + expect(subject.nameservers[4]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[4].name).to eq("ns6.register.com") + expect(subject.nameservers[5]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[5].name).to eq("ns1.register.com") end end diff --git a/spec/whois/parsers/responses/whois.register.si/si/status_available_spec.rb b/spec/whois/parsers/responses/whois.register.si/si/status_available_spec.rb index 267074f9..d9ab4c35 100644 --- a/spec/whois/parsers/responses/whois.register.si/si/status_available_spec.rb +++ b/spec/whois/parsers/responses/whois.register.si/si/status_available_spec.rb @@ -11,50 +11,23 @@ # require 'spec_helper' -require 'whois/parsers/whois.register.si.rb' -describe Whois::Parsers::WhoisRegisterSi, "status_available.expected" do +describe "whois.register.si", :aggregate_failures do subject do file = fixture("responses", "whois.register.si/si/status_available.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.register.si") + Whois::Parser.parser_for(part) end - describe "#status" do - it do - expect(subject.status).to eq(:available) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(true) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(false) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to eq(nil) - end - end - describe "#updated_on" do - it do - expect { subject.updated_on }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to eq(nil) - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers).to eq([]) - end + it "matches status_available.expected" do + expect(subject.status).to eq(:available) + expect(subject.available?).to eq(true) + expect(subject.registered?).to eq(false) + expect(subject.created_on).to eq(nil) + expect { subject.updated_on }.to raise_error(Whois::AttributeNotSupported) + expect(subject.expires_on).to eq(nil) + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers).to eq([]) end end diff --git a/spec/whois/parsers/responses/whois.register.si/si/status_registered_spec.rb b/spec/whois/parsers/responses/whois.register.si/si/status_registered_spec.rb index 335f2025..a4c590f8 100644 --- a/spec/whois/parsers/responses/whois.register.si/si/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.register.si/si/status_registered_spec.rb @@ -11,60 +11,33 @@ # require 'spec_helper' -require 'whois/parsers/whois.register.si.rb' -describe Whois::Parsers::WhoisRegisterSi, "status_registered.expected" do +describe "whois.register.si", :aggregate_failures do subject do file = fixture("responses", "whois.register.si/si/status_registered.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.register.si") + Whois::Parser.parser_for(part) end - describe "#status" do - it do - expect(subject.status).to eq(:registered) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(false) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(true) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to be_a(Time) - expect(subject.created_on).to eq(DateTime.parse("2005-04-04")) - end - end - describe "#updated_on" do - it do - expect { subject.updated_on }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to be_a(Time) - expect(subject.expires_on).to eq(DateTime.parse("2015-07-19")) - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers.size).to eq(4) - expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[0].name).to eq("ns1.google.com") - expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[1].name).to eq("ns2.google.com") - expect(subject.nameservers[2]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[2].name).to eq("ns3.google.com") - expect(subject.nameservers[3]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[3].name).to eq("ns4.google.com") - end + it "matches status_registered.expected" do + expect(subject.status).to eq(:registered) + expect(subject.available?).to eq(false) + expect(subject.registered?).to eq(true) + expect(subject.created_on).to be_a(Time) + expect(subject.created_on).to eq(DateTime.parse("2005-04-04")) + expect { subject.updated_on }.to raise_error(Whois::AttributeNotSupported) + expect(subject.expires_on).to be_a(Time) + expect(subject.expires_on).to eq(DateTime.parse("2015-07-19")) + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers.size).to eq(4) + expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[0].name).to eq("ns1.google.com") + expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[1].name).to eq("ns2.google.com") + expect(subject.nameservers[2]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[2].name).to eq("ns3.google.com") + expect(subject.nameservers[3]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[3].name).to eq("ns4.google.com") end end diff --git a/spec/whois/parsers/responses/whois.registre.ma/ma/status_available_spec.rb b/spec/whois/parsers/responses/whois.registre.ma/ma/status_available_spec.rb index 8e1e4d02..d6c1224b 100644 --- a/spec/whois/parsers/responses/whois.registre.ma/ma/status_available_spec.rb +++ b/spec/whois/parsers/responses/whois.registre.ma/ma/status_available_spec.rb @@ -11,44 +11,21 @@ # require 'spec_helper' -require 'whois/parsers/whois.registre.ma.rb' -describe Whois::Parsers::WhoisRegistreMa, "status_available.expected" do +describe "whois.registre.ma", :aggregate_failures do subject do file = fixture("responses", "whois.registre.ma/ma/status_available.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.registre.ma") + Whois::Parser.parser_for(part) end - describe "#status" do - it do - expect(subject.status).to eq(:available) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(true) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(false) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to eq(nil) - end - end - describe "#updated_on" do - it do - expect(subject.updated_on).to eq(nil) - end - end - describe "#expires_on" do - it do - expect { subject.expires_on }.to raise_error(Whois::AttributeNotSupported) - end + it "matches status_available.expected" do + expect(subject.status).to eq(:available) + expect(subject.available?).to eq(true) + expect(subject.registered?).to eq(false) + expect(subject.created_on).to eq(nil) + expect(subject.updated_on).to eq(nil) + expect { subject.expires_on }.to raise_error(Whois::AttributeNotSupported) end end diff --git a/spec/whois/parsers/responses/whois.registre.ma/ma/status_registered_spec.rb b/spec/whois/parsers/responses/whois.registre.ma/ma/status_registered_spec.rb index 66ec6b84..fee70094 100644 --- a/spec/whois/parsers/responses/whois.registre.ma/ma/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.registre.ma/ma/status_registered_spec.rb @@ -11,46 +11,23 @@ # require 'spec_helper' -require 'whois/parsers/whois.registre.ma.rb' -describe Whois::Parsers::WhoisRegistreMa, "status_registered.expected" do +describe "whois.registre.ma", :aggregate_failures do subject do file = fixture("responses", "whois.registre.ma/ma/status_registered.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.registre.ma") + Whois::Parser.parser_for(part) end - describe "#status" do - it do - expect(subject.status).to eq(:registered) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(false) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(true) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to be_a(Time) - expect(subject.created_on).to eq(DateTime.parse("2009-03-24")) - end - end - describe "#updated_on" do - it do - expect(subject.updated_on).to be_a(Time) - expect(subject.updated_on).to eq(DateTime.parse("2009-03-24")) - end - end - describe "#expires_on" do - it do - expect { subject.expires_on }.to raise_error(Whois::AttributeNotSupported) - end + it "matches status_registered.expected" do + expect(subject.status).to eq(:registered) + expect(subject.available?).to eq(false) + expect(subject.registered?).to eq(true) + expect(subject.created_on).to be_a(Time) + expect(subject.created_on).to eq(DateTime.parse("2009-03-24")) + expect(subject.updated_on).to be_a(Time) + expect(subject.updated_on).to eq(DateTime.parse("2009-03-24")) + expect { subject.expires_on }.to raise_error(Whois::AttributeNotSupported) end end diff --git a/spec/whois/parsers/responses/whois.registro.br/br/property_nameservers_with_ip_spec.rb b/spec/whois/parsers/responses/whois.registro.br/br/property_nameservers_with_ip_spec.rb index a98c0b6b..a9cac879 100644 --- a/spec/whois/parsers/responses/whois.registro.br/br/property_nameservers_with_ip_spec.rb +++ b/spec/whois/parsers/responses/whois.registro.br/br/property_nameservers_with_ip_spec.rb @@ -11,32 +11,29 @@ # require 'spec_helper' -require 'whois/parsers/whois.registro.br.rb' -describe Whois::Parsers::WhoisRegistroBr, "property_nameservers_with_ip.expected" do +describe "whois.registro.br", :aggregate_failures do subject do file = fixture("responses", "whois.registro.br/br/property_nameservers_with_ip.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.registro.br") + Whois::Parser.parser_for(part) end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers.size).to eq(4) - expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[0].name).to eq("ns1.hostgator.com.br") - expect(subject.nameservers[0].ipv4).to eq("74.53.28.178") - expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[1].name).to eq("ns2.hostgator.com.br") - expect(subject.nameservers[1].ipv4).to eq("74.53.28.179") - expect(subject.nameservers[2]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[2].name).to eq("ns3.hostgator.com.br") - expect(subject.nameservers[2].ipv4).to eq("174.133.202.50") - expect(subject.nameservers[3]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[3].name).to eq("ns4.hostgator.com.br") - expect(subject.nameservers[3].ipv4).to eq("174.133.202.51") - end + it "matches property_nameservers_with_ip.expected" do + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers.size).to eq(4) + expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[0].name).to eq("ns1.hostgator.com.br") + expect(subject.nameservers[0].ipv4).to eq("74.53.28.178") + expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[1].name).to eq("ns2.hostgator.com.br") + expect(subject.nameservers[1].ipv4).to eq("74.53.28.179") + expect(subject.nameservers[2]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[2].name).to eq("ns3.hostgator.com.br") + expect(subject.nameservers[2].ipv4).to eq("174.133.202.50") + expect(subject.nameservers[3]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[3].name).to eq("ns4.hostgator.com.br") + expect(subject.nameservers[3].ipv4).to eq("174.133.202.51") end end diff --git a/spec/whois/parsers/responses/whois.registro.br/br/status_available_limited_spec.rb b/spec/whois/parsers/responses/whois.registro.br/br/status_available_limited_spec.rb index a1c1d5b4..76279c3f 100644 --- a/spec/whois/parsers/responses/whois.registro.br/br/status_available_limited_spec.rb +++ b/spec/whois/parsers/responses/whois.registro.br/br/status_available_limited_spec.rb @@ -11,24 +11,17 @@ # require 'spec_helper' -require 'whois/parsers/whois.registro.br.rb' -describe Whois::Parsers::WhoisRegistroBr, "status_available_limited.expected" do +describe "whois.registro.br", :aggregate_failures do subject do file = fixture("responses", "whois.registro.br/br/status_available_limited.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.registro.br") + Whois::Parser.parser_for(part) end - describe "#available?" do - it do - expect(subject.available?).to eq(true) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(false) - end + it "matches status_available_limited.expected" do + expect(subject.available?).to eq(true) + expect(subject.registered?).to eq(false) end end diff --git a/spec/whois/parsers/responses/whois.registro.br/br/status_available_spec.rb b/spec/whois/parsers/responses/whois.registro.br/br/status_available_spec.rb index afd33ca4..f794aea1 100644 --- a/spec/whois/parsers/responses/whois.registro.br/br/status_available_spec.rb +++ b/spec/whois/parsers/responses/whois.registro.br/br/status_available_spec.rb @@ -11,55 +11,24 @@ # require 'spec_helper' -require 'whois/parsers/whois.registro.br.rb' -describe Whois::Parsers::WhoisRegistroBr, "status_available.expected" do +describe "whois.registro.br", :aggregate_failures do subject do file = fixture("responses", "whois.registro.br/br/status_available.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.registro.br") + Whois::Parser.parser_for(part) end - describe "#domain" do - it do - expect(subject.domain).to eq("u34jedzcq.br") - end - end - describe "#status" do - it do - expect(subject.status).to eq(:available) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(true) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(false) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to eq(nil) - end - end - describe "#updated_on" do - it do - expect(subject.updated_on).to eq(nil) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to eq(nil) - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers).to eq([]) - end + it "matches status_available.expected" do + expect(subject.domain).to eq("u34jedzcq.br") + expect(subject.status).to eq(:available) + expect(subject.available?).to eq(true) + expect(subject.registered?).to eq(false) + expect(subject.created_on).to eq(nil) + expect(subject.updated_on).to eq(nil) + expect(subject.expires_on).to eq(nil) + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers).to eq([]) end end diff --git a/spec/whois/parsers/responses/whois.registro.br/br/status_registered_limited_spec.rb b/spec/whois/parsers/responses/whois.registro.br/br/status_registered_limited_spec.rb index faee0695..06324a9b 100644 --- a/spec/whois/parsers/responses/whois.registro.br/br/status_registered_limited_spec.rb +++ b/spec/whois/parsers/responses/whois.registro.br/br/status_registered_limited_spec.rb @@ -11,24 +11,17 @@ # require 'spec_helper' -require 'whois/parsers/whois.registro.br.rb' -describe Whois::Parsers::WhoisRegistroBr, "status_registered_limited.expected" do +describe "whois.registro.br", :aggregate_failures do subject do file = fixture("responses", "whois.registro.br/br/status_registered_limited.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.registro.br") + Whois::Parser.parser_for(part) end - describe "#available?" do - it do - expect(subject.available?).to eq(false) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(true) - end + it "matches status_registered_limited.expected" do + expect(subject.available?).to eq(false) + expect(subject.registered?).to eq(true) end end diff --git a/spec/whois/parsers/responses/whois.registro.br/br/status_registered_spec.rb b/spec/whois/parsers/responses/whois.registro.br/br/status_registered_spec.rb index 14e6e55b..464f8ec1 100644 --- a/spec/whois/parsers/responses/whois.registro.br/br/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.registro.br/br/status_registered_spec.rb @@ -11,132 +11,89 @@ # require 'spec_helper' -require 'whois/parsers/whois.registro.br.rb' -describe Whois::Parsers::WhoisRegistroBr, "status_registered.expected" do +describe "whois.registro.br", :aggregate_failures do subject do file = fixture("responses", "whois.registro.br/br/status_registered.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.registro.br") + Whois::Parser.parser_for(part) end - describe "#domain" do - it do - expect(subject.domain).to eq("google.com.br") - end - end - describe "#status" do - it do - expect(subject.status).to eq(:registered) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(false) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(true) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to be_a(Time) - expect(subject.created_on).to eq(DateTime.parse("1999-05-18")) - end - end - describe "#updated_on" do - it do - expect(subject.updated_on).to be_a(Time) - expect(subject.updated_on).to eq(DateTime.parse("2017-04-27")) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to be_a(Time) - expect(subject.expires_on).to eq(DateTime.parse("2018-05-18")) - end - end - describe "#registrant_contacts" do - it do - expect(subject.registrant_contacts).to be_a(Array) - expect(subject.registrant_contacts.size).to eq(1) - expect(subject.registrant_contacts[0]).to be_a(Whois::Parser::Contact) - expect(subject.registrant_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_REGISTRANT) - expect(subject.registrant_contacts[0].id).to eq("DOADM17") - expect(subject.registrant_contacts[0].name).to eq("Domain Admin") - expect(subject.registrant_contacts[0].organization).to eq(nil) - expect(subject.registrant_contacts[0].address).to eq(nil) - expect(subject.registrant_contacts[0].city).to eq(nil) - expect(subject.registrant_contacts[0].state).to eq(nil) - expect(subject.registrant_contacts[0].zip).to eq(nil) - expect(subject.registrant_contacts[0].country).to eq(nil) - expect(subject.registrant_contacts[0].country_code).to eq(nil) - expect(subject.registrant_contacts[0].phone).to eq(nil) - expect(subject.registrant_contacts[0].fax).to eq(nil) - expect(subject.registrant_contacts[0].email).to eq("ccops@markmonitor.com") - expect(subject.registrant_contacts[0].created_on).to eq(DateTime.parse("2010-05-20 00:00:00 UTC")) - expect(subject.registrant_contacts[0].updated_on).to eq(DateTime.parse("2017-01-03 00:00:00 UTC")) - end - end - describe "#admin_contacts" do - it do - expect(subject.admin_contacts).to be_a(Array) - expect(subject.admin_contacts.size).to eq(1) - expect(subject.admin_contacts[0]).to be_a(Whois::Parser::Contact) - expect(subject.admin_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_ADMINISTRATIVE) - expect(subject.admin_contacts[0].id).to eq("DOADM17") - expect(subject.admin_contacts[0].name).to eq("Domain Admin") - expect(subject.admin_contacts[0].organization).to eq(nil) - expect(subject.admin_contacts[0].address).to eq(nil) - expect(subject.admin_contacts[0].city).to eq(nil) - expect(subject.admin_contacts[0].state).to eq(nil) - expect(subject.admin_contacts[0].zip).to eq(nil) - expect(subject.admin_contacts[0].country).to eq(nil) - expect(subject.admin_contacts[0].country_code).to eq(nil) - expect(subject.admin_contacts[0].phone).to eq(nil) - expect(subject.admin_contacts[0].fax).to eq(nil) - expect(subject.admin_contacts[0].email).to eq("ccops@markmonitor.com") - expect(subject.admin_contacts[0].created_on).to eq(DateTime.parse("2010-05-20 00:00:00 UTC")) - expect(subject.admin_contacts[0].updated_on).to eq(DateTime.parse("2017-01-03 00:00:00 UTC")) - end - end - describe "#technical_contacts" do - it do - expect(subject.technical_contacts).to be_a(Array) - expect(subject.technical_contacts.size).to eq(1) - expect(subject.technical_contacts[0]).to be_a(Whois::Parser::Contact) - expect(subject.technical_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_TECHNICAL) - expect(subject.technical_contacts[0].id).to eq("DOADM17") - expect(subject.technical_contacts[0].name).to eq("Domain Admin") - expect(subject.technical_contacts[0].organization).to eq(nil) - expect(subject.technical_contacts[0].address).to eq(nil) - expect(subject.technical_contacts[0].city).to eq(nil) - expect(subject.technical_contacts[0].state).to eq(nil) - expect(subject.technical_contacts[0].zip).to eq(nil) - expect(subject.technical_contacts[0].country).to eq(nil) - expect(subject.technical_contacts[0].country_code).to eq(nil) - expect(subject.technical_contacts[0].phone).to eq(nil) - expect(subject.technical_contacts[0].fax).to eq(nil) - expect(subject.technical_contacts[0].email).to eq("ccops@markmonitor.com") - expect(subject.technical_contacts[0].created_on).to eq(DateTime.parse("2010-05-20 00:00:00 UTC")) - expect(subject.technical_contacts[0].updated_on).to eq(DateTime.parse("2017-01-03 00:00:00 UTC")) - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers.size).to eq(4) - expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[0].name).to eq("ns1.google.com") - expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[1].name).to eq("ns2.google.com") - expect(subject.nameservers[2]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[2].name).to eq("ns3.google.com") - expect(subject.nameservers[3]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[3].name).to eq("ns4.google.com") - end + it "matches status_registered.expected" do + expect(subject.domain).to eq("google.com.br") + expect(subject.status).to eq(:registered) + expect(subject.available?).to eq(false) + expect(subject.registered?).to eq(true) + expect(subject.created_on).to be_a(Time) + expect(subject.created_on).to eq(DateTime.parse("1999-05-18")) + expect(subject.updated_on).to be_a(Time) + expect(subject.updated_on).to eq(DateTime.parse("2017-04-27")) + expect(subject.expires_on).to be_a(Time) + expect(subject.expires_on).to eq(DateTime.parse("2018-05-18")) + expect(subject.registrant_contacts).to be_a(Array) + expect(subject.registrant_contacts.size).to eq(1) + expect(subject.registrant_contacts[0]).to be_a(Whois::Parser::Contact) + expect(subject.registrant_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_REGISTRANT) + expect(subject.registrant_contacts[0].id).to eq("DOADM17") + expect(subject.registrant_contacts[0].name).to eq("Domain Admin") + expect(subject.registrant_contacts[0].organization).to eq(nil) + expect(subject.registrant_contacts[0].address).to eq(nil) + expect(subject.registrant_contacts[0].city).to eq(nil) + expect(subject.registrant_contacts[0].state).to eq(nil) + expect(subject.registrant_contacts[0].zip).to eq(nil) + expect(subject.registrant_contacts[0].country).to eq(nil) + expect(subject.registrant_contacts[0].country_code).to eq(nil) + expect(subject.registrant_contacts[0].phone).to eq(nil) + expect(subject.registrant_contacts[0].fax).to eq(nil) + expect(subject.registrant_contacts[0].email).to eq("ccops@markmonitor.com") + expect(subject.registrant_contacts[0].created_on).to eq(DateTime.parse("2010-05-20 00:00:00 UTC")) + expect(subject.registrant_contacts[0].updated_on).to eq(DateTime.parse("2017-01-03 00:00:00 UTC")) + expect(subject.admin_contacts).to be_a(Array) + expect(subject.admin_contacts.size).to eq(1) + expect(subject.admin_contacts[0]).to be_a(Whois::Parser::Contact) + expect(subject.admin_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_ADMINISTRATIVE) + expect(subject.admin_contacts[0].id).to eq("DOADM17") + expect(subject.admin_contacts[0].name).to eq("Domain Admin") + expect(subject.admin_contacts[0].organization).to eq(nil) + expect(subject.admin_contacts[0].address).to eq(nil) + expect(subject.admin_contacts[0].city).to eq(nil) + expect(subject.admin_contacts[0].state).to eq(nil) + expect(subject.admin_contacts[0].zip).to eq(nil) + expect(subject.admin_contacts[0].country).to eq(nil) + expect(subject.admin_contacts[0].country_code).to eq(nil) + expect(subject.admin_contacts[0].phone).to eq(nil) + expect(subject.admin_contacts[0].fax).to eq(nil) + expect(subject.admin_contacts[0].email).to eq("ccops@markmonitor.com") + expect(subject.admin_contacts[0].created_on).to eq(DateTime.parse("2010-05-20 00:00:00 UTC")) + expect(subject.admin_contacts[0].updated_on).to eq(DateTime.parse("2017-01-03 00:00:00 UTC")) + expect(subject.technical_contacts).to be_a(Array) + expect(subject.technical_contacts.size).to eq(1) + expect(subject.technical_contacts[0]).to be_a(Whois::Parser::Contact) + expect(subject.technical_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_TECHNICAL) + expect(subject.technical_contacts[0].id).to eq("DOADM17") + expect(subject.technical_contacts[0].name).to eq("Domain Admin") + expect(subject.technical_contacts[0].organization).to eq(nil) + expect(subject.technical_contacts[0].address).to eq(nil) + expect(subject.technical_contacts[0].city).to eq(nil) + expect(subject.technical_contacts[0].state).to eq(nil) + expect(subject.technical_contacts[0].zip).to eq(nil) + expect(subject.technical_contacts[0].country).to eq(nil) + expect(subject.technical_contacts[0].country_code).to eq(nil) + expect(subject.technical_contacts[0].phone).to eq(nil) + expect(subject.technical_contacts[0].fax).to eq(nil) + expect(subject.technical_contacts[0].email).to eq("ccops@markmonitor.com") + expect(subject.technical_contacts[0].created_on).to eq(DateTime.parse("2010-05-20 00:00:00 UTC")) + expect(subject.technical_contacts[0].updated_on).to eq(DateTime.parse("2017-01-03 00:00:00 UTC")) + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers.size).to eq(4) + expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[0].name).to eq("ns1.google.com") + expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[1].name).to eq("ns2.google.com") + expect(subject.nameservers[2]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[2].name).to eq("ns3.google.com") + expect(subject.nameservers[3]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[3].name).to eq("ns4.google.com") end end diff --git a/spec/whois/parsers/responses/whois.registry.gy/gy/status_available_spec.rb b/spec/whois/parsers/responses/whois.registry.gy/gy/status_available_spec.rb index 7ed442ab..c4e92f71 100644 --- a/spec/whois/parsers/responses/whois.registry.gy/gy/status_available_spec.rb +++ b/spec/whois/parsers/responses/whois.registry.gy/gy/status_available_spec.rb @@ -11,65 +11,26 @@ # require 'spec_helper' -require 'whois/parsers/whois.registry.gy.rb' -describe Whois::Parsers::WhoisRegistryGy, "status_available.expected" do +describe "whois.registry.gy", :aggregate_failures do subject do file = fixture("responses", "whois.registry.gy/gy/status_available.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.registry.gy") + Whois::Parser.parser_for(part) end - describe "#domain" do - it do - expect(subject.domain).to eq("u34jedzcq.gy") - end - end - describe "#domain_id" do - it do - expect(subject.domain_id).to eq(nil) - end - end - describe "#status" do - it do - expect(subject.status).to eq(:available) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(true) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(false) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to eq(nil) - end - end - describe "#updated_on" do - it do - expect(subject.updated_on).to eq(nil) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to eq(nil) - end - end - describe "#registrar" do - it do - expect(subject.registrar).to eq(nil) - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers).to eq([]) - end + it "matches status_available.expected" do + expect(subject.domain).to eq("u34jedzcq.gy") + expect(subject.domain_id).to eq(nil) + expect(subject.status).to eq(:available) + expect(subject.available?).to eq(true) + expect(subject.registered?).to eq(false) + expect(subject.created_on).to eq(nil) + expect(subject.updated_on).to eq(nil) + expect(subject.expires_on).to eq(nil) + expect(subject.registrar).to eq(nil) + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers).to eq([]) end end diff --git a/spec/whois/parsers/responses/whois.registry.gy/gy/status_registered_spec.rb b/spec/whois/parsers/responses/whois.registry.gy/gy/status_registered_spec.rb index 6f1b9d8a..291798a1 100644 --- a/spec/whois/parsers/responses/whois.registry.gy/gy/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.registry.gy/gy/status_registered_spec.rb @@ -11,79 +11,40 @@ # require 'spec_helper' -require 'whois/parsers/whois.registry.gy.rb' -describe Whois::Parsers::WhoisRegistryGy, "status_registered.expected" do +describe "whois.registry.gy", :aggregate_failures do subject do file = fixture("responses", "whois.registry.gy/gy/status_registered.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.registry.gy") + Whois::Parser.parser_for(part) end - describe "#domain" do - it do - expect(subject.domain).to eq("google.gy") - end - end - describe "#domain_id" do - it do - expect(subject.domain_id).to eq("573328-CoCCA") - end - end - describe "#status" do - it do - expect(subject.status).to eq(:registered) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(false) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(true) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to be_a(Time) - expect(subject.created_on).to eq(DateTime.parse("2008-05-12 17:56:23 UTC")) - end - end - describe "#updated_on" do - it do - expect(subject.updated_on).to be_a(Time) - expect(subject.updated_on).to eq(DateTime.parse("2014-01-16 06:53:13 UTC")) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to be_a(Time) - expect(subject.expires_on).to eq(DateTime.parse("2014-10-04 23:30:00 UTC")) - end - end - describe "#registrar" do - it do - expect(subject.registrar).to be_a(Whois::Parser::Registrar) - expect(subject.registrar.id).to eq(nil) - expect(subject.registrar.name).to eq("MarkMonitor") - expect(subject.registrar.url).to eq("http://www.markmonitor.com") - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers.size).to eq(4) - expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[0].name).to eq("ns2.google.com") - expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[1].name).to eq("ns1.google.com") - expect(subject.nameservers[2]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[2].name).to eq("ns3.google.com") - expect(subject.nameservers[3]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[3].name).to eq("ns4.google.com") - end + it "matches status_registered.expected" do + expect(subject.domain).to eq("google.gy") + expect(subject.domain_id).to eq("573328-CoCCA") + expect(subject.status).to eq(:registered) + expect(subject.available?).to eq(false) + expect(subject.registered?).to eq(true) + expect(subject.created_on).to be_a(Time) + expect(subject.created_on).to eq(DateTime.parse("2008-05-12 17:56:23 UTC")) + expect(subject.updated_on).to be_a(Time) + expect(subject.updated_on).to eq(DateTime.parse("2014-01-16 06:53:13 UTC")) + expect(subject.expires_on).to be_a(Time) + expect(subject.expires_on).to eq(DateTime.parse("2014-10-04 23:30:00 UTC")) + expect(subject.registrar).to be_a(Whois::Parser::Registrar) + expect(subject.registrar.id).to eq(nil) + expect(subject.registrar.name).to eq("MarkMonitor") + expect(subject.registrar.url).to eq("http://www.markmonitor.com") + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers.size).to eq(4) + expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[0].name).to eq("ns2.google.com") + expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[1].name).to eq("ns1.google.com") + expect(subject.nameservers[2]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[2].name).to eq("ns3.google.com") + expect(subject.nameservers[3]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[3].name).to eq("ns4.google.com") end end diff --git a/spec/whois/parsers/responses/whois.registry.hm/hm/status_available_spec.rb b/spec/whois/parsers/responses/whois.registry.hm/hm/status_available_spec.rb index 39fba0f1..7cdfd04d 100644 --- a/spec/whois/parsers/responses/whois.registry.hm/hm/status_available_spec.rb +++ b/spec/whois/parsers/responses/whois.registry.hm/hm/status_available_spec.rb @@ -11,50 +11,23 @@ # require 'spec_helper' -require 'whois/parsers/whois.registry.hm.rb' -describe Whois::Parsers::WhoisRegistryHm, "status_available.expected" do +describe "whois.registry.hm", :aggregate_failures do subject do file = fixture("responses", "whois.registry.hm/hm/status_available.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.registry.hm") + Whois::Parser.parser_for(part) end - describe "#status" do - it do - expect(subject.status).to eq(:available) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(true) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(false) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to eq(nil) - end - end - describe "#updated_on" do - it do - expect { subject.updated_on }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to eq(nil) - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers).to eq([]) - end + it "matches status_available.expected" do + expect(subject.status).to eq(:available) + expect(subject.available?).to eq(true) + expect(subject.registered?).to eq(false) + expect(subject.created_on).to eq(nil) + expect { subject.updated_on }.to raise_error(Whois::AttributeNotSupported) + expect(subject.expires_on).to eq(nil) + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers).to eq([]) end end diff --git a/spec/whois/parsers/responses/whois.registry.hm/hm/status_registered_spec.rb b/spec/whois/parsers/responses/whois.registry.hm/hm/status_registered_spec.rb index f8c45d93..16c16c8d 100644 --- a/spec/whois/parsers/responses/whois.registry.hm/hm/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.registry.hm/hm/status_registered_spec.rb @@ -11,56 +11,29 @@ # require 'spec_helper' -require 'whois/parsers/whois.registry.hm.rb' -describe Whois::Parsers::WhoisRegistryHm, "status_registered.expected" do +describe "whois.registry.hm", :aggregate_failures do subject do file = fixture("responses", "whois.registry.hm/hm/status_registered.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.registry.hm") + Whois::Parser.parser_for(part) end - describe "#status" do - it do - expect(subject.status).to eq(:registered) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(false) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(true) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to be_a(Time) - expect(subject.created_on).to eq(DateTime.parse("2003-04-28")) - end - end - describe "#updated_on" do - it do - expect { subject.updated_on }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to be_a(Time) - expect(subject.expires_on).to eq(DateTime.parse("2020-04-28")) - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers.size).to eq(2) - expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[0].name).to eq("ns1.everydns.net") - expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[1].name).to eq("ns2.everydns.net") - end + it "matches status_registered.expected" do + expect(subject.status).to eq(:registered) + expect(subject.available?).to eq(false) + expect(subject.registered?).to eq(true) + expect(subject.created_on).to be_a(Time) + expect(subject.created_on).to eq(DateTime.parse("2003-04-28")) + expect { subject.updated_on }.to raise_error(Whois::AttributeNotSupported) + expect(subject.expires_on).to be_a(Time) + expect(subject.expires_on).to eq(DateTime.parse("2020-04-28")) + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers.size).to eq(2) + expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[0].name).to eq("ns1.everydns.net") + expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[1].name).to eq("ns2.everydns.net") end end diff --git a/spec/whois/parsers/responses/whois.registry.om/om/status_available_spec.rb b/spec/whois/parsers/responses/whois.registry.om/om/status_available_spec.rb index c99ebb04..2595bc0c 100644 --- a/spec/whois/parsers/responses/whois.registry.om/om/status_available_spec.rb +++ b/spec/whois/parsers/responses/whois.registry.om/om/status_available_spec.rb @@ -11,87 +11,32 @@ # require 'spec_helper' -require 'whois/parsers/whois.registry.om.rb' -describe Whois::Parsers::WhoisRegistryOm, "status_available.expected" do +describe "whois.registry.om", :aggregate_failures do subject do file = fixture("responses", "whois.registry.om/om/status_available.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.registry.om") + Whois::Parser.parser_for(part) end - describe "#disclaimer" do - it do - expect { subject.disclaimer }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#domain" do - it do - expect(subject.domain).to eq(nil) - end - end - describe "#domain_id" do - it do - expect { subject.domain_id }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#status" do - it do - expect(subject.status).to eq([]) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(true) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(false) - end - end - describe "#created_on" do - it do - expect { subject.created_on }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#updated_on" do - it do - expect(subject.updated_on).to eq(nil) - end - end - describe "#expires_on" do - it do - expect { subject.expires_on }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#registrar" do - it do - expect(subject.registrar).to eq(nil) - end - end - describe "#registrant_contacts" do - it do - expect(subject.registrant_contacts).to be_a(Array) - expect(subject.registrant_contacts).to eq([]) - end - end - describe "#admin_contacts" do - it do - expect { subject.admin_contacts }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#technical_contacts" do - it do - expect(subject.technical_contacts).to be_a(Array) - expect(subject.technical_contacts).to eq([]) - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers).to eq([]) - end + it "matches status_available.expected" do + expect { subject.disclaimer }.to raise_error(Whois::AttributeNotSupported) + expect(subject.domain).to eq(nil) + expect { subject.domain_id }.to raise_error(Whois::AttributeNotSupported) + expect(subject.status).to eq([]) + expect(subject.available?).to eq(true) + expect(subject.registered?).to eq(false) + expect { subject.created_on }.to raise_error(Whois::AttributeNotSupported) + expect(subject.updated_on).to eq(nil) + expect { subject.expires_on }.to raise_error(Whois::AttributeNotSupported) + expect(subject.registrar).to eq(nil) + expect(subject.registrant_contacts).to be_a(Array) + expect(subject.registrant_contacts).to eq([]) + expect { subject.admin_contacts }.to raise_error(Whois::AttributeNotSupported) + expect(subject.technical_contacts).to be_a(Array) + expect(subject.technical_contacts).to eq([]) + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers).to eq([]) end end diff --git a/spec/whois/parsers/responses/whois.registry.om/om/status_registered_spec.rb b/spec/whois/parsers/responses/whois.registry.om/om/status_registered_spec.rb index 5a5c52bd..77cf81a9 100644 --- a/spec/whois/parsers/responses/whois.registry.om/om/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.registry.om/om/status_registered_spec.rb @@ -11,131 +11,76 @@ # require 'spec_helper' -require 'whois/parsers/whois.registry.om.rb' -describe Whois::Parsers::WhoisRegistryOm, "status_registered.expected" do +describe "whois.registry.om", :aggregate_failures do subject do file = fixture("responses", "whois.registry.om/om/status_registered.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.registry.om") + Whois::Parser.parser_for(part) end - describe "#disclaimer" do - it do - expect { subject.disclaimer }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#domain" do - it do - expect(subject.domain).to eq("rop.gov.om") - end - end - describe "#domain_id" do - it do - expect { subject.domain_id }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#status" do - it do - expect(subject.status).to eq(["ok"]) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(false) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(true) - end - end - describe "#created_on" do - it do - expect { subject.created_on }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#updated_on" do - it do - expect(subject.updated_on).to be_a(Time) - expect(subject.updated_on).to eq(DateTime.parse("2013-10-06 18:20:12 UTC")) - end - end - describe "#expires_on" do - it do - expect { subject.expires_on }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#registrar" do - it do - expect(subject.registrar).to be_a(Whois::Parser::Registrar) - expect(subject.registrar.id).to eq(nil) - expect(subject.registrar.name).to eq("Oman Telecommunication Company") - expect(subject.registrar.url).to eq(nil) - end - end - describe "#registrant_contacts" do - it do - expect(subject.registrant_contacts).to be_a(Array) - expect(subject.registrant_contacts.size).to eq(1) - expect(subject.registrant_contacts[0]).to be_a(Whois::Parser::Contact) - expect(subject.registrant_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_REGISTRANT) - expect(subject.registrant_contacts[0].id).to eq("10084244") - expect(subject.registrant_contacts[0].name).to eq("Nasser Said Al Daree") - expect(subject.registrant_contacts[0].organization).to eq(nil) - expect(subject.registrant_contacts[0].address).to eq(nil) - expect(subject.registrant_contacts[0].city).to eq(nil) - expect(subject.registrant_contacts[0].zip).to eq(nil) - expect(subject.registrant_contacts[0].state).to eq(nil) - expect(subject.registrant_contacts[0].country).to eq(nil) - expect(subject.registrant_contacts[0].country_code).to eq(nil) - expect(subject.registrant_contacts[0].phone).to eq(nil) - expect(subject.registrant_contacts[0].fax).to eq(nil) - expect(subject.registrant_contacts[0].email).to eq("Visit portal.registry.om/whois for Web based WhoIs") - end - end - describe "#admin_contacts" do - it do - expect { subject.admin_contacts }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#technical_contacts" do - it do - expect(subject.technical_contacts).to be_a(Array) - expect(subject.technical_contacts.size).to eq(1) - expect(subject.technical_contacts[0]).to be_a(Whois::Parser::Contact) - expect(subject.technical_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_TECHNICAL) - expect(subject.technical_contacts[0].id).to eq("10084244") - expect(subject.technical_contacts[0].name).to eq("Nasser Said Al Daree") - expect(subject.technical_contacts[0].organization).to eq(nil) - expect(subject.technical_contacts[0].address).to eq(nil) - expect(subject.technical_contacts[0].city).to eq(nil) - expect(subject.technical_contacts[0].zip).to eq(nil) - expect(subject.technical_contacts[0].state).to eq(nil) - expect(subject.technical_contacts[0].country).to eq(nil) - expect(subject.technical_contacts[0].country_code).to eq(nil) - expect(subject.technical_contacts[0].phone).to eq(nil) - expect(subject.technical_contacts[0].fax).to eq(nil) - expect(subject.technical_contacts[0].email).to eq("Visit portal.registry.om/whois for Web based WhoIs") - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers.size).to eq(3) - expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[0].name).to eq("ns3.omantel.net.om") - expect(subject.nameservers[0].ipv4).to eq("62.231.247.70") - expect(subject.nameservers[0].ipv6).to eq(nil) - expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[1].name).to eq("ns1.omantel.net.om") - expect(subject.nameservers[1].ipv4).to eq("82.178.72.21") - expect(subject.nameservers[1].ipv6).to eq(nil) - expect(subject.nameservers[2]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[2].name).to eq("ns2.omantel.net.om") - expect(subject.nameservers[2].ipv4).to eq("212.72.4.147") - expect(subject.nameservers[2].ipv6).to eq(nil) - end + it "matches status_registered.expected" do + expect { subject.disclaimer }.to raise_error(Whois::AttributeNotSupported) + expect(subject.domain).to eq("rop.gov.om") + expect { subject.domain_id }.to raise_error(Whois::AttributeNotSupported) + expect(subject.status).to eq(["ok"]) + expect(subject.available?).to eq(false) + expect(subject.registered?).to eq(true) + expect { subject.created_on }.to raise_error(Whois::AttributeNotSupported) + expect(subject.updated_on).to be_a(Time) + expect(subject.updated_on).to eq(DateTime.parse("2013-10-06 18:20:12 UTC")) + expect { subject.expires_on }.to raise_error(Whois::AttributeNotSupported) + expect(subject.registrar).to be_a(Whois::Parser::Registrar) + expect(subject.registrar.id).to eq(nil) + expect(subject.registrar.name).to eq("Oman Telecommunication Company") + expect(subject.registrar.url).to eq(nil) + expect(subject.registrant_contacts).to be_a(Array) + expect(subject.registrant_contacts.size).to eq(1) + expect(subject.registrant_contacts[0]).to be_a(Whois::Parser::Contact) + expect(subject.registrant_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_REGISTRANT) + expect(subject.registrant_contacts[0].id).to eq("10084244") + expect(subject.registrant_contacts[0].name).to eq("Nasser Said Al Daree") + expect(subject.registrant_contacts[0].organization).to eq(nil) + expect(subject.registrant_contacts[0].address).to eq(nil) + expect(subject.registrant_contacts[0].city).to eq(nil) + expect(subject.registrant_contacts[0].zip).to eq(nil) + expect(subject.registrant_contacts[0].state).to eq(nil) + expect(subject.registrant_contacts[0].country).to eq(nil) + expect(subject.registrant_contacts[0].country_code).to eq(nil) + expect(subject.registrant_contacts[0].phone).to eq(nil) + expect(subject.registrant_contacts[0].fax).to eq(nil) + expect(subject.registrant_contacts[0].email).to eq("Visit portal.registry.om/whois for Web based WhoIs") + expect { subject.admin_contacts }.to raise_error(Whois::AttributeNotSupported) + expect(subject.technical_contacts).to be_a(Array) + expect(subject.technical_contacts.size).to eq(1) + expect(subject.technical_contacts[0]).to be_a(Whois::Parser::Contact) + expect(subject.technical_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_TECHNICAL) + expect(subject.technical_contacts[0].id).to eq("10084244") + expect(subject.technical_contacts[0].name).to eq("Nasser Said Al Daree") + expect(subject.technical_contacts[0].organization).to eq(nil) + expect(subject.technical_contacts[0].address).to eq(nil) + expect(subject.technical_contacts[0].city).to eq(nil) + expect(subject.technical_contacts[0].zip).to eq(nil) + expect(subject.technical_contacts[0].state).to eq(nil) + expect(subject.technical_contacts[0].country).to eq(nil) + expect(subject.technical_contacts[0].country_code).to eq(nil) + expect(subject.technical_contacts[0].phone).to eq(nil) + expect(subject.technical_contacts[0].fax).to eq(nil) + expect(subject.technical_contacts[0].email).to eq("Visit portal.registry.om/whois for Web based WhoIs") + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers.size).to eq(3) + expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[0].name).to eq("ns3.omantel.net.om") + expect(subject.nameservers[0].ipv4).to eq("62.231.247.70") + expect(subject.nameservers[0].ipv6).to eq(nil) + expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[1].name).to eq("ns1.omantel.net.om") + expect(subject.nameservers[1].ipv4).to eq("82.178.72.21") + expect(subject.nameservers[1].ipv6).to eq(nil) + expect(subject.nameservers[2]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[2].name).to eq("ns2.omantel.net.om") + expect(subject.nameservers[2].ipv4).to eq("212.72.4.147") + expect(subject.nameservers[2].ipv6).to eq(nil) end end diff --git a/spec/whois/parsers/responses/whois.registry.om/om/status_reserved_spec.rb b/spec/whois/parsers/responses/whois.registry.om/om/status_reserved_spec.rb index f5738f1a..a86ddb30 100644 --- a/spec/whois/parsers/responses/whois.registry.om/om/status_reserved_spec.rb +++ b/spec/whois/parsers/responses/whois.registry.om/om/status_reserved_spec.rb @@ -11,34 +11,19 @@ # require 'spec_helper' -require 'whois/parsers/whois.registry.om.rb' -describe Whois::Parsers::WhoisRegistryOm, "status_reserved.expected" do +describe "whois.registry.om", :aggregate_failures do subject do file = fixture("responses", "whois.registry.om/om/status_reserved.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.registry.om") + Whois::Parser.parser_for(part) end - describe "#status" do - it do - expect(subject.status).to eq(:reserved) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(false) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(false) - end - end - describe "#reserved?" do - it do - expect(subject.reserved?).to eq(true) - end + it "matches status_reserved.expected" do + expect(subject.status).to eq(:reserved) + expect(subject.available?).to eq(false) + expect(subject.registered?).to eq(false) + expect(subject.reserved?).to eq(true) end end diff --git a/spec/whois/parsers/responses/whois.registry.qa/qa/property_nameservers_without_ips_spec.rb b/spec/whois/parsers/responses/whois.registry.qa/qa/property_nameservers_without_ips_spec.rb index ea032ca3..75429e84 100644 --- a/spec/whois/parsers/responses/whois.registry.qa/qa/property_nameservers_without_ips_spec.rb +++ b/spec/whois/parsers/responses/whois.registry.qa/qa/property_nameservers_without_ips_spec.rb @@ -11,29 +11,26 @@ # require 'spec_helper' -require 'whois/parsers/whois.registry.qa.rb' -describe Whois::Parsers::WhoisRegistryQa, "property_nameservers_without_ips.expected" do +describe "whois.registry.qa", :aggregate_failures do subject do file = fixture("responses", "whois.registry.qa/qa/property_nameservers_without_ips.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.registry.qa") + Whois::Parser.parser_for(part) end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers.size).to eq(3) - expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[0].name).to eq("ns1.qatarbank.com") - expect(subject.nameservers[0].ipv4).to eq(nil) - expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[1].name).to eq("ns2.qatarbank.com") - expect(subject.nameservers[1].ipv4).to eq(nil) - expect(subject.nameservers[2]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[2].name).to eq("ns3.qatarbank.com") - expect(subject.nameservers[2].ipv4).to eq(nil) - end + it "matches property_nameservers_without_ips.expected" do + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers.size).to eq(3) + expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[0].name).to eq("ns1.qatarbank.com") + expect(subject.nameservers[0].ipv4).to eq(nil) + expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[1].name).to eq("ns2.qatarbank.com") + expect(subject.nameservers[1].ipv4).to eq(nil) + expect(subject.nameservers[2]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[2].name).to eq("ns3.qatarbank.com") + expect(subject.nameservers[2].ipv4).to eq(nil) end end diff --git a/spec/whois/parsers/responses/whois.registry.qa/qa/status_available_spec.rb b/spec/whois/parsers/responses/whois.registry.qa/qa/status_available_spec.rb index 9640f36c..328b4ae3 100644 --- a/spec/whois/parsers/responses/whois.registry.qa/qa/status_available_spec.rb +++ b/spec/whois/parsers/responses/whois.registry.qa/qa/status_available_spec.rb @@ -11,87 +11,32 @@ # require 'spec_helper' -require 'whois/parsers/whois.registry.qa.rb' -describe Whois::Parsers::WhoisRegistryQa, "status_available.expected" do +describe "whois.registry.qa", :aggregate_failures do subject do file = fixture("responses", "whois.registry.qa/qa/status_available.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.registry.qa") + Whois::Parser.parser_for(part) end - describe "#disclaimer" do - it do - expect { subject.disclaimer }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#domain" do - it do - expect(subject.domain).to eq(nil) - end - end - describe "#domain_id" do - it do - expect { subject.domain_id }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#status" do - it do - expect(subject.status).to eq([]) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(true) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(false) - end - end - describe "#created_on" do - it do - expect { subject.created_on }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#updated_on" do - it do - expect { subject.updated_on }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#expires_on" do - it do - expect { subject.expires_on }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#registrar" do - it do - expect(subject.registrar).to eq(nil) - end - end - describe "#registrant_contacts" do - it do - expect(subject.registrant_contacts).to be_a(Array) - expect(subject.registrant_contacts).to eq([]) - end - end - describe "#admin_contacts" do - it do - expect { subject.admin_contacts }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#technical_contacts" do - it do - expect(subject.technical_contacts).to be_a(Array) - expect(subject.technical_contacts).to eq([]) - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers).to eq([]) - end + it "matches status_available.expected" do + expect { subject.disclaimer }.to raise_error(Whois::AttributeNotSupported) + expect(subject.domain).to eq(nil) + expect { subject.domain_id }.to raise_error(Whois::AttributeNotSupported) + expect(subject.status).to eq([]) + expect(subject.available?).to eq(true) + expect(subject.registered?).to eq(false) + expect { subject.created_on }.to raise_error(Whois::AttributeNotSupported) + expect { subject.updated_on }.to raise_error(Whois::AttributeNotSupported) + expect { subject.expires_on }.to raise_error(Whois::AttributeNotSupported) + expect(subject.registrar).to eq(nil) + expect(subject.registrant_contacts).to be_a(Array) + expect(subject.registrant_contacts).to eq([]) + expect { subject.admin_contacts }.to raise_error(Whois::AttributeNotSupported) + expect(subject.technical_contacts).to be_a(Array) + expect(subject.technical_contacts).to eq([]) + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers).to eq([]) end end diff --git a/spec/whois/parsers/responses/whois.registry.qa/qa/status_registered_spec.rb b/spec/whois/parsers/responses/whois.registry.qa/qa/status_registered_spec.rb index e7c94dca..63f768c5 100644 --- a/spec/whois/parsers/responses/whois.registry.qa/qa/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.registry.qa/qa/status_registered_spec.rb @@ -11,121 +11,66 @@ # require 'spec_helper' -require 'whois/parsers/whois.registry.qa.rb' -describe Whois::Parsers::WhoisRegistryQa, "status_registered.expected" do +describe "whois.registry.qa", :aggregate_failures do subject do file = fixture("responses", "whois.registry.qa/qa/status_registered.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.registry.qa") + Whois::Parser.parser_for(part) end - describe "#disclaimer" do - it do - expect { subject.disclaimer }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#domain" do - it do - expect(subject.domain).to eq("qtel.com.qa") - end - end - describe "#domain_id" do - it do - expect { subject.domain_id }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#status" do - it do - expect(subject.status).to eq(["ok"]) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(false) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(true) - end - end - describe "#created_on" do - it do - expect { subject.created_on }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#updated_on" do - it do - expect { subject.updated_on }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#expires_on" do - it do - expect { subject.expires_on }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#registrar" do - it do - expect(subject.registrar).to be_a(Whois::Parser::Registrar) - expect(subject.registrar.id).to eq("QatarTelecom") - expect(subject.registrar.name).to eq("Qatar Telecom (Qtel) Q. S. C") - end - end - describe "#registrant_contacts" do - it do - expect(subject.registrant_contacts).to be_a(Array) - expect(subject.registrant_contacts.size).to eq(1) - expect(subject.registrant_contacts[0]).to be_a(Whois::Parser::Contact) - expect(subject.registrant_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_REGISTRANT) - expect(subject.registrant_contacts[0].id).to eq("QT11734") - expect(subject.registrant_contacts[0].name).to eq("DNS Administrator - Qtel Internet Services") - expect(subject.registrant_contacts[0].organization).to eq(nil) - expect(subject.registrant_contacts[0].address).to eq(nil) - expect(subject.registrant_contacts[0].city).to eq(nil) - expect(subject.registrant_contacts[0].zip).to eq(nil) - expect(subject.registrant_contacts[0].state).to eq(nil) - expect(subject.registrant_contacts[0].country_code).to eq(nil) - expect(subject.registrant_contacts[0].phone).to eq(nil) - expect(subject.registrant_contacts[0].fax).to eq(nil) - expect(subject.registrant_contacts[0].email).to eq("Visit www.domains.qa") - end - end - describe "#admin_contacts" do - it do - expect { subject.admin_contacts }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#technical_contacts" do - it do - expect(subject.technical_contacts).to be_a(Array) - expect(subject.technical_contacts.size).to eq(1) - expect(subject.technical_contacts[0]).to be_a(Whois::Parser::Contact) - expect(subject.technical_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_TECHNICAL) - expect(subject.technical_contacts[0].id).to eq("QT11734") - expect(subject.technical_contacts[0].name).to eq("DNS Administrator - Qtel Internet Services") - expect(subject.technical_contacts[0].organization).to eq(nil) - expect(subject.technical_contacts[0].address).to eq(nil) - expect(subject.technical_contacts[0].city).to eq(nil) - expect(subject.technical_contacts[0].zip).to eq(nil) - expect(subject.technical_contacts[0].state).to eq(nil) - expect(subject.technical_contacts[0].country_code).to eq(nil) - expect(subject.technical_contacts[0].phone).to eq(nil) - expect(subject.technical_contacts[0].fax).to eq(nil) - expect(subject.technical_contacts[0].email).to eq("Visit www.domains.qa") - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers.size).to eq(2) - expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[0].name).to eq("ns1.qtel.com.qa") - expect(subject.nameservers[0].ipv4).to eq("212.77.203.185") - expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[1].name).to eq("ns2.qtel.com.qa") - expect(subject.nameservers[1].ipv4).to eq("213.130.113.101") - end + it "matches status_registered.expected" do + expect { subject.disclaimer }.to raise_error(Whois::AttributeNotSupported) + expect(subject.domain).to eq("qtel.com.qa") + expect { subject.domain_id }.to raise_error(Whois::AttributeNotSupported) + expect(subject.status).to eq(["ok"]) + expect(subject.available?).to eq(false) + expect(subject.registered?).to eq(true) + expect { subject.created_on }.to raise_error(Whois::AttributeNotSupported) + expect { subject.updated_on }.to raise_error(Whois::AttributeNotSupported) + expect { subject.expires_on }.to raise_error(Whois::AttributeNotSupported) + expect(subject.registrar).to be_a(Whois::Parser::Registrar) + expect(subject.registrar.id).to eq("QatarTelecom") + expect(subject.registrar.name).to eq("Qatar Telecom (Qtel) Q. S. C") + expect(subject.registrant_contacts).to be_a(Array) + expect(subject.registrant_contacts.size).to eq(1) + expect(subject.registrant_contacts[0]).to be_a(Whois::Parser::Contact) + expect(subject.registrant_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_REGISTRANT) + expect(subject.registrant_contacts[0].id).to eq("QT11734") + expect(subject.registrant_contacts[0].name).to eq("DNS Administrator - Qtel Internet Services") + expect(subject.registrant_contacts[0].organization).to eq(nil) + expect(subject.registrant_contacts[0].address).to eq(nil) + expect(subject.registrant_contacts[0].city).to eq(nil) + expect(subject.registrant_contacts[0].zip).to eq(nil) + expect(subject.registrant_contacts[0].state).to eq(nil) + expect(subject.registrant_contacts[0].country_code).to eq(nil) + expect(subject.registrant_contacts[0].phone).to eq(nil) + expect(subject.registrant_contacts[0].fax).to eq(nil) + expect(subject.registrant_contacts[0].email).to eq("Visit www.domains.qa") + expect { subject.admin_contacts }.to raise_error(Whois::AttributeNotSupported) + expect(subject.technical_contacts).to be_a(Array) + expect(subject.technical_contacts.size).to eq(1) + expect(subject.technical_contacts[0]).to be_a(Whois::Parser::Contact) + expect(subject.technical_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_TECHNICAL) + expect(subject.technical_contacts[0].id).to eq("QT11734") + expect(subject.technical_contacts[0].name).to eq("DNS Administrator - Qtel Internet Services") + expect(subject.technical_contacts[0].organization).to eq(nil) + expect(subject.technical_contacts[0].address).to eq(nil) + expect(subject.technical_contacts[0].city).to eq(nil) + expect(subject.technical_contacts[0].zip).to eq(nil) + expect(subject.technical_contacts[0].state).to eq(nil) + expect(subject.technical_contacts[0].country_code).to eq(nil) + expect(subject.technical_contacts[0].phone).to eq(nil) + expect(subject.technical_contacts[0].fax).to eq(nil) + expect(subject.technical_contacts[0].email).to eq("Visit www.domains.qa") + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers.size).to eq(2) + expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[0].name).to eq("ns1.qtel.com.qa") + expect(subject.nameservers[0].ipv4).to eq("212.77.203.185") + expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[1].name).to eq("ns2.qtel.com.qa") + expect(subject.nameservers[1].ipv4).to eq("213.130.113.101") end end diff --git a/spec/whois/parsers/responses/whois.rnids.rs/rs/case_token_whois_privacy_spec.rb b/spec/whois/parsers/responses/whois.rnids.rs/rs/case_token_whois_privacy_spec.rb index 605b52fb..b590ad6c 100644 --- a/spec/whois/parsers/responses/whois.rnids.rs/rs/case_token_whois_privacy_spec.rb +++ b/spec/whois/parsers/responses/whois.rnids.rs/rs/case_token_whois_privacy_spec.rb @@ -11,32 +11,21 @@ # require 'spec_helper' -require 'whois/parsers/whois.rnids.rs.rb' -describe Whois::Parsers::WhoisRnidsRs, "case_token_whois_privacy.expected" do +describe "whois.rnids.rs", :aggregate_failures do subject do file = fixture("responses", "whois.rnids.rs/rs/case_token_whois_privacy.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.rnids.rs") + Whois::Parser.parser_for(part) end - describe "#registrant_contacts" do - it do - expect(subject.registrant_contacts).to be_a(Array) - expect(subject.registrant_contacts).to eq([]) - end - end - describe "#admin_contacts" do - it do - expect(subject.admin_contacts).to be_a(Array) - expect(subject.admin_contacts).to eq([]) - end - end - describe "#technical_contacts" do - it do - expect(subject.technical_contacts).to be_a(Array) - expect(subject.technical_contacts).to eq([]) - end + it "matches case_token_whois_privacy.expected" do + expect(subject.registrant_contacts).to be_a(Array) + expect(subject.registrant_contacts).to eq([]) + expect(subject.admin_contacts).to be_a(Array) + expect(subject.admin_contacts).to eq([]) + expect(subject.technical_contacts).to be_a(Array) + expect(subject.technical_contacts).to eq([]) end end diff --git a/spec/whois/parsers/responses/whois.rnids.rs/rs/property_nameservers_hyphenated_spec.rb b/spec/whois/parsers/responses/whois.rnids.rs/rs/property_nameservers_hyphenated_spec.rb index 10fe10e5..e1395d3a 100644 --- a/spec/whois/parsers/responses/whois.rnids.rs/rs/property_nameservers_hyphenated_spec.rb +++ b/spec/whois/parsers/responses/whois.rnids.rs/rs/property_nameservers_hyphenated_spec.rb @@ -11,26 +11,23 @@ # require 'spec_helper' -require 'whois/parsers/whois.rnids.rs.rb' -describe Whois::Parsers::WhoisRnidsRs, "property_nameservers_hyphenated.expected" do +describe "whois.rnids.rs", :aggregate_failures do subject do file = fixture("responses", "whois.rnids.rs/rs/property_nameservers_hyphenated.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.rnids.rs") + Whois::Parser.parser_for(part) end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers.size).to eq(2) - expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[0].name).to eq("bits-hq.bitsyu.net") - expect(subject.nameservers[0].ipv4).to eq("217.24.17.10") - expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[1].name).to eq("largo.bitsyu.net") - expect(subject.nameservers[1].ipv4).to eq("217.24.17.80") - end + it "matches property_nameservers_hyphenated.expected" do + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers.size).to eq(2) + expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[0].name).to eq("bits-hq.bitsyu.net") + expect(subject.nameservers[0].ipv4).to eq("217.24.17.10") + expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[1].name).to eq("largo.bitsyu.net") + expect(subject.nameservers[1].ipv4).to eq("217.24.17.80") end end diff --git a/spec/whois/parsers/responses/whois.rnids.rs/rs/property_status_expired_spec.rb b/spec/whois/parsers/responses/whois.rnids.rs/rs/property_status_expired_spec.rb index 2c355c60..e4cf6dfe 100644 --- a/spec/whois/parsers/responses/whois.rnids.rs/rs/property_status_expired_spec.rb +++ b/spec/whois/parsers/responses/whois.rnids.rs/rs/property_status_expired_spec.rb @@ -11,29 +11,18 @@ # require 'spec_helper' -require 'whois/parsers/whois.rnids.rs.rb' -describe Whois::Parsers::WhoisRnidsRs, "property_status_expired.expected" do +describe "whois.rnids.rs", :aggregate_failures do subject do file = fixture("responses", "whois.rnids.rs/rs/property_status_expired.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.rnids.rs") + Whois::Parser.parser_for(part) end - describe "#status" do - it do - expect(subject.status).to eq(:expired) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(false) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(true) - end + it "matches property_status_expired.expected" do + expect(subject.status).to eq(:expired) + expect(subject.available?).to eq(false) + expect(subject.registered?).to eq(true) end end diff --git a/spec/whois/parsers/responses/whois.rnids.rs/rs/property_status_in_transfer_spec.rb b/spec/whois/parsers/responses/whois.rnids.rs/rs/property_status_in_transfer_spec.rb index 4ffa8721..a2420ee3 100644 --- a/spec/whois/parsers/responses/whois.rnids.rs/rs/property_status_in_transfer_spec.rb +++ b/spec/whois/parsers/responses/whois.rnids.rs/rs/property_status_in_transfer_spec.rb @@ -11,29 +11,18 @@ # require 'spec_helper' -require 'whois/parsers/whois.rnids.rs.rb' -describe Whois::Parsers::WhoisRnidsRs, "property_status_in_transfer.expected" do +describe "whois.rnids.rs", :aggregate_failures do subject do file = fixture("responses", "whois.rnids.rs/rs/property_status_in_transfer.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.rnids.rs") + Whois::Parser.parser_for(part) end - describe "#status" do - it do - expect(subject.status).to eq(:registered) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(false) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(true) - end + it "matches property_status_in_transfer.expected" do + expect(subject.status).to eq(:registered) + expect(subject.available?).to eq(false) + expect(subject.registered?).to eq(true) end end diff --git a/spec/whois/parsers/responses/whois.rnids.rs/rs/property_status_locked_spec.rb b/spec/whois/parsers/responses/whois.rnids.rs/rs/property_status_locked_spec.rb index 523c9646..317c43ef 100644 --- a/spec/whois/parsers/responses/whois.rnids.rs/rs/property_status_locked_spec.rb +++ b/spec/whois/parsers/responses/whois.rnids.rs/rs/property_status_locked_spec.rb @@ -11,29 +11,18 @@ # require 'spec_helper' -require 'whois/parsers/whois.rnids.rs.rb' -describe Whois::Parsers::WhoisRnidsRs, "property_status_locked.expected" do +describe "whois.rnids.rs", :aggregate_failures do subject do file = fixture("responses", "whois.rnids.rs/rs/property_status_locked.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.rnids.rs") + Whois::Parser.parser_for(part) end - describe "#status" do - it do - expect(subject.status).to eq(:registered) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(false) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(true) - end + it "matches property_status_locked.expected" do + expect(subject.status).to eq(:registered) + expect(subject.available?).to eq(false) + expect(subject.registered?).to eq(true) end end diff --git a/spec/whois/parsers/responses/whois.rnids.rs/rs/status_available_spec.rb b/spec/whois/parsers/responses/whois.rnids.rs/rs/status_available_spec.rb index 77dfe828..ed7d34b1 100644 --- a/spec/whois/parsers/responses/whois.rnids.rs/rs/status_available_spec.rb +++ b/spec/whois/parsers/responses/whois.rnids.rs/rs/status_available_spec.rb @@ -11,88 +11,33 @@ # require 'spec_helper' -require 'whois/parsers/whois.rnids.rs.rb' -describe Whois::Parsers::WhoisRnidsRs, "status_available.expected" do +describe "whois.rnids.rs", :aggregate_failures do subject do file = fixture("responses", "whois.rnids.rs/rs/status_available.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.rnids.rs") + Whois::Parser.parser_for(part) end - describe "#disclaimer" do - it do - expect { subject.disclaimer }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#domain" do - it do - expect(subject.domain).to eq(nil) - end - end - describe "#domain_id" do - it do - expect { subject.domain_id }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#status" do - it do - expect(subject.status).to eq(:available) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(true) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(false) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to eq(nil) - end - end - describe "#updated_on" do - it do - expect(subject.updated_on).to eq(nil) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to eq(nil) - end - end - describe "#registrar" do - it do - expect(subject.registrar).to eq(nil) - end - end - describe "#registrant_contacts" do - it do - expect(subject.registrant_contacts).to be_a(Array) - expect(subject.registrant_contacts).to eq([]) - end - end - describe "#admin_contacts" do - it do - expect(subject.admin_contacts).to be_a(Array) - expect(subject.admin_contacts).to eq([]) - end - end - describe "#technical_contacts" do - it do - expect(subject.technical_contacts).to be_a(Array) - expect(subject.technical_contacts).to eq([]) - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers).to eq([]) - end + it "matches status_available.expected" do + expect { subject.disclaimer }.to raise_error(Whois::AttributeNotSupported) + expect(subject.domain).to eq(nil) + expect { subject.domain_id }.to raise_error(Whois::AttributeNotSupported) + expect(subject.status).to eq(:available) + expect(subject.available?).to eq(true) + expect(subject.registered?).to eq(false) + expect(subject.created_on).to eq(nil) + expect(subject.updated_on).to eq(nil) + expect(subject.expires_on).to eq(nil) + expect(subject.registrar).to eq(nil) + expect(subject.registrant_contacts).to be_a(Array) + expect(subject.registrant_contacts).to eq([]) + expect(subject.admin_contacts).to be_a(Array) + expect(subject.admin_contacts).to eq([]) + expect(subject.technical_contacts).to be_a(Array) + expect(subject.technical_contacts).to eq([]) + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers).to eq([]) end end diff --git a/spec/whois/parsers/responses/whois.rnids.rs/rs/status_registered_spec.rb b/spec/whois/parsers/responses/whois.rnids.rs/rs/status_registered_spec.rb index 69b1f5e1..3b0ad1c0 100644 --- a/spec/whois/parsers/responses/whois.rnids.rs/rs/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.rnids.rs/rs/status_registered_spec.rb @@ -11,124 +11,69 @@ # require 'spec_helper' -require 'whois/parsers/whois.rnids.rs.rb' -describe Whois::Parsers::WhoisRnidsRs, "status_registered.expected" do +describe "whois.rnids.rs", :aggregate_failures do subject do file = fixture("responses", "whois.rnids.rs/rs/status_registered.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.rnids.rs") + Whois::Parser.parser_for(part) end - describe "#disclaimer" do - it do - expect { subject.disclaimer }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#domain" do - it do - expect(subject.domain).to eq("google.rs") - end - end - describe "#domain_id" do - it do - expect { subject.domain_id }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#status" do - it do - expect(subject.status).to eq(:registered) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(false) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(true) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to be_a(Time) - expect(subject.created_on).to eq(DateTime.parse("2008-03-10 12:31:19")) - end - end - describe "#updated_on" do - it do - expect(subject.updated_on).to be_a(Time) - expect(subject.updated_on).to eq(DateTime.parse("2014-02-11 19:49:38")) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to be_a(Time) - expect(subject.expires_on).to eq(DateTime.parse("2015-03-10 12:31:19")) - end - end - describe "#registrar" do - it do - expect(subject.registrar).to be_a(Whois::Parser::Registrar) - expect(subject.registrar.id).to eq(nil) - expect(subject.registrar.name).to eq("NINET Company d.o.o.") - expect(subject.registrar.url).to eq(nil) - end - end - describe "#registrant_contacts" do - it do - expect(subject.registrant_contacts).to be_a(Array) - expect(subject.registrant_contacts.size).to eq(1) - expect(subject.registrant_contacts[0]).to be_a(Whois::Parser::Contact) - expect(subject.registrant_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_REGISTRANT) - expect(subject.registrant_contacts[0].id).to eq(nil) - expect(subject.registrant_contacts[0].name).to eq("Google Inc.") - expect(subject.registrant_contacts[0].address).to eq("1600 Amphitheatre Parkway, Mountain View, United States of America") - expect(subject.registrant_contacts[0].email).to eq(nil) - end - end - describe "#admin_contacts" do - it do - expect(subject.admin_contacts).to be_a(Array) - expect(subject.admin_contacts.size).to eq(1) - expect(subject.admin_contacts[0]).to be_a(Whois::Parser::Contact) - expect(subject.admin_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_ADMINISTRATIVE) - expect(subject.admin_contacts[0].id).to eq(nil) - expect(subject.admin_contacts[0].name).to eq("Domain Administrator, Drustvo za marketing Google DOO") - expect(subject.admin_contacts[0].address).to eq("Marsala Birjuzova 47/18, Beograd, Serbia") - expect(subject.admin_contacts[0].email).to eq(nil) - end - end - describe "#technical_contacts" do - it do - expect(subject.technical_contacts).to be_a(Array) - expect(subject.technical_contacts.size).to eq(1) - expect(subject.technical_contacts[0]).to be_a(Whois::Parser::Contact) - expect(subject.technical_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_TECHNICAL) - expect(subject.technical_contacts[0].id).to eq(nil) - expect(subject.technical_contacts[0].name).to eq("Domain Administrator, MarkMonitor, Inc.") - expect(subject.technical_contacts[0].address).to eq("391 N Ancestor Place, Boise, ID, United States of America") - expect(subject.technical_contacts[0].email).to eq(nil) - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers.size).to eq(4) - expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[0].name).to eq("ns1.google.com") - expect(subject.nameservers[0].ipv4).to eq(nil) - expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[1].name).to eq("ns2.google.com") - expect(subject.nameservers[1].ipv4).to eq(nil) - expect(subject.nameservers[2]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[2].name).to eq("ns3.google.com") - expect(subject.nameservers[2].ipv4).to eq("216.239.36.10") - expect(subject.nameservers[3]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[3].name).to eq("ns4.google.com") - expect(subject.nameservers[3].ipv4).to eq("216.239.38.10") - end + it "matches status_registered.expected" do + expect { subject.disclaimer }.to raise_error(Whois::AttributeNotSupported) + expect(subject.domain).to eq("google.rs") + expect { subject.domain_id }.to raise_error(Whois::AttributeNotSupported) + expect(subject.status).to eq(:registered) + expect(subject.available?).to eq(false) + expect(subject.registered?).to eq(true) + expect(subject.created_on).to be_a(Time) + expect(subject.created_on).to eq(DateTime.parse("2008-03-10 12:31:19")) + expect(subject.updated_on).to be_a(Time) + expect(subject.updated_on).to eq(DateTime.parse("2014-02-11 19:49:38")) + expect(subject.expires_on).to be_a(Time) + expect(subject.expires_on).to eq(DateTime.parse("2015-03-10 12:31:19")) + expect(subject.registrar).to be_a(Whois::Parser::Registrar) + expect(subject.registrar.id).to eq(nil) + expect(subject.registrar.name).to eq("NINET Company d.o.o.") + expect(subject.registrar.url).to eq(nil) + expect(subject.registrant_contacts).to be_a(Array) + expect(subject.registrant_contacts.size).to eq(1) + expect(subject.registrant_contacts[0]).to be_a(Whois::Parser::Contact) + expect(subject.registrant_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_REGISTRANT) + expect(subject.registrant_contacts[0].id).to eq(nil) + expect(subject.registrant_contacts[0].name).to eq("Google Inc.") + expect(subject.registrant_contacts[0].address).to eq("1600 Amphitheatre Parkway, Mountain View, United States of America") + expect(subject.registrant_contacts[0].email).to eq(nil) + expect(subject.admin_contacts).to be_a(Array) + expect(subject.admin_contacts.size).to eq(1) + expect(subject.admin_contacts[0]).to be_a(Whois::Parser::Contact) + expect(subject.admin_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_ADMINISTRATIVE) + expect(subject.admin_contacts[0].id).to eq(nil) + expect(subject.admin_contacts[0].name).to eq("Domain Administrator, Drustvo za marketing Google DOO") + expect(subject.admin_contacts[0].address).to eq("Marsala Birjuzova 47/18, Beograd, Serbia") + expect(subject.admin_contacts[0].email).to eq(nil) + expect(subject.technical_contacts).to be_a(Array) + expect(subject.technical_contacts.size).to eq(1) + expect(subject.technical_contacts[0]).to be_a(Whois::Parser::Contact) + expect(subject.technical_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_TECHNICAL) + expect(subject.technical_contacts[0].id).to eq(nil) + expect(subject.technical_contacts[0].name).to eq("Domain Administrator, MarkMonitor, Inc.") + expect(subject.technical_contacts[0].address).to eq("391 N Ancestor Place, Boise, ID, United States of America") + expect(subject.technical_contacts[0].email).to eq(nil) + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers.size).to eq(4) + expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[0].name).to eq("ns1.google.com") + expect(subject.nameservers[0].ipv4).to eq(nil) + expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[1].name).to eq("ns2.google.com") + expect(subject.nameservers[1].ipv4).to eq(nil) + expect(subject.nameservers[2]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[2].name).to eq("ns3.google.com") + expect(subject.nameservers[2].ipv4).to eq("216.239.36.10") + expect(subject.nameservers[3]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[3].name).to eq("ns4.google.com") + expect(subject.nameservers[3].ipv4).to eq("216.239.38.10") end end diff --git a/spec/whois/parsers/responses/whois.rotld.ro/ro/property_status_updateprohibited_spec.rb b/spec/whois/parsers/responses/whois.rotld.ro/ro/property_status_updateprohibited_spec.rb index 99a76643..209d9bf6 100644 --- a/spec/whois/parsers/responses/whois.rotld.ro/ro/property_status_updateprohibited_spec.rb +++ b/spec/whois/parsers/responses/whois.rotld.ro/ro/property_status_updateprohibited_spec.rb @@ -11,29 +11,18 @@ # require 'spec_helper' -require 'whois/parsers/whois.rotld.ro.rb' -describe Whois::Parsers::WhoisRotldRo, "property_status_updateprohibited.expected" do +describe "whois.rotld.ro", :aggregate_failures do subject do file = fixture("responses", "whois.rotld.ro/ro/property_status_updateprohibited.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.rotld.ro") + Whois::Parser.parser_for(part) end - describe "#status" do - it do - expect(subject.status).to eq(:registered) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(false) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(true) - end + it "matches property_status_updateprohibited.expected" do + expect(subject.status).to eq(:registered) + expect(subject.available?).to eq(false) + expect(subject.registered?).to eq(true) end end diff --git a/spec/whois/parsers/responses/whois.rotld.ro/ro/status_available_spec.rb b/spec/whois/parsers/responses/whois.rotld.ro/ro/status_available_spec.rb index f67eef3b..e2de4956 100644 --- a/spec/whois/parsers/responses/whois.rotld.ro/ro/status_available_spec.rb +++ b/spec/whois/parsers/responses/whois.rotld.ro/ro/status_available_spec.rb @@ -11,50 +11,23 @@ # require 'spec_helper' -require 'whois/parsers/whois.rotld.ro.rb' -describe Whois::Parsers::WhoisRotldRo, "status_available.expected" do +describe "whois.rotld.ro", :aggregate_failures do subject do file = fixture("responses", "whois.rotld.ro/ro/status_available.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.rotld.ro") + Whois::Parser.parser_for(part) end - describe "#status" do - it do - expect(subject.status).to eq(:available) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(true) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(false) - end - end - describe "#created_on" do - it do - expect { subject.created_on }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#updated_on" do - it do - expect { subject.updated_on }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#expires_on" do - it do - expect { subject.expires_on }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers).to eq([]) - end + it "matches status_available.expected" do + expect(subject.status).to eq(:available) + expect(subject.available?).to eq(true) + expect(subject.registered?).to eq(false) + expect { subject.created_on }.to raise_error(Whois::AttributeNotSupported) + expect { subject.updated_on }.to raise_error(Whois::AttributeNotSupported) + expect { subject.expires_on }.to raise_error(Whois::AttributeNotSupported) + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers).to eq([]) end end diff --git a/spec/whois/parsers/responses/whois.rotld.ro/ro/status_registered_spec.rb b/spec/whois/parsers/responses/whois.rotld.ro/ro/status_registered_spec.rb index bf6e20a6..71ff29e9 100644 --- a/spec/whois/parsers/responses/whois.rotld.ro/ro/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.rotld.ro/ro/status_registered_spec.rb @@ -11,66 +11,39 @@ # require 'spec_helper' -require 'whois/parsers/whois.rotld.ro.rb' -describe Whois::Parsers::WhoisRotldRo, "status_registered.expected" do +describe "whois.rotld.ro", :aggregate_failures do subject do file = fixture("responses", "whois.rotld.ro/ro/status_registered.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.rotld.ro") + Whois::Parser.parser_for(part) end - describe "#status" do - it do - expect(subject.status).to eq(:registered) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(false) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(true) - end - end - describe "#created_on" do - it do - expect { subject.created_on }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#updated_on" do - it do - expect { subject.updated_on }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#expires_on" do - it do - expect { subject.expires_on }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers.size).to eq(4) - expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[0].name).to eq("ns1.google.com") - expect(subject.nameservers[0].ipv4).to eq(nil) - expect(subject.nameservers[0].ipv6).to eq(nil) - expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[1].name).to eq("ns2.google.com") - expect(subject.nameservers[1].ipv4).to eq(nil) - expect(subject.nameservers[1].ipv6).to eq(nil) - expect(subject.nameservers[2]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[2].name).to eq("ns3.google.com") - expect(subject.nameservers[2].ipv4).to eq(nil) - expect(subject.nameservers[2].ipv6).to eq(nil) - expect(subject.nameservers[3]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[3].name).to eq("ns4.google.com") - expect(subject.nameservers[3].ipv4).to eq(nil) - expect(subject.nameservers[3].ipv6).to eq(nil) - end + it "matches status_registered.expected" do + expect(subject.status).to eq(:registered) + expect(subject.available?).to eq(false) + expect(subject.registered?).to eq(true) + expect { subject.created_on }.to raise_error(Whois::AttributeNotSupported) + expect { subject.updated_on }.to raise_error(Whois::AttributeNotSupported) + expect { subject.expires_on }.to raise_error(Whois::AttributeNotSupported) + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers.size).to eq(4) + expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[0].name).to eq("ns1.google.com") + expect(subject.nameservers[0].ipv4).to eq(nil) + expect(subject.nameservers[0].ipv6).to eq(nil) + expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[1].name).to eq("ns2.google.com") + expect(subject.nameservers[1].ipv4).to eq(nil) + expect(subject.nameservers[1].ipv6).to eq(nil) + expect(subject.nameservers[2]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[2].name).to eq("ns3.google.com") + expect(subject.nameservers[2].ipv4).to eq(nil) + expect(subject.nameservers[2].ipv6).to eq(nil) + expect(subject.nameservers[3]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[3].name).to eq("ns4.google.com") + expect(subject.nameservers[3].ipv4).to eq(nil) + expect(subject.nameservers[3].ipv6).to eq(nil) end end diff --git a/spec/whois/parsers/responses/whois.rrpproxy.net/status_available_spec.rb b/spec/whois/parsers/responses/whois.rrpproxy.net/status_available_spec.rb index 546e095d..ec46ab57 100644 --- a/spec/whois/parsers/responses/whois.rrpproxy.net/status_available_spec.rb +++ b/spec/whois/parsers/responses/whois.rrpproxy.net/status_available_spec.rb @@ -11,83 +11,32 @@ # require 'spec_helper' -require 'whois/parsers/whois.rrpproxy.net.rb' -describe Whois::Parsers::WhoisRrpproxyNet, "status_available.expected" do +describe "whois.rrpproxy.net", :aggregate_failures do subject do file = fixture("responses", "whois.rrpproxy.net/status_available.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.rrpproxy.net") + Whois::Parser.parser_for(part) end - describe "#domain" do - it do - expect(subject.domain).to eq(nil) - end - end - describe "#domain_id" do - it do - expect(subject.domain_id).to eq(nil) - end - end - describe "#status" do - it do - expect(subject.status).to eq(:available) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(true) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(false) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to eq(nil) - end - end - describe "#updated_on" do - it do - expect(subject.updated_on).to eq(nil) - end - end - describe "#expires_on" do - it do - expect { subject.expires_on }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#registrar" do - it do - expect(subject.registrar).to eq(nil) - end - end - describe "#registrant_contacts" do - it do - expect(subject.registrant_contacts).to be_a(Array) - expect(subject.registrant_contacts).to eq([]) - end - end - describe "#admin_contacts" do - it do - expect(subject.admin_contacts).to be_a(Array) - expect(subject.admin_contacts).to eq([]) - end - end - describe "#technical_contacts" do - it do - expect(subject.technical_contacts).to be_a(Array) - expect(subject.technical_contacts).to eq([]) - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers).to eq([]) - end + it "matches status_available.expected" do + expect(subject.domain).to eq(nil) + expect(subject.domain_id).to eq(nil) + expect(subject.status).to eq(:available) + expect(subject.available?).to eq(true) + expect(subject.registered?).to eq(false) + expect(subject.created_on).to eq(nil) + expect(subject.updated_on).to eq(nil) + expect { subject.expires_on }.to raise_error(Whois::AttributeNotSupported) + expect(subject.registrar).to eq(nil) + expect(subject.registrant_contacts).to be_a(Array) + expect(subject.registrant_contacts).to eq([]) + expect(subject.admin_contacts).to be_a(Array) + expect(subject.admin_contacts).to eq([]) + expect(subject.technical_contacts).to be_a(Array) + expect(subject.technical_contacts).to eq([]) + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers).to eq([]) end end diff --git a/spec/whois/parsers/responses/whois.rrpproxy.net/status_registered_spec.rb b/spec/whois/parsers/responses/whois.rrpproxy.net/status_registered_spec.rb index 23446cb7..a14bb332 100644 --- a/spec/whois/parsers/responses/whois.rrpproxy.net/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.rrpproxy.net/status_registered_spec.rb @@ -11,144 +11,93 @@ # require 'spec_helper' -require 'whois/parsers/whois.rrpproxy.net.rb' -describe Whois::Parsers::WhoisRrpproxyNet, "status_registered.expected" do +describe "whois.rrpproxy.net", :aggregate_failures do subject do file = fixture("responses", "whois.rrpproxy.net/status_registered.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.rrpproxy.net") + Whois::Parser.parser_for(part) end - describe "#domain" do - it do - expect(subject.domain).to eq("multisafepay.com") - end - end - describe "#domain_id" do - it do - expect(subject.domain_id).to eq("334322677_DOMAIN_COM-VRSN") - end - end - describe "#status" do - it do - expect(subject.status).to eq(:registered) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(false) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(true) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to be_a(Time) - expect(subject.created_on).to eq(DateTime.parse("2006-02-03 19:44:56 UTC")) - end - end - describe "#updated_on" do - it do - expect(subject.updated_on).to be_a(Time) - expect(subject.updated_on).to eq(DateTime.parse("2014-02-04 08:34:14 UTC")) - end - end - describe "#expires_on" do - it do - expect { subject.expires_on }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#registrar" do - it do - expect(subject.registrar).to be_a(Whois::Parser::Registrar) - expect(subject.registrar.id).to eq("269") - expect(subject.registrar.name).to eq("Key-Systems GmbH") - expect(subject.registrar.url).to eq("http://www.reasonnet.com") - end - end - describe "#registrant_contacts" do - it do - expect(subject.registrant_contacts).to be_a(Array) - expect(subject.registrant_contacts.size).to eq(1) - expect(subject.registrant_contacts[0]).to be_a(Whois::Parser::Contact) - expect(subject.registrant_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_REGISTRANT) - expect(subject.registrant_contacts[0].id).to eq("P-DQJ547") - expect(subject.registrant_contacts[0].name).to eq("David Jacobs") - expect(subject.registrant_contacts[0].organization).to eq("ReasonNet B.V.") - expect(subject.registrant_contacts[0].address).to eq("Gyroscoopweg 134") - expect(subject.registrant_contacts[0].city).to eq("Amsterdam") - expect(subject.registrant_contacts[0].zip).to eq("1042 AZ") - expect(subject.registrant_contacts[0].state).to eq("NH") - expect(subject.registrant_contacts[0].country).to eq(nil) - expect(subject.registrant_contacts[0].country_code).to eq("NL") - expect(subject.registrant_contacts[0].phone).to eq("+31.205060035") - expect(subject.registrant_contacts[0].fax).to eq("+31.205060038") - expect(subject.registrant_contacts[0].email).to eq("domains@reasonnet.com") - expect(subject.registrant_contacts[0].created_on).to eq(nil) - expect(subject.registrant_contacts[0].updated_on).to eq(nil) - end - end - describe "#admin_contacts" do - it do - expect(subject.admin_contacts).to be_a(Array) - expect(subject.admin_contacts.size).to eq(1) - expect(subject.admin_contacts[0]).to be_a(Whois::Parser::Contact) - expect(subject.admin_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_ADMINISTRATIVE) - expect(subject.admin_contacts[0].id).to eq("P-OEG220") - expect(subject.admin_contacts[0].name).to eq("Olaf Geurs") - expect(subject.admin_contacts[0].organization).to eq("ION") - expect(subject.admin_contacts[0].address).to eq("Vlierweg 12") - expect(subject.admin_contacts[0].city).to eq("Amsterdam") - expect(subject.admin_contacts[0].zip).to eq("1032 LG") - expect(subject.admin_contacts[0].state).to eq("NH") - expect(subject.admin_contacts[0].country).to eq(nil) - expect(subject.admin_contacts[0].country_code).to eq("NL") - expect(subject.admin_contacts[0].phone).to eq("+31.204949100") - expect(subject.admin_contacts[0].fax).to eq("") - expect(subject.admin_contacts[0].email).to eq("domains@reasonnet.com") - expect(subject.admin_contacts[0].created_on).to eq(nil) - expect(subject.admin_contacts[0].updated_on).to eq(nil) - end - end - describe "#technical_contacts" do - it do - expect(subject.technical_contacts).to be_a(Array) - expect(subject.technical_contacts.size).to eq(1) - expect(subject.technical_contacts[0]).to be_a(Whois::Parser::Contact) - expect(subject.technical_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_TECHNICAL) - expect(subject.technical_contacts[0].id).to eq("P-OEG220") - expect(subject.technical_contacts[0].name).to eq("Olaf Geurs") - expect(subject.technical_contacts[0].organization).to eq("ION") - expect(subject.technical_contacts[0].address).to eq("Vlierweg 12") - expect(subject.technical_contacts[0].city).to eq("Amsterdam") - expect(subject.technical_contacts[0].zip).to eq("1032 LG") - expect(subject.technical_contacts[0].state).to eq("NH") - expect(subject.technical_contacts[0].country).to eq(nil) - expect(subject.technical_contacts[0].country_code).to eq("NL") - expect(subject.technical_contacts[0].phone).to eq("+31.204949100") - expect(subject.technical_contacts[0].fax).to eq("") - expect(subject.technical_contacts[0].email).to eq("domains@reasonnet.com") - expect(subject.technical_contacts[0].created_on).to eq(nil) - expect(subject.technical_contacts[0].updated_on).to eq(nil) - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers.size).to eq(2) - expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[0].name).to eq("ns.teletik.nl") - expect(subject.nameservers[0].ipv4).to eq(nil) - expect(subject.nameservers[0].ipv6).to eq(nil) - expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[1].name).to eq("ns3.teletik.nl") - expect(subject.nameservers[1].ipv4).to eq(nil) - expect(subject.nameservers[1].ipv6).to eq(nil) - end + it "matches status_registered.expected" do + expect(subject.domain).to eq("multisafepay.com") + expect(subject.domain_id).to eq("334322677_DOMAIN_COM-VRSN") + expect(subject.status).to eq(:registered) + expect(subject.available?).to eq(false) + expect(subject.registered?).to eq(true) + expect(subject.created_on).to be_a(Time) + expect(subject.created_on).to eq(DateTime.parse("2006-02-03 19:44:56 UTC")) + expect(subject.updated_on).to be_a(Time) + expect(subject.updated_on).to eq(DateTime.parse("2014-02-04 08:34:14 UTC")) + expect { subject.expires_on }.to raise_error(Whois::AttributeNotSupported) + expect(subject.registrar).to be_a(Whois::Parser::Registrar) + expect(subject.registrar.id).to eq("269") + expect(subject.registrar.name).to eq("Key-Systems GmbH") + expect(subject.registrar.url).to eq("http://www.reasonnet.com") + expect(subject.registrant_contacts).to be_a(Array) + expect(subject.registrant_contacts.size).to eq(1) + expect(subject.registrant_contacts[0]).to be_a(Whois::Parser::Contact) + expect(subject.registrant_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_REGISTRANT) + expect(subject.registrant_contacts[0].id).to eq("P-DQJ547") + expect(subject.registrant_contacts[0].name).to eq("David Jacobs") + expect(subject.registrant_contacts[0].organization).to eq("ReasonNet B.V.") + expect(subject.registrant_contacts[0].address).to eq("Gyroscoopweg 134") + expect(subject.registrant_contacts[0].city).to eq("Amsterdam") + expect(subject.registrant_contacts[0].zip).to eq("1042 AZ") + expect(subject.registrant_contacts[0].state).to eq("NH") + expect(subject.registrant_contacts[0].country).to eq(nil) + expect(subject.registrant_contacts[0].country_code).to eq("NL") + expect(subject.registrant_contacts[0].phone).to eq("+31.205060035") + expect(subject.registrant_contacts[0].fax).to eq("+31.205060038") + expect(subject.registrant_contacts[0].email).to eq("domains@reasonnet.com") + expect(subject.registrant_contacts[0].created_on).to eq(nil) + expect(subject.registrant_contacts[0].updated_on).to eq(nil) + expect(subject.admin_contacts).to be_a(Array) + expect(subject.admin_contacts.size).to eq(1) + expect(subject.admin_contacts[0]).to be_a(Whois::Parser::Contact) + expect(subject.admin_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_ADMINISTRATIVE) + expect(subject.admin_contacts[0].id).to eq("P-OEG220") + expect(subject.admin_contacts[0].name).to eq("Olaf Geurs") + expect(subject.admin_contacts[0].organization).to eq("ION") + expect(subject.admin_contacts[0].address).to eq("Vlierweg 12") + expect(subject.admin_contacts[0].city).to eq("Amsterdam") + expect(subject.admin_contacts[0].zip).to eq("1032 LG") + expect(subject.admin_contacts[0].state).to eq("NH") + expect(subject.admin_contacts[0].country).to eq(nil) + expect(subject.admin_contacts[0].country_code).to eq("NL") + expect(subject.admin_contacts[0].phone).to eq("+31.204949100") + expect(subject.admin_contacts[0].fax).to eq("") + expect(subject.admin_contacts[0].email).to eq("domains@reasonnet.com") + expect(subject.admin_contacts[0].created_on).to eq(nil) + expect(subject.admin_contacts[0].updated_on).to eq(nil) + expect(subject.technical_contacts).to be_a(Array) + expect(subject.technical_contacts.size).to eq(1) + expect(subject.technical_contacts[0]).to be_a(Whois::Parser::Contact) + expect(subject.technical_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_TECHNICAL) + expect(subject.technical_contacts[0].id).to eq("P-OEG220") + expect(subject.technical_contacts[0].name).to eq("Olaf Geurs") + expect(subject.technical_contacts[0].organization).to eq("ION") + expect(subject.technical_contacts[0].address).to eq("Vlierweg 12") + expect(subject.technical_contacts[0].city).to eq("Amsterdam") + expect(subject.technical_contacts[0].zip).to eq("1032 LG") + expect(subject.technical_contacts[0].state).to eq("NH") + expect(subject.technical_contacts[0].country).to eq(nil) + expect(subject.technical_contacts[0].country_code).to eq("NL") + expect(subject.technical_contacts[0].phone).to eq("+31.204949100") + expect(subject.technical_contacts[0].fax).to eq("") + expect(subject.technical_contacts[0].email).to eq("domains@reasonnet.com") + expect(subject.technical_contacts[0].created_on).to eq(nil) + expect(subject.technical_contacts[0].updated_on).to eq(nil) + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers.size).to eq(2) + expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[0].name).to eq("ns.teletik.nl") + expect(subject.nameservers[0].ipv4).to eq(nil) + expect(subject.nameservers[0].ipv6).to eq(nil) + expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[1].name).to eq("ns3.teletik.nl") + expect(subject.nameservers[1].ipv4).to eq(nil) + expect(subject.nameservers[1].ipv6).to eq(nil) end end diff --git a/spec/whois/parsers/responses/whois.safenames.net/status_registered_spec.rb b/spec/whois/parsers/responses/whois.safenames.net/status_registered_spec.rb index ab957bfe..d1483a7e 100644 --- a/spec/whois/parsers/responses/whois.safenames.net/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.safenames.net/status_registered_spec.rb @@ -11,141 +11,90 @@ # require 'spec_helper' -require 'whois/parsers/whois.safenames.net.rb' -describe Whois::Parsers::WhoisSafenamesNet, "status_registered.expected" do +describe "whois.safenames.net", :aggregate_failures do subject do file = fixture("responses", "whois.safenames.net/status_registered.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.safenames.net") + Whois::Parser.parser_for(part) end - describe "#domain" do - it do - expect(subject.domain).to eq("stripe.com") - end - end - describe "#domain_id" do - it do - expect(subject.domain_id).to eq(nil) - end - end - describe "#status" do - it do - expect(subject.status).to eq(:registered) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(false) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(true) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to be_a(Time) - expect(subject.created_on).to eq(DateTime.parse("1995-09-12T04:00:00Z")) - end - end - describe "#updated_on" do - it do - expect(subject.updated_on).to be_a(Time) - expect(subject.updated_on).to eq(DateTime.parse("2014-10-02T15:33:46Z")) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to be_a(Time) - expect(subject.expires_on).to eq(DateTime.parse("2024-09-11T04:00:00Z")) - end - end - describe "#registrar" do - it do - expect(subject.registrar).to be_a(Whois::Parser::Registrar) - expect(subject.registrar.id).to eq("447") - expect(subject.registrar.name).to eq("Safenames Ltd") - expect(subject.registrar.url).to eq("http://www.safenames.net") - end - end - describe "#registrant_contacts" do - it do - expect(subject.registrant_contacts).to be_a(Array) - expect(subject.registrant_contacts.size).to eq(1) - expect(subject.registrant_contacts[0]).to be_a(Whois::Parser::Contact) - expect(subject.registrant_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_REGISTRANT) - expect(subject.registrant_contacts[0].id).to eq(nil) - expect(subject.registrant_contacts[0].name).to eq("Domain Admin") - expect(subject.registrant_contacts[0].organization).to eq("Stripe") - expect(subject.registrant_contacts[0].address).to eq("3180 18th St") - expect(subject.registrant_contacts[0].city).to eq("San Francisco") - expect(subject.registrant_contacts[0].zip).to eq("94110") - expect(subject.registrant_contacts[0].state).to eq("CA") - expect(subject.registrant_contacts[0].country).to eq(nil) - expect(subject.registrant_contacts[0].country_code).to eq("US") - expect(subject.registrant_contacts[0].phone).to eq("+1.8772544179") - expect(subject.registrant_contacts[0].fax).to eq("") - expect(subject.registrant_contacts[0].email).to eq("dns@stripe.com") - expect(subject.registrant_contacts[0].created_on).to eq(nil) - expect(subject.registrant_contacts[0].updated_on).to eq(nil) - end - end - describe "#admin_contacts" do - it do - expect(subject.admin_contacts).to be_a(Array) - expect(subject.admin_contacts.size).to eq(1) - expect(subject.admin_contacts[0]).to be_a(Whois::Parser::Contact) - expect(subject.admin_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_ADMINISTRATIVE) - expect(subject.admin_contacts[0].id).to eq(nil) - expect(subject.admin_contacts[0].name).to eq("Domain Admin") - expect(subject.admin_contacts[0].organization).to eq("Stripe") - expect(subject.admin_contacts[0].address).to eq("3180 18th St") - expect(subject.admin_contacts[0].city).to eq("San Francisco") - expect(subject.admin_contacts[0].zip).to eq("94110") - expect(subject.admin_contacts[0].state).to eq("CA") - expect(subject.admin_contacts[0].country).to eq(nil) - expect(subject.admin_contacts[0].country_code).to eq("US") - expect(subject.admin_contacts[0].phone).to eq("+1.8772544179") - expect(subject.admin_contacts[0].fax).to eq("") - expect(subject.admin_contacts[0].email).to eq("dns@stripe.com") - expect(subject.admin_contacts[0].created_on).to eq(nil) - expect(subject.admin_contacts[0].updated_on).to eq(nil) - end - end - describe "#technical_contacts" do - it do - expect(subject.technical_contacts).to be_a(Array) - expect(subject.technical_contacts.size).to eq(1) - expect(subject.technical_contacts[0]).to be_a(Whois::Parser::Contact) - expect(subject.technical_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_TECHNICAL) - expect(subject.technical_contacts[0].id).to eq(nil) - expect(subject.technical_contacts[0].name).to eq("Domain Admin") - expect(subject.technical_contacts[0].organization).to eq("Stripe") - expect(subject.technical_contacts[0].address).to eq("3180 18th St") - expect(subject.technical_contacts[0].city).to eq("San Francisco") - expect(subject.technical_contacts[0].zip).to eq("94110") - expect(subject.technical_contacts[0].state).to eq("CA") - expect(subject.technical_contacts[0].country).to eq(nil) - expect(subject.technical_contacts[0].country_code).to eq("US") - expect(subject.technical_contacts[0].phone).to eq("+1.8772544179") - expect(subject.technical_contacts[0].fax).to eq("") - expect(subject.technical_contacts[0].email).to eq("dns@stripe.com") - expect(subject.technical_contacts[0].created_on).to eq(nil) - expect(subject.technical_contacts[0].updated_on).to eq(nil) - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers.size).to eq(2) - expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[0].name).to eq("dns1.idp365.net") - expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[1].name).to eq("dns2.idp365.net") - end + it "matches status_registered.expected" do + expect(subject.domain).to eq("stripe.com") + expect(subject.domain_id).to eq(nil) + expect(subject.status).to eq(:registered) + expect(subject.available?).to eq(false) + expect(subject.registered?).to eq(true) + expect(subject.created_on).to be_a(Time) + expect(subject.created_on).to eq(DateTime.parse("1995-09-12T04:00:00Z")) + expect(subject.updated_on).to be_a(Time) + expect(subject.updated_on).to eq(DateTime.parse("2014-10-02T15:33:46Z")) + expect(subject.expires_on).to be_a(Time) + expect(subject.expires_on).to eq(DateTime.parse("2024-09-11T04:00:00Z")) + expect(subject.registrar).to be_a(Whois::Parser::Registrar) + expect(subject.registrar.id).to eq("447") + expect(subject.registrar.name).to eq("Safenames Ltd") + expect(subject.registrar.url).to eq("http://www.safenames.net") + expect(subject.registrant_contacts).to be_a(Array) + expect(subject.registrant_contacts.size).to eq(1) + expect(subject.registrant_contacts[0]).to be_a(Whois::Parser::Contact) + expect(subject.registrant_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_REGISTRANT) + expect(subject.registrant_contacts[0].id).to eq(nil) + expect(subject.registrant_contacts[0].name).to eq("Domain Admin") + expect(subject.registrant_contacts[0].organization).to eq("Stripe") + expect(subject.registrant_contacts[0].address).to eq("3180 18th St") + expect(subject.registrant_contacts[0].city).to eq("San Francisco") + expect(subject.registrant_contacts[0].zip).to eq("94110") + expect(subject.registrant_contacts[0].state).to eq("CA") + expect(subject.registrant_contacts[0].country).to eq(nil) + expect(subject.registrant_contacts[0].country_code).to eq("US") + expect(subject.registrant_contacts[0].phone).to eq("+1.8772544179") + expect(subject.registrant_contacts[0].fax).to eq("") + expect(subject.registrant_contacts[0].email).to eq("dns@stripe.com") + expect(subject.registrant_contacts[0].created_on).to eq(nil) + expect(subject.registrant_contacts[0].updated_on).to eq(nil) + expect(subject.admin_contacts).to be_a(Array) + expect(subject.admin_contacts.size).to eq(1) + expect(subject.admin_contacts[0]).to be_a(Whois::Parser::Contact) + expect(subject.admin_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_ADMINISTRATIVE) + expect(subject.admin_contacts[0].id).to eq(nil) + expect(subject.admin_contacts[0].name).to eq("Domain Admin") + expect(subject.admin_contacts[0].organization).to eq("Stripe") + expect(subject.admin_contacts[0].address).to eq("3180 18th St") + expect(subject.admin_contacts[0].city).to eq("San Francisco") + expect(subject.admin_contacts[0].zip).to eq("94110") + expect(subject.admin_contacts[0].state).to eq("CA") + expect(subject.admin_contacts[0].country).to eq(nil) + expect(subject.admin_contacts[0].country_code).to eq("US") + expect(subject.admin_contacts[0].phone).to eq("+1.8772544179") + expect(subject.admin_contacts[0].fax).to eq("") + expect(subject.admin_contacts[0].email).to eq("dns@stripe.com") + expect(subject.admin_contacts[0].created_on).to eq(nil) + expect(subject.admin_contacts[0].updated_on).to eq(nil) + expect(subject.technical_contacts).to be_a(Array) + expect(subject.technical_contacts.size).to eq(1) + expect(subject.technical_contacts[0]).to be_a(Whois::Parser::Contact) + expect(subject.technical_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_TECHNICAL) + expect(subject.technical_contacts[0].id).to eq(nil) + expect(subject.technical_contacts[0].name).to eq("Domain Admin") + expect(subject.technical_contacts[0].organization).to eq("Stripe") + expect(subject.technical_contacts[0].address).to eq("3180 18th St") + expect(subject.technical_contacts[0].city).to eq("San Francisco") + expect(subject.technical_contacts[0].zip).to eq("94110") + expect(subject.technical_contacts[0].state).to eq("CA") + expect(subject.technical_contacts[0].country).to eq(nil) + expect(subject.technical_contacts[0].country_code).to eq("US") + expect(subject.technical_contacts[0].phone).to eq("+1.8772544179") + expect(subject.technical_contacts[0].fax).to eq("") + expect(subject.technical_contacts[0].email).to eq("dns@stripe.com") + expect(subject.technical_contacts[0].created_on).to eq(nil) + expect(subject.technical_contacts[0].updated_on).to eq(nil) + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers.size).to eq(2) + expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[0].name).to eq("dns1.idp365.net") + expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[1].name).to eq("dns2.idp365.net") end end diff --git a/spec/whois/parsers/responses/whois.schlund.info/registered_without_update_on_spec.rb b/spec/whois/parsers/responses/whois.schlund.info/registered_without_update_on_spec.rb index ffbda5e4..cadc65fd 100644 --- a/spec/whois/parsers/responses/whois.schlund.info/registered_without_update_on_spec.rb +++ b/spec/whois/parsers/responses/whois.schlund.info/registered_without_update_on_spec.rb @@ -11,19 +11,16 @@ # require 'spec_helper' -require 'whois/parsers/whois.schlund.info.rb' -describe Whois::Parsers::WhoisSchlundInfo, "registered_without_update_on.expected" do +describe "whois.schlund.info", :aggregate_failures do subject do file = fixture("responses", "whois.schlund.info/registered_without_update_on.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.schlund.info") + Whois::Parser.parser_for(part) end - describe "#updated_on" do - it do - expect(subject.updated_on).to eq(nil) - end + it "matches registered_without_update_on.expected" do + expect(subject.updated_on).to eq(nil) end end diff --git a/spec/whois/parsers/responses/whois.schlund.info/status_available_spec.rb b/spec/whois/parsers/responses/whois.schlund.info/status_available_spec.rb index 6ddde174..3c2cee71 100644 --- a/spec/whois/parsers/responses/whois.schlund.info/status_available_spec.rb +++ b/spec/whois/parsers/responses/whois.schlund.info/status_available_spec.rb @@ -11,83 +11,32 @@ # require 'spec_helper' -require 'whois/parsers/whois.schlund.info.rb' -describe Whois::Parsers::WhoisSchlundInfo, "status_available.expected" do +describe "whois.schlund.info", :aggregate_failures do subject do file = fixture("responses", "whois.schlund.info/status_available.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.schlund.info") + Whois::Parser.parser_for(part) end - describe "#domain" do - it do - expect(subject.domain).to eq(nil) - end - end - describe "#domain_id" do - it do - expect(subject.domain_id).to eq(nil) - end - end - describe "#status" do - it do - expect(subject.status).to eq(:available) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(true) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(false) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to eq(nil) - end - end - describe "#updated_on" do - it do - expect(subject.updated_on).to eq(nil) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to eq(nil) - end - end - describe "#registrar" do - it do - expect(subject.registrar).to eq(nil) - end - end - describe "#registrant_contacts" do - it do - expect(subject.registrant_contacts).to be_a(Array) - expect(subject.registrant_contacts).to eq([]) - end - end - describe "#admin_contacts" do - it do - expect(subject.admin_contacts).to be_a(Array) - expect(subject.admin_contacts).to eq([]) - end - end - describe "#technical_contacts" do - it do - expect(subject.technical_contacts).to be_a(Array) - expect(subject.technical_contacts).to eq([]) - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers).to eq([]) - end + it "matches status_available.expected" do + expect(subject.domain).to eq(nil) + expect(subject.domain_id).to eq(nil) + expect(subject.status).to eq(:available) + expect(subject.available?).to eq(true) + expect(subject.registered?).to eq(false) + expect(subject.created_on).to eq(nil) + expect(subject.updated_on).to eq(nil) + expect(subject.expires_on).to eq(nil) + expect(subject.registrar).to eq(nil) + expect(subject.registrant_contacts).to be_a(Array) + expect(subject.registrant_contacts).to eq([]) + expect(subject.admin_contacts).to be_a(Array) + expect(subject.admin_contacts).to eq([]) + expect(subject.technical_contacts).to be_a(Array) + expect(subject.technical_contacts).to eq([]) + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers).to eq([]) end end diff --git a/spec/whois/parsers/responses/whois.schlund.info/status_registered_spec.rb b/spec/whois/parsers/responses/whois.schlund.info/status_registered_spec.rb index f463ad2d..f6c1f8a4 100644 --- a/spec/whois/parsers/responses/whois.schlund.info/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.schlund.info/status_registered_spec.rb @@ -11,136 +11,85 @@ # require 'spec_helper' -require 'whois/parsers/whois.schlund.info.rb' -describe Whois::Parsers::WhoisSchlundInfo, "status_registered.expected" do +describe "whois.schlund.info", :aggregate_failures do subject do file = fixture("responses", "whois.schlund.info/status_registered.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.schlund.info") + Whois::Parser.parser_for(part) end - describe "#domain" do - it do - expect(subject.domain).to eq("schlund.com") - end - end - describe "#domain_id" do - it do - expect(subject.domain_id).to eq(nil) - end - end - describe "#status" do - it do - expect(subject.status).to eq(:registered) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(false) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(true) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to be_a(Time) - expect(subject.created_on).to eq(DateTime.parse("1996-10-10 00:00:00")) - end - end - describe "#updated_on" do - it do - expect(subject.updated_on).to be_a(Time) - expect(subject.updated_on).to eq(DateTime.parse("2013-10-09 00:00:00")) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to be_a(Time) - expect(subject.expires_on).to eq(DateTime.parse("2014-10-09 00:00:00")) - end - end - describe "#registrar" do - it do - expect(subject.registrar).to be_a(Whois::Parser::Registrar) - expect(subject.registrar.id).to eq("83") - expect(subject.registrar.name).to eq("1&1 Internet AG") - expect(subject.registrar.url).to eq("http://1and1.com") - end - end - describe "#registrant_contacts" do - it do - expect(subject.registrant_contacts).to be_a(Array) - expect(subject.registrant_contacts.size).to eq(1) - expect(subject.registrant_contacts[0]).to be_a(Whois::Parser::Contact) - expect(subject.registrant_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_REGISTRANT) - expect(subject.registrant_contacts[0].id).to eq(nil) - expect(subject.registrant_contacts[0].name).to eq("Markus Huhn") - expect(subject.registrant_contacts[0].organization).to eq("1&1 Internet AG") - expect(subject.registrant_contacts[0].address).to eq("Elgendorfer Str. 57") - expect(subject.registrant_contacts[0].city).to eq("Montabaur") - expect(subject.registrant_contacts[0].zip).to eq("56410") - expect(subject.registrant_contacts[0].state).to eq("") - expect(subject.registrant_contacts[0].country_code).to eq("DE") - expect(subject.registrant_contacts[0].phone).to eq("+49.2602960") - expect(subject.registrant_contacts[0].fax).to eq("+49.72191374215") - expect(subject.registrant_contacts[0].email).to eq("hostmaster@1und1.de") - end - end - describe "#admin_contacts" do - it do - expect(subject.admin_contacts).to be_a(Array) - expect(subject.admin_contacts.size).to eq(1) - expect(subject.admin_contacts[0]).to be_a(Whois::Parser::Contact) - expect(subject.admin_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_ADMINISTRATIVE) - expect(subject.admin_contacts[0].id).to eq(nil) - expect(subject.admin_contacts[0].name).to eq("Markus Huhn") - expect(subject.admin_contacts[0].organization).to eq("1&1 Internet AG") - expect(subject.admin_contacts[0].address).to eq("Elgendorfer Str. 57") - expect(subject.admin_contacts[0].city).to eq("Montabaur") - expect(subject.admin_contacts[0].zip).to eq("56410") - expect(subject.admin_contacts[0].state).to eq("") - expect(subject.admin_contacts[0].country_code).to eq("DE") - expect(subject.admin_contacts[0].phone).to eq("+49.2602960") - expect(subject.admin_contacts[0].fax).to eq("+49.72191374215") - expect(subject.admin_contacts[0].email).to eq("hostmaster@1und1.de") - end - end - describe "#technical_contacts" do - it do - expect(subject.technical_contacts).to be_a(Array) - expect(subject.technical_contacts.size).to eq(1) - expect(subject.technical_contacts[0]).to be_a(Whois::Parser::Contact) - expect(subject.technical_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_TECHNICAL) - expect(subject.technical_contacts[0].id).to eq(nil) - expect(subject.technical_contacts[0].name).to eq("Hostmaster EINSUNDEINS") - expect(subject.technical_contacts[0].organization).to eq("1&1 Internet AG") - expect(subject.technical_contacts[0].address).to eq("Brauerstr. 48") - expect(subject.technical_contacts[0].city).to eq("Karlsruhe") - expect(subject.technical_contacts[0].zip).to eq("76135") - expect(subject.technical_contacts[0].state).to eq("") - expect(subject.technical_contacts[0].country_code).to eq("DE") - expect(subject.technical_contacts[0].phone).to eq("+49.7219600") - expect(subject.technical_contacts[0].fax).to eq("+49.72191374248") - expect(subject.technical_contacts[0].email).to eq("hostmaster@1und1.de") - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers.size).to eq(4) - expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[0].name).to eq("ns-1and1.ui-dns.com") - expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[1].name).to eq("ns-1and1.ui-dns.org") - expect(subject.nameservers[2]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[2].name).to eq("ns-1and1.ui-dns.de") - expect(subject.nameservers[3]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[3].name).to eq("ns-1and1.ui-dns.biz") - end + it "matches status_registered.expected" do + expect(subject.domain).to eq("schlund.com") + expect(subject.domain_id).to eq(nil) + expect(subject.status).to eq(:registered) + expect(subject.available?).to eq(false) + expect(subject.registered?).to eq(true) + expect(subject.created_on).to be_a(Time) + expect(subject.created_on).to eq(DateTime.parse("1996-10-10 00:00:00")) + expect(subject.updated_on).to be_a(Time) + expect(subject.updated_on).to eq(DateTime.parse("2013-10-09 00:00:00")) + expect(subject.expires_on).to be_a(Time) + expect(subject.expires_on).to eq(DateTime.parse("2014-10-09 00:00:00")) + expect(subject.registrar).to be_a(Whois::Parser::Registrar) + expect(subject.registrar.id).to eq("83") + expect(subject.registrar.name).to eq("1&1 Internet AG") + expect(subject.registrar.url).to eq("http://1and1.com") + expect(subject.registrant_contacts).to be_a(Array) + expect(subject.registrant_contacts.size).to eq(1) + expect(subject.registrant_contacts[0]).to be_a(Whois::Parser::Contact) + expect(subject.registrant_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_REGISTRANT) + expect(subject.registrant_contacts[0].id).to eq(nil) + expect(subject.registrant_contacts[0].name).to eq("Markus Huhn") + expect(subject.registrant_contacts[0].organization).to eq("1&1 Internet AG") + expect(subject.registrant_contacts[0].address).to eq("Elgendorfer Str. 57") + expect(subject.registrant_contacts[0].city).to eq("Montabaur") + expect(subject.registrant_contacts[0].zip).to eq("56410") + expect(subject.registrant_contacts[0].state).to eq("") + expect(subject.registrant_contacts[0].country_code).to eq("DE") + expect(subject.registrant_contacts[0].phone).to eq("+49.2602960") + expect(subject.registrant_contacts[0].fax).to eq("+49.72191374215") + expect(subject.registrant_contacts[0].email).to eq("hostmaster@1und1.de") + expect(subject.admin_contacts).to be_a(Array) + expect(subject.admin_contacts.size).to eq(1) + expect(subject.admin_contacts[0]).to be_a(Whois::Parser::Contact) + expect(subject.admin_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_ADMINISTRATIVE) + expect(subject.admin_contacts[0].id).to eq(nil) + expect(subject.admin_contacts[0].name).to eq("Markus Huhn") + expect(subject.admin_contacts[0].organization).to eq("1&1 Internet AG") + expect(subject.admin_contacts[0].address).to eq("Elgendorfer Str. 57") + expect(subject.admin_contacts[0].city).to eq("Montabaur") + expect(subject.admin_contacts[0].zip).to eq("56410") + expect(subject.admin_contacts[0].state).to eq("") + expect(subject.admin_contacts[0].country_code).to eq("DE") + expect(subject.admin_contacts[0].phone).to eq("+49.2602960") + expect(subject.admin_contacts[0].fax).to eq("+49.72191374215") + expect(subject.admin_contacts[0].email).to eq("hostmaster@1und1.de") + expect(subject.technical_contacts).to be_a(Array) + expect(subject.technical_contacts.size).to eq(1) + expect(subject.technical_contacts[0]).to be_a(Whois::Parser::Contact) + expect(subject.technical_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_TECHNICAL) + expect(subject.technical_contacts[0].id).to eq(nil) + expect(subject.technical_contacts[0].name).to eq("Hostmaster EINSUNDEINS") + expect(subject.technical_contacts[0].organization).to eq("1&1 Internet AG") + expect(subject.technical_contacts[0].address).to eq("Brauerstr. 48") + expect(subject.technical_contacts[0].city).to eq("Karlsruhe") + expect(subject.technical_contacts[0].zip).to eq("76135") + expect(subject.technical_contacts[0].state).to eq("") + expect(subject.technical_contacts[0].country_code).to eq("DE") + expect(subject.technical_contacts[0].phone).to eq("+49.7219600") + expect(subject.technical_contacts[0].fax).to eq("+49.72191374248") + expect(subject.technical_contacts[0].email).to eq("hostmaster@1und1.de") + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers.size).to eq(4) + expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[0].name).to eq("ns-1and1.ui-dns.com") + expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[1].name).to eq("ns-1and1.ui-dns.org") + expect(subject.nameservers[2]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[2].name).to eq("ns-1and1.ui-dns.de") + expect(subject.nameservers[3]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[3].name).to eq("ns-1and1.ui-dns.biz") end end diff --git a/spec/whois/parsers/responses/whois.sgnic.sg/sg/property_nameservers_schema_1_spec.rb b/spec/whois/parsers/responses/whois.sgnic.sg/sg/property_nameservers_schema_1_spec.rb index 33300f59..1edca977 100644 --- a/spec/whois/parsers/responses/whois.sgnic.sg/sg/property_nameservers_schema_1_spec.rb +++ b/spec/whois/parsers/responses/whois.sgnic.sg/sg/property_nameservers_schema_1_spec.rb @@ -11,28 +11,25 @@ # require 'spec_helper' -require 'whois/parsers/whois.sgnic.sg.rb' -describe Whois::Parsers::WhoisSgnicSg, "property_nameservers_schema_1.expected" do +describe "whois.sgnic.sg", :aggregate_failures do subject do file = fixture("responses", "whois.sgnic.sg/sg/property_nameservers_schema_1.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.sgnic.sg") + Whois::Parser.parser_for(part) end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers.size).to eq(4) - expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[0].name).to eq("ns1.google.com") - expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[1].name).to eq("ns2.google.com") - expect(subject.nameservers[2]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[2].name).to eq("ns3.google.com") - expect(subject.nameservers[3]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[3].name).to eq("ns4.google.com") - end + it "matches property_nameservers_schema_1.expected" do + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers.size).to eq(4) + expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[0].name).to eq("ns1.google.com") + expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[1].name).to eq("ns2.google.com") + expect(subject.nameservers[2]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[2].name).to eq("ns3.google.com") + expect(subject.nameservers[3]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[3].name).to eq("ns4.google.com") end end diff --git a/spec/whois/parsers/responses/whois.sgnic.sg/sg/property_nameservers_schema_1_with_ip_spec.rb b/spec/whois/parsers/responses/whois.sgnic.sg/sg/property_nameservers_schema_1_with_ip_spec.rb index 4ec5581c..5193566f 100644 --- a/spec/whois/parsers/responses/whois.sgnic.sg/sg/property_nameservers_schema_1_with_ip_spec.rb +++ b/spec/whois/parsers/responses/whois.sgnic.sg/sg/property_nameservers_schema_1_with_ip_spec.rb @@ -11,29 +11,26 @@ # require 'spec_helper' -require 'whois/parsers/whois.sgnic.sg.rb' -describe Whois::Parsers::WhoisSgnicSg, "property_nameservers_schema_1_with_ip.expected" do +describe "whois.sgnic.sg", :aggregate_failures do subject do file = fixture("responses", "whois.sgnic.sg/sg/property_nameservers_schema_1_with_ip.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.sgnic.sg") + Whois::Parser.parser_for(part) end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers.size).to eq(3) - expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[0].name).to eq("dnssec1.singnet.com.sg") - expect(subject.nameservers[0].ipv4).to eq("165.21.83.11") - expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[1].name).to eq("dnssec2.singnet.com.sg") - expect(subject.nameservers[1].ipv4).to eq("195.13.10.226") - expect(subject.nameservers[2]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[2].name).to eq("dnssec3.singnet.com.sg") - expect(subject.nameservers[2].ipv4).to eq("165.21.100.11") - end + it "matches property_nameservers_schema_1_with_ip.expected" do + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers.size).to eq(3) + expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[0].name).to eq("dnssec1.singnet.com.sg") + expect(subject.nameservers[0].ipv4).to eq("165.21.83.11") + expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[1].name).to eq("dnssec2.singnet.com.sg") + expect(subject.nameservers[1].ipv4).to eq("195.13.10.226") + expect(subject.nameservers[2]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[2].name).to eq("dnssec3.singnet.com.sg") + expect(subject.nameservers[2].ipv4).to eq("165.21.100.11") end end diff --git a/spec/whois/parsers/responses/whois.sgnic.sg/sg/property_nameservers_schema_2_spec.rb b/spec/whois/parsers/responses/whois.sgnic.sg/sg/property_nameservers_schema_2_spec.rb index 06bd70a9..bd97b6fe 100644 --- a/spec/whois/parsers/responses/whois.sgnic.sg/sg/property_nameservers_schema_2_spec.rb +++ b/spec/whois/parsers/responses/whois.sgnic.sg/sg/property_nameservers_schema_2_spec.rb @@ -11,28 +11,25 @@ # require 'spec_helper' -require 'whois/parsers/whois.sgnic.sg.rb' -describe Whois::Parsers::WhoisSgnicSg, "property_nameservers_schema_2.expected" do +describe "whois.sgnic.sg", :aggregate_failures do subject do file = fixture("responses", "whois.sgnic.sg/sg/property_nameservers_schema_2.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.sgnic.sg") + Whois::Parser.parser_for(part) end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers.size).to eq(4) - expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[0].name).to eq("ns1.google.com") - expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[1].name).to eq("ns2.google.com") - expect(subject.nameservers[2]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[2].name).to eq("ns3.google.com") - expect(subject.nameservers[3]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[3].name).to eq("ns4.google.com") - end + it "matches property_nameservers_schema_2.expected" do + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers.size).to eq(4) + expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[0].name).to eq("ns1.google.com") + expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[1].name).to eq("ns2.google.com") + expect(subject.nameservers[2]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[2].name).to eq("ns3.google.com") + expect(subject.nameservers[3]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[3].name).to eq("ns4.google.com") end end diff --git a/spec/whois/parsers/responses/whois.sgnic.sg/sg/status_available_spec.rb b/spec/whois/parsers/responses/whois.sgnic.sg/sg/status_available_spec.rb index 34bca94a..0e5c6690 100644 --- a/spec/whois/parsers/responses/whois.sgnic.sg/sg/status_available_spec.rb +++ b/spec/whois/parsers/responses/whois.sgnic.sg/sg/status_available_spec.rb @@ -11,50 +11,23 @@ # require 'spec_helper' -require 'whois/parsers/whois.sgnic.sg.rb' -describe Whois::Parsers::WhoisSgnicSg, "status_available.expected" do +describe "whois.sgnic.sg", :aggregate_failures do subject do file = fixture("responses", "whois.sgnic.sg/sg/status_available.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.sgnic.sg") + Whois::Parser.parser_for(part) end - describe "#status" do - it do - expect(subject.status).to eq([]) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(true) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(false) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to eq(nil) - end - end - describe "#updated_on" do - it do - expect { subject.updated_on }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to eq(nil) - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers).to eq([]) - end + it "matches status_available.expected" do + expect(subject.status).to eq([]) + expect(subject.available?).to eq(true) + expect(subject.registered?).to eq(false) + expect(subject.created_on).to eq(nil) + expect { subject.updated_on }.to raise_error(Whois::AttributeNotSupported) + expect(subject.expires_on).to eq(nil) + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers).to eq([]) end end diff --git a/spec/whois/parsers/responses/whois.sgnic.sg/sg/status_registered_spec.rb b/spec/whois/parsers/responses/whois.sgnic.sg/sg/status_registered_spec.rb index 5546c3e8..b30853c9 100644 --- a/spec/whois/parsers/responses/whois.sgnic.sg/sg/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.sgnic.sg/sg/status_registered_spec.rb @@ -11,60 +11,33 @@ # require 'spec_helper' -require 'whois/parsers/whois.sgnic.sg.rb' -describe Whois::Parsers::WhoisSgnicSg, "status_registered.expected" do +describe "whois.sgnic.sg", :aggregate_failures do subject do file = fixture("responses", "whois.sgnic.sg/sg/status_registered.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.sgnic.sg") + Whois::Parser.parser_for(part) end - describe "#status" do - it do - expect(subject.status).to eq(["OK", "CLIENT UPDATE PROHIBITED", "CLIENT TRANSFER PROHIBITED", "CLIENT DELETE PROHIBITED", "VerifiedID@SG-Not Required"]) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(false) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(true) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to be_a(Time) - expect(subject.created_on).to eq(DateTime.parse("2005-01-03 12:00:00")) - end - end - describe "#updated_on" do - it do - expect { subject.updated_on }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to be_a(Time) - expect(subject.expires_on).to eq(DateTime.parse("2015-01-03 00:00:00")) - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers.size).to eq(4) - expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[0].name).to eq("ns1.google.com") - expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[1].name).to eq("ns2.google.com") - expect(subject.nameservers[2]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[2].name).to eq("ns3.google.com") - expect(subject.nameservers[3]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[3].name).to eq("ns4.google.com") - end + it "matches status_registered.expected" do + expect(subject.status).to eq(["OK", "CLIENT UPDATE PROHIBITED", "CLIENT TRANSFER PROHIBITED", "CLIENT DELETE PROHIBITED", "VerifiedID@SG-Not Required"]) + expect(subject.available?).to eq(false) + expect(subject.registered?).to eq(true) + expect(subject.created_on).to be_a(Time) + expect(subject.created_on).to eq(DateTime.parse("2005-01-03 12:00:00")) + expect { subject.updated_on }.to raise_error(Whois::AttributeNotSupported) + expect(subject.expires_on).to be_a(Time) + expect(subject.expires_on).to eq(DateTime.parse("2015-01-03 00:00:00")) + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers.size).to eq(4) + expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[0].name).to eq("ns1.google.com") + expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[1].name).to eq("ns2.google.com") + expect(subject.nameservers[2]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[2].name).to eq("ns3.google.com") + expect(subject.nameservers[3]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[3].name).to eq("ns4.google.com") end end diff --git a/spec/whois/parsers/responses/whois.sk-nic.sk/sk/property_status_dom_dakt_spec.rb b/spec/whois/parsers/responses/whois.sk-nic.sk/sk/property_status_dom_dakt_spec.rb index ac9a48bd..600a58da 100644 --- a/spec/whois/parsers/responses/whois.sk-nic.sk/sk/property_status_dom_dakt_spec.rb +++ b/spec/whois/parsers/responses/whois.sk-nic.sk/sk/property_status_dom_dakt_spec.rb @@ -11,29 +11,18 @@ # require 'spec_helper' -require 'whois/parsers/whois.sk-nic.sk.rb' -describe Whois::Parsers::WhoisSkNicSk, "property_status_dom_dakt.expected" do +describe "whois.sk-nic.sk", :aggregate_failures do subject do file = fixture("responses", "whois.sk-nic.sk/sk/property_status_dom_dakt.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.sk-nic.sk") + Whois::Parser.parser_for(part) end - describe "#status" do - it do - expect(subject.status).to eq(:registered) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(false) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(true) - end + it "matches property_status_dom_dakt.expected" do + expect(subject.status).to eq(:registered) + expect(subject.available?).to eq(false) + expect(subject.registered?).to eq(true) end end diff --git a/spec/whois/parsers/responses/whois.sk-nic.sk/sk/property_status_dom_exp_spec.rb b/spec/whois/parsers/responses/whois.sk-nic.sk/sk/property_status_dom_exp_spec.rb index 754f60d8..e8c726bb 100644 --- a/spec/whois/parsers/responses/whois.sk-nic.sk/sk/property_status_dom_exp_spec.rb +++ b/spec/whois/parsers/responses/whois.sk-nic.sk/sk/property_status_dom_exp_spec.rb @@ -11,29 +11,18 @@ # require 'spec_helper' -require 'whois/parsers/whois.sk-nic.sk.rb' -describe Whois::Parsers::WhoisSkNicSk, "property_status_dom_exp.expected" do +describe "whois.sk-nic.sk", :aggregate_failures do subject do file = fixture("responses", "whois.sk-nic.sk/sk/property_status_dom_exp.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.sk-nic.sk") + Whois::Parser.parser_for(part) end - describe "#status" do - it do - expect(subject.status).to eq(:registered) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(false) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(true) - end + it "matches property_status_dom_exp.expected" do + expect(subject.status).to eq(:registered) + expect(subject.available?).to eq(false) + expect(subject.registered?).to eq(true) end end diff --git a/spec/whois/parsers/responses/whois.sk-nic.sk/sk/property_status_dom_held_spec.rb b/spec/whois/parsers/responses/whois.sk-nic.sk/sk/property_status_dom_held_spec.rb index 0c7bb50e..8d03ed7b 100644 --- a/spec/whois/parsers/responses/whois.sk-nic.sk/sk/property_status_dom_held_spec.rb +++ b/spec/whois/parsers/responses/whois.sk-nic.sk/sk/property_status_dom_held_spec.rb @@ -11,29 +11,18 @@ # require 'spec_helper' -require 'whois/parsers/whois.sk-nic.sk.rb' -describe Whois::Parsers::WhoisSkNicSk, "property_status_dom_held.expected" do +describe "whois.sk-nic.sk", :aggregate_failures do subject do file = fixture("responses", "whois.sk-nic.sk/sk/property_status_dom_held.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.sk-nic.sk") + Whois::Parser.parser_for(part) end - describe "#status" do - it do - expect(subject.status).to eq(:redemption) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(false) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(true) - end + it "matches property_status_dom_held.expected" do + expect(subject.status).to eq(:redemption) + expect(subject.available?).to eq(false) + expect(subject.registered?).to eq(true) end end diff --git a/spec/whois/parsers/responses/whois.sk-nic.sk/sk/property_status_dom_lnot_spec.rb b/spec/whois/parsers/responses/whois.sk-nic.sk/sk/property_status_dom_lnot_spec.rb index 79f24c43..ac06825c 100644 --- a/spec/whois/parsers/responses/whois.sk-nic.sk/sk/property_status_dom_lnot_spec.rb +++ b/spec/whois/parsers/responses/whois.sk-nic.sk/sk/property_status_dom_lnot_spec.rb @@ -11,29 +11,18 @@ # require 'spec_helper' -require 'whois/parsers/whois.sk-nic.sk.rb' -describe Whois::Parsers::WhoisSkNicSk, "property_status_dom_lnot.expected" do +describe "whois.sk-nic.sk", :aggregate_failures do subject do file = fixture("responses", "whois.sk-nic.sk/sk/property_status_dom_lnot.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.sk-nic.sk") + Whois::Parser.parser_for(part) end - describe "#status" do - it do - expect(subject.status).to eq(:registered) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(false) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(true) - end + it "matches property_status_dom_lnot.expected" do + expect(subject.status).to eq(:registered) + expect(subject.available?).to eq(false) + expect(subject.registered?).to eq(true) end end diff --git a/spec/whois/parsers/responses/whois.sk-nic.sk/sk/property_status_dom_ok_spec.rb b/spec/whois/parsers/responses/whois.sk-nic.sk/sk/property_status_dom_ok_spec.rb index aee31ac5..768427b7 100644 --- a/spec/whois/parsers/responses/whois.sk-nic.sk/sk/property_status_dom_ok_spec.rb +++ b/spec/whois/parsers/responses/whois.sk-nic.sk/sk/property_status_dom_ok_spec.rb @@ -11,29 +11,18 @@ # require 'spec_helper' -require 'whois/parsers/whois.sk-nic.sk.rb' -describe Whois::Parsers::WhoisSkNicSk, "property_status_dom_ok.expected" do +describe "whois.sk-nic.sk", :aggregate_failures do subject do file = fixture("responses", "whois.sk-nic.sk/sk/property_status_dom_ok.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.sk-nic.sk") + Whois::Parser.parser_for(part) end - describe "#status" do - it do - expect(subject.status).to eq(:registered) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(false) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(true) - end + it "matches property_status_dom_ok.expected" do + expect(subject.status).to eq(:registered) + expect(subject.available?).to eq(false) + expect(subject.registered?).to eq(true) end end diff --git a/spec/whois/parsers/responses/whois.sk-nic.sk/sk/property_status_dom_ta_spec.rb b/spec/whois/parsers/responses/whois.sk-nic.sk/sk/property_status_dom_ta_spec.rb index 77a7d600..7fb89b23 100644 --- a/spec/whois/parsers/responses/whois.sk-nic.sk/sk/property_status_dom_ta_spec.rb +++ b/spec/whois/parsers/responses/whois.sk-nic.sk/sk/property_status_dom_ta_spec.rb @@ -11,29 +11,18 @@ # require 'spec_helper' -require 'whois/parsers/whois.sk-nic.sk.rb' -describe Whois::Parsers::WhoisSkNicSk, "property_status_dom_ta.expected" do +describe "whois.sk-nic.sk", :aggregate_failures do subject do file = fixture("responses", "whois.sk-nic.sk/sk/property_status_dom_ta.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.sk-nic.sk") + Whois::Parser.parser_for(part) end - describe "#status" do - it do - expect(subject.status).to eq(:registered) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(false) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(true) - end + it "matches property_status_dom_ta.expected" do + expect(subject.status).to eq(:registered) + expect(subject.available?).to eq(false) + expect(subject.registered?).to eq(true) end end diff --git a/spec/whois/parsers/responses/whois.sk-nic.sk/sk/property_status_dom_warn_spec.rb b/spec/whois/parsers/responses/whois.sk-nic.sk/sk/property_status_dom_warn_spec.rb index 8d276c52..3611e530 100644 --- a/spec/whois/parsers/responses/whois.sk-nic.sk/sk/property_status_dom_warn_spec.rb +++ b/spec/whois/parsers/responses/whois.sk-nic.sk/sk/property_status_dom_warn_spec.rb @@ -11,29 +11,18 @@ # require 'spec_helper' -require 'whois/parsers/whois.sk-nic.sk.rb' -describe Whois::Parsers::WhoisSkNicSk, "property_status_dom_warn.expected" do +describe "whois.sk-nic.sk", :aggregate_failures do subject do file = fixture("responses", "whois.sk-nic.sk/sk/property_status_dom_warn.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.sk-nic.sk") + Whois::Parser.parser_for(part) end - describe "#status" do - it do - expect(subject.status).to eq(:registered) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(false) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(true) - end + it "matches property_status_dom_warn.expected" do + expect(subject.status).to eq(:registered) + expect(subject.available?).to eq(false) + expect(subject.registered?).to eq(true) end end diff --git a/spec/whois/parsers/responses/whois.sk-nic.sk/sk/status_available_spec.rb b/spec/whois/parsers/responses/whois.sk-nic.sk/sk/status_available_spec.rb index 1d0f599c..abf664be 100644 --- a/spec/whois/parsers/responses/whois.sk-nic.sk/sk/status_available_spec.rb +++ b/spec/whois/parsers/responses/whois.sk-nic.sk/sk/status_available_spec.rb @@ -11,50 +11,23 @@ # require 'spec_helper' -require 'whois/parsers/whois.sk-nic.sk.rb' -describe Whois::Parsers::WhoisSkNicSk, "status_available.expected" do +describe "whois.sk-nic.sk", :aggregate_failures do subject do file = fixture("responses", "whois.sk-nic.sk/sk/status_available.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.sk-nic.sk") + Whois::Parser.parser_for(part) end - describe "#status" do - it do - expect(subject.status).to eq(:available) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(true) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(false) - end - end - describe "#created_on" do - it do - expect { subject.created_on }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#updated_on" do - it do - expect(subject.updated_on).to eq(nil) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to eq(nil) - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers).to eq([]) - end + it "matches status_available.expected" do + expect(subject.status).to eq(:available) + expect(subject.available?).to eq(true) + expect(subject.registered?).to eq(false) + expect { subject.created_on }.to raise_error(Whois::AttributeNotSupported) + expect(subject.updated_on).to eq(nil) + expect(subject.expires_on).to eq(nil) + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers).to eq([]) end end diff --git a/spec/whois/parsers/responses/whois.sk-nic.sk/sk/status_registered_spec.rb b/spec/whois/parsers/responses/whois.sk-nic.sk/sk/status_registered_spec.rb index 37eef6e5..b4a40dda 100644 --- a/spec/whois/parsers/responses/whois.sk-nic.sk/sk/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.sk-nic.sk/sk/status_registered_spec.rb @@ -11,60 +11,33 @@ # require 'spec_helper' -require 'whois/parsers/whois.sk-nic.sk.rb' -describe Whois::Parsers::WhoisSkNicSk, "status_registered.expected" do +describe "whois.sk-nic.sk", :aggregate_failures do subject do file = fixture("responses", "whois.sk-nic.sk/sk/status_registered.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.sk-nic.sk") + Whois::Parser.parser_for(part) end - describe "#status" do - it do - expect(subject.status).to eq(:registered) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(false) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(true) - end - end - describe "#created_on" do - it do - expect { subject.created_on }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#updated_on" do - it do - expect(subject.updated_on).to be_a(Time) - expect(subject.updated_on).to eq(DateTime.parse("2010-06-28")) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to be_a(Time) - expect(subject.expires_on).to eq(DateTime.parse("2011-07-23")) - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers.size).to eq(4) - expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[0].name).to eq("ns1.google.com") - expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[1].name).to eq("ns2.google.com") - expect(subject.nameservers[2]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[2].name).to eq("ns3.google.com") - expect(subject.nameservers[3]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[3].name).to eq("ns4.google.com") - end + it "matches status_registered.expected" do + expect(subject.status).to eq(:registered) + expect(subject.available?).to eq(false) + expect(subject.registered?).to eq(true) + expect { subject.created_on }.to raise_error(Whois::AttributeNotSupported) + expect(subject.updated_on).to be_a(Time) + expect(subject.updated_on).to eq(DateTime.parse("2010-06-28")) + expect(subject.expires_on).to be_a(Time) + expect(subject.expires_on).to eq(DateTime.parse("2011-07-23")) + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers.size).to eq(4) + expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[0].name).to eq("ns1.google.com") + expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[1].name).to eq("ns2.google.com") + expect(subject.nameservers[2]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[2].name).to eq("ns3.google.com") + expect(subject.nameservers[3]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[3].name).to eq("ns4.google.com") end end diff --git a/spec/whois/parsers/responses/whois.smallregistry.net/status_available_spec.rb b/spec/whois/parsers/responses/whois.smallregistry.net/status_available_spec.rb index 44dbff3f..7d7672ef 100644 --- a/spec/whois/parsers/responses/whois.smallregistry.net/status_available_spec.rb +++ b/spec/whois/parsers/responses/whois.smallregistry.net/status_available_spec.rb @@ -11,88 +11,33 @@ # require 'spec_helper' -require 'whois/parsers/whois.smallregistry.net.rb' -describe Whois::Parsers::WhoisSmallregistryNet, "status_available.expected" do +describe "whois.smallregistry.net", :aggregate_failures do subject do file = fixture("responses", "whois.smallregistry.net/status_available.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.smallregistry.net") + Whois::Parser.parser_for(part) end - describe "#disclaimer" do - it do - expect(subject.disclaimer).to eq("Welcome to the SMALLREGISTRY WHOIS Server. Datas are available in order to supply you with information purpose only, PROMOPIXEL is not responsible for its accuracy. Copy of whole or part of the data without permission from PROMOPIXEL is strictly forbidden. The sole owner of a domain is the entity described in the relevant \"registrant:\" record. Domain or subdomain ownership disputes should be settled by contacting SMALLREGISTRY registry: https://www.smallregistry.net, or PROMOPIXEL: http://www.promopixel.com\nBienvenue sur le serveur WHOIS de SMALLREGISTRY. Les données fournies sont disponibles à titre informatif uniquement, PROMOPIXEL ne garantit pas leurs exactitudes. La copie de tout ou partie de la base de données est interdite sans l'autorisation expresse de PROMOPIXEL. Le seul propriétaire d'un domaine ou d'un sous-domaine est l'entité décrite dans l’enregistrement \"registrant:\" correspondant. Un différent sur la propriété d'un nom de domaine ou de sous-domaine peut être réglé en contactant le registre SMALLREGISTRY: https://www.smallregistry.net, ou PROMOPIXEL: http://www.promopixel.com") - end - end - describe "#domain" do - it do - expect(subject.domain).to eq(nil) - end - end - describe "#domain_id" do - it do - expect { subject.domain_id }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#status" do - it do - expect(subject.status).to eq(:available) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(true) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(false) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to eq(nil) - end - end - describe "#updated_on" do - it do - expect(subject.updated_on).to eq(nil) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to eq(nil) - end - end - describe "#registrar" do - it do - expect(subject.registrar).to eq(nil) - end - end - describe "#registrant_contacts" do - it do - expect(subject.registrant_contacts).to be_a(Array) - expect(subject.registrant_contacts).to eq([]) - end - end - describe "#admin_contacts" do - it do - expect(subject.admin_contacts).to be_a(Array) - expect(subject.admin_contacts).to eq([]) - end - end - describe "#technical_contacts" do - it do - expect(subject.technical_contacts).to be_a(Array) - expect(subject.technical_contacts).to eq([]) - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers).to eq([]) - end + it "matches status_available.expected" do + expect(subject.disclaimer).to eq("Welcome to the SMALLREGISTRY WHOIS Server. Datas are available in order to supply you with information purpose only, PROMOPIXEL is not responsible for its accuracy. Copy of whole or part of the data without permission from PROMOPIXEL is strictly forbidden. The sole owner of a domain is the entity described in the relevant \"registrant:\" record. Domain or subdomain ownership disputes should be settled by contacting SMALLREGISTRY registry: https://www.smallregistry.net, or PROMOPIXEL: http://www.promopixel.com\nBienvenue sur le serveur WHOIS de SMALLREGISTRY. Les données fournies sont disponibles à titre informatif uniquement, PROMOPIXEL ne garantit pas leurs exactitudes. La copie de tout ou partie de la base de données est interdite sans l'autorisation expresse de PROMOPIXEL. Le seul propriétaire d'un domaine ou d'un sous-domaine est l'entité décrite dans l’enregistrement \"registrant:\" correspondant. Un différent sur la propriété d'un nom de domaine ou de sous-domaine peut être réglé en contactant le registre SMALLREGISTRY: https://www.smallregistry.net, ou PROMOPIXEL: http://www.promopixel.com") + expect(subject.domain).to eq(nil) + expect { subject.domain_id }.to raise_error(Whois::AttributeNotSupported) + expect(subject.status).to eq(:available) + expect(subject.available?).to eq(true) + expect(subject.registered?).to eq(false) + expect(subject.created_on).to eq(nil) + expect(subject.updated_on).to eq(nil) + expect(subject.expires_on).to eq(nil) + expect(subject.registrar).to eq(nil) + expect(subject.registrant_contacts).to be_a(Array) + expect(subject.registrant_contacts).to eq([]) + expect(subject.admin_contacts).to be_a(Array) + expect(subject.admin_contacts).to eq([]) + expect(subject.technical_contacts).to be_a(Array) + expect(subject.technical_contacts).to eq([]) + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers).to eq([]) end end diff --git a/spec/whois/parsers/responses/whois.smallregistry.net/status_registered_spec.rb b/spec/whois/parsers/responses/whois.smallregistry.net/status_registered_spec.rb index 98aaf4ce..34fd8ae0 100644 --- a/spec/whois/parsers/responses/whois.smallregistry.net/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.smallregistry.net/status_registered_spec.rb @@ -11,128 +11,73 @@ # require 'spec_helper' -require 'whois/parsers/whois.smallregistry.net.rb' -describe Whois::Parsers::WhoisSmallregistryNet, "status_registered.expected" do +describe "whois.smallregistry.net", :aggregate_failures do subject do file = fixture("responses", "whois.smallregistry.net/status_registered.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.smallregistry.net") + Whois::Parser.parser_for(part) end - describe "#disclaimer" do - it do - expect(subject.disclaimer).to eq("Welcome to the SMALLREGISTRY WHOIS Server. Datas are available in order to supply you with information purpose only, PROMOPIXEL is not responsible for its accuracy. Copy of whole or part of the data without permission from PROMOPIXEL is strictly forbidden. The sole owner of a domain is the entity described in the relevant \"registrant:\" record. Domain or subdomain ownership disputes should be settled by contacting SMALLREGISTRY registry: https://www.smallregistry.net, or PROMOPIXEL: http://www.promopixel.com\nBienvenue sur le serveur WHOIS de SMALLREGISTRY. Les données fournies sont disponibles à titre informatif uniquement, PROMOPIXEL ne garantit pas leurs exactitudes. La copie de tout ou partie de la base de données est interdite sans l'autorisation expresse de PROMOPIXEL. Le seul propriétaire d'un domaine ou d'un sous-domaine est l'entité décrite dans l’enregistrement \"registrant:\" correspondant. Un différent sur la propriété d'un nom de domaine ou de sous-domaine peut être réglé en contactant le registre SMALLREGISTRY: https://www.smallregistry.net, ou PROMOPIXEL: http://www.promopixel.com") - end - end - describe "#domain" do - it do - expect(subject.domain).to eq("dr-foo-bar-baz.chirurgiens-dentistes.fr") - end - end - describe "#domain_id" do - it do - expect { subject.domain_id }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#status" do - it do - expect(subject.status).to eq(:registered) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(false) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(true) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to be_a(Time) - expect(subject.created_on).to eq(DateTime.parse("2011-01-13 15:45:18 +01:00")) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to be_a(Time) - expect(subject.expires_on).to eq(DateTime.parse("2013-01-13 15:45:18 +01:00")) - end - end - describe "#updated_on" do - it do - expect(subject.updated_on).to be_a(Time) - expect(subject.updated_on).to eq(DateTime.parse("2012-01-13 16:00:09 +01:00")) - end - end - describe "#registrar" do - it do - expect(subject.registrar).to be_a(Whois::Parser::Registrar) - expect(subject.registrar.id).to eq(nil) - expect(subject.registrar.name).to eq("GOOGLE") - expect(subject.registrar.url).to eq("http://www.google.com") - end - end - describe "#registrant_contacts" do - it do - expect(subject.registrant_contacts).to be_a(Array) - expect(subject.registrant_contacts.size).to eq(1) - expect(subject.registrant_contacts[0]).to be_a(Whois::Parser::Contact) - expect(subject.registrant_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_REGISTRANT) - expect(subject.registrant_contacts[0].id).to eq("FBB1-SMALL") - expect(subject.registrant_contacts[0].name).to eq("FOO BAR BAZ") - expect(subject.registrant_contacts[0].organization).to eq("FOO BAR BAZ INC") - expect(subject.registrant_contacts[0].address).to eq("116 RUE DE LA PAIX\n75001 PARIS\nFRANCE") - expect(subject.registrant_contacts[0].phone).to eq("+33.123456651") - expect(subject.registrant_contacts[0].fax).to eq("+33.123456660") - expect(subject.registrant_contacts[0].updated_on).to eq(DateTime.parse("2011-01-13 15:45:18 +01:00")) - end - end - describe "#admin_contacts" do - it do - expect(subject.admin_contacts).to be_a(Array) - expect(subject.admin_contacts.size).to eq(1) - expect(subject.admin_contacts[0]).to be_a(Whois::Parser::Contact) - expect(subject.admin_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_ADMINISTRATIVE) - expect(subject.admin_contacts[0].id).to eq("QR1-SMALL") - expect(subject.admin_contacts[0].name).to eq(nil) - expect(subject.admin_contacts[0].organization).to eq("QWE RTY") - expect(subject.admin_contacts[0].address).to eq("13 RUE DE LA PAIX\n75003 PARIS\nFRANCE") - expect(subject.admin_contacts[0].phone).to eq("+33.144887967") - expect(subject.admin_contacts[0].updated_on).to eq(DateTime.parse("2010-08-02 14:48:21 +02:00")) - end - end - describe "#technical_contacts" do - it do - expect(subject.technical_contacts).to be_a(Array) - expect(subject.technical_contacts.size).to eq(1) - expect(subject.technical_contacts[0]).to be_a(Whois::Parser::Contact) - expect(subject.technical_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_TECHNICAL) - expect(subject.technical_contacts[0].id).to eq("GOOG-SMALL") - expect(subject.technical_contacts[0].name).to eq(nil) - expect(subject.technical_contacts[0].organization).to eq("GOOGLE DNS MASTER") - expect(subject.technical_contacts[0].address).to eq("GOOGLE\n22, RUE DE LA PAIX\n75008 PARIS\nFRANCE") - expect(subject.technical_contacts[0].phone).to eq("+33.821845353") - expect(subject.technical_contacts[0].fax).to eq("+33.821845354") - expect(subject.technical_contacts[0].updated_on).to eq(DateTime.parse("2011-05-18 09:35:37 +02:00")) - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers.size).to eq(4) - expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[0].name).to eq("ns1.google.com") - expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[1].name).to eq("ns2.google.com") - expect(subject.nameservers[2]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[2].name).to eq("ns3.google.com") - expect(subject.nameservers[3]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[3].name).to eq("ns4.google.com") - end + it "matches status_registered.expected" do + expect(subject.disclaimer).to eq("Welcome to the SMALLREGISTRY WHOIS Server. Datas are available in order to supply you with information purpose only, PROMOPIXEL is not responsible for its accuracy. Copy of whole or part of the data without permission from PROMOPIXEL is strictly forbidden. The sole owner of a domain is the entity described in the relevant \"registrant:\" record. Domain or subdomain ownership disputes should be settled by contacting SMALLREGISTRY registry: https://www.smallregistry.net, or PROMOPIXEL: http://www.promopixel.com\nBienvenue sur le serveur WHOIS de SMALLREGISTRY. Les données fournies sont disponibles à titre informatif uniquement, PROMOPIXEL ne garantit pas leurs exactitudes. La copie de tout ou partie de la base de données est interdite sans l'autorisation expresse de PROMOPIXEL. Le seul propriétaire d'un domaine ou d'un sous-domaine est l'entité décrite dans l’enregistrement \"registrant:\" correspondant. Un différent sur la propriété d'un nom de domaine ou de sous-domaine peut être réglé en contactant le registre SMALLREGISTRY: https://www.smallregistry.net, ou PROMOPIXEL: http://www.promopixel.com") + expect(subject.domain).to eq("dr-foo-bar-baz.chirurgiens-dentistes.fr") + expect { subject.domain_id }.to raise_error(Whois::AttributeNotSupported) + expect(subject.status).to eq(:registered) + expect(subject.available?).to eq(false) + expect(subject.registered?).to eq(true) + expect(subject.created_on).to be_a(Time) + expect(subject.created_on).to eq(DateTime.parse("2011-01-13 15:45:18 +01:00")) + expect(subject.expires_on).to be_a(Time) + expect(subject.expires_on).to eq(DateTime.parse("2013-01-13 15:45:18 +01:00")) + expect(subject.updated_on).to be_a(Time) + expect(subject.updated_on).to eq(DateTime.parse("2012-01-13 16:00:09 +01:00")) + expect(subject.registrar).to be_a(Whois::Parser::Registrar) + expect(subject.registrar.id).to eq(nil) + expect(subject.registrar.name).to eq("GOOGLE") + expect(subject.registrar.url).to eq("http://www.google.com") + expect(subject.registrant_contacts).to be_a(Array) + expect(subject.registrant_contacts.size).to eq(1) + expect(subject.registrant_contacts[0]).to be_a(Whois::Parser::Contact) + expect(subject.registrant_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_REGISTRANT) + expect(subject.registrant_contacts[0].id).to eq("FBB1-SMALL") + expect(subject.registrant_contacts[0].name).to eq("FOO BAR BAZ") + expect(subject.registrant_contacts[0].organization).to eq("FOO BAR BAZ INC") + expect(subject.registrant_contacts[0].address).to eq("116 RUE DE LA PAIX\n75001 PARIS\nFRANCE") + expect(subject.registrant_contacts[0].phone).to eq("+33.123456651") + expect(subject.registrant_contacts[0].fax).to eq("+33.123456660") + expect(subject.registrant_contacts[0].updated_on).to eq(DateTime.parse("2011-01-13 15:45:18 +01:00")) + expect(subject.admin_contacts).to be_a(Array) + expect(subject.admin_contacts.size).to eq(1) + expect(subject.admin_contacts[0]).to be_a(Whois::Parser::Contact) + expect(subject.admin_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_ADMINISTRATIVE) + expect(subject.admin_contacts[0].id).to eq("QR1-SMALL") + expect(subject.admin_contacts[0].name).to eq(nil) + expect(subject.admin_contacts[0].organization).to eq("QWE RTY") + expect(subject.admin_contacts[0].address).to eq("13 RUE DE LA PAIX\n75003 PARIS\nFRANCE") + expect(subject.admin_contacts[0].phone).to eq("+33.144887967") + expect(subject.admin_contacts[0].updated_on).to eq(DateTime.parse("2010-08-02 14:48:21 +02:00")) + expect(subject.technical_contacts).to be_a(Array) + expect(subject.technical_contacts.size).to eq(1) + expect(subject.technical_contacts[0]).to be_a(Whois::Parser::Contact) + expect(subject.technical_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_TECHNICAL) + expect(subject.technical_contacts[0].id).to eq("GOOG-SMALL") + expect(subject.technical_contacts[0].name).to eq(nil) + expect(subject.technical_contacts[0].organization).to eq("GOOGLE DNS MASTER") + expect(subject.technical_contacts[0].address).to eq("GOOGLE\n22, RUE DE LA PAIX\n75008 PARIS\nFRANCE") + expect(subject.technical_contacts[0].phone).to eq("+33.821845353") + expect(subject.technical_contacts[0].fax).to eq("+33.821845354") + expect(subject.technical_contacts[0].updated_on).to eq(DateTime.parse("2011-05-18 09:35:37 +02:00")) + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers.size).to eq(4) + expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[0].name).to eq("ns1.google.com") + expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[1].name).to eq("ns2.google.com") + expect(subject.nameservers[2]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[2].name).to eq("ns3.google.com") + expect(subject.nameservers[3]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[3].name).to eq("ns4.google.com") end end diff --git a/spec/whois/parsers/responses/whois.srs.net.nz/nz/property_status_pendingrelease_spec.rb b/spec/whois/parsers/responses/whois.srs.net.nz/nz/property_status_pendingrelease_spec.rb index 0f478c09..bbbb0c52 100644 --- a/spec/whois/parsers/responses/whois.srs.net.nz/nz/property_status_pendingrelease_spec.rb +++ b/spec/whois/parsers/responses/whois.srs.net.nz/nz/property_status_pendingrelease_spec.rb @@ -11,29 +11,18 @@ # require 'spec_helper' -require 'whois/parsers/whois.srs.net.nz.rb' -describe Whois::Parsers::WhoisSrsNetNz, "property_status_pendingrelease.expected" do +describe "whois.srs.net.nz", :aggregate_failures do subject do file = fixture("responses", "whois.srs.net.nz/nz/property_status_pendingrelease.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.srs.net.nz") + Whois::Parser.parser_for(part) end - describe "#status" do - it do - expect(subject.status).to eq(:redemption) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(false) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(true) - end + it "matches property_status_pendingrelease.expected" do + expect(subject.status).to eq(:redemption) + expect(subject.available?).to eq(false) + expect(subject.registered?).to eq(true) end end diff --git a/spec/whois/parsers/responses/whois.srs.net.nz/nz/response_throttled_spec.rb b/spec/whois/parsers/responses/whois.srs.net.nz/nz/response_throttled_spec.rb index 6adc1f44..7d8a804b 100644 --- a/spec/whois/parsers/responses/whois.srs.net.nz/nz/response_throttled_spec.rb +++ b/spec/whois/parsers/responses/whois.srs.net.nz/nz/response_throttled_spec.rb @@ -11,19 +11,16 @@ # require 'spec_helper' -require 'whois/parsers/whois.srs.net.nz.rb' -describe Whois::Parsers::WhoisSrsNetNz, "response_throttled.expected" do +describe "whois.srs.net.nz", :aggregate_failures do subject do file = fixture("responses", "whois.srs.net.nz/nz/response_throttled.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.srs.net.nz") + Whois::Parser.parser_for(part) end - describe "#response_throttled?" do - it do - expect(subject.response_throttled?).to eq(true) - end + it "matches response_throttled.expected" do + expect(subject.response_throttled?).to eq(true) end end diff --git a/spec/whois/parsers/responses/whois.srs.net.nz/nz/status_available_spec.rb b/spec/whois/parsers/responses/whois.srs.net.nz/nz/status_available_spec.rb index d41aa219..1759c12b 100644 --- a/spec/whois/parsers/responses/whois.srs.net.nz/nz/status_available_spec.rb +++ b/spec/whois/parsers/responses/whois.srs.net.nz/nz/status_available_spec.rb @@ -11,88 +11,33 @@ # require 'spec_helper' -require 'whois/parsers/whois.srs.net.nz.rb' -describe Whois::Parsers::WhoisSrsNetNz, "status_available.expected" do +describe "whois.srs.net.nz", :aggregate_failures do subject do file = fixture("responses", "whois.srs.net.nz/nz/status_available.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.srs.net.nz") + Whois::Parser.parser_for(part) end - describe "#domain" do - it do - expect(subject.domain).to eq("u34jedzcq.co.nz") - end - end - describe "#domain_id" do - it do - expect { subject.domain_id }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#status" do - it do - expect(subject.status).to eq(:available) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(true) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(false) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to eq(nil) - end - end - describe "#updated_on" do - it do - expect(subject.updated_on).to eq(nil) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to eq(nil) - end - end - describe "#registrar" do - it do - expect(subject.registrar).to eq(nil) - end - end - describe "#registrant_contacts" do - it do - expect(subject.registrant_contacts).to be_a(Array) - expect(subject.registrant_contacts).to eq([]) - end - end - describe "#admin_contacts" do - it do - expect(subject.admin_contacts).to be_a(Array) - expect(subject.admin_contacts).to eq([]) - end - end - describe "#technical_contacts" do - it do - expect(subject.technical_contacts).to be_a(Array) - expect(subject.technical_contacts).to eq([]) - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers).to eq([]) - end - end - describe "#response_throttled?" do - it do - expect(subject.response_throttled?).to eq(false) - end + it "matches status_available.expected" do + expect(subject.domain).to eq("u34jedzcq.co.nz") + expect { subject.domain_id }.to raise_error(Whois::AttributeNotSupported) + expect(subject.status).to eq(:available) + expect(subject.available?).to eq(true) + expect(subject.registered?).to eq(false) + expect(subject.created_on).to eq(nil) + expect(subject.updated_on).to eq(nil) + expect(subject.expires_on).to eq(nil) + expect(subject.registrar).to eq(nil) + expect(subject.registrant_contacts).to be_a(Array) + expect(subject.registrant_contacts).to eq([]) + expect(subject.admin_contacts).to be_a(Array) + expect(subject.admin_contacts).to eq([]) + expect(subject.technical_contacts).to be_a(Array) + expect(subject.technical_contacts).to eq([]) + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers).to eq([]) + expect(subject.response_throttled?).to eq(false) end end diff --git a/spec/whois/parsers/responses/whois.srs.net.nz/nz/status_invalid_spec.rb b/spec/whois/parsers/responses/whois.srs.net.nz/nz/status_invalid_spec.rb index 73005e5e..fc3229e2 100644 --- a/spec/whois/parsers/responses/whois.srs.net.nz/nz/status_invalid_spec.rb +++ b/spec/whois/parsers/responses/whois.srs.net.nz/nz/status_invalid_spec.rb @@ -11,65 +11,26 @@ # require 'spec_helper' -require 'whois/parsers/whois.srs.net.nz.rb' -describe Whois::Parsers::WhoisSrsNetNz, "status_invalid.expected" do +describe "whois.srs.net.nz", :aggregate_failures do subject do file = fixture("responses", "whois.srs.net.nz/nz/status_invalid.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.srs.net.nz") + Whois::Parser.parser_for(part) end - describe "#status" do - it do - expect(subject.status).to eq(:invalid) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(false) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(false) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to eq(nil) - end - end - describe "#updated_on" do - it do - expect(subject.updated_on).to eq(nil) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to eq(nil) - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers).to eq([]) - end - end - describe "#valid?" do - it do - expect(subject.valid?).to eq(false) - end - end - describe "#invalid?" do - it do - expect(subject.invalid?).to eq(true) - end - end - describe "#response_throttled?" do - it do - expect(subject.response_throttled?).to eq(false) - end + it "matches status_invalid.expected" do + expect(subject.status).to eq(:invalid) + expect(subject.available?).to eq(false) + expect(subject.registered?).to eq(false) + expect(subject.created_on).to eq(nil) + expect(subject.updated_on).to eq(nil) + expect(subject.expires_on).to eq(nil) + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers).to eq([]) + expect(subject.valid?).to eq(false) + expect(subject.invalid?).to eq(true) + expect(subject.response_throttled?).to eq(false) end end diff --git a/spec/whois/parsers/responses/whois.srs.net.nz/nz/status_registered_spec.rb b/spec/whois/parsers/responses/whois.srs.net.nz/nz/status_registered_spec.rb index c15abe33..09fcdd2e 100644 --- a/spec/whois/parsers/responses/whois.srs.net.nz/nz/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.srs.net.nz/nz/status_registered_spec.rb @@ -11,150 +11,95 @@ # require 'spec_helper' -require 'whois/parsers/whois.srs.net.nz.rb' -describe Whois::Parsers::WhoisSrsNetNz, "status_registered.expected" do +describe "whois.srs.net.nz", :aggregate_failures do subject do file = fixture("responses", "whois.srs.net.nz/nz/status_registered.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.srs.net.nz") + Whois::Parser.parser_for(part) end - describe "#domain" do - it do - expect(subject.domain).to eq("google.co.nz") - end - end - describe "#domain_id" do - it do - expect { subject.domain_id }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#status" do - it do - expect(subject.status).to eq(:registered) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(false) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(true) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to be_a(Time) - expect(subject.created_on).to eq(DateTime.parse("1999-02-17 00:00:00 +13:00")) - end - end - describe "#updated_on" do - it do - expect(subject.updated_on).to be_a(Time) - expect(subject.updated_on).to eq(DateTime.parse("2013-01-16 23:20:24 +13:00")) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to be_a(Time) - expect(subject.expires_on).to eq(DateTime.parse("2014-02-17 00:00:00 +13:00")) - end - end - describe "#registrar" do - it do - expect(subject.registrar).to be_a(Whois::Parser::Registrar) - expect(subject.registrar.id).to eq(nil) - expect(subject.registrar.name).to eq("MarkMonitor") - expect(subject.registrar.url).to eq(nil) - end - end - describe "#registrant_contacts" do - it do - expect(subject.registrant_contacts).to be_a(Array) - expect(subject.registrant_contacts.size).to eq(1) - expect(subject.registrant_contacts[0]).to be_a(Whois::Parser::Contact) - expect(subject.registrant_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_REGISTRANT) - expect(subject.registrant_contacts[0].id).to eq(nil) - expect(subject.registrant_contacts[0].name).to eq("Google Inc") - expect(subject.registrant_contacts[0].organization).to eq(nil) - expect(subject.registrant_contacts[0].address).to eq("1600 Amphitheatre Parkway") - expect(subject.registrant_contacts[0].city).to eq("Mountain View") - expect(subject.registrant_contacts[0].zip).to eq("94043") - expect(subject.registrant_contacts[0].state).to eq("CA") - expect(subject.registrant_contacts[0].country).to eq("US (UNITED STATES)") - expect(subject.registrant_contacts[0].country_code).to eq(nil) - expect(subject.registrant_contacts[0].phone).to eq("+1 650 +1 650 3300100") - expect(subject.registrant_contacts[0].fax).to eq("+1 650 +1 650 6181434") - expect(subject.registrant_contacts[0].email).to eq("dns-admin@google.com") - expect(subject.registrant_contacts[0].created_on).to eq(nil) - expect(subject.registrant_contacts[0].updated_on).to eq(nil) - end - end - describe "#admin_contacts" do - it do - expect(subject.admin_contacts).to be_a(Array) - expect(subject.admin_contacts.size).to eq(1) - expect(subject.admin_contacts[0]).to be_a(Whois::Parser::Contact) - expect(subject.admin_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_ADMINISTRATIVE) - expect(subject.admin_contacts[0].id).to eq(nil) - expect(subject.admin_contacts[0].name).to eq("Google Inc") - expect(subject.admin_contacts[0].organization).to eq(nil) - expect(subject.admin_contacts[0].address).to eq("1600 Amphitheatre Parkway") - expect(subject.admin_contacts[0].city).to eq("Mountain View") - expect(subject.admin_contacts[0].zip).to eq("94043") - expect(subject.admin_contacts[0].state).to eq("CA") - expect(subject.admin_contacts[0].country).to eq("US (UNITED STATES)") - expect(subject.admin_contacts[0].country_code).to eq(nil) - expect(subject.admin_contacts[0].phone).to eq("+1 650 +1 650 3300100") - expect(subject.admin_contacts[0].fax).to eq("+1 650 +1 650 6181434") - expect(subject.admin_contacts[0].email).to eq("dns-admin@google.com") - expect(subject.admin_contacts[0].created_on).to eq(nil) - expect(subject.admin_contacts[0].updated_on).to eq(nil) - end - end - describe "#technical_contacts" do - it do - expect(subject.technical_contacts).to be_a(Array) - expect(subject.technical_contacts.size).to eq(1) - expect(subject.technical_contacts[0]).to be_a(Whois::Parser::Contact) - expect(subject.technical_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_TECHNICAL) - expect(subject.technical_contacts[0].id).to eq(nil) - expect(subject.technical_contacts[0].name).to eq("Google Inc") - expect(subject.technical_contacts[0].organization).to eq(nil) - expect(subject.technical_contacts[0].address).to eq("1600 Amphitheatre Parkway") - expect(subject.technical_contacts[0].city).to eq("Mountain View") - expect(subject.technical_contacts[0].zip).to eq("94043") - expect(subject.technical_contacts[0].state).to eq("CA") - expect(subject.technical_contacts[0].country).to eq("US (UNITED STATES)") - expect(subject.technical_contacts[0].country_code).to eq(nil) - expect(subject.technical_contacts[0].phone).to eq("+1 650 +1 650 3300100") - expect(subject.technical_contacts[0].fax).to eq("+ +1 650 6181434") - expect(subject.technical_contacts[0].email).to eq("dns-admin@google.com") - expect(subject.technical_contacts[0].created_on).to eq(nil) - expect(subject.technical_contacts[0].updated_on).to eq(nil) - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers.size).to eq(4) - expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[0].name).to eq("ns1.google.com") - expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[1].name).to eq("ns2.google.com") - expect(subject.nameservers[2]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[2].name).to eq("ns3.google.com") - expect(subject.nameservers[3]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[3].name).to eq("ns4.google.com") - end - end - describe "#response_throttled?" do - it do - expect(subject.response_throttled?).to eq(false) - end + it "matches status_registered.expected" do + expect(subject.domain).to eq("google.co.nz") + expect { subject.domain_id }.to raise_error(Whois::AttributeNotSupported) + expect(subject.status).to eq(:registered) + expect(subject.available?).to eq(false) + expect(subject.registered?).to eq(true) + expect(subject.created_on).to be_a(Time) + expect(subject.created_on).to eq(DateTime.parse("1999-02-17 00:00:00 +13:00")) + expect(subject.updated_on).to be_a(Time) + expect(subject.updated_on).to eq(DateTime.parse("2013-01-16 23:20:24 +13:00")) + expect(subject.expires_on).to be_a(Time) + expect(subject.expires_on).to eq(DateTime.parse("2014-02-17 00:00:00 +13:00")) + expect(subject.registrar).to be_a(Whois::Parser::Registrar) + expect(subject.registrar.id).to eq(nil) + expect(subject.registrar.name).to eq("MarkMonitor") + expect(subject.registrar.url).to eq(nil) + expect(subject.registrant_contacts).to be_a(Array) + expect(subject.registrant_contacts.size).to eq(1) + expect(subject.registrant_contacts[0]).to be_a(Whois::Parser::Contact) + expect(subject.registrant_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_REGISTRANT) + expect(subject.registrant_contacts[0].id).to eq(nil) + expect(subject.registrant_contacts[0].name).to eq("Google Inc") + expect(subject.registrant_contacts[0].organization).to eq(nil) + expect(subject.registrant_contacts[0].address).to eq("1600 Amphitheatre Parkway") + expect(subject.registrant_contacts[0].city).to eq("Mountain View") + expect(subject.registrant_contacts[0].zip).to eq("94043") + expect(subject.registrant_contacts[0].state).to eq("CA") + expect(subject.registrant_contacts[0].country).to eq("US (UNITED STATES)") + expect(subject.registrant_contacts[0].country_code).to eq(nil) + expect(subject.registrant_contacts[0].phone).to eq("+1 650 +1 650 3300100") + expect(subject.registrant_contacts[0].fax).to eq("+1 650 +1 650 6181434") + expect(subject.registrant_contacts[0].email).to eq("dns-admin@google.com") + expect(subject.registrant_contacts[0].created_on).to eq(nil) + expect(subject.registrant_contacts[0].updated_on).to eq(nil) + expect(subject.admin_contacts).to be_a(Array) + expect(subject.admin_contacts.size).to eq(1) + expect(subject.admin_contacts[0]).to be_a(Whois::Parser::Contact) + expect(subject.admin_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_ADMINISTRATIVE) + expect(subject.admin_contacts[0].id).to eq(nil) + expect(subject.admin_contacts[0].name).to eq("Google Inc") + expect(subject.admin_contacts[0].organization).to eq(nil) + expect(subject.admin_contacts[0].address).to eq("1600 Amphitheatre Parkway") + expect(subject.admin_contacts[0].city).to eq("Mountain View") + expect(subject.admin_contacts[0].zip).to eq("94043") + expect(subject.admin_contacts[0].state).to eq("CA") + expect(subject.admin_contacts[0].country).to eq("US (UNITED STATES)") + expect(subject.admin_contacts[0].country_code).to eq(nil) + expect(subject.admin_contacts[0].phone).to eq("+1 650 +1 650 3300100") + expect(subject.admin_contacts[0].fax).to eq("+1 650 +1 650 6181434") + expect(subject.admin_contacts[0].email).to eq("dns-admin@google.com") + expect(subject.admin_contacts[0].created_on).to eq(nil) + expect(subject.admin_contacts[0].updated_on).to eq(nil) + expect(subject.technical_contacts).to be_a(Array) + expect(subject.technical_contacts.size).to eq(1) + expect(subject.technical_contacts[0]).to be_a(Whois::Parser::Contact) + expect(subject.technical_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_TECHNICAL) + expect(subject.technical_contacts[0].id).to eq(nil) + expect(subject.technical_contacts[0].name).to eq("Google Inc") + expect(subject.technical_contacts[0].organization).to eq(nil) + expect(subject.technical_contacts[0].address).to eq("1600 Amphitheatre Parkway") + expect(subject.technical_contacts[0].city).to eq("Mountain View") + expect(subject.technical_contacts[0].zip).to eq("94043") + expect(subject.technical_contacts[0].state).to eq("CA") + expect(subject.technical_contacts[0].country).to eq("US (UNITED STATES)") + expect(subject.technical_contacts[0].country_code).to eq(nil) + expect(subject.technical_contacts[0].phone).to eq("+1 650 +1 650 3300100") + expect(subject.technical_contacts[0].fax).to eq("+ +1 650 6181434") + expect(subject.technical_contacts[0].email).to eq("dns-admin@google.com") + expect(subject.technical_contacts[0].created_on).to eq(nil) + expect(subject.technical_contacts[0].updated_on).to eq(nil) + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers.size).to eq(4) + expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[0].name).to eq("ns1.google.com") + expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[1].name).to eq("ns2.google.com") + expect(subject.nameservers[2]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[2].name).to eq("ns3.google.com") + expect(subject.nameservers[3]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[3].name).to eq("ns4.google.com") + expect(subject.response_throttled?).to eq(false) end end diff --git a/spec/whois/parsers/responses/whois.sx/sx/property_status_premium_name_spec.rb b/spec/whois/parsers/responses/whois.sx/sx/property_status_premium_name_spec.rb index 0674c9fc..43b56953 100644 --- a/spec/whois/parsers/responses/whois.sx/sx/property_status_premium_name_spec.rb +++ b/spec/whois/parsers/responses/whois.sx/sx/property_status_premium_name_spec.rb @@ -11,29 +11,18 @@ # require 'spec_helper' -require 'whois/parsers/whois.sx.rb' -describe Whois::Parsers::WhoisSx, "property_status_premium_name.expected" do +describe "whois.sx", :aggregate_failures do subject do file = fixture("responses", "whois.sx/sx/property_status_premium_name.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.sx") + Whois::Parser.parser_for(part) end - describe "#status" do - it do - expect(subject.status).to eq(:unavailable) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(false) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(false) - end + it "matches property_status_premium_name.expected" do + expect(subject.status).to eq(:unavailable) + expect(subject.available?).to eq(false) + expect(subject.registered?).to eq(false) end end diff --git a/spec/whois/parsers/responses/whois.sx/sx/status_available_spec.rb b/spec/whois/parsers/responses/whois.sx/sx/status_available_spec.rb index 57bd08d2..9df1ec24 100644 --- a/spec/whois/parsers/responses/whois.sx/sx/status_available_spec.rb +++ b/spec/whois/parsers/responses/whois.sx/sx/status_available_spec.rb @@ -11,88 +11,33 @@ # require 'spec_helper' -require 'whois/parsers/whois.sx.rb' -describe Whois::Parsers::WhoisSx, "status_available.expected" do +describe "whois.sx", :aggregate_failures do subject do file = fixture("responses", "whois.sx/sx/status_available.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.sx") + Whois::Parser.parser_for(part) end - describe "#disclaimer" do - it do - expect(subject.disclaimer).to eq("WHOIS LEGAL STATEMENT AND TERMS & CONDITIONS\nThe WHOIS service offered by OpenRegistry and the access to the\nrecords in the OpenRegistry WHOIS database are provided for information\npurposes only. It allows persons to check whether a specific domain name\nis still available or not and to obtain information related to the\nregistration records of existing domain names. You are not authorized to\naccess or query our WHOIS database through the use of electronic\nprocesses that are high-volume and automated except as reasonably\nnecessary to register domain names or modify existing registrations.\n\nOpenRegistry cannot, under any circumstances, be held liable should the\nstored information prove to be wrong, incomplete or inaccurate in any sense.\n\nBy submitting a WHOIS query you agree not to use the information made\navailable to:\n- Allow, enable or otherwise support the transmission of unsolicited,\ncommercial advertising or other solicitations whether via email, telephone\nor otherwise;\n- Target advertising in any possible way;\n- Cause nuisance in any possible way to the registrants by sending (whether\nby automated, electronic processes capable of enabling high volumes or\nother possible means) messages to them.\n\nWithout prejudice to the above, it is explicitly forbidden to extract, copy\nand/or use or re-utilise in any form and by any means (electronically or\nnot) the whole or a quantitatively or qualitatively substantial part of the\ncontents of the WHOIS database without prior and explicit permission by\nOpenRegistry, nor in any attempt hereof, to apply automated, electronic\nprocesses to OpenRegistry (or its systems).\n\nBy submitting the query you agree that any reproduction and/or transmission\nof data for commercial purposes will always be considered as the extraction\nof a substantial part of the content of the WHOIS database. You also agree\nto abide by this policy and accept that OpenRegistry can take measures to\nlimit the use of its WHOIS services in order to protect the privacy of its\nregistrants and/or the integrity of the database. OpenRegistry reserves the\nright to restrict your access to the WHOIS database in its sole discretion\nto ensure operational stability. OpenRegistry may restrict or terminate your\naccess to the WHOIS database for failure to abide by these terms of use.\n\nOpenRegistry reserves the right to modify these terms at any time.") - end - end - describe "#domain" do - it do - expect(subject.domain).to eq("u34jedzcq.sx") - end - end - describe "#domain_id" do - it do - expect(subject.domain_id).to eq(nil) - end - end - describe "#status" do - it do - expect(subject.status).to eq(:available) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(true) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(false) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to eq(nil) - end - end - describe "#updated_on" do - it do - expect(subject.updated_on).to eq(nil) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to eq(nil) - end - end - describe "#registrar" do - it do - expect(subject.registrar).to eq(nil) - end - end - describe "#registrant_contacts" do - it do - expect(subject.registrant_contacts).to be_a(Array) - expect(subject.registrant_contacts).to eq([]) - end - end - describe "#admin_contacts" do - it do - expect(subject.admin_contacts).to be_a(Array) - expect(subject.admin_contacts).to eq([]) - end - end - describe "#technical_contacts" do - it do - expect(subject.technical_contacts).to be_a(Array) - expect(subject.technical_contacts).to eq([]) - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers).to eq([]) - end + it "matches status_available.expected" do + expect(subject.disclaimer).to eq("WHOIS LEGAL STATEMENT AND TERMS & CONDITIONS\nThe WHOIS service offered by OpenRegistry and the access to the\nrecords in the OpenRegistry WHOIS database are provided for information\npurposes only. It allows persons to check whether a specific domain name\nis still available or not and to obtain information related to the\nregistration records of existing domain names. You are not authorized to\naccess or query our WHOIS database through the use of electronic\nprocesses that are high-volume and automated except as reasonably\nnecessary to register domain names or modify existing registrations.\n\nOpenRegistry cannot, under any circumstances, be held liable should the\nstored information prove to be wrong, incomplete or inaccurate in any sense.\n\nBy submitting a WHOIS query you agree not to use the information made\navailable to:\n- Allow, enable or otherwise support the transmission of unsolicited,\ncommercial advertising or other solicitations whether via email, telephone\nor otherwise;\n- Target advertising in any possible way;\n- Cause nuisance in any possible way to the registrants by sending (whether\nby automated, electronic processes capable of enabling high volumes or\nother possible means) messages to them.\n\nWithout prejudice to the above, it is explicitly forbidden to extract, copy\nand/or use or re-utilise in any form and by any means (electronically or\nnot) the whole or a quantitatively or qualitatively substantial part of the\ncontents of the WHOIS database without prior and explicit permission by\nOpenRegistry, nor in any attempt hereof, to apply automated, electronic\nprocesses to OpenRegistry (or its systems).\n\nBy submitting the query you agree that any reproduction and/or transmission\nof data for commercial purposes will always be considered as the extraction\nof a substantial part of the content of the WHOIS database. You also agree\nto abide by this policy and accept that OpenRegistry can take measures to\nlimit the use of its WHOIS services in order to protect the privacy of its\nregistrants and/or the integrity of the database. OpenRegistry reserves the\nright to restrict your access to the WHOIS database in its sole discretion\nto ensure operational stability. OpenRegistry may restrict or terminate your\naccess to the WHOIS database for failure to abide by these terms of use.\n\nOpenRegistry reserves the right to modify these terms at any time.") + expect(subject.domain).to eq("u34jedzcq.sx") + expect(subject.domain_id).to eq(nil) + expect(subject.status).to eq(:available) + expect(subject.available?).to eq(true) + expect(subject.registered?).to eq(false) + expect(subject.created_on).to eq(nil) + expect(subject.updated_on).to eq(nil) + expect(subject.expires_on).to eq(nil) + expect(subject.registrar).to eq(nil) + expect(subject.registrant_contacts).to be_a(Array) + expect(subject.registrant_contacts).to eq([]) + expect(subject.admin_contacts).to be_a(Array) + expect(subject.admin_contacts).to eq([]) + expect(subject.technical_contacts).to be_a(Array) + expect(subject.technical_contacts).to eq([]) + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers).to eq([]) end end diff --git a/spec/whois/parsers/responses/whois.sx/sx/status_registered_spec.rb b/spec/whois/parsers/responses/whois.sx/sx/status_registered_spec.rb index 4cd96de8..9b8d7a0a 100644 --- a/spec/whois/parsers/responses/whois.sx/sx/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.sx/sx/status_registered_spec.rb @@ -11,148 +11,93 @@ # require 'spec_helper' -require 'whois/parsers/whois.sx.rb' -describe Whois::Parsers::WhoisSx, "status_registered.expected" do +describe "whois.sx", :aggregate_failures do subject do file = fixture("responses", "whois.sx/sx/status_registered.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.sx") + Whois::Parser.parser_for(part) end - describe "#disclaimer" do - it do - expect(subject.disclaimer).to eq("WHOIS LEGAL STATEMENT AND TERMS & CONDITIONS\nThe WHOIS service offered by OpenRegistry and the access to the\nrecords in the OpenRegistry WHOIS database are provided for information\npurposes only. It allows persons to check whether a specific domain name\nis still available or not and to obtain information related to the\nregistration records of existing domain names. You are not authorized to\naccess or query our WHOIS database through the use of electronic\nprocesses that are high-volume and automated except as reasonably\nnecessary to register domain names or modify existing registrations.\n\nOpenRegistry cannot, under any circumstances, be held liable should the\nstored information prove to be wrong, incomplete or inaccurate in any sense.\n\nBy submitting a WHOIS query you agree not to use the information made\navailable to:\n- Allow, enable or otherwise support the transmission of unsolicited,\ncommercial advertising or other solicitations whether via email, telephone\nor otherwise;\n- Target advertising in any possible way;\n- Cause nuisance in any possible way to the registrants by sending (whether\nby automated, electronic processes capable of enabling high volumes or\nother possible means) messages to them.\n\nWithout prejudice to the above, it is explicitly forbidden to extract, copy\nand/or use or re-utilise in any form and by any means (electronically or\nnot) the whole or a quantitatively or qualitatively substantial part of the\ncontents of the WHOIS database without prior and explicit permission by\nOpenRegistry, nor in any attempt hereof, to apply automated, electronic\nprocesses to OpenRegistry (or its systems).\n\nBy submitting the query you agree that any reproduction and/or transmission\nof data for commercial purposes will always be considered as the extraction\nof a substantial part of the content of the WHOIS database. You also agree\nto abide by this policy and accept that OpenRegistry can take measures to\nlimit the use of its WHOIS services in order to protect the privacy of its\nregistrants and/or the integrity of the database. OpenRegistry reserves the\nright to restrict your access to the WHOIS database in its sole discretion\nto ensure operational stability. OpenRegistry may restrict or terminate your\naccess to the WHOIS database for failure to abide by these terms of use.\n\nOpenRegistry reserves the right to modify these terms at any time.") - end - end - describe "#domain" do - it do - expect(subject.domain).to eq("whois.sx") - end - end - describe "#domain_id" do - it do - expect(subject.domain_id).to eq("d5-sx") - end - end - describe "#status" do - it do - expect(subject.status).to eq(:registered) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(false) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(true) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to be_a(Time) - expect(subject.created_on).to eq(DateTime.parse("2011-12-09 14:07:22 UTC")) - end - end - describe "#updated_on" do - it do - expect(subject.updated_on).to be_a(Time) - expect(subject.updated_on).to eq(DateTime.parse("2013-02-25 16:50:39 UTC")) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to be_a(Time) - expect(subject.expires_on).to eq(DateTime.parse("2022-12-09 14:07:22 UTC")) - end - end - describe "#registrar" do - it do - expect(subject.registrar).to be_a(Whois::Parser::Registrar) - expect(subject.registrar.id).to eq(nil) - expect(subject.registrar.name).to eq("SX Registry O") - expect(subject.registrar.url).to eq(nil) - end - end - describe "#registrant_contacts" do - it do - expect(subject.registrant_contacts).to be_a(Array) - expect(subject.registrant_contacts.size).to eq(1) - expect(subject.registrant_contacts[0]).to be_a(Whois::Parser::Contact) - expect(subject.registrant_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_REGISTRANT) - expect(subject.registrant_contacts[0].id).to eq("C65") - expect(subject.registrant_contacts[0].name).to eq("SX Registry SA administrator") - expect(subject.registrant_contacts[0].organization).to eq("SX Registry SA") - expect(subject.registrant_contacts[0].address).to eq("2, rue Léon Laval") - expect(subject.registrant_contacts[0].city).to eq("Leudelange") - expect(subject.registrant_contacts[0].zip).to eq("L3372") - expect(subject.registrant_contacts[0].state).to eq(nil) - expect(subject.registrant_contacts[0].country).to eq("LUXEMBOURG") - expect(subject.registrant_contacts[0].country_code).to eq(nil) - expect(subject.registrant_contacts[0].phone).to eq(nil) - expect(subject.registrant_contacts[0].fax).to eq(nil) - expect(subject.registrant_contacts[0].email).to eq("registry@registry.sx") - end - end - describe "#admin_contacts" do - it do - expect(subject.admin_contacts).to be_a(Array) - expect(subject.admin_contacts.size).to eq(1) - expect(subject.admin_contacts[0]).to be_a(Whois::Parser::Contact) - expect(subject.admin_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_ADMINISTRATIVE) - expect(subject.admin_contacts[0].id).to eq("C65") - expect(subject.admin_contacts[0].name).to eq("SX Registry SA administrator") - expect(subject.admin_contacts[0].organization).to eq("SX Registry SA") - expect(subject.admin_contacts[0].address).to eq("2, rue Léon Laval") - expect(subject.admin_contacts[0].city).to eq("Leudelange") - expect(subject.admin_contacts[0].zip).to eq("L3372") - expect(subject.admin_contacts[0].state).to eq(nil) - expect(subject.admin_contacts[0].country).to eq("LUXEMBOURG") - expect(subject.admin_contacts[0].country_code).to eq(nil) - expect(subject.admin_contacts[0].phone).to eq(nil) - expect(subject.admin_contacts[0].fax).to eq(nil) - expect(subject.admin_contacts[0].email).to eq("registry@registry.sx") - end - end - describe "#technical_contacts" do - it do - expect(subject.technical_contacts).to be_a(Array) - expect(subject.technical_contacts.size).to eq(1) - expect(subject.technical_contacts[0]).to be_a(Whois::Parser::Contact) - expect(subject.technical_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_TECHNICAL) - expect(subject.technical_contacts[0].id).to eq("C65") - expect(subject.technical_contacts[0].name).to eq("SX Registry SA administrator") - expect(subject.technical_contacts[0].organization).to eq("SX Registry SA") - expect(subject.technical_contacts[0].address).to eq("2, rue Léon Laval") - expect(subject.technical_contacts[0].city).to eq("Leudelange") - expect(subject.technical_contacts[0].zip).to eq("L3372") - expect(subject.technical_contacts[0].state).to eq(nil) - expect(subject.technical_contacts[0].country).to eq("LUXEMBOURG") - expect(subject.technical_contacts[0].country_code).to eq(nil) - expect(subject.technical_contacts[0].phone).to eq(nil) - expect(subject.technical_contacts[0].fax).to eq(nil) - expect(subject.technical_contacts[0].email).to eq("registry@registry.sx") - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers.size).to eq(3) - expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[0].name).to eq("a.ns.sx") - expect(subject.nameservers[0].ipv4).to eq(nil) - expect(subject.nameservers[0].ipv6).to eq(nil) - expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[1].name).to eq("b.ns.sx") - expect(subject.nameservers[1].ipv4).to eq(nil) - expect(subject.nameservers[1].ipv6).to eq(nil) - expect(subject.nameservers[2]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[2].name).to eq("c.ns.sx") - expect(subject.nameservers[2].ipv4).to eq(nil) - expect(subject.nameservers[2].ipv6).to eq(nil) - end + it "matches status_registered.expected" do + expect(subject.disclaimer).to eq("WHOIS LEGAL STATEMENT AND TERMS & CONDITIONS\nThe WHOIS service offered by OpenRegistry and the access to the\nrecords in the OpenRegistry WHOIS database are provided for information\npurposes only. It allows persons to check whether a specific domain name\nis still available or not and to obtain information related to the\nregistration records of existing domain names. You are not authorized to\naccess or query our WHOIS database through the use of electronic\nprocesses that are high-volume and automated except as reasonably\nnecessary to register domain names or modify existing registrations.\n\nOpenRegistry cannot, under any circumstances, be held liable should the\nstored information prove to be wrong, incomplete or inaccurate in any sense.\n\nBy submitting a WHOIS query you agree not to use the information made\navailable to:\n- Allow, enable or otherwise support the transmission of unsolicited,\ncommercial advertising or other solicitations whether via email, telephone\nor otherwise;\n- Target advertising in any possible way;\n- Cause nuisance in any possible way to the registrants by sending (whether\nby automated, electronic processes capable of enabling high volumes or\nother possible means) messages to them.\n\nWithout prejudice to the above, it is explicitly forbidden to extract, copy\nand/or use or re-utilise in any form and by any means (electronically or\nnot) the whole or a quantitatively or qualitatively substantial part of the\ncontents of the WHOIS database without prior and explicit permission by\nOpenRegistry, nor in any attempt hereof, to apply automated, electronic\nprocesses to OpenRegistry (or its systems).\n\nBy submitting the query you agree that any reproduction and/or transmission\nof data for commercial purposes will always be considered as the extraction\nof a substantial part of the content of the WHOIS database. You also agree\nto abide by this policy and accept that OpenRegistry can take measures to\nlimit the use of its WHOIS services in order to protect the privacy of its\nregistrants and/or the integrity of the database. OpenRegistry reserves the\nright to restrict your access to the WHOIS database in its sole discretion\nto ensure operational stability. OpenRegistry may restrict or terminate your\naccess to the WHOIS database for failure to abide by these terms of use.\n\nOpenRegistry reserves the right to modify these terms at any time.") + expect(subject.domain).to eq("whois.sx") + expect(subject.domain_id).to eq("d5-sx") + expect(subject.status).to eq(:registered) + expect(subject.available?).to eq(false) + expect(subject.registered?).to eq(true) + expect(subject.created_on).to be_a(Time) + expect(subject.created_on).to eq(DateTime.parse("2011-12-09 14:07:22 UTC")) + expect(subject.updated_on).to be_a(Time) + expect(subject.updated_on).to eq(DateTime.parse("2013-02-25 16:50:39 UTC")) + expect(subject.expires_on).to be_a(Time) + expect(subject.expires_on).to eq(DateTime.parse("2022-12-09 14:07:22 UTC")) + expect(subject.registrar).to be_a(Whois::Parser::Registrar) + expect(subject.registrar.id).to eq(nil) + expect(subject.registrar.name).to eq("SX Registry O") + expect(subject.registrar.url).to eq(nil) + expect(subject.registrant_contacts).to be_a(Array) + expect(subject.registrant_contacts.size).to eq(1) + expect(subject.registrant_contacts[0]).to be_a(Whois::Parser::Contact) + expect(subject.registrant_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_REGISTRANT) + expect(subject.registrant_contacts[0].id).to eq("C65") + expect(subject.registrant_contacts[0].name).to eq("SX Registry SA administrator") + expect(subject.registrant_contacts[0].organization).to eq("SX Registry SA") + expect(subject.registrant_contacts[0].address).to eq("2, rue Léon Laval") + expect(subject.registrant_contacts[0].city).to eq("Leudelange") + expect(subject.registrant_contacts[0].zip).to eq("L3372") + expect(subject.registrant_contacts[0].state).to eq(nil) + expect(subject.registrant_contacts[0].country).to eq("LUXEMBOURG") + expect(subject.registrant_contacts[0].country_code).to eq(nil) + expect(subject.registrant_contacts[0].phone).to eq(nil) + expect(subject.registrant_contacts[0].fax).to eq(nil) + expect(subject.registrant_contacts[0].email).to eq("registry@registry.sx") + expect(subject.admin_contacts).to be_a(Array) + expect(subject.admin_contacts.size).to eq(1) + expect(subject.admin_contacts[0]).to be_a(Whois::Parser::Contact) + expect(subject.admin_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_ADMINISTRATIVE) + expect(subject.admin_contacts[0].id).to eq("C65") + expect(subject.admin_contacts[0].name).to eq("SX Registry SA administrator") + expect(subject.admin_contacts[0].organization).to eq("SX Registry SA") + expect(subject.admin_contacts[0].address).to eq("2, rue Léon Laval") + expect(subject.admin_contacts[0].city).to eq("Leudelange") + expect(subject.admin_contacts[0].zip).to eq("L3372") + expect(subject.admin_contacts[0].state).to eq(nil) + expect(subject.admin_contacts[0].country).to eq("LUXEMBOURG") + expect(subject.admin_contacts[0].country_code).to eq(nil) + expect(subject.admin_contacts[0].phone).to eq(nil) + expect(subject.admin_contacts[0].fax).to eq(nil) + expect(subject.admin_contacts[0].email).to eq("registry@registry.sx") + expect(subject.technical_contacts).to be_a(Array) + expect(subject.technical_contacts.size).to eq(1) + expect(subject.technical_contacts[0]).to be_a(Whois::Parser::Contact) + expect(subject.technical_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_TECHNICAL) + expect(subject.technical_contacts[0].id).to eq("C65") + expect(subject.technical_contacts[0].name).to eq("SX Registry SA administrator") + expect(subject.technical_contacts[0].organization).to eq("SX Registry SA") + expect(subject.technical_contacts[0].address).to eq("2, rue Léon Laval") + expect(subject.technical_contacts[0].city).to eq("Leudelange") + expect(subject.technical_contacts[0].zip).to eq("L3372") + expect(subject.technical_contacts[0].state).to eq(nil) + expect(subject.technical_contacts[0].country).to eq("LUXEMBOURG") + expect(subject.technical_contacts[0].country_code).to eq(nil) + expect(subject.technical_contacts[0].phone).to eq(nil) + expect(subject.technical_contacts[0].fax).to eq(nil) + expect(subject.technical_contacts[0].email).to eq("registry@registry.sx") + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers.size).to eq(3) + expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[0].name).to eq("a.ns.sx") + expect(subject.nameservers[0].ipv4).to eq(nil) + expect(subject.nameservers[0].ipv6).to eq(nil) + expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[1].name).to eq("b.ns.sx") + expect(subject.nameservers[1].ipv4).to eq(nil) + expect(subject.nameservers[1].ipv6).to eq(nil) + expect(subject.nameservers[2]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[2].name).to eq("c.ns.sx") + expect(subject.nameservers[2].ipv4).to eq(nil) + expect(subject.nameservers[2].ipv6).to eq(nil) end end diff --git a/spec/whois/parsers/responses/whois.sx/sx/status_unavailable_spec.rb b/spec/whois/parsers/responses/whois.sx/sx/status_unavailable_spec.rb index 3d9e3974..72fd0150 100644 --- a/spec/whois/parsers/responses/whois.sx/sx/status_unavailable_spec.rb +++ b/spec/whois/parsers/responses/whois.sx/sx/status_unavailable_spec.rb @@ -11,29 +11,18 @@ # require 'spec_helper' -require 'whois/parsers/whois.sx.rb' -describe Whois::Parsers::WhoisSx, "status_unavailable.expected" do +describe "whois.sx", :aggregate_failures do subject do file = fixture("responses", "whois.sx/sx/status_unavailable.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.sx") + Whois::Parser.parser_for(part) end - describe "#status" do - it do - expect(subject.status).to eq(:unavailable) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(false) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(false) - end + it "matches status_unavailable.expected" do + expect(subject.status).to eq(:unavailable) + expect(subject.available?).to eq(false) + expect(subject.registered?).to eq(false) end end diff --git a/spec/whois/parsers/responses/whois.tcinet.ru/ru/property_nameservers_with_ip_spec.rb b/spec/whois/parsers/responses/whois.tcinet.ru/ru/property_nameservers_with_ip_spec.rb index 84259854..9aaf18ad 100644 --- a/spec/whois/parsers/responses/whois.tcinet.ru/ru/property_nameservers_with_ip_spec.rb +++ b/spec/whois/parsers/responses/whois.tcinet.ru/ru/property_nameservers_with_ip_spec.rb @@ -11,29 +11,26 @@ # require 'spec_helper' -require 'whois/parsers/whois.tcinet.ru.rb' -describe Whois::Parsers::WhoisTcinetRu, "property_nameservers_with_ip.expected" do +describe "whois.tcinet.ru", :aggregate_failures do subject do file = fixture("responses", "whois.tcinet.ru/ru/property_nameservers_with_ip.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.tcinet.ru") + Whois::Parser.parser_for(part) end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers.size).to eq(3) - expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[0].name).to eq("ns.masterhost.ru") - expect(subject.nameservers[0].ipv4).to eq("217.16.20.30") - expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[1].name).to eq("ns1.masterhost.ru") - expect(subject.nameservers[1].ipv4).to eq("217.16.16.30") - expect(subject.nameservers[2]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[2].name).to eq("ns2.masterhost.ru") - expect(subject.nameservers[2].ipv4).to eq("217.16.22.30") - end + it "matches property_nameservers_with_ip.expected" do + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers.size).to eq(3) + expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[0].name).to eq("ns.masterhost.ru") + expect(subject.nameservers[0].ipv4).to eq("217.16.20.30") + expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[1].name).to eq("ns1.masterhost.ru") + expect(subject.nameservers[1].ipv4).to eq("217.16.16.30") + expect(subject.nameservers[2]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[2].name).to eq("ns2.masterhost.ru") + expect(subject.nameservers[2].ipv4).to eq("217.16.22.30") end end diff --git a/spec/whois/parsers/responses/whois.tcinet.ru/ru/status_available_spec.rb b/spec/whois/parsers/responses/whois.tcinet.ru/ru/status_available_spec.rb index 3f9b9d29..bacd05fe 100644 --- a/spec/whois/parsers/responses/whois.tcinet.ru/ru/status_available_spec.rb +++ b/spec/whois/parsers/responses/whois.tcinet.ru/ru/status_available_spec.rb @@ -11,81 +11,30 @@ # require 'spec_helper' -require 'whois/parsers/whois.tcinet.ru.rb' -describe Whois::Parsers::WhoisTcinetRu, "status_available.expected" do +describe "whois.tcinet.ru", :aggregate_failures do subject do file = fixture("responses", "whois.tcinet.ru/ru/status_available.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.tcinet.ru") + Whois::Parser.parser_for(part) end - describe "#domain" do - it do - expect(subject.domain).to eq(nil) - end - end - describe "#domain_id" do - it do - expect { subject.domain_id }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#status" do - it do - expect(subject.status).to eq([]) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(true) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(false) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to eq(nil) - end - end - describe "#updated_on" do - it do - expect { subject.updated_on }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to eq(nil) - end - end - describe "#registrar" do - it do - expect(subject.registrar).to eq(nil) - end - end - describe "#registrant_contacts" do - it do - expect { subject.registrant_contacts }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#admin_contacts" do - it do - expect(subject.admin_contacts).to be_a(Array) - expect(subject.admin_contacts).to eq([]) - end - end - describe "#technical_contacts" do - it do - expect { subject.technical_contacts }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers).to eq([]) - end + it "matches status_available.expected" do + expect(subject.domain).to eq(nil) + expect { subject.domain_id }.to raise_error(Whois::AttributeNotSupported) + expect(subject.status).to eq([]) + expect(subject.available?).to eq(true) + expect(subject.registered?).to eq(false) + expect(subject.created_on).to eq(nil) + expect { subject.updated_on }.to raise_error(Whois::AttributeNotSupported) + expect(subject.expires_on).to eq(nil) + expect(subject.registrar).to eq(nil) + expect { subject.registrant_contacts }.to raise_error(Whois::AttributeNotSupported) + expect(subject.admin_contacts).to be_a(Array) + expect(subject.admin_contacts).to eq([]) + expect { subject.technical_contacts }.to raise_error(Whois::AttributeNotSupported) + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers).to eq([]) end end diff --git a/spec/whois/parsers/responses/whois.tcinet.ru/ru/status_registered_spec.rb b/spec/whois/parsers/responses/whois.tcinet.ru/ru/status_registered_spec.rb index 8adea6d9..8a3bc9dc 100644 --- a/spec/whois/parsers/responses/whois.tcinet.ru/ru/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.tcinet.ru/ru/status_registered_spec.rb @@ -11,96 +11,45 @@ # require 'spec_helper' -require 'whois/parsers/whois.tcinet.ru.rb' -describe Whois::Parsers::WhoisTcinetRu, "status_registered.expected" do +describe "whois.tcinet.ru", :aggregate_failures do subject do file = fixture("responses", "whois.tcinet.ru/ru/status_registered.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.tcinet.ru") + Whois::Parser.parser_for(part) end - describe "#domain" do - it do - expect(subject.domain).to eq("google.ru") - end - end - describe "#domain_id" do - it do - expect { subject.domain_id }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#status" do - it do - expect(subject.status).to eq(["REGISTERED", "DELEGATED", "VERIFIED"]) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(false) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(true) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to be_a(Time) - expect(subject.created_on).to eq(DateTime.parse("2004-03-04")) - end - end - describe "#updated_on" do - it do - expect { subject.updated_on }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to be_a(Time) - expect(subject.expires_on).to eq(DateTime.parse("2015-03-05")) - end - end - describe "#registrar" do - it do - expect(subject.registrar).to be_a(Whois::Parser::Registrar) - expect(subject.registrar.id).to eq(nil) - expect(subject.registrar.name).to eq("RU-CENTER-REG-RIPN") - end - end - describe "#registrant_contacts" do - it do - expect { subject.registrant_contacts }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#admin_contacts" do - it do - expect(subject.admin_contacts.size).to eq(1) - expect(subject.admin_contacts[0]).to be_a(Whois::Parser::Contact) - expect(subject.admin_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_ADMINISTRATIVE) - expect(subject.admin_contacts[0].organization).to eq("Google Inc.") - expect(subject.admin_contacts[0].url).to eq("https://www.nic.ru/whois") - end - end - describe "#technical_contacts" do - it do - expect { subject.technical_contacts }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers.size).to eq(4) - expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[0].name).to eq("ns1.google.com") - expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[1].name).to eq("ns2.google.com") - expect(subject.nameservers[2]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[2].name).to eq("ns3.google.com") - expect(subject.nameservers[3]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[3].name).to eq("ns4.google.com") - end + it "matches status_registered.expected" do + expect(subject.domain).to eq("google.ru") + expect { subject.domain_id }.to raise_error(Whois::AttributeNotSupported) + expect(subject.status).to eq(["REGISTERED", "DELEGATED", "VERIFIED"]) + expect(subject.available?).to eq(false) + expect(subject.registered?).to eq(true) + expect(subject.created_on).to be_a(Time) + expect(subject.created_on).to eq(DateTime.parse("2004-03-04")) + expect { subject.updated_on }.to raise_error(Whois::AttributeNotSupported) + expect(subject.expires_on).to be_a(Time) + expect(subject.expires_on).to eq(DateTime.parse("2015-03-05")) + expect(subject.registrar).to be_a(Whois::Parser::Registrar) + expect(subject.registrar.id).to eq(nil) + expect(subject.registrar.name).to eq("RU-CENTER-REG-RIPN") + expect { subject.registrant_contacts }.to raise_error(Whois::AttributeNotSupported) + expect(subject.admin_contacts.size).to eq(1) + expect(subject.admin_contacts[0]).to be_a(Whois::Parser::Contact) + expect(subject.admin_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_ADMINISTRATIVE) + expect(subject.admin_contacts[0].organization).to eq("Google Inc.") + expect(subject.admin_contacts[0].url).to eq("https://www.nic.ru/whois") + expect { subject.technical_contacts }.to raise_error(Whois::AttributeNotSupported) + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers.size).to eq(4) + expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[0].name).to eq("ns1.google.com") + expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[1].name).to eq("ns2.google.com") + expect(subject.nameservers[2]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[2].name).to eq("ns3.google.com") + expect(subject.nameservers[3]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[3].name).to eq("ns4.google.com") end end diff --git a/spec/whois/parsers/responses/whois.tcinet.ru/su/status_available_spec.rb b/spec/whois/parsers/responses/whois.tcinet.ru/su/status_available_spec.rb index 7d8f4147..fd1223d7 100644 --- a/spec/whois/parsers/responses/whois.tcinet.ru/su/status_available_spec.rb +++ b/spec/whois/parsers/responses/whois.tcinet.ru/su/status_available_spec.rb @@ -11,81 +11,30 @@ # require 'spec_helper' -require 'whois/parsers/whois.tcinet.ru.rb' -describe Whois::Parsers::WhoisTcinetRu, "status_available.expected" do +describe "whois.tcinet.ru", :aggregate_failures do subject do file = fixture("responses", "whois.tcinet.ru/su/status_available.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.tcinet.ru") + Whois::Parser.parser_for(part) end - describe "#domain" do - it do - expect(subject.domain).to eq(nil) - end - end - describe "#domain_id" do - it do - expect { subject.domain_id }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#status" do - it do - expect(subject.status).to eq([]) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(true) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(false) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to eq(nil) - end - end - describe "#updated_on" do - it do - expect { subject.updated_on }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to eq(nil) - end - end - describe "#registrar" do - it do - expect(subject.registrar).to eq(nil) - end - end - describe "#registrant_contacts" do - it do - expect { subject.registrant_contacts }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#admin_contacts" do - it do - expect(subject.admin_contacts).to be_a(Array) - expect(subject.admin_contacts).to eq([]) - end - end - describe "#technical_contacts" do - it do - expect { subject.technical_contacts }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers).to eq([]) - end + it "matches status_available.expected" do + expect(subject.domain).to eq(nil) + expect { subject.domain_id }.to raise_error(Whois::AttributeNotSupported) + expect(subject.status).to eq([]) + expect(subject.available?).to eq(true) + expect(subject.registered?).to eq(false) + expect(subject.created_on).to eq(nil) + expect { subject.updated_on }.to raise_error(Whois::AttributeNotSupported) + expect(subject.expires_on).to eq(nil) + expect(subject.registrar).to eq(nil) + expect { subject.registrant_contacts }.to raise_error(Whois::AttributeNotSupported) + expect(subject.admin_contacts).to be_a(Array) + expect(subject.admin_contacts).to eq([]) + expect { subject.technical_contacts }.to raise_error(Whois::AttributeNotSupported) + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers).to eq([]) end end diff --git a/spec/whois/parsers/responses/whois.tcinet.ru/su/status_registered_spec.rb b/spec/whois/parsers/responses/whois.tcinet.ru/su/status_registered_spec.rb index 8cc74e6c..e5cb3c3e 100644 --- a/spec/whois/parsers/responses/whois.tcinet.ru/su/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.tcinet.ru/su/status_registered_spec.rb @@ -11,96 +11,45 @@ # require 'spec_helper' -require 'whois/parsers/whois.tcinet.ru.rb' -describe Whois::Parsers::WhoisTcinetRu, "status_registered.expected" do +describe "whois.tcinet.ru", :aggregate_failures do subject do file = fixture("responses", "whois.tcinet.ru/su/status_registered.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.tcinet.ru") + Whois::Parser.parser_for(part) end - describe "#domain" do - it do - expect(subject.domain).to eq("google.su") - end - end - describe "#domain_id" do - it do - expect { subject.domain_id }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#status" do - it do - expect(subject.status).to eq(["REGISTERED", "DELEGATED", "UNVERIFIED"]) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(false) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(true) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to be_a(Time) - expect(subject.created_on).to eq(DateTime.parse("2005-10-16")) - end - end - describe "#updated_on" do - it do - expect { subject.updated_on }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to be_a(Time) - expect(subject.expires_on).to eq(DateTime.parse("2010-10-16")) - end - end - describe "#registrar" do - it do - expect(subject.registrar).to be_a(Whois::Parser::Registrar) - expect(subject.registrar.id).to eq(nil) - expect(subject.registrar.name).to eq("RUCENTER-REG-FID") - end - end - describe "#registrant_contacts" do - it do - expect { subject.registrant_contacts }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#admin_contacts" do - it do - expect(subject.admin_contacts).to be_a(Array) - expect(subject.admin_contacts.size).to eq(1) - expect(subject.admin_contacts[0]).to be_a(Whois::Parser::Contact) - expect(subject.admin_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_ADMINISTRATIVE) - expect(subject.admin_contacts[0].id).to eq(nil) - expect(subject.admin_contacts[0].name).to eq("Private Person") - expect(subject.admin_contacts[0].phone).to eq("+7 495 9681807") - expect(subject.admin_contacts[0].fax).to eq("+7 495 9681807") - expect(subject.admin_contacts[0].email).to eq("cis@cis.su") - end - end - describe "#technical_contacts" do - it do - expect { subject.technical_contacts }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers.size).to eq(2) - expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[0].name).to eq("ns1073.hostgator.com") - expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[1].name).to eq("ns1074.hostgator.com") - end + it "matches status_registered.expected" do + expect(subject.domain).to eq("google.su") + expect { subject.domain_id }.to raise_error(Whois::AttributeNotSupported) + expect(subject.status).to eq(["REGISTERED", "DELEGATED", "UNVERIFIED"]) + expect(subject.available?).to eq(false) + expect(subject.registered?).to eq(true) + expect(subject.created_on).to be_a(Time) + expect(subject.created_on).to eq(DateTime.parse("2005-10-16")) + expect { subject.updated_on }.to raise_error(Whois::AttributeNotSupported) + expect(subject.expires_on).to be_a(Time) + expect(subject.expires_on).to eq(DateTime.parse("2010-10-16")) + expect(subject.registrar).to be_a(Whois::Parser::Registrar) + expect(subject.registrar.id).to eq(nil) + expect(subject.registrar.name).to eq("RUCENTER-REG-FID") + expect { subject.registrant_contacts }.to raise_error(Whois::AttributeNotSupported) + expect(subject.admin_contacts).to be_a(Array) + expect(subject.admin_contacts.size).to eq(1) + expect(subject.admin_contacts[0]).to be_a(Whois::Parser::Contact) + expect(subject.admin_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_ADMINISTRATIVE) + expect(subject.admin_contacts[0].id).to eq(nil) + expect(subject.admin_contacts[0].name).to eq("Private Person") + expect(subject.admin_contacts[0].phone).to eq("+7 495 9681807") + expect(subject.admin_contacts[0].fax).to eq("+7 495 9681807") + expect(subject.admin_contacts[0].email).to eq("cis@cis.su") + expect { subject.technical_contacts }.to raise_error(Whois::AttributeNotSupported) + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers.size).to eq(2) + expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[0].name).to eq("ns1073.hostgator.com") + expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[1].name).to eq("ns1074.hostgator.com") end end diff --git a/spec/whois/parsers/responses/whois.tcinet.ru/xn--p1ai/status_available_spec.rb b/spec/whois/parsers/responses/whois.tcinet.ru/xn--p1ai/status_available_spec.rb index 0b7cf669..0e637a8e 100644 --- a/spec/whois/parsers/responses/whois.tcinet.ru/xn--p1ai/status_available_spec.rb +++ b/spec/whois/parsers/responses/whois.tcinet.ru/xn--p1ai/status_available_spec.rb @@ -11,81 +11,30 @@ # require 'spec_helper' -require 'whois/parsers/whois.tcinet.ru.rb' -describe Whois::Parsers::WhoisTcinetRu, "status_available.expected" do +describe "whois.tcinet.ru", :aggregate_failures do subject do file = fixture("responses", "whois.tcinet.ru/xn--p1ai/status_available.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.tcinet.ru") + Whois::Parser.parser_for(part) end - describe "#domain" do - it do - expect(subject.domain).to eq(nil) - end - end - describe "#domain_id" do - it do - expect { subject.domain_id }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#status" do - it do - expect(subject.status).to eq([]) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(true) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(false) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to eq(nil) - end - end - describe "#updated_on" do - it do - expect { subject.updated_on }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to eq(nil) - end - end - describe "#registrar" do - it do - expect(subject.registrar).to eq(nil) - end - end - describe "#registrant_contacts" do - it do - expect { subject.registrant_contacts }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#admin_contacts" do - it do - expect(subject.admin_contacts).to be_a(Array) - expect(subject.admin_contacts).to eq([]) - end - end - describe "#technical_contacts" do - it do - expect { subject.technical_contacts }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers).to eq([]) - end + it "matches status_available.expected" do + expect(subject.domain).to eq(nil) + expect { subject.domain_id }.to raise_error(Whois::AttributeNotSupported) + expect(subject.status).to eq([]) + expect(subject.available?).to eq(true) + expect(subject.registered?).to eq(false) + expect(subject.created_on).to eq(nil) + expect { subject.updated_on }.to raise_error(Whois::AttributeNotSupported) + expect(subject.expires_on).to eq(nil) + expect(subject.registrar).to eq(nil) + expect { subject.registrant_contacts }.to raise_error(Whois::AttributeNotSupported) + expect(subject.admin_contacts).to be_a(Array) + expect(subject.admin_contacts).to eq([]) + expect { subject.technical_contacts }.to raise_error(Whois::AttributeNotSupported) + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers).to eq([]) end end diff --git a/spec/whois/parsers/responses/whois.tcinet.ru/xn--p1ai/status_registered_spec.rb b/spec/whois/parsers/responses/whois.tcinet.ru/xn--p1ai/status_registered_spec.rb index 4488fcd6..8ff65e47 100644 --- a/spec/whois/parsers/responses/whois.tcinet.ru/xn--p1ai/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.tcinet.ru/xn--p1ai/status_registered_spec.rb @@ -11,99 +11,48 @@ # require 'spec_helper' -require 'whois/parsers/whois.tcinet.ru.rb' -describe Whois::Parsers::WhoisTcinetRu, "status_registered.expected" do +describe "whois.tcinet.ru", :aggregate_failures do subject do file = fixture("responses", "whois.tcinet.ru/xn--p1ai/status_registered.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.tcinet.ru") + Whois::Parser.parser_for(part) end - describe "#domain" do - it do - expect(subject.domain).to eq("xn----8sbc3ahklcs4adf.xn--p1ai") - end - end - describe "#domain_id" do - it do - expect { subject.domain_id }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#status" do - it do - expect(subject.status).to eq(["REGISTERED", "DELEGATED", "VERIFIED"]) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(false) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(true) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to be_a(Time) - expect(subject.created_on).to eq(DateTime.parse("2010-11-12")) - end - end - describe "#updated_on" do - it do - expect { subject.updated_on }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to be_a(Time) - expect(subject.expires_on).to eq(DateTime.parse("2011-11-12")) - end - end - describe "#registrar" do - it do - expect(subject.registrar).to be_a(Whois::Parser::Registrar) - expect(subject.registrar.id).to eq(nil) - expect(subject.registrar.name).to eq("R01-REG-RF") - end - end - describe "#registrant_contacts" do - it do - expect { subject.registrant_contacts }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#admin_contacts" do - it do - expect(subject.admin_contacts).to be_a(Array) - expect(subject.admin_contacts.size).to eq(1) - expect(subject.admin_contacts[0]).to be_a(Whois::Parser::Contact) - expect(subject.admin_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_ADMINISTRATIVE) - expect(subject.admin_contacts[0].id).to eq(nil) - expect(subject.admin_contacts[0].name).to eq("R01 Personal Data Operator protected") - expect(subject.admin_contacts[0].organization).to eq(nil) - expect(subject.admin_contacts[0].phone).to eq("+7 800 3020800") - expect(subject.admin_contacts[0].fax).to eq(nil) - expect(subject.admin_contacts[0].email).to eq("liderkubani@gmail.com") - end - end - describe "#technical_contacts" do - it do - expect { subject.technical_contacts }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers.size).to eq(3) - expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[0].name).to eq("ns1.redsoft.ru") - expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[1].name).to eq("ns2.redsoft.ru") - expect(subject.nameservers[2]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[2].name).to eq("ns2.r01.ru") - end + it "matches status_registered.expected" do + expect(subject.domain).to eq("xn----8sbc3ahklcs4adf.xn--p1ai") + expect { subject.domain_id }.to raise_error(Whois::AttributeNotSupported) + expect(subject.status).to eq(["REGISTERED", "DELEGATED", "VERIFIED"]) + expect(subject.available?).to eq(false) + expect(subject.registered?).to eq(true) + expect(subject.created_on).to be_a(Time) + expect(subject.created_on).to eq(DateTime.parse("2010-11-12")) + expect { subject.updated_on }.to raise_error(Whois::AttributeNotSupported) + expect(subject.expires_on).to be_a(Time) + expect(subject.expires_on).to eq(DateTime.parse("2011-11-12")) + expect(subject.registrar).to be_a(Whois::Parser::Registrar) + expect(subject.registrar.id).to eq(nil) + expect(subject.registrar.name).to eq("R01-REG-RF") + expect { subject.registrant_contacts }.to raise_error(Whois::AttributeNotSupported) + expect(subject.admin_contacts).to be_a(Array) + expect(subject.admin_contacts.size).to eq(1) + expect(subject.admin_contacts[0]).to be_a(Whois::Parser::Contact) + expect(subject.admin_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_ADMINISTRATIVE) + expect(subject.admin_contacts[0].id).to eq(nil) + expect(subject.admin_contacts[0].name).to eq("R01 Personal Data Operator protected") + expect(subject.admin_contacts[0].organization).to eq(nil) + expect(subject.admin_contacts[0].phone).to eq("+7 800 3020800") + expect(subject.admin_contacts[0].fax).to eq(nil) + expect(subject.admin_contacts[0].email).to eq("liderkubani@gmail.com") + expect { subject.technical_contacts }.to raise_error(Whois::AttributeNotSupported) + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers.size).to eq(3) + expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[0].name).to eq("ns1.redsoft.ru") + expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[1].name).to eq("ns2.redsoft.ru") + expect(subject.nameservers[2]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[2].name).to eq("ns2.r01.ru") end end diff --git a/spec/whois/parsers/responses/whois.thnic.co.th/th/status_available_spec.rb b/spec/whois/parsers/responses/whois.thnic.co.th/th/status_available_spec.rb index abe8180e..8258d9ba 100644 --- a/spec/whois/parsers/responses/whois.thnic.co.th/th/status_available_spec.rb +++ b/spec/whois/parsers/responses/whois.thnic.co.th/th/status_available_spec.rb @@ -11,50 +11,23 @@ # require 'spec_helper' -require 'whois/parsers/whois.thnic.co.th.rb' -describe Whois::Parsers::WhoisThnicCoTh, "status_available.expected" do +describe "whois.thnic.co.th", :aggregate_failures do subject do file = fixture("responses", "whois.thnic.co.th/th/status_available.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.thnic.co.th") + Whois::Parser.parser_for(part) end - describe "#status" do - it do - expect(subject.status).to eq(:available) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(true) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(false) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to eq(nil) - end - end - describe "#updated_on" do - it do - expect(subject.updated_on).to eq(nil) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to eq(nil) - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers).to eq([]) - end + it "matches status_available.expected" do + expect(subject.status).to eq(:available) + expect(subject.available?).to eq(true) + expect(subject.registered?).to eq(false) + expect(subject.created_on).to eq(nil) + expect(subject.updated_on).to eq(nil) + expect(subject.expires_on).to eq(nil) + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers).to eq([]) end end diff --git a/spec/whois/parsers/responses/whois.thnic.co.th/th/status_registered_spec.rb b/spec/whois/parsers/responses/whois.thnic.co.th/th/status_registered_spec.rb index 5d3878dd..8a375b2c 100644 --- a/spec/whois/parsers/responses/whois.thnic.co.th/th/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.thnic.co.th/th/status_registered_spec.rb @@ -11,61 +11,34 @@ # require 'spec_helper' -require 'whois/parsers/whois.thnic.co.th.rb' -describe Whois::Parsers::WhoisThnicCoTh, "status_registered.expected" do +describe "whois.thnic.co.th", :aggregate_failures do subject do file = fixture("responses", "whois.thnic.co.th/th/status_registered.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.thnic.co.th") + Whois::Parser.parser_for(part) end - describe "#status" do - it do - expect(subject.status).to eq(:registered) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(false) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(true) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to be_a(Time) - expect(subject.created_on).to eq(DateTime.parse("2004-10-08")) - end - end - describe "#updated_on" do - it do - expect(subject.updated_on).to be_a(Time) - expect(subject.updated_on).to eq(DateTime.parse("2012-09-07")) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to be_a(Time) - expect(subject.expires_on).to eq(DateTime.parse("2013-10-07")) - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers.size).to eq(4) - expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[0].name).to eq("ns1.google.com") - expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[1].name).to eq("ns2.google.com") - expect(subject.nameservers[2]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[2].name).to eq("ns3.google.com") - expect(subject.nameservers[3]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[3].name).to eq("ns4.google.com") - end + it "matches status_registered.expected" do + expect(subject.status).to eq(:registered) + expect(subject.available?).to eq(false) + expect(subject.registered?).to eq(true) + expect(subject.created_on).to be_a(Time) + expect(subject.created_on).to eq(DateTime.parse("2004-10-08")) + expect(subject.updated_on).to be_a(Time) + expect(subject.updated_on).to eq(DateTime.parse("2012-09-07")) + expect(subject.expires_on).to be_a(Time) + expect(subject.expires_on).to eq(DateTime.parse("2013-10-07")) + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers.size).to eq(4) + expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[0].name).to eq("ns1.google.com") + expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[1].name).to eq("ns2.google.com") + expect(subject.nameservers[2]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[2].name).to eq("ns3.google.com") + expect(subject.nameservers[3]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[3].name).to eq("ns4.google.com") end end diff --git a/spec/whois/parsers/responses/whois.tld.ee/ee/property_status_serverhold_spec.rb b/spec/whois/parsers/responses/whois.tld.ee/ee/property_status_serverhold_spec.rb index 96c56a46..de606062 100644 --- a/spec/whois/parsers/responses/whois.tld.ee/ee/property_status_serverhold_spec.rb +++ b/spec/whois/parsers/responses/whois.tld.ee/ee/property_status_serverhold_spec.rb @@ -11,165 +11,110 @@ # require 'spec_helper' -require 'whois/parsers/whois.tld.ee.rb' -describe Whois::Parsers::WhoisTldEe, "property_status_serverhold.expected" do +describe "whois.tld.ee", :aggregate_failures do subject do file = fixture("responses", "whois.tld.ee/ee/property_status_serverhold.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.tld.ee") + Whois::Parser.parser_for(part) end - describe "#disclaimer" do - it do - expect(subject.disclaimer).to eq("Estonia .ee Top Level Domain WHOIS server\nMore information at http://internet.ee") - end - end - describe "#domain" do - it do - expect(subject.domain).to eq("samanacrafts.ee") - end - end - describe "#domain_id" do - it do - expect { subject.domain_id }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#status" do - it do - expect(subject.status).to eq(:expired) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(false) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(true) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to be_a(Time) - expect(subject.created_on).to eq(DateTime.parse("2014-11-01 20:38:55 +02:00")) - end - end - describe "#updated_on" do - it do - expect(subject.updated_on).to be_a(Time) - expect(subject.updated_on).to eq(DateTime.parse("2014-11-01 20:38:55 +02:00")) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to be_a(Time) - expect(subject.expires_on).to eq(DateTime.parse("2015-11-01")) - end - end - describe "#registrar" do - it do - expect(subject.registrar).to be_a(Whois::Parser::Registrar) - expect(subject.registrar.name).to eq("Edicy OÜ") - expect(subject.registrar.url).to eq("http://www.edicy.com") - end - end - describe "#registrant_contacts" do - it do - expect(subject.registrant_contacts).to be_a(Array) - expect(subject.registrant_contacts.size).to eq(1) - expect(subject.registrant_contacts[0]).to be_a(Whois::Parser::Contact) - expect(subject.registrant_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_REGISTRANT) - expect(subject.registrant_contacts[0].id).to eq(nil) - expect(subject.registrant_contacts[0].name).to eq("Anastassia Hisamova") - expect(subject.registrant_contacts[0].organization).to eq(nil) - expect(subject.registrant_contacts[0].address).to eq(nil) - expect(subject.registrant_contacts[0].city).to eq(nil) - expect(subject.registrant_contacts[0].zip).to eq(nil) - expect(subject.registrant_contacts[0].state).to eq(nil) - expect(subject.registrant_contacts[0].country).to eq(nil) - expect(subject.registrant_contacts[0].country_code).to eq(nil) - expect(subject.registrant_contacts[0].phone).to eq(nil) - expect(subject.registrant_contacts[0].fax).to eq(nil) - expect(subject.registrant_contacts[0].email).to eq("Not Disclosed - Visit www.internet.ee for webbased WHOIS") - expect(subject.registrant_contacts[0].created_on).to eq(nil) - expect(subject.registrant_contacts[0].updated_on).to eq(DateTime.parse("2014-11-01 20:38:55 +02:00")) - end - end - describe "#admin_contacts" do - it do - expect(subject.admin_contacts).to be_a(Array) - expect(subject.admin_contacts.size).to eq(2) - expect(subject.admin_contacts[0]).to be_a(Whois::Parser::Contact) - expect(subject.admin_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_ADMINISTRATIVE) - expect(subject.admin_contacts[0].id).to eq(nil) - expect(subject.admin_contacts[0].name).to eq("Anastassia Hisamova") - expect(subject.admin_contacts[0].organization).to eq(nil) - expect(subject.admin_contacts[0].address).to eq(nil) - expect(subject.admin_contacts[0].city).to eq(nil) - expect(subject.admin_contacts[0].zip).to eq(nil) - expect(subject.admin_contacts[0].state).to eq(nil) - expect(subject.admin_contacts[0].country).to eq(nil) - expect(subject.admin_contacts[0].country_code).to eq(nil) - expect(subject.admin_contacts[0].phone).to eq(nil) - expect(subject.admin_contacts[0].fax).to eq(nil) - expect(subject.admin_contacts[0].email).to eq("Not Disclosed - Visit www.internet.ee for webbased WHOIS") - expect(subject.admin_contacts[0].created_on).to eq(nil) - expect(subject.admin_contacts[0].updated_on).to eq(DateTime.parse("2014-11-01 20:38:55 +02:00")) - expect(subject.admin_contacts[1]).to be_a(Whois::Parser::Contact) - expect(subject.admin_contacts[1].type).to eq(Whois::Parser::Contact::TYPE_ADMINISTRATIVE) - expect(subject.admin_contacts[1].id).to eq(nil) - expect(subject.admin_contacts[1].name).to eq("Anastassia Hisamova") - expect(subject.admin_contacts[1].organization).to eq(nil) - expect(subject.admin_contacts[1].address).to eq(nil) - expect(subject.admin_contacts[1].city).to eq(nil) - expect(subject.admin_contacts[1].zip).to eq(nil) - expect(subject.admin_contacts[1].state).to eq(nil) - expect(subject.admin_contacts[1].country).to eq(nil) - expect(subject.admin_contacts[1].country_code).to eq(nil) - expect(subject.admin_contacts[1].phone).to eq(nil) - expect(subject.admin_contacts[1].fax).to eq(nil) - expect(subject.admin_contacts[1].email).to eq("Not Disclosed - Visit www.internet.ee for webbased WHOIS") - expect(subject.admin_contacts[1].created_on).to eq(nil) - expect(subject.admin_contacts[1].updated_on).to eq(DateTime.parse("2014-11-01 20:38:55 +02:00")) - end - end - describe "#technical_contacts" do - it do - expect(subject.technical_contacts).to be_a(Array) - expect(subject.technical_contacts.size).to eq(1) - expect(subject.technical_contacts[0]).to be_a(Whois::Parser::Contact) - expect(subject.technical_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_TECHNICAL) - expect(subject.technical_contacts[0].id).to eq(nil) - expect(subject.technical_contacts[0].name).to eq("Priit Haamer") - expect(subject.technical_contacts[0].organization).to eq(nil) - expect(subject.technical_contacts[0].address).to eq(nil) - expect(subject.technical_contacts[0].city).to eq(nil) - expect(subject.technical_contacts[0].zip).to eq(nil) - expect(subject.technical_contacts[0].state).to eq(nil) - expect(subject.technical_contacts[0].country).to eq(nil) - expect(subject.technical_contacts[0].country_code).to eq(nil) - expect(subject.technical_contacts[0].phone).to eq(nil) - expect(subject.technical_contacts[0].fax).to eq(nil) - expect(subject.technical_contacts[0].email).to eq("Not Disclosed - Visit www.internet.ee for webbased WHOIS") - expect(subject.technical_contacts[0].created_on).to eq(nil) - expect(subject.technical_contacts[0].updated_on).to eq(DateTime.parse("2010-12-09 16:08:33 +02:00")) - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers.size).to eq(2) - expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[0].name).to eq("ns4.edicy.net") - expect(subject.nameservers[0].ipv4).to eq(nil) - expect(subject.nameservers[0].ipv6).to eq(nil) - expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[1].name).to eq("ns3.edicy.net") - expect(subject.nameservers[1].ipv4).to eq(nil) - expect(subject.nameservers[1].ipv6).to eq(nil) - end + it "matches property_status_serverhold.expected" do + expect(subject.disclaimer).to eq("Estonia .ee Top Level Domain WHOIS server\nMore information at http://internet.ee") + expect(subject.domain).to eq("samanacrafts.ee") + expect { subject.domain_id }.to raise_error(Whois::AttributeNotSupported) + expect(subject.status).to eq(:expired) + expect(subject.available?).to eq(false) + expect(subject.registered?).to eq(true) + expect(subject.created_on).to be_a(Time) + expect(subject.created_on).to eq(DateTime.parse("2014-11-01 20:38:55 +02:00")) + expect(subject.updated_on).to be_a(Time) + expect(subject.updated_on).to eq(DateTime.parse("2014-11-01 20:38:55 +02:00")) + expect(subject.expires_on).to be_a(Time) + expect(subject.expires_on).to eq(DateTime.parse("2015-11-01")) + expect(subject.registrar).to be_a(Whois::Parser::Registrar) + expect(subject.registrar.name).to eq("Edicy OÜ") + expect(subject.registrar.url).to eq("http://www.edicy.com") + expect(subject.registrant_contacts).to be_a(Array) + expect(subject.registrant_contacts.size).to eq(1) + expect(subject.registrant_contacts[0]).to be_a(Whois::Parser::Contact) + expect(subject.registrant_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_REGISTRANT) + expect(subject.registrant_contacts[0].id).to eq(nil) + expect(subject.registrant_contacts[0].name).to eq("Anastassia Hisamova") + expect(subject.registrant_contacts[0].organization).to eq(nil) + expect(subject.registrant_contacts[0].address).to eq(nil) + expect(subject.registrant_contacts[0].city).to eq(nil) + expect(subject.registrant_contacts[0].zip).to eq(nil) + expect(subject.registrant_contacts[0].state).to eq(nil) + expect(subject.registrant_contacts[0].country).to eq(nil) + expect(subject.registrant_contacts[0].country_code).to eq(nil) + expect(subject.registrant_contacts[0].phone).to eq(nil) + expect(subject.registrant_contacts[0].fax).to eq(nil) + expect(subject.registrant_contacts[0].email).to eq("Not Disclosed - Visit www.internet.ee for webbased WHOIS") + expect(subject.registrant_contacts[0].created_on).to eq(nil) + expect(subject.registrant_contacts[0].updated_on).to eq(DateTime.parse("2014-11-01 20:38:55 +02:00")) + expect(subject.admin_contacts).to be_a(Array) + expect(subject.admin_contacts.size).to eq(2) + expect(subject.admin_contacts[0]).to be_a(Whois::Parser::Contact) + expect(subject.admin_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_ADMINISTRATIVE) + expect(subject.admin_contacts[0].id).to eq(nil) + expect(subject.admin_contacts[0].name).to eq("Anastassia Hisamova") + expect(subject.admin_contacts[0].organization).to eq(nil) + expect(subject.admin_contacts[0].address).to eq(nil) + expect(subject.admin_contacts[0].city).to eq(nil) + expect(subject.admin_contacts[0].zip).to eq(nil) + expect(subject.admin_contacts[0].state).to eq(nil) + expect(subject.admin_contacts[0].country).to eq(nil) + expect(subject.admin_contacts[0].country_code).to eq(nil) + expect(subject.admin_contacts[0].phone).to eq(nil) + expect(subject.admin_contacts[0].fax).to eq(nil) + expect(subject.admin_contacts[0].email).to eq("Not Disclosed - Visit www.internet.ee for webbased WHOIS") + expect(subject.admin_contacts[0].created_on).to eq(nil) + expect(subject.admin_contacts[0].updated_on).to eq(DateTime.parse("2014-11-01 20:38:55 +02:00")) + expect(subject.admin_contacts[1]).to be_a(Whois::Parser::Contact) + expect(subject.admin_contacts[1].type).to eq(Whois::Parser::Contact::TYPE_ADMINISTRATIVE) + expect(subject.admin_contacts[1].id).to eq(nil) + expect(subject.admin_contacts[1].name).to eq("Anastassia Hisamova") + expect(subject.admin_contacts[1].organization).to eq(nil) + expect(subject.admin_contacts[1].address).to eq(nil) + expect(subject.admin_contacts[1].city).to eq(nil) + expect(subject.admin_contacts[1].zip).to eq(nil) + expect(subject.admin_contacts[1].state).to eq(nil) + expect(subject.admin_contacts[1].country).to eq(nil) + expect(subject.admin_contacts[1].country_code).to eq(nil) + expect(subject.admin_contacts[1].phone).to eq(nil) + expect(subject.admin_contacts[1].fax).to eq(nil) + expect(subject.admin_contacts[1].email).to eq("Not Disclosed - Visit www.internet.ee for webbased WHOIS") + expect(subject.admin_contacts[1].created_on).to eq(nil) + expect(subject.admin_contacts[1].updated_on).to eq(DateTime.parse("2014-11-01 20:38:55 +02:00")) + expect(subject.technical_contacts).to be_a(Array) + expect(subject.technical_contacts.size).to eq(1) + expect(subject.technical_contacts[0]).to be_a(Whois::Parser::Contact) + expect(subject.technical_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_TECHNICAL) + expect(subject.technical_contacts[0].id).to eq(nil) + expect(subject.technical_contacts[0].name).to eq("Priit Haamer") + expect(subject.technical_contacts[0].organization).to eq(nil) + expect(subject.technical_contacts[0].address).to eq(nil) + expect(subject.technical_contacts[0].city).to eq(nil) + expect(subject.technical_contacts[0].zip).to eq(nil) + expect(subject.technical_contacts[0].state).to eq(nil) + expect(subject.technical_contacts[0].country).to eq(nil) + expect(subject.technical_contacts[0].country_code).to eq(nil) + expect(subject.technical_contacts[0].phone).to eq(nil) + expect(subject.technical_contacts[0].fax).to eq(nil) + expect(subject.technical_contacts[0].email).to eq("Not Disclosed - Visit www.internet.ee for webbased WHOIS") + expect(subject.technical_contacts[0].created_on).to eq(nil) + expect(subject.technical_contacts[0].updated_on).to eq(DateTime.parse("2010-12-09 16:08:33 +02:00")) + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers.size).to eq(2) + expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[0].name).to eq("ns4.edicy.net") + expect(subject.nameservers[0].ipv4).to eq(nil) + expect(subject.nameservers[0].ipv6).to eq(nil) + expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[1].name).to eq("ns3.edicy.net") + expect(subject.nameservers[1].ipv4).to eq(nil) + expect(subject.nameservers[1].ipv6).to eq(nil) end end diff --git a/spec/whois/parsers/responses/whois.tld.ee/ee/status_available_spec.rb b/spec/whois/parsers/responses/whois.tld.ee/ee/status_available_spec.rb index 87825f0f..c76744a3 100644 --- a/spec/whois/parsers/responses/whois.tld.ee/ee/status_available_spec.rb +++ b/spec/whois/parsers/responses/whois.tld.ee/ee/status_available_spec.rb @@ -11,88 +11,33 @@ # require 'spec_helper' -require 'whois/parsers/whois.tld.ee.rb' -describe Whois::Parsers::WhoisTldEe, "status_available.expected" do +describe "whois.tld.ee", :aggregate_failures do subject do file = fixture("responses", "whois.tld.ee/ee/status_available.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.tld.ee") + Whois::Parser.parser_for(part) end - describe "#disclaimer" do - it do - expect(subject.disclaimer).to eq("Estonia .ee Top Level Domain WHOIS server\nMore information at http://internet.ee") - end - end - describe "#domain" do - it do - expect(subject.domain).to eq(nil) - end - end - describe "#domain_id" do - it do - expect { subject.domain_id }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#status" do - it do - expect(subject.status).to eq(:available) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(true) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(false) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to eq(nil) - end - end - describe "#updated_on" do - it do - expect(subject.updated_on).to eq(nil) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to eq(nil) - end - end - describe "#registrar" do - it do - expect(subject.registrar).to eq(nil) - end - end - describe "#registrant_contacts" do - it do - expect(subject.registrant_contacts).to be_a(Array) - expect(subject.registrant_contacts).to eq([]) - end - end - describe "#admin_contacts" do - it do - expect(subject.admin_contacts).to be_a(Array) - expect(subject.admin_contacts).to eq([]) - end - end - describe "#technical_contacts" do - it do - expect(subject.technical_contacts).to be_a(Array) - expect(subject.technical_contacts).to eq([]) - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers).to eq([]) - end + it "matches status_available.expected" do + expect(subject.disclaimer).to eq("Estonia .ee Top Level Domain WHOIS server\nMore information at http://internet.ee") + expect(subject.domain).to eq(nil) + expect { subject.domain_id }.to raise_error(Whois::AttributeNotSupported) + expect(subject.status).to eq(:available) + expect(subject.available?).to eq(true) + expect(subject.registered?).to eq(false) + expect(subject.created_on).to eq(nil) + expect(subject.updated_on).to eq(nil) + expect(subject.expires_on).to eq(nil) + expect(subject.registrar).to eq(nil) + expect(subject.registrant_contacts).to be_a(Array) + expect(subject.registrant_contacts).to eq([]) + expect(subject.admin_contacts).to be_a(Array) + expect(subject.admin_contacts).to eq([]) + expect(subject.technical_contacts).to be_a(Array) + expect(subject.technical_contacts).to eq([]) + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers).to eq([]) end end diff --git a/spec/whois/parsers/responses/whois.tld.ee/ee/status_expired_spec.rb b/spec/whois/parsers/responses/whois.tld.ee/ee/status_expired_spec.rb index f9172241..3e478ea7 100644 --- a/spec/whois/parsers/responses/whois.tld.ee/ee/status_expired_spec.rb +++ b/spec/whois/parsers/responses/whois.tld.ee/ee/status_expired_spec.rb @@ -11,148 +11,97 @@ # require 'spec_helper' -require 'whois/parsers/whois.tld.ee.rb' -describe Whois::Parsers::WhoisTldEe, "status_expired.expected" do +describe "whois.tld.ee", :aggregate_failures do subject do file = fixture("responses", "whois.tld.ee/ee/status_expired.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.tld.ee") + Whois::Parser.parser_for(part) end - describe "#disclaimer" do - it do - expect(subject.disclaimer).to eq("Estonia .ee Top Level Domain WHOIS server\nMore information at http://internet.ee") - end - end - describe "#domain" do - it do - expect(subject.domain).to eq("eestiinternet.ee") - end - end - describe "#status" do - it do - expect(subject.status).to eq(:expired) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(false) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(true) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to be_a(Time) - expect(subject.created_on).to eq(DateTime.parse("2010-07-04 07:52:56 +03:00")) - end - end - describe "#updated_on" do - it do - expect(subject.updated_on).to be_a(Time) - expect(subject.updated_on).to eq(DateTime.parse("2010-11-29 13:32:16 +02:00")) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to be_a(Time) - expect(subject.expires_on).to eq(DateTime.parse("2015-11-29")) - end - end - describe "#registrar" do - it do - expect(subject.registrar).to be_a(Whois::Parser::Registrar) - expect(subject.registrar.name).to eq("Elisa Eesti AS") - expect(subject.registrar.url).to eq("http://www.elisa.ee") - end - end - describe "#registrant_contacts" do - it do - expect(subject.registrant_contacts).to be_a(Array) - expect(subject.registrant_contacts.size).to eq(1) - expect(subject.registrant_contacts[0]).to be_a(Whois::Parser::Contact) - expect(subject.registrant_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_REGISTRANT) - expect(subject.registrant_contacts[0].id).to eq(nil) - expect(subject.registrant_contacts[0].name).to eq("Eesti Interneti Sihtasutus") - expect(subject.registrant_contacts[0].organization).to eq(nil) - expect(subject.registrant_contacts[0].address).to eq(nil) - expect(subject.registrant_contacts[0].city).to eq(nil) - expect(subject.registrant_contacts[0].zip).to eq(nil) - expect(subject.registrant_contacts[0].state).to eq(nil) - expect(subject.registrant_contacts[0].country).to eq(nil) - expect(subject.registrant_contacts[0].country_code).to eq(nil) - expect(subject.registrant_contacts[0].phone).to eq(nil) - expect(subject.registrant_contacts[0].fax).to eq(nil) - expect(subject.registrant_contacts[0].email).to eq("Not Disclosed - Visit www.internet.ee for webbased WHOIS") - expect(subject.registrant_contacts[0].created_on).to eq(nil) - expect(subject.registrant_contacts[0].updated_on).to eq(DateTime.parse("2010-11-29 13:32:16 +02:00")) - end - end - describe "#admin_contacts" do - it do - expect(subject.admin_contacts).to be_a(Array) - expect(subject.admin_contacts.size).to eq(1) - expect(subject.admin_contacts[0]).to be_a(Whois::Parser::Contact) - expect(subject.admin_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_ADMINISTRATIVE) - expect(subject.admin_contacts[0].id).to eq(nil) - expect(subject.admin_contacts[0].name).to eq("Jaana Järve") - expect(subject.admin_contacts[0].organization).to eq(nil) - expect(subject.admin_contacts[0].address).to eq(nil) - expect(subject.admin_contacts[0].city).to eq(nil) - expect(subject.admin_contacts[0].zip).to eq(nil) - expect(subject.admin_contacts[0].state).to eq(nil) - expect(subject.admin_contacts[0].country).to eq(nil) - expect(subject.admin_contacts[0].country_code).to eq(nil) - expect(subject.admin_contacts[0].phone).to eq(nil) - expect(subject.admin_contacts[0].fax).to eq(nil) - expect(subject.admin_contacts[0].email).to eq("Not Disclosed - Visit www.internet.ee for webbased WHOIS") - expect(subject.admin_contacts[0].created_on).to eq(nil) - expect(subject.admin_contacts[0].updated_on).to eq(DateTime.parse("2015-10-30 08:31:21 +02:00")) - end - end - describe "#technical_contacts" do - it do - expect(subject.technical_contacts).to be_a(Array) - expect(subject.technical_contacts.size).to eq(1) - expect(subject.technical_contacts[0]).to be_a(Whois::Parser::Contact) - expect(subject.technical_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_TECHNICAL) - expect(subject.technical_contacts[0].id).to eq(nil) - expect(subject.technical_contacts[0].name).to eq("Jaana Järve") - expect(subject.technical_contacts[0].organization).to eq(nil) - expect(subject.technical_contacts[0].address).to eq(nil) - expect(subject.technical_contacts[0].city).to eq(nil) - expect(subject.technical_contacts[0].zip).to eq(nil) - expect(subject.technical_contacts[0].state).to eq(nil) - expect(subject.technical_contacts[0].country).to eq(nil) - expect(subject.technical_contacts[0].country_code).to eq(nil) - expect(subject.technical_contacts[0].phone).to eq(nil) - expect(subject.technical_contacts[0].fax).to eq(nil) - expect(subject.technical_contacts[0].email).to eq("Not Disclosed - Visit www.internet.ee for webbased WHOIS") - expect(subject.technical_contacts[0].created_on).to eq(nil) - expect(subject.technical_contacts[0].updated_on).to eq(DateTime.parse("2015-10-30 08:31:21 +02:00")) - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers.size).to eq(3) - expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[0].name).to eq("c.tld.ee") - expect(subject.nameservers[0].ipv4).to eq(nil) - expect(subject.nameservers[0].ipv6).to eq(nil) - expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[1].name).to eq("d.tld.ee") - expect(subject.nameservers[1].ipv4).to eq(nil) - expect(subject.nameservers[1].ipv6).to eq(nil) - expect(subject.nameservers[2]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[2].name).to eq("b.tld.ee") - expect(subject.nameservers[2].ipv4).to eq(nil) - expect(subject.nameservers[2].ipv6).to eq(nil) - end + it "matches status_expired.expected" do + expect(subject.disclaimer).to eq("Estonia .ee Top Level Domain WHOIS server\nMore information at http://internet.ee") + expect(subject.domain).to eq("eestiinternet.ee") + expect(subject.status).to eq(:expired) + expect(subject.available?).to eq(false) + expect(subject.registered?).to eq(true) + expect(subject.created_on).to be_a(Time) + expect(subject.created_on).to eq(DateTime.parse("2010-07-04 07:52:56 +03:00")) + expect(subject.updated_on).to be_a(Time) + expect(subject.updated_on).to eq(DateTime.parse("2010-11-29 13:32:16 +02:00")) + expect(subject.expires_on).to be_a(Time) + expect(subject.expires_on).to eq(DateTime.parse("2015-11-29")) + expect(subject.registrar).to be_a(Whois::Parser::Registrar) + expect(subject.registrar.name).to eq("Elisa Eesti AS") + expect(subject.registrar.url).to eq("http://www.elisa.ee") + expect(subject.registrant_contacts).to be_a(Array) + expect(subject.registrant_contacts.size).to eq(1) + expect(subject.registrant_contacts[0]).to be_a(Whois::Parser::Contact) + expect(subject.registrant_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_REGISTRANT) + expect(subject.registrant_contacts[0].id).to eq(nil) + expect(subject.registrant_contacts[0].name).to eq("Eesti Interneti Sihtasutus") + expect(subject.registrant_contacts[0].organization).to eq(nil) + expect(subject.registrant_contacts[0].address).to eq(nil) + expect(subject.registrant_contacts[0].city).to eq(nil) + expect(subject.registrant_contacts[0].zip).to eq(nil) + expect(subject.registrant_contacts[0].state).to eq(nil) + expect(subject.registrant_contacts[0].country).to eq(nil) + expect(subject.registrant_contacts[0].country_code).to eq(nil) + expect(subject.registrant_contacts[0].phone).to eq(nil) + expect(subject.registrant_contacts[0].fax).to eq(nil) + expect(subject.registrant_contacts[0].email).to eq("Not Disclosed - Visit www.internet.ee for webbased WHOIS") + expect(subject.registrant_contacts[0].created_on).to eq(nil) + expect(subject.registrant_contacts[0].updated_on).to eq(DateTime.parse("2010-11-29 13:32:16 +02:00")) + expect(subject.admin_contacts).to be_a(Array) + expect(subject.admin_contacts.size).to eq(1) + expect(subject.admin_contacts[0]).to be_a(Whois::Parser::Contact) + expect(subject.admin_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_ADMINISTRATIVE) + expect(subject.admin_contacts[0].id).to eq(nil) + expect(subject.admin_contacts[0].name).to eq("Jaana Järve") + expect(subject.admin_contacts[0].organization).to eq(nil) + expect(subject.admin_contacts[0].address).to eq(nil) + expect(subject.admin_contacts[0].city).to eq(nil) + expect(subject.admin_contacts[0].zip).to eq(nil) + expect(subject.admin_contacts[0].state).to eq(nil) + expect(subject.admin_contacts[0].country).to eq(nil) + expect(subject.admin_contacts[0].country_code).to eq(nil) + expect(subject.admin_contacts[0].phone).to eq(nil) + expect(subject.admin_contacts[0].fax).to eq(nil) + expect(subject.admin_contacts[0].email).to eq("Not Disclosed - Visit www.internet.ee for webbased WHOIS") + expect(subject.admin_contacts[0].created_on).to eq(nil) + expect(subject.admin_contacts[0].updated_on).to eq(DateTime.parse("2015-10-30 08:31:21 +02:00")) + expect(subject.technical_contacts).to be_a(Array) + expect(subject.technical_contacts.size).to eq(1) + expect(subject.technical_contacts[0]).to be_a(Whois::Parser::Contact) + expect(subject.technical_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_TECHNICAL) + expect(subject.technical_contacts[0].id).to eq(nil) + expect(subject.technical_contacts[0].name).to eq("Jaana Järve") + expect(subject.technical_contacts[0].organization).to eq(nil) + expect(subject.technical_contacts[0].address).to eq(nil) + expect(subject.technical_contacts[0].city).to eq(nil) + expect(subject.technical_contacts[0].zip).to eq(nil) + expect(subject.technical_contacts[0].state).to eq(nil) + expect(subject.technical_contacts[0].country).to eq(nil) + expect(subject.technical_contacts[0].country_code).to eq(nil) + expect(subject.technical_contacts[0].phone).to eq(nil) + expect(subject.technical_contacts[0].fax).to eq(nil) + expect(subject.technical_contacts[0].email).to eq("Not Disclosed - Visit www.internet.ee for webbased WHOIS") + expect(subject.technical_contacts[0].created_on).to eq(nil) + expect(subject.technical_contacts[0].updated_on).to eq(DateTime.parse("2015-10-30 08:31:21 +02:00")) + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers.size).to eq(3) + expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[0].name).to eq("c.tld.ee") + expect(subject.nameservers[0].ipv4).to eq(nil) + expect(subject.nameservers[0].ipv6).to eq(nil) + expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[1].name).to eq("d.tld.ee") + expect(subject.nameservers[1].ipv4).to eq(nil) + expect(subject.nameservers[1].ipv6).to eq(nil) + expect(subject.nameservers[2]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[2].name).to eq("b.tld.ee") + expect(subject.nameservers[2].ipv4).to eq(nil) + expect(subject.nameservers[2].ipv6).to eq(nil) end end diff --git a/spec/whois/parsers/responses/whois.tld.ee/ee/status_registered_spec.rb b/spec/whois/parsers/responses/whois.tld.ee/ee/status_registered_spec.rb index 8bd115d8..9a2ac5e0 100644 --- a/spec/whois/parsers/responses/whois.tld.ee/ee/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.tld.ee/ee/status_registered_spec.rb @@ -11,157 +11,102 @@ # require 'spec_helper' -require 'whois/parsers/whois.tld.ee.rb' -describe Whois::Parsers::WhoisTldEe, "status_registered.expected" do +describe "whois.tld.ee", :aggregate_failures do subject do file = fixture("responses", "whois.tld.ee/ee/status_registered.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.tld.ee") + Whois::Parser.parser_for(part) end - describe "#disclaimer" do - it do - expect(subject.disclaimer).to eq("Estonia .ee Top Level Domain WHOIS server\nMore information at http://internet.ee") - end - end - describe "#domain" do - it do - expect(subject.domain).to eq("internet.ee") - end - end - describe "#domain_id" do - it do - expect { subject.domain_id }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#status" do - it do - expect(subject.status).to eq(:registered) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(false) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(true) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to be_a(Time) - expect(subject.created_on).to eq(DateTime.parse("2010-08-10 16:43:38 +03:00")) - end - end - describe "#updated_on" do - it do - expect(subject.updated_on).to be_a(Time) - expect(subject.updated_on).to eq(DateTime.parse("2010-11-29 13:32:16 +02:00")) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to be_a(Time) - expect(subject.expires_on).to eq(DateTime.parse("2017-02-04")) - end - end - describe "#registrar" do - it do - expect(subject.registrar).to be_a(Whois::Parser::Registrar) - expect(subject.registrar.name).to eq("Elisa Eesti AS") - expect(subject.registrar.url).to eq("http://www.elisa.ee") - end - end - describe "#registrant_contacts" do - it do - expect(subject.registrant_contacts).to be_a(Array) - expect(subject.registrant_contacts.size).to eq(1) - expect(subject.registrant_contacts[0]).to be_a(Whois::Parser::Contact) - expect(subject.registrant_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_REGISTRANT) - expect(subject.registrant_contacts[0].id).to eq(nil) - expect(subject.registrant_contacts[0].name).to eq("Eesti Interneti Sihtasutus") - expect(subject.registrant_contacts[0].organization).to eq(nil) - expect(subject.registrant_contacts[0].address).to eq(nil) - expect(subject.registrant_contacts[0].city).to eq(nil) - expect(subject.registrant_contacts[0].zip).to eq(nil) - expect(subject.registrant_contacts[0].state).to eq(nil) - expect(subject.registrant_contacts[0].country).to eq(nil) - expect(subject.registrant_contacts[0].country_code).to eq(nil) - expect(subject.registrant_contacts[0].phone).to eq(nil) - expect(subject.registrant_contacts[0].fax).to eq(nil) - expect(subject.registrant_contacts[0].email).to eq("Not Disclosed - Visit www.internet.ee for webbased WHOIS") - expect(subject.registrant_contacts[0].created_on).to eq(nil) - expect(subject.registrant_contacts[0].updated_on).to eq(DateTime.parse("2010-11-29 13:32:16 +02:00")) - end - end - describe "#admin_contacts" do - it do - expect(subject.admin_contacts).to be_a(Array) - expect(subject.admin_contacts.size).to eq(1) - expect(subject.admin_contacts[0]).to be_a(Whois::Parser::Contact) - expect(subject.admin_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_ADMINISTRATIVE) - expect(subject.admin_contacts[0].id).to eq(nil) - expect(subject.admin_contacts[0].name).to eq("Jaana Järve") - expect(subject.admin_contacts[0].organization).to eq(nil) - expect(subject.admin_contacts[0].address).to eq(nil) - expect(subject.admin_contacts[0].city).to eq(nil) - expect(subject.admin_contacts[0].zip).to eq(nil) - expect(subject.admin_contacts[0].state).to eq(nil) - expect(subject.admin_contacts[0].country).to eq(nil) - expect(subject.admin_contacts[0].country_code).to eq(nil) - expect(subject.admin_contacts[0].phone).to eq(nil) - expect(subject.admin_contacts[0].fax).to eq(nil) - expect(subject.admin_contacts[0].email).to eq("Not Disclosed - Visit www.internet.ee for webbased WHOIS") - expect(subject.admin_contacts[0].created_on).to eq(nil) - expect(subject.admin_contacts[0].updated_on).to eq(DateTime.parse("2015-10-30 08:31:21 +02:00")) - end - end - describe "#technical_contacts" do - it do - expect(subject.technical_contacts).to be_a(Array) - expect(subject.technical_contacts.size).to eq(1) - expect(subject.technical_contacts[0]).to be_a(Whois::Parser::Contact) - expect(subject.technical_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_TECHNICAL) - expect(subject.technical_contacts[0].id).to eq(nil) - expect(subject.technical_contacts[0].name).to eq("Jaana Järve") - expect(subject.technical_contacts[0].organization).to eq(nil) - expect(subject.technical_contacts[0].address).to eq(nil) - expect(subject.technical_contacts[0].city).to eq(nil) - expect(subject.technical_contacts[0].zip).to eq(nil) - expect(subject.technical_contacts[0].state).to eq(nil) - expect(subject.technical_contacts[0].country).to eq(nil) - expect(subject.technical_contacts[0].country_code).to eq(nil) - expect(subject.technical_contacts[0].phone).to eq(nil) - expect(subject.technical_contacts[0].fax).to eq(nil) - expect(subject.technical_contacts[0].email).to eq("Not Disclosed - Visit www.internet.ee for webbased WHOIS") - expect(subject.technical_contacts[0].created_on).to eq(nil) - expect(subject.technical_contacts[0].updated_on).to eq(DateTime.parse("2015-10-30 08:31:21 +02:00")) - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers.size).to eq(4) - expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[0].name).to eq("c.tld.ee") - expect(subject.nameservers[0].ipv4).to eq(nil) - expect(subject.nameservers[0].ipv6).to eq(nil) - expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[1].name).to eq("d.tld.ee") - expect(subject.nameservers[1].ipv4).to eq(nil) - expect(subject.nameservers[1].ipv6).to eq(nil) - expect(subject.nameservers[2]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[2].name).to eq("b.tld.ee") - expect(subject.nameservers[2].ipv4).to eq(nil) - expect(subject.nameservers[2].ipv6).to eq(nil) - expect(subject.nameservers[3]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[3].name).to eq("e.tld.ee") - expect(subject.nameservers[3].ipv4).to eq(nil) - expect(subject.nameservers[3].ipv6).to eq(nil) - end + it "matches status_registered.expected" do + expect(subject.disclaimer).to eq("Estonia .ee Top Level Domain WHOIS server\nMore information at http://internet.ee") + expect(subject.domain).to eq("internet.ee") + expect { subject.domain_id }.to raise_error(Whois::AttributeNotSupported) + expect(subject.status).to eq(:registered) + expect(subject.available?).to eq(false) + expect(subject.registered?).to eq(true) + expect(subject.created_on).to be_a(Time) + expect(subject.created_on).to eq(DateTime.parse("2010-08-10 16:43:38 +03:00")) + expect(subject.updated_on).to be_a(Time) + expect(subject.updated_on).to eq(DateTime.parse("2010-11-29 13:32:16 +02:00")) + expect(subject.expires_on).to be_a(Time) + expect(subject.expires_on).to eq(DateTime.parse("2017-02-04")) + expect(subject.registrar).to be_a(Whois::Parser::Registrar) + expect(subject.registrar.name).to eq("Elisa Eesti AS") + expect(subject.registrar.url).to eq("http://www.elisa.ee") + expect(subject.registrant_contacts).to be_a(Array) + expect(subject.registrant_contacts.size).to eq(1) + expect(subject.registrant_contacts[0]).to be_a(Whois::Parser::Contact) + expect(subject.registrant_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_REGISTRANT) + expect(subject.registrant_contacts[0].id).to eq(nil) + expect(subject.registrant_contacts[0].name).to eq("Eesti Interneti Sihtasutus") + expect(subject.registrant_contacts[0].organization).to eq(nil) + expect(subject.registrant_contacts[0].address).to eq(nil) + expect(subject.registrant_contacts[0].city).to eq(nil) + expect(subject.registrant_contacts[0].zip).to eq(nil) + expect(subject.registrant_contacts[0].state).to eq(nil) + expect(subject.registrant_contacts[0].country).to eq(nil) + expect(subject.registrant_contacts[0].country_code).to eq(nil) + expect(subject.registrant_contacts[0].phone).to eq(nil) + expect(subject.registrant_contacts[0].fax).to eq(nil) + expect(subject.registrant_contacts[0].email).to eq("Not Disclosed - Visit www.internet.ee for webbased WHOIS") + expect(subject.registrant_contacts[0].created_on).to eq(nil) + expect(subject.registrant_contacts[0].updated_on).to eq(DateTime.parse("2010-11-29 13:32:16 +02:00")) + expect(subject.admin_contacts).to be_a(Array) + expect(subject.admin_contacts.size).to eq(1) + expect(subject.admin_contacts[0]).to be_a(Whois::Parser::Contact) + expect(subject.admin_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_ADMINISTRATIVE) + expect(subject.admin_contacts[0].id).to eq(nil) + expect(subject.admin_contacts[0].name).to eq("Jaana Järve") + expect(subject.admin_contacts[0].organization).to eq(nil) + expect(subject.admin_contacts[0].address).to eq(nil) + expect(subject.admin_contacts[0].city).to eq(nil) + expect(subject.admin_contacts[0].zip).to eq(nil) + expect(subject.admin_contacts[0].state).to eq(nil) + expect(subject.admin_contacts[0].country).to eq(nil) + expect(subject.admin_contacts[0].country_code).to eq(nil) + expect(subject.admin_contacts[0].phone).to eq(nil) + expect(subject.admin_contacts[0].fax).to eq(nil) + expect(subject.admin_contacts[0].email).to eq("Not Disclosed - Visit www.internet.ee for webbased WHOIS") + expect(subject.admin_contacts[0].created_on).to eq(nil) + expect(subject.admin_contacts[0].updated_on).to eq(DateTime.parse("2015-10-30 08:31:21 +02:00")) + expect(subject.technical_contacts).to be_a(Array) + expect(subject.technical_contacts.size).to eq(1) + expect(subject.technical_contacts[0]).to be_a(Whois::Parser::Contact) + expect(subject.technical_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_TECHNICAL) + expect(subject.technical_contacts[0].id).to eq(nil) + expect(subject.technical_contacts[0].name).to eq("Jaana Järve") + expect(subject.technical_contacts[0].organization).to eq(nil) + expect(subject.technical_contacts[0].address).to eq(nil) + expect(subject.technical_contacts[0].city).to eq(nil) + expect(subject.technical_contacts[0].zip).to eq(nil) + expect(subject.technical_contacts[0].state).to eq(nil) + expect(subject.technical_contacts[0].country).to eq(nil) + expect(subject.technical_contacts[0].country_code).to eq(nil) + expect(subject.technical_contacts[0].phone).to eq(nil) + expect(subject.technical_contacts[0].fax).to eq(nil) + expect(subject.technical_contacts[0].email).to eq("Not Disclosed - Visit www.internet.ee for webbased WHOIS") + expect(subject.technical_contacts[0].created_on).to eq(nil) + expect(subject.technical_contacts[0].updated_on).to eq(DateTime.parse("2015-10-30 08:31:21 +02:00")) + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers.size).to eq(4) + expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[0].name).to eq("c.tld.ee") + expect(subject.nameservers[0].ipv4).to eq(nil) + expect(subject.nameservers[0].ipv6).to eq(nil) + expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[1].name).to eq("d.tld.ee") + expect(subject.nameservers[1].ipv4).to eq(nil) + expect(subject.nameservers[1].ipv6).to eq(nil) + expect(subject.nameservers[2]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[2].name).to eq("b.tld.ee") + expect(subject.nameservers[2].ipv4).to eq(nil) + expect(subject.nameservers[2].ipv6).to eq(nil) + expect(subject.nameservers[3]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[3].name).to eq("e.tld.ee") + expect(subject.nameservers[3].ipv4).to eq(nil) + expect(subject.nameservers[3].ipv6).to eq(nil) end end diff --git a/spec/whois/parsers/responses/whois.tld.sy/sy/status_available_spec.rb b/spec/whois/parsers/responses/whois.tld.sy/sy/status_available_spec.rb index 48e8d5f8..cc20427a 100644 --- a/spec/whois/parsers/responses/whois.tld.sy/sy/status_available_spec.rb +++ b/spec/whois/parsers/responses/whois.tld.sy/sy/status_available_spec.rb @@ -11,65 +11,26 @@ # require 'spec_helper' -require 'whois/parsers/whois.tld.sy.rb' -describe Whois::Parsers::WhoisTldSy, "status_available.expected" do +describe "whois.tld.sy", :aggregate_failures do subject do file = fixture("responses", "whois.tld.sy/sy/status_available.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.tld.sy") + Whois::Parser.parser_for(part) end - describe "#domain" do - it do - expect(subject.domain).to eq("u34jedzcq.sy") - end - end - describe "#domain_id" do - it do - expect(subject.domain_id).to eq(nil) - end - end - describe "#status" do - it do - expect(subject.status).to eq(:available) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(true) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(false) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to eq(nil) - end - end - describe "#updated_on" do - it do - expect { subject.updated_on }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to eq(nil) - end - end - describe "#registrar" do - it do - expect(subject.registrar).to eq(nil) - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers).to eq([]) - end + it "matches status_available.expected" do + expect(subject.domain).to eq("u34jedzcq.sy") + expect(subject.domain_id).to eq(nil) + expect(subject.status).to eq(:available) + expect(subject.available?).to eq(true) + expect(subject.registered?).to eq(false) + expect(subject.created_on).to eq(nil) + expect { subject.updated_on }.to raise_error(Whois::AttributeNotSupported) + expect(subject.expires_on).to eq(nil) + expect(subject.registrar).to eq(nil) + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers).to eq([]) end end diff --git a/spec/whois/parsers/responses/whois.tld.sy/sy/status_registered_spec.rb b/spec/whois/parsers/responses/whois.tld.sy/sy/status_registered_spec.rb index a262163b..c3c2a55e 100644 --- a/spec/whois/parsers/responses/whois.tld.sy/sy/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.tld.sy/sy/status_registered_spec.rb @@ -11,74 +11,35 @@ # require 'spec_helper' -require 'whois/parsers/whois.tld.sy.rb' -describe Whois::Parsers::WhoisTldSy, "status_registered.expected" do +describe "whois.tld.sy", :aggregate_failures do subject do file = fixture("responses", "whois.tld.sy/sy/status_registered.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.tld.sy") + Whois::Parser.parser_for(part) end - describe "#domain" do - it do - expect(subject.domain).to eq("tld.sy") - end - end - describe "#domain_id" do - it do - expect(subject.domain_id).to eq("7-sy") - end - end - describe "#status" do - it do - expect(subject.status).to eq(:registered) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(false) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(true) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to be_a(Time) - expect(subject.created_on).to eq(DateTime.parse("2010-12-02 16:01:27 UTC")) - end - end - describe "#updated_on" do - it do - expect { subject.updated_on }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to be_a(Time) - expect(subject.expires_on).to eq(DateTime.parse("2017-12-01 22:00:00 UTC")) - end - end - describe "#registrar" do - it do - expect(subject.registrar).to be_a(Whois::Parser::Registrar) - expect(subject.registrar.id).to eq(nil) - expect(subject.registrar.name).to eq("nans") - expect(subject.registrar.url).to eq(nil) - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers.size).to eq(2) - expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[0].name).to eq("ns4.tld.sy") - expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[1].name).to eq("ns3.tld.sy") - end + it "matches status_registered.expected" do + expect(subject.domain).to eq("tld.sy") + expect(subject.domain_id).to eq("7-sy") + expect(subject.status).to eq(:registered) + expect(subject.available?).to eq(false) + expect(subject.registered?).to eq(true) + expect(subject.created_on).to be_a(Time) + expect(subject.created_on).to eq(DateTime.parse("2010-12-02 16:01:27 UTC")) + expect { subject.updated_on }.to raise_error(Whois::AttributeNotSupported) + expect(subject.expires_on).to be_a(Time) + expect(subject.expires_on).to eq(DateTime.parse("2017-12-01 22:00:00 UTC")) + expect(subject.registrar).to be_a(Whois::Parser::Registrar) + expect(subject.registrar.id).to eq(nil) + expect(subject.registrar.name).to eq("nans") + expect(subject.registrar.url).to eq(nil) + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers.size).to eq(2) + expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[0].name).to eq("ns4.tld.sy") + expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[1].name).to eq("ns3.tld.sy") end end diff --git a/spec/whois/parsers/responses/whois.tonic.to/to/response_incomplete_spec.rb b/spec/whois/parsers/responses/whois.tonic.to/to/response_incomplete_spec.rb index 6fffcc00..0f00dd2f 100644 --- a/spec/whois/parsers/responses/whois.tonic.to/to/response_incomplete_spec.rb +++ b/spec/whois/parsers/responses/whois.tonic.to/to/response_incomplete_spec.rb @@ -11,24 +11,17 @@ # require 'spec_helper' -require 'whois/parsers/whois.tonic.to.rb' -describe Whois::Parsers::WhoisTonicTo, "response_incomplete.expected" do +describe "whois.tonic.to", :aggregate_failures do subject do file = fixture("responses", "whois.tonic.to/to/response_incomplete.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.tonic.to") + Whois::Parser.parser_for(part) end - describe "#status" do - it do - expect(subject.status).to eq(:incomplete) - end - end - describe "#response_incomplete?" do - it do - expect(subject.response_incomplete?).to eq(true) - end + it "matches response_incomplete.expected" do + expect(subject.status).to eq(:incomplete) + expect(subject.response_incomplete?).to eq(true) end end diff --git a/spec/whois/parsers/responses/whois.tonic.to/to/status_available_spec.rb b/spec/whois/parsers/responses/whois.tonic.to/to/status_available_spec.rb index 557b94de..4bf5c581 100644 --- a/spec/whois/parsers/responses/whois.tonic.to/to/status_available_spec.rb +++ b/spec/whois/parsers/responses/whois.tonic.to/to/status_available_spec.rb @@ -11,89 +11,30 @@ # require 'spec_helper' -require 'whois/parsers/whois.tonic.to.rb' -describe Whois::Parsers::WhoisTonicTo, "status_available.expected" do +describe "whois.tonic.to", :aggregate_failures do subject do file = fixture("responses", "whois.tonic.to/to/status_available.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.tonic.to") + Whois::Parser.parser_for(part) end - describe "#disclaimer" do - it do - expect { subject.disclaimer }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#domain" do - it do - expect { subject.domain }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#domain_id" do - it do - expect { subject.domain_id }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#status" do - it do - expect(subject.status).to eq(:available) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(true) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(false) - end - end - describe "#created_on" do - it do - expect { subject.created_on }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#updated_on" do - it do - expect { subject.updated_on }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#expires_on" do - it do - expect { subject.expires_on }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#registrar" do - it do - expect { subject.registrar }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#registrant_contacts" do - it do - expect { subject.registrant_contacts }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#admin_contacts" do - it do - expect { subject.admin_contacts }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#technical_contacts" do - it do - expect { subject.technical_contacts }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#nameservers" do - it do - expect { subject.nameservers }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#response_incomplete?" do - it do - expect(subject.response_incomplete?).to eq(false) - end + it "matches status_available.expected" do + expect { subject.disclaimer }.to raise_error(Whois::AttributeNotSupported) + expect { subject.domain }.to raise_error(Whois::AttributeNotSupported) + expect { subject.domain_id }.to raise_error(Whois::AttributeNotSupported) + expect(subject.status).to eq(:available) + expect(subject.available?).to eq(true) + expect(subject.registered?).to eq(false) + expect { subject.created_on }.to raise_error(Whois::AttributeNotSupported) + expect { subject.updated_on }.to raise_error(Whois::AttributeNotSupported) + expect { subject.expires_on }.to raise_error(Whois::AttributeNotSupported) + expect { subject.registrar }.to raise_error(Whois::AttributeNotSupported) + expect { subject.registrant_contacts }.to raise_error(Whois::AttributeNotSupported) + expect { subject.admin_contacts }.to raise_error(Whois::AttributeNotSupported) + expect { subject.technical_contacts }.to raise_error(Whois::AttributeNotSupported) + expect { subject.nameservers }.to raise_error(Whois::AttributeNotSupported) + expect(subject.response_incomplete?).to eq(false) end end diff --git a/spec/whois/parsers/responses/whois.tonic.to/to/status_registered_spec.rb b/spec/whois/parsers/responses/whois.tonic.to/to/status_registered_spec.rb index d3944f15..32a81c69 100644 --- a/spec/whois/parsers/responses/whois.tonic.to/to/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.tonic.to/to/status_registered_spec.rb @@ -11,89 +11,30 @@ # require 'spec_helper' -require 'whois/parsers/whois.tonic.to.rb' -describe Whois::Parsers::WhoisTonicTo, "status_registered.expected" do +describe "whois.tonic.to", :aggregate_failures do subject do file = fixture("responses", "whois.tonic.to/to/status_registered.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.tonic.to") + Whois::Parser.parser_for(part) end - describe "#disclaimer" do - it do - expect { subject.disclaimer }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#domain" do - it do - expect { subject.domain }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#domain_id" do - it do - expect { subject.domain_id }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#status" do - it do - expect(subject.status).to eq(:registered) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(false) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(true) - end - end - describe "#created_on" do - it do - expect { subject.created_on }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#updated_on" do - it do - expect { subject.updated_on }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#expires_on" do - it do - expect { subject.expires_on }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#registrar" do - it do - expect { subject.registrar }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#registrant_contacts" do - it do - expect { subject.registrant_contacts }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#admin_contacts" do - it do - expect { subject.admin_contacts }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#technical_contacts" do - it do - expect { subject.technical_contacts }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#nameservers" do - it do - expect { subject.nameservers }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#response_incomplete?" do - it do - expect(subject.response_incomplete?).to eq(false) - end + it "matches status_registered.expected" do + expect { subject.disclaimer }.to raise_error(Whois::AttributeNotSupported) + expect { subject.domain }.to raise_error(Whois::AttributeNotSupported) + expect { subject.domain_id }.to raise_error(Whois::AttributeNotSupported) + expect(subject.status).to eq(:registered) + expect(subject.available?).to eq(false) + expect(subject.registered?).to eq(true) + expect { subject.created_on }.to raise_error(Whois::AttributeNotSupported) + expect { subject.updated_on }.to raise_error(Whois::AttributeNotSupported) + expect { subject.expires_on }.to raise_error(Whois::AttributeNotSupported) + expect { subject.registrar }.to raise_error(Whois::AttributeNotSupported) + expect { subject.registrant_contacts }.to raise_error(Whois::AttributeNotSupported) + expect { subject.admin_contacts }.to raise_error(Whois::AttributeNotSupported) + expect { subject.technical_contacts }.to raise_error(Whois::AttributeNotSupported) + expect { subject.nameservers }.to raise_error(Whois::AttributeNotSupported) + expect(subject.response_incomplete?).to eq(false) end end diff --git a/spec/whois/parsers/responses/whois.tucows.com/status_available_spec.rb b/spec/whois/parsers/responses/whois.tucows.com/status_available_spec.rb index e1e44431..ef0c93ec 100644 --- a/spec/whois/parsers/responses/whois.tucows.com/status_available_spec.rb +++ b/spec/whois/parsers/responses/whois.tucows.com/status_available_spec.rb @@ -11,83 +11,32 @@ # require 'spec_helper' -require 'whois/parsers/whois.tucows.com.rb' -describe Whois::Parsers::WhoisTucowsCom, "status_available.expected" do +describe "whois.tucows.com", :aggregate_failures do subject do file = fixture("responses", "whois.tucows.com/status_available.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.tucows.com") + Whois::Parser.parser_for(part) end - describe "#domain" do - it do - expect(subject.domain).to eq(nil) - end - end - describe "#domain_id" do - it do - expect(subject.domain_id).to eq(nil) - end - end - describe "#status" do - it do - expect(subject.status).to eq(:available) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(true) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(false) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to eq(nil) - end - end - describe "#updated_on" do - it do - expect(subject.updated_on).to eq(nil) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to eq(nil) - end - end - describe "#registrar" do - it do - expect(subject.registrar).to eq(nil) - end - end - describe "#registrant_contacts" do - it do - expect(subject.registrant_contacts).to be_a(Array) - expect(subject.registrant_contacts).to eq([]) - end - end - describe "#admin_contacts" do - it do - expect(subject.admin_contacts).to be_a(Array) - expect(subject.admin_contacts).to eq([]) - end - end - describe "#technical_contacts" do - it do - expect(subject.technical_contacts).to be_a(Array) - expect(subject.technical_contacts).to eq([]) - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers).to eq([]) - end + it "matches status_available.expected" do + expect(subject.domain).to eq(nil) + expect(subject.domain_id).to eq(nil) + expect(subject.status).to eq(:available) + expect(subject.available?).to eq(true) + expect(subject.registered?).to eq(false) + expect(subject.created_on).to eq(nil) + expect(subject.updated_on).to eq(nil) + expect(subject.expires_on).to eq(nil) + expect(subject.registrar).to eq(nil) + expect(subject.registrant_contacts).to be_a(Array) + expect(subject.registrant_contacts).to eq([]) + expect(subject.admin_contacts).to be_a(Array) + expect(subject.admin_contacts).to eq([]) + expect(subject.technical_contacts).to be_a(Array) + expect(subject.technical_contacts).to eq([]) + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers).to eq([]) end end diff --git a/spec/whois/parsers/responses/whois.tucows.com/status_registered_spec.rb b/spec/whois/parsers/responses/whois.tucows.com/status_registered_spec.rb index 55754592..ef8683a4 100644 --- a/spec/whois/parsers/responses/whois.tucows.com/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.tucows.com/status_registered_spec.rb @@ -11,134 +11,83 @@ # require 'spec_helper' -require 'whois/parsers/whois.tucows.com.rb' -describe Whois::Parsers::WhoisTucowsCom, "status_registered.expected" do +describe "whois.tucows.com", :aggregate_failures do subject do file = fixture("responses", "whois.tucows.com/status_registered.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.tucows.com") + Whois::Parser.parser_for(part) end - describe "#domain" do - it do - expect(subject.domain).to eq("tucows.com") - end - end - describe "#domain_id" do - it do - expect(subject.domain_id).to eq("") - end - end - describe "#status" do - it do - expect(subject.status).to eq(:registered) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(false) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(true) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to be_a(Time) - expect(subject.created_on).to eq(DateTime.parse("1995-09-07 04:00:00")) - end - end - describe "#updated_on" do - it do - expect(subject.updated_on).to be_a(Time) - expect(subject.updated_on).to eq(DateTime.parse("2013-08-07 23:52:35")) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to be_a(Time) - expect(subject.expires_on).to eq(DateTime.parse("2014-09-06 04:00:00")) - end - end - describe "#registrar" do - it do - expect(subject.registrar).to be_a(Whois::Parser::Registrar) - expect(subject.registrar.id).to eq("69") - expect(subject.registrar.name).to eq("TUCOWS, INC.") - expect(subject.registrar.url).to eq("http://tucowsdomains.com") - end - end - describe "#registrant_contacts" do - it do - expect(subject.registrant_contacts).to be_a(Array) - expect(subject.registrant_contacts.size).to eq(1) - expect(subject.registrant_contacts[0]).to be_a(Whois::Parser::Contact) - expect(subject.registrant_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_REGISTRANT) - expect(subject.registrant_contacts[0].name).to eq("DNS Administrator") - expect(subject.registrant_contacts[0].organization).to eq("Tucows.com Co") - expect(subject.registrant_contacts[0].address).to eq("96 Mowat Avenue") - expect(subject.registrant_contacts[0].city).to eq("Toronto") - expect(subject.registrant_contacts[0].zip).to eq("M6K3M1") - expect(subject.registrant_contacts[0].state).to eq("Ontario") - expect(subject.registrant_contacts[0].country_code).to eq("CA") - expect(subject.registrant_contacts[0].phone).to eq("+1.4165350123 ext: 0000") - expect(subject.registrant_contacts[0].fax).to eq("") - expect(subject.registrant_contacts[0].email).to eq("dnsadmin@tucows.com") - end - end - describe "#admin_contacts" do - it do - expect(subject.admin_contacts).to be_a(Array) - expect(subject.admin_contacts.size).to eq(1) - expect(subject.admin_contacts[0]).to be_a(Whois::Parser::Contact) - expect(subject.admin_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_ADMINISTRATIVE) - expect(subject.admin_contacts[0].name).to eq("DNS Administrator") - expect(subject.admin_contacts[0].organization).to eq("Tucows ( Delaware ) Inc.") - expect(subject.admin_contacts[0].address).to eq("96 Mowat Avenue") - expect(subject.admin_contacts[0].city).to eq("Toronto") - expect(subject.admin_contacts[0].zip).to eq("M6K3M1") - expect(subject.admin_contacts[0].state).to eq("Ontario") - expect(subject.admin_contacts[0].country_code).to eq("CA") - expect(subject.admin_contacts[0].phone).to eq("+1.4165350123 ext: 0000") - expect(subject.admin_contacts[0].fax).to eq("") - expect(subject.admin_contacts[0].email).to eq("dnsadmin@tucows.com") - end - end - describe "#technical_contacts" do - it do - expect(subject.technical_contacts).to be_a(Array) - expect(subject.technical_contacts.size).to eq(1) - expect(subject.technical_contacts[0]).to be_a(Whois::Parser::Contact) - expect(subject.technical_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_TECHNICAL) - expect(subject.technical_contacts[0].name).to eq("DNS Administrator") - expect(subject.technical_contacts[0].organization).to eq("Tucows ( Delaware ) Inc.") - expect(subject.technical_contacts[0].address).to eq("96 Mowat Avenue") - expect(subject.technical_contacts[0].city).to eq("Toronto") - expect(subject.technical_contacts[0].zip).to eq("M6K3M1") - expect(subject.technical_contacts[0].state).to eq("Ontario") - expect(subject.technical_contacts[0].country_code).to eq("CA") - expect(subject.technical_contacts[0].phone).to eq("+1.4165350123 ext: 0000") - expect(subject.technical_contacts[0].fax).to eq("") - expect(subject.technical_contacts[0].email).to eq("dnsadmin@tucows.com") - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers.size).to eq(3) - expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[0].name).to eq("ns3.tucows.com") - expect(subject.nameservers[0].ipv4).to eq(nil) - expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[1].name).to eq("ns1.tucows.com") - expect(subject.nameservers[1].ipv4).to eq(nil) - expect(subject.nameservers[2]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[2].name).to eq("ns2.tucows.com") - expect(subject.nameservers[2].ipv4).to eq(nil) - end + it "matches status_registered.expected" do + expect(subject.domain).to eq("tucows.com") + expect(subject.domain_id).to eq("") + expect(subject.status).to eq(:registered) + expect(subject.available?).to eq(false) + expect(subject.registered?).to eq(true) + expect(subject.created_on).to be_a(Time) + expect(subject.created_on).to eq(DateTime.parse("1995-09-07 04:00:00")) + expect(subject.updated_on).to be_a(Time) + expect(subject.updated_on).to eq(DateTime.parse("2013-08-07 23:52:35")) + expect(subject.expires_on).to be_a(Time) + expect(subject.expires_on).to eq(DateTime.parse("2014-09-06 04:00:00")) + expect(subject.registrar).to be_a(Whois::Parser::Registrar) + expect(subject.registrar.id).to eq("69") + expect(subject.registrar.name).to eq("TUCOWS, INC.") + expect(subject.registrar.url).to eq("http://tucowsdomains.com") + expect(subject.registrant_contacts).to be_a(Array) + expect(subject.registrant_contacts.size).to eq(1) + expect(subject.registrant_contacts[0]).to be_a(Whois::Parser::Contact) + expect(subject.registrant_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_REGISTRANT) + expect(subject.registrant_contacts[0].name).to eq("DNS Administrator") + expect(subject.registrant_contacts[0].organization).to eq("Tucows.com Co") + expect(subject.registrant_contacts[0].address).to eq("96 Mowat Avenue") + expect(subject.registrant_contacts[0].city).to eq("Toronto") + expect(subject.registrant_contacts[0].zip).to eq("M6K3M1") + expect(subject.registrant_contacts[0].state).to eq("Ontario") + expect(subject.registrant_contacts[0].country_code).to eq("CA") + expect(subject.registrant_contacts[0].phone).to eq("+1.4165350123 ext: 0000") + expect(subject.registrant_contacts[0].fax).to eq("") + expect(subject.registrant_contacts[0].email).to eq("dnsadmin@tucows.com") + expect(subject.admin_contacts).to be_a(Array) + expect(subject.admin_contacts.size).to eq(1) + expect(subject.admin_contacts[0]).to be_a(Whois::Parser::Contact) + expect(subject.admin_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_ADMINISTRATIVE) + expect(subject.admin_contacts[0].name).to eq("DNS Administrator") + expect(subject.admin_contacts[0].organization).to eq("Tucows ( Delaware ) Inc.") + expect(subject.admin_contacts[0].address).to eq("96 Mowat Avenue") + expect(subject.admin_contacts[0].city).to eq("Toronto") + expect(subject.admin_contacts[0].zip).to eq("M6K3M1") + expect(subject.admin_contacts[0].state).to eq("Ontario") + expect(subject.admin_contacts[0].country_code).to eq("CA") + expect(subject.admin_contacts[0].phone).to eq("+1.4165350123 ext: 0000") + expect(subject.admin_contacts[0].fax).to eq("") + expect(subject.admin_contacts[0].email).to eq("dnsadmin@tucows.com") + expect(subject.technical_contacts).to be_a(Array) + expect(subject.technical_contacts.size).to eq(1) + expect(subject.technical_contacts[0]).to be_a(Whois::Parser::Contact) + expect(subject.technical_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_TECHNICAL) + expect(subject.technical_contacts[0].name).to eq("DNS Administrator") + expect(subject.technical_contacts[0].organization).to eq("Tucows ( Delaware ) Inc.") + expect(subject.technical_contacts[0].address).to eq("96 Mowat Avenue") + expect(subject.technical_contacts[0].city).to eq("Toronto") + expect(subject.technical_contacts[0].zip).to eq("M6K3M1") + expect(subject.technical_contacts[0].state).to eq("Ontario") + expect(subject.technical_contacts[0].country_code).to eq("CA") + expect(subject.technical_contacts[0].phone).to eq("+1.4165350123 ext: 0000") + expect(subject.technical_contacts[0].fax).to eq("") + expect(subject.technical_contacts[0].email).to eq("dnsadmin@tucows.com") + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers.size).to eq(3) + expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[0].name).to eq("ns3.tucows.com") + expect(subject.nameservers[0].ipv4).to eq(nil) + expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[1].name).to eq("ns1.tucows.com") + expect(subject.nameservers[1].ipv4).to eq(nil) + expect(subject.nameservers[2]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[2].name).to eq("ns2.tucows.com") + expect(subject.nameservers[2].ipv4).to eq(nil) end end diff --git a/spec/whois/parsers/responses/whois.twnic.net.tw/tw/status_available_spec.rb b/spec/whois/parsers/responses/whois.twnic.net.tw/tw/status_available_spec.rb index fdd50900..058fd28a 100644 --- a/spec/whois/parsers/responses/whois.twnic.net.tw/tw/status_available_spec.rb +++ b/spec/whois/parsers/responses/whois.twnic.net.tw/tw/status_available_spec.rb @@ -11,50 +11,23 @@ # require 'spec_helper' -require 'whois/parsers/whois.twnic.net.tw.rb' -describe Whois::Parsers::WhoisTwnicNetTw, "status_available.expected" do +describe "whois.twnic.net.tw", :aggregate_failures do subject do file = fixture("responses", "whois.twnic.net.tw/tw/status_available.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.twnic.net.tw") + Whois::Parser.parser_for(part) end - describe "#status" do - it do - expect(subject.status).to eq(:available) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(true) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(false) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to eq(nil) - end - end - describe "#updated_on" do - it do - expect { subject.updated_on }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to eq(nil) - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers).to eq([]) - end + it "matches status_available.expected" do + expect(subject.status).to eq(:available) + expect(subject.available?).to eq(true) + expect(subject.registered?).to eq(false) + expect(subject.created_on).to eq(nil) + expect { subject.updated_on }.to raise_error(Whois::AttributeNotSupported) + expect(subject.expires_on).to eq(nil) + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers).to eq([]) end end diff --git a/spec/whois/parsers/responses/whois.twnic.net.tw/tw/status_registered_spec.rb b/spec/whois/parsers/responses/whois.twnic.net.tw/tw/status_registered_spec.rb index 92ce5779..dbe08927 100644 --- a/spec/whois/parsers/responses/whois.twnic.net.tw/tw/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.twnic.net.tw/tw/status_registered_spec.rb @@ -11,60 +11,33 @@ # require 'spec_helper' -require 'whois/parsers/whois.twnic.net.tw.rb' -describe Whois::Parsers::WhoisTwnicNetTw, "status_registered.expected" do +describe "whois.twnic.net.tw", :aggregate_failures do subject do file = fixture("responses", "whois.twnic.net.tw/tw/status_registered.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.twnic.net.tw") + Whois::Parser.parser_for(part) end - describe "#status" do - it do - expect(subject.status).to eq(:registered) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(false) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(true) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to be_a(Time) - expect(subject.created_on).to eq(DateTime.parse("2000-08-29")) - end - end - describe "#updated_on" do - it do - expect { subject.updated_on }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to be_a(Time) - expect(subject.expires_on).to eq(DateTime.parse("2011-11-09")) - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers.size).to eq(4) - expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[0].name).to eq("ns1.google.com") - expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[1].name).to eq("ns2.google.com") - expect(subject.nameservers[2]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[2].name).to eq("ns3.google.com") - expect(subject.nameservers[3]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[3].name).to eq("ns4.google.com") - end + it "matches status_registered.expected" do + expect(subject.status).to eq(:registered) + expect(subject.available?).to eq(false) + expect(subject.registered?).to eq(true) + expect(subject.created_on).to be_a(Time) + expect(subject.created_on).to eq(DateTime.parse("2000-08-29")) + expect { subject.updated_on }.to raise_error(Whois::AttributeNotSupported) + expect(subject.expires_on).to be_a(Time) + expect(subject.expires_on).to eq(DateTime.parse("2011-11-09")) + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers.size).to eq(4) + expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[0].name).to eq("ns1.google.com") + expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[1].name).to eq("ns2.google.com") + expect(subject.nameservers[2]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[2].name).to eq("ns3.google.com") + expect(subject.nameservers[3]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[3].name).to eq("ns4.google.com") end end diff --git a/spec/whois/parsers/responses/whois.tznic.or.tz/tz/property_status_expired_spec.rb b/spec/whois/parsers/responses/whois.tznic.or.tz/tz/property_status_expired_spec.rb index 8480d5ee..752c83d9 100644 --- a/spec/whois/parsers/responses/whois.tznic.or.tz/tz/property_status_expired_spec.rb +++ b/spec/whois/parsers/responses/whois.tznic.or.tz/tz/property_status_expired_spec.rb @@ -11,29 +11,18 @@ # require 'spec_helper' -require 'whois/parsers/whois.tznic.or.tz.rb' -describe Whois::Parsers::WhoisTznicOrTz, "property_status_expired.expected" do +describe "whois.tznic.or.tz", :aggregate_failures do subject do file = fixture("responses", "whois.tznic.or.tz/tz/property_status_expired.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.tznic.or.tz") + Whois::Parser.parser_for(part) end - describe "#status" do - it do - expect(subject.status).to eq(:expired) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(false) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(true) - end + it "matches property_status_expired.expected" do + expect(subject.status).to eq(:expired) + expect(subject.available?).to eq(false) + expect(subject.registered?).to eq(true) end end diff --git a/spec/whois/parsers/responses/whois.tznic.or.tz/tz/status_available_spec.rb b/spec/whois/parsers/responses/whois.tznic.or.tz/tz/status_available_spec.rb index 617a8484..c8e93560 100644 --- a/spec/whois/parsers/responses/whois.tznic.or.tz/tz/status_available_spec.rb +++ b/spec/whois/parsers/responses/whois.tznic.or.tz/tz/status_available_spec.rb @@ -11,83 +11,32 @@ # require 'spec_helper' -require 'whois/parsers/whois.tznic.or.tz.rb' -describe Whois::Parsers::WhoisTznicOrTz, "status_available.expected" do +describe "whois.tznic.or.tz", :aggregate_failures do subject do file = fixture("responses", "whois.tznic.or.tz/tz/status_available.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.tznic.or.tz") + Whois::Parser.parser_for(part) end - describe "#domain" do - it do - expect(subject.domain).to eq(nil) - end - end - describe "#domain_id" do - it do - expect { subject.domain_id }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#status" do - it do - expect(subject.status).to eq(:available) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(true) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(false) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to eq(nil) - end - end - describe "#updated_on" do - it do - expect(subject.updated_on).to eq(nil) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to eq(nil) - end - end - describe "#registrar" do - it do - expect(subject.registrar).to eq(nil) - end - end - describe "#registrant_contacts" do - it do - expect(subject.registrant_contacts).to be_a(Array) - expect(subject.registrant_contacts).to eq([]) - end - end - describe "#admin_contacts" do - it do - expect(subject.admin_contacts).to be_a(Array) - expect(subject.admin_contacts).to eq([]) - end - end - describe "#technical_contacts" do - it do - expect(subject.technical_contacts).to be_a(Array) - expect(subject.technical_contacts).to eq([]) - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers).to eq([]) - end + it "matches status_available.expected" do + expect(subject.domain).to eq(nil) + expect { subject.domain_id }.to raise_error(Whois::AttributeNotSupported) + expect(subject.status).to eq(:available) + expect(subject.available?).to eq(true) + expect(subject.registered?).to eq(false) + expect(subject.created_on).to eq(nil) + expect(subject.updated_on).to eq(nil) + expect(subject.expires_on).to eq(nil) + expect(subject.registrar).to eq(nil) + expect(subject.registrant_contacts).to be_a(Array) + expect(subject.registrant_contacts).to eq([]) + expect(subject.admin_contacts).to be_a(Array) + expect(subject.admin_contacts).to eq([]) + expect(subject.technical_contacts).to be_a(Array) + expect(subject.technical_contacts).to eq([]) + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers).to eq([]) end end diff --git a/spec/whois/parsers/responses/whois.tznic.or.tz/tz/status_registered_spec.rb b/spec/whois/parsers/responses/whois.tznic.or.tz/tz/status_registered_spec.rb index 1aa593df..13e940b0 100644 --- a/spec/whois/parsers/responses/whois.tznic.or.tz/tz/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.tznic.or.tz/tz/status_registered_spec.rb @@ -11,138 +11,87 @@ # require 'spec_helper' -require 'whois/parsers/whois.tznic.or.tz.rb' -describe Whois::Parsers::WhoisTznicOrTz, "status_registered.expected" do +describe "whois.tznic.or.tz", :aggregate_failures do subject do file = fixture("responses", "whois.tznic.or.tz/tz/status_registered.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.tznic.or.tz") + Whois::Parser.parser_for(part) end - describe "#domain" do - it do - expect(subject.domain).to eq("dailynews.co.tz") - end - end - describe "#domain_id" do - it do - expect { subject.domain_id }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#status" do - it do - expect(subject.status).to eq(:registered) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(false) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(true) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to be_a(Time) - expect(subject.created_on).to eq(DateTime.parse("2009-07-27 11:01:10")) - end - end - describe "#updated_on" do - it do - expect(subject.updated_on).to be_a(Time) - expect(subject.updated_on).to eq(DateTime.parse("2010-08-30 15:47:56")) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to be_a(Time) - expect(subject.expires_on).to eq(DateTime.parse("2012-07-27")) - end - end - describe "#registrar" do - it do - expect(subject.registrar).to be_a(Whois::Parser::Registrar) - expect(subject.registrar.id).to eq("REG-TZNIC") - expect(subject.registrar.name).to eq("REG-TZNIC") - expect(subject.registrar.url).to eq(nil) - end - end - describe "#registrant_contacts" do - it do - expect(subject.registrant_contacts).to be_a(Array) - expect(subject.registrant_contacts.size).to eq(1) - expect(subject.registrant_contacts[0]).to be_a(Whois::Parser::Contact) - expect(subject.registrant_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_REGISTRANT) - expect(subject.registrant_contacts[0].id).to eq("CM7-TZNIC") - expect(subject.registrant_contacts[0].name).to eq("Collins Mtita") - expect(subject.registrant_contacts[0].organization).to eq("TSN") - expect(subject.registrant_contacts[0].address).to eq("Dar_es_salaam\nDar_es_salaam\nP.O.BOX 9033\nTZ") - expect(subject.registrant_contacts[0].city).to eq(nil) - expect(subject.registrant_contacts[0].zip).to eq(nil) - expect(subject.registrant_contacts[0].state).to eq(nil) - expect(subject.registrant_contacts[0].country).to eq(nil) - expect(subject.registrant_contacts[0].country_code).to eq(nil) - expect(subject.registrant_contacts[0].phone).to eq(nil) - expect(subject.registrant_contacts[0].fax).to eq(nil) - expect(subject.registrant_contacts[0].email).to eq("mcollins@dailynews.co.tz") - expect(subject.registrant_contacts[0].created_on).to eq(DateTime.parse("2010-08-30 15:46:35")) - end - end - describe "#admin_contacts" do - it do - expect(subject.admin_contacts).to be_a(Array) - expect(subject.admin_contacts.size).to eq(1) - expect(subject.admin_contacts[0]).to be_a(Whois::Parser::Contact) - expect(subject.admin_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_ADMINISTRATIVE) - expect(subject.admin_contacts[0].id).to eq("CM7-TZNIC") - expect(subject.admin_contacts[0].name).to eq("Collins Mtita") - expect(subject.admin_contacts[0].organization).to eq("TSN") - expect(subject.admin_contacts[0].address).to eq("Dar_es_salaam\nDar_es_salaam\nP.O.BOX 9033\nTZ") - expect(subject.admin_contacts[0].city).to eq(nil) - expect(subject.admin_contacts[0].zip).to eq(nil) - expect(subject.admin_contacts[0].state).to eq(nil) - expect(subject.admin_contacts[0].country).to eq(nil) - expect(subject.admin_contacts[0].country_code).to eq(nil) - expect(subject.admin_contacts[0].phone).to eq(nil) - expect(subject.admin_contacts[0].fax).to eq(nil) - expect(subject.admin_contacts[0].email).to eq("mcollins@dailynews.co.tz") - expect(subject.admin_contacts[0].created_on).to eq(DateTime.parse("2010-08-30 15:46:35")) - end - end - describe "#technical_contacts" do - it do - expect(subject.technical_contacts).to be_a(Array) - expect(subject.technical_contacts.size).to eq(1) - expect(subject.technical_contacts[0]).to be_a(Whois::Parser::Contact) - expect(subject.technical_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_TECHNICAL) - expect(subject.technical_contacts[0].id).to eq("JN1-TZNIC") - expect(subject.technical_contacts[0].name).to eq("Jacob Noel") - expect(subject.technical_contacts[0].organization).to eq("Twiga Hosting") - expect(subject.technical_contacts[0].address).to eq("Dar es Salaam\nDar es Salaam\nP.O.Box\nTZ") - expect(subject.technical_contacts[0].city).to eq(nil) - expect(subject.technical_contacts[0].zip).to eq(nil) - expect(subject.technical_contacts[0].state).to eq(nil) - expect(subject.technical_contacts[0].country).to eq(nil) - expect(subject.technical_contacts[0].country_code).to eq(nil) - expect(subject.technical_contacts[0].phone).to eq("+255.755763951") - expect(subject.technical_contacts[0].fax).to eq(nil) - expect(subject.technical_contacts[0].email).to eq("jacobn@twigaonline.com") - expect(subject.technical_contacts[0].created_on).to eq(DateTime.parse("2009-08-24 06:21:51")) - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers.size).to eq(2) - expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[0].name).to eq("ns1.twigaservers.com") - expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[1].name).to eq("ns2.twigaservers.com") - end + it "matches status_registered.expected" do + expect(subject.domain).to eq("dailynews.co.tz") + expect { subject.domain_id }.to raise_error(Whois::AttributeNotSupported) + expect(subject.status).to eq(:registered) + expect(subject.available?).to eq(false) + expect(subject.registered?).to eq(true) + expect(subject.created_on).to be_a(Time) + expect(subject.created_on).to eq(DateTime.parse("2009-07-27 11:01:10")) + expect(subject.updated_on).to be_a(Time) + expect(subject.updated_on).to eq(DateTime.parse("2010-08-30 15:47:56")) + expect(subject.expires_on).to be_a(Time) + expect(subject.expires_on).to eq(DateTime.parse("2012-07-27")) + expect(subject.registrar).to be_a(Whois::Parser::Registrar) + expect(subject.registrar.id).to eq("REG-TZNIC") + expect(subject.registrar.name).to eq("REG-TZNIC") + expect(subject.registrar.url).to eq(nil) + expect(subject.registrant_contacts).to be_a(Array) + expect(subject.registrant_contacts.size).to eq(1) + expect(subject.registrant_contacts[0]).to be_a(Whois::Parser::Contact) + expect(subject.registrant_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_REGISTRANT) + expect(subject.registrant_contacts[0].id).to eq("CM7-TZNIC") + expect(subject.registrant_contacts[0].name).to eq("Collins Mtita") + expect(subject.registrant_contacts[0].organization).to eq("TSN") + expect(subject.registrant_contacts[0].address).to eq("Dar_es_salaam\nDar_es_salaam\nP.O.BOX 9033\nTZ") + expect(subject.registrant_contacts[0].city).to eq(nil) + expect(subject.registrant_contacts[0].zip).to eq(nil) + expect(subject.registrant_contacts[0].state).to eq(nil) + expect(subject.registrant_contacts[0].country).to eq(nil) + expect(subject.registrant_contacts[0].country_code).to eq(nil) + expect(subject.registrant_contacts[0].phone).to eq(nil) + expect(subject.registrant_contacts[0].fax).to eq(nil) + expect(subject.registrant_contacts[0].email).to eq("mcollins@dailynews.co.tz") + expect(subject.registrant_contacts[0].created_on).to eq(DateTime.parse("2010-08-30 15:46:35")) + expect(subject.admin_contacts).to be_a(Array) + expect(subject.admin_contacts.size).to eq(1) + expect(subject.admin_contacts[0]).to be_a(Whois::Parser::Contact) + expect(subject.admin_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_ADMINISTRATIVE) + expect(subject.admin_contacts[0].id).to eq("CM7-TZNIC") + expect(subject.admin_contacts[0].name).to eq("Collins Mtita") + expect(subject.admin_contacts[0].organization).to eq("TSN") + expect(subject.admin_contacts[0].address).to eq("Dar_es_salaam\nDar_es_salaam\nP.O.BOX 9033\nTZ") + expect(subject.admin_contacts[0].city).to eq(nil) + expect(subject.admin_contacts[0].zip).to eq(nil) + expect(subject.admin_contacts[0].state).to eq(nil) + expect(subject.admin_contacts[0].country).to eq(nil) + expect(subject.admin_contacts[0].country_code).to eq(nil) + expect(subject.admin_contacts[0].phone).to eq(nil) + expect(subject.admin_contacts[0].fax).to eq(nil) + expect(subject.admin_contacts[0].email).to eq("mcollins@dailynews.co.tz") + expect(subject.admin_contacts[0].created_on).to eq(DateTime.parse("2010-08-30 15:46:35")) + expect(subject.technical_contacts).to be_a(Array) + expect(subject.technical_contacts.size).to eq(1) + expect(subject.technical_contacts[0]).to be_a(Whois::Parser::Contact) + expect(subject.technical_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_TECHNICAL) + expect(subject.technical_contacts[0].id).to eq("JN1-TZNIC") + expect(subject.technical_contacts[0].name).to eq("Jacob Noel") + expect(subject.technical_contacts[0].organization).to eq("Twiga Hosting") + expect(subject.technical_contacts[0].address).to eq("Dar es Salaam\nDar es Salaam\nP.O.Box\nTZ") + expect(subject.technical_contacts[0].city).to eq(nil) + expect(subject.technical_contacts[0].zip).to eq(nil) + expect(subject.technical_contacts[0].state).to eq(nil) + expect(subject.technical_contacts[0].country).to eq(nil) + expect(subject.technical_contacts[0].country_code).to eq(nil) + expect(subject.technical_contacts[0].phone).to eq("+255.755763951") + expect(subject.technical_contacts[0].fax).to eq(nil) + expect(subject.technical_contacts[0].email).to eq("jacobn@twigaonline.com") + expect(subject.technical_contacts[0].created_on).to eq(DateTime.parse("2009-08-24 06:21:51")) + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers.size).to eq(2) + expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[0].name).to eq("ns1.twigaservers.com") + expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[1].name).to eq("ns2.twigaservers.com") end end diff --git a/spec/whois/parsers/responses/whois.ua/ua/uaepp/property_status_clienthold_spec.rb b/spec/whois/parsers/responses/whois.ua/ua/uaepp/property_status_clienthold_spec.rb index 3f754e2d..dccc31af 100644 --- a/spec/whois/parsers/responses/whois.ua/ua/uaepp/property_status_clienthold_spec.rb +++ b/spec/whois/parsers/responses/whois.ua/ua/uaepp/property_status_clienthold_spec.rb @@ -11,29 +11,18 @@ # require 'spec_helper' -require 'whois/parsers/whois.ua.rb' -describe Whois::Parsers::WhoisUa, "property_status_clienthold.expected" do +describe "whois.ua", :aggregate_failures do subject do file = fixture("responses", "whois.ua/ua/uaepp/property_status_clienthold.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.ua") + Whois::Parser.parser_for(part) end - describe "#status" do - it do - expect(subject.status).to eq(:registered) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(false) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(true) - end + it "matches property_status_clienthold.expected" do + expect(subject.status).to eq(:registered) + expect(subject.available?).to eq(false) + expect(subject.registered?).to eq(true) end end diff --git a/spec/whois/parsers/responses/whois.ua/ua/uaepp/property_status_clienttransferprohibited_spec.rb b/spec/whois/parsers/responses/whois.ua/ua/uaepp/property_status_clienttransferprohibited_spec.rb index 3f95b686..e7034018 100644 --- a/spec/whois/parsers/responses/whois.ua/ua/uaepp/property_status_clienttransferprohibited_spec.rb +++ b/spec/whois/parsers/responses/whois.ua/ua/uaepp/property_status_clienttransferprohibited_spec.rb @@ -11,29 +11,18 @@ # require 'spec_helper' -require 'whois/parsers/whois.ua.rb' -describe Whois::Parsers::WhoisUa, "property_status_clienttransferprohibited.expected" do +describe "whois.ua", :aggregate_failures do subject do file = fixture("responses", "whois.ua/ua/uaepp/property_status_clienttransferprohibited.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.ua") + Whois::Parser.parser_for(part) end - describe "#status" do - it do - expect(subject.status).to eq(:registered) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(false) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(true) - end + it "matches property_status_clienttransferprohibited.expected" do + expect(subject.status).to eq(:registered) + expect(subject.available?).to eq(false) + expect(subject.registered?).to eq(true) end end diff --git a/spec/whois/parsers/responses/whois.ua/ua/uaepp/property_status_graceperiod_spec.rb b/spec/whois/parsers/responses/whois.ua/ua/uaepp/property_status_graceperiod_spec.rb index d2a075fc..afea525b 100644 --- a/spec/whois/parsers/responses/whois.ua/ua/uaepp/property_status_graceperiod_spec.rb +++ b/spec/whois/parsers/responses/whois.ua/ua/uaepp/property_status_graceperiod_spec.rb @@ -11,29 +11,18 @@ # require 'spec_helper' -require 'whois/parsers/whois.ua.rb' -describe Whois::Parsers::WhoisUa, "property_status_graceperiod.expected" do +describe "whois.ua", :aggregate_failures do subject do file = fixture("responses", "whois.ua/ua/uaepp/property_status_graceperiod.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.ua") + Whois::Parser.parser_for(part) end - describe "#status" do - it do - expect(subject.status).to eq(:registered) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(false) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(true) - end + it "matches property_status_graceperiod.expected" do + expect(subject.status).to eq(:registered) + expect(subject.available?).to eq(false) + expect(subject.registered?).to eq(true) end end diff --git a/spec/whois/parsers/responses/whois.ua/ua/uaepp/property_status_ok_spec.rb b/spec/whois/parsers/responses/whois.ua/ua/uaepp/property_status_ok_spec.rb index f1e66769..7344afbc 100644 --- a/spec/whois/parsers/responses/whois.ua/ua/uaepp/property_status_ok_spec.rb +++ b/spec/whois/parsers/responses/whois.ua/ua/uaepp/property_status_ok_spec.rb @@ -11,29 +11,18 @@ # require 'spec_helper' -require 'whois/parsers/whois.ua.rb' -describe Whois::Parsers::WhoisUa, "property_status_ok.expected" do +describe "whois.ua", :aggregate_failures do subject do file = fixture("responses", "whois.ua/ua/uaepp/property_status_ok.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.ua") + Whois::Parser.parser_for(part) end - describe "#status" do - it do - expect(subject.status).to eq(:registered) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(false) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(true) - end + it "matches property_status_ok.expected" do + expect(subject.status).to eq(:registered) + expect(subject.available?).to eq(false) + expect(subject.registered?).to eq(true) end end diff --git a/spec/whois/parsers/responses/whois.ua/ua/uaepp/property_status_pendingdelete_spec.rb b/spec/whois/parsers/responses/whois.ua/ua/uaepp/property_status_pendingdelete_spec.rb index 2c6a0ecf..7de7c077 100644 --- a/spec/whois/parsers/responses/whois.ua/ua/uaepp/property_status_pendingdelete_spec.rb +++ b/spec/whois/parsers/responses/whois.ua/ua/uaepp/property_status_pendingdelete_spec.rb @@ -11,29 +11,18 @@ # require 'spec_helper' -require 'whois/parsers/whois.ua.rb' -describe Whois::Parsers::WhoisUa, "property_status_pendingdelete.expected" do +describe "whois.ua", :aggregate_failures do subject do file = fixture("responses", "whois.ua/ua/uaepp/property_status_pendingdelete.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.ua") + Whois::Parser.parser_for(part) end - describe "#status" do - it do - expect(subject.status).to eq(:redemption) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(false) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(true) - end + it "matches property_status_pendingdelete.expected" do + expect(subject.status).to eq(:redemption) + expect(subject.available?).to eq(false) + expect(subject.registered?).to eq(true) end end diff --git a/spec/whois/parsers/responses/whois.ua/ua/uaepp/property_status_redemptionperiod_spec.rb b/spec/whois/parsers/responses/whois.ua/ua/uaepp/property_status_redemptionperiod_spec.rb index afc36669..98605053 100644 --- a/spec/whois/parsers/responses/whois.ua/ua/uaepp/property_status_redemptionperiod_spec.rb +++ b/spec/whois/parsers/responses/whois.ua/ua/uaepp/property_status_redemptionperiod_spec.rb @@ -11,29 +11,18 @@ # require 'spec_helper' -require 'whois/parsers/whois.ua.rb' -describe Whois::Parsers::WhoisUa, "property_status_redemptionperiod.expected" do +describe "whois.ua", :aggregate_failures do subject do file = fixture("responses", "whois.ua/ua/uaepp/property_status_redemptionperiod.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.ua") + Whois::Parser.parser_for(part) end - describe "#status" do - it do - expect(subject.status).to eq(:redemption) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(false) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(true) - end + it "matches property_status_redemptionperiod.expected" do + expect(subject.status).to eq(:redemption) + expect(subject.available?).to eq(false) + expect(subject.registered?).to eq(true) end end diff --git a/spec/whois/parsers/responses/whois.ua/ua/uaepp/status_available_spec.rb b/spec/whois/parsers/responses/whois.ua/ua/uaepp/status_available_spec.rb index 8937e37f..f16ab611 100644 --- a/spec/whois/parsers/responses/whois.ua/ua/uaepp/status_available_spec.rb +++ b/spec/whois/parsers/responses/whois.ua/ua/uaepp/status_available_spec.rb @@ -11,83 +11,32 @@ # require 'spec_helper' -require 'whois/parsers/whois.ua.rb' -describe Whois::Parsers::WhoisUa, "status_available.expected" do +describe "whois.ua", :aggregate_failures do subject do file = fixture("responses", "whois.ua/ua/uaepp/status_available.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.ua") + Whois::Parser.parser_for(part) end - describe "#domain" do - it do - expect(subject.domain).to eq(nil) - end - end - describe "#domain_id" do - it do - expect { subject.domain_id }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#status" do - it do - expect(subject.status).to eq(:available) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(true) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(false) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to eq(nil) - end - end - describe "#updated_on" do - it do - expect(subject.updated_on).to eq(nil) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to eq(nil) - end - end - describe "#registrar" do - it do - expect { subject.registrar }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#registrant_contacts" do - it do - expect(subject.registrant_contacts).to be_a(Array) - expect(subject.registrant_contacts).to eq([]) - end - end - describe "#admin_contacts" do - it do - expect(subject.admin_contacts).to be_a(Array) - expect(subject.admin_contacts).to eq([]) - end - end - describe "#technical_contacts" do - it do - expect(subject.technical_contacts).to be_a(Array) - expect(subject.technical_contacts).to eq([]) - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers).to eq([]) - end + it "matches status_available.expected" do + expect(subject.domain).to eq(nil) + expect { subject.domain_id }.to raise_error(Whois::AttributeNotSupported) + expect(subject.status).to eq(:available) + expect(subject.available?).to eq(true) + expect(subject.registered?).to eq(false) + expect(subject.created_on).to eq(nil) + expect(subject.updated_on).to eq(nil) + expect(subject.expires_on).to eq(nil) + expect { subject.registrar }.to raise_error(Whois::AttributeNotSupported) + expect(subject.registrant_contacts).to be_a(Array) + expect(subject.registrant_contacts).to eq([]) + expect(subject.admin_contacts).to be_a(Array) + expect(subject.admin_contacts).to eq([]) + expect(subject.technical_contacts).to be_a(Array) + expect(subject.technical_contacts).to eq([]) + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers).to eq([]) end end diff --git a/spec/whois/parsers/responses/whois.ua/ua/uaepp/status_registered_spec.rb b/spec/whois/parsers/responses/whois.ua/ua/uaepp/status_registered_spec.rb index 64e7960d..c7e06978 100644 --- a/spec/whois/parsers/responses/whois.ua/ua/uaepp/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.ua/ua/uaepp/status_registered_spec.rb @@ -11,142 +11,91 @@ # require 'spec_helper' -require 'whois/parsers/whois.ua.rb' -describe Whois::Parsers::WhoisUa, "status_registered.expected" do +describe "whois.ua", :aggregate_failures do subject do file = fixture("responses", "whois.ua/ua/uaepp/status_registered.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.ua") + Whois::Parser.parser_for(part) end - describe "#domain" do - it do - expect(subject.domain).to eq("google.com.ua") - end - end - describe "#domain_id" do - it do - expect { subject.domain_id }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#status" do - it do - expect(subject.status).to eq(:registered) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(false) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(true) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to be_a(Time) - expect(subject.created_on).to eq(DateTime.parse("2002-12-04 00:00:00 +02:00")) - end - end - describe "#updated_on" do - it do - expect(subject.updated_on).to be_a(Time) - expect(subject.updated_on).to eq(DateTime.parse("2013-04-15 20:00:10 +03:00")) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to be_a(Time) - expect(subject.expires_on).to eq(DateTime.parse("2013-12-04 00:00:00 +02:00")) - end - end - describe "#registrar" do - it do - expect { subject.registrar }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#registrant_contacts" do - it do - expect(subject.registrant_contacts).to be_a(Array) - expect(subject.registrant_contacts.size).to eq(1) - expect(subject.registrant_contacts[0]).to be_a(Whois::Parser::Contact) - expect(subject.registrant_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_ADMINISTRATIVE) - expect(subject.registrant_contacts[0].id).to eq("com-gi8-1") - expect(subject.registrant_contacts[0].name).to eq("Google Inc.") - expect(subject.registrant_contacts[0].organization).to eq("Google Inc.") - expect(subject.registrant_contacts[0].address).to eq("1600 Amphitheatre Parkway Mountain View CA 94043 US") - expect(subject.registrant_contacts[0].city).to eq(nil) - expect(subject.registrant_contacts[0].zip).to eq(nil) - expect(subject.registrant_contacts[0].state).to eq(nil) - expect(subject.registrant_contacts[0].country).to eq("UA") - expect(subject.registrant_contacts[0].country_code).to eq(nil) - expect(subject.registrant_contacts[0].phone).to eq("+16503300100") - expect(subject.registrant_contacts[0].fax).to eq("+16506188571") - expect(subject.registrant_contacts[0].email).to eq("dns-admin@google.com") - expect(subject.registrant_contacts[0].created_on).to eq(DateTime.parse("2013-03-31 19:13:45 +03:00")) - expect(subject.registrant_contacts[0].updated_on).to eq(nil) - end - end - describe "#admin_contacts" do - it do - expect(subject.admin_contacts).to be_a(Array) - expect(subject.admin_contacts.size).to eq(1) - expect(subject.admin_contacts[0]).to be_a(Whois::Parser::Contact) - expect(subject.admin_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_ADMINISTRATIVE) - expect(subject.admin_contacts[0].id).to eq("com-gi8-1") - expect(subject.admin_contacts[0].name).to eq("Google Inc.") - expect(subject.admin_contacts[0].organization).to eq("Google Inc.") - expect(subject.admin_contacts[0].address).to eq("1600 Amphitheatre Parkway Mountain View CA 94043 US") - expect(subject.admin_contacts[0].city).to eq(nil) - expect(subject.admin_contacts[0].zip).to eq(nil) - expect(subject.admin_contacts[0].state).to eq(nil) - expect(subject.admin_contacts[0].country).to eq("UA") - expect(subject.admin_contacts[0].country_code).to eq(nil) - expect(subject.admin_contacts[0].phone).to eq("+16503300100") - expect(subject.admin_contacts[0].fax).to eq("+16506188571") - expect(subject.admin_contacts[0].email).to eq("dns-admin@google.com") - expect(subject.admin_contacts[0].created_on).to eq(DateTime.parse("2013-03-31 19:13:45 +03:00")) - expect(subject.admin_contacts[0].updated_on).to eq(nil) - end - end - describe "#technical_contacts" do - it do - expect(subject.technical_contacts).to be_a(Array) - expect(subject.technical_contacts.size).to eq(1) - expect(subject.technical_contacts[0]).to be_a(Whois::Parser::Contact) - expect(subject.technical_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_TECHNICAL) - expect(subject.technical_contacts[0].id).to eq("com-gi8-1") - expect(subject.technical_contacts[0].name).to eq("Google Inc.") - expect(subject.technical_contacts[0].organization).to eq("Google Inc.") - expect(subject.technical_contacts[0].address).to eq("1600 Amphitheatre Parkway Mountain View CA 94043 US") - expect(subject.technical_contacts[0].city).to eq(nil) - expect(subject.technical_contacts[0].zip).to eq(nil) - expect(subject.technical_contacts[0].state).to eq(nil) - expect(subject.technical_contacts[0].country).to eq("UA") - expect(subject.technical_contacts[0].country_code).to eq(nil) - expect(subject.technical_contacts[0].phone).to eq("+16503300100") - expect(subject.technical_contacts[0].fax).to eq("+16506188571") - expect(subject.technical_contacts[0].email).to eq("dns-admin@google.com") - expect(subject.technical_contacts[0].created_on).to eq(DateTime.parse("2013-03-31 19:13:45 +03:00")) - expect(subject.technical_contacts[0].updated_on).to eq(nil) - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers.size).to eq(4) - expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[0].name).to eq("ns3.google.com") - expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[1].name).to eq("ns1.google.com") - expect(subject.nameservers[2]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[2].name).to eq("ns4.google.com") - expect(subject.nameservers[3]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[3].name).to eq("ns2.google.com") - end + it "matches status_registered.expected" do + expect(subject.domain).to eq("google.com.ua") + expect { subject.domain_id }.to raise_error(Whois::AttributeNotSupported) + expect(subject.status).to eq(:registered) + expect(subject.available?).to eq(false) + expect(subject.registered?).to eq(true) + expect(subject.created_on).to be_a(Time) + expect(subject.created_on).to eq(DateTime.parse("2002-12-04 00:00:00 +02:00")) + expect(subject.updated_on).to be_a(Time) + expect(subject.updated_on).to eq(DateTime.parse("2013-04-15 20:00:10 +03:00")) + expect(subject.expires_on).to be_a(Time) + expect(subject.expires_on).to eq(DateTime.parse("2013-12-04 00:00:00 +02:00")) + expect { subject.registrar }.to raise_error(Whois::AttributeNotSupported) + expect(subject.registrant_contacts).to be_a(Array) + expect(subject.registrant_contacts.size).to eq(1) + expect(subject.registrant_contacts[0]).to be_a(Whois::Parser::Contact) + expect(subject.registrant_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_ADMINISTRATIVE) + expect(subject.registrant_contacts[0].id).to eq("com-gi8-1") + expect(subject.registrant_contacts[0].name).to eq("Google Inc.") + expect(subject.registrant_contacts[0].organization).to eq("Google Inc.") + expect(subject.registrant_contacts[0].address).to eq("1600 Amphitheatre Parkway Mountain View CA 94043 US") + expect(subject.registrant_contacts[0].city).to eq(nil) + expect(subject.registrant_contacts[0].zip).to eq(nil) + expect(subject.registrant_contacts[0].state).to eq(nil) + expect(subject.registrant_contacts[0].country).to eq("UA") + expect(subject.registrant_contacts[0].country_code).to eq(nil) + expect(subject.registrant_contacts[0].phone).to eq("+16503300100") + expect(subject.registrant_contacts[0].fax).to eq("+16506188571") + expect(subject.registrant_contacts[0].email).to eq("dns-admin@google.com") + expect(subject.registrant_contacts[0].created_on).to eq(DateTime.parse("2013-03-31 19:13:45 +03:00")) + expect(subject.registrant_contacts[0].updated_on).to eq(nil) + expect(subject.admin_contacts).to be_a(Array) + expect(subject.admin_contacts.size).to eq(1) + expect(subject.admin_contacts[0]).to be_a(Whois::Parser::Contact) + expect(subject.admin_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_ADMINISTRATIVE) + expect(subject.admin_contacts[0].id).to eq("com-gi8-1") + expect(subject.admin_contacts[0].name).to eq("Google Inc.") + expect(subject.admin_contacts[0].organization).to eq("Google Inc.") + expect(subject.admin_contacts[0].address).to eq("1600 Amphitheatre Parkway Mountain View CA 94043 US") + expect(subject.admin_contacts[0].city).to eq(nil) + expect(subject.admin_contacts[0].zip).to eq(nil) + expect(subject.admin_contacts[0].state).to eq(nil) + expect(subject.admin_contacts[0].country).to eq("UA") + expect(subject.admin_contacts[0].country_code).to eq(nil) + expect(subject.admin_contacts[0].phone).to eq("+16503300100") + expect(subject.admin_contacts[0].fax).to eq("+16506188571") + expect(subject.admin_contacts[0].email).to eq("dns-admin@google.com") + expect(subject.admin_contacts[0].created_on).to eq(DateTime.parse("2013-03-31 19:13:45 +03:00")) + expect(subject.admin_contacts[0].updated_on).to eq(nil) + expect(subject.technical_contacts).to be_a(Array) + expect(subject.technical_contacts.size).to eq(1) + expect(subject.technical_contacts[0]).to be_a(Whois::Parser::Contact) + expect(subject.technical_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_TECHNICAL) + expect(subject.technical_contacts[0].id).to eq("com-gi8-1") + expect(subject.technical_contacts[0].name).to eq("Google Inc.") + expect(subject.technical_contacts[0].organization).to eq("Google Inc.") + expect(subject.technical_contacts[0].address).to eq("1600 Amphitheatre Parkway Mountain View CA 94043 US") + expect(subject.technical_contacts[0].city).to eq(nil) + expect(subject.technical_contacts[0].zip).to eq(nil) + expect(subject.technical_contacts[0].state).to eq(nil) + expect(subject.technical_contacts[0].country).to eq("UA") + expect(subject.technical_contacts[0].country_code).to eq(nil) + expect(subject.technical_contacts[0].phone).to eq("+16503300100") + expect(subject.technical_contacts[0].fax).to eq("+16506188571") + expect(subject.technical_contacts[0].email).to eq("dns-admin@google.com") + expect(subject.technical_contacts[0].created_on).to eq(DateTime.parse("2013-03-31 19:13:45 +03:00")) + expect(subject.technical_contacts[0].updated_on).to eq(nil) + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers.size).to eq(4) + expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[0].name).to eq("ns3.google.com") + expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[1].name).to eq("ns1.google.com") + expect(subject.nameservers[2]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[2].name).to eq("ns4.google.com") + expect(subject.nameservers[3]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[3].name).to eq("ns2.google.com") end end diff --git a/spec/whois/parsers/responses/whois.ua/ua/uanic/property_contacts_multiple_spec.rb b/spec/whois/parsers/responses/whois.ua/ua/uanic/property_contacts_multiple_spec.rb index 31976ac7..2d7b7fdf 100644 --- a/spec/whois/parsers/responses/whois.ua/ua/uanic/property_contacts_multiple_spec.rb +++ b/spec/whois/parsers/responses/whois.ua/ua/uanic/property_contacts_multiple_spec.rb @@ -11,52 +11,49 @@ # require 'spec_helper' -require 'whois/parsers/whois.ua.rb' -describe Whois::Parsers::WhoisUa, "property_contacts_multiple.expected" do +describe "whois.ua", :aggregate_failures do subject do file = fixture("responses", "whois.ua/ua/uanic/property_contacts_multiple.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.ua") + Whois::Parser.parser_for(part) end - describe "#technical_contacts" do - it do - expect(subject.technical_contacts).to be_a(Array) - expect(subject.technical_contacts.size).to eq(2) - expect(subject.technical_contacts[0]).to be_a(Whois::Parser::Contact) - expect(subject.technical_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_TECHNICAL) - expect(subject.technical_contacts[0].id).to eq("KG780-UANIC") - expect(subject.technical_contacts[0].name).to eq(nil) - expect(subject.technical_contacts[0].organization).to eq("Kyivstar GSM") - expect(subject.technical_contacts[0].address).to eq("Chervonozoryanyi Av., 51") - expect(subject.technical_contacts[0].city).to eq("KYIV") - expect(subject.technical_contacts[0].zip).to eq("03110") - expect(subject.technical_contacts[0].state).to eq(nil) - expect(subject.technical_contacts[0].country).to eq("UA") - expect(subject.technical_contacts[0].country_code).to eq(nil) - expect(subject.technical_contacts[0].phone).to eq("+380 (67) 2372213") - expect(subject.technical_contacts[0].fax).to eq("+380 (44) 2473954") - expect(subject.technical_contacts[0].email).to eq("dnsmaster@kyivstar.net") - expect(subject.technical_contacts[0].created_on).to eq(nil) - expect(subject.technical_contacts[0].updated_on).to eq(DateTime.parse("2008-09-02 12:52:47")) - expect(subject.technical_contacts[1]).to be_a(Whois::Parser::Contact) - expect(subject.technical_contacts[1].type).to eq(Whois::Parser::Contact::TYPE_TECHNICAL) - expect(subject.technical_contacts[1].id).to eq("EIC-UANIC") - expect(subject.technical_contacts[1].name).to eq(nil) - expect(subject.technical_contacts[1].organization).to eq("\"ElVisti Information Center\", LLC\nООО \"Информационный центр \"Электронные вести\"\nТОВ \"ІЦ ЕЛВІСТІ\"") - expect(subject.technical_contacts[1].address).to eq("а/с, 151") - expect(subject.technical_contacts[1].city).to eq("КИЇВ") - expect(subject.technical_contacts[1].zip).to eq("03037") - expect(subject.technical_contacts[1].state).to eq(nil) - expect(subject.technical_contacts[1].country).to eq("UA") - expect(subject.technical_contacts[1].country_code).to eq(nil) - expect(subject.technical_contacts[1].phone).to eq("+38044 239-90-91") - expect(subject.technical_contacts[1].fax).to eq(nil) - expect(subject.technical_contacts[1].email).to eq("hostmaster@visti.net") - expect(subject.technical_contacts[1].created_on).to eq(nil) - expect(subject.technical_contacts[1].updated_on).to eq(DateTime.parse("2011-12-15 11:33:14")) - end + it "matches property_contacts_multiple.expected" do + expect(subject.technical_contacts).to be_a(Array) + expect(subject.technical_contacts.size).to eq(2) + expect(subject.technical_contacts[0]).to be_a(Whois::Parser::Contact) + expect(subject.technical_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_TECHNICAL) + expect(subject.technical_contacts[0].id).to eq("KG780-UANIC") + expect(subject.technical_contacts[0].name).to eq(nil) + expect(subject.technical_contacts[0].organization).to eq("Kyivstar GSM") + expect(subject.technical_contacts[0].address).to eq("Chervonozoryanyi Av., 51") + expect(subject.technical_contacts[0].city).to eq("KYIV") + expect(subject.technical_contacts[0].zip).to eq("03110") + expect(subject.technical_contacts[0].state).to eq(nil) + expect(subject.technical_contacts[0].country).to eq("UA") + expect(subject.technical_contacts[0].country_code).to eq(nil) + expect(subject.technical_contacts[0].phone).to eq("+380 (67) 2372213") + expect(subject.technical_contacts[0].fax).to eq("+380 (44) 2473954") + expect(subject.technical_contacts[0].email).to eq("dnsmaster@kyivstar.net") + expect(subject.technical_contacts[0].created_on).to eq(nil) + expect(subject.technical_contacts[0].updated_on).to eq(DateTime.parse("2008-09-02 12:52:47")) + expect(subject.technical_contacts[1]).to be_a(Whois::Parser::Contact) + expect(subject.technical_contacts[1].type).to eq(Whois::Parser::Contact::TYPE_TECHNICAL) + expect(subject.technical_contacts[1].id).to eq("EIC-UANIC") + expect(subject.technical_contacts[1].name).to eq(nil) + expect(subject.technical_contacts[1].organization).to eq("\"ElVisti Information Center\", LLC\nООО \"Информационный центр \"Электронные вести\"\nТОВ \"ІЦ ЕЛВІСТІ\"") + expect(subject.technical_contacts[1].address).to eq("а/с, 151") + expect(subject.technical_contacts[1].city).to eq("КИЇВ") + expect(subject.technical_contacts[1].zip).to eq("03037") + expect(subject.technical_contacts[1].state).to eq(nil) + expect(subject.technical_contacts[1].country).to eq("UA") + expect(subject.technical_contacts[1].country_code).to eq(nil) + expect(subject.technical_contacts[1].phone).to eq("+38044 239-90-91") + expect(subject.technical_contacts[1].fax).to eq(nil) + expect(subject.technical_contacts[1].email).to eq("hostmaster@visti.net") + expect(subject.technical_contacts[1].created_on).to eq(nil) + expect(subject.technical_contacts[1].updated_on).to eq(DateTime.parse("2011-12-15 11:33:14")) end end diff --git a/spec/whois/parsers/responses/whois.ua/ua/uanic/status_registered_spec.rb b/spec/whois/parsers/responses/whois.ua/ua/uanic/status_registered_spec.rb index 3537b859..52b20768 100644 --- a/spec/whois/parsers/responses/whois.ua/ua/uanic/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.ua/ua/uanic/status_registered_spec.rb @@ -11,122 +11,71 @@ # require 'spec_helper' -require 'whois/parsers/whois.ua.rb' -describe Whois::Parsers::WhoisUa, "status_registered.expected" do +describe "whois.ua", :aggregate_failures do subject do file = fixture("responses", "whois.ua/ua/uanic/status_registered.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.ua") + Whois::Parser.parser_for(part) end - describe "#domain" do - it do - expect(subject.domain).to eq("kyivstar.ua") - end - end - describe "#domain_id" do - it do - expect { subject.domain_id }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#status" do - it do - expect(subject.status).to eq(:registered) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(false) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(true) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to be_a(Time) - expect(subject.created_on).to eq(DateTime.parse("2002-09-03 00:00:00")) - end - end - describe "#updated_on" do - it do - expect(subject.updated_on).to be_a(Time) - expect(subject.updated_on).to eq(DateTime.parse("2012-07-30 16:42:30")) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to be_a(Time) - expect(subject.expires_on).to eq(DateTime.parse("2014-09-03 12:18:52")) - end - end - describe "#registrar" do - it do - expect { subject.registrar }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#registrant_contacts" do - it do - expect(subject.registrant_contacts).to be_a(Array) - expect(subject.registrant_contacts.size).to eq(0) - end - end - describe "#admin_contacts" do - it do - expect(subject.admin_contacts).to be_a(Array) - expect(subject.admin_contacts.size).to eq(1) - expect(subject.admin_contacts[0]).to be_a(Whois::Parser::Contact) - expect(subject.admin_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_ADMINISTRATIVE) - expect(subject.admin_contacts[0].id).to eq("KG780-UANIC") - expect(subject.admin_contacts[0].name).to eq(nil) - expect(subject.admin_contacts[0].organization).to eq("Kyivstar GSM") - expect(subject.admin_contacts[0].address).to eq("Chervonozoryanyi Av., 51") - expect(subject.admin_contacts[0].city).to eq("KYIV") - expect(subject.admin_contacts[0].zip).to eq("03110") - expect(subject.admin_contacts[0].state).to eq(nil) - expect(subject.admin_contacts[0].country).to eq("UA") - expect(subject.admin_contacts[0].country_code).to eq(nil) - expect(subject.admin_contacts[0].phone).to eq("+380 (67) 2372213") - expect(subject.admin_contacts[0].fax).to eq("+380 (44) 2473954") - expect(subject.admin_contacts[0].email).to eq("dnsmaster@kyivstar.net") - expect(subject.admin_contacts[0].created_on).to eq(nil) - expect(subject.admin_contacts[0].updated_on).to eq(DateTime.parse("2008-09-02 12:52:47")) - end - end - describe "#technical_contacts" do - it do - expect(subject.technical_contacts).to be_a(Array) - expect(subject.technical_contacts.size).to eq(2) - expect(subject.technical_contacts[0]).to be_a(Whois::Parser::Contact) - expect(subject.technical_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_TECHNICAL) - expect(subject.technical_contacts[0].id).to eq("KG780-UANIC") - expect(subject.technical_contacts[0].name).to eq(nil) - expect(subject.technical_contacts[0].organization).to eq("Kyivstar GSM") - expect(subject.technical_contacts[0].address).to eq("Chervonozoryanyi Av., 51") - expect(subject.technical_contacts[0].city).to eq("KYIV") - expect(subject.technical_contacts[0].zip).to eq("03110") - expect(subject.technical_contacts[0].state).to eq(nil) - expect(subject.technical_contacts[0].country).to eq("UA") - expect(subject.technical_contacts[0].country_code).to eq(nil) - expect(subject.technical_contacts[0].phone).to eq("+380 (67) 2372213") - expect(subject.technical_contacts[0].fax).to eq("+380 (44) 2473954") - expect(subject.technical_contacts[0].email).to eq("dnsmaster@kyivstar.net") - expect(subject.technical_contacts[0].created_on).to eq(nil) - expect(subject.technical_contacts[0].updated_on).to eq(DateTime.parse("2008-09-02 12:52:47")) - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers.size).to eq(2) - expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[0].name).to eq("ns2.elvisti.kiev.ua") - expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[1].name).to eq("ns.kyivstar.net") - end + it "matches status_registered.expected" do + expect(subject.domain).to eq("kyivstar.ua") + expect { subject.domain_id }.to raise_error(Whois::AttributeNotSupported) + expect(subject.status).to eq(:registered) + expect(subject.available?).to eq(false) + expect(subject.registered?).to eq(true) + expect(subject.created_on).to be_a(Time) + expect(subject.created_on).to eq(DateTime.parse("2002-09-03 00:00:00")) + expect(subject.updated_on).to be_a(Time) + expect(subject.updated_on).to eq(DateTime.parse("2012-07-30 16:42:30")) + expect(subject.expires_on).to be_a(Time) + expect(subject.expires_on).to eq(DateTime.parse("2014-09-03 12:18:52")) + expect { subject.registrar }.to raise_error(Whois::AttributeNotSupported) + expect(subject.registrant_contacts).to be_a(Array) + expect(subject.registrant_contacts.size).to eq(0) + expect(subject.admin_contacts).to be_a(Array) + expect(subject.admin_contacts.size).to eq(1) + expect(subject.admin_contacts[0]).to be_a(Whois::Parser::Contact) + expect(subject.admin_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_ADMINISTRATIVE) + expect(subject.admin_contacts[0].id).to eq("KG780-UANIC") + expect(subject.admin_contacts[0].name).to eq(nil) + expect(subject.admin_contacts[0].organization).to eq("Kyivstar GSM") + expect(subject.admin_contacts[0].address).to eq("Chervonozoryanyi Av., 51") + expect(subject.admin_contacts[0].city).to eq("KYIV") + expect(subject.admin_contacts[0].zip).to eq("03110") + expect(subject.admin_contacts[0].state).to eq(nil) + expect(subject.admin_contacts[0].country).to eq("UA") + expect(subject.admin_contacts[0].country_code).to eq(nil) + expect(subject.admin_contacts[0].phone).to eq("+380 (67) 2372213") + expect(subject.admin_contacts[0].fax).to eq("+380 (44) 2473954") + expect(subject.admin_contacts[0].email).to eq("dnsmaster@kyivstar.net") + expect(subject.admin_contacts[0].created_on).to eq(nil) + expect(subject.admin_contacts[0].updated_on).to eq(DateTime.parse("2008-09-02 12:52:47")) + expect(subject.technical_contacts).to be_a(Array) + expect(subject.technical_contacts.size).to eq(2) + expect(subject.technical_contacts[0]).to be_a(Whois::Parser::Contact) + expect(subject.technical_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_TECHNICAL) + expect(subject.technical_contacts[0].id).to eq("KG780-UANIC") + expect(subject.technical_contacts[0].name).to eq(nil) + expect(subject.technical_contacts[0].organization).to eq("Kyivstar GSM") + expect(subject.technical_contacts[0].address).to eq("Chervonozoryanyi Av., 51") + expect(subject.technical_contacts[0].city).to eq("KYIV") + expect(subject.technical_contacts[0].zip).to eq("03110") + expect(subject.technical_contacts[0].state).to eq(nil) + expect(subject.technical_contacts[0].country).to eq("UA") + expect(subject.technical_contacts[0].country_code).to eq(nil) + expect(subject.technical_contacts[0].phone).to eq("+380 (67) 2372213") + expect(subject.technical_contacts[0].fax).to eq("+380 (44) 2473954") + expect(subject.technical_contacts[0].email).to eq("dnsmaster@kyivstar.net") + expect(subject.technical_contacts[0].created_on).to eq(nil) + expect(subject.technical_contacts[0].updated_on).to eq(DateTime.parse("2008-09-02 12:52:47")) + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers.size).to eq(2) + expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[0].name).to eq("ns2.elvisti.kiev.ua") + expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[1].name).to eq("ns.kyivstar.net") end end diff --git a/spec/whois/parsers/responses/whois.udag.net/status_available_spec.rb b/spec/whois/parsers/responses/whois.udag.net/status_available_spec.rb index 5e57b025..6267a432 100644 --- a/spec/whois/parsers/responses/whois.udag.net/status_available_spec.rb +++ b/spec/whois/parsers/responses/whois.udag.net/status_available_spec.rb @@ -11,83 +11,32 @@ # require 'spec_helper' -require 'whois/parsers/whois.udag.net.rb' -describe Whois::Parsers::WhoisUdagNet, "status_available.expected" do +describe "whois.udag.net", :aggregate_failures do subject do file = fixture("responses", "whois.udag.net/status_available.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.udag.net") + Whois::Parser.parser_for(part) end - describe "#domain" do - it do - expect(subject.domain).to eq("u34jedzcq.com") - end - end - describe "#domain_id" do - it do - expect(subject.domain_id).to eq(nil) - end - end - describe "#status" do - it do - expect(subject.status).to eq(:available) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(true) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(false) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to eq(nil) - end - end - describe "#updated_on" do - it do - expect(subject.updated_on).to eq(nil) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to eq(nil) - end - end - describe "#registrar" do - it do - expect(subject.registrar).to eq(nil) - end - end - describe "#registrant_contacts" do - it do - expect(subject.registrant_contacts).to be_a(Array) - expect(subject.registrant_contacts).to eq([]) - end - end - describe "#admin_contacts" do - it do - expect(subject.admin_contacts).to be_a(Array) - expect(subject.admin_contacts).to eq([]) - end - end - describe "#technical_contacts" do - it do - expect(subject.technical_contacts).to be_a(Array) - expect(subject.technical_contacts).to eq([]) - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers).to eq([]) - end + it "matches status_available.expected" do + expect(subject.domain).to eq("u34jedzcq.com") + expect(subject.domain_id).to eq(nil) + expect(subject.status).to eq(:available) + expect(subject.available?).to eq(true) + expect(subject.registered?).to eq(false) + expect(subject.created_on).to eq(nil) + expect(subject.updated_on).to eq(nil) + expect(subject.expires_on).to eq(nil) + expect(subject.registrar).to eq(nil) + expect(subject.registrant_contacts).to be_a(Array) + expect(subject.registrant_contacts).to eq([]) + expect(subject.admin_contacts).to be_a(Array) + expect(subject.admin_contacts).to eq([]) + expect(subject.technical_contacts).to be_a(Array) + expect(subject.technical_contacts).to eq([]) + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers).to eq([]) end end diff --git a/spec/whois/parsers/responses/whois.udag.net/status_registered_spec.rb b/spec/whois/parsers/responses/whois.udag.net/status_registered_spec.rb index 75459ed7..954e4b01 100644 --- a/spec/whois/parsers/responses/whois.udag.net/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.udag.net/status_registered_spec.rb @@ -11,143 +11,92 @@ # require 'spec_helper' -require 'whois/parsers/whois.udag.net.rb' -describe Whois::Parsers::WhoisUdagNet, "status_registered.expected" do +describe "whois.udag.net", :aggregate_failures do subject do file = fixture("responses", "whois.udag.net/status_registered.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.udag.net") + Whois::Parser.parser_for(part) end - describe "#domain" do - it do - expect(subject.domain).to eq("udag.net") - end - end - describe "#domain_id" do - it do - expect(subject.domain_id).to eq("59973274_DOMAIN_NET-VRSN") - end - end - describe "#status" do - it do - expect(subject.status).to eq(:registered) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(false) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(true) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to be_a(Time) - expect(subject.created_on).to eq(DateTime.parse("2001-02-11T20:15:57Z")) - end - end - describe "#updated_on" do - it do - expect(subject.updated_on).to be_a(Time) - expect(subject.updated_on).to eq(DateTime.parse("2013-02-12T08:40:19Z")) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to be_a(Time) - expect(subject.expires_on).to eq(DateTime.parse("2014-02-11T20:15:57Z")) - end - end - describe "#registrar" do - it do - expect(subject.registrar).to be_a(Whois::Parser::Registrar) - expect(subject.registrar.id).to eq("1408") - expect(subject.registrar.name).to eq("united domains AG") - expect(subject.registrar.url).to eq("http://www.united-domains.de/") - end - end - describe "#registrant_contacts" do - it do - expect(subject.registrant_contacts).to be_a(Array) - expect(subject.registrant_contacts.size).to eq(1) - expect(subject.registrant_contacts[0]).to be_a(Whois::Parser::Contact) - expect(subject.registrant_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_REGISTRANT) - expect(subject.registrant_contacts[0].id).to eq(nil) - expect(subject.registrant_contacts[0].name).to eq("Host Master") - expect(subject.registrant_contacts[0].organization).to eq("united-domains AG") - expect(subject.registrant_contacts[0].address).to eq("Gautinger Str. 10") - expect(subject.registrant_contacts[0].city).to eq("Starnberg") - expect(subject.registrant_contacts[0].zip).to eq("82319") - expect(subject.registrant_contacts[0].state).to eq("Bayern") - expect(subject.registrant_contacts[0].country).to eq(nil) - expect(subject.registrant_contacts[0].country_code).to eq("DE") - expect(subject.registrant_contacts[0].phone).to eq("+49.8151368670") - expect(subject.registrant_contacts[0].fax).to eq("+49.81513686777") - expect(subject.registrant_contacts[0].email).to eq("hostmaster@united-domains.de") - expect(subject.registrant_contacts[0].created_on).to eq(nil) - expect(subject.registrant_contacts[0].updated_on).to eq(nil) - end - end - describe "#admin_contacts" do - it do - expect(subject.admin_contacts).to be_a(Array) - expect(subject.admin_contacts.size).to eq(1) - expect(subject.admin_contacts[0]).to be_a(Whois::Parser::Contact) - expect(subject.admin_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_ADMINISTRATIVE) - expect(subject.admin_contacts[0].id).to eq(nil) - expect(subject.admin_contacts[0].name).to eq("Hostmaster Hostmaster") - expect(subject.admin_contacts[0].organization).to eq("united-domains AG") - expect(subject.admin_contacts[0].address).to eq("Gautinger Strasse 10") - expect(subject.admin_contacts[0].city).to eq("Starnberg") - expect(subject.admin_contacts[0].zip).to eq("82319") - expect(subject.admin_contacts[0].state).to eq("DE") - expect(subject.admin_contacts[0].country).to eq(nil) - expect(subject.admin_contacts[0].country_code).to eq("DE") - expect(subject.admin_contacts[0].phone).to eq("+49.8151368670") - expect(subject.admin_contacts[0].fax).to eq("+49.81513686777") - expect(subject.admin_contacts[0].email).to eq("hostmaster@united-domains.de") - expect(subject.admin_contacts[0].created_on).to eq(nil) - expect(subject.admin_contacts[0].updated_on).to eq(nil) - end - end - describe "#technical_contacts" do - it do - expect(subject.technical_contacts).to be_a(Array) - expect(subject.technical_contacts.size).to eq(1) - expect(subject.technical_contacts[0]).to be_a(Whois::Parser::Contact) - expect(subject.technical_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_TECHNICAL) - expect(subject.technical_contacts[0].id).to eq(nil) - expect(subject.technical_contacts[0].name).to eq("Host Master") - expect(subject.technical_contacts[0].organization).to eq("united-domains AG") - expect(subject.technical_contacts[0].address).to eq("Gautinger Str. 10") - expect(subject.technical_contacts[0].city).to eq("Starnberg") - expect(subject.technical_contacts[0].zip).to eq("82319") - expect(subject.technical_contacts[0].state).to eq("Bayern") - expect(subject.technical_contacts[0].country).to eq(nil) - expect(subject.technical_contacts[0].country_code).to eq("DE") - expect(subject.technical_contacts[0].phone).to eq("+49.8151368670") - expect(subject.technical_contacts[0].fax).to eq("+49.81513686777") - expect(subject.technical_contacts[0].email).to eq("hostmaster@united-domains.de") - expect(subject.technical_contacts[0].created_on).to eq(nil) - expect(subject.technical_contacts[0].updated_on).to eq(nil) - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers.size).to eq(3) - expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[0].name).to eq("ns1.udagdns.com") - expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[1].name).to eq("ns2.udagdns.com") - expect(subject.nameservers[2]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[2].name).to eq("ns3.udagdns.com") - end + it "matches status_registered.expected" do + expect(subject.domain).to eq("udag.net") + expect(subject.domain_id).to eq("59973274_DOMAIN_NET-VRSN") + expect(subject.status).to eq(:registered) + expect(subject.available?).to eq(false) + expect(subject.registered?).to eq(true) + expect(subject.created_on).to be_a(Time) + expect(subject.created_on).to eq(DateTime.parse("2001-02-11T20:15:57Z")) + expect(subject.updated_on).to be_a(Time) + expect(subject.updated_on).to eq(DateTime.parse("2013-02-12T08:40:19Z")) + expect(subject.expires_on).to be_a(Time) + expect(subject.expires_on).to eq(DateTime.parse("2014-02-11T20:15:57Z")) + expect(subject.registrar).to be_a(Whois::Parser::Registrar) + expect(subject.registrar.id).to eq("1408") + expect(subject.registrar.name).to eq("united domains AG") + expect(subject.registrar.url).to eq("http://www.united-domains.de/") + expect(subject.registrant_contacts).to be_a(Array) + expect(subject.registrant_contacts.size).to eq(1) + expect(subject.registrant_contacts[0]).to be_a(Whois::Parser::Contact) + expect(subject.registrant_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_REGISTRANT) + expect(subject.registrant_contacts[0].id).to eq(nil) + expect(subject.registrant_contacts[0].name).to eq("Host Master") + expect(subject.registrant_contacts[0].organization).to eq("united-domains AG") + expect(subject.registrant_contacts[0].address).to eq("Gautinger Str. 10") + expect(subject.registrant_contacts[0].city).to eq("Starnberg") + expect(subject.registrant_contacts[0].zip).to eq("82319") + expect(subject.registrant_contacts[0].state).to eq("Bayern") + expect(subject.registrant_contacts[0].country).to eq(nil) + expect(subject.registrant_contacts[0].country_code).to eq("DE") + expect(subject.registrant_contacts[0].phone).to eq("+49.8151368670") + expect(subject.registrant_contacts[0].fax).to eq("+49.81513686777") + expect(subject.registrant_contacts[0].email).to eq("hostmaster@united-domains.de") + expect(subject.registrant_contacts[0].created_on).to eq(nil) + expect(subject.registrant_contacts[0].updated_on).to eq(nil) + expect(subject.admin_contacts).to be_a(Array) + expect(subject.admin_contacts.size).to eq(1) + expect(subject.admin_contacts[0]).to be_a(Whois::Parser::Contact) + expect(subject.admin_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_ADMINISTRATIVE) + expect(subject.admin_contacts[0].id).to eq(nil) + expect(subject.admin_contacts[0].name).to eq("Hostmaster Hostmaster") + expect(subject.admin_contacts[0].organization).to eq("united-domains AG") + expect(subject.admin_contacts[0].address).to eq("Gautinger Strasse 10") + expect(subject.admin_contacts[0].city).to eq("Starnberg") + expect(subject.admin_contacts[0].zip).to eq("82319") + expect(subject.admin_contacts[0].state).to eq("DE") + expect(subject.admin_contacts[0].country).to eq(nil) + expect(subject.admin_contacts[0].country_code).to eq("DE") + expect(subject.admin_contacts[0].phone).to eq("+49.8151368670") + expect(subject.admin_contacts[0].fax).to eq("+49.81513686777") + expect(subject.admin_contacts[0].email).to eq("hostmaster@united-domains.de") + expect(subject.admin_contacts[0].created_on).to eq(nil) + expect(subject.admin_contacts[0].updated_on).to eq(nil) + expect(subject.technical_contacts).to be_a(Array) + expect(subject.technical_contacts.size).to eq(1) + expect(subject.technical_contacts[0]).to be_a(Whois::Parser::Contact) + expect(subject.technical_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_TECHNICAL) + expect(subject.technical_contacts[0].id).to eq(nil) + expect(subject.technical_contacts[0].name).to eq("Host Master") + expect(subject.technical_contacts[0].organization).to eq("united-domains AG") + expect(subject.technical_contacts[0].address).to eq("Gautinger Str. 10") + expect(subject.technical_contacts[0].city).to eq("Starnberg") + expect(subject.technical_contacts[0].zip).to eq("82319") + expect(subject.technical_contacts[0].state).to eq("Bayern") + expect(subject.technical_contacts[0].country).to eq(nil) + expect(subject.technical_contacts[0].country_code).to eq("DE") + expect(subject.technical_contacts[0].phone).to eq("+49.8151368670") + expect(subject.technical_contacts[0].fax).to eq("+49.81513686777") + expect(subject.technical_contacts[0].email).to eq("hostmaster@united-domains.de") + expect(subject.technical_contacts[0].created_on).to eq(nil) + expect(subject.technical_contacts[0].updated_on).to eq(nil) + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers.size).to eq(3) + expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[0].name).to eq("ns1.udagdns.com") + expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[1].name).to eq("ns2.udagdns.com") + expect(subject.nameservers[2]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[2].name).to eq("ns3.udagdns.com") end end diff --git a/spec/whois/parsers/responses/whois.uniregistry.net/tattoo/status_available_spec.rb b/spec/whois/parsers/responses/whois.uniregistry.net/tattoo/status_available_spec.rb index b8d6a644..40bbdda1 100644 --- a/spec/whois/parsers/responses/whois.uniregistry.net/tattoo/status_available_spec.rb +++ b/spec/whois/parsers/responses/whois.uniregistry.net/tattoo/status_available_spec.rb @@ -11,83 +11,32 @@ # require 'spec_helper' -require 'whois/parsers/whois.uniregistry.net.rb' -describe Whois::Parsers::WhoisUniregistryNet, "status_available.expected" do +describe "whois.uniregistry.net", :aggregate_failures do subject do file = fixture("responses", "whois.uniregistry.net/tattoo/status_available.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.uniregistry.net") + Whois::Parser.parser_for(part) end - describe "#domain" do - it do - expect(subject.domain).to eq(nil) - end - end - describe "#domain_id" do - it do - expect(subject.domain_id).to eq(nil) - end - end - describe "#status" do - it do - expect(subject.status).to eq(:available) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(true) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(false) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to eq(nil) - end - end - describe "#updated_on" do - it do - expect(subject.updated_on).to eq(nil) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to eq(nil) - end - end - describe "#registrar" do - it do - expect(subject.registrar).to eq(nil) - end - end - describe "#registrant_contacts" do - it do - expect(subject.registrant_contacts).to be_a(Array) - expect(subject.registrant_contacts).to eq([]) - end - end - describe "#admin_contacts" do - it do - expect(subject.admin_contacts).to be_a(Array) - expect(subject.admin_contacts).to eq([]) - end - end - describe "#technical_contacts" do - it do - expect(subject.technical_contacts).to be_a(Array) - expect(subject.technical_contacts).to eq([]) - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers).to eq([]) - end + it "matches status_available.expected" do + expect(subject.domain).to eq(nil) + expect(subject.domain_id).to eq(nil) + expect(subject.status).to eq(:available) + expect(subject.available?).to eq(true) + expect(subject.registered?).to eq(false) + expect(subject.created_on).to eq(nil) + expect(subject.updated_on).to eq(nil) + expect(subject.expires_on).to eq(nil) + expect(subject.registrar).to eq(nil) + expect(subject.registrant_contacts).to be_a(Array) + expect(subject.registrant_contacts).to eq([]) + expect(subject.admin_contacts).to be_a(Array) + expect(subject.admin_contacts).to eq([]) + expect(subject.technical_contacts).to be_a(Array) + expect(subject.technical_contacts).to eq([]) + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers).to eq([]) end end diff --git a/spec/whois/parsers/responses/whois.uniregistry.net/tattoo/status_registered_spec.rb b/spec/whois/parsers/responses/whois.uniregistry.net/tattoo/status_registered_spec.rb index 7d004f15..35296d12 100644 --- a/spec/whois/parsers/responses/whois.uniregistry.net/tattoo/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.uniregistry.net/tattoo/status_registered_spec.rb @@ -11,153 +11,102 @@ # require 'spec_helper' -require 'whois/parsers/whois.uniregistry.net.rb' -describe Whois::Parsers::WhoisUniregistryNet, "status_registered.expected" do +describe "whois.uniregistry.net", :aggregate_failures do subject do file = fixture("responses", "whois.uniregistry.net/tattoo/status_registered.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.uniregistry.net") + Whois::Parser.parser_for(part) end - describe "#domain" do - it do - expect(subject.domain).to eq("nic.tattoo") - end - end - describe "#domain_id" do - it do - expect(subject.domain_id).to eq("DO_4810ec9890fdf872f2e23b58df485dc4-ISC") - end - end - describe "#status" do - it do - expect(subject.status).to eq(:registered) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(false) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(true) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to be_a(Time) - expect(subject.created_on).to eq(DateTime.parse("2013-09-16 14:21:26 UTC")) - end - end - describe "#updated_on" do - it do - expect(subject.updated_on).to be_a(Time) - expect(subject.updated_on).to eq(DateTime.parse("2013-11-09 02:51:24 UTC")) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to be_a(Time) - expect(subject.expires_on).to eq(DateTime.parse("2023-09-16 14:21:26 UTC")) - end - end - describe "#registrar" do - it do - expect(subject.registrar).to be_a(Whois::Parser::Registrar) - expect(subject.registrar.id).to eq("9999") - expect(subject.registrar.name).to eq("Uniregistry, Corp.") - expect(subject.registrar.url).to eq(nil) - end - end - describe "#registrant_contacts" do - it do - expect(subject.registrant_contacts).to be_a(Array) - expect(subject.registrant_contacts.size).to eq(1) - expect(subject.registrant_contacts[0]).to be_a(Whois::Parser::Contact) - expect(subject.registrant_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_REGISTRANT) - expect(subject.registrant_contacts[0].id).to eq("uniregistry") - expect(subject.registrant_contacts[0].name).to eq("Uniregistry Registry Internal Resources") - expect(subject.registrant_contacts[0].organization).to eq("Uniregistry, Corp") - expect(subject.registrant_contacts[0].address).to eq("PO Box 1361") - expect(subject.registrant_contacts[0].city).to eq("Grand Cayman") - expect(subject.registrant_contacts[0].zip).to eq("KY1-1108") - expect(subject.registrant_contacts[0].state).to eq("George Town") - expect(subject.registrant_contacts[0].country).to eq(nil) - expect(subject.registrant_contacts[0].country_code).to eq("KY") - expect(subject.registrant_contacts[0].phone).to eq("+1.3457496263") - expect(subject.registrant_contacts[0].fax).to eq("+1.3457496263") - expect(subject.registrant_contacts[0].email).to eq("info+whois@uniregistry.com") - expect(subject.registrant_contacts[0].created_on).to eq(nil) - expect(subject.registrant_contacts[0].updated_on).to eq(nil) - end - end - describe "#admin_contacts" do - it do - expect(subject.admin_contacts).to be_a(Array) - expect(subject.admin_contacts.size).to eq(1) - expect(subject.admin_contacts[0]).to be_a(Whois::Parser::Contact) - expect(subject.admin_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_ADMINISTRATIVE) - expect(subject.admin_contacts[0].id).to eq("tattoo-admin") - expect(subject.admin_contacts[0].name).to eq("Uniregistry admin contact") - expect(subject.admin_contacts[0].organization).to eq("Uniregistry, Corp") - expect(subject.admin_contacts[0].address).to eq("PO Box 1361") - expect(subject.admin_contacts[0].city).to eq("Grand Cayman") - expect(subject.admin_contacts[0].zip).to eq("KY1-1108") - expect(subject.admin_contacts[0].state).to eq("George Town") - expect(subject.admin_contacts[0].country).to eq(nil) - expect(subject.admin_contacts[0].country_code).to eq("KY") - expect(subject.admin_contacts[0].phone).to eq("+1.3457496263") - expect(subject.admin_contacts[0].fax).to eq("+1.3457496263") - expect(subject.admin_contacts[0].email).to eq("admin@nic.tattoo") - expect(subject.admin_contacts[0].created_on).to eq(nil) - expect(subject.admin_contacts[0].updated_on).to eq(nil) - end - end - describe "#technical_contacts" do - it do - expect(subject.technical_contacts).to be_a(Array) - expect(subject.technical_contacts.size).to eq(1) - expect(subject.technical_contacts[0]).to be_a(Whois::Parser::Contact) - expect(subject.technical_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_TECHNICAL) - expect(subject.technical_contacts[0].id).to eq("tattoo-tech") - expect(subject.technical_contacts[0].name).to eq("Uniregistry tech contact") - expect(subject.technical_contacts[0].organization).to eq("Uniregistry, Corp") - expect(subject.technical_contacts[0].address).to eq("PO Box 1361") - expect(subject.technical_contacts[0].city).to eq("Grand Cayman") - expect(subject.technical_contacts[0].zip).to eq("KY1-1108") - expect(subject.technical_contacts[0].state).to eq("George Town") - expect(subject.technical_contacts[0].country).to eq(nil) - expect(subject.technical_contacts[0].country_code).to eq("KY") - expect(subject.technical_contacts[0].phone).to eq("+1.3457496263") - expect(subject.technical_contacts[0].fax).to eq("+1.3457496263") - expect(subject.technical_contacts[0].email).to eq("tech@nic.tattoo") - expect(subject.technical_contacts[0].created_on).to eq(nil) - expect(subject.technical_contacts[0].updated_on).to eq(nil) - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers.size).to eq(4) - expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[0].name).to eq("a.ns.uniregistry.net") - expect(subject.nameservers[0].ipv4).to eq(nil) - expect(subject.nameservers[0].ipv6).to eq(nil) - expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[1].name).to eq("tld.isc-sns.info") - expect(subject.nameservers[1].ipv4).to eq(nil) - expect(subject.nameservers[1].ipv6).to eq(nil) - expect(subject.nameservers[2]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[2].name).to eq("tld.isc-sns.com") - expect(subject.nameservers[2].ipv4).to eq(nil) - expect(subject.nameservers[2].ipv6).to eq(nil) - expect(subject.nameservers[3]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[3].name).to eq("tld.isc-sns.net") - expect(subject.nameservers[3].ipv4).to eq(nil) - expect(subject.nameservers[3].ipv6).to eq(nil) - end + it "matches status_registered.expected" do + expect(subject.domain).to eq("nic.tattoo") + expect(subject.domain_id).to eq("DO_4810ec9890fdf872f2e23b58df485dc4-ISC") + expect(subject.status).to eq(:registered) + expect(subject.available?).to eq(false) + expect(subject.registered?).to eq(true) + expect(subject.created_on).to be_a(Time) + expect(subject.created_on).to eq(DateTime.parse("2013-09-16 14:21:26 UTC")) + expect(subject.updated_on).to be_a(Time) + expect(subject.updated_on).to eq(DateTime.parse("2013-11-09 02:51:24 UTC")) + expect(subject.expires_on).to be_a(Time) + expect(subject.expires_on).to eq(DateTime.parse("2023-09-16 14:21:26 UTC")) + expect(subject.registrar).to be_a(Whois::Parser::Registrar) + expect(subject.registrar.id).to eq("9999") + expect(subject.registrar.name).to eq("Uniregistry, Corp.") + expect(subject.registrar.url).to eq(nil) + expect(subject.registrant_contacts).to be_a(Array) + expect(subject.registrant_contacts.size).to eq(1) + expect(subject.registrant_contacts[0]).to be_a(Whois::Parser::Contact) + expect(subject.registrant_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_REGISTRANT) + expect(subject.registrant_contacts[0].id).to eq("uniregistry") + expect(subject.registrant_contacts[0].name).to eq("Uniregistry Registry Internal Resources") + expect(subject.registrant_contacts[0].organization).to eq("Uniregistry, Corp") + expect(subject.registrant_contacts[0].address).to eq("PO Box 1361") + expect(subject.registrant_contacts[0].city).to eq("Grand Cayman") + expect(subject.registrant_contacts[0].zip).to eq("KY1-1108") + expect(subject.registrant_contacts[0].state).to eq("George Town") + expect(subject.registrant_contacts[0].country).to eq(nil) + expect(subject.registrant_contacts[0].country_code).to eq("KY") + expect(subject.registrant_contacts[0].phone).to eq("+1.3457496263") + expect(subject.registrant_contacts[0].fax).to eq("+1.3457496263") + expect(subject.registrant_contacts[0].email).to eq("info+whois@uniregistry.com") + expect(subject.registrant_contacts[0].created_on).to eq(nil) + expect(subject.registrant_contacts[0].updated_on).to eq(nil) + expect(subject.admin_contacts).to be_a(Array) + expect(subject.admin_contacts.size).to eq(1) + expect(subject.admin_contacts[0]).to be_a(Whois::Parser::Contact) + expect(subject.admin_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_ADMINISTRATIVE) + expect(subject.admin_contacts[0].id).to eq("tattoo-admin") + expect(subject.admin_contacts[0].name).to eq("Uniregistry admin contact") + expect(subject.admin_contacts[0].organization).to eq("Uniregistry, Corp") + expect(subject.admin_contacts[0].address).to eq("PO Box 1361") + expect(subject.admin_contacts[0].city).to eq("Grand Cayman") + expect(subject.admin_contacts[0].zip).to eq("KY1-1108") + expect(subject.admin_contacts[0].state).to eq("George Town") + expect(subject.admin_contacts[0].country).to eq(nil) + expect(subject.admin_contacts[0].country_code).to eq("KY") + expect(subject.admin_contacts[0].phone).to eq("+1.3457496263") + expect(subject.admin_contacts[0].fax).to eq("+1.3457496263") + expect(subject.admin_contacts[0].email).to eq("admin@nic.tattoo") + expect(subject.admin_contacts[0].created_on).to eq(nil) + expect(subject.admin_contacts[0].updated_on).to eq(nil) + expect(subject.technical_contacts).to be_a(Array) + expect(subject.technical_contacts.size).to eq(1) + expect(subject.technical_contacts[0]).to be_a(Whois::Parser::Contact) + expect(subject.technical_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_TECHNICAL) + expect(subject.technical_contacts[0].id).to eq("tattoo-tech") + expect(subject.technical_contacts[0].name).to eq("Uniregistry tech contact") + expect(subject.technical_contacts[0].organization).to eq("Uniregistry, Corp") + expect(subject.technical_contacts[0].address).to eq("PO Box 1361") + expect(subject.technical_contacts[0].city).to eq("Grand Cayman") + expect(subject.technical_contacts[0].zip).to eq("KY1-1108") + expect(subject.technical_contacts[0].state).to eq("George Town") + expect(subject.technical_contacts[0].country).to eq(nil) + expect(subject.technical_contacts[0].country_code).to eq("KY") + expect(subject.technical_contacts[0].phone).to eq("+1.3457496263") + expect(subject.technical_contacts[0].fax).to eq("+1.3457496263") + expect(subject.technical_contacts[0].email).to eq("tech@nic.tattoo") + expect(subject.technical_contacts[0].created_on).to eq(nil) + expect(subject.technical_contacts[0].updated_on).to eq(nil) + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers.size).to eq(4) + expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[0].name).to eq("a.ns.uniregistry.net") + expect(subject.nameservers[0].ipv4).to eq(nil) + expect(subject.nameservers[0].ipv6).to eq(nil) + expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[1].name).to eq("tld.isc-sns.info") + expect(subject.nameservers[1].ipv4).to eq(nil) + expect(subject.nameservers[1].ipv6).to eq(nil) + expect(subject.nameservers[2]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[2].name).to eq("tld.isc-sns.com") + expect(subject.nameservers[2].ipv4).to eq(nil) + expect(subject.nameservers[2].ipv6).to eq(nil) + expect(subject.nameservers[3]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[3].name).to eq("tld.isc-sns.net") + expect(subject.nameservers[3].ipv4).to eq(nil) + expect(subject.nameservers[3].ipv6).to eq(nil) end end diff --git a/spec/whois/parsers/responses/whois.usp.ac.fj/fj/status_available_spec.rb b/spec/whois/parsers/responses/whois.usp.ac.fj/fj/status_available_spec.rb index 1434213e..dee2d1e2 100644 --- a/spec/whois/parsers/responses/whois.usp.ac.fj/fj/status_available_spec.rb +++ b/spec/whois/parsers/responses/whois.usp.ac.fj/fj/status_available_spec.rb @@ -11,50 +11,23 @@ # require 'spec_helper' -require 'whois/parsers/whois.usp.ac.fj.rb' -describe Whois::Parsers::WhoisUspAcFj, "status_available.expected" do +describe "whois.usp.ac.fj", :aggregate_failures do subject do file = fixture("responses", "whois.usp.ac.fj/fj/status_available.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.usp.ac.fj") + Whois::Parser.parser_for(part) end - describe "#status" do - it do - expect(subject.status).to eq(:available) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(true) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(false) - end - end - describe "#created_on" do - it do - expect { subject.created_on }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#updated_on" do - it do - expect { subject.updated_on }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to eq(nil) - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers).to eq([]) - end + it "matches status_available.expected" do + expect(subject.status).to eq(:available) + expect(subject.available?).to eq(true) + expect(subject.registered?).to eq(false) + expect { subject.created_on }.to raise_error(Whois::AttributeNotSupported) + expect { subject.updated_on }.to raise_error(Whois::AttributeNotSupported) + expect(subject.expires_on).to eq(nil) + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers).to eq([]) end end diff --git a/spec/whois/parsers/responses/whois.usp.ac.fj/fj/status_registered_spec.rb b/spec/whois/parsers/responses/whois.usp.ac.fj/fj/status_registered_spec.rb index fbabab39..7a913a16 100644 --- a/spec/whois/parsers/responses/whois.usp.ac.fj/fj/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.usp.ac.fj/fj/status_registered_spec.rb @@ -11,59 +11,32 @@ # require 'spec_helper' -require 'whois/parsers/whois.usp.ac.fj.rb' -describe Whois::Parsers::WhoisUspAcFj, "status_registered.expected" do +describe "whois.usp.ac.fj", :aggregate_failures do subject do file = fixture("responses", "whois.usp.ac.fj/fj/status_registered.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.usp.ac.fj") + Whois::Parser.parser_for(part) end - describe "#status" do - it do - expect(subject.status).to eq(:registered) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(false) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(true) - end - end - describe "#created_on" do - it do - expect { subject.created_on }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#updated_on" do - it do - expect { subject.updated_on }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to be_a(Time) - expect(subject.expires_on).to eq(DateTime.parse("2014-04-28")) - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers.size).to eq(2) - expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[0].name).to eq("ns1.google.com") - expect(subject.nameservers[0].ipv4).to eq("216.239.32.10") - expect(subject.nameservers[0].ipv6).to eq(nil) - expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[1].name).to eq("ns2.google.com") - expect(subject.nameservers[1].ipv4).to eq("216.239.34.10") - expect(subject.nameservers[1].ipv6).to eq(nil) - end + it "matches status_registered.expected" do + expect(subject.status).to eq(:registered) + expect(subject.available?).to eq(false) + expect(subject.registered?).to eq(true) + expect { subject.created_on }.to raise_error(Whois::AttributeNotSupported) + expect { subject.updated_on }.to raise_error(Whois::AttributeNotSupported) + expect(subject.expires_on).to be_a(Time) + expect(subject.expires_on).to eq(DateTime.parse("2014-04-28")) + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers.size).to eq(2) + expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[0].name).to eq("ns1.google.com") + expect(subject.nameservers[0].ipv4).to eq("216.239.32.10") + expect(subject.nameservers[0].ipv6).to eq(nil) + expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[1].name).to eq("ns2.google.com") + expect(subject.nameservers[1].ipv4).to eq("216.239.34.10") + expect(subject.nameservers[1].ipv6).to eq(nil) end end diff --git a/spec/whois/parsers/responses/whois.verisign-grs.com/com/property_nameserver_no_nameserver_spec.rb b/spec/whois/parsers/responses/whois.verisign-grs.com/com/property_nameserver_no_nameserver_spec.rb index 8ba53a87..7393a377 100644 --- a/spec/whois/parsers/responses/whois.verisign-grs.com/com/property_nameserver_no_nameserver_spec.rb +++ b/spec/whois/parsers/responses/whois.verisign-grs.com/com/property_nameserver_no_nameserver_spec.rb @@ -11,20 +11,17 @@ # require 'spec_helper' -require 'whois/parsers/whois.verisign-grs.com.rb' -describe Whois::Parsers::WhoisVerisignGrsCom, "property_nameserver_no_nameserver.expected" do +describe "whois.verisign-grs.com", :aggregate_failures do subject do file = fixture("responses", "whois.verisign-grs.com/com/property_nameserver_no_nameserver.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.verisign-grs.com") + Whois::Parser.parser_for(part) end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers).to eq([]) - end + it "matches property_nameserver_no_nameserver.expected" do + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers).to eq([]) end end diff --git a/spec/whois/parsers/responses/whois.verisign-grs.com/com/status_available_spec.rb b/spec/whois/parsers/responses/whois.verisign-grs.com/com/status_available_spec.rb index 36702259..49ed0b8a 100644 --- a/spec/whois/parsers/responses/whois.verisign-grs.com/com/status_available_spec.rb +++ b/spec/whois/parsers/responses/whois.verisign-grs.com/com/status_available_spec.rb @@ -11,80 +11,29 @@ # require 'spec_helper' -require 'whois/parsers/whois.verisign-grs.com.rb' -describe Whois::Parsers::WhoisVerisignGrsCom, "status_available.expected" do +describe "whois.verisign-grs.com", :aggregate_failures do subject do file = fixture("responses", "whois.verisign-grs.com/com/status_available.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.verisign-grs.com") + Whois::Parser.parser_for(part) end - describe "#disclaimer" do - it do - expect(subject.disclaimer).to eq("TERMS OF USE: You are not authorized to access or query our Whois database through the use of electronic processes that are high-volume and automated except as reasonably necessary to register domain names or modify existing registrations; the Data in VeriSign Global Registry Services' (\"VeriSign\") Whois database is provided by VeriSign for information purposes only, and to assist persons in obtaining information about or related to a domain name registration record. VeriSign does not guarantee its accuracy. By submitting a Whois query, you agree to abide by the following terms of use: You agree that you may use this Data only for lawful purposes and that under no circumstances will you use this Data to: (1) allow, enable, or otherwise support the transmission of mass unsolicited, commercial advertising or solicitations via e-mail, telephone, or facsimile; or (2) enable high volume, automated, electronic processes that apply to VeriSign (or its computer systems). The compilation, repackaging, dissemination or other use of this Data is expressly prohibited without the prior written consent of VeriSign. You agree not to use electronic processes that are automated and high-volume to access or query the Whois database except as reasonably necessary to register domain names or modify existing registrations. VeriSign reserves the right to restrict your access to the Whois database in its sole discretion to ensure operational stability. VeriSign may restrict or terminate your access to the Whois database for failure to abide by these terms of use. VeriSign reserves the right to modify these terms at any time.") - end - end - describe "#domain" do - it do - expect(subject.domain).to eq("u34jedzcq.com") - end - end - describe "#domain_id" do - it do - expect(subject.domain_id).to eq(nil) - end - end - describe "#status" do - it do - expect(subject.status).to eq(:available) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(true) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(false) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to eq(nil) - end - end - describe "#updated_on" do - it do - expect(subject.updated_on).to eq(nil) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to eq(nil) - end - end - describe "#registrar" do - it do - expect(subject.registrar).to eq(nil) - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers).to eq([]) - end - end - describe "#referral_whois" do - it do - expect(subject.referral_whois).to eq(nil) - end - end - describe "#referral_url" do - it do - expect(subject.referral_url).to eq(nil) - end + it "matches status_available.expected" do + expect(subject.disclaimer).to eq("TERMS OF USE: You are not authorized to access or query our Whois database through the use of electronic processes that are high-volume and automated except as reasonably necessary to register domain names or modify existing registrations; the Data in VeriSign Global Registry Services' (\"VeriSign\") Whois database is provided by VeriSign for information purposes only, and to assist persons in obtaining information about or related to a domain name registration record. VeriSign does not guarantee its accuracy. By submitting a Whois query, you agree to abide by the following terms of use: You agree that you may use this Data only for lawful purposes and that under no circumstances will you use this Data to: (1) allow, enable, or otherwise support the transmission of mass unsolicited, commercial advertising or solicitations via e-mail, telephone, or facsimile; or (2) enable high volume, automated, electronic processes that apply to VeriSign (or its computer systems). The compilation, repackaging, dissemination or other use of this Data is expressly prohibited without the prior written consent of VeriSign. You agree not to use electronic processes that are automated and high-volume to access or query the Whois database except as reasonably necessary to register domain names or modify existing registrations. VeriSign reserves the right to restrict your access to the Whois database in its sole discretion to ensure operational stability. VeriSign may restrict or terminate your access to the Whois database for failure to abide by these terms of use. VeriSign reserves the right to modify these terms at any time.") + expect(subject.domain).to eq("u34jedzcq.com") + expect(subject.domain_id).to eq(nil) + expect(subject.status).to eq(:available) + expect(subject.available?).to eq(true) + expect(subject.registered?).to eq(false) + expect(subject.created_on).to eq(nil) + expect(subject.updated_on).to eq(nil) + expect(subject.expires_on).to eq(nil) + expect(subject.registrar).to eq(nil) + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers).to eq([]) + expect(subject.referral_whois).to eq(nil) + expect(subject.referral_url).to eq(nil) end end diff --git a/spec/whois/parsers/responses/whois.verisign-grs.com/com/status_registered_spec.rb b/spec/whois/parsers/responses/whois.verisign-grs.com/com/status_registered_spec.rb index 8d318a6a..752cecfa 100644 --- a/spec/whois/parsers/responses/whois.verisign-grs.com/com/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.verisign-grs.com/com/status_registered_spec.rb @@ -11,102 +11,51 @@ # require 'spec_helper' -require 'whois/parsers/whois.verisign-grs.com.rb' -describe Whois::Parsers::WhoisVerisignGrsCom, "status_registered.expected" do +describe "whois.verisign-grs.com", :aggregate_failures do subject do file = fixture("responses", "whois.verisign-grs.com/com/status_registered.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.verisign-grs.com") + Whois::Parser.parser_for(part) end - describe "#disclaimer" do - it do - expect(subject.disclaimer).to eq("TERMS OF USE: You are not authorized to access or query our Whois database through the use of electronic processes that are high-volume and automated except as reasonably necessary to register domain names or modify existing registrations; the Data in VeriSign Global Registry Services' (\"VeriSign\") Whois database is provided by VeriSign for information purposes only, and to assist persons in obtaining information about or related to a domain name registration record. VeriSign does not guarantee its accuracy. By submitting a Whois query, you agree to abide by the following terms of use: You agree that you may use this Data only for lawful purposes and that under no circumstances will you use this Data to: (1) allow, enable, or otherwise support the transmission of mass unsolicited, commercial advertising or solicitations via e-mail, telephone, or facsimile; or (2) enable high volume, automated, electronic processes that apply to VeriSign (or its computer systems). The compilation, repackaging, dissemination or other use of this Data is expressly prohibited without the prior written consent of VeriSign. You agree not to use electronic processes that are automated and high-volume to access or query the Whois database except as reasonably necessary to register domain names or modify existing registrations. VeriSign reserves the right to restrict your access to the Whois database in its sole discretion to ensure operational stability. VeriSign may restrict or terminate your access to the Whois database for failure to abide by these terms of use. VeriSign reserves the right to modify these terms at any time.") - end - end - describe "#domain" do - it do - expect(subject.domain).to eq("google.com") - end - end - describe "#domain_id" do - it do - expect(subject.domain_id).to eq("2138514_DOMAIN_COM-VRSN") - end - end - describe "#status" do - it do - expect(subject.status).to eq(:registered) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(false) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(true) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to be_a(Time) - expect(subject.created_on).to eq(DateTime.parse("1997-09-15 04:00:00 UTC")) - end - end - describe "#updated_on" do - it do - expect(subject.updated_on).to be_a(Time) - expect(subject.updated_on).to eq(DateTime.parse("2011-07-20 16:55:31 UTC")) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to be_a(Time) - expect(subject.expires_on).to eq(DateTime.parse("2020-09-14 04:00:00 UTC")) - end - end - describe "#registrar" do - it do - expect(subject.registrar).to be_a(Whois::Parser::Registrar) - expect(subject.registrar.id).to eq("292") - expect(subject.registrar.name).to eq("MarkMonitor Inc.") - expect(subject.registrar.url).to eq("http://www.markmonitor.com") - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers.size).to eq(4) - expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[0].name).to eq("ns1.google.com") - expect(subject.nameservers[0].ipv4).to eq(nil) - expect(subject.nameservers[0].ipv6).to eq(nil) - expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[1].name).to eq("ns2.google.com") - expect(subject.nameservers[1].ipv4).to eq(nil) - expect(subject.nameservers[1].ipv6).to eq(nil) - expect(subject.nameservers[2]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[2].name).to eq("ns3.google.com") - expect(subject.nameservers[2].ipv4).to eq(nil) - expect(subject.nameservers[2].ipv6).to eq(nil) - expect(subject.nameservers[3]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[3].name).to eq("ns4.google.com") - expect(subject.nameservers[3].ipv4).to eq(nil) - expect(subject.nameservers[3].ipv6).to eq(nil) - end - end - describe "#referral_whois" do - it do - expect(subject.referral_whois).to eq("whois.markmonitor.com") - end - end - describe "#referral_url" do - it do - expect(subject.referral_url).to eq("http://www.markmonitor.com") - end + it "matches status_registered.expected" do + expect(subject.disclaimer).to eq("TERMS OF USE: You are not authorized to access or query our Whois database through the use of electronic processes that are high-volume and automated except as reasonably necessary to register domain names or modify existing registrations; the Data in VeriSign Global Registry Services' (\"VeriSign\") Whois database is provided by VeriSign for information purposes only, and to assist persons in obtaining information about or related to a domain name registration record. VeriSign does not guarantee its accuracy. By submitting a Whois query, you agree to abide by the following terms of use: You agree that you may use this Data only for lawful purposes and that under no circumstances will you use this Data to: (1) allow, enable, or otherwise support the transmission of mass unsolicited, commercial advertising or solicitations via e-mail, telephone, or facsimile; or (2) enable high volume, automated, electronic processes that apply to VeriSign (or its computer systems). The compilation, repackaging, dissemination or other use of this Data is expressly prohibited without the prior written consent of VeriSign. You agree not to use electronic processes that are automated and high-volume to access or query the Whois database except as reasonably necessary to register domain names or modify existing registrations. VeriSign reserves the right to restrict your access to the Whois database in its sole discretion to ensure operational stability. VeriSign may restrict or terminate your access to the Whois database for failure to abide by these terms of use. VeriSign reserves the right to modify these terms at any time.") + expect(subject.domain).to eq("google.com") + expect(subject.domain_id).to eq("2138514_DOMAIN_COM-VRSN") + expect(subject.status).to eq(:registered) + expect(subject.available?).to eq(false) + expect(subject.registered?).to eq(true) + expect(subject.created_on).to be_a(Time) + expect(subject.created_on).to eq(DateTime.parse("1997-09-15 04:00:00 UTC")) + expect(subject.updated_on).to be_a(Time) + expect(subject.updated_on).to eq(DateTime.parse("2011-07-20 16:55:31 UTC")) + expect(subject.expires_on).to be_a(Time) + expect(subject.expires_on).to eq(DateTime.parse("2020-09-14 04:00:00 UTC")) + expect(subject.registrar).to be_a(Whois::Parser::Registrar) + expect(subject.registrar.id).to eq("292") + expect(subject.registrar.name).to eq("MarkMonitor Inc.") + expect(subject.registrar.url).to eq("http://www.markmonitor.com") + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers.size).to eq(4) + expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[0].name).to eq("ns1.google.com") + expect(subject.nameservers[0].ipv4).to eq(nil) + expect(subject.nameservers[0].ipv6).to eq(nil) + expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[1].name).to eq("ns2.google.com") + expect(subject.nameservers[1].ipv4).to eq(nil) + expect(subject.nameservers[1].ipv6).to eq(nil) + expect(subject.nameservers[2]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[2].name).to eq("ns3.google.com") + expect(subject.nameservers[2].ipv4).to eq(nil) + expect(subject.nameservers[2].ipv6).to eq(nil) + expect(subject.nameservers[3]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[3].name).to eq("ns4.google.com") + expect(subject.nameservers[3].ipv4).to eq(nil) + expect(subject.nameservers[3].ipv6).to eq(nil) + expect(subject.referral_whois).to eq("whois.markmonitor.com") + expect(subject.referral_url).to eq("http://www.markmonitor.com") end end diff --git a/spec/whois/parsers/responses/whois.verisign-grs.com/net/status_available_spec.rb b/spec/whois/parsers/responses/whois.verisign-grs.com/net/status_available_spec.rb index ae597045..8b3c9138 100644 --- a/spec/whois/parsers/responses/whois.verisign-grs.com/net/status_available_spec.rb +++ b/spec/whois/parsers/responses/whois.verisign-grs.com/net/status_available_spec.rb @@ -11,80 +11,29 @@ # require 'spec_helper' -require 'whois/parsers/whois.verisign-grs.com.rb' -describe Whois::Parsers::WhoisVerisignGrsCom, "status_available.expected" do +describe "whois.verisign-grs.com", :aggregate_failures do subject do file = fixture("responses", "whois.verisign-grs.com/net/status_available.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.verisign-grs.com") + Whois::Parser.parser_for(part) end - describe "#disclaimer" do - it do - expect(subject.disclaimer).to eq("TERMS OF USE: You are not authorized to access or query our Whois database through the use of electronic processes that are high-volume and automated except as reasonably necessary to register domain names or modify existing registrations; the Data in VeriSign Global Registry Services' (\"VeriSign\") Whois database is provided by VeriSign for information purposes only, and to assist persons in obtaining information about or related to a domain name registration record. VeriSign does not guarantee its accuracy. By submitting a Whois query, you agree to abide by the following terms of use: You agree that you may use this Data only for lawful purposes and that under no circumstances will you use this Data to: (1) allow, enable, or otherwise support the transmission of mass unsolicited, commercial advertising or solicitations via e-mail, telephone, or facsimile; or (2) enable high volume, automated, electronic processes that apply to VeriSign (or its computer systems). The compilation, repackaging, dissemination or other use of this Data is expressly prohibited without the prior written consent of VeriSign. You agree not to use electronic processes that are automated and high-volume to access or query the Whois database except as reasonably necessary to register domain names or modify existing registrations. VeriSign reserves the right to restrict your access to the Whois database in its sole discretion to ensure operational stability. VeriSign may restrict or terminate your access to the Whois database for failure to abide by these terms of use. VeriSign reserves the right to modify these terms at any time.") - end - end - describe "#domain" do - it do - expect(subject.domain).to eq("u34jedzcq.net") - end - end - describe "#domain_id" do - it do - expect(subject.domain_id).to eq(nil) - end - end - describe "#status" do - it do - expect(subject.status).to eq(:available) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(true) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(false) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to eq(nil) - end - end - describe "#updated_on" do - it do - expect(subject.updated_on).to eq(nil) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to eq(nil) - end - end - describe "#registrar" do - it do - expect(subject.registrar).to eq(nil) - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers).to eq([]) - end - end - describe "#referral_whois" do - it do - expect(subject.referral_whois).to eq(nil) - end - end - describe "#referral_url" do - it do - expect(subject.referral_url).to eq(nil) - end + it "matches status_available.expected" do + expect(subject.disclaimer).to eq("TERMS OF USE: You are not authorized to access or query our Whois database through the use of electronic processes that are high-volume and automated except as reasonably necessary to register domain names or modify existing registrations; the Data in VeriSign Global Registry Services' (\"VeriSign\") Whois database is provided by VeriSign for information purposes only, and to assist persons in obtaining information about or related to a domain name registration record. VeriSign does not guarantee its accuracy. By submitting a Whois query, you agree to abide by the following terms of use: You agree that you may use this Data only for lawful purposes and that under no circumstances will you use this Data to: (1) allow, enable, or otherwise support the transmission of mass unsolicited, commercial advertising or solicitations via e-mail, telephone, or facsimile; or (2) enable high volume, automated, electronic processes that apply to VeriSign (or its computer systems). The compilation, repackaging, dissemination or other use of this Data is expressly prohibited without the prior written consent of VeriSign. You agree not to use electronic processes that are automated and high-volume to access or query the Whois database except as reasonably necessary to register domain names or modify existing registrations. VeriSign reserves the right to restrict your access to the Whois database in its sole discretion to ensure operational stability. VeriSign may restrict or terminate your access to the Whois database for failure to abide by these terms of use. VeriSign reserves the right to modify these terms at any time.") + expect(subject.domain).to eq("u34jedzcq.net") + expect(subject.domain_id).to eq(nil) + expect(subject.status).to eq(:available) + expect(subject.available?).to eq(true) + expect(subject.registered?).to eq(false) + expect(subject.created_on).to eq(nil) + expect(subject.updated_on).to eq(nil) + expect(subject.expires_on).to eq(nil) + expect(subject.registrar).to eq(nil) + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers).to eq([]) + expect(subject.referral_whois).to eq(nil) + expect(subject.referral_url).to eq(nil) end end diff --git a/spec/whois/parsers/responses/whois.verisign-grs.com/net/status_registered_spec.rb b/spec/whois/parsers/responses/whois.verisign-grs.com/net/status_registered_spec.rb index cfa2a791..7f85e7af 100644 --- a/spec/whois/parsers/responses/whois.verisign-grs.com/net/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.verisign-grs.com/net/status_registered_spec.rb @@ -11,102 +11,51 @@ # require 'spec_helper' -require 'whois/parsers/whois.verisign-grs.com.rb' -describe Whois::Parsers::WhoisVerisignGrsCom, "status_registered.expected" do +describe "whois.verisign-grs.com", :aggregate_failures do subject do file = fixture("responses", "whois.verisign-grs.com/net/status_registered.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.verisign-grs.com") + Whois::Parser.parser_for(part) end - describe "#disclaimer" do - it do - expect(subject.disclaimer).to eq("TERMS OF USE: You are not authorized to access or query our Whois database through the use of electronic processes that are high-volume and automated except as reasonably necessary to register domain names or modify existing registrations; the Data in VeriSign Global Registry Services' (\"VeriSign\") Whois database is provided by VeriSign for information purposes only, and to assist persons in obtaining information about or related to a domain name registration record. VeriSign does not guarantee its accuracy. By submitting a Whois query, you agree to abide by the following terms of use: You agree that you may use this Data only for lawful purposes and that under no circumstances will you use this Data to: (1) allow, enable, or otherwise support the transmission of mass unsolicited, commercial advertising or solicitations via e-mail, telephone, or facsimile; or (2) enable high volume, automated, electronic processes that apply to VeriSign (or its computer systems). The compilation, repackaging, dissemination or other use of this Data is expressly prohibited without the prior written consent of VeriSign. You agree not to use electronic processes that are automated and high-volume to access or query the Whois database except as reasonably necessary to register domain names or modify existing registrations. VeriSign reserves the right to restrict your access to the Whois database in its sole discretion to ensure operational stability. VeriSign may restrict or terminate your access to the Whois database for failure to abide by these terms of use. VeriSign reserves the right to modify these terms at any time.") - end - end - describe "#domain" do - it do - expect(subject.domain).to eq("google.net") - end - end - describe "#domain_id" do - it do - expect(subject.domain_id).to eq("4802712_DOMAIN_NET-VRSN") - end - end - describe "#status" do - it do - expect(subject.status).to eq(:registered) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(false) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(true) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to be_a(Time) - expect(subject.created_on).to eq(DateTime.parse("1999-03-15 05:00:00 UTC")) - end - end - describe "#updated_on" do - it do - expect(subject.updated_on).to be_a(Time) - expect(subject.updated_on).to eq(DateTime.parse("2017-02-11 10:56:37 UTC")) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to be_a(Time) - expect(subject.expires_on).to eq(DateTime.parse("2018-03-15 04:00:00 UTC")) - end - end - describe "#registrar" do - it do - expect(subject.registrar).to be_a(Whois::Parser::Registrar) - expect(subject.registrar.id).to eq("292") - expect(subject.registrar.name).to eq("MarkMonitor Inc.") - expect(subject.registrar.url).to eq("http://www.markmonitor.com") - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers.size).to eq(4) - expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[0].name).to eq("ns1.google.com") - expect(subject.nameservers[0].ipv4).to eq(nil) - expect(subject.nameservers[0].ipv6).to eq(nil) - expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[1].name).to eq("ns2.google.com") - expect(subject.nameservers[1].ipv4).to eq(nil) - expect(subject.nameservers[1].ipv6).to eq(nil) - expect(subject.nameservers[2]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[2].name).to eq("ns3.google.com") - expect(subject.nameservers[2].ipv4).to eq(nil) - expect(subject.nameservers[2].ipv6).to eq(nil) - expect(subject.nameservers[3]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[3].name).to eq("ns4.google.com") - expect(subject.nameservers[3].ipv4).to eq(nil) - expect(subject.nameservers[3].ipv6).to eq(nil) - end - end - describe "#referral_whois" do - it do - expect(subject.referral_whois).to eq("whois.markmonitor.com") - end - end - describe "#referral_url" do - it do - expect(subject.referral_url).to eq("http://www.markmonitor.com") - end + it "matches status_registered.expected" do + expect(subject.disclaimer).to eq("TERMS OF USE: You are not authorized to access or query our Whois database through the use of electronic processes that are high-volume and automated except as reasonably necessary to register domain names or modify existing registrations; the Data in VeriSign Global Registry Services' (\"VeriSign\") Whois database is provided by VeriSign for information purposes only, and to assist persons in obtaining information about or related to a domain name registration record. VeriSign does not guarantee its accuracy. By submitting a Whois query, you agree to abide by the following terms of use: You agree that you may use this Data only for lawful purposes and that under no circumstances will you use this Data to: (1) allow, enable, or otherwise support the transmission of mass unsolicited, commercial advertising or solicitations via e-mail, telephone, or facsimile; or (2) enable high volume, automated, electronic processes that apply to VeriSign (or its computer systems). The compilation, repackaging, dissemination or other use of this Data is expressly prohibited without the prior written consent of VeriSign. You agree not to use electronic processes that are automated and high-volume to access or query the Whois database except as reasonably necessary to register domain names or modify existing registrations. VeriSign reserves the right to restrict your access to the Whois database in its sole discretion to ensure operational stability. VeriSign may restrict or terminate your access to the Whois database for failure to abide by these terms of use. VeriSign reserves the right to modify these terms at any time.") + expect(subject.domain).to eq("google.net") + expect(subject.domain_id).to eq("4802712_DOMAIN_NET-VRSN") + expect(subject.status).to eq(:registered) + expect(subject.available?).to eq(false) + expect(subject.registered?).to eq(true) + expect(subject.created_on).to be_a(Time) + expect(subject.created_on).to eq(DateTime.parse("1999-03-15 05:00:00 UTC")) + expect(subject.updated_on).to be_a(Time) + expect(subject.updated_on).to eq(DateTime.parse("2017-02-11 10:56:37 UTC")) + expect(subject.expires_on).to be_a(Time) + expect(subject.expires_on).to eq(DateTime.parse("2018-03-15 04:00:00 UTC")) + expect(subject.registrar).to be_a(Whois::Parser::Registrar) + expect(subject.registrar.id).to eq("292") + expect(subject.registrar.name).to eq("MarkMonitor Inc.") + expect(subject.registrar.url).to eq("http://www.markmonitor.com") + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers.size).to eq(4) + expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[0].name).to eq("ns1.google.com") + expect(subject.nameservers[0].ipv4).to eq(nil) + expect(subject.nameservers[0].ipv6).to eq(nil) + expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[1].name).to eq("ns2.google.com") + expect(subject.nameservers[1].ipv4).to eq(nil) + expect(subject.nameservers[1].ipv6).to eq(nil) + expect(subject.nameservers[2]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[2].name).to eq("ns3.google.com") + expect(subject.nameservers[2].ipv4).to eq(nil) + expect(subject.nameservers[2].ipv6).to eq(nil) + expect(subject.nameservers[3]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[3].name).to eq("ns4.google.com") + expect(subject.nameservers[3].ipv4).to eq(nil) + expect(subject.nameservers[3].ipv6).to eq(nil) + expect(subject.referral_whois).to eq("whois.markmonitor.com") + expect(subject.referral_url).to eq("http://www.markmonitor.com") end end diff --git a/spec/whois/parsers/responses/whois.verisign-grs.com/response_unavailable_spec.rb b/spec/whois/parsers/responses/whois.verisign-grs.com/response_unavailable_spec.rb index 87b4219e..7e09cf2f 100644 --- a/spec/whois/parsers/responses/whois.verisign-grs.com/response_unavailable_spec.rb +++ b/spec/whois/parsers/responses/whois.verisign-grs.com/response_unavailable_spec.rb @@ -11,19 +11,16 @@ # require 'spec_helper' -require 'whois/parsers/whois.verisign-grs.com.rb' -describe Whois::Parsers::WhoisVerisignGrsCom, "response_unavailable.expected" do +describe "whois.verisign-grs.com", :aggregate_failures do subject do file = fixture("responses", "whois.verisign-grs.com/response_unavailable.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.verisign-grs.com") + Whois::Parser.parser_for(part) end - describe "#response_unavailable?" do - it do - expect(subject.response_unavailable?).to eq(true) - end + it "matches response_unavailable.expected" do + expect(subject.response_unavailable?).to eq(true) end end diff --git a/spec/whois/parsers/responses/whois.website.ws/ws/status_available_spec.rb b/spec/whois/parsers/responses/whois.website.ws/ws/status_available_spec.rb index 4d08af63..087a4773 100644 --- a/spec/whois/parsers/responses/whois.website.ws/ws/status_available_spec.rb +++ b/spec/whois/parsers/responses/whois.website.ws/ws/status_available_spec.rb @@ -11,50 +11,23 @@ # require 'spec_helper' -require 'whois/parsers/whois.website.ws.rb' -describe Whois::Parsers::WhoisWebsiteWs, "status_available.expected" do +describe "whois.website.ws", :aggregate_failures do subject do file = fixture("responses", "whois.website.ws/ws/status_available.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.website.ws") + Whois::Parser.parser_for(part) end - describe "#status" do - it do - expect(subject.status).to eq(:available) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(true) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(false) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to eq(nil) - end - end - describe "#updated_on" do - it do - expect(subject.updated_on).to eq(nil) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to eq(nil) - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers).to eq([]) - end + it "matches status_available.expected" do + expect(subject.status).to eq(:available) + expect(subject.available?).to eq(true) + expect(subject.registered?).to eq(false) + expect(subject.created_on).to eq(nil) + expect(subject.updated_on).to eq(nil) + expect(subject.expires_on).to eq(nil) + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers).to eq([]) end end diff --git a/spec/whois/parsers/responses/whois.website.ws/ws/status_registered_spec.rb b/spec/whois/parsers/responses/whois.website.ws/ws/status_registered_spec.rb index 4daecba3..de07dcec 100644 --- a/spec/whois/parsers/responses/whois.website.ws/ws/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.website.ws/ws/status_registered_spec.rb @@ -11,61 +11,34 @@ # require 'spec_helper' -require 'whois/parsers/whois.website.ws.rb' -describe Whois::Parsers::WhoisWebsiteWs, "status_registered.expected" do +describe "whois.website.ws", :aggregate_failures do subject do file = fixture("responses", "whois.website.ws/ws/status_registered.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.website.ws") + Whois::Parser.parser_for(part) end - describe "#status" do - it do - expect(subject.status).to eq(:registered) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(false) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(true) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to be_a(Time) - expect(subject.created_on).to eq(DateTime.parse("2002-03-03")) - end - end - describe "#updated_on" do - it do - expect(subject.updated_on).to be_a(Time) - expect(subject.updated_on).to eq(DateTime.parse("2008-12-08")) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to be_a(Time) - expect(subject.expires_on).to eq(DateTime.parse("2010-03-03")) - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers.size).to eq(4) - expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[0].name).to eq("ns1.google.com") - expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[1].name).to eq("ns2.google.com") - expect(subject.nameservers[2]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[2].name).to eq("ns3.google.com") - expect(subject.nameservers[3]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[3].name).to eq("ns4.google.com") - end + it "matches status_registered.expected" do + expect(subject.status).to eq(:registered) + expect(subject.available?).to eq(false) + expect(subject.registered?).to eq(true) + expect(subject.created_on).to be_a(Time) + expect(subject.created_on).to eq(DateTime.parse("2002-03-03")) + expect(subject.updated_on).to be_a(Time) + expect(subject.updated_on).to eq(DateTime.parse("2008-12-08")) + expect(subject.expires_on).to be_a(Time) + expect(subject.expires_on).to eq(DateTime.parse("2010-03-03")) + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers.size).to eq(4) + expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[0].name).to eq("ns1.google.com") + expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[1].name).to eq("ns2.google.com") + expect(subject.nameservers[2]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[2].name).to eq("ns3.google.com") + expect(subject.nameservers[3]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[3].name).to eq("ns4.google.com") end end diff --git a/spec/whois/parsers/responses/whois.wildwestdomains.com/status_available_spec.rb b/spec/whois/parsers/responses/whois.wildwestdomains.com/status_available_spec.rb index c63d3e21..e6127c86 100644 --- a/spec/whois/parsers/responses/whois.wildwestdomains.com/status_available_spec.rb +++ b/spec/whois/parsers/responses/whois.wildwestdomains.com/status_available_spec.rb @@ -11,83 +11,32 @@ # require 'spec_helper' -require 'whois/parsers/whois.wildwestdomains.com.rb' -describe Whois::Parsers::WhoisWildwestdomainsCom, "status_available.expected" do +describe "whois.wildwestdomains.com", :aggregate_failures do subject do file = fixture("responses", "whois.wildwestdomains.com/status_available.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.wildwestdomains.com") + Whois::Parser.parser_for(part) end - describe "#domain" do - it do - expect(subject.domain).to eq("sadasdsa.com") - end - end - describe "#domain_id" do - it do - expect(subject.domain_id).to eq(nil) - end - end - describe "#status" do - it do - expect(subject.status).to eq(:available) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(true) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(false) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to eq(nil) - end - end - describe "#updated_on" do - it do - expect(subject.updated_on).to eq(nil) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to eq(nil) - end - end - describe "#registrar" do - it do - expect(subject.registrar).to eq(nil) - end - end - describe "#registrant_contacts" do - it do - expect(subject.registrant_contacts).to be_a(Array) - expect(subject.registrant_contacts).to eq([]) - end - end - describe "#admin_contacts" do - it do - expect(subject.admin_contacts).to be_a(Array) - expect(subject.admin_contacts).to eq([]) - end - end - describe "#technical_contacts" do - it do - expect(subject.technical_contacts).to be_a(Array) - expect(subject.technical_contacts).to eq([]) - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers).to eq([]) - end + it "matches status_available.expected" do + expect(subject.domain).to eq("sadasdsa.com") + expect(subject.domain_id).to eq(nil) + expect(subject.status).to eq(:available) + expect(subject.available?).to eq(true) + expect(subject.registered?).to eq(false) + expect(subject.created_on).to eq(nil) + expect(subject.updated_on).to eq(nil) + expect(subject.expires_on).to eq(nil) + expect(subject.registrar).to eq(nil) + expect(subject.registrant_contacts).to be_a(Array) + expect(subject.registrant_contacts).to eq([]) + expect(subject.admin_contacts).to be_a(Array) + expect(subject.admin_contacts).to eq([]) + expect(subject.technical_contacts).to be_a(Array) + expect(subject.technical_contacts).to eq([]) + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers).to eq([]) end end diff --git a/spec/whois/parsers/responses/whois.wildwestdomains.com/status_registered_spec.rb b/spec/whois/parsers/responses/whois.wildwestdomains.com/status_registered_spec.rb index 8b98d6ee..116a02f6 100644 --- a/spec/whois/parsers/responses/whois.wildwestdomains.com/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.wildwestdomains.com/status_registered_spec.rb @@ -11,149 +11,98 @@ # require 'spec_helper' -require 'whois/parsers/whois.wildwestdomains.com.rb' -describe Whois::Parsers::WhoisWildwestdomainsCom, "status_registered.expected" do +describe "whois.wildwestdomains.com", :aggregate_failures do subject do file = fixture("responses", "whois.wildwestdomains.com/status_registered.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.wildwestdomains.com") + Whois::Parser.parser_for(part) end - describe "#domain" do - it do - expect(subject.domain).to eq("wildwestdomains.com") - end - end - describe "#domain_id" do - it do - expect(subject.domain_id).to eq("33386184_DOMAIN_COM-VRSN") - end - end - describe "#status" do - it do - expect(subject.status).to eq(:registered) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(false) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(true) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to be_a(Time) - expect(subject.created_on).to eq(DateTime.parse("2000-08-22 23:29:11 UTC")) - end - end - describe "#updated_on" do - it do - expect(subject.updated_on).to be_a(Time) - expect(subject.updated_on).to eq(DateTime.parse("2011-11-01 21:31:47 UTC")) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to be_a(Time) - expect(subject.expires_on).to eq(DateTime.parse("2021-11-01 11:59:59 UTC")) - end - end - describe "#registrar" do - it do - expect(subject.registrar).to be_a(Whois::Parser::Registrar) - expect(subject.registrar.id).to eq("440") - expect(subject.registrar.name).to eq("Wild West Domains, LLC") - expect(subject.registrar.url).to eq("http://www.wildwestdomains.com") - end - end - describe "#registrant_contacts" do - it do - expect(subject.registrant_contacts).to be_a(Array) - expect(subject.registrant_contacts.size).to eq(1) - expect(subject.registrant_contacts[0]).to be_a(Whois::Parser::Contact) - expect(subject.registrant_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_REGISTRANT) - expect(subject.registrant_contacts[0].id).to eq(nil) - expect(subject.registrant_contacts[0].name).to eq("Registration Private") - expect(subject.registrant_contacts[0].organization).to eq("Domains By Proxy, LLC") - expect(subject.registrant_contacts[0].address).to eq("DomainsByProxy.com, 14747 N Northsight Blvd Suite 111, PMB 309") - expect(subject.registrant_contacts[0].city).to eq("Scottsdale") - expect(subject.registrant_contacts[0].zip).to eq("85260") - expect(subject.registrant_contacts[0].state).to eq("Arizona") - expect(subject.registrant_contacts[0].country).to eq(nil) - expect(subject.registrant_contacts[0].country_code).to eq("United States") - expect(subject.registrant_contacts[0].phone).to eq("+1.4806242599") - expect(subject.registrant_contacts[0].fax).to eq("+1.4806242598") - expect(subject.registrant_contacts[0].email).to eq("WILDWESTDOMAINS.COM@domainsbyproxy.com") - expect(subject.registrant_contacts[0].created_on).to eq(nil) - expect(subject.registrant_contacts[0].updated_on).to eq(nil) - end - end - describe "#admin_contacts" do - it do - expect(subject.admin_contacts).to be_a(Array) - expect(subject.admin_contacts.size).to eq(1) - expect(subject.admin_contacts[0]).to be_a(Whois::Parser::Contact) - expect(subject.admin_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_ADMINISTRATIVE) - expect(subject.admin_contacts[0].id).to eq(nil) - expect(subject.admin_contacts[0].name).to eq("Registration Private") - expect(subject.admin_contacts[0].organization).to eq("Domains By Proxy, LLC") - expect(subject.admin_contacts[0].address).to eq("DomainsByProxy.com, 14747 N Northsight Blvd Suite 111, PMB 309") - expect(subject.admin_contacts[0].city).to eq("Scottsdale") - expect(subject.admin_contacts[0].zip).to eq("85260") - expect(subject.admin_contacts[0].state).to eq("Arizona") - expect(subject.admin_contacts[0].country).to eq(nil) - expect(subject.admin_contacts[0].country_code).to eq("United States") - expect(subject.admin_contacts[0].phone).to eq("+1.4806242599") - expect(subject.admin_contacts[0].fax).to eq("+1.4806242598") - expect(subject.admin_contacts[0].email).to eq("WILDWESTDOMAINS.COM@domainsbyproxy.com") - expect(subject.admin_contacts[0].created_on).to eq(nil) - expect(subject.admin_contacts[0].updated_on).to eq(nil) - end - end - describe "#technical_contacts" do - it do - expect(subject.technical_contacts).to be_a(Array) - expect(subject.technical_contacts.size).to eq(1) - expect(subject.technical_contacts[0]).to be_a(Whois::Parser::Contact) - expect(subject.technical_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_TECHNICAL) - expect(subject.technical_contacts[0].id).to eq(nil) - expect(subject.technical_contacts[0].name).to eq("Registration Private") - expect(subject.technical_contacts[0].organization).to eq("Domains By Proxy, LLC") - expect(subject.technical_contacts[0].address).to eq("DomainsByProxy.com, 14747 N Northsight Blvd Suite 111, PMB 309") - expect(subject.technical_contacts[0].city).to eq("Scottsdale") - expect(subject.technical_contacts[0].zip).to eq("85260") - expect(subject.technical_contacts[0].state).to eq("Arizona") - expect(subject.technical_contacts[0].country).to eq(nil) - expect(subject.technical_contacts[0].country_code).to eq("United States") - expect(subject.technical_contacts[0].phone).to eq("+1.4806242599") - expect(subject.technical_contacts[0].fax).to eq("+1.4806242598") - expect(subject.technical_contacts[0].email).to eq("WILDWESTDOMAINS.COM@domainsbyproxy.com") - expect(subject.technical_contacts[0].created_on).to eq(nil) - expect(subject.technical_contacts[0].updated_on).to eq(nil) - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers.size).to eq(3) - expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[0].name).to eq("cns1.secureserver.net") - expect(subject.nameservers[0].ipv4).to eq(nil) - expect(subject.nameservers[0].ipv6).to eq(nil) - expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[1].name).to eq("cns2.secureserver.net") - expect(subject.nameservers[1].ipv4).to eq(nil) - expect(subject.nameservers[1].ipv6).to eq(nil) - expect(subject.nameservers[2]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[2].name).to eq("cns3.secureserver.net") - expect(subject.nameservers[2].ipv4).to eq(nil) - expect(subject.nameservers[2].ipv6).to eq(nil) - end + it "matches status_registered.expected" do + expect(subject.domain).to eq("wildwestdomains.com") + expect(subject.domain_id).to eq("33386184_DOMAIN_COM-VRSN") + expect(subject.status).to eq(:registered) + expect(subject.available?).to eq(false) + expect(subject.registered?).to eq(true) + expect(subject.created_on).to be_a(Time) + expect(subject.created_on).to eq(DateTime.parse("2000-08-22 23:29:11 UTC")) + expect(subject.updated_on).to be_a(Time) + expect(subject.updated_on).to eq(DateTime.parse("2011-11-01 21:31:47 UTC")) + expect(subject.expires_on).to be_a(Time) + expect(subject.expires_on).to eq(DateTime.parse("2021-11-01 11:59:59 UTC")) + expect(subject.registrar).to be_a(Whois::Parser::Registrar) + expect(subject.registrar.id).to eq("440") + expect(subject.registrar.name).to eq("Wild West Domains, LLC") + expect(subject.registrar.url).to eq("http://www.wildwestdomains.com") + expect(subject.registrant_contacts).to be_a(Array) + expect(subject.registrant_contacts.size).to eq(1) + expect(subject.registrant_contacts[0]).to be_a(Whois::Parser::Contact) + expect(subject.registrant_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_REGISTRANT) + expect(subject.registrant_contacts[0].id).to eq(nil) + expect(subject.registrant_contacts[0].name).to eq("Registration Private") + expect(subject.registrant_contacts[0].organization).to eq("Domains By Proxy, LLC") + expect(subject.registrant_contacts[0].address).to eq("DomainsByProxy.com, 14747 N Northsight Blvd Suite 111, PMB 309") + expect(subject.registrant_contacts[0].city).to eq("Scottsdale") + expect(subject.registrant_contacts[0].zip).to eq("85260") + expect(subject.registrant_contacts[0].state).to eq("Arizona") + expect(subject.registrant_contacts[0].country).to eq(nil) + expect(subject.registrant_contacts[0].country_code).to eq("United States") + expect(subject.registrant_contacts[0].phone).to eq("+1.4806242599") + expect(subject.registrant_contacts[0].fax).to eq("+1.4806242598") + expect(subject.registrant_contacts[0].email).to eq("WILDWESTDOMAINS.COM@domainsbyproxy.com") + expect(subject.registrant_contacts[0].created_on).to eq(nil) + expect(subject.registrant_contacts[0].updated_on).to eq(nil) + expect(subject.admin_contacts).to be_a(Array) + expect(subject.admin_contacts.size).to eq(1) + expect(subject.admin_contacts[0]).to be_a(Whois::Parser::Contact) + expect(subject.admin_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_ADMINISTRATIVE) + expect(subject.admin_contacts[0].id).to eq(nil) + expect(subject.admin_contacts[0].name).to eq("Registration Private") + expect(subject.admin_contacts[0].organization).to eq("Domains By Proxy, LLC") + expect(subject.admin_contacts[0].address).to eq("DomainsByProxy.com, 14747 N Northsight Blvd Suite 111, PMB 309") + expect(subject.admin_contacts[0].city).to eq("Scottsdale") + expect(subject.admin_contacts[0].zip).to eq("85260") + expect(subject.admin_contacts[0].state).to eq("Arizona") + expect(subject.admin_contacts[0].country).to eq(nil) + expect(subject.admin_contacts[0].country_code).to eq("United States") + expect(subject.admin_contacts[0].phone).to eq("+1.4806242599") + expect(subject.admin_contacts[0].fax).to eq("+1.4806242598") + expect(subject.admin_contacts[0].email).to eq("WILDWESTDOMAINS.COM@domainsbyproxy.com") + expect(subject.admin_contacts[0].created_on).to eq(nil) + expect(subject.admin_contacts[0].updated_on).to eq(nil) + expect(subject.technical_contacts).to be_a(Array) + expect(subject.technical_contacts.size).to eq(1) + expect(subject.technical_contacts[0]).to be_a(Whois::Parser::Contact) + expect(subject.technical_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_TECHNICAL) + expect(subject.technical_contacts[0].id).to eq(nil) + expect(subject.technical_contacts[0].name).to eq("Registration Private") + expect(subject.technical_contacts[0].organization).to eq("Domains By Proxy, LLC") + expect(subject.technical_contacts[0].address).to eq("DomainsByProxy.com, 14747 N Northsight Blvd Suite 111, PMB 309") + expect(subject.technical_contacts[0].city).to eq("Scottsdale") + expect(subject.technical_contacts[0].zip).to eq("85260") + expect(subject.technical_contacts[0].state).to eq("Arizona") + expect(subject.technical_contacts[0].country).to eq(nil) + expect(subject.technical_contacts[0].country_code).to eq("United States") + expect(subject.technical_contacts[0].phone).to eq("+1.4806242599") + expect(subject.technical_contacts[0].fax).to eq("+1.4806242598") + expect(subject.technical_contacts[0].email).to eq("WILDWESTDOMAINS.COM@domainsbyproxy.com") + expect(subject.technical_contacts[0].created_on).to eq(nil) + expect(subject.technical_contacts[0].updated_on).to eq(nil) + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers.size).to eq(3) + expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[0].name).to eq("cns1.secureserver.net") + expect(subject.nameservers[0].ipv4).to eq(nil) + expect(subject.nameservers[0].ipv6).to eq(nil) + expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[1].name).to eq("cns2.secureserver.net") + expect(subject.nameservers[1].ipv4).to eq(nil) + expect(subject.nameservers[1].ipv6).to eq(nil) + expect(subject.nameservers[2]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[2].name).to eq("cns3.secureserver.net") + expect(subject.nameservers[2].ipv4).to eq(nil) + expect(subject.nameservers[2].ipv6).to eq(nil) end end diff --git a/spec/whois/parsers/responses/whois.yoursrs.com/status_available_spec.rb b/spec/whois/parsers/responses/whois.yoursrs.com/status_available_spec.rb index e057e074..1033c430 100644 --- a/spec/whois/parsers/responses/whois.yoursrs.com/status_available_spec.rb +++ b/spec/whois/parsers/responses/whois.yoursrs.com/status_available_spec.rb @@ -11,83 +11,32 @@ # require 'spec_helper' -require 'whois/parsers/whois.yoursrs.com.rb' -describe Whois::Parsers::WhoisYoursrsCom, "status_available.expected" do +describe "whois.yoursrs.com", :aggregate_failures do subject do file = fixture("responses", "whois.yoursrs.com/status_available.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.yoursrs.com") + Whois::Parser.parser_for(part) end - describe "#domain" do - it do - expect(subject.domain).to eq(nil) - end - end - describe "#domain_id" do - it do - expect { subject.domain_id }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#status" do - it do - expect(subject.status).to eq([]) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(true) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(false) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to eq(nil) - end - end - describe "#updated_on" do - it do - expect(subject.updated_on).to eq(nil) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to eq(nil) - end - end - describe "#registrar" do - it do - expect(subject.registrar).to eq(nil) - end - end - describe "#registrant_contacts" do - it do - expect(subject.registrant_contacts).to be_a(Array) - expect(subject.registrant_contacts).to eq([]) - end - end - describe "#admin_contacts" do - it do - expect(subject.admin_contacts).to be_a(Array) - expect(subject.admin_contacts).to eq([]) - end - end - describe "#technical_contacts" do - it do - expect(subject.technical_contacts).to be_a(Array) - expect(subject.technical_contacts).to eq([]) - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers).to eq([]) - end + it "matches status_available.expected" do + expect(subject.domain).to eq(nil) + expect { subject.domain_id }.to raise_error(Whois::AttributeNotSupported) + expect(subject.status).to eq([]) + expect(subject.available?).to eq(true) + expect(subject.registered?).to eq(false) + expect(subject.created_on).to eq(nil) + expect(subject.updated_on).to eq(nil) + expect(subject.expires_on).to eq(nil) + expect(subject.registrar).to eq(nil) + expect(subject.registrant_contacts).to be_a(Array) + expect(subject.registrant_contacts).to eq([]) + expect(subject.admin_contacts).to be_a(Array) + expect(subject.admin_contacts).to eq([]) + expect(subject.technical_contacts).to be_a(Array) + expect(subject.technical_contacts).to eq([]) + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers).to eq([]) end end diff --git a/spec/whois/parsers/responses/whois.yoursrs.com/status_registered_spec.rb b/spec/whois/parsers/responses/whois.yoursrs.com/status_registered_spec.rb index ba1979f9..348bdcf5 100644 --- a/spec/whois/parsers/responses/whois.yoursrs.com/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.yoursrs.com/status_registered_spec.rb @@ -11,132 +11,81 @@ # require 'spec_helper' -require 'whois/parsers/whois.yoursrs.com.rb' -describe Whois::Parsers::WhoisYoursrsCom, "status_registered.expected" do +describe "whois.yoursrs.com", :aggregate_failures do subject do file = fixture("responses", "whois.yoursrs.com/status_registered.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.yoursrs.com") + Whois::Parser.parser_for(part) end - describe "#domain" do - it do - expect(subject.domain).to eq("yoursrs.com") - end - end - describe "#domain_id" do - it do - expect { subject.domain_id }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#status" do - it do - expect(subject.status).to eq(["OK"]) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(false) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(true) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to be_a(Time) - expect(subject.created_on).to eq(DateTime.parse("2003-11-24 09:40:55")) - end - end - describe "#updated_on" do - it do - expect(subject.updated_on).to be_a(Time) - expect(subject.updated_on).to eq(DateTime.parse("2014-01-22 14:04:50")) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to be_a(Time) - expect(subject.expires_on).to eq(DateTime.parse("2014-11-24 09:40:55")) - end - end - describe "#registrar" do - it do - expect(subject.registrar).to be_a(Whois::Parser::Registrar) - expect(subject.registrar.id).to eq(nil) - expect(subject.registrar.name).to eq("REALTIME REGISTER B.V.") - expect(subject.registrar.url).to eq(nil) - end - end - describe "#registrant_contacts" do - it do - expect(subject.registrant_contacts).to be_a(Array) - expect(subject.registrant_contacts.size).to eq(1) - expect(subject.registrant_contacts[0]).to be_a(Whois::Parser::Contact) - expect(subject.registrant_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_REGISTRANT) - expect(subject.registrant_contacts[0].id).to eq("realtimeregister") - expect(subject.registrant_contacts[0].name).to eq("Valentijn Borstlap") - expect(subject.registrant_contacts[0].organization).to eq("Realtime Register B.V.") - expect(subject.registrant_contacts[0].address).to eq("Ceintuurbaan 32a") - expect(subject.registrant_contacts[0].city).to eq("Zwolle") - expect(subject.registrant_contacts[0].zip).to eq("8024AA") - expect(subject.registrant_contacts[0].state).to eq("Overijssel") - expect(subject.registrant_contacts[0].country_code).to eq("NL") - expect(subject.registrant_contacts[0].phone).to eq("+31.384530752") - expect(subject.registrant_contacts[0].fax).to eq("+31.384540122") - expect(subject.registrant_contacts[0].email).to eq("support@realtimeregister.com") - end - end - describe "#admin_contacts" do - it do - expect(subject.admin_contacts).to be_a(Array) - expect(subject.admin_contacts.size).to eq(1) - expect(subject.admin_contacts[0]).to be_a(Whois::Parser::Contact) - expect(subject.admin_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_ADMINISTRATIVE) - expect(subject.admin_contacts[0].id).to eq("realtimeregister") - expect(subject.admin_contacts[0].name).to eq("Valentijn Borstlap") - expect(subject.admin_contacts[0].organization).to eq("Realtime Register B.V.") - expect(subject.admin_contacts[0].address).to eq("Ceintuurbaan 32a") - expect(subject.admin_contacts[0].city).to eq("Zwolle") - expect(subject.admin_contacts[0].zip).to eq("8024AA") - expect(subject.admin_contacts[0].state).to eq("Overijssel") - expect(subject.admin_contacts[0].country_code).to eq("NL") - expect(subject.admin_contacts[0].phone).to eq("+31.384530752") - expect(subject.admin_contacts[0].fax).to eq("+31.384540122") - expect(subject.admin_contacts[0].email).to eq("support@realtimeregister.com") - end - end - describe "#technical_contacts" do - it do - expect(subject.technical_contacts).to be_a(Array) - expect(subject.technical_contacts.size).to eq(1) - expect(subject.technical_contacts[0]).to be_a(Whois::Parser::Contact) - expect(subject.technical_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_TECHNICAL) - expect(subject.technical_contacts[0].id).to eq("realtimeregister") - expect(subject.technical_contacts[0].name).to eq("Valentijn Borstlap") - expect(subject.technical_contacts[0].organization).to eq("Realtime Register B.V.") - expect(subject.technical_contacts[0].address).to eq("Ceintuurbaan 32a") - expect(subject.technical_contacts[0].city).to eq("Zwolle") - expect(subject.technical_contacts[0].zip).to eq("8024AA") - expect(subject.technical_contacts[0].state).to eq("Overijssel") - expect(subject.technical_contacts[0].country_code).to eq("NL") - expect(subject.technical_contacts[0].phone).to eq("+31.384530752") - expect(subject.technical_contacts[0].fax).to eq("+31.384540122") - expect(subject.technical_contacts[0].email).to eq("support@realtimeregister.com") - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers.size).to eq(2) - expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[0].name).to eq("ns1.yoursrs.com") - expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[1].name).to eq("ns2.yoursrs.com") - end + it "matches status_registered.expected" do + expect(subject.domain).to eq("yoursrs.com") + expect { subject.domain_id }.to raise_error(Whois::AttributeNotSupported) + expect(subject.status).to eq(["OK"]) + expect(subject.available?).to eq(false) + expect(subject.registered?).to eq(true) + expect(subject.created_on).to be_a(Time) + expect(subject.created_on).to eq(DateTime.parse("2003-11-24 09:40:55")) + expect(subject.updated_on).to be_a(Time) + expect(subject.updated_on).to eq(DateTime.parse("2014-01-22 14:04:50")) + expect(subject.expires_on).to be_a(Time) + expect(subject.expires_on).to eq(DateTime.parse("2014-11-24 09:40:55")) + expect(subject.registrar).to be_a(Whois::Parser::Registrar) + expect(subject.registrar.id).to eq(nil) + expect(subject.registrar.name).to eq("REALTIME REGISTER B.V.") + expect(subject.registrar.url).to eq(nil) + expect(subject.registrant_contacts).to be_a(Array) + expect(subject.registrant_contacts.size).to eq(1) + expect(subject.registrant_contacts[0]).to be_a(Whois::Parser::Contact) + expect(subject.registrant_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_REGISTRANT) + expect(subject.registrant_contacts[0].id).to eq("realtimeregister") + expect(subject.registrant_contacts[0].name).to eq("Valentijn Borstlap") + expect(subject.registrant_contacts[0].organization).to eq("Realtime Register B.V.") + expect(subject.registrant_contacts[0].address).to eq("Ceintuurbaan 32a") + expect(subject.registrant_contacts[0].city).to eq("Zwolle") + expect(subject.registrant_contacts[0].zip).to eq("8024AA") + expect(subject.registrant_contacts[0].state).to eq("Overijssel") + expect(subject.registrant_contacts[0].country_code).to eq("NL") + expect(subject.registrant_contacts[0].phone).to eq("+31.384530752") + expect(subject.registrant_contacts[0].fax).to eq("+31.384540122") + expect(subject.registrant_contacts[0].email).to eq("support@realtimeregister.com") + expect(subject.admin_contacts).to be_a(Array) + expect(subject.admin_contacts.size).to eq(1) + expect(subject.admin_contacts[0]).to be_a(Whois::Parser::Contact) + expect(subject.admin_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_ADMINISTRATIVE) + expect(subject.admin_contacts[0].id).to eq("realtimeregister") + expect(subject.admin_contacts[0].name).to eq("Valentijn Borstlap") + expect(subject.admin_contacts[0].organization).to eq("Realtime Register B.V.") + expect(subject.admin_contacts[0].address).to eq("Ceintuurbaan 32a") + expect(subject.admin_contacts[0].city).to eq("Zwolle") + expect(subject.admin_contacts[0].zip).to eq("8024AA") + expect(subject.admin_contacts[0].state).to eq("Overijssel") + expect(subject.admin_contacts[0].country_code).to eq("NL") + expect(subject.admin_contacts[0].phone).to eq("+31.384530752") + expect(subject.admin_contacts[0].fax).to eq("+31.384540122") + expect(subject.admin_contacts[0].email).to eq("support@realtimeregister.com") + expect(subject.technical_contacts).to be_a(Array) + expect(subject.technical_contacts.size).to eq(1) + expect(subject.technical_contacts[0]).to be_a(Whois::Parser::Contact) + expect(subject.technical_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_TECHNICAL) + expect(subject.technical_contacts[0].id).to eq("realtimeregister") + expect(subject.technical_contacts[0].name).to eq("Valentijn Borstlap") + expect(subject.technical_contacts[0].organization).to eq("Realtime Register B.V.") + expect(subject.technical_contacts[0].address).to eq("Ceintuurbaan 32a") + expect(subject.technical_contacts[0].city).to eq("Zwolle") + expect(subject.technical_contacts[0].zip).to eq("8024AA") + expect(subject.technical_contacts[0].state).to eq("Overijssel") + expect(subject.technical_contacts[0].country_code).to eq("NL") + expect(subject.technical_contacts[0].phone).to eq("+31.384530752") + expect(subject.technical_contacts[0].fax).to eq("+31.384540122") + expect(subject.technical_contacts[0].email).to eq("support@realtimeregister.com") + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers.size).to eq(2) + expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[0].name).to eq("ns1.yoursrs.com") + expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[1].name).to eq("ns2.yoursrs.com") end end diff --git a/spec/whois/parsers/responses/whois.yoursrs.com/status_registered_with_no_last_updated_spec.rb b/spec/whois/parsers/responses/whois.yoursrs.com/status_registered_with_no_last_updated_spec.rb index 7168dcd7..f3f0e78a 100644 --- a/spec/whois/parsers/responses/whois.yoursrs.com/status_registered_with_no_last_updated_spec.rb +++ b/spec/whois/parsers/responses/whois.yoursrs.com/status_registered_with_no_last_updated_spec.rb @@ -11,19 +11,16 @@ # require 'spec_helper' -require 'whois/parsers/whois.yoursrs.com.rb' -describe Whois::Parsers::WhoisYoursrsCom, "status_registered_with_no_last_updated.expected" do +describe "whois.yoursrs.com", :aggregate_failures do subject do file = fixture("responses", "whois.yoursrs.com/status_registered_with_no_last_updated.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.yoursrs.com") + Whois::Parser.parser_for(part) end - describe "#updated_on" do - it do - expect(subject.updated_on).to eq(nil) - end + it "matches status_registered_with_no_last_updated.expected" do + expect(subject.updated_on).to eq(nil) end end diff --git a/spec/whois/parsers/responses/whois.za.net/za.net/status_available_spec.rb b/spec/whois/parsers/responses/whois.za.net/za.net/status_available_spec.rb index ab8d0e4a..9fc51795 100644 --- a/spec/whois/parsers/responses/whois.za.net/za.net/status_available_spec.rb +++ b/spec/whois/parsers/responses/whois.za.net/za.net/status_available_spec.rb @@ -11,50 +11,23 @@ # require 'spec_helper' -require 'whois/parsers/whois.za.net.rb' -describe Whois::Parsers::WhoisZaNet, "status_available.expected" do +describe "whois.za.net", :aggregate_failures do subject do file = fixture("responses", "whois.za.net/za.net/status_available.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.za.net") + Whois::Parser.parser_for(part) end - describe "#status" do - it do - expect(subject.status).to eq(:available) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(true) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(false) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to eq(nil) - end - end - describe "#updated_on" do - it do - expect(subject.updated_on).to eq(nil) - end - end - describe "#expires_on" do - it do - expect { subject.expires_on }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers).to eq([]) - end + it "matches status_available.expected" do + expect(subject.status).to eq(:available) + expect(subject.available?).to eq(true) + expect(subject.registered?).to eq(false) + expect(subject.created_on).to eq(nil) + expect(subject.updated_on).to eq(nil) + expect { subject.expires_on }.to raise_error(Whois::AttributeNotSupported) + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers).to eq([]) end end diff --git a/spec/whois/parsers/responses/whois.za.net/za.net/status_registered_spec.rb b/spec/whois/parsers/responses/whois.za.net/za.net/status_registered_spec.rb index 73846749..ba52aa37 100644 --- a/spec/whois/parsers/responses/whois.za.net/za.net/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.za.net/za.net/status_registered_spec.rb @@ -11,56 +11,29 @@ # require 'spec_helper' -require 'whois/parsers/whois.za.net.rb' -describe Whois::Parsers::WhoisZaNet, "status_registered.expected" do +describe "whois.za.net", :aggregate_failures do subject do file = fixture("responses", "whois.za.net/za.net/status_registered.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.za.net") + Whois::Parser.parser_for(part) end - describe "#status" do - it do - expect(subject.status).to eq(:registered) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(false) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(true) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to be_a(Time) - expect(subject.created_on).to eq(DateTime.parse("2002-03-29 22:03:53 UTC")) - end - end - describe "#updated_on" do - it do - expect(subject.updated_on).to be_a(Time) - expect(subject.updated_on).to eq(DateTime.parse("2002-03-29 22:03:53 UTC")) - end - end - describe "#expires_on" do - it do - expect { subject.expires_on }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers.size).to eq(2) - expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[0].name).to eq("ns3.zoneedit.com") - expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[1].name).to eq("ns5.zoneedit.com") - end + it "matches status_registered.expected" do + expect(subject.status).to eq(:registered) + expect(subject.available?).to eq(false) + expect(subject.registered?).to eq(true) + expect(subject.created_on).to be_a(Time) + expect(subject.created_on).to eq(DateTime.parse("2002-03-29 22:03:53 UTC")) + expect(subject.updated_on).to be_a(Time) + expect(subject.updated_on).to eq(DateTime.parse("2002-03-29 22:03:53 UTC")) + expect { subject.expires_on }.to raise_error(Whois::AttributeNotSupported) + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers.size).to eq(2) + expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[0].name).to eq("ns3.zoneedit.com") + expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[1].name).to eq("ns5.zoneedit.com") end end diff --git a/spec/whois/parsers/responses/whois.za.org/za.org/status_available_spec.rb b/spec/whois/parsers/responses/whois.za.org/za.org/status_available_spec.rb index d694c0e2..5751df0b 100644 --- a/spec/whois/parsers/responses/whois.za.org/za.org/status_available_spec.rb +++ b/spec/whois/parsers/responses/whois.za.org/za.org/status_available_spec.rb @@ -11,50 +11,23 @@ # require 'spec_helper' -require 'whois/parsers/whois.za.org.rb' -describe Whois::Parsers::WhoisZaOrg, "status_available.expected" do +describe "whois.za.org", :aggregate_failures do subject do file = fixture("responses", "whois.za.org/za.org/status_available.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.za.org") + Whois::Parser.parser_for(part) end - describe "#status" do - it do - expect(subject.status).to eq(:available) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(true) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(false) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to eq(nil) - end - end - describe "#updated_on" do - it do - expect(subject.updated_on).to eq(nil) - end - end - describe "#expires_on" do - it do - expect { subject.expires_on }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers).to eq([]) - end + it "matches status_available.expected" do + expect(subject.status).to eq(:available) + expect(subject.available?).to eq(true) + expect(subject.registered?).to eq(false) + expect(subject.created_on).to eq(nil) + expect(subject.updated_on).to eq(nil) + expect { subject.expires_on }.to raise_error(Whois::AttributeNotSupported) + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers).to eq([]) end end diff --git a/spec/whois/parsers/responses/whois.za.org/za.org/status_registered_spec.rb b/spec/whois/parsers/responses/whois.za.org/za.org/status_registered_spec.rb index a4445fe9..78b9348f 100644 --- a/spec/whois/parsers/responses/whois.za.org/za.org/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.za.org/za.org/status_registered_spec.rb @@ -11,58 +11,31 @@ # require 'spec_helper' -require 'whois/parsers/whois.za.org.rb' -describe Whois::Parsers::WhoisZaOrg, "status_registered.expected" do +describe "whois.za.org", :aggregate_failures do subject do file = fixture("responses", "whois.za.org/za.org/status_registered.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.za.org") + Whois::Parser.parser_for(part) end - describe "#status" do - it do - expect(subject.status).to eq(:registered) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(false) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(true) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to be_a(Time) - expect(subject.created_on).to eq(DateTime.parse("2000-11-05 14:03:48 UTC")) - end - end - describe "#updated_on" do - it do - expect(subject.updated_on).to be_a(Time) - expect(subject.updated_on).to eq(DateTime.parse("2005-08-15 12:15:10 BST")) - end - end - describe "#expires_on" do - it do - expect { subject.expires_on }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers.size).to eq(3) - expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[0].name).to eq("blade.wcic.co.za") - expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[1].name).to eq("sabertooth.wcic.co.za") - expect(subject.nameservers[2]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[2].name).to eq("ns2.iafrica.com") - end + it "matches status_registered.expected" do + expect(subject.status).to eq(:registered) + expect(subject.available?).to eq(false) + expect(subject.registered?).to eq(true) + expect(subject.created_on).to be_a(Time) + expect(subject.created_on).to eq(DateTime.parse("2000-11-05 14:03:48 UTC")) + expect(subject.updated_on).to be_a(Time) + expect(subject.updated_on).to eq(DateTime.parse("2005-08-15 12:15:10 BST")) + expect { subject.expires_on }.to raise_error(Whois::AttributeNotSupported) + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers.size).to eq(3) + expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[0].name).to eq("blade.wcic.co.za") + expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[1].name).to eq("sabertooth.wcic.co.za") + expect(subject.nameservers[2]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[2].name).to eq("ns2.iafrica.com") end end diff --git a/spec/whois/parsers/responses/whois1.nic.bi/bi/status_available_spec.rb b/spec/whois/parsers/responses/whois1.nic.bi/bi/status_available_spec.rb index 58886288..69c3fc26 100644 --- a/spec/whois/parsers/responses/whois1.nic.bi/bi/status_available_spec.rb +++ b/spec/whois/parsers/responses/whois1.nic.bi/bi/status_available_spec.rb @@ -11,65 +11,26 @@ # require 'spec_helper' -require 'whois/parsers/whois1.nic.bi.rb' -describe Whois::Parsers::Whois1NicBi, "status_available.expected" do +describe "whois1.nic.bi", :aggregate_failures do subject do file = fixture("responses", "whois1.nic.bi/bi/status_available.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois1.nic.bi") + Whois::Parser.parser_for(part) end - describe "#domain" do - it do - expect(subject.domain).to eq("u34jedzcq.bi") - end - end - describe "#domain_id" do - it do - expect(subject.domain_id).to eq(nil) - end - end - describe "#status" do - it do - expect(subject.status).to eq(:available) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(true) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(false) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to eq(nil) - end - end - describe "#updated_on" do - it do - expect(subject.updated_on).to eq(nil) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to eq(nil) - end - end - describe "#registrar" do - it do - expect(subject.registrar).to eq(nil) - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers).to eq([]) - end + it "matches status_available.expected" do + expect(subject.domain).to eq("u34jedzcq.bi") + expect(subject.domain_id).to eq(nil) + expect(subject.status).to eq(:available) + expect(subject.available?).to eq(true) + expect(subject.registered?).to eq(false) + expect(subject.created_on).to eq(nil) + expect(subject.updated_on).to eq(nil) + expect(subject.expires_on).to eq(nil) + expect(subject.registrar).to eq(nil) + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers).to eq([]) end end diff --git a/spec/whois/parsers/responses/whois1.nic.bi/bi/status_registered_spec.rb b/spec/whois/parsers/responses/whois1.nic.bi/bi/status_registered_spec.rb index a3ae2468..b6e49d85 100644 --- a/spec/whois/parsers/responses/whois1.nic.bi/bi/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois1.nic.bi/bi/status_registered_spec.rb @@ -11,79 +11,40 @@ # require 'spec_helper' -require 'whois/parsers/whois1.nic.bi.rb' -describe Whois::Parsers::Whois1NicBi, "status_registered.expected" do +describe "whois1.nic.bi", :aggregate_failures do subject do file = fixture("responses", "whois1.nic.bi/bi/status_registered.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois1.nic.bi") + Whois::Parser.parser_for(part) end - describe "#domain" do - it do - expect(subject.domain).to eq("google.bi") - end - end - describe "#domain_id" do - it do - expect(subject.domain_id).to eq("2633NIC-BI") - end - end - describe "#status" do - it do - expect(subject.status).to eq(:registered) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(false) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(true) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to be_a(Time) - expect(subject.created_on).to eq(DateTime.parse("2002-09-29 22:00:00 UTC")) - end - end - describe "#updated_on" do - it do - expect(subject.updated_on).to be_a(Time) - expect(subject.updated_on).to eq(DateTime.parse("2013-12-05 07:16:04 UTC")) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to be_a(Time) - expect(subject.expires_on).to eq(DateTime.parse("2014-09-29 22:00:00 UTC")) - end - end - describe "#registrar" do - it do - expect(subject.registrar).to be_a(Whois::Parser::Registrar) - expect(subject.registrar.id).to eq(nil) - expect(subject.registrar.name).to eq("MarkMonito") - expect(subject.registrar.url).to eq(nil) - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers.size).to eq(4) - expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[0].name).to eq("ns1.google.com") - expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[1].name).to eq("ns2.google.com") - expect(subject.nameservers[2]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[2].name).to eq("ns3.google.com") - expect(subject.nameservers[3]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[3].name).to eq("ns4.google.com") - end + it "matches status_registered.expected" do + expect(subject.domain).to eq("google.bi") + expect(subject.domain_id).to eq("2633NIC-BI") + expect(subject.status).to eq(:registered) + expect(subject.available?).to eq(false) + expect(subject.registered?).to eq(true) + expect(subject.created_on).to be_a(Time) + expect(subject.created_on).to eq(DateTime.parse("2002-09-29 22:00:00 UTC")) + expect(subject.updated_on).to be_a(Time) + expect(subject.updated_on).to eq(DateTime.parse("2013-12-05 07:16:04 UTC")) + expect(subject.expires_on).to be_a(Time) + expect(subject.expires_on).to eq(DateTime.parse("2014-09-29 22:00:00 UTC")) + expect(subject.registrar).to be_a(Whois::Parser::Registrar) + expect(subject.registrar.id).to eq(nil) + expect(subject.registrar.name).to eq("MarkMonito") + expect(subject.registrar.url).to eq(nil) + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers.size).to eq(4) + expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[0].name).to eq("ns1.google.com") + expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[1].name).to eq("ns2.google.com") + expect(subject.nameservers[2]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[2].name).to eq("ns3.google.com") + expect(subject.nameservers[3]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[3].name).to eq("ns4.google.com") end end diff --git a/tasks/spec.rake b/tasks/spec.rake index 66f2150a..ff05ede4 100644 --- a/tasks/spec.rake +++ b/tasks/spec.rake @@ -25,38 +25,31 @@ namespace :spec do # require 'spec_helper' -require 'whois/parsers/%{khost}.rb' -describe %{described_class}, "%{descr}" do +describe "%{khost}", :aggregate_failures do subject do file = fixture("responses", "%{fixture}") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "%{khost}") + Whois::Parser.parser_for(part) end -%{contexts} -end - RUBY - - TPL_CONTEXT = <<-RUBY.chomp! - describe "#%{descr}" do - it do -%{examples} - end + it "matches %{descr}" do +%{matches} end +end RUBY TPL_MATCH = <<-RUBY.chomp! - expect(subject.%{attribute}).to %{match} + expect(subject.%{attribute}).to %{match} RUBY TPL_MATCH_SIZE = <<-RUBY.chomp! - expect(subject.%{attribute}.size).to eq(%{size}) + expect(subject.%{attribute}.size).to eq(%{size}) RUBY TPL_MATCH_RAISE = <<-RUBY.chomp! - expect { subject.%{attribute} }.to %{match} + expect { subject.%{attribute} }.to %{match} RUBY def relativize(path) @@ -73,7 +66,6 @@ end parts = (source_path.split("/") - SOURCE_PARTS) khost = parts.first kfile = parts.last - described_class = Whois::Parser.parser_klass(khost) target_path = File.join(TARGET_DIR, *parts).gsub(".expected", "_spec.rb") @@ -111,8 +103,8 @@ end # Generate the RSpec content and # write one file for every test. - contexts = tests.map do |attr, specs| - matches = specs.map do |method, condition| + matches = tests.flat_map do |attr, specs| + specs.map do |method, condition| attribute = method % attr case condition when /raise_error/ @@ -122,18 +114,16 @@ end else TPL_MATCH % { attribute: attribute, match: condition } end - end.join("\n") - TPL_CONTEXT % { descr: attr, examples: matches } + end end.join("\n") describe = <<-RUBY #{TPL_DESCRIBE % { - :described_class => described_class, :khost => khost, :descr => kfile, :sfile => relativize(source_path), :fixture => parts.join("/").gsub(".expected", ".txt"), - :contexts => contexts + :matches => matches }} RUBY From 1d7b5860079a980b91d4a44fa33be70710fa9d5a Mon Sep 17 00:00:00 2001 From: Adrien Rey-Jarthon Date: Tue, 14 Dec 2021 15:14:32 +0100 Subject: [PATCH 14/29] Updated parser for .COM.AU tld (thanks @kovalevsky) --- CHANGELOG.md | 1 + ...s.audns.net.au.rb => whois.auda.org.au.rb} | 20 ++-- lib/whois/scanners/whois.auda.org.au.rb | 35 +++++++ lib/whois/scanners/whois.audns.net.au.rb | 25 ----- .../au/property_status_with_multiple.expected | 2 + .../au/property_status_with_multiple.txt | 44 +++++++++ .../au/status_available.expected | 49 ++++++++++ .../whois.auda.org.au/au/status_available.txt | 20 ++++ .../au/status_registered.expected | 92 +++++++++++++++++++ .../au/status_registered.txt | 54 +++++++++++ .../au/property_status_with_multiple.expected | 2 - .../au/property_status_with_multiple.txt | 22 ----- .../au/status_available.expected | 49 ---------- .../au/status_available.txt | 1 - .../au/status_registered.expected | 92 ------------------- .../au/status_registered.txt | 26 ------ spec/tlds.yml | 2 +- .../au/property_status_with_multiple_spec.rb | 10 +- .../au/status_available_spec.rb | 42 +++++++++ .../au/status_registered_spec.rb | 42 ++++----- .../au/status_available_spec.rb | 42 --------- 21 files changed, 376 insertions(+), 296 deletions(-) rename lib/whois/parsers/{whois.audns.net.au.rb => whois.auda.org.au.rb} (87%) create mode 100644 lib/whois/scanners/whois.auda.org.au.rb delete mode 100644 lib/whois/scanners/whois.audns.net.au.rb create mode 100644 spec/fixtures/responses/whois.auda.org.au/au/property_status_with_multiple.expected create mode 100644 spec/fixtures/responses/whois.auda.org.au/au/property_status_with_multiple.txt create mode 100644 spec/fixtures/responses/whois.auda.org.au/au/status_available.expected create mode 100644 spec/fixtures/responses/whois.auda.org.au/au/status_available.txt create mode 100644 spec/fixtures/responses/whois.auda.org.au/au/status_registered.expected create mode 100644 spec/fixtures/responses/whois.auda.org.au/au/status_registered.txt delete mode 100644 spec/fixtures/responses/whois.audns.net.au/au/property_status_with_multiple.expected delete mode 100644 spec/fixtures/responses/whois.audns.net.au/au/property_status_with_multiple.txt delete mode 100644 spec/fixtures/responses/whois.audns.net.au/au/status_available.expected delete mode 100644 spec/fixtures/responses/whois.audns.net.au/au/status_available.txt delete mode 100644 spec/fixtures/responses/whois.audns.net.au/au/status_registered.expected delete mode 100644 spec/fixtures/responses/whois.audns.net.au/au/status_registered.txt rename spec/whois/parsers/responses/{whois.audns.net.au => whois.auda.org.au}/au/property_status_with_multiple_spec.rb (52%) create mode 100644 spec/whois/parsers/responses/whois.auda.org.au/au/status_available_spec.rb rename spec/whois/parsers/responses/{whois.audns.net.au => whois.auda.org.au}/au/status_registered_spec.rb (52%) delete mode 100644 spec/whois/parsers/responses/whois.audns.net.au/au/status_available_spec.rb diff --git a/CHANGELOG.md b/CHANGELOG.md index 946c0d9a..8b138e68 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,7 @@ This project uses [Semantic Versioning 2.0.0](http://semver.org/). #### master +- FIX: Updated parser for .COM.AU tld (based on #100) Thanks @kovalevsky - NEW: Added support for all DonutsInc TLDs (241 at the time: .ACADEMY, .ACCOUNTANTS, .ACTOR, .AGENCY, .AIRFORCE, .APARTMENTS, .ARMY, .ASSOCIATES, .ATTORNEY, .AUCTION, .BAND, .BARGAINS, .BIKE, .BINGO, .BOUTIQUE, .BUILDERS, .BUSINESS, .CAB, .CAFE, .CAMERA, .CAMP, .CAPITAL, .CARDS, .CARE, .CAREERS, .CASH, .CASINO, .CATERING, .CENTER, .CHARITY, .CHAT, .CHEAP, .CHURCH, .CITY, .CLAIMS, .CLEANING, .CLINIC, .CLOTHING, .COACH, .CODES, .COFFEE, .COMMUNITY, .COMPANY, .COMPUTER, .CONDOS, .CONSTRUCTION, .CONTACT, .CONTRACTORS, .COOL, .COUPONS, .CREDIT, .CREDITCARD, .CRUISES, .DANCE, .DATING, .DEALS, .DEGREE, .DELIVERY, .DEMOCRAT, .DENTAL, .DENTIST, .DIAMONDS, .DIGITAL, .DIRECT, .DIRECTORY, .DISCOUNT, .DOCTOR, .DOG, .DOMAINS, .EDUCATION, .EMAIL, .ENERGY, .ENGINEER, .ENGINEERING, .ENTERPRISES, .EQUIPMENT, .ESTATE, .EVENTS, .EXCHANGE, .EXPERT, .EXPOSED, .EXPRESS, .FAIL, .FAMILY, .FAN, .FARM, .FINANCE, .FINANCIAL, .FISH, .FITNESS, .FLIGHTS, .FLORIST, .FOOTBALL, .FORSALE, .FOUNDATION, .FUND, .FURNITURE, .FUTBOL, .FYI, .GALLERY, .GAMES, .GIFTS, .GIVES, .GLASS, .GMBH, .GOLD, .GOLF, .GRAPHICS, .GRATIS, .GRIPE, .GROUP, .GUIDE, .GURU, .HAUS, .HEALTHCARE, .HOCKEY, .HOLDINGS, .HOLIDAY, .HOSPITAL, .HOUSE, .IMMO, .IMMOBILIEN, .INDUSTRIES, .INSTITUTE, .INSURE, .INTERNATIONAL, .INVESTMENTS, .IRISH, .JETZT, .JEWELRY, .KAUFEN, .KITCHEN, .LAND, .LAWYER, .LEASE, .LEGAL, .LIFE, .LIGHTING, .LIMITED, .LIMO, .LIVE, .LOANS, .LTD, .MAISON, .MANAGEMENT, .MARKET, .MARKETING, .MBA, .MEDIA, .MEMORIAL, .MODA, .MONEY, .MORTGAGE, .MOVIE, .NAVY, .NETWORK, .NEWS, .NINJA, .PARTNERS, .PARTS, .PHOTOGRAPHY, .PHOTOS, .PICTURES, .PIZZA, .PLACE, .PLUMBING, .PLUS, .PRODUCTIONS, .PROPERTIES, .PUB, .RECIPES, .REHAB, .REISE, .REISEN, .RENTALS, .REPAIR, .REPORT, .REPUBLICAN, .RESTAURANT, .REVIEWS, .RIP, .ROCKS, .RUN, .SALE, .SALON, .SARL, .SCHOOL, .SCHULE, .SERVICES, .SHOES, .SHOPPING, .SHOW, .SINGLES, .SOCCER, .SOCIAL, .SOFTWARE, .SOLAR, .SOLUTIONS, .STUDIO, .STYLE, .SUPPLIES, .SUPPLY, .SUPPORT, .SURGERY, .SYSTEMS, .TAX, .TAXI, .TEAM, .TECHNOLOGY, .TENNIS, .THEATER, .TIENDA, .TIPS, .TIRES, .TODAY, .TOOLS, .TOURS, .TOWN, .TOYS, .TRAINING, .TRAVEL, .UNIVERSITY, .VACATIONS, .VENTURES, .VET, .VIAJES, .VIDEO, .VILLAS, .VIN, .VISION, .VOYAGE, .WATCH, .WINE, .WORKS, .WORLD, .WTF, .ZONE, .企业, .娱乐, .游戏, .商店) - FIX: Updated parser for .CA tld - NEW: Added parser for .WORLD tld diff --git a/lib/whois/parsers/whois.audns.net.au.rb b/lib/whois/parsers/whois.auda.org.au.rb similarity index 87% rename from lib/whois/parsers/whois.audns.net.au.rb rename to lib/whois/parsers/whois.auda.org.au.rb index 50ea627c..e0201fcc 100644 --- a/lib/whois/parsers/whois.audns.net.au.rb +++ b/lib/whois/parsers/whois.auda.org.au.rb @@ -8,21 +8,21 @@ require_relative 'base' -require 'whois/scanners/whois.audns.net.au.rb' +require 'whois/scanners/whois.auda.org.au.rb' module Whois class Parsers - # Parser for the whois.audns.net.au server. + # Parser for the whois.auda.org.au server. # # @see Whois::Parsers::Example # The Example parser for the list of all available methods. # - class WhoisAudnsNetAu < Base + class WhoisAudaOrgAu < Base include Scanners::Scannable - self.scanner = Scanners::WhoisAudnsNetAu + self.scanner = Scanners::WhoisAudaOrgAu property_not_supported :disclaimer @@ -32,8 +32,13 @@ class WhoisAudnsNetAu < Base node("Domain Name") end - property_not_supported :domain_id + property_supported :domain_id do + node("Registry Domain ID") + end + property_supported :disclaimer do + node("field:disclaimer") + end # == Values for Status # @@ -52,7 +57,6 @@ class WhoisAudnsNetAu < Base !available? end - property_not_supported :created_on property_supported :updated_on do @@ -61,14 +65,12 @@ class WhoisAudnsNetAu < Base property_not_supported :expires_on - property_supported :registrar do node("Registrar Name") do |str| Parser::Registrar.new(name: str) end end - property_supported :registrant_contacts do contact = build_contact("Registrant Contact", Parser::Contact::TYPE_REGISTRANT) contact.organization = node("Registrant") if contact @@ -81,14 +83,12 @@ class WhoisAudnsNetAu < Base build_contact("Tech Contact", Parser::Contact::TYPE_TECHNICAL) end - property_supported :nameservers do Array.wrap(node("Name Server")).map do |name| Parser::Nameserver.new(name: name) end end - private def build_contact(element, type) diff --git a/lib/whois/scanners/whois.auda.org.au.rb b/lib/whois/scanners/whois.auda.org.au.rb new file mode 100644 index 00000000..13d7416c --- /dev/null +++ b/lib/whois/scanners/whois.auda.org.au.rb @@ -0,0 +1,35 @@ +require_relative 'base' + +module Whois + module Scanners + + # Scanner for the whois.auda.org.au record. + class WhoisAudaOrgAu < Base + + self.tokenizers += [ + :skip_empty_line, + :scan_available, + :skip_lastupdate, + :scan_disclaimer, + :scan_keyvalue, + ] + + tokenizer :scan_available do + if @input.skip(/^(No Data Found)|(NOT FOUND)\n/) + @ast["status:available"] = true + end + end + + tokenizer :skip_lastupdate do + @input.skip(/>>>(.+?)<<<\n/) + end + + tokenizer :scan_disclaimer do + if @input.match?(/^(Afilias Australia Pty Ltd)(.+)\n\n/) + @ast["field:disclaimer"] = _scan_lines_to_array(/(.+)(\n+)/).join("\n") + end + end + end + + end +end diff --git a/lib/whois/scanners/whois.audns.net.au.rb b/lib/whois/scanners/whois.audns.net.au.rb deleted file mode 100644 index b802b085..00000000 --- a/lib/whois/scanners/whois.audns.net.au.rb +++ /dev/null @@ -1,25 +0,0 @@ -require_relative 'base' - -module Whois - module Scanners - - # Scanner for the whois.audns.net.au record. - class WhoisAudnsNetAu < Base - - self.tokenizers += [ - :skip_empty_line, - :scan_available, - :scan_keyvalue, - ] - - - tokenizer :scan_available do - if @input.skip(/^No Data Found\n/) - @ast["status:available"] = true - end - end - - end - - end -end diff --git a/spec/fixtures/responses/whois.auda.org.au/au/property_status_with_multiple.expected b/spec/fixtures/responses/whois.auda.org.au/au/property_status_with_multiple.expected new file mode 100644 index 00000000..e9eba17e --- /dev/null +++ b/spec/fixtures/responses/whois.auda.org.au/au/property_status_with_multiple.expected @@ -0,0 +1,2 @@ +#status + %s == ["serverRenewProhibited https://afilias.com.au/get-au/whois-status-codes#serverRenewProhibited"] diff --git a/spec/fixtures/responses/whois.auda.org.au/au/property_status_with_multiple.txt b/spec/fixtures/responses/whois.auda.org.au/au/property_status_with_multiple.txt new file mode 100644 index 00000000..0daac17c --- /dev/null +++ b/spec/fixtures/responses/whois.auda.org.au/au/property_status_with_multiple.txt @@ -0,0 +1,44 @@ +Domain Name: PINEWOOD.COM.AU +Registry Domain ID: D407400000001847702-AU +Registrar WHOIS Server: whois.synergywholesale.com +Registrar URL: whois.synergywholesale.com +Last Modified: +Registrar Name: Synergy Wholesale Pty Ltd +Registrar Abuse Contact Email: abuse@synergywholesale.com +Registrar Abuse Contact Phone: +61.383999483 +Reseller Name: +Status: serverRenewProhibited https://afilias.com.au/get-au/whois-status-codes#serverRenewProhibited +Registrant Contact ID: NFVKTQY4FP7TA0W +Registrant Contact Name: EMIL ANDONOV +Tech Contact ID: NFSTGFPPDC0HFZ1Q +Tech Contact Name: EMIL ANDONOV +Name Server: DNS1.NETFLEET.COM.AU +Name Server IP: 202.191.63.6 +Name Server: DNS2.NETFLEET.COM.AU +Name Server IP: 180.235.131.172 +DNSSEC: unsigned +Registrant: Pacific Fund Pty Ltd +Registrant ID: ABN 75143185406 +Eligibility Type: Company + +>>> Last update of WHOIS database: 2018-08-07T21:25:00Z <<< + + + +Afilias Australia Pty Ltd (Afilias), for itself and on behalf of .au Domain Administration Limited (auDA), makes the WHOIS registration data directory service (WHOIS Service) available solely for the purposes of: + +(a) querying the availability of a domain name licence; + +(b) identifying the holder of a domain name licence; and/or + +(c) contacting the holder of a domain name licence in relation to that domain name and its use. + +The WHOIS Service must not be used for any other purpose (even if that purpose is lawful), including: + +(a) aggregating, collecting or compiling information from the WHOIS database, whether for personal or commercial purposes; + +(b) enabling the sending of unsolicited electronic communications; and / or + +(c) enabling high volume, automated, electronic processes that send queries or data to the systems of Afilias, any registrar, any domain name licence holder, or auDA. + +The WHOIS Service is provided for information purposes only. By using the WHOIS Service, you agree to be bound by these terms and conditions. The WHOIS Service is operated in accordance with the auDA WHOIS Policy (available at https://www.auda.org.au/policies/index-of-published-policies/2014/2014-07/ ). diff --git a/spec/fixtures/responses/whois.auda.org.au/au/status_available.expected b/spec/fixtures/responses/whois.auda.org.au/au/status_available.expected new file mode 100644 index 00000000..688a1f40 --- /dev/null +++ b/spec/fixtures/responses/whois.auda.org.au/au/status_available.expected @@ -0,0 +1,49 @@ +#disclaimer + %s == "Afilias Australia Pty Ltd (Afilias), for itself and on behalf of .au Domain Administration Limited (auDA), makes the WHOIS registration data directory service (WHOIS Service) available solely for the purposes of:\n(a) querying the availability of a domain name licence;\n(b) identifying the holder of a domain name licence; and/or\n(c) contacting the holder of a domain name licence in relation to that domain name and its use.\nThe WHOIS Service must not be used for any other purpose (even if that purpose is lawful), including:\n(a) aggregating, collecting or compiling information from the WHOIS database, whether for personal or commercial purposes;\n(b) enabling the sending of unsolicited electronic communications; and / or\n(c) enabling high volume, automated, electronic processes that send queries or data to the systems of Afilias, any registrar, any domain name licence holder, or auDA.\nThe WHOIS Service is provided for information purposes only. By using the WHOIS Service, you agree to be bound by these terms and conditions. The WHOIS Service is operated in accordance with the auDA WHOIS Policy (available at https://www.auda.org.au/policies/index-of-published-policies/2014/2014-07/ )." + + +#domain + %s == nil + +#domain_id + %s == nil + + +#status + %s == [] + +#available? + %s == true + +#registered? + %s == false + + +#created_on + %s %ERROR{AttributeNotSupported} + +#updated_on + %s == nil + +#expires_on + %s %ERROR{AttributeNotSupported} + + +#registrar + %s == nil + +#registrant_contacts + %s %CLASS{array} + %s == [] + +#admin_contacts + %s %ERROR{AttributeNotSupported} + +#technical_contacts + %s %CLASS{array} + %s == [] + + +#nameservers + %s %CLASS{array} + %s == [] diff --git a/spec/fixtures/responses/whois.auda.org.au/au/status_available.txt b/spec/fixtures/responses/whois.auda.org.au/au/status_available.txt new file mode 100644 index 00000000..1fc21585 --- /dev/null +++ b/spec/fixtures/responses/whois.auda.org.au/au/status_available.txt @@ -0,0 +1,20 @@ +NOT FOUND +>>> Last update of WHOIS database: 2018-08-07T19:35:44Z <<< + +Afilias Australia Pty Ltd (Afilias), for itself and on behalf of .au Domain Administration Limited (auDA), makes the WHOIS registration data directory service (WHOIS Service) available solely for the purposes of: + +(a) querying the availability of a domain name licence; + +(b) identifying the holder of a domain name licence; and/or + +(c) contacting the holder of a domain name licence in relation to that domain name and its use. + +The WHOIS Service must not be used for any other purpose (even if that purpose is lawful), including: + +(a) aggregating, collecting or compiling information from the WHOIS database, whether for personal or commercial purposes; + +(b) enabling the sending of unsolicited electronic communications; and / or + +(c) enabling high volume, automated, electronic processes that send queries or data to the systems of Afilias, any registrar, any domain name licence holder, or auDA. + +The WHOIS Service is provided for information purposes only. By using the WHOIS Service, you agree to be bound by these terms and conditions. The WHOIS Service is operated in accordance with the auDA WHOIS Policy (available at https://www.auda.org.au/policies/index-of-published-policies/2014/2014-07/ ). diff --git a/spec/fixtures/responses/whois.auda.org.au/au/status_registered.expected b/spec/fixtures/responses/whois.auda.org.au/au/status_registered.expected new file mode 100644 index 00000000..b5e67648 --- /dev/null +++ b/spec/fixtures/responses/whois.auda.org.au/au/status_registered.expected @@ -0,0 +1,92 @@ +#disclaimer + %s == "Afilias Australia Pty Ltd (Afilias), for itself and on behalf of .au Domain Administration Limited (auDA), makes the WHOIS registration data directory service (WHOIS Service) available solely for the purposes of:\n(a) querying the availability of a domain name licence;\n(b) identifying the holder of a domain name licence; and/or\n(c) contacting the holder of a domain name licence in relation to that domain name and its use.\nThe WHOIS Service must not be used for any other purpose (even if that purpose is lawful), including:\n(a) aggregating, collecting or compiling information from the WHOIS database, whether for personal or commercial purposes;\n(b) enabling the sending of unsolicited electronic communications; and / or\n(c) enabling high volume, automated, electronic processes that send queries or data to the systems of Afilias, any registrar, any domain name licence holder, or auDA.\nThe WHOIS Service is provided for information purposes only. By using the WHOIS Service, you agree to be bound by these terms and conditions. The WHOIS Service is operated in accordance with the auDA WHOIS Policy (available at https://www.auda.org.au/policies/index-of-published-policies/2014/2014-07/ )." + + +#domain + %s == "GOOGLE.COM.AU" + +#domain_id + %s == "D407400000001774763-AU" + + +#status + %s == ["clientDeleteProhibited https://afilias.com.au/get-au/whois-status-codes#clientDeleteProhibited", "clientUpdateProhibited https://afilias.com.au/get-au/whois-status-codes#clientUpdateProhibited", "serverDeleteProhibited https://afilias.com.au/get-au/whois-status-codes#serverDeleteProhibited", "serverRenewProhibited https://afilias.com.au/get-au/whois-status-codes#serverRenewProhibited", "serverTransferProhibited https://afilias.com.au/get-au/whois-status-codes#serverTransferProhibited", "serverUpdateProhibited https://afilias.com.au/get-au/whois-status-codes#serverUpdateProhibited"] + +#available? + %s == false + +#registered? + %s == true + + +#created_on + %s %ERROR{AttributeNotSupported} + +#updated_on + %s %CLASS{time} + %s %TIME{2021-08-05 15:18:41 UTC} + +#expires_on + %s %ERROR{AttributeNotSupported} + + +#registrar + %s %CLASS{registrar} + %s.name == "MarkMonitor Corporate Services Inc" + %s.url == nil + +#registrant_contacts + %s %CLASS{array} + %s %SIZE{1} + %s[0] %CLASS{contact} + %s[0].type == Whois::Parser::Contact::TYPE_REGISTRANT + %s[0].id == "MMR-174095" + %s[0].name == "Domain Admin" + %s[0].organization == "Google LLC" + %s[0].address == nil + %s[0].city == nil + %s[0].zip == nil + %s[0].state == nil + %s[0].country == nil + %s[0].country_code == nil + %s[0].phone == nil + %s[0].fax == nil + %s[0].email == nil + %s[0].created_on == nil + %s[0].updated_on == nil + +#admin_contacts + %s %ERROR{AttributeNotSupported} + +#technical_contacts + %s %CLASS{array} + %s %SIZE{1} + %s[0] %CLASS{contact} + %s[0].type == Whois::Parser::Contact::TYPE_TECHNICAL + %s[0].id == "MMR-171195" + %s[0].name == "Domain Administrator" + %s[0].organization == nil + %s[0].address == nil + %s[0].city == nil + %s[0].zip == nil + %s[0].state == nil + %s[0].country == nil + %s[0].country_code == nil + %s[0].phone == nil + %s[0].fax == nil + %s[0].email == nil + %s[0].created_on == nil + %s[0].updated_on == nil + + +#nameservers + %s %CLASS{array} + %s %SIZE{4} + %s[0] %CLASS{nameserver} + %s[0].name == "NS1.GOOGLE.COM" + %s[1] %CLASS{nameserver} + %s[1].name == "NS2.GOOGLE.COM" + %s[2] %CLASS{nameserver} + %s[2].name == "NS3.GOOGLE.COM" + %s[3] %CLASS{nameserver} + %s[3].name == "NS4.GOOGLE.COM" diff --git a/spec/fixtures/responses/whois.auda.org.au/au/status_registered.txt b/spec/fixtures/responses/whois.auda.org.au/au/status_registered.txt new file mode 100644 index 00000000..3ddaa508 --- /dev/null +++ b/spec/fixtures/responses/whois.auda.org.au/au/status_registered.txt @@ -0,0 +1,54 @@ +Domain Name: GOOGLE.COM.AU +Registry Domain ID: D407400000001774763-AU +Registrar WHOIS Server: whois.auda.org.au +Registrar URL: +Last Modified: 2021-08-05T15:18:41Z +Registrar Name: MarkMonitor Corporate Services Inc +Registrar Abuse Contact Email: +Registrar Abuse Contact Phone: +Reseller Name: +Status: clientDeleteProhibited https://afilias.com.au/get-au/whois-status-codes#clientDeleteProhibited +Status: clientUpdateProhibited https://afilias.com.au/get-au/whois-status-codes#clientUpdateProhibited +Status: serverDeleteProhibited https://afilias.com.au/get-au/whois-status-codes#serverDeleteProhibited +Status Reason: Registry Lock +Status: serverRenewProhibited https://afilias.com.au/get-au/whois-status-codes#serverRenewProhibited +Status Reason: Not Currently Eligible For Renewal +Status: serverTransferProhibited https://afilias.com.au/get-au/whois-status-codes#serverTransferProhibited +Status Reason: Registry Lock +Status: serverUpdateProhibited https://afilias.com.au/get-au/whois-status-codes#serverUpdateProhibited +Status Reason: Registry Lock +Registrant Contact ID: MMR-174095 +Registrant Contact Name: Domain Admin +Tech Contact ID: MMR-171195 +Tech Contact Name: Domain Administrator +Name Server: NS1.GOOGLE.COM +Name Server: NS2.GOOGLE.COM +Name Server: NS3.GOOGLE.COM +Name Server: NS4.GOOGLE.COM +DNSSEC: unsigned +Registrant: Google LLC +Eligibility Type: Trademark Owner +Eligibility Name: GOOGLE +Eligibility ID: TM 788234 + +>>> Last update of WHOIS database: 2021-12-14T11:04:43Z <<< + + + +Afilias Australia Pty Ltd (Afilias), for itself and on behalf of .au Domain Administration Limited (auDA), makes the WHOIS registration data directory service (WHOIS Service) available solely for the purposes of: + +(a) querying the availability of a domain name licence; + +(b) identifying the holder of a domain name licence; and/or + +(c) contacting the holder of a domain name licence in relation to that domain name and its use. + +The WHOIS Service must not be used for any other purpose (even if that purpose is lawful), including: + +(a) aggregating, collecting or compiling information from the WHOIS database, whether for personal or commercial purposes; + +(b) enabling the sending of unsolicited electronic communications; and / or + +(c) enabling high volume, automated, electronic processes that send queries or data to the systems of Afilias, any registrar, any domain name licence holder, or auDA. + +The WHOIS Service is provided for information purposes only. By using the WHOIS Service, you agree to be bound by these terms and conditions. The WHOIS Service is operated in accordance with the auDA WHOIS Policy (available at https://www.auda.org.au/policies/index-of-published-policies/2014/2014-07/ ). diff --git a/spec/fixtures/responses/whois.audns.net.au/au/property_status_with_multiple.expected b/spec/fixtures/responses/whois.audns.net.au/au/property_status_with_multiple.expected deleted file mode 100644 index e91d39c1..00000000 --- a/spec/fixtures/responses/whois.audns.net.au/au/property_status_with_multiple.expected +++ /dev/null @@ -1,2 +0,0 @@ -#status - %s == ["serverHold (Expired)", "serverUpdateProhibited (Expired)"] diff --git a/spec/fixtures/responses/whois.audns.net.au/au/property_status_with_multiple.txt b/spec/fixtures/responses/whois.audns.net.au/au/property_status_with_multiple.txt deleted file mode 100644 index 028d12db..00000000 --- a/spec/fixtures/responses/whois.audns.net.au/au/property_status_with_multiple.txt +++ /dev/null @@ -1,22 +0,0 @@ -Domain Name: pinewood.com.au -Last Modified: 11-Oct-2010 00:00:33 UTC -Registrar ID: Melbourne IT -Registrar Name: Melbourne IT -Status: serverHold (Expired) -Status: serverUpdateProhibited (Expired) - -Registrant: PINEWOOD PROLAB PTY LTD -Registrant ID: ACN 120 562 905 -Eligibility Type: Company - -Registrant Contact ID: Z116060879386417 -Registrant Contact Name: PETER TONOLI -Registrant Contact Email: Visit whois.ausregistry.com.au for Web based WhoIs - -Tech Contact ID: Z116060879386417 -Tech Contact Name: PETER TONOLI -Tech Contact Email: Visit whois.ausregistry.com.au for Web based WhoIs - -Name Server: ns1.dreamhost.com -Name Server: ns2.dreamhost.com -Name Server: ns3.dreamhost.com diff --git a/spec/fixtures/responses/whois.audns.net.au/au/status_available.expected b/spec/fixtures/responses/whois.audns.net.au/au/status_available.expected deleted file mode 100644 index 25693bde..00000000 --- a/spec/fixtures/responses/whois.audns.net.au/au/status_available.expected +++ /dev/null @@ -1,49 +0,0 @@ -#disclaimer - %s %ERROR{AttributeNotSupported} - - -#domain - %s == nil - -#domain_id - %s %ERROR{AttributeNotSupported} - - -#status - %s == [] - -#available? - %s == true - -#registered? - %s == false - - -#created_on - %s %ERROR{AttributeNotSupported} - -#updated_on - %s == nil - -#expires_on - %s %ERROR{AttributeNotSupported} - - -#registrar - %s == nil - -#registrant_contacts - %s %CLASS{array} - %s == [] - -#admin_contacts - %s %ERROR{AttributeNotSupported} - -#technical_contacts - %s %CLASS{array} - %s == [] - - -#nameservers - %s %CLASS{array} - %s == [] diff --git a/spec/fixtures/responses/whois.audns.net.au/au/status_available.txt b/spec/fixtures/responses/whois.audns.net.au/au/status_available.txt deleted file mode 100644 index 3831b4b5..00000000 --- a/spec/fixtures/responses/whois.audns.net.au/au/status_available.txt +++ /dev/null @@ -1 +0,0 @@ -No Data Found diff --git a/spec/fixtures/responses/whois.audns.net.au/au/status_registered.expected b/spec/fixtures/responses/whois.audns.net.au/au/status_registered.expected deleted file mode 100644 index 77603cee..00000000 --- a/spec/fixtures/responses/whois.audns.net.au/au/status_registered.expected +++ /dev/null @@ -1,92 +0,0 @@ -#disclaimer - %s %ERROR{AttributeNotSupported} - - -#domain - %s == "google.com.au" - -#domain_id - %s %ERROR{AttributeNotSupported} - - -#status - %s == ["clientDeleteProhibited", "clientUpdateProhibited", "serverDeleteProhibited (Protected by .auLOCKDOWN)", "serverUpdateProhibited (Protected by .auLOCKDOWN)"] - -#available? - %s == false - -#registered? - %s == true - - -#created_on - %s %ERROR{AttributeNotSupported} - -#updated_on - %s %CLASS{time} - %s %TIME{2014-11-05 10:35:59 UTC} - -#expires_on - %s %ERROR{AttributeNotSupported} - - -#registrar - %s %CLASS{registrar} - %s.name == "MarkMonitor Inc." - %s.url == nil - -#registrant_contacts - %s %CLASS{array} - %s %SIZE{1} - %s[0] %CLASS{contact} - %s[0].type == Whois::Parser::Contact::TYPE_REGISTRANT - %s[0].id == "MMR-122026" - %s[0].name == "Domain Administrator" - %s[0].organization == "Google INC" - %s[0].address == nil - %s[0].city == nil - %s[0].zip == nil - %s[0].state == nil - %s[0].country == nil - %s[0].country_code == nil - %s[0].phone == nil - %s[0].fax == nil - %s[0].email == "Visit whois.ausregistry.com.au for Web based WhoIs" - %s[0].created_on == nil - %s[0].updated_on == nil - -#admin_contacts - %s %ERROR{AttributeNotSupported} - -#technical_contacts - %s %CLASS{array} - %s %SIZE{1} - %s[0] %CLASS{contact} - %s[0].type == Whois::Parser::Contact::TYPE_TECHNICAL - %s[0].id == "MMR-87489" - %s[0].name == "DNS Admin" - %s[0].organization == nil - %s[0].address == nil - %s[0].city == nil - %s[0].zip == nil - %s[0].state == nil - %s[0].country == nil - %s[0].country_code == nil - %s[0].phone == nil - %s[0].fax == nil - %s[0].email == "Visit whois.ausregistry.com.au for Web based WhoIs" - %s[0].created_on == nil - %s[0].updated_on == nil - - -#nameservers - %s %CLASS{array} - %s %SIZE{4} - %s[0] %CLASS{nameserver} - %s[0].name == "ns1.google.com" - %s[1] %CLASS{nameserver} - %s[1].name == "ns2.google.com" - %s[2] %CLASS{nameserver} - %s[2].name == "ns3.google.com" - %s[3] %CLASS{nameserver} - %s[3].name == "ns4.google.com" diff --git a/spec/fixtures/responses/whois.audns.net.au/au/status_registered.txt b/spec/fixtures/responses/whois.audns.net.au/au/status_registered.txt deleted file mode 100644 index c7b111e7..00000000 --- a/spec/fixtures/responses/whois.audns.net.au/au/status_registered.txt +++ /dev/null @@ -1,26 +0,0 @@ -Domain Name: google.com.au -Last Modified: 05-Nov-2014 10:35:59 UTC -Status: clientDeleteProhibited -Status: clientUpdateProhibited -Status: serverDeleteProhibited (Protected by .auLOCKDOWN) -Status: serverUpdateProhibited (Protected by .auLOCKDOWN) -Registrar Name: MarkMonitor Inc. - -Registrant: Google INC -Eligibility Type: Trademark Owner -Eligibility Name: GOOGLE -Eligibility ID: TM 788234 - -Registrant Contact ID: MMR-122026 -Registrant Contact Name: Domain Administrator -Registrant Contact Email: Visit whois.ausregistry.com.au for Web based WhoIs - -Tech Contact ID: MMR-87489 -Tech Contact Name: DNS Admin -Tech Contact Email: Visit whois.ausregistry.com.au for Web based WhoIs - -Name Server: ns1.google.com -Name Server: ns2.google.com -Name Server: ns3.google.com -Name Server: ns4.google.com -DNSSEC: unsigned \ No newline at end of file diff --git a/spec/tlds.yml b/spec/tlds.yml index 0fccf0be..bbddfe21 100644 --- a/spec/tlds.yml +++ b/spec/tlds.yml @@ -302,7 +302,7 @@ at: status_available: u34jedzcq.at status_registered: google.at au: - _server: whois.audns.net.au + _server: whois.auda.org.au status_available: u34jedzcq.com.au status_registered: google.com.au _status_registered_skipdiff: diff --git a/spec/whois/parsers/responses/whois.audns.net.au/au/property_status_with_multiple_spec.rb b/spec/whois/parsers/responses/whois.auda.org.au/au/property_status_with_multiple_spec.rb similarity index 52% rename from spec/whois/parsers/responses/whois.audns.net.au/au/property_status_with_multiple_spec.rb rename to spec/whois/parsers/responses/whois.auda.org.au/au/property_status_with_multiple_spec.rb index bb174d4f..e24ed513 100644 --- a/spec/whois/parsers/responses/whois.audns.net.au/au/property_status_with_multiple_spec.rb +++ b/spec/whois/parsers/responses/whois.auda.org.au/au/property_status_with_multiple_spec.rb @@ -3,7 +3,7 @@ # This file is autogenerated. Do not edit it manually. # If you want change the content of this file, edit # -# /spec/fixtures/responses/whois.audns.net.au/au/property_status_with_multiple.expected +# /spec/fixtures/responses/whois.auda.org.au/au/property_status_with_multiple.expected # # and regenerate the tests with the following rake task # @@ -12,15 +12,15 @@ require 'spec_helper' -describe "whois.audns.net.au", :aggregate_failures do +describe "whois.auda.org.au", :aggregate_failures do subject do - file = fixture("responses", "whois.audns.net.au/au/property_status_with_multiple.txt") - part = Whois::Record::Part.new(body: File.read(file), host: "whois.audns.net.au") + file = fixture("responses", "whois.auda.org.au/au/property_status_with_multiple.txt") + part = Whois::Record::Part.new(body: File.read(file), host: "whois.auda.org.au") Whois::Parser.parser_for(part) end it "matches property_status_with_multiple.expected" do - expect(subject.status).to eq(["serverHold (Expired)", "serverUpdateProhibited (Expired)"]) + expect(subject.status).to eq(["serverRenewProhibited https://afilias.com.au/get-au/whois-status-codes#serverRenewProhibited"]) end end diff --git a/spec/whois/parsers/responses/whois.auda.org.au/au/status_available_spec.rb b/spec/whois/parsers/responses/whois.auda.org.au/au/status_available_spec.rb new file mode 100644 index 00000000..afa0eb8c --- /dev/null +++ b/spec/whois/parsers/responses/whois.auda.org.au/au/status_available_spec.rb @@ -0,0 +1,42 @@ +# encoding: utf-8 + +# This file is autogenerated. Do not edit it manually. +# If you want change the content of this file, edit +# +# /spec/fixtures/responses/whois.auda.org.au/au/status_available.expected +# +# and regenerate the tests with the following rake task +# +# $ rake spec:generate +# + +require 'spec_helper' + +describe "whois.auda.org.au", :aggregate_failures do + + subject do + file = fixture("responses", "whois.auda.org.au/au/status_available.txt") + part = Whois::Record::Part.new(body: File.read(file), host: "whois.auda.org.au") + Whois::Parser.parser_for(part) + end + + it "matches status_available.expected" do + expect(subject.disclaimer).to eq("Afilias Australia Pty Ltd (Afilias), for itself and on behalf of .au Domain Administration Limited (auDA), makes the WHOIS registration data directory service (WHOIS Service) available solely for the purposes of:\n(a) querying the availability of a domain name licence;\n(b) identifying the holder of a domain name licence; and/or\n(c) contacting the holder of a domain name licence in relation to that domain name and its use.\nThe WHOIS Service must not be used for any other purpose (even if that purpose is lawful), including:\n(a) aggregating, collecting or compiling information from the WHOIS database, whether for personal or commercial purposes;\n(b) enabling the sending of unsolicited electronic communications; and / or\n(c) enabling high volume, automated, electronic processes that send queries or data to the systems of Afilias, any registrar, any domain name licence holder, or auDA.\nThe WHOIS Service is provided for information purposes only. By using the WHOIS Service, you agree to be bound by these terms and conditions. The WHOIS Service is operated in accordance with the auDA WHOIS Policy (available at https://www.auda.org.au/policies/index-of-published-policies/2014/2014-07/ ).") + expect(subject.domain).to eq(nil) + expect(subject.domain_id).to eq(nil) + expect(subject.status).to eq([]) + expect(subject.available?).to eq(true) + expect(subject.registered?).to eq(false) + expect { subject.created_on }.to raise_error(Whois::AttributeNotSupported) + expect(subject.updated_on).to eq(nil) + expect { subject.expires_on }.to raise_error(Whois::AttributeNotSupported) + expect(subject.registrar).to eq(nil) + expect(subject.registrant_contacts).to be_a(Array) + expect(subject.registrant_contacts).to eq([]) + expect { subject.admin_contacts }.to raise_error(Whois::AttributeNotSupported) + expect(subject.technical_contacts).to be_a(Array) + expect(subject.technical_contacts).to eq([]) + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers).to eq([]) + end +end diff --git a/spec/whois/parsers/responses/whois.audns.net.au/au/status_registered_spec.rb b/spec/whois/parsers/responses/whois.auda.org.au/au/status_registered_spec.rb similarity index 52% rename from spec/whois/parsers/responses/whois.audns.net.au/au/status_registered_spec.rb rename to spec/whois/parsers/responses/whois.auda.org.au/au/status_registered_spec.rb index 17dc8d96..3b60b994 100644 --- a/spec/whois/parsers/responses/whois.audns.net.au/au/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.auda.org.au/au/status_registered_spec.rb @@ -3,7 +3,7 @@ # This file is autogenerated. Do not edit it manually. # If you want change the content of this file, edit # -# /spec/fixtures/responses/whois.audns.net.au/au/status_registered.expected +# /spec/fixtures/responses/whois.auda.org.au/au/status_registered.expected # # and regenerate the tests with the following rake task # @@ -12,35 +12,35 @@ require 'spec_helper' -describe "whois.audns.net.au", :aggregate_failures do +describe "whois.auda.org.au", :aggregate_failures do subject do - file = fixture("responses", "whois.audns.net.au/au/status_registered.txt") - part = Whois::Record::Part.new(body: File.read(file), host: "whois.audns.net.au") + file = fixture("responses", "whois.auda.org.au/au/status_registered.txt") + part = Whois::Record::Part.new(body: File.read(file), host: "whois.auda.org.au") Whois::Parser.parser_for(part) end it "matches status_registered.expected" do - expect { subject.disclaimer }.to raise_error(Whois::AttributeNotSupported) - expect(subject.domain).to eq("google.com.au") - expect { subject.domain_id }.to raise_error(Whois::AttributeNotSupported) - expect(subject.status).to eq(["clientDeleteProhibited", "clientUpdateProhibited", "serverDeleteProhibited (Protected by .auLOCKDOWN)", "serverUpdateProhibited (Protected by .auLOCKDOWN)"]) + expect(subject.disclaimer).to eq("Afilias Australia Pty Ltd (Afilias), for itself and on behalf of .au Domain Administration Limited (auDA), makes the WHOIS registration data directory service (WHOIS Service) available solely for the purposes of:\n(a) querying the availability of a domain name licence;\n(b) identifying the holder of a domain name licence; and/or\n(c) contacting the holder of a domain name licence in relation to that domain name and its use.\nThe WHOIS Service must not be used for any other purpose (even if that purpose is lawful), including:\n(a) aggregating, collecting or compiling information from the WHOIS database, whether for personal or commercial purposes;\n(b) enabling the sending of unsolicited electronic communications; and / or\n(c) enabling high volume, automated, electronic processes that send queries or data to the systems of Afilias, any registrar, any domain name licence holder, or auDA.\nThe WHOIS Service is provided for information purposes only. By using the WHOIS Service, you agree to be bound by these terms and conditions. The WHOIS Service is operated in accordance with the auDA WHOIS Policy (available at https://www.auda.org.au/policies/index-of-published-policies/2014/2014-07/ ).") + expect(subject.domain).to eq("GOOGLE.COM.AU") + expect(subject.domain_id).to eq("D407400000001774763-AU") + expect(subject.status).to eq(["clientDeleteProhibited https://afilias.com.au/get-au/whois-status-codes#clientDeleteProhibited", "clientUpdateProhibited https://afilias.com.au/get-au/whois-status-codes#clientUpdateProhibited", "serverDeleteProhibited https://afilias.com.au/get-au/whois-status-codes#serverDeleteProhibited", "serverRenewProhibited https://afilias.com.au/get-au/whois-status-codes#serverRenewProhibited", "serverTransferProhibited https://afilias.com.au/get-au/whois-status-codes#serverTransferProhibited", "serverUpdateProhibited https://afilias.com.au/get-au/whois-status-codes#serverUpdateProhibited"]) expect(subject.available?).to eq(false) expect(subject.registered?).to eq(true) expect { subject.created_on }.to raise_error(Whois::AttributeNotSupported) expect(subject.updated_on).to be_a(Time) - expect(subject.updated_on).to eq(DateTime.parse("2014-11-05 10:35:59 UTC")) + expect(subject.updated_on).to eq(DateTime.parse("2021-08-05 15:18:41 UTC")) expect { subject.expires_on }.to raise_error(Whois::AttributeNotSupported) expect(subject.registrar).to be_a(Whois::Parser::Registrar) - expect(subject.registrar.name).to eq("MarkMonitor Inc.") + expect(subject.registrar.name).to eq("MarkMonitor Corporate Services Inc") expect(subject.registrar.url).to eq(nil) expect(subject.registrant_contacts).to be_a(Array) expect(subject.registrant_contacts.size).to eq(1) expect(subject.registrant_contacts[0]).to be_a(Whois::Parser::Contact) expect(subject.registrant_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_REGISTRANT) - expect(subject.registrant_contacts[0].id).to eq("MMR-122026") - expect(subject.registrant_contacts[0].name).to eq("Domain Administrator") - expect(subject.registrant_contacts[0].organization).to eq("Google INC") + expect(subject.registrant_contacts[0].id).to eq("MMR-174095") + expect(subject.registrant_contacts[0].name).to eq("Domain Admin") + expect(subject.registrant_contacts[0].organization).to eq("Google LLC") expect(subject.registrant_contacts[0].address).to eq(nil) expect(subject.registrant_contacts[0].city).to eq(nil) expect(subject.registrant_contacts[0].zip).to eq(nil) @@ -49,7 +49,7 @@ expect(subject.registrant_contacts[0].country_code).to eq(nil) expect(subject.registrant_contacts[0].phone).to eq(nil) expect(subject.registrant_contacts[0].fax).to eq(nil) - expect(subject.registrant_contacts[0].email).to eq("Visit whois.ausregistry.com.au for Web based WhoIs") + expect(subject.registrant_contacts[0].email).to eq(nil) expect(subject.registrant_contacts[0].created_on).to eq(nil) expect(subject.registrant_contacts[0].updated_on).to eq(nil) expect { subject.admin_contacts }.to raise_error(Whois::AttributeNotSupported) @@ -57,8 +57,8 @@ expect(subject.technical_contacts.size).to eq(1) expect(subject.technical_contacts[0]).to be_a(Whois::Parser::Contact) expect(subject.technical_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_TECHNICAL) - expect(subject.technical_contacts[0].id).to eq("MMR-87489") - expect(subject.technical_contacts[0].name).to eq("DNS Admin") + expect(subject.technical_contacts[0].id).to eq("MMR-171195") + expect(subject.technical_contacts[0].name).to eq("Domain Administrator") expect(subject.technical_contacts[0].organization).to eq(nil) expect(subject.technical_contacts[0].address).to eq(nil) expect(subject.technical_contacts[0].city).to eq(nil) @@ -68,18 +68,18 @@ expect(subject.technical_contacts[0].country_code).to eq(nil) expect(subject.technical_contacts[0].phone).to eq(nil) expect(subject.technical_contacts[0].fax).to eq(nil) - expect(subject.technical_contacts[0].email).to eq("Visit whois.ausregistry.com.au for Web based WhoIs") + expect(subject.technical_contacts[0].email).to eq(nil) expect(subject.technical_contacts[0].created_on).to eq(nil) expect(subject.technical_contacts[0].updated_on).to eq(nil) expect(subject.nameservers).to be_a(Array) expect(subject.nameservers.size).to eq(4) expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[0].name).to eq("ns1.google.com") + expect(subject.nameservers[0].name).to eq("NS1.GOOGLE.COM") expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[1].name).to eq("ns2.google.com") + expect(subject.nameservers[1].name).to eq("NS2.GOOGLE.COM") expect(subject.nameservers[2]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[2].name).to eq("ns3.google.com") + expect(subject.nameservers[2].name).to eq("NS3.GOOGLE.COM") expect(subject.nameservers[3]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[3].name).to eq("ns4.google.com") + expect(subject.nameservers[3].name).to eq("NS4.GOOGLE.COM") end end diff --git a/spec/whois/parsers/responses/whois.audns.net.au/au/status_available_spec.rb b/spec/whois/parsers/responses/whois.audns.net.au/au/status_available_spec.rb deleted file mode 100644 index fba56a55..00000000 --- a/spec/whois/parsers/responses/whois.audns.net.au/au/status_available_spec.rb +++ /dev/null @@ -1,42 +0,0 @@ -# encoding: utf-8 - -# This file is autogenerated. Do not edit it manually. -# If you want change the content of this file, edit -# -# /spec/fixtures/responses/whois.audns.net.au/au/status_available.expected -# -# and regenerate the tests with the following rake task -# -# $ rake spec:generate -# - -require 'spec_helper' - -describe "whois.audns.net.au", :aggregate_failures do - - subject do - file = fixture("responses", "whois.audns.net.au/au/status_available.txt") - part = Whois::Record::Part.new(body: File.read(file), host: "whois.audns.net.au") - Whois::Parser.parser_for(part) - end - - it "matches status_available.expected" do - expect { subject.disclaimer }.to raise_error(Whois::AttributeNotSupported) - expect(subject.domain).to eq(nil) - expect { subject.domain_id }.to raise_error(Whois::AttributeNotSupported) - expect(subject.status).to eq([]) - expect(subject.available?).to eq(true) - expect(subject.registered?).to eq(false) - expect { subject.created_on }.to raise_error(Whois::AttributeNotSupported) - expect(subject.updated_on).to eq(nil) - expect { subject.expires_on }.to raise_error(Whois::AttributeNotSupported) - expect(subject.registrar).to eq(nil) - expect(subject.registrant_contacts).to be_a(Array) - expect(subject.registrant_contacts).to eq([]) - expect { subject.admin_contacts }.to raise_error(Whois::AttributeNotSupported) - expect(subject.technical_contacts).to be_a(Array) - expect(subject.technical_contacts).to eq([]) - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers).to eq([]) - end -end From f71eab849cc5e9e197bcd10cd18380181b555cae Mon Sep 17 00:00:00 2001 From: Adrien Rey-Jarthon Date: Wed, 15 Dec 2021 16:11:36 +0100 Subject: [PATCH 15/29] Fixed parser for .MX tld (and derivates: .COM.MX, .ORG.MX, etc.) --- CHANGELOG.md | 1 + lib/whois/parsers/{whois.nic.mx.rb => whois.mx.rb} | 2 +- .../mx/property_nameservers_with_ip.expected | 0 .../mx/property_nameservers_with_ip.txt | 0 .../mx/status_available.expected | 0 .../{whois.nic.mx => whois.mx}/mx/status_available.txt | 0 .../mx/status_registered.expected | 0 .../{whois.nic.mx => whois.mx}/mx/status_registered.txt | 0 spec/tlds.yml | 2 +- .../mx/property_nameservers_with_ip_spec.rb | 8 ++++---- .../mx/status_available_spec.rb | 8 ++++---- .../mx/status_registered_spec.rb | 8 ++++---- 12 files changed, 15 insertions(+), 14 deletions(-) rename lib/whois/parsers/{whois.nic.mx.rb => whois.mx.rb} (98%) rename spec/fixtures/responses/{whois.nic.mx => whois.mx}/mx/property_nameservers_with_ip.expected (100%) rename spec/fixtures/responses/{whois.nic.mx => whois.mx}/mx/property_nameservers_with_ip.txt (100%) rename spec/fixtures/responses/{whois.nic.mx => whois.mx}/mx/status_available.expected (100%) rename spec/fixtures/responses/{whois.nic.mx => whois.mx}/mx/status_available.txt (100%) rename spec/fixtures/responses/{whois.nic.mx => whois.mx}/mx/status_registered.expected (100%) rename spec/fixtures/responses/{whois.nic.mx => whois.mx}/mx/status_registered.txt (100%) rename spec/whois/parsers/responses/{whois.nic.mx => whois.mx}/mx/property_nameservers_with_ip_spec.rb (79%) rename spec/whois/parsers/responses/{whois.nic.mx => whois.mx}/mx/status_available_spec.rb (77%) rename spec/whois/parsers/responses/{whois.nic.mx => whois.mx}/mx/status_registered_spec.rb (89%) diff --git a/CHANGELOG.md b/CHANGELOG.md index 8b138e68..1e7d8bf7 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,7 @@ This project uses [Semantic Versioning 2.0.0](http://semver.org/). #### master +- FIX: Updated parser for .MX tld (and derivates: .COM.MX, .ORG.MX, etc.) which changed name - FIX: Updated parser for .COM.AU tld (based on #100) Thanks @kovalevsky - NEW: Added support for all DonutsInc TLDs (241 at the time: .ACADEMY, .ACCOUNTANTS, .ACTOR, .AGENCY, .AIRFORCE, .APARTMENTS, .ARMY, .ASSOCIATES, .ATTORNEY, .AUCTION, .BAND, .BARGAINS, .BIKE, .BINGO, .BOUTIQUE, .BUILDERS, .BUSINESS, .CAB, .CAFE, .CAMERA, .CAMP, .CAPITAL, .CARDS, .CARE, .CAREERS, .CASH, .CASINO, .CATERING, .CENTER, .CHARITY, .CHAT, .CHEAP, .CHURCH, .CITY, .CLAIMS, .CLEANING, .CLINIC, .CLOTHING, .COACH, .CODES, .COFFEE, .COMMUNITY, .COMPANY, .COMPUTER, .CONDOS, .CONSTRUCTION, .CONTACT, .CONTRACTORS, .COOL, .COUPONS, .CREDIT, .CREDITCARD, .CRUISES, .DANCE, .DATING, .DEALS, .DEGREE, .DELIVERY, .DEMOCRAT, .DENTAL, .DENTIST, .DIAMONDS, .DIGITAL, .DIRECT, .DIRECTORY, .DISCOUNT, .DOCTOR, .DOG, .DOMAINS, .EDUCATION, .EMAIL, .ENERGY, .ENGINEER, .ENGINEERING, .ENTERPRISES, .EQUIPMENT, .ESTATE, .EVENTS, .EXCHANGE, .EXPERT, .EXPOSED, .EXPRESS, .FAIL, .FAMILY, .FAN, .FARM, .FINANCE, .FINANCIAL, .FISH, .FITNESS, .FLIGHTS, .FLORIST, .FOOTBALL, .FORSALE, .FOUNDATION, .FUND, .FURNITURE, .FUTBOL, .FYI, .GALLERY, .GAMES, .GIFTS, .GIVES, .GLASS, .GMBH, .GOLD, .GOLF, .GRAPHICS, .GRATIS, .GRIPE, .GROUP, .GUIDE, .GURU, .HAUS, .HEALTHCARE, .HOCKEY, .HOLDINGS, .HOLIDAY, .HOSPITAL, .HOUSE, .IMMO, .IMMOBILIEN, .INDUSTRIES, .INSTITUTE, .INSURE, .INTERNATIONAL, .INVESTMENTS, .IRISH, .JETZT, .JEWELRY, .KAUFEN, .KITCHEN, .LAND, .LAWYER, .LEASE, .LEGAL, .LIFE, .LIGHTING, .LIMITED, .LIMO, .LIVE, .LOANS, .LTD, .MAISON, .MANAGEMENT, .MARKET, .MARKETING, .MBA, .MEDIA, .MEMORIAL, .MODA, .MONEY, .MORTGAGE, .MOVIE, .NAVY, .NETWORK, .NEWS, .NINJA, .PARTNERS, .PARTS, .PHOTOGRAPHY, .PHOTOS, .PICTURES, .PIZZA, .PLACE, .PLUMBING, .PLUS, .PRODUCTIONS, .PROPERTIES, .PUB, .RECIPES, .REHAB, .REISE, .REISEN, .RENTALS, .REPAIR, .REPORT, .REPUBLICAN, .RESTAURANT, .REVIEWS, .RIP, .ROCKS, .RUN, .SALE, .SALON, .SARL, .SCHOOL, .SCHULE, .SERVICES, .SHOES, .SHOPPING, .SHOW, .SINGLES, .SOCCER, .SOCIAL, .SOFTWARE, .SOLAR, .SOLUTIONS, .STUDIO, .STYLE, .SUPPLIES, .SUPPLY, .SUPPORT, .SURGERY, .SYSTEMS, .TAX, .TAXI, .TEAM, .TECHNOLOGY, .TENNIS, .THEATER, .TIENDA, .TIPS, .TIRES, .TODAY, .TOOLS, .TOURS, .TOWN, .TOYS, .TRAINING, .TRAVEL, .UNIVERSITY, .VACATIONS, .VENTURES, .VET, .VIAJES, .VIDEO, .VILLAS, .VIN, .VISION, .VOYAGE, .WATCH, .WINE, .WORKS, .WORLD, .WTF, .ZONE, .企业, .娱乐, .游戏, .商店) - FIX: Updated parser for .CA tld diff --git a/lib/whois/parsers/whois.nic.mx.rb b/lib/whois/parsers/whois.mx.rb similarity index 98% rename from lib/whois/parsers/whois.nic.mx.rb rename to lib/whois/parsers/whois.mx.rb index f2f87939..0f0db67d 100644 --- a/lib/whois/parsers/whois.nic.mx.rb +++ b/lib/whois/parsers/whois.mx.rb @@ -24,7 +24,7 @@ class Parsers # See WhoisNicIt parser for an explanation of all available methods # and examples. # - class WhoisNicMx < Base + class WhoisMx < Base property_supported :status do if available? diff --git a/spec/fixtures/responses/whois.nic.mx/mx/property_nameservers_with_ip.expected b/spec/fixtures/responses/whois.mx/mx/property_nameservers_with_ip.expected similarity index 100% rename from spec/fixtures/responses/whois.nic.mx/mx/property_nameservers_with_ip.expected rename to spec/fixtures/responses/whois.mx/mx/property_nameservers_with_ip.expected diff --git a/spec/fixtures/responses/whois.nic.mx/mx/property_nameservers_with_ip.txt b/spec/fixtures/responses/whois.mx/mx/property_nameservers_with_ip.txt similarity index 100% rename from spec/fixtures/responses/whois.nic.mx/mx/property_nameservers_with_ip.txt rename to spec/fixtures/responses/whois.mx/mx/property_nameservers_with_ip.txt diff --git a/spec/fixtures/responses/whois.nic.mx/mx/status_available.expected b/spec/fixtures/responses/whois.mx/mx/status_available.expected similarity index 100% rename from spec/fixtures/responses/whois.nic.mx/mx/status_available.expected rename to spec/fixtures/responses/whois.mx/mx/status_available.expected diff --git a/spec/fixtures/responses/whois.nic.mx/mx/status_available.txt b/spec/fixtures/responses/whois.mx/mx/status_available.txt similarity index 100% rename from spec/fixtures/responses/whois.nic.mx/mx/status_available.txt rename to spec/fixtures/responses/whois.mx/mx/status_available.txt diff --git a/spec/fixtures/responses/whois.nic.mx/mx/status_registered.expected b/spec/fixtures/responses/whois.mx/mx/status_registered.expected similarity index 100% rename from spec/fixtures/responses/whois.nic.mx/mx/status_registered.expected rename to spec/fixtures/responses/whois.mx/mx/status_registered.expected diff --git a/spec/fixtures/responses/whois.nic.mx/mx/status_registered.txt b/spec/fixtures/responses/whois.mx/mx/status_registered.txt similarity index 100% rename from spec/fixtures/responses/whois.nic.mx/mx/status_registered.txt rename to spec/fixtures/responses/whois.mx/mx/status_registered.txt diff --git a/spec/tlds.yml b/spec/tlds.yml index bbddfe21..84ffb587 100644 --- a/spec/tlds.yml +++ b/spec/tlds.yml @@ -844,7 +844,7 @@ mv: mw: _adapter: web mx: - _server: whois.nic.mc + _server: whois.mx status_available: u34jedzcq.mx status_registered: google.mx my: diff --git a/spec/whois/parsers/responses/whois.nic.mx/mx/property_nameservers_with_ip_spec.rb b/spec/whois/parsers/responses/whois.mx/mx/property_nameservers_with_ip_spec.rb similarity index 79% rename from spec/whois/parsers/responses/whois.nic.mx/mx/property_nameservers_with_ip_spec.rb rename to spec/whois/parsers/responses/whois.mx/mx/property_nameservers_with_ip_spec.rb index 2e0fa20f..ccf8735a 100644 --- a/spec/whois/parsers/responses/whois.nic.mx/mx/property_nameservers_with_ip_spec.rb +++ b/spec/whois/parsers/responses/whois.mx/mx/property_nameservers_with_ip_spec.rb @@ -3,7 +3,7 @@ # This file is autogenerated. Do not edit it manually. # If you want change the content of this file, edit # -# /spec/fixtures/responses/whois.nic.mx/mx/property_nameservers_with_ip.expected +# /spec/fixtures/responses/whois.mx/mx/property_nameservers_with_ip.expected # # and regenerate the tests with the following rake task # @@ -12,11 +12,11 @@ require 'spec_helper' -describe "whois.nic.mx", :aggregate_failures do +describe "whois.mx", :aggregate_failures do subject do - file = fixture("responses", "whois.nic.mx/mx/property_nameservers_with_ip.txt") - part = Whois::Record::Part.new(body: File.read(file), host: "whois.nic.mx") + file = fixture("responses", "whois.mx/mx/property_nameservers_with_ip.txt") + part = Whois::Record::Part.new(body: File.read(file), host: "whois.mx") Whois::Parser.parser_for(part) end diff --git a/spec/whois/parsers/responses/whois.nic.mx/mx/status_available_spec.rb b/spec/whois/parsers/responses/whois.mx/mx/status_available_spec.rb similarity index 77% rename from spec/whois/parsers/responses/whois.nic.mx/mx/status_available_spec.rb rename to spec/whois/parsers/responses/whois.mx/mx/status_available_spec.rb index 8105dee9..e5d12784 100644 --- a/spec/whois/parsers/responses/whois.nic.mx/mx/status_available_spec.rb +++ b/spec/whois/parsers/responses/whois.mx/mx/status_available_spec.rb @@ -3,7 +3,7 @@ # This file is autogenerated. Do not edit it manually. # If you want change the content of this file, edit # -# /spec/fixtures/responses/whois.nic.mx/mx/status_available.expected +# /spec/fixtures/responses/whois.mx/mx/status_available.expected # # and regenerate the tests with the following rake task # @@ -12,11 +12,11 @@ require 'spec_helper' -describe "whois.nic.mx", :aggregate_failures do +describe "whois.mx", :aggregate_failures do subject do - file = fixture("responses", "whois.nic.mx/mx/status_available.txt") - part = Whois::Record::Part.new(body: File.read(file), host: "whois.nic.mx") + file = fixture("responses", "whois.mx/mx/status_available.txt") + part = Whois::Record::Part.new(body: File.read(file), host: "whois.mx") Whois::Parser.parser_for(part) end diff --git a/spec/whois/parsers/responses/whois.nic.mx/mx/status_registered_spec.rb b/spec/whois/parsers/responses/whois.mx/mx/status_registered_spec.rb similarity index 89% rename from spec/whois/parsers/responses/whois.nic.mx/mx/status_registered_spec.rb rename to spec/whois/parsers/responses/whois.mx/mx/status_registered_spec.rb index 9d989d91..7c159b0c 100644 --- a/spec/whois/parsers/responses/whois.nic.mx/mx/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.mx/mx/status_registered_spec.rb @@ -3,7 +3,7 @@ # This file is autogenerated. Do not edit it manually. # If you want change the content of this file, edit # -# /spec/fixtures/responses/whois.nic.mx/mx/status_registered.expected +# /spec/fixtures/responses/whois.mx/mx/status_registered.expected # # and regenerate the tests with the following rake task # @@ -12,11 +12,11 @@ require 'spec_helper' -describe "whois.nic.mx", :aggregate_failures do +describe "whois.mx", :aggregate_failures do subject do - file = fixture("responses", "whois.nic.mx/mx/status_registered.txt") - part = Whois::Record::Part.new(body: File.read(file), host: "whois.nic.mx") + file = fixture("responses", "whois.mx/mx/status_registered.txt") + part = Whois::Record::Part.new(body: File.read(file), host: "whois.mx") Whois::Parser.parser_for(part) end From e8bc52af18b1b960a26fe095d405fcfa762a0fcf Mon Sep 17 00:00:00 2001 From: Adrien Rey-Jarthon Date: Wed, 15 Dec 2021 16:25:28 +0100 Subject: [PATCH 16/29] Fixed parser for .IN tld --- CHANGELOG.md | 1 + .../{whois.inregistry.net.rb => whois.registry.in.rb} | 2 +- .../in/status_available.expected | 0 .../in/status_available.txt | 0 .../in/status_registered.expected | 0 .../in/status_registered.txt | 0 .../in/status_available_spec.rb | 8 ++++---- .../in/status_registered_spec.rb | 8 ++++---- 8 files changed, 10 insertions(+), 9 deletions(-) rename lib/whois/parsers/{whois.inregistry.net.rb => whois.registry.in.rb} (88%) rename spec/fixtures/responses/{whois.inregistry.net => whois.registry.in}/in/status_available.expected (100%) rename spec/fixtures/responses/{whois.inregistry.net => whois.registry.in}/in/status_available.txt (100%) rename spec/fixtures/responses/{whois.inregistry.net => whois.registry.in}/in/status_registered.expected (100%) rename spec/fixtures/responses/{whois.inregistry.net => whois.registry.in}/in/status_registered.txt (100%) rename spec/whois/parsers/responses/{whois.inregistry.net => whois.registry.in}/in/status_available_spec.rb (90%) rename spec/whois/parsers/responses/{whois.inregistry.net => whois.registry.in}/in/status_registered_spec.rb (96%) diff --git a/CHANGELOG.md b/CHANGELOG.md index 1e7d8bf7..ff9b3926 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,7 @@ This project uses [Semantic Versioning 2.0.0](http://semver.org/). #### master +- FIX: Updated parser for .IN tld which changed name - FIX: Updated parser for .MX tld (and derivates: .COM.MX, .ORG.MX, etc.) which changed name - FIX: Updated parser for .COM.AU tld (based on #100) Thanks @kovalevsky - NEW: Added support for all DonutsInc TLDs (241 at the time: .ACADEMY, .ACCOUNTANTS, .ACTOR, .AGENCY, .AIRFORCE, .APARTMENTS, .ARMY, .ASSOCIATES, .ATTORNEY, .AUCTION, .BAND, .BARGAINS, .BIKE, .BINGO, .BOUTIQUE, .BUILDERS, .BUSINESS, .CAB, .CAFE, .CAMERA, .CAMP, .CAPITAL, .CARDS, .CARE, .CAREERS, .CASH, .CASINO, .CATERING, .CENTER, .CHARITY, .CHAT, .CHEAP, .CHURCH, .CITY, .CLAIMS, .CLEANING, .CLINIC, .CLOTHING, .COACH, .CODES, .COFFEE, .COMMUNITY, .COMPANY, .COMPUTER, .CONDOS, .CONSTRUCTION, .CONTACT, .CONTRACTORS, .COOL, .COUPONS, .CREDIT, .CREDITCARD, .CRUISES, .DANCE, .DATING, .DEALS, .DEGREE, .DELIVERY, .DEMOCRAT, .DENTAL, .DENTIST, .DIAMONDS, .DIGITAL, .DIRECT, .DIRECTORY, .DISCOUNT, .DOCTOR, .DOG, .DOMAINS, .EDUCATION, .EMAIL, .ENERGY, .ENGINEER, .ENGINEERING, .ENTERPRISES, .EQUIPMENT, .ESTATE, .EVENTS, .EXCHANGE, .EXPERT, .EXPOSED, .EXPRESS, .FAIL, .FAMILY, .FAN, .FARM, .FINANCE, .FINANCIAL, .FISH, .FITNESS, .FLIGHTS, .FLORIST, .FOOTBALL, .FORSALE, .FOUNDATION, .FUND, .FURNITURE, .FUTBOL, .FYI, .GALLERY, .GAMES, .GIFTS, .GIVES, .GLASS, .GMBH, .GOLD, .GOLF, .GRAPHICS, .GRATIS, .GRIPE, .GROUP, .GUIDE, .GURU, .HAUS, .HEALTHCARE, .HOCKEY, .HOLDINGS, .HOLIDAY, .HOSPITAL, .HOUSE, .IMMO, .IMMOBILIEN, .INDUSTRIES, .INSTITUTE, .INSURE, .INTERNATIONAL, .INVESTMENTS, .IRISH, .JETZT, .JEWELRY, .KAUFEN, .KITCHEN, .LAND, .LAWYER, .LEASE, .LEGAL, .LIFE, .LIGHTING, .LIMITED, .LIMO, .LIVE, .LOANS, .LTD, .MAISON, .MANAGEMENT, .MARKET, .MARKETING, .MBA, .MEDIA, .MEMORIAL, .MODA, .MONEY, .MORTGAGE, .MOVIE, .NAVY, .NETWORK, .NEWS, .NINJA, .PARTNERS, .PARTS, .PHOTOGRAPHY, .PHOTOS, .PICTURES, .PIZZA, .PLACE, .PLUMBING, .PLUS, .PRODUCTIONS, .PROPERTIES, .PUB, .RECIPES, .REHAB, .REISE, .REISEN, .RENTALS, .REPAIR, .REPORT, .REPUBLICAN, .RESTAURANT, .REVIEWS, .RIP, .ROCKS, .RUN, .SALE, .SALON, .SARL, .SCHOOL, .SCHULE, .SERVICES, .SHOES, .SHOPPING, .SHOW, .SINGLES, .SOCCER, .SOCIAL, .SOFTWARE, .SOLAR, .SOLUTIONS, .STUDIO, .STYLE, .SUPPLIES, .SUPPLY, .SUPPORT, .SURGERY, .SYSTEMS, .TAX, .TAXI, .TEAM, .TECHNOLOGY, .TENNIS, .THEATER, .TIENDA, .TIPS, .TIRES, .TODAY, .TOOLS, .TOURS, .TOWN, .TOYS, .TRAINING, .TRAVEL, .UNIVERSITY, .VACATIONS, .VENTURES, .VET, .VIAJES, .VIDEO, .VILLAS, .VIN, .VISION, .VOYAGE, .WATCH, .WINE, .WORKS, .WORLD, .WTF, .ZONE, .企业, .娱乐, .游戏, .商店) diff --git a/lib/whois/parsers/whois.inregistry.net.rb b/lib/whois/parsers/whois.registry.in.rb similarity index 88% rename from lib/whois/parsers/whois.inregistry.net.rb rename to lib/whois/parsers/whois.registry.in.rb index 6046be64..b557e8bd 100644 --- a/lib/whois/parsers/whois.inregistry.net.rb +++ b/lib/whois/parsers/whois.registry.in.rb @@ -14,7 +14,7 @@ module Whois class Parsers # Parser for the whois.inregistry.net server. - class WhoisInregistryNet < BaseAfilias + class WhoisRegistryIn < BaseAfilias self.scanner = Scanners::BaseAfilias diff --git a/spec/fixtures/responses/whois.inregistry.net/in/status_available.expected b/spec/fixtures/responses/whois.registry.in/in/status_available.expected similarity index 100% rename from spec/fixtures/responses/whois.inregistry.net/in/status_available.expected rename to spec/fixtures/responses/whois.registry.in/in/status_available.expected diff --git a/spec/fixtures/responses/whois.inregistry.net/in/status_available.txt b/spec/fixtures/responses/whois.registry.in/in/status_available.txt similarity index 100% rename from spec/fixtures/responses/whois.inregistry.net/in/status_available.txt rename to spec/fixtures/responses/whois.registry.in/in/status_available.txt diff --git a/spec/fixtures/responses/whois.inregistry.net/in/status_registered.expected b/spec/fixtures/responses/whois.registry.in/in/status_registered.expected similarity index 100% rename from spec/fixtures/responses/whois.inregistry.net/in/status_registered.expected rename to spec/fixtures/responses/whois.registry.in/in/status_registered.expected diff --git a/spec/fixtures/responses/whois.inregistry.net/in/status_registered.txt b/spec/fixtures/responses/whois.registry.in/in/status_registered.txt similarity index 100% rename from spec/fixtures/responses/whois.inregistry.net/in/status_registered.txt rename to spec/fixtures/responses/whois.registry.in/in/status_registered.txt diff --git a/spec/whois/parsers/responses/whois.inregistry.net/in/status_available_spec.rb b/spec/whois/parsers/responses/whois.registry.in/in/status_available_spec.rb similarity index 90% rename from spec/whois/parsers/responses/whois.inregistry.net/in/status_available_spec.rb rename to spec/whois/parsers/responses/whois.registry.in/in/status_available_spec.rb index 9322679b..3c661f70 100644 --- a/spec/whois/parsers/responses/whois.inregistry.net/in/status_available_spec.rb +++ b/spec/whois/parsers/responses/whois.registry.in/in/status_available_spec.rb @@ -3,7 +3,7 @@ # This file is autogenerated. Do not edit it manually. # If you want change the content of this file, edit # -# /spec/fixtures/responses/whois.inregistry.net/in/status_available.expected +# /spec/fixtures/responses/whois.registry.in/in/status_available.expected # # and regenerate the tests with the following rake task # @@ -12,11 +12,11 @@ require 'spec_helper' -describe "whois.inregistry.net", :aggregate_failures do +describe "whois.registry.in", :aggregate_failures do subject do - file = fixture("responses", "whois.inregistry.net/in/status_available.txt") - part = Whois::Record::Part.new(body: File.read(file), host: "whois.inregistry.net") + file = fixture("responses", "whois.registry.in/in/status_available.txt") + part = Whois::Record::Part.new(body: File.read(file), host: "whois.registry.in") Whois::Parser.parser_for(part) end diff --git a/spec/whois/parsers/responses/whois.inregistry.net/in/status_registered_spec.rb b/spec/whois/parsers/responses/whois.registry.in/in/status_registered_spec.rb similarity index 96% rename from spec/whois/parsers/responses/whois.inregistry.net/in/status_registered_spec.rb rename to spec/whois/parsers/responses/whois.registry.in/in/status_registered_spec.rb index 3b3b4050..589aaad6 100644 --- a/spec/whois/parsers/responses/whois.inregistry.net/in/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.registry.in/in/status_registered_spec.rb @@ -3,7 +3,7 @@ # This file is autogenerated. Do not edit it manually. # If you want change the content of this file, edit # -# /spec/fixtures/responses/whois.inregistry.net/in/status_registered.expected +# /spec/fixtures/responses/whois.registry.in/in/status_registered.expected # # and regenerate the tests with the following rake task # @@ -12,11 +12,11 @@ require 'spec_helper' -describe "whois.inregistry.net", :aggregate_failures do +describe "whois.registry.in", :aggregate_failures do subject do - file = fixture("responses", "whois.inregistry.net/in/status_registered.txt") - part = Whois::Record::Part.new(body: File.read(file), host: "whois.inregistry.net") + file = fixture("responses", "whois.registry.in/in/status_registered.txt") + part = Whois::Record::Part.new(body: File.read(file), host: "whois.registry.in") Whois::Parser.parser_for(part) end From e0222f8ad5bf0da3acee79fff572a140cedcd7e0 Mon Sep 17 00:00:00 2001 From: Adrien Rey-Jarthon Date: Thu, 16 Dec 2021 15:22:38 +0100 Subject: [PATCH 17/29] =?UTF-8?q?Added=20support=20for=20all=20(or=20fixin?= =?UTF-8?q?g=20existing)=20CentralNic=20TLDs=20(136=20at=20the=20time:=20.?= =?UTF-8?q?ADAC,=20.AE.ORG,=20.ALLFINANZ,=20.ART,=20.AUTO,=20.AUTOS,=20.BA?= =?UTF-8?q?BY,=20.BAR,=20.BEAUTY,=20.BEST,=20.BH,=20.BLOG,=20.BMW,=20.BOAT?= =?UTF-8?q?S,=20.BOND,=20.BOX,=20.BR.COM,=20.BUILD,=20.CAM,=20.CAR,=20.CAR?= =?UTF-8?q?S,=20.CASE,=20.CEO,=20.CFD,=20.CN.COM,=20.CO.COM,=20.CO.NL,=20.?= =?UTF-8?q?CO.NO,=20.CO.RO,=20.COLLEGE,=20.COM.DE,=20.COM.SE,=20.COOP,=20.?= =?UTF-8?q?CYOU,=20.DE.COM,=20.DEALER,=20.DELOITTE,=20.DESI,=20.DESIGN,=20?= =?UTF-8?q?.DHL,=20.DVAG,=20.ETISALAT,=20.EU.COM,=20.FANS,=20.FEEDBACK,=20?= =?UTF-8?q?.FM,=20.FO,=20.FORUM,=20.FRESENIUS,=20.FRL,=20.FUN,=20.GAY,=20.?= =?UTF-8?q?GB.NET,=20.GD,=20.GENT,=20.GR.COM,=20.HAIR,=20.HOMES,=20.HOST,?= =?UTF-8?q?=20.HU.NET,=20.ICU,=20.IN.NET,=20.INC,=20.INK,=20.JP.NET,=20.JP?= =?UTF-8?q?N.COM,=20.KFH,=20.KPN,=20.KRED,=20.LIDL,=20.LONDON,=20.LOVE,=20?= =?UTF-8?q?.LPL,=20.LPLFINANCIAL,=20.LUXURY,=20.MAKEUP,=20.MEX.COM,=20.MIN?= =?UTF-8?q?I,=20.MONSTER,=20.MOTORCYCLES,=20.MUSIC,=20.ONLINE,=20.OOO,=20.?= =?UTF-8?q?PID,=20.POHL,=20.PRESS,=20.PROTECTION,=20.PW,=20.QPON,=20.QUEST?= =?UTF-8?q?,=20.RADIO.AM,=20.REIT,=20.RENT,=20.REST,=20.RU.COM,=20.SA.COM,?= =?UTF-8?q?=20.SAARLAND,=20.SBS,=20.SCHWARZ,=20.SE.NET,=20.SECURITY,=20.SF?= =?UTF-8?q?R,=20.SHOP.RO,=20.SITE,=20.SKIN,=20.SMART,=20.SPACE,=20.STC,=20?= =?UTF-8?q?.STCGROUP,=20.STORAGE,=20.STORE,=20.TECH,=20.THEATRE,=20.TICKET?= =?UTF-8?q?S,=20.TUI,=20.UK.COM,=20.UK.NET,=20.UNO,=20.US.COM,=20.US.ORG,?= =?UTF-8?q?=20.VG,=20.VIVA,=20.WEBSITE,=20.WIKI,=20.WME,=20.=D9=85=D9=88?= =?UTF-8?q?=D9=82=D8=B9,=20.=D8=A7=D8=AA=D8=B5=D8=A7=D9=84=D8=A7=D8=AA,=20?= =?UTF-8?q?.=D8=A7=D9=84=D8=A8=D8=AD=D8=B1=D9=8A=D9=86,=20.=D8=A8=D9=8A?= =?UTF-8?q?=D8=AA=D9=83,=20.VERM=C3=96GENSBERATER,=20.VERM=C3=96GENSBERATU?= =?UTF-8?q?NG,=20.XYZ,=20.YACHTS,=20.ZA.BZ,=20.ZA.COM,=20.ZUERICH)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- CHANGELOG.md | 1 + lib/whois/parser.rb | 2 + lib/whois/parsers/base_icann_compliant.rb | 13 +- lib/whois/parsers/central_nic.rb | 47 ++++++ lib/whois/parsers/whois.centralnic.com.rb | 137 ------------------ lib/whois/parsers/whois.nic.college.rb | 25 ---- lib/whois/parsers/whois.nic.design.rb | 25 ---- lib/whois/parsers/whois.nic.la.rb | 23 ++- lib/whois/parsers/whois.nic.pw.rb | 25 ---- lib/whois/parsers/whois.nic.space.rb | 25 ---- lib/whois/parsers/whois.nic.tech.rb | 25 ---- lib/whois/parsers/whois.nic.xyz.rb | 25 ---- lib/whois/parsers/whois.pandi.or.id.rb | 25 ---- lib/whois/scanners/whois.centralnic.com.rb | 32 ---- .../status_registered.expected | 6 +- .../ae.org/status_available.expected | 4 +- .../ae.org/status_available.txt | 22 ++- .../ae.org/status_purged.expected | 50 +++++++ .../ae.org/status_purged.txt | 21 +++ .../ae.org/status_registered.expected | 88 ++++++----- .../ae.org/status_registered.txt | 111 +++++--------- .../ar.com/status_available.expected | 50 ------- .../ar.com/status_available.txt | 1 - .../ar.com/status_registered.expected | 110 -------------- .../ar.com/status_registered.txt | 62 -------- .../br.com/status_available.expected | 4 +- .../br.com/status_available.txt | 22 ++- .../br.com/status_registered.expected | 73 +++------- .../br.com/status_registered.txt | 111 +++++--------- .../cn.com/status_available.expected | 4 +- .../cn.com/status_available.txt | 22 ++- .../cn.com/status_registered.expected | 64 +++----- .../cn.com/status_registered.txt | 107 +++++--------- .../de.com/status_available.expected | 4 +- .../de.com/status_available.txt | 22 ++- .../de.com/status_registered.expected | 65 ++------- .../de.com/status_registered.txt | 102 +++++-------- .../eu.com/status_available.expected | 4 +- .../eu.com/status_available.txt | 22 ++- .../eu.com/status_registered.expected | 84 ++++------- .../eu.com/status_registered.txt | 102 ++++++------- .../gb.com/status_available.expected | 50 ------- .../gb.com/status_available.txt | 1 - .../gb.com/status_registered.expected | 110 -------------- .../gb.com/status_registered.txt | 75 ---------- .../gb.net/status_available.expected | 50 ------- .../gb.net/status_available.txt | 1 - .../gb.net/status_registered.expected | 116 --------------- .../gb.net/status_registered.txt | 68 --------- .../gr.com/status_available.expected | 4 +- .../gr.com/status_available.txt | 22 ++- .../gr.com/status_registered.expected | 52 +++---- .../gr.com/status_registered.txt | 59 +++++--- .../hu.com/property_contacts_omitted.txt | 32 ---- .../hu.com/status_available.expected | 50 ------- .../hu.com/status_available.txt | 1 - .../hu.com/status_registered.expected | 102 ------------- .../hu.com/status_registered.txt | 73 ---------- .../jp.net/status_available.expected | 4 +- .../jp.net/status_available.txt | 22 ++- .../jp.net/status_registered.expected | 63 ++------ .../jp.net/status_registered.txt | 112 +++++--------- .../jpn.com/status_available.expected | 50 ------- .../jpn.com/status_available.txt | 1 - .../jpn.com/status_registered.expected | 106 -------------- .../jpn.com/status_registered.txt | 76 ---------- .../kr.com/status_available.expected | 50 ------- .../kr.com/status_available.txt | 1 - .../kr.com/status_registered.expected | 118 --------------- .../kr.com/status_registered.txt | 77 ---------- .../no.com/status_available.expected | 50 ------- .../no.com/status_available.txt | 1 - .../qc.com/status_available.expected | 50 ------- .../qc.com/status_available.txt | 1 - .../qc.com/status_registered.expected | 106 -------------- .../qc.com/status_registered.txt | 52 ------- .../ru.com/status_available.expected | 4 +- .../ru.com/status_available.txt | 22 ++- .../ru.com/status_registered.expected | 57 ++------ .../ru.com/status_registered.txt | 97 +++++-------- .../sa.com/status_available.expected | 50 ------- .../sa.com/status_available.txt | 1 - .../sa.com/status_registered.expected | 102 ------------- .../sa.com/status_registered.txt | 61 -------- .../se.com/status_available.expected | 50 ------- .../se.com/status_available.txt | 1 - .../se.com/status_registered.expected | 110 -------------- .../se.com/status_registered.txt | 75 ---------- .../se.net/status_available.expected | 50 ------- .../se.net/status_available.txt | 1 - .../se.net/status_registered.expected | 112 -------------- .../se.net/status_registered.txt | 71 --------- .../uk.com/status_available.expected | 4 +- .../uk.com/status_available.txt | 22 ++- .../uk.com/status_registered.expected | 65 ++------- .../uk.com/status_registered.txt | 93 +++++------- .../uk.net/status_available.expected | 4 +- .../uk.net/status_available.txt | 22 ++- .../uk.net/status_registered.expected | 65 ++------- .../uk.net/status_registered.txt | 111 +++++--------- .../us.com/status_available.expected | 4 +- .../us.com/status_available.txt | 22 ++- .../us.com/status_registered.expected | 75 ++-------- .../us.com/status_registered.txt | 96 +++++------- .../us.org/status_available.expected | 50 ------- .../us.org/status_available.txt | 1 - .../uy.com/property_contacts_omitted.txt | 32 ---- .../uy.com/status_available.expected | 50 ------- .../uy.com/status_available.txt | 1 - .../uy.com/status_registered.expected | 102 ------------- .../uy.com/status_registered.txt | 76 ---------- .../za.com/status_available.expected | 4 +- .../za.com/status_available.txt | 22 ++- .../za.com/status_registered.expected | 51 ++----- .../za.com/status_registered.txt | 91 +++++------- .../whois.enom.com/status_registered.expected | 6 +- .../college/status_available.expected | 4 +- .../college/status_available.txt | 22 ++- .../college/status_registered.expected | 80 +++------- .../college/status_registered.txt | 106 ++++---------- .../design/status_available.expected | 4 +- .../design/status_available.txt | 22 ++- .../design/status_registered.expected | 72 +++------ .../design/status_registered.txt | 95 ++++-------- .../la/property_status_multiple.expected | 2 - .../la/property_status_multiple.txt | 75 ---------- .../la/property_status_single.expected | 2 - .../la/property_status_single.txt | 70 --------- .../whois.nic.la/la/status_available.expected | 4 +- .../whois.nic.la/la/status_available.txt | 19 ++- .../la/status_registered.expected | 53 ++----- .../whois.nic.la/la/status_registered.txt | 111 +++++--------- .../online/status_available.expected | 50 +++++++ .../online/status_available.txt | 21 +++ .../online/status_registered.expected | 106 ++++++++++++++ .../online/status_registered.txt | 45 ++++++ .../whois.nic.pw/pw/status_available.expected | 4 +- .../whois.nic.pw/pw/status_available.txt | 22 ++- .../pw/status_registered.expected | 83 ++--------- .../whois.nic.pw/pw/status_registered.txt | 121 +++++----------- .../space/status_available.expected | 4 +- .../space/status_available.txt | 22 ++- .../space/status_registered.expected | 41 ++---- .../space/status_registered.txt | 68 ++++----- .../tech/status_available.expected | 4 +- .../whois.nic.tech/tech/status_available.txt | 22 ++- .../tech/status_registered.expected | 56 +++---- .../whois.nic.tech/tech/status_registered.txt | 75 +++------- .../xyz/status_available.expected | 4 +- .../whois.nic.xyz/xyz/status_available.txt | 22 ++- .../xyz/status_registered.expected | 71 ++------- .../whois.nic.xyz/xyz/status_registered.txt | 72 +++------ .../status_registered.expected | 6 +- .../id/status_available.expected | 50 ------- .../whois.pandi.or.id/id/status_available.txt | 1 - .../id/status_registered.expected | 114 --------------- .../id/status_registered.txt | 66 --------- .../status_registered.expected | 6 +- spec/tlds.yml | 68 +-------- .../status_registered_spec.rb | 6 +- .../ae.org/status_available_spec.rb | 4 +- .../status_purged_spec.rb} | 10 +- .../ae.org/status_registered_spec.rb | 88 ++++++----- .../ar.com/status_registered_spec.rb | 103 ------------- .../br.com/status_available_spec.rb | 4 +- .../br.com/status_registered_spec.rb | 73 +++------- .../cn.com/status_available_spec.rb | 4 +- .../cn.com/status_registered_spec.rb | 63 +++----- .../de.com/status_available_spec.rb | 4 +- .../de.com/status_registered_spec.rb | 65 ++------- .../eu.com/status_available_spec.rb | 4 +- .../eu.com/status_registered_spec.rb | 83 ++++------- .../gb.com/status_available_spec.rb | 43 ------ .../gb.com/status_registered_spec.rb | 103 ------------- .../gb.net/status_available_spec.rb | 43 ------ .../gb.net/status_registered_spec.rb | 109 -------------- .../gr.com/status_available_spec.rb | 4 +- .../gr.com/status_registered_spec.rb | 52 +++---- .../hu.com/status_registered_spec.rb | 95 ------------ .../jp.net/status_available_spec.rb | 4 +- .../jp.net/status_registered_spec.rb | 61 ++------ .../jpn.com/status_available_spec.rb | 43 ------ .../jpn.com/status_registered_spec.rb | 99 ------------- .../kr.com/status_available_spec.rb | 43 ------ .../kr.com/status_registered_spec.rb | 111 -------------- .../no.com/status_available_spec.rb | 43 ------ .../qc.com/status_available_spec.rb | 43 ------ .../qc.com/status_registered_spec.rb | 99 ------------- .../ru.com/status_available_spec.rb | 4 +- .../ru.com/status_registered_spec.rb | 56 ++----- .../sa.com/status_available_spec.rb | 43 ------ .../sa.com/status_registered_spec.rb | 95 ------------ .../se.com/status_available_spec.rb | 43 ------ .../se.com/status_registered_spec.rb | 103 ------------- .../se.net/status_available_spec.rb | 43 ------ .../se.net/status_registered_spec.rb | 105 -------------- .../uk.com/status_available_spec.rb | 4 +- .../uk.com/status_registered_spec.rb | 65 ++------- .../uk.net/status_available_spec.rb | 4 +- .../uk.net/status_registered_spec.rb | 65 ++------- .../us.com/status_available_spec.rb | 4 +- .../us.com/status_registered_spec.rb | 74 ++-------- .../us.org/status_available_spec.rb | 43 ------ .../uy.com/status_available_spec.rb | 43 ------ .../uy.com/status_registered_spec.rb | 95 ------------ .../za.com/status_available_spec.rb | 4 +- .../za.com/status_registered_spec.rb | 51 ++----- .../whois.enom.com/status_registered_spec.rb | 6 +- .../college/status_available_spec.rb | 4 +- .../college/status_registered_spec.rb | 80 +++------- .../design/status_available_spec.rb | 4 +- .../design/status_registered_spec.rb | 72 +++------ .../la/property_status_multiple_spec.rb | 26 ---- .../la/property_status_single_spec.rb | 26 ---- .../whois.nic.la/la/status_available_spec.rb | 4 +- .../whois.nic.la/la/status_registered_spec.rb | 53 ++----- .../online}/status_available_spec.rb | 12 +- .../online/status_registered_spec.rb | 99 +++++++++++++ .../whois.nic.pw/pw/status_available_spec.rb | 4 +- .../whois.nic.pw/pw/status_registered_spec.rb | 83 ++--------- .../space/status_available_spec.rb | 4 +- .../space/status_registered_spec.rb | 41 ++---- .../tech/status_available_spec.rb | 4 +- .../tech/status_registered_spec.rb | 56 +++---- .../xyz/status_available_spec.rb | 4 +- .../xyz/status_registered_spec.rb | 69 ++------- .../status_registered_spec.rb | 6 +- .../id/status_available_spec.rb | 43 ------ .../id/status_registered_spec.rb | 107 -------------- .../status_registered_spec.rb | 6 +- 230 files changed, 2301 insertions(+), 8433 deletions(-) create mode 100644 lib/whois/parsers/central_nic.rb delete mode 100644 lib/whois/parsers/whois.centralnic.com.rb delete mode 100644 lib/whois/parsers/whois.nic.college.rb delete mode 100644 lib/whois/parsers/whois.nic.design.rb delete mode 100644 lib/whois/parsers/whois.nic.pw.rb delete mode 100644 lib/whois/parsers/whois.nic.space.rb delete mode 100644 lib/whois/parsers/whois.nic.tech.rb delete mode 100644 lib/whois/parsers/whois.nic.xyz.rb delete mode 100644 lib/whois/parsers/whois.pandi.or.id.rb delete mode 100644 lib/whois/scanners/whois.centralnic.com.rb create mode 100644 spec/fixtures/responses/whois.centralnic.com/ae.org/status_purged.expected create mode 100644 spec/fixtures/responses/whois.centralnic.com/ae.org/status_purged.txt delete mode 100644 spec/fixtures/responses/whois.centralnic.com/ar.com/status_available.expected delete mode 100644 spec/fixtures/responses/whois.centralnic.com/ar.com/status_available.txt delete mode 100644 spec/fixtures/responses/whois.centralnic.com/ar.com/status_registered.expected delete mode 100644 spec/fixtures/responses/whois.centralnic.com/ar.com/status_registered.txt delete mode 100644 spec/fixtures/responses/whois.centralnic.com/gb.com/status_available.expected delete mode 100644 spec/fixtures/responses/whois.centralnic.com/gb.com/status_available.txt delete mode 100644 spec/fixtures/responses/whois.centralnic.com/gb.com/status_registered.expected delete mode 100644 spec/fixtures/responses/whois.centralnic.com/gb.com/status_registered.txt delete mode 100644 spec/fixtures/responses/whois.centralnic.com/gb.net/status_available.expected delete mode 100644 spec/fixtures/responses/whois.centralnic.com/gb.net/status_available.txt delete mode 100644 spec/fixtures/responses/whois.centralnic.com/gb.net/status_registered.expected delete mode 100644 spec/fixtures/responses/whois.centralnic.com/gb.net/status_registered.txt delete mode 100644 spec/fixtures/responses/whois.centralnic.com/hu.com/property_contacts_omitted.txt delete mode 100644 spec/fixtures/responses/whois.centralnic.com/hu.com/status_available.expected delete mode 100644 spec/fixtures/responses/whois.centralnic.com/hu.com/status_available.txt delete mode 100644 spec/fixtures/responses/whois.centralnic.com/hu.com/status_registered.expected delete mode 100644 spec/fixtures/responses/whois.centralnic.com/hu.com/status_registered.txt delete mode 100644 spec/fixtures/responses/whois.centralnic.com/jpn.com/status_available.expected delete mode 100644 spec/fixtures/responses/whois.centralnic.com/jpn.com/status_available.txt delete mode 100644 spec/fixtures/responses/whois.centralnic.com/jpn.com/status_registered.expected delete mode 100644 spec/fixtures/responses/whois.centralnic.com/jpn.com/status_registered.txt delete mode 100644 spec/fixtures/responses/whois.centralnic.com/kr.com/status_available.expected delete mode 100644 spec/fixtures/responses/whois.centralnic.com/kr.com/status_available.txt delete mode 100644 spec/fixtures/responses/whois.centralnic.com/kr.com/status_registered.expected delete mode 100644 spec/fixtures/responses/whois.centralnic.com/kr.com/status_registered.txt delete mode 100644 spec/fixtures/responses/whois.centralnic.com/no.com/status_available.expected delete mode 100644 spec/fixtures/responses/whois.centralnic.com/no.com/status_available.txt delete mode 100644 spec/fixtures/responses/whois.centralnic.com/qc.com/status_available.expected delete mode 100644 spec/fixtures/responses/whois.centralnic.com/qc.com/status_available.txt delete mode 100644 spec/fixtures/responses/whois.centralnic.com/qc.com/status_registered.expected delete mode 100644 spec/fixtures/responses/whois.centralnic.com/qc.com/status_registered.txt delete mode 100644 spec/fixtures/responses/whois.centralnic.com/sa.com/status_available.expected delete mode 100644 spec/fixtures/responses/whois.centralnic.com/sa.com/status_available.txt delete mode 100644 spec/fixtures/responses/whois.centralnic.com/sa.com/status_registered.expected delete mode 100644 spec/fixtures/responses/whois.centralnic.com/sa.com/status_registered.txt delete mode 100644 spec/fixtures/responses/whois.centralnic.com/se.com/status_available.expected delete mode 100644 spec/fixtures/responses/whois.centralnic.com/se.com/status_available.txt delete mode 100644 spec/fixtures/responses/whois.centralnic.com/se.com/status_registered.expected delete mode 100644 spec/fixtures/responses/whois.centralnic.com/se.com/status_registered.txt delete mode 100644 spec/fixtures/responses/whois.centralnic.com/se.net/status_available.expected delete mode 100644 spec/fixtures/responses/whois.centralnic.com/se.net/status_available.txt delete mode 100644 spec/fixtures/responses/whois.centralnic.com/se.net/status_registered.expected delete mode 100644 spec/fixtures/responses/whois.centralnic.com/se.net/status_registered.txt delete mode 100644 spec/fixtures/responses/whois.centralnic.com/us.org/status_available.expected delete mode 100644 spec/fixtures/responses/whois.centralnic.com/us.org/status_available.txt delete mode 100644 spec/fixtures/responses/whois.centralnic.com/uy.com/property_contacts_omitted.txt delete mode 100644 spec/fixtures/responses/whois.centralnic.com/uy.com/status_available.expected delete mode 100644 spec/fixtures/responses/whois.centralnic.com/uy.com/status_available.txt delete mode 100644 spec/fixtures/responses/whois.centralnic.com/uy.com/status_registered.expected delete mode 100644 spec/fixtures/responses/whois.centralnic.com/uy.com/status_registered.txt delete mode 100644 spec/fixtures/responses/whois.nic.la/la/property_status_multiple.expected delete mode 100644 spec/fixtures/responses/whois.nic.la/la/property_status_multiple.txt delete mode 100644 spec/fixtures/responses/whois.nic.la/la/property_status_single.expected delete mode 100644 spec/fixtures/responses/whois.nic.la/la/property_status_single.txt create mode 100644 spec/fixtures/responses/whois.nic.online/online/status_available.expected create mode 100644 spec/fixtures/responses/whois.nic.online/online/status_available.txt create mode 100644 spec/fixtures/responses/whois.nic.online/online/status_registered.expected create mode 100644 spec/fixtures/responses/whois.nic.online/online/status_registered.txt delete mode 100644 spec/fixtures/responses/whois.pandi.or.id/id/status_available.expected delete mode 100644 spec/fixtures/responses/whois.pandi.or.id/id/status_available.txt delete mode 100644 spec/fixtures/responses/whois.pandi.or.id/id/status_registered.expected delete mode 100644 spec/fixtures/responses/whois.pandi.or.id/id/status_registered.txt rename spec/whois/parsers/responses/whois.centralnic.com/{hu.com/status_available_spec.rb => ae.org/status_purged_spec.rb} (52%) delete mode 100644 spec/whois/parsers/responses/whois.centralnic.com/ar.com/status_registered_spec.rb delete mode 100644 spec/whois/parsers/responses/whois.centralnic.com/gb.com/status_available_spec.rb delete mode 100644 spec/whois/parsers/responses/whois.centralnic.com/gb.com/status_registered_spec.rb delete mode 100644 spec/whois/parsers/responses/whois.centralnic.com/gb.net/status_available_spec.rb delete mode 100644 spec/whois/parsers/responses/whois.centralnic.com/gb.net/status_registered_spec.rb delete mode 100644 spec/whois/parsers/responses/whois.centralnic.com/hu.com/status_registered_spec.rb delete mode 100644 spec/whois/parsers/responses/whois.centralnic.com/jpn.com/status_available_spec.rb delete mode 100644 spec/whois/parsers/responses/whois.centralnic.com/jpn.com/status_registered_spec.rb delete mode 100644 spec/whois/parsers/responses/whois.centralnic.com/kr.com/status_available_spec.rb delete mode 100644 spec/whois/parsers/responses/whois.centralnic.com/kr.com/status_registered_spec.rb delete mode 100644 spec/whois/parsers/responses/whois.centralnic.com/no.com/status_available_spec.rb delete mode 100644 spec/whois/parsers/responses/whois.centralnic.com/qc.com/status_available_spec.rb delete mode 100644 spec/whois/parsers/responses/whois.centralnic.com/qc.com/status_registered_spec.rb delete mode 100644 spec/whois/parsers/responses/whois.centralnic.com/sa.com/status_available_spec.rb delete mode 100644 spec/whois/parsers/responses/whois.centralnic.com/sa.com/status_registered_spec.rb delete mode 100644 spec/whois/parsers/responses/whois.centralnic.com/se.com/status_available_spec.rb delete mode 100644 spec/whois/parsers/responses/whois.centralnic.com/se.com/status_registered_spec.rb delete mode 100644 spec/whois/parsers/responses/whois.centralnic.com/se.net/status_available_spec.rb delete mode 100644 spec/whois/parsers/responses/whois.centralnic.com/se.net/status_registered_spec.rb delete mode 100644 spec/whois/parsers/responses/whois.centralnic.com/us.org/status_available_spec.rb delete mode 100644 spec/whois/parsers/responses/whois.centralnic.com/uy.com/status_available_spec.rb delete mode 100644 spec/whois/parsers/responses/whois.centralnic.com/uy.com/status_registered_spec.rb delete mode 100644 spec/whois/parsers/responses/whois.nic.la/la/property_status_multiple_spec.rb delete mode 100644 spec/whois/parsers/responses/whois.nic.la/la/property_status_single_spec.rb rename spec/whois/parsers/responses/{whois.centralnic.com/ar.com => whois.nic.online/online}/status_available_spec.rb (50%) create mode 100644 spec/whois/parsers/responses/whois.nic.online/online/status_registered_spec.rb delete mode 100644 spec/whois/parsers/responses/whois.pandi.or.id/id/status_available_spec.rb delete mode 100644 spec/whois/parsers/responses/whois.pandi.or.id/id/status_registered_spec.rb diff --git a/CHANGELOG.md b/CHANGELOG.md index ff9b3926..ddaffa67 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,7 @@ This project uses [Semantic Versioning 2.0.0](http://semver.org/). #### master +- NEW: Added support for all (or fixing existing) CentralNic TLDs (136 at the time: .ADAC, .AE.ORG, .ALLFINANZ, .ART, .AUTO, .AUTOS, .BABY, .BAR, .BEAUTY, .BEST, .BH, .BLOG, .BMW, .BOATS, .BOND, .BOX, .BR.COM, .BUILD, .CAM, .CAR, .CARS, .CASE, .CEO, .CFD, .CN.COM, .CO.COM, .CO.NL, .CO.NO, .CO.RO, .COLLEGE, .COM.DE, .COM.SE, .COOP, .CYOU, .DE.COM, .DEALER, .DELOITTE, .DESI, .DESIGN, .DHL, .DVAG, .ETISALAT, .EU.COM, .FANS, .FEEDBACK, .FM, .FO, .FORUM, .FRESENIUS, .FRL, .FUN, .GAY, .GB.NET, .GD, .GENT, .GR.COM, .HAIR, .HOMES, .HOST, .HU.NET, .ICU, .IN.NET, .INC, .INK, .JP.NET, .JPN.COM, .KFH, .KPN, .KRED, .LIDL, .LONDON, .LOVE, .LPL, .LPLFINANCIAL, .LUXURY, .MAKEUP, .MEX.COM, .MINI, .MONSTER, .MOTORCYCLES, .MUSIC, .ONLINE, .OOO, .PID, .POHL, .PRESS, .PROTECTION, .PW, .QPON, .QUEST, .RADIO.AM, .REIT, .RENT, .REST, .RU.COM, .SA.COM, .SAARLAND, .SBS, .SCHWARZ, .SE.NET, .SECURITY, .SFR, .SHOP.RO, .SITE, .SKIN, .SMART, .SPACE, .STC, .STCGROUP, .STORAGE, .STORE, .TECH, .THEATRE, .TICKETS, .TUI, .UK.COM, .UK.NET, .UNO, .US.COM, .US.ORG, .VG, .VIVA, .WEBSITE, .WIKI, .WME, .موقع, .اتصالات, .البحرين, .بيتك, .VERMÖGENSBERATER, .VERMÖGENSBERATUNG, .XYZ, .YACHTS, .ZA.BZ, .ZA.COM, .ZUERICH) - FIX: Updated parser for .IN tld which changed name - FIX: Updated parser for .MX tld (and derivates: .COM.MX, .ORG.MX, etc.) which changed name - FIX: Updated parser for .COM.AU tld (based on #100) Thanks @kovalevsky diff --git a/lib/whois/parser.rb b/lib/whois/parser.rb index 22a36bfd..d14c8eca 100644 --- a/lib/whois/parser.rb +++ b/lib/whois/parser.rb @@ -143,6 +143,8 @@ def self.parser_klass(part) # But using one host per TLD, so in this case it's easier to match on the disclaimer directly to cover all hosts if part.body&.include?("Terms of Use: Donuts Inc.") autoload("donuts_inc") + elsif part.body&.include?("The Whois and RDAP services are provided by CentralNic") + autoload("central_nic") else autoload("blank") end diff --git a/lib/whois/parsers/base_icann_compliant.rb b/lib/whois/parsers/base_icann_compliant.rb index fe9bb110..e4611e91 100644 --- a/lib/whois/parsers/base_icann_compliant.rb +++ b/lib/whois/parsers/base_icann_compliant.rb @@ -141,14 +141,17 @@ def contact_address_attribute(element) private def value_for_phone_property(element, property) - [ - value_for_property(element, "#{property}"), - value_for_property(element, "#{property} Ext") - ].reject(&:empty?).join(' ext: ') + node("#{element} #{property}") do |phone| + ext = node("#{element} #{property} Ext") + phone += " ext: #{ext}" if ext.present? + phone + end end def value_for_property(element, property) - Array.wrap(node("#{element} #{property}")).reject(&:empty?).join(', ') + node("#{element} #{property}") do |values| + Array.wrap(values).reject(&:empty?).join(', ') + end end end diff --git a/lib/whois/parsers/central_nic.rb b/lib/whois/parsers/central_nic.rb new file mode 100644 index 00000000..959f61f9 --- /dev/null +++ b/lib/whois/parsers/central_nic.rb @@ -0,0 +1,47 @@ +#-- +# Ruby Whois +# +# An intelligent pure Ruby WHOIS client and parser. +# +# Copyright (c) 2009-2018 Simone Carletti +#++ + +require_relative 'base_icann_compliant' + +module Whois + class Parsers + + # Parser for the whois.centralnic.com server. + class CentralNic < BaseIcannCompliant + include Scanners::Scannable + + self.scanner = Scanners::BaseIcannCompliant, { + pattern_available: /^The queried object does not exist:.+\(?DOMAIN NOT FOUND\)?/, + pattern_disclaimer: /^The Whois and RDAP services are provided by CentralNic/ + } + + private + + def build_contact(element, type) + node("#{element} Email") do |email| + Parser::Contact.new( + type: type, + id: node("#{element} ID"), + name: node("#{element} Name"), + organization: node("#{element} Organization"), + city: node("#{element} City"), + address: contact_address_attribute(element), + zip: node("#{element} Postal Code"), + state: node("#{element} State/Province"), + country_code: node("#{element} Country"), + phone: node("#{element} Phone"), + fax: node("#{element} FAX") || node("#{element} Fax"), + email: email + ) + end + end + + end + + end +end diff --git a/lib/whois/parsers/whois.centralnic.com.rb b/lib/whois/parsers/whois.centralnic.com.rb deleted file mode 100644 index 23647d3b..00000000 --- a/lib/whois/parsers/whois.centralnic.com.rb +++ /dev/null @@ -1,137 +0,0 @@ -#-- -# Ruby Whois -# -# An intelligent pure Ruby WHOIS client and parser. -# -# Copyright (c) 2009-2018 Simone Carletti -#++ - - -require_relative 'base' -require 'whois/scanners/whois.centralnic.com.rb' - - -module Whois - class Parsers - - # Parser for the whois.centralnic.com server. - class WhoisCentralnicCom < Base - include Scanners::Scannable - - self.scanner = Scanners::WhoisCentralnicCom - - - property_supported :disclaimer do - node("field:disclaimer") - end - - - property_supported :domain do - node("Domain Name") { |str| str.downcase } - end - - property_supported :domain_id do - node("Domain ID") - end - - - property_supported :status do - # OK, RENEW PERIOD, ... - Array.wrap( - node("Status") || - node("Domain Status") - ) - end - - property_supported :available? do - !!node("status:available") - end - - property_supported :registered? do - !available? - end - - - property_supported :created_on do - node("Created On") { |str| parse_time(str) } || - node("Creation Date") { |str| parse_time(str) } - end - - property_supported :updated_on do - node("Last Updated On") { |str| parse_time(str) } || - node("Updated Date") { |str| parse_time(str) } - end - - property_supported :expires_on do - node("Expiration Date") { |str| parse_time(str) } || - node("Registry Expiry Date") { |str| parse_time(str) } - end - - - property_supported :registrar do - node("Sponsoring Registrar ID") do - Parser::Registrar.new( - id: node("Sponsoring Registrar ID"), - name: node("Sponsoring Registrar Organization"), - url: node("Sponsoring Registrar Website") - ) - end || - node("Sponsoring Registrar IANA ID") do - Parser::Registrar.new( - id: node("Sponsoring Registrar IANA ID"), - name: node("Sponsoring Registrar"), - ) - end - end - - property_supported :registrant_contacts do - build_contact("Registrant", Parser::Contact::TYPE_REGISTRANT) - end - - property_supported :admin_contacts do - build_contact("Admin", Parser::Contact::TYPE_ADMINISTRATIVE) - end - - property_supported :technical_contacts do - build_contact("Tech", Parser::Contact::TYPE_TECHNICAL) - end - - - property_supported :nameservers do - Array.wrap(node("Name Server")).map do |name| - Parser::Nameserver.new(:name => name.downcase.chomp(".")) - end - end - - - private - - def build_contact(element, type) - node("#{element} ID") do - address = [nil, 1, 2, 3]. - map { |i| node("#{element} Street#{i}") }. - delete_if { |i| i.nil? || i.empty? }. - join("\n") - address = nil if address.empty? - - Parser::Contact.new( - :type => type, - :id => node("#{element} ID"), - :name => node("#{element} Name"), - :organization => node("#{element} Organization"), - :address => address, - :city => node("#{element} City"), - :zip => node("#{element} Postal Code"), - :state => node("#{element} State/Province"), - :country_code => node("#{element} Country"), - :phone => node("#{element} Phone"), - :fax => node("#{element} FAX") || node("#{element} Fax"), - :email => node("#{element} Email") - ) - end - end - - end - - end -end diff --git a/lib/whois/parsers/whois.nic.college.rb b/lib/whois/parsers/whois.nic.college.rb deleted file mode 100644 index db097404..00000000 --- a/lib/whois/parsers/whois.nic.college.rb +++ /dev/null @@ -1,25 +0,0 @@ -#-- -# Ruby Whois -# -# An intelligent pure Ruby WHOIS client and parser. -# -# Copyright (c) 2009-2018 Simone Carletti -#++ - - -require_relative 'whois.centralnic.com' - - -module Whois - class Parsers - - # Parser for the whois.nic.college server. - # - # @see Whois::Parsers::Example - # The Example parser for the list of all available methods. - # - class WhoisNicCollege < WhoisCentralnicCom - end - - end -end diff --git a/lib/whois/parsers/whois.nic.design.rb b/lib/whois/parsers/whois.nic.design.rb deleted file mode 100644 index cb540c9b..00000000 --- a/lib/whois/parsers/whois.nic.design.rb +++ /dev/null @@ -1,25 +0,0 @@ -#-- -# Ruby Whois -# -# An intelligent pure Ruby WHOIS client and parser. -# -# Copyright (c) 2009-2018 Simone Carletti -#++ - - -require_relative 'whois.centralnic.com' - - -module Whois - class Parsers - - # Parser for the whois.nic.design server. - # - # @see Whois::Parsers::Example - # The Example parser for the list of all available methods. - # - class WhoisNicDesign < WhoisCentralnicCom - end - - end -end diff --git a/lib/whois/parsers/whois.nic.la.rb b/lib/whois/parsers/whois.nic.la.rb index 118ac43f..36633819 100644 --- a/lib/whois/parsers/whois.nic.la.rb +++ b/lib/whois/parsers/whois.nic.la.rb @@ -6,19 +6,26 @@ # Copyright (c) 2009-2018 Simone Carletti #++ - -require_relative 'base' -require_relative 'whois.centralnic.com.rb' - +require_relative 'base_icann_compliant' module Whois class Parsers # Parser for the whois.nic.la server. - # - # It aliases the whois.centralnic.com parser because - # the .LA TLD is powered by Centralnic. - class WhoisNicLa < WhoisCentralnicCom + class WhoisNicLa < BaseIcannCompliant + self.scanner = Scanners::BaseIcannCompliant, { + pattern_available: /^The queried object does not exist:.+\(?DOMAIN NOT FOUND\)?/, + pattern_disclaimer: /^This whois service is provided by LANIC/ + } + + private + + def build_contact(element, type) + node("#{element} Email") do |email| + Parser::Contact.new(type: type, email: email) + end + end + end end diff --git a/lib/whois/parsers/whois.nic.pw.rb b/lib/whois/parsers/whois.nic.pw.rb deleted file mode 100644 index 954fee42..00000000 --- a/lib/whois/parsers/whois.nic.pw.rb +++ /dev/null @@ -1,25 +0,0 @@ -#-- -# Ruby Whois -# -# An intelligent pure Ruby WHOIS client and parser. -# -# Copyright (c) 2009-2018 Simone Carletti -#++ - - -require_relative 'base' -require_relative 'whois.centralnic.com.rb' - - -module Whois - class Parsers - - # Parser for the whois.nic.pw server. - # - # It aliases the whois.centralnic.com parser because - # the .PW TLD is powered by Centralnic. - class WhoisNicPw < WhoisCentralnicCom - end - - end -end diff --git a/lib/whois/parsers/whois.nic.space.rb b/lib/whois/parsers/whois.nic.space.rb deleted file mode 100644 index 1fc4aaa6..00000000 --- a/lib/whois/parsers/whois.nic.space.rb +++ /dev/null @@ -1,25 +0,0 @@ -#-- -# Ruby Whois -# -# An intelligent pure Ruby WHOIS client and parser. -# -# Copyright (c) 2009-2018 Simone Carletti -#++ - - -require_relative 'whois.centralnic.com' - - -module Whois - class Parsers - - # Parser for the whois.nic.space server. - # - # @see Whois::Parsers::Example - # The Example parser for the list of all available methods. - # - class WhoisNicSpace < WhoisCentralnicCom - end - - end -end diff --git a/lib/whois/parsers/whois.nic.tech.rb b/lib/whois/parsers/whois.nic.tech.rb deleted file mode 100644 index 8f60e0ed..00000000 --- a/lib/whois/parsers/whois.nic.tech.rb +++ /dev/null @@ -1,25 +0,0 @@ -#-- -# Ruby Whois -# -# An intelligent pure Ruby WHOIS client and parser. -# -# Copyright (c) 2009-2018 Simone Carletti -#++ - - -require_relative 'whois.centralnic.com' - - -module Whois - class Parsers - - # Parser for the whois.nic.tech server. - # - # @see Whois::Parsers::Example - # The Example parser for the list of all available methods. - # - class WhoisNicTech < WhoisCentralnicCom - end - - end -end diff --git a/lib/whois/parsers/whois.nic.xyz.rb b/lib/whois/parsers/whois.nic.xyz.rb deleted file mode 100644 index f80b1845..00000000 --- a/lib/whois/parsers/whois.nic.xyz.rb +++ /dev/null @@ -1,25 +0,0 @@ -#-- -# Ruby Whois -# -# An intelligent pure Ruby WHOIS client and parser. -# -# Copyright (c) 2009-2018 Simone Carletti -#++ - - -require_relative 'whois.centralnic.com' - - -module Whois - class Parsers - - # Parser for the whois.nic.xyz server. - # - # @see Whois::Parsers::Example - # The Example parser for the list of all available methods. - # - class WhoisNicXyz < WhoisCentralnicCom - end - - end -end diff --git a/lib/whois/parsers/whois.pandi.or.id.rb b/lib/whois/parsers/whois.pandi.or.id.rb deleted file mode 100644 index fe0a0bb8..00000000 --- a/lib/whois/parsers/whois.pandi.or.id.rb +++ /dev/null @@ -1,25 +0,0 @@ -#-- -# Ruby Whois -# -# An intelligent pure Ruby WHOIS client and parser. -# -# Copyright (c) 2009-2018 Simone Carletti -#++ - - -require_relative 'base' -require_relative 'whois.centralnic.com.rb' - - -module Whois - class Parsers - - # Parser for the whois.pandi.or.id server. - # - # It aliases the whois.centralnic.com parser because - # it looks like the response is the same of Centralnic. - class WhoisPandiOrId < WhoisCentralnicCom - end - - end -end diff --git a/lib/whois/scanners/whois.centralnic.com.rb b/lib/whois/scanners/whois.centralnic.com.rb deleted file mode 100644 index 15825369..00000000 --- a/lib/whois/scanners/whois.centralnic.com.rb +++ /dev/null @@ -1,32 +0,0 @@ -require_relative 'base' - -module Whois - module Scanners - - # Scanner for the whois.centralnic.com record. - class WhoisCentralnicCom < Base - - self.tokenizers += [ - :skip_empty_line, - :scan_available, - :scan_disclaimer, - :scan_keyvalue, - ] - - - tokenizer :scan_available do - if @input.skip(/^DOMAIN NOT FOUND\n/) - @ast["status:available"] = true - end - end - - tokenizer :scan_disclaimer do - if @input.match?(/^\S([^:]+)\n/) - @ast["field:disclaimer"] = _scan_lines_to_array(/(.+)\n/).join(" ") - end - end - - end - - end -end diff --git a/spec/fixtures/responses/whois.1und1.info/status_registered.expected b/spec/fixtures/responses/whois.1und1.info/status_registered.expected index ed5ed3b4..372046c1 100644 --- a/spec/fixtures/responses/whois.1und1.info/status_registered.expected +++ b/spec/fixtures/responses/whois.1und1.info/status_registered.expected @@ -46,7 +46,7 @@ %s[0].address == "Elgendorfer Strasse 57" %s[0].city == "Montabaur" %s[0].zip == "56410" - %s[0].state == "" + %s[0].state == nil %s[0].country_code == "DE" %s[0].phone == "+49.2602960" %s[0].fax == "+49.72191374215" @@ -63,7 +63,7 @@ %s[0].address == "Elgendorfer Strasse 57" %s[0].city == "Montabaur" %s[0].zip == "56410" - %s[0].state == "" + %s[0].state == nil %s[0].country_code == "DE" %s[0].phone == "+49.2602960" %s[0].fax == "+49.72191374215" @@ -80,7 +80,7 @@ %s[0].address == "Elgendorfer Strasse 57" %s[0].city == "Montabaur" %s[0].zip == "56410" - %s[0].state == "" + %s[0].state == nil %s[0].country_code == "DE" %s[0].phone == "+49.2602960" %s[0].fax == "+49.72191374215" diff --git a/spec/fixtures/responses/whois.centralnic.com/ae.org/status_available.expected b/spec/fixtures/responses/whois.centralnic.com/ae.org/status_available.expected index 2c3fe7a8..64c3bae5 100644 --- a/spec/fixtures/responses/whois.centralnic.com/ae.org/status_available.expected +++ b/spec/fixtures/responses/whois.centralnic.com/ae.org/status_available.expected @@ -1,5 +1,5 @@ #disclaimer - %s == nil + %s == "The Whois and RDAP services are provided by CentralNic, and contain information pertaining to Internet domain names registered by our our customers. By using this service you are agreeing (1) not to use any information presented here for any purpose other than determining ownership of domain names, (2) not to store or reproduce this data in any way, (3) not to use any high-volume, automated, electronic processes to obtain data from this service. Abuse of this service is monitored and actions in contravention of these terms will result in being permanently blacklisted. All data is (c) CentralNic Ltd (https://www.centralnic.com) Access to the Whois and RDAP services is rate limited. For more information, visit https://registrar-console.centralnic.com/pub/whois_guidance." #domain @@ -10,7 +10,7 @@ #status - %s == [] + %s == :available #available? %s == true diff --git a/spec/fixtures/responses/whois.centralnic.com/ae.org/status_available.txt b/spec/fixtures/responses/whois.centralnic.com/ae.org/status_available.txt index 09cc0f7e..8c0bc9f0 100644 --- a/spec/fixtures/responses/whois.centralnic.com/ae.org/status_available.txt +++ b/spec/fixtures/responses/whois.centralnic.com/ae.org/status_available.txt @@ -1 +1,21 @@ -DOMAIN NOT FOUND +The queried object does not exist: DOMAIN NOT FOUND + +>>> Last update of WHOIS database: 2021-12-15T16:08:28.0Z <<< + +For more information on Whois status codes, please visit https://icann.org/epp + +>>> IMPORTANT INFORMATION ABOUT THE DEPLOYMENT OF RDAP: please visit +https://www.centralnic.com/support/rdap <<< + +The Whois and RDAP services are provided by CentralNic, and contain +information pertaining to Internet domain names registered by our +our customers. By using this service you are agreeing (1) not to use any +information presented here for any purpose other than determining +ownership of domain names, (2) not to store or reproduce this data in +any way, (3) not to use any high-volume, automated, electronic processes +to obtain data from this service. Abuse of this service is monitored and +actions in contravention of these terms will result in being permanently +blacklisted. All data is (c) CentralNic Ltd (https://www.centralnic.com) + +Access to the Whois and RDAP services is rate limited. For more +information, visit https://registrar-console.centralnic.com/pub/whois_guidance. diff --git a/spec/fixtures/responses/whois.centralnic.com/ae.org/status_purged.expected b/spec/fixtures/responses/whois.centralnic.com/ae.org/status_purged.expected new file mode 100644 index 00000000..64c3bae5 --- /dev/null +++ b/spec/fixtures/responses/whois.centralnic.com/ae.org/status_purged.expected @@ -0,0 +1,50 @@ +#disclaimer + %s == "The Whois and RDAP services are provided by CentralNic, and contain information pertaining to Internet domain names registered by our our customers. By using this service you are agreeing (1) not to use any information presented here for any purpose other than determining ownership of domain names, (2) not to store or reproduce this data in any way, (3) not to use any high-volume, automated, electronic processes to obtain data from this service. Abuse of this service is monitored and actions in contravention of these terms will result in being permanently blacklisted. All data is (c) CentralNic Ltd (https://www.centralnic.com) Access to the Whois and RDAP services is rate limited. For more information, visit https://registrar-console.centralnic.com/pub/whois_guidance." + + +#domain + %s == nil + +#domain_id + %s == nil + + +#status + %s == :available + +#available? + %s == true + +#registered? + %s == false + + +#created_on + %s == nil + +#updated_on + %s == nil + +#expires_on + %s == nil + + +#registrar + %s == nil + +#registrant_contacts + %s %CLASS{array} + %s == [] + +#admin_contacts + %s %CLASS{array} + %s == [] + +#technical_contacts + %s %CLASS{array} + %s == [] + + +#nameservers + %s %CLASS{array} + %s == [] diff --git a/spec/fixtures/responses/whois.centralnic.com/ae.org/status_purged.txt b/spec/fixtures/responses/whois.centralnic.com/ae.org/status_purged.txt new file mode 100644 index 00000000..30fa22c4 --- /dev/null +++ b/spec/fixtures/responses/whois.centralnic.com/ae.org/status_purged.txt @@ -0,0 +1,21 @@ +The queried object does not exist: previous registration D887354-CNIC was purged on 2020-10-18T01:03:34.0Z (DOMAIN NOT FOUND) + +>>> Last update of WHOIS database: 2021-12-15T16:06:58.0Z <<< + +For more information on Whois status codes, please visit https://icann.org/epp + +>>> IMPORTANT INFORMATION ABOUT THE DEPLOYMENT OF RDAP: please visit +https://www.centralnic.com/support/rdap <<< + +The Whois and RDAP services are provided by CentralNic, and contain +information pertaining to Internet domain names registered by our +our customers. By using this service you are agreeing (1) not to use any +information presented here for any purpose other than determining +ownership of domain names, (2) not to store or reproduce this data in +any way, (3) not to use any high-volume, automated, electronic processes +to obtain data from this service. Abuse of this service is monitored and +actions in contravention of these terms will result in being permanently +blacklisted. All data is (c) CentralNic Ltd (https://www.centralnic.com) + +Access to the Whois and RDAP services is rate limited. For more +information, visit https://registrar-console.centralnic.com/pub/whois_guidance. diff --git a/spec/fixtures/responses/whois.centralnic.com/ae.org/status_registered.expected b/spec/fixtures/responses/whois.centralnic.com/ae.org/status_registered.expected index ba7af410..45976578 100644 --- a/spec/fixtures/responses/whois.centralnic.com/ae.org/status_registered.expected +++ b/spec/fixtures/responses/whois.centralnic.com/ae.org/status_registered.expected @@ -1,16 +1,16 @@ #disclaimer - %s == "This whois service is provided by CentralNic Ltd and only contains information pertaining to Internet domain names we have registered for our customers. By using this service you are agreeing (1) not to use any information presented here for any purpose other than determining ownership of domain names, (2) not to store or reproduce this data in any way, (3) not to use any high-volume, automated, electronic processes to obtain data from this service. Abuse of this service is monitored and actions in contravention of these terms will result in being permanently blacklisted. All data is (c) CentralNic Ltd https://www.centralnic.com/" + %s == "The Whois and RDAP services are provided by CentralNic, and contain information pertaining to Internet domain names registered by our our customers. By using this service you are agreeing (1) not to use any information presented here for any purpose other than determining ownership of domain names, (2) not to store or reproduce this data in any way, (3) not to use any high-volume, automated, electronic processes to obtain data from this service. Abuse of this service is monitored and actions in contravention of these terms will result in being permanently blacklisted. All data is (c) CentralNic Ltd (https://www.centralnic.com) Access to the Whois and RDAP services is rate limited. For more information, visit https://registrar-console.centralnic.com/pub/whois_guidance." #domain - %s == "kidzlink.ae.org" + %s == "greenflame.ae.org" #domain_id - %s == "CNIC-DO887354" + %s == "D220363148-CNIC" #status - %s == ["clientTransferProhibited", "serverTransferProhibited"] + %s == :registered #available? %s == false @@ -21,86 +21,82 @@ #created_on %s %CLASS{time} - %s %TIME{2012-08-03 15:37:33 UTC} + %s %TIME{2021-02-04 08:51:08 UTC} #updated_on %s %CLASS{time} - %s %TIME{2013-06-09 00:12:37 UTC} + %s %TIME{2021-03-24 15:08:42 UTC} #expires_on %s %CLASS{time} - %s %TIME{2014-08-03 23:59:59 UTC} + %s %TIME{2022-02-04 23:59:59 UTC} #registrar %s %CLASS{registrar} - %s.id == "H65658" - %s.name == "101Domain, Inc." - %s.url == "http://www.101domain.com" + %s.id == "1647" + %s.name == "Hosting Concepts B.V. d/b/a Registrar.eu" + %s.url == "https://www.openprovider.com/" #registrant_contacts %s %CLASS{array} %s %SIZE{1} %s[0] %CLASS{contact} %s[0].type == Whois::Parser::Contact::TYPE_REGISTRANT - %s[0].id == "RWG000000003DA24" - %s[0].name == "IPC C/O Clarenter" - %s[0].organization == "Clarenter" - %s[0].address == "110 E Broward Blvd\nSte. 1720" - %s[0].city == "Fort Lauderdale" - %s[0].zip == "33301" - %s[0].state == "FL" + %s[0].id == nil + %s[0].name == nil + %s[0].organization == nil + %s[0].address == nil + %s[0].city == nil + %s[0].zip == nil + %s[0].state == nil %s[0].country == nil - %s[0].country_code == "US" - %s[0].phone == "+1.18888443911" + %s[0].country_code == nil + %s[0].phone == nil %s[0].fax == nil - %s[0].email == "patricia@internationalpreschoolcurriculum.com" + %s[0].email == "https://whois.centralnic.com/contact/greenflame.ae.org/registrant" #admin_contacts %s %CLASS{array} %s %SIZE{1} %s[0] %CLASS{contact} %s[0].type == Whois::Parser::Contact::TYPE_ADMINISTRATIVE - %s[0].id == "RWG000000003DA24" - %s[0].name == "IPC C/O Clarenter" - %s[0].organization == "Clarenter" - %s[0].address == "110 E Broward Blvd\nSte. 1720" - %s[0].city == "Fort Lauderdale" - %s[0].zip == "33301" - %s[0].state == "FL" + %s[0].id == nil + %s[0].name == nil + %s[0].organization == nil + %s[0].address == nil + %s[0].city == nil + %s[0].zip == nil + %s[0].state == nil %s[0].country == nil - %s[0].country_code == "US" - %s[0].phone == "+1.18888443911" + %s[0].country_code == nil + %s[0].phone == nil %s[0].fax == nil - %s[0].email == "patricia@internationalpreschoolcurriculum.com" + %s[0].email == "https://whois.centralnic.com/contact/greenflame.ae.org/admin" #technical_contacts %s %CLASS{array} %s %SIZE{1} %s[0] %CLASS{contact} %s[0].type == Whois::Parser::Contact::TYPE_TECHNICAL - %s[0].id == "RWG000000003DA24" - %s[0].name == "IPC C/O Clarenter" - %s[0].organization == "Clarenter" - %s[0].address == "110 E Broward Blvd\nSte. 1720" - %s[0].city == "Fort Lauderdale" - %s[0].zip == "33301" - %s[0].state == "FL" + %s[0].id == nil + %s[0].name == nil + %s[0].organization == nil + %s[0].address == nil + %s[0].city == nil + %s[0].zip == nil + %s[0].state == nil %s[0].country == nil - %s[0].country_code == "US" - %s[0].phone == "+1.18888443911" + %s[0].country_code == nil + %s[0].phone == nil %s[0].fax == nil - %s[0].email == "patricia@internationalpreschoolcurriculum.com" + %s[0].email == "https://whois.centralnic.com/contact/greenflame.ae.org/tech" #nameservers %s %CLASS{array} %s %SIZE{2} %s[0] %CLASS{nameserver} - %s[0].name == "ns37.domaincontrol.com" - %s[0].ipv4 == nil - %s[0].ipv6 == nil + %s[0].name == "ns1.dns-parking.com" %s[1] %CLASS{nameserver} - %s[1].name == "ns38.domaincontrol.com" - %s[1].ipv4 == nil - %s[1].ipv6 == nil + %s[1].name == "ns2.dns-parking.com" diff --git a/spec/fixtures/responses/whois.centralnic.com/ae.org/status_registered.txt b/spec/fixtures/responses/whois.centralnic.com/ae.org/status_registered.txt index 44484924..70e5d6bf 100644 --- a/spec/fixtures/responses/whois.centralnic.com/ae.org/status_registered.txt +++ b/spec/fixtures/responses/whois.centralnic.com/ae.org/status_registered.txt @@ -1,76 +1,39 @@ -Domain ID:CNIC-DO887354 -Domain Name:KIDZLINK.AE.ORG -Created On:2012-08-03T15:37:33.0Z -Last Updated On:2013-06-09T00:12:37.0Z -Expiration Date:2014-08-03T23:59:59.0Z -Status:clientTransferProhibited -Status:serverTransferProhibited -Registrant ID:RWG000000003DA24 -Registrant Name:IPC C/O Clarenter -Registrant Organization:Clarenter -Registrant Street1:110 E Broward Blvd -Registrant Street2:Ste. 1720 -Registrant City:Fort Lauderdale -Registrant State/Province:FL -Registrant Postal Code:33301 -Registrant Country:US -Registrant Phone:+1.18888443911 -Registrant Email:patricia@internationalpreschoolcurriculum.com -Admin ID:RWG000000003DA24 -Admin Name:IPC C/O Clarenter -Admin Organization:Clarenter -Admin Street1:110 E Broward Blvd -Admin Street2:Ste. 1720 -Admin City:Fort Lauderdale -Admin State/Province:FL -Admin Postal Code:33301 -Admin Country:US -Admin Phone:+1.18888443911 -Admin Email:patricia@internationalpreschoolcurriculum.com -Tech ID:RWG000000003DA24 -Tech Name:IPC C/O Clarenter -Tech Organization:Clarenter -Tech Street1:110 E Broward Blvd -Tech Street2:Ste. 1720 -Tech City:Fort Lauderdale -Tech State/Province:FL -Tech Postal Code:33301 -Tech Country:US -Tech Phone:+1.18888443911 -Tech Email:patricia@internationalpreschoolcurriculum.com -Billing ID:RWG000000003DA25 -Billing Name:Billing Department -Billing Organization:101Domain, Inc. -Billing Street1:5858 Edison Pl. -Billing City:Carlsbad -Billing State/Province:CA -Billing Postal Code:92008 -Billing Country:US -Billing Phone:+1.7604448674 -Billing FAX:+1.7605794996 -Billing Email:tech1@101domain.com -Sponsoring Registrar ID:H65658 -Sponsoring Registrar IANA ID:1011 -Sponsoring Registrar Organization:101Domain, Inc. -Sponsoring Registrar Street1:5858 Edison Pl. -Sponsoring Registrar City:Carlsbad -Sponsoring Registrar State/Province:CA -Sponsoring Registrar Postal Code:92008 -Sponsoring Registrar Country:US -Sponsoring Registrar Phone:+1.7604448674 -Sponsoring Registrar FAX:+1.7605794996 -Sponsoring Registrar Website:http://www.101domain.com -Name Server:NS37.DOMAINCONTROL.COM -Name Server:NS38.DOMAINCONTROL.COM -DNSSEC:Unsigned +Domain Name: GREENFLAME.AE.ORG +Registry Domain ID: D220363148-CNIC +Registrar WHOIS Server: whois.registrar.eu +Registrar URL: https://www.openprovider.com/ +Updated Date: 2021-03-24T15:08:42.0Z +Creation Date: 2021-02-04T08:51:08.0Z +Registry Expiry Date: 2022-02-04T23:59:59.0Z +Registrar: Hosting Concepts B.V. d/b/a Registrar.eu +Registrar IANA ID: 1647 +Domain Status: clientTransferProhibited https://icann.org/epp#clientTransferProhibited +Registrant Email: https://whois.centralnic.com/contact/greenflame.ae.org/registrant +Admin Email: https://whois.centralnic.com/contact/greenflame.ae.org/admin +Tech Email: https://whois.centralnic.com/contact/greenflame.ae.org/tech +Name Server: NS1.DNS-PARKING.COM +Name Server: NS2.DNS-PARKING.COM +DNSSEC: unsigned +Billing Email: https://whois.centralnic.com/contact/greenflame.ae.org/billing +Registrar Abuse Contact Email: abuse@registrar.eu +Registrar Abuse Contact Phone: +31.104482297 +URL of the ICANN Whois Inaccuracy Complaint Form: https://www.icann.org/wicf/ +>>> Last update of WHOIS database: 2021-12-15T16:06:55.0Z <<< -This whois service is provided by CentralNic Ltd and only contains -information pertaining to Internet domain names we have registered for -our customers. By using this service you are agreeing (1) not to use any -information presented here for any purpose other than determining -ownership of domain names, (2) not to store or reproduce this data in -any way, (3) not to use any high-volume, automated, electronic processes -to obtain data from this service. Abuse of this service is monitored and -actions in contravention of these terms will result in being permanently -blacklisted. All data is (c) CentralNic Ltd https://www.centralnic.com/ +For more information on Whois status codes, please visit https://icann.org/epp +>>> IMPORTANT INFORMATION ABOUT THE DEPLOYMENT OF RDAP: please visit +https://www.centralnic.com/support/rdap <<< + +The Whois and RDAP services are provided by CentralNic, and contain +information pertaining to Internet domain names registered by our +our customers. By using this service you are agreeing (1) not to use any +information presented here for any purpose other than determining +ownership of domain names, (2) not to store or reproduce this data in +any way, (3) not to use any high-volume, automated, electronic processes +to obtain data from this service. Abuse of this service is monitored and +actions in contravention of these terms will result in being permanently +blacklisted. All data is (c) CentralNic Ltd (https://www.centralnic.com) + +Access to the Whois and RDAP services is rate limited. For more +information, visit https://registrar-console.centralnic.com/pub/whois_guidance. diff --git a/spec/fixtures/responses/whois.centralnic.com/ar.com/status_available.expected b/spec/fixtures/responses/whois.centralnic.com/ar.com/status_available.expected deleted file mode 100644 index 2c3fe7a8..00000000 --- a/spec/fixtures/responses/whois.centralnic.com/ar.com/status_available.expected +++ /dev/null @@ -1,50 +0,0 @@ -#disclaimer - %s == nil - - -#domain - %s == nil - -#domain_id - %s == nil - - -#status - %s == [] - -#available? - %s == true - -#registered? - %s == false - - -#created_on - %s == nil - -#updated_on - %s == nil - -#expires_on - %s == nil - - -#registrar - %s == nil - -#registrant_contacts - %s %CLASS{array} - %s == [] - -#admin_contacts - %s %CLASS{array} - %s == [] - -#technical_contacts - %s %CLASS{array} - %s == [] - - -#nameservers - %s %CLASS{array} - %s == [] diff --git a/spec/fixtures/responses/whois.centralnic.com/ar.com/status_available.txt b/spec/fixtures/responses/whois.centralnic.com/ar.com/status_available.txt deleted file mode 100644 index 09cc0f7e..00000000 --- a/spec/fixtures/responses/whois.centralnic.com/ar.com/status_available.txt +++ /dev/null @@ -1 +0,0 @@ -DOMAIN NOT FOUND diff --git a/spec/fixtures/responses/whois.centralnic.com/ar.com/status_registered.expected b/spec/fixtures/responses/whois.centralnic.com/ar.com/status_registered.expected deleted file mode 100644 index 746c77eb..00000000 --- a/spec/fixtures/responses/whois.centralnic.com/ar.com/status_registered.expected +++ /dev/null @@ -1,110 +0,0 @@ -#disclaimer - %s == "This whois service is provided by CentralNic Ltd and only contains information pertaining to Internet domain names we have registered for our customers. By using this service you are agreeing (1) not to use any information presented here for any purpose other than determining ownership of domain names, (2) not to store or reproduce this data in any way, (3) not to use any high-volume, automated, electronic processes to obtain data from this service. Abuse of this service is monitored and actions in contravention of these terms will result in being permanently blacklisted. All data is (c) CentralNic Ltd https://www.centralnic.com/" - - -#domain - %s == "hotel.ar.com" - -#domain_id - %s == "CNIC-DO557730" - - -#status - %s == ["ok"] - -#available? - %s == false - -#registered? - %s == true - - -#created_on - %s %CLASS{time} - %s %TIME{2008-04-25 16:22:13 UTC} - -#updated_on - %s %CLASS{time} - %s %TIME{2013-04-26 00:15:40 UTC} - -#expires_on - %s %CLASS{time} - %s %TIME{2014-04-25 23:59:59 UTC} - - -#registrar - %s %CLASS{registrar} - %s.id == "H1323241" - %s.name == "CentralNic Ltd" - %s.url == nil - -#registrant_contacts - %s %CLASS{array} - %s %SIZE{1} - %s[0] %CLASS{contact} - %s[0].type == Whois::Parser::Contact::TYPE_REGISTRANT - %s[0].id == "H1323241" - %s[0].name == "Reserved Domains" - %s[0].organization == "CentralNic Ltd" - %s[0].address == "35-39 Moorgate" - %s[0].city == "London" - %s[0].zip == "EC2R 6AR" - %s[0].state == nil - %s[0].country == nil - %s[0].country_code == "GB" - %s[0].phone == "+44.8700170900" - %s[0].fax == "+44.8700170901" - %s[0].email == "domains@centralnic.com" - -#admin_contacts - %s %CLASS{array} - %s %SIZE{1} - %s[0] %CLASS{contact} - %s[0].type == Whois::Parser::Contact::TYPE_ADMINISTRATIVE - %s[0].id == "H1323241" - %s[0].name == "Reserved Domains" - %s[0].organization == "CentralNic Ltd" - %s[0].address == "35-39 Moorgate" - %s[0].city == "London" - %s[0].zip == "EC2R 6AR" - %s[0].state == nil - %s[0].country == nil - %s[0].country_code == "GB" - %s[0].phone == "+44.8700170900" - %s[0].fax == "+44.8700170901" - %s[0].email == "domains@centralnic.com" - -#technical_contacts - %s %CLASS{array} - %s %SIZE{1} - %s[0] %CLASS{contact} - %s[0].type == Whois::Parser::Contact::TYPE_TECHNICAL - %s[0].id == "H1323241" - %s[0].name == "Reserved Domains" - %s[0].organization == "CentralNic Ltd" - %s[0].address == "35-39 Moorgate" - %s[0].city == "London" - %s[0].zip == "EC2R 6AR" - %s[0].state == nil - %s[0].country == nil - %s[0].country_code == "GB" - %s[0].phone == "+44.8700170900" - %s[0].fax == "+44.8700170901" - %s[0].email == "domains@centralnic.com" - - -#nameservers - %s %CLASS{array} - %s %SIZE{6} - %s[0] %CLASS{nameserver} - %s[0].name == "ns0.centralnic-dns.com" - %s[1] %CLASS{nameserver} - %s[1].name == "ns1.centralnic-dns.com" - %s[2] %CLASS{nameserver} - %s[2].name == "ns2.centralnic-dns.com" - %s[3] %CLASS{nameserver} - %s[3].name == "ns3.centralnic-dns.com" - %s[4] %CLASS{nameserver} - %s[4].name == "ns4.centralnic-dns.com" - %s[5] %CLASS{nameserver} - %s[5].name == "ns5.centralnic-dns.com" diff --git a/spec/fixtures/responses/whois.centralnic.com/ar.com/status_registered.txt b/spec/fixtures/responses/whois.centralnic.com/ar.com/status_registered.txt deleted file mode 100644 index 221124ce..00000000 --- a/spec/fixtures/responses/whois.centralnic.com/ar.com/status_registered.txt +++ /dev/null @@ -1,62 +0,0 @@ -Domain ID:CNIC-DO557730 -Domain Name:HOTEL.AR.COM -Created On:2008-04-25T16:22:13.0Z -Last Updated On:2013-04-26T00:15:40.0Z -Expiration Date:2014-04-25T23:59:59.0Z -Status:ok -Registrant ID:H1323241 -Registrant Name:Reserved Domains -Registrant Organization:CentralNic Ltd -Registrant Street1:35-39 Moorgate -Registrant City:London -Registrant Postal Code:EC2R 6AR -Registrant Country:GB -Registrant Phone:+44.8700170900 -Registrant FAX:+44.8700170901 -Registrant Email:domains@centralnic.com -Admin ID:H1323241 -Admin Name:Reserved Domains -Admin Organization:CentralNic Ltd -Admin Street1:35-39 Moorgate -Admin City:London -Admin Postal Code:EC2R 6AR -Admin Country:GB -Admin Phone:+44.8700170900 -Admin FAX:+44.8700170901 -Admin Email:domains@centralnic.com -Tech ID:H1323241 -Tech Name:Reserved Domains -Tech Organization:CentralNic Ltd -Tech Street1:35-39 Moorgate -Tech City:London -Tech Postal Code:EC2R 6AR -Tech Country:GB -Tech Phone:+44.8700170900 -Tech FAX:+44.8700170901 -Tech Email:domains@centralnic.com -Sponsoring Registrar ID:H1323241 -Sponsoring Registrar Organization:CentralNic Ltd -Sponsoring Registrar Street1:35-39 Moorgate -Sponsoring Registrar City:London -Sponsoring Registrar Postal Code:EC2R 6AR -Sponsoring Registrar Country:GB -Sponsoring Registrar Phone:+44.8700170900 -Sponsoring Registrar FAX:+44.8700170901 -Name Server:NS0.CENTRALNIC-DNS.COM -Name Server:NS1.CENTRALNIC-DNS.COM -Name Server:NS2.CENTRALNIC-DNS.COM -Name Server:NS3.CENTRALNIC-DNS.COM -Name Server:NS4.CENTRALNIC-DNS.COM -Name Server:NS5.CENTRALNIC-DNS.COM -DNSSEC:Unsigned - -This whois service is provided by CentralNic Ltd and only contains -information pertaining to Internet domain names we have registered for -our customers. By using this service you are agreeing (1) not to use any -information presented here for any purpose other than determining -ownership of domain names, (2) not to store or reproduce this data in -any way, (3) not to use any high-volume, automated, electronic processes -to obtain data from this service. Abuse of this service is monitored and -actions in contravention of these terms will result in being permanently -blacklisted. All data is (c) CentralNic Ltd https://www.centralnic.com/ - diff --git a/spec/fixtures/responses/whois.centralnic.com/br.com/status_available.expected b/spec/fixtures/responses/whois.centralnic.com/br.com/status_available.expected index 2c3fe7a8..64c3bae5 100644 --- a/spec/fixtures/responses/whois.centralnic.com/br.com/status_available.expected +++ b/spec/fixtures/responses/whois.centralnic.com/br.com/status_available.expected @@ -1,5 +1,5 @@ #disclaimer - %s == nil + %s == "The Whois and RDAP services are provided by CentralNic, and contain information pertaining to Internet domain names registered by our our customers. By using this service you are agreeing (1) not to use any information presented here for any purpose other than determining ownership of domain names, (2) not to store or reproduce this data in any way, (3) not to use any high-volume, automated, electronic processes to obtain data from this service. Abuse of this service is monitored and actions in contravention of these terms will result in being permanently blacklisted. All data is (c) CentralNic Ltd (https://www.centralnic.com) Access to the Whois and RDAP services is rate limited. For more information, visit https://registrar-console.centralnic.com/pub/whois_guidance." #domain @@ -10,7 +10,7 @@ #status - %s == [] + %s == :available #available? %s == true diff --git a/spec/fixtures/responses/whois.centralnic.com/br.com/status_available.txt b/spec/fixtures/responses/whois.centralnic.com/br.com/status_available.txt index 09cc0f7e..7bac09b5 100644 --- a/spec/fixtures/responses/whois.centralnic.com/br.com/status_available.txt +++ b/spec/fixtures/responses/whois.centralnic.com/br.com/status_available.txt @@ -1 +1,21 @@ -DOMAIN NOT FOUND +The queried object does not exist: DOMAIN NOT FOUND + +>>> Last update of WHOIS database: 2021-12-15T16:23:06.0Z <<< + +For more information on Whois status codes, please visit https://icann.org/epp + +>>> IMPORTANT INFORMATION ABOUT THE DEPLOYMENT OF RDAP: please visit +https://www.centralnic.com/support/rdap <<< + +The Whois and RDAP services are provided by CentralNic, and contain +information pertaining to Internet domain names registered by our +our customers. By using this service you are agreeing (1) not to use any +information presented here for any purpose other than determining +ownership of domain names, (2) not to store or reproduce this data in +any way, (3) not to use any high-volume, automated, electronic processes +to obtain data from this service. Abuse of this service is monitored and +actions in contravention of these terms will result in being permanently +blacklisted. All data is (c) CentralNic Ltd (https://www.centralnic.com) + +Access to the Whois and RDAP services is rate limited. For more +information, visit https://registrar-console.centralnic.com/pub/whois_guidance. diff --git a/spec/fixtures/responses/whois.centralnic.com/br.com/status_registered.expected b/spec/fixtures/responses/whois.centralnic.com/br.com/status_registered.expected index 6aecd0be..093ca9ac 100644 --- a/spec/fixtures/responses/whois.centralnic.com/br.com/status_registered.expected +++ b/spec/fixtures/responses/whois.centralnic.com/br.com/status_registered.expected @@ -1,16 +1,16 @@ #disclaimer - %s == "This whois service is provided by CentralNic Ltd and only contains information pertaining to Internet domain names we have registered for our customers. By using this service you are agreeing (1) not to use any information presented here for any purpose other than determining ownership of domain names, (2) not to store or reproduce this data in any way, (3) not to use any high-volume, automated, electronic processes to obtain data from this service. Abuse of this service is monitored and actions in contravention of these terms will result in being permanently blacklisted. All data is (c) CentralNic Ltd https://www.centralnic.com/" + %s == "The Whois and RDAP services are provided by CentralNic, and contain information pertaining to Internet domain names registered by our our customers. By using this service you are agreeing (1) not to use any information presented here for any purpose other than determining ownership of domain names, (2) not to store or reproduce this data in any way, (3) not to use any high-volume, automated, electronic processes to obtain data from this service. Abuse of this service is monitored and actions in contravention of these terms will result in being permanently blacklisted. All data is (c) CentralNic Ltd (https://www.centralnic.com) Access to the Whois and RDAP services is rate limited. For more information, visit https://registrar-console.centralnic.com/pub/whois_guidance." #domain - %s == "billboard.br.com" + %s == "linet.br.com" #domain_id - %s == "CNIC-DO624205" + %s == "D1656506-CNIC" #status - %s == ["clientTransferProhibited", "serverTransferProhibited", "renewPeriod"] + %s == :registered #available? %s == false @@ -21,86 +21,53 @@ #created_on %s %CLASS{time} - %s %TIME{2009-04-17 12:22:49 UTC} + %s %TIME{2013-11-28 13:16:50 UTC} #updated_on %s %CLASS{time} - %s %TIME{2012-01-16 16:23:18 UTC} + %s %TIME{2021-03-11 11:49:22 UTC} #expires_on %s %CLASS{time} - %s %TIME{2017-04-17 23:59:59 UTC} + %s %TIME{2022-11-28 23:59:59 UTC} #registrar %s %CLASS{registrar} - %s.id == "H292913" - %s.name == "Network Solutions LLC" - %s.url == "http://www.networksolutions.com/" + %s.id == "1387" + %s.name == "1API GmbH" + %s.url == "http://www.1api.net" #registrant_contacts %s %CLASS{array} %s %SIZE{1} %s[0] %CLASS{contact} %s[0].type == Whois::Parser::Contact::TYPE_REGISTRANT - %s[0].id == "36542943" - %s[0].name == "Antonio Camarotti Pinto" - %s[0].organization == nil - %s[0].address == "Rua Urussui, 238\n#22" - %s[0].city == "Sao Paulo" - %s[0].zip == "04542-050" - %s[0].state == "Sao Paulo" - %s[0].country == nil - %s[0].country_code == "BR" - %s[0].phone == "+1.551130787711" - %s[0].fax == nil - %s[0].email == "ac@bpp.bz" + %s[0].email == "https://whois.centralnic.com/contact/linet.br.com/registrant" #admin_contacts %s %CLASS{array} %s %SIZE{1} %s[0] %CLASS{contact} %s[0].type == Whois::Parser::Contact::TYPE_ADMINISTRATIVE - %s[0].id == "36542943" - %s[0].name == "Antonio Camarotti Pinto" - %s[0].organization == nil - %s[0].address == "Rua Urussui, 238\n#22" - %s[0].city == "Sao Paulo" - %s[0].zip == "04542-050" - %s[0].state == "Sao Paulo" - %s[0].country == nil - %s[0].country_code == "BR" - %s[0].phone == "+1.551130787711" - %s[0].fax == nil - %s[0].email == "ac@bpp.bz" + %s[0].email == "https://whois.centralnic.com/contact/linet.br.com/admin" #technical_contacts %s %CLASS{array} %s %SIZE{1} %s[0] %CLASS{contact} %s[0].type == Whois::Parser::Contact::TYPE_TECHNICAL - %s[0].id == "36542943" - %s[0].name == "Antonio Camarotti Pinto" - %s[0].organization == nil - %s[0].address == "Rua Urussui, 238\n#22" - %s[0].city == "Sao Paulo" - %s[0].zip == "04542-050" - %s[0].state == "Sao Paulo" - %s[0].country == nil - %s[0].country_code == "BR" - %s[0].phone == "+1.551130787711" - %s[0].fax == nil - %s[0].email == "ac@bpp.bz" + %s[0].email == "https://whois.centralnic.com/contact/linet.br.com/tech" #nameservers %s %CLASS{array} - %s %SIZE{2} + %s %SIZE{4} %s[0] %CLASS{nameserver} - %s[0].name == "ns1.locaweb.com.br" - %s[0].ipv4 == nil - %s[0].ipv6 == nil + %s[0].name == "ns1.iwantmyname.net" %s[1] %CLASS{nameserver} - %s[1].name == "ns2.locaweb.com.br" - %s[1].ipv4 == nil - %s[1].ipv6 == nil + %s[1].name == "ns2.iwantmyname.net" + %s[2] %CLASS{nameserver} + %s[2].name == "ns3.iwantmyname.net" + %s[3] %CLASS{nameserver} + %s[3].name == "ns4.iwantmyname.net" diff --git a/spec/fixtures/responses/whois.centralnic.com/br.com/status_registered.txt b/spec/fixtures/responses/whois.centralnic.com/br.com/status_registered.txt index 283c691d..bd862ccb 100644 --- a/spec/fixtures/responses/whois.centralnic.com/br.com/status_registered.txt +++ b/spec/fixtures/responses/whois.centralnic.com/br.com/status_registered.txt @@ -1,73 +1,42 @@ -Domain ID:CNIC-DO624205 -Domain Name:BILLBOARD.BR.COM -Created On:2009-04-17T12:22:49.0Z -Last Updated On:2012-01-16T16:23:18.0Z -Expiration Date:2017-04-17T23:59:59.0Z -Status:clientTransferProhibited -Status:serverTransferProhibited -Status:renewPeriod -Registrant ID:36542943 -Registrant Name:Antonio Camarotti Pinto -Registrant Street1:Rua Urussui, 238 -Registrant Street2:#22 -Registrant City:Sao Paulo -Registrant State/Province:Sao Paulo -Registrant Postal Code:04542-050 -Registrant Country:BR -Registrant Phone:+1.551130787711 -Registrant Email:ac@bpp.bz -Admin ID:36542943 -Admin Name:Antonio Camarotti Pinto -Admin Street1:Rua Urussui, 238 -Admin Street2:#22 -Admin City:Sao Paulo -Admin State/Province:Sao Paulo -Admin Postal Code:04542-050 -Admin Country:BR -Admin Phone:+1.551130787711 -Admin Email:ac@bpp.bz -Tech ID:36542943 -Tech Name:Antonio Camarotti Pinto -Tech Street1:Rua Urussui, 238 -Tech Street2:#22 -Tech City:Sao Paulo -Tech State/Province:Sao Paulo -Tech Postal Code:04542-050 -Tech Country:BR -Tech Phone:+1.551130787711 -Tech Email:ac@bpp.bz -Billing ID:36542943 -Billing Name:Antonio Camarotti Pinto -Billing Street1:Rua Urussui, 238 -Billing Street2:#22 -Billing City:Sao Paulo -Billing State/Province:Sao Paulo -Billing Postal Code:04542-050 -Billing Country:BR -Billing Phone:+1.551130787711 -Billing Email:ac@bpp.bz -Sponsoring Registrar ID:H292913 -Sponsoring Registrar IANA ID:2 -Sponsoring Registrar Organization:Network Solutions LLC -Sponsoring Registrar Street1:12808 Gran Bay Parkway West -Sponsoring Registrar City:Jacksonville -Sponsoring Registrar State/Province:FL -Sponsoring Registrar Postal Code:32258 -Sponsoring Registrar Country:US -Sponsoring Registrar Phone:+1.9046806600 -Sponsoring Registrar FAX:+1.9048800350 -Sponsoring Registrar Website:http://www.networksolutions.com/ -Name Server:NS1.LOCAWEB.COM.BR -Name Server:NS2.LOCAWEB.COM.BR -DNSSEC:Unsigned +Domain Name: LINET.BR.COM +Registry Domain ID: D1656506-CNIC +Registrar WHOIS Server: whois.1api.net +Registrar URL: http://www.1api.net +Updated Date: 2021-03-11T11:49:22.0Z +Creation Date: 2013-11-28T13:16:50.0Z +Registry Expiry Date: 2022-11-28T23:59:59.0Z +Registrar: 1API GmbH +Registrar IANA ID: 1387 +Domain Status: clientTransferProhibited https://icann.org/epp#clientTransferProhibited +Domain Status: autoRenewPeriod https://icann.org/epp#autoRenewPeriod +Registrant Email: https://whois.centralnic.com/contact/linet.br.com/registrant +Admin Email: https://whois.centralnic.com/contact/linet.br.com/admin +Tech Email: https://whois.centralnic.com/contact/linet.br.com/tech +Name Server: NS1.IWANTMYNAME.NET +Name Server: NS2.IWANTMYNAME.NET +Name Server: NS3.IWANTMYNAME.NET +Name Server: NS4.IWANTMYNAME.NET +DNSSEC: unsigned +Billing Email: https://whois.centralnic.com/contact/linet.br.com/billing +Registrar Abuse Contact Email: abuse@1api.net +Registrar Abuse Contact Phone: +49.68949396850 +URL of the ICANN Whois Inaccuracy Complaint Form: https://www.icann.org/wicf/ +>>> Last update of WHOIS database: 2021-12-15T16:22:50.0Z <<< -This whois service is provided by CentralNic Ltd and only contains -information pertaining to Internet domain names we have registered for -our customers. By using this service you are agreeing (1) not to use any -information presented here for any purpose other than determining -ownership of domain names, (2) not to store or reproduce this data in -any way, (3) not to use any high-volume, automated, electronic processes -to obtain data from this service. Abuse of this service is monitored and -actions in contravention of these terms will result in being permanently -blacklisted. All data is (c) CentralNic Ltd https://www.centralnic.com/ +For more information on Whois status codes, please visit https://icann.org/epp +>>> IMPORTANT INFORMATION ABOUT THE DEPLOYMENT OF RDAP: please visit +https://www.centralnic.com/support/rdap <<< + +The Whois and RDAP services are provided by CentralNic, and contain +information pertaining to Internet domain names registered by our +our customers. By using this service you are agreeing (1) not to use any +information presented here for any purpose other than determining +ownership of domain names, (2) not to store or reproduce this data in +any way, (3) not to use any high-volume, automated, electronic processes +to obtain data from this service. Abuse of this service is monitored and +actions in contravention of these terms will result in being permanently +blacklisted. All data is (c) CentralNic Ltd (https://www.centralnic.com) + +Access to the Whois and RDAP services is rate limited. For more +information, visit https://registrar-console.centralnic.com/pub/whois_guidance. diff --git a/spec/fixtures/responses/whois.centralnic.com/cn.com/status_available.expected b/spec/fixtures/responses/whois.centralnic.com/cn.com/status_available.expected index 2c3fe7a8..64c3bae5 100644 --- a/spec/fixtures/responses/whois.centralnic.com/cn.com/status_available.expected +++ b/spec/fixtures/responses/whois.centralnic.com/cn.com/status_available.expected @@ -1,5 +1,5 @@ #disclaimer - %s == nil + %s == "The Whois and RDAP services are provided by CentralNic, and contain information pertaining to Internet domain names registered by our our customers. By using this service you are agreeing (1) not to use any information presented here for any purpose other than determining ownership of domain names, (2) not to store or reproduce this data in any way, (3) not to use any high-volume, automated, electronic processes to obtain data from this service. Abuse of this service is monitored and actions in contravention of these terms will result in being permanently blacklisted. All data is (c) CentralNic Ltd (https://www.centralnic.com) Access to the Whois and RDAP services is rate limited. For more information, visit https://registrar-console.centralnic.com/pub/whois_guidance." #domain @@ -10,7 +10,7 @@ #status - %s == [] + %s == :available #available? %s == true diff --git a/spec/fixtures/responses/whois.centralnic.com/cn.com/status_available.txt b/spec/fixtures/responses/whois.centralnic.com/cn.com/status_available.txt index 09cc0f7e..7a3afe82 100644 --- a/spec/fixtures/responses/whois.centralnic.com/cn.com/status_available.txt +++ b/spec/fixtures/responses/whois.centralnic.com/cn.com/status_available.txt @@ -1 +1,21 @@ -DOMAIN NOT FOUND +The queried object does not exist: DOMAIN NOT FOUND + +>>> Last update of WHOIS database: 2021-12-15T16:26:54.0Z <<< + +For more information on Whois status codes, please visit https://icann.org/epp + +>>> IMPORTANT INFORMATION ABOUT THE DEPLOYMENT OF RDAP: please visit +https://www.centralnic.com/support/rdap <<< + +The Whois and RDAP services are provided by CentralNic, and contain +information pertaining to Internet domain names registered by our +our customers. By using this service you are agreeing (1) not to use any +information presented here for any purpose other than determining +ownership of domain names, (2) not to store or reproduce this data in +any way, (3) not to use any high-volume, automated, electronic processes +to obtain data from this service. Abuse of this service is monitored and +actions in contravention of these terms will result in being permanently +blacklisted. All data is (c) CentralNic Ltd (https://www.centralnic.com) + +Access to the Whois and RDAP services is rate limited. For more +information, visit https://registrar-console.centralnic.com/pub/whois_guidance. diff --git a/spec/fixtures/responses/whois.centralnic.com/cn.com/status_registered.expected b/spec/fixtures/responses/whois.centralnic.com/cn.com/status_registered.expected index 7063cea9..efd3711b 100644 --- a/spec/fixtures/responses/whois.centralnic.com/cn.com/status_registered.expected +++ b/spec/fixtures/responses/whois.centralnic.com/cn.com/status_registered.expected @@ -1,16 +1,15 @@ #disclaimer - %s == "This whois service is provided by CentralNic Ltd and only contains information pertaining to Internet domain names we have registered for our customers. By using this service you are agreeing (1) not to use any information presented here for any purpose other than determining ownership of domain names, (2) not to store or reproduce this data in any way, (3) not to use any high-volume, automated, electronic processes to obtain data from this service. Abuse of this service is monitored and actions in contravention of these terms will result in being permanently blacklisted. All data is (c) CentralNic Ltd https://www.centralnic.com/" - + %s == "The Whois and RDAP services are provided by CentralNic, and contain information pertaining to Internet domain names registered by our our customers. By using this service you are agreeing (1) not to use any information presented here for any purpose other than determining ownership of domain names, (2) not to store or reproduce this data in any way, (3) not to use any high-volume, automated, electronic processes to obtain data from this service. Abuse of this service is monitored and actions in contravention of these terms will result in being permanently blacklisted. All data is (c) CentralNic Ltd (https://www.centralnic.com) Access to the Whois and RDAP services is rate limited. For more information, visit https://registrar-console.centralnic.com/pub/whois_guidance." #domain %s == "gsn.cn.com" #domain_id - %s == "CNIC-DO323367" + %s == "D323367-CNIC" #status - %s == ["clientTransferProhibited", "serverTransferProhibited"] + %s == :registered #available? %s == false @@ -25,78 +24,49 @@ #updated_on %s %CLASS{time} - %s %TIME{2013-11-26 12:16:45 UTC} + %s %TIME{2021-11-11 02:14:17 UTC} #expires_on %s %CLASS{time} - %s %TIME{2014-11-23 23:59:59 UTC} + %s %TIME{2022-11-23 23:59:59 UTC} #registrar %s %CLASS{registrar} - %s.id == "H67436" + %s.id == "1408" %s.name == "united-domains AG" - %s.url == "http://www.united-domains.de" + %s.url == "https://www.united-domains.de/" #registrant_contacts %s %CLASS{array} %s %SIZE{1} %s[0] %CLASS{contact} %s[0].type == Whois::Parser::Contact::TYPE_REGISTRANT - %s[0].id == "H1062079" - %s[0].name == "GSN Electronics Incorporation Pte Ltd" - %s[0].organization == nil - %s[0].address == "Straits Trading Building 9 Battery Road 16-08\nSingapore" - %s[0].city == nil - %s[0].zip == "049910" - %s[0].state == nil - %s[0].country == nil - %s[0].country_code == "SG" - %s[0].phone == "+65.62336919" - %s[0].fax == nil - %s[0].email == "abuse@gsn.in" + %s[0].email == "https://whois.centralnic.com/contact/gsn.cn.com/registrant" #admin_contacts %s %CLASS{array} %s %SIZE{1} %s[0] %CLASS{contact} %s[0].type == Whois::Parser::Contact::TYPE_ADMINISTRATIVE - %s[0].id == "AUTO-DRZK-SNVHSY" - %s[0].name == "Pauline Ang" - %s[0].organization == "GSN Electronics Incorporation Pte Ltd" - %s[0].address == "Straits Trading Building 9 Battery Road 16-08" - %s[0].city == "Singapore" - %s[0].zip == "049910" - %s[0].state == nil - %s[0].country == nil - %s[0].country_code == "SG" - %s[0].phone == "+65.62336919" - %s[0].fax == nil - %s[0].email == "abuse@gsn.in" + %s[0].email == "https://whois.centralnic.com/contact/gsn.cn.com/admin" #technical_contacts %s %CLASS{array} %s %SIZE{1} %s[0] %CLASS{contact} %s[0].type == Whois::Parser::Contact::TYPE_TECHNICAL - %s[0].id == "C-UHM65D7-TJGULR" - %s[0].name == "Host Master" - %s[0].organization == "united-domains AG" - %s[0].address == "Gautinger Str. 10" - %s[0].city == "Starnberg" - %s[0].zip == "82319" - %s[0].state == "Bayern" - %s[0].country == nil - %s[0].country_code == "DE" - %s[0].phone == "+49.8151368670" - %s[0].fax == "+49.81513686777" - %s[0].email == "hostmaster@united-domains.de" + %s[0].email == "https://whois.centralnic.com/contact/gsn.cn.com/tech" #nameservers %s %CLASS{array} - %s %SIZE{2} + %s %SIZE{4} %s[0] %CLASS{nameserver} - %s[0].name == "ns1.meteos.it" + %s[0].name == "ns1045.ui-dns.biz" %s[1] %CLASS{nameserver} - %s[1].name == "ns2.meteos.it" + %s[1].name == "ns1045.ui-dns.de" + %s[2] %CLASS{nameserver} + %s[2].name == "ns1045.ui-dns.org" + %s[3] %CLASS{nameserver} + %s[3].name == "ns1045.ui-dns.com" diff --git a/spec/fixtures/responses/whois.centralnic.com/cn.com/status_registered.txt b/spec/fixtures/responses/whois.centralnic.com/cn.com/status_registered.txt index db3ae57d..2a2d1f85 100644 --- a/spec/fixtures/responses/whois.centralnic.com/cn.com/status_registered.txt +++ b/spec/fixtures/responses/whois.centralnic.com/cn.com/status_registered.txt @@ -1,70 +1,41 @@ -Domain ID:CNIC-DO323367 -Domain Name:GSN.CN.COM -Created On:2005-11-23T15:44:03.0Z -Last Updated On:2013-11-26T12:16:45.0Z -Expiration Date:2014-11-23T23:59:59.0Z -Status:clientTransferProhibited -Status:serverTransferProhibited -Registrant ID:H1062079 -Registrant Name:GSN Electronics Incorporation Pte Ltd -Registrant Street1:Straits Trading Building 9 Battery Road 16-08 -Registrant Street2:Singapore -Registrant Postal Code:049910 -Registrant Country:SG -Registrant Phone:+65.62336919 -Registrant Email:abuse@gsn.in -Admin ID:AUTO-DRZK-SNVHSY -Admin Name:Pauline Ang -Admin Organization:GSN Electronics Incorporation Pte Ltd -Admin Street1:Straits Trading Building 9 Battery Road 16-08 -Admin City:Singapore -Admin Postal Code:049910 -Admin Country:SG -Admin Phone:+65.62336919 -Admin Email:abuse@gsn.in -Tech ID:C-UHM65D7-TJGULR -Tech Name:Host Master -Tech Organization:united-domains AG -Tech Street1:Gautinger Str. 10 -Tech City:Starnberg -Tech State/Province:Bayern -Tech Postal Code:82319 -Tech Country:DE -Tech Phone:+49.8151368670 -Tech FAX:+49.81513686777 -Tech Email:hostmaster@united-domains.de -Billing ID:C-UHM65D7-TJGULR -Billing Name:Host Master -Billing Organization:united-domains AG -Billing Street1:Gautinger Str. 10 -Billing City:Starnberg -Billing State/Province:Bayern -Billing Postal Code:82319 -Billing Country:DE -Billing Phone:+49.8151368670 -Billing FAX:+49.81513686777 -Billing Email:hostmaster@united-domains.de -Sponsoring Registrar ID:H67436 -Sponsoring Registrar IANA ID:1408 -Sponsoring Registrar Organization:united-domains AG -Sponsoring Registrar Street1:Gautinger Str. 10 -Sponsoring Registrar City:Starnberg -Sponsoring Registrar Postal Code:82319 -Sponsoring Registrar Country:DE -Sponsoring Registrar Phone:+498151368670 -Sponsoring Registrar FAX:+4981513686777 -Sponsoring Registrar Website:http://www.united-domains.de -Name Server:NS1.METEOS.IT -Name Server:NS2.METEOS.IT -DNSSEC:Unsigned +Domain Name: GSN.CN.COM +Registry Domain ID: D323367-CNIC +Registrar WHOIS Server: whois.udag.net +Registrar URL: https://www.united-domains.de/ +Updated Date: 2021-11-11T02:14:17.0Z +Creation Date: 2005-11-23T15:44:03.0Z +Registry Expiry Date: 2022-11-23T23:59:59.0Z +Registrar: united-domains AG +Registrar IANA ID: 1408 +Domain Status: clientTransferProhibited https://icann.org/epp#clientTransferProhibited +Domain Status: autoRenewPeriod https://icann.org/epp#autoRenewPeriod +Registrant Email: https://whois.centralnic.com/contact/gsn.cn.com/registrant +Admin Email: https://whois.centralnic.com/contact/gsn.cn.com/admin +Tech Email: https://whois.centralnic.com/contact/gsn.cn.com/tech +Name Server: NS1045.UI-DNS.BIZ +Name Server: NS1045.UI-DNS.DE +Name Server: NS1045.UI-DNS.ORG +Name Server: NS1045.UI-DNS.COM +DNSSEC: unsigned +Registrar Abuse Contact Email: abuse@united-domains.de +Registrar Abuse Contact Phone: +49.8151368670 +URL of the ICANN Whois Inaccuracy Complaint Form: https://www.icann.org/wicf/ +>>> Last update of WHOIS database: 2021-12-15T16:26:25.0Z <<< -This whois service is provided by CentralNic Ltd and only contains -information pertaining to Internet domain names we have registered for -our customers. By using this service you are agreeing (1) not to use any -information presented here for any purpose other than determining -ownership of domain names, (2) not to store or reproduce this data in -any way, (3) not to use any high-volume, automated, electronic processes -to obtain data from this service. Abuse of this service is monitored and -actions in contravention of these terms will result in being permanently -blacklisted. All data is (c) CentralNic Ltd https://www.centralnic.com/ +For more information on Whois status codes, please visit https://icann.org/epp +>>> IMPORTANT INFORMATION ABOUT THE DEPLOYMENT OF RDAP: please visit +https://www.centralnic.com/support/rdap <<< + +The Whois and RDAP services are provided by CentralNic, and contain +information pertaining to Internet domain names registered by our +our customers. By using this service you are agreeing (1) not to use any +information presented here for any purpose other than determining +ownership of domain names, (2) not to store or reproduce this data in +any way, (3) not to use any high-volume, automated, electronic processes +to obtain data from this service. Abuse of this service is monitored and +actions in contravention of these terms will result in being permanently +blacklisted. All data is (c) CentralNic Ltd (https://www.centralnic.com) + +Access to the Whois and RDAP services is rate limited. For more +information, visit https://registrar-console.centralnic.com/pub/whois_guidance. diff --git a/spec/fixtures/responses/whois.centralnic.com/de.com/status_available.expected b/spec/fixtures/responses/whois.centralnic.com/de.com/status_available.expected index 2c3fe7a8..64c3bae5 100644 --- a/spec/fixtures/responses/whois.centralnic.com/de.com/status_available.expected +++ b/spec/fixtures/responses/whois.centralnic.com/de.com/status_available.expected @@ -1,5 +1,5 @@ #disclaimer - %s == nil + %s == "The Whois and RDAP services are provided by CentralNic, and contain information pertaining to Internet domain names registered by our our customers. By using this service you are agreeing (1) not to use any information presented here for any purpose other than determining ownership of domain names, (2) not to store or reproduce this data in any way, (3) not to use any high-volume, automated, electronic processes to obtain data from this service. Abuse of this service is monitored and actions in contravention of these terms will result in being permanently blacklisted. All data is (c) CentralNic Ltd (https://www.centralnic.com) Access to the Whois and RDAP services is rate limited. For more information, visit https://registrar-console.centralnic.com/pub/whois_guidance." #domain @@ -10,7 +10,7 @@ #status - %s == [] + %s == :available #available? %s == true diff --git a/spec/fixtures/responses/whois.centralnic.com/de.com/status_available.txt b/spec/fixtures/responses/whois.centralnic.com/de.com/status_available.txt index 09cc0f7e..dd74e799 100644 --- a/spec/fixtures/responses/whois.centralnic.com/de.com/status_available.txt +++ b/spec/fixtures/responses/whois.centralnic.com/de.com/status_available.txt @@ -1 +1,21 @@ -DOMAIN NOT FOUND +The queried object does not exist: DOMAIN NOT FOUND + +>>> Last update of WHOIS database: 2021-12-15T16:32:21.0Z <<< + +For more information on Whois status codes, please visit https://icann.org/epp + +>>> IMPORTANT INFORMATION ABOUT THE DEPLOYMENT OF RDAP: please visit +https://www.centralnic.com/support/rdap <<< + +The Whois and RDAP services are provided by CentralNic, and contain +information pertaining to Internet domain names registered by our +our customers. By using this service you are agreeing (1) not to use any +information presented here for any purpose other than determining +ownership of domain names, (2) not to store or reproduce this data in +any way, (3) not to use any high-volume, automated, electronic processes +to obtain data from this service. Abuse of this service is monitored and +actions in contravention of these terms will result in being permanently +blacklisted. All data is (c) CentralNic Ltd (https://www.centralnic.com) + +Access to the Whois and RDAP services is rate limited. For more +information, visit https://registrar-console.centralnic.com/pub/whois_guidance. diff --git a/spec/fixtures/responses/whois.centralnic.com/de.com/status_registered.expected b/spec/fixtures/responses/whois.centralnic.com/de.com/status_registered.expected index 59a6d131..cc063e7c 100644 --- a/spec/fixtures/responses/whois.centralnic.com/de.com/status_registered.expected +++ b/spec/fixtures/responses/whois.centralnic.com/de.com/status_registered.expected @@ -1,16 +1,16 @@ #disclaimer - %s == "This whois service is provided by CentralNic Ltd and only contains information pertaining to Internet domain names we have registered for our customers. By using this service you are agreeing (1) not to use any information presented here for any purpose other than determining ownership of domain names, (2) not to store or reproduce this data in any way, (3) not to use any high-volume, automated, electronic processes to obtain data from this service. Abuse of this service is monitored and actions in contravention of these terms will result in being permanently blacklisted. All data is (c) CentralNic Ltd https://www.centralnic.com/" + %s == "The Whois and RDAP services are provided by CentralNic, and contain information pertaining to Internet domain names registered by our our customers. By using this service you are agreeing (1) not to use any information presented here for any purpose other than determining ownership of domain names, (2) not to store or reproduce this data in any way, (3) not to use any high-volume, automated, electronic processes to obtain data from this service. Abuse of this service is monitored and actions in contravention of these terms will result in being permanently blacklisted. All data is (c) CentralNic Ltd (https://www.centralnic.com) Access to the Whois and RDAP services is rate limited. For more information, visit https://registrar-console.centralnic.com/pub/whois_guidance." #domain %s == "autopoint.de.com" #domain_id - %s == "CNIC-DO578833" + %s == "D578833-CNIC" #status - %s == ["clientTransferProhibited", "serverTransferProhibited"] + %s == :registered #available? %s == false @@ -25,82 +25,47 @@ #updated_on %s %CLASS{time} - %s %TIME{2013-07-12 10:03:56 UTC} + %s %TIME{2021-11-11 15:12:54 UTC} #expires_on %s %CLASS{time} - %s %TIME{2014-07-04 23:59:59 UTC} + %s %TIME{2022-07-04 23:59:59 UTC} #registrar %s %CLASS{registrar} - %s.id == "H67436" + %s.id == "1408" %s.name == "united-domains AG" - %s.url == "http://www.united-domains.de" + %s.url == "https://www.united-domains.de/" #registrant_contacts %s %CLASS{array} %s %SIZE{1} %s[0] %CLASS{contact} %s[0].type == Whois::Parser::Contact::TYPE_REGISTRANT - %s[0].id == "H1102323" - %s[0].name == "Stefan Von Gehlen" - %s[0].organization == nil - %s[0].address == "Muelgaustr. 292-294, Moenchengladbach" - %s[0].city == nil - %s[0].zip == "41238" - %s[0].state == nil - %s[0].country == nil - %s[0].country_code == "DE" - %s[0].phone == "+49.2166120626" - %s[0].fax == nil - %s[0].email == "s.vongehlen@arcor.de" + %s[0].email == "https://whois.centralnic.com/contact/autopoint.de.com/registrant" #admin_contacts %s %CLASS{array} %s %SIZE{1} %s[0] %CLASS{contact} %s[0].type == Whois::Parser::Contact::TYPE_ADMINISTRATIVE - %s[0].id == "H402505" - %s[0].name == "Stefan Von Gehlen" - %s[0].organization == nil - %s[0].address == "Muelgaustr. 292-294, Moenchengladbach" - %s[0].city == nil - %s[0].zip == "41238" - %s[0].state == nil - %s[0].country == nil - %s[0].country_code == "DE" - %s[0].phone == "+49.2166120626" - %s[0].fax == nil - %s[0].email == "s.vongehlen@arcor.de" + %s[0].email == "https://whois.centralnic.com/contact/autopoint.de.com/admin" #technical_contacts %s %CLASS{array} %s %SIZE{1} %s[0] %CLASS{contact} %s[0].type == Whois::Parser::Contact::TYPE_TECHNICAL - %s[0].id == "C-UHM65D7-TJGULR" - %s[0].name == "Host Master" - %s[0].organization == "united-domains AG" - %s[0].address == "Gautinger Str. 10" - %s[0].city == "Starnberg" - %s[0].zip == "82319" - %s[0].state == "Bayern" - %s[0].country == nil - %s[0].country_code == "DE" - %s[0].phone == "+49.8151368670" - %s[0].fax == "+49.81513686777" - %s[0].email == "hostmaster@united-domains.de" + %s[0].email == "https://whois.centralnic.com/contact/autopoint.de.com/tech" #nameservers %s %CLASS{array} - %s %SIZE{2} + %s %SIZE{3} %s[0] %CLASS{nameserver} - %s[0].name == "ns.udagdns.net" - %s[0].ipv4 == nil - %s[0].ipv6 == nil + %s[0].name == "ns.udag.org" %s[1] %CLASS{nameserver} - %s[1].name == "ns.udagdns.de" - %s[1].ipv4 == nil - %s[1].ipv6 == nil + %s[1].name == "ns.udag.de" + %s[2] %CLASS{nameserver} + %s[2].name == "ns.udag.net" diff --git a/spec/fixtures/responses/whois.centralnic.com/de.com/status_registered.txt b/spec/fixtures/responses/whois.centralnic.com/de.com/status_registered.txt index c85fb5aa..3f54f634 100644 --- a/spec/fixtures/responses/whois.centralnic.com/de.com/status_registered.txt +++ b/spec/fixtures/responses/whois.centralnic.com/de.com/status_registered.txt @@ -1,67 +1,39 @@ -Domain ID:CNIC-DO578833 -Domain Name:AUTOPOINT.DE.COM -Created On:2008-07-04T20:30:08.0Z -Last Updated On:2013-07-12T10:03:56.0Z -Expiration Date:2014-07-04T23:59:59.0Z -Status:clientTransferProhibited -Status:serverTransferProhibited -Registrant ID:H1102323 -Registrant Name:Stefan Von Gehlen -Registrant Street1:Muelgaustr. 292-294, Moenchengladbach -Registrant Postal Code:41238 -Registrant Country:DE -Registrant Phone:+49.2166120626 -Registrant Email:s.vongehlen@arcor.de -Admin ID:H402505 -Admin Name:Stefan Von Gehlen -Admin Street1:Muelgaustr. 292-294, Moenchengladbach -Admin Postal Code:41238 -Admin Country:DE -Admin Phone:+49.2166120626 -Admin Email:s.vongehlen@arcor.de -Tech ID:C-UHM65D7-TJGULR -Tech Name:Host Master -Tech Organization:united-domains AG -Tech Street1:Gautinger Str. 10 -Tech City:Starnberg -Tech State/Province:Bayern -Tech Postal Code:82319 -Tech Country:DE -Tech Phone:+49.8151368670 -Tech FAX:+49.81513686777 -Tech Email:hostmaster@united-domains.de -Billing ID:C-UHM65D7-TJGULR -Billing Name:Host Master -Billing Organization:united-domains AG -Billing Street1:Gautinger Str. 10 -Billing City:Starnberg -Billing State/Province:Bayern -Billing Postal Code:82319 -Billing Country:DE -Billing Phone:+49.8151368670 -Billing FAX:+49.81513686777 -Billing Email:hostmaster@united-domains.de -Sponsoring Registrar ID:H67436 -Sponsoring Registrar IANA ID:1408 -Sponsoring Registrar Organization:united-domains AG -Sponsoring Registrar Street1:Gautinger Str. 10 -Sponsoring Registrar City:Starnberg -Sponsoring Registrar Postal Code:82319 -Sponsoring Registrar Country:DE -Sponsoring Registrar Phone:+498151368670 -Sponsoring Registrar FAX:+4981513686777 -Sponsoring Registrar Website:http://www.united-domains.de -Name Server:NS.UDAGDNS.NET -Name Server:NS.UDAGDNS.DE -DNSSEC:Unsigned +Domain Name: AUTOPOINT.DE.COM +Registry Domain ID: D578833-CNIC +Registrar WHOIS Server: whois.udag.net +Registrar URL: https://www.united-domains.de/ +Updated Date: 2021-11-11T15:12:54.0Z +Creation Date: 2008-07-04T20:30:08.0Z +Registry Expiry Date: 2022-07-04T23:59:59.0Z +Registrar: united-domains AG +Registrar IANA ID: 1408 +Domain Status: clientTransferProhibited https://icann.org/epp#clientTransferProhibited +Registrant Email: https://whois.centralnic.com/contact/autopoint.de.com/registrant +Admin Email: https://whois.centralnic.com/contact/autopoint.de.com/admin +Tech Email: https://whois.centralnic.com/contact/autopoint.de.com/tech +Name Server: NS.UDAG.ORG +Name Server: NS.UDAG.DE +Name Server: NS.UDAG.NET +DNSSEC: unsigned +Registrar Abuse Contact Email: abuse@united-domains.de +Registrar Abuse Contact Phone: +49.8151368670 +URL of the ICANN Whois Inaccuracy Complaint Form: https://www.icann.org/wicf/ +>>> Last update of WHOIS database: 2021-12-15T16:32:19.0Z <<< -This whois service is provided by CentralNic Ltd and only contains -information pertaining to Internet domain names we have registered for -our customers. By using this service you are agreeing (1) not to use any -information presented here for any purpose other than determining -ownership of domain names, (2) not to store or reproduce this data in -any way, (3) not to use any high-volume, automated, electronic processes -to obtain data from this service. Abuse of this service is monitored and -actions in contravention of these terms will result in being permanently -blacklisted. All data is (c) CentralNic Ltd https://www.centralnic.com/ +For more information on Whois status codes, please visit https://icann.org/epp +>>> IMPORTANT INFORMATION ABOUT THE DEPLOYMENT OF RDAP: please visit +https://www.centralnic.com/support/rdap <<< + +The Whois and RDAP services are provided by CentralNic, and contain +information pertaining to Internet domain names registered by our +our customers. By using this service you are agreeing (1) not to use any +information presented here for any purpose other than determining +ownership of domain names, (2) not to store or reproduce this data in +any way, (3) not to use any high-volume, automated, electronic processes +to obtain data from this service. Abuse of this service is monitored and +actions in contravention of these terms will result in being permanently +blacklisted. All data is (c) CentralNic Ltd (https://www.centralnic.com) + +Access to the Whois and RDAP services is rate limited. For more +information, visit https://registrar-console.centralnic.com/pub/whois_guidance. diff --git a/spec/fixtures/responses/whois.centralnic.com/eu.com/status_available.expected b/spec/fixtures/responses/whois.centralnic.com/eu.com/status_available.expected index 2c3fe7a8..64c3bae5 100644 --- a/spec/fixtures/responses/whois.centralnic.com/eu.com/status_available.expected +++ b/spec/fixtures/responses/whois.centralnic.com/eu.com/status_available.expected @@ -1,5 +1,5 @@ #disclaimer - %s == nil + %s == "The Whois and RDAP services are provided by CentralNic, and contain information pertaining to Internet domain names registered by our our customers. By using this service you are agreeing (1) not to use any information presented here for any purpose other than determining ownership of domain names, (2) not to store or reproduce this data in any way, (3) not to use any high-volume, automated, electronic processes to obtain data from this service. Abuse of this service is monitored and actions in contravention of these terms will result in being permanently blacklisted. All data is (c) CentralNic Ltd (https://www.centralnic.com) Access to the Whois and RDAP services is rate limited. For more information, visit https://registrar-console.centralnic.com/pub/whois_guidance." #domain @@ -10,7 +10,7 @@ #status - %s == [] + %s == :available #available? %s == true diff --git a/spec/fixtures/responses/whois.centralnic.com/eu.com/status_available.txt b/spec/fixtures/responses/whois.centralnic.com/eu.com/status_available.txt index 09cc0f7e..80c8c433 100644 --- a/spec/fixtures/responses/whois.centralnic.com/eu.com/status_available.txt +++ b/spec/fixtures/responses/whois.centralnic.com/eu.com/status_available.txt @@ -1 +1,21 @@ -DOMAIN NOT FOUND +The queried object does not exist: DOMAIN NOT FOUND + +>>> Last update of WHOIS database: 2021-12-15T16:35:09.0Z <<< + +For more information on Whois status codes, please visit https://icann.org/epp + +>>> IMPORTANT INFORMATION ABOUT THE DEPLOYMENT OF RDAP: please visit +https://www.centralnic.com/support/rdap <<< + +The Whois and RDAP services are provided by CentralNic, and contain +information pertaining to Internet domain names registered by our +our customers. By using this service you are agreeing (1) not to use any +information presented here for any purpose other than determining +ownership of domain names, (2) not to store or reproduce this data in +any way, (3) not to use any high-volume, automated, electronic processes +to obtain data from this service. Abuse of this service is monitored and +actions in contravention of these terms will result in being permanently +blacklisted. All data is (c) CentralNic Ltd (https://www.centralnic.com) + +Access to the Whois and RDAP services is rate limited. For more +information, visit https://registrar-console.centralnic.com/pub/whois_guidance. diff --git a/spec/fixtures/responses/whois.centralnic.com/eu.com/status_registered.expected b/spec/fixtures/responses/whois.centralnic.com/eu.com/status_registered.expected index a62ca329..d9979bf2 100644 --- a/spec/fixtures/responses/whois.centralnic.com/eu.com/status_registered.expected +++ b/spec/fixtures/responses/whois.centralnic.com/eu.com/status_registered.expected @@ -1,16 +1,15 @@ #disclaimer - %s == "This whois service is provided by CentralNic Ltd and only contains information pertaining to Internet domain names we have registered for our customers. By using this service you are agreeing (1) not to use any information presented here for any purpose other than determining ownership of domain names, (2) not to store or reproduce this data in any way, (3) not to use any high-volume, automated, electronic processes to obtain data from this service. Abuse of this service is monitored and actions in contravention of these terms will result in being permanently blacklisted. All data is (c) CentralNic Ltd https://www.centralnic.com/" - + %s == "The Whois and RDAP services are provided by CentralNic, and contain information pertaining to Internet domain names registered by our our customers. By using this service you are agreeing (1) not to use any information presented here for any purpose other than determining ownership of domain names, (2) not to store or reproduce this data in any way, (3) not to use any high-volume, automated, electronic processes to obtain data from this service. Abuse of this service is monitored and actions in contravention of these terms will result in being permanently blacklisted. All data is (c) CentralNic Ltd (https://www.centralnic.com) Access to the Whois and RDAP services is rate limited. For more information, visit https://registrar-console.centralnic.com/pub/whois_guidance." #domain %s == "walkabout.eu.com" #domain_id - %s == "CNIC-DO85080" + %s == "D93652968-CNIC" #status - %s == ["ok"] + %s == :registered #available? %s == false @@ -21,92 +20,59 @@ #created_on %s %CLASS{time} - %s %TIME{2001-08-14 10:14:41 UTC} + %s %TIME{2019-02-14 09:07:09 UTC} #updated_on %s %CLASS{time} - %s %TIME{2013-08-15 11:25:43 UTC} + %s %TIME{2021-08-11 10:15:35 UTC} #expires_on %s %CLASS{time} - %s %TIME{2015-08-14 23:59:59 UTC} + %s %TIME{2022-02-14 23:59:59 UTC} #registrar %s %CLASS{registrar} - %s.id == "H126914" - %s.name == "iTransact Ltd" - %s.url == "www.itransact.ltd.uk" + %s.id == "470" + %s.name == "Nom-iq Ltd. dba Com Laude" + %s.url == "http://www.comlaude.com" #registrant_contacts %s %CLASS{array} %s %SIZE{1} %s[0] %CLASS{contact} %s[0].type == Whois::Parser::Contact::TYPE_REGISTRANT - %s[0].id == "H1045382" - %s[0].name == "Regent Inns Plc" - %s[0].organization == nil - %s[0].address == "77 Muswell Hill\nLondon" - %s[0].city == nil - %s[0].zip == "N10 3PJ" - %s[0].state == nil - %s[0].country == nil - %s[0].country_code == "GB" - %s[0].phone == "+44.2083753155" - %s[0].fax == "+44.2083753001" - %s[0].email == "john.boyle@regent-inns.plc.uk" + %s[0].email == "https://whois.centralnic.com/contact/walkabout.eu.com/registrant" #admin_contacts %s %CLASS{array} %s %SIZE{1} %s[0] %CLASS{contact} %s[0].type == Whois::Parser::Contact::TYPE_ADMINISTRATIVE - %s[0].id == "H64717" - %s[0].name == "John Boyle" - %s[0].organization == "Regent Inns Plc" - %s[0].address == "77 Muswell Hill\nLondon" - %s[0].city == nil - %s[0].zip == "N10 3PJ" - %s[0].state == nil - %s[0].country == nil - %s[0].country_code == "GB" - %s[0].phone == "+44.2083753155" - %s[0].fax == "+44.2083753001" - %s[0].email == "john.boyle@regent-inns.plc.uk" + %s[0].email == "https://whois.centralnic.com/contact/walkabout.eu.com/admin" #technical_contacts %s %CLASS{array} %s %SIZE{1} %s[0] %CLASS{contact} %s[0].type == Whois::Parser::Contact::TYPE_TECHNICAL - %s[0].id == "H126914" - %s[0].name == "Constantine Pagonis" - %s[0].organization == "iTransact Ltd" - %s[0].address == "PO Box 430\nCambridge\nCambs" - %s[0].city == nil - %s[0].zip == "CB1 2WE" - %s[0].state == nil - %s[0].country == nil - %s[0].country_code == "GB" - %s[0].phone == "+44.1223700322" - %s[0].fax == nil - %s[0].email == "constantine@itransact.ltd.uk" + %s[0].email == "https://whois.centralnic.com/contact/walkabout.eu.com/tech" #nameservers %s %CLASS{array} - %s %SIZE{4} + %s %SIZE{7} %s[0] %CLASS{nameserver} - %s[0].name == "ns-1146.awsdns-15.org" - %s[0].ipv4 == nil - %s[0].ipv6 == nil + %s[0].name == "ns0.demysdns.net" %s[1] %CLASS{nameserver} - %s[1].name == "ns-1741.awsdns-25.co.uk" - %s[1].ipv4 == nil - %s[1].ipv6 == nil - %s[2].name == "ns-374.awsdns-46.com" - %s[2].ipv4 == nil - %s[2].ipv6 == nil - %s[3].name == "ns-914.awsdns-50.net" - %s[3].ipv4 == nil - %s[3].ipv6 == nil + %s[1].name == "ns1.demysdns.net" + %s[2] %CLASS{nameserver} + %s[2].name == "ns2.demysdns.net" + %s[3] %CLASS{nameserver} + %s[3].name == "ns3.demysdns.net" + %s[4] %CLASS{nameserver} + %s[4].name == "ns4.demysdns.co.uk" + %s[5] %CLASS{nameserver} + %s[5].name == "ns5.demysdns.co.uk" + %s[6] %CLASS{nameserver} + %s[6].name == "ns6.demysdns.co.uk" diff --git a/spec/fixtures/responses/whois.centralnic.com/eu.com/status_registered.txt b/spec/fixtures/responses/whois.centralnic.com/eu.com/status_registered.txt index 17d0d3ed..ed182137 100644 --- a/spec/fixtures/responses/whois.centralnic.com/eu.com/status_registered.txt +++ b/spec/fixtures/responses/whois.centralnic.com/eu.com/status_registered.txt @@ -1,60 +1,46 @@ -Domain ID:CNIC-DO85080 -Domain Name:WALKABOUT.EU.COM -Created On:2001-08-14T10:14:41.0Z -Last Updated On:2013-08-15T11:25:43.0Z -Expiration Date:2015-08-14T23:59:59.0Z -Status:ok -Registrant ID:H1045382 -Registrant Name:Regent Inns Plc -Registrant Street1:77 Muswell Hill -Registrant Street2:London -Registrant Postal Code:N10 3PJ -Registrant Country:GB -Registrant Phone:+44.2083753155 -Registrant FAX:+44.2083753001 -Registrant Email:john.boyle@regent-inns.plc.uk -Admin ID:H64717 -Admin Name:John Boyle -Admin Organization:Regent Inns Plc -Admin Street1:77 Muswell Hill -Admin Street2:London -Admin Postal Code:N10 3PJ -Admin Country:GB -Admin Phone:+44.2083753155 -Admin FAX:+44.2083753001 -Admin Email:john.boyle@regent-inns.plc.uk -Tech ID:H126914 -Tech Name:Constantine Pagonis -Tech Organization:iTransact Ltd -Tech Street1:PO Box 430 -Tech Street2:Cambridge -Tech Street3:Cambs -Tech Postal Code:CB1 2WE -Tech Country:GB -Tech Phone:+44.1223700322 -Tech Email:constantine@itransact.ltd.uk -Sponsoring Registrar ID:H126914 -Sponsoring Registrar Organization:iTransact Ltd -Sponsoring Registrar Street1:PO Box 430 -Sponsoring Registrar Street2:Cambridge -Sponsoring Registrar Street3:Cambs -Sponsoring Registrar Postal Code:CB1 2WE -Sponsoring Registrar Country:GB -Sponsoring Registrar Phone:01223 700322 -Sponsoring Registrar Website:www.itransact.ltd.uk -Name Server:NS-1146.AWSDNS-15.ORG -Name Server:NS-1741.AWSDNS-25.CO.UK -Name Server:NS-374.AWSDNS-46.COM -Name Server:NS-914.AWSDNS-50.NET -DNSSEC:Unsigned +Domain Name: WALKABOUT.EU.COM +Registry Domain ID: D93652968-CNIC +Registrar WHOIS Server: whois.comlaude.com +Registrar URL: http://www.comlaude.com +Updated Date: 2021-08-11T10:15:35.0Z +Creation Date: 2019-02-14T09:07:09.0Z +Registry Expiry Date: 2022-02-14T23:59:59.0Z +Registrar: Nom-iq Ltd. dba Com Laude +Registrar IANA ID: 470 +Domain Status: clientTransferProhibited https://icann.org/epp#clientTransferProhibited +Domain Status: clientUpdateProhibited https://icann.org/epp#clientUpdateProhibited +Domain Status: clientDeleteProhibited https://icann.org/epp#clientDeleteProhibited +Registrant Email: https://whois.centralnic.com/contact/walkabout.eu.com/registrant +Admin Email: https://whois.centralnic.com/contact/walkabout.eu.com/admin +Tech Email: https://whois.centralnic.com/contact/walkabout.eu.com/tech +Name Server: NS0.DEMYSDNS.NET +Name Server: NS1.DEMYSDNS.NET +Name Server: NS2.DEMYSDNS.NET +Name Server: NS3.DEMYSDNS.NET +Name Server: NS4.DEMYSDNS.CO.UK +Name Server: NS5.DEMYSDNS.CO.UK +Name Server: NS6.DEMYSDNS.CO.UK +DNSSEC: unsigned +Billing Email: https://whois.centralnic.com/contact/walkabout.eu.com/billing +Registrar Abuse Contact Email: abuse@comlaude.com +Registrar Abuse Contact Phone: +44.2074218250 +URL of the ICANN Whois Inaccuracy Complaint Form: https://www.icann.org/wicf/ +>>> Last update of WHOIS database: 2021-12-15T16:35:00.0Z <<< -This whois service is provided by CentralNic Ltd and only contains -information pertaining to Internet domain names we have registered for -our customers. By using this service you are agreeing (1) not to use any -information presented here for any purpose other than determining -ownership of domain names, (2) not to store or reproduce this data in -any way, (3) not to use any high-volume, automated, electronic processes -to obtain data from this service. Abuse of this service is monitored and -actions in contravention of these terms will result in being permanently -blacklisted. All data is (c) CentralNic Ltd https://www.centralnic.com/ +For more information on Whois status codes, please visit https://icann.org/epp +>>> IMPORTANT INFORMATION ABOUT THE DEPLOYMENT OF RDAP: please visit +https://www.centralnic.com/support/rdap <<< + +The Whois and RDAP services are provided by CentralNic, and contain +information pertaining to Internet domain names registered by our +our customers. By using this service you are agreeing (1) not to use any +information presented here for any purpose other than determining +ownership of domain names, (2) not to store or reproduce this data in +any way, (3) not to use any high-volume, automated, electronic processes +to obtain data from this service. Abuse of this service is monitored and +actions in contravention of these terms will result in being permanently +blacklisted. All data is (c) CentralNic Ltd (https://www.centralnic.com) + +Access to the Whois and RDAP services is rate limited. For more +information, visit https://registrar-console.centralnic.com/pub/whois_guidance. diff --git a/spec/fixtures/responses/whois.centralnic.com/gb.com/status_available.expected b/spec/fixtures/responses/whois.centralnic.com/gb.com/status_available.expected deleted file mode 100644 index 2c3fe7a8..00000000 --- a/spec/fixtures/responses/whois.centralnic.com/gb.com/status_available.expected +++ /dev/null @@ -1,50 +0,0 @@ -#disclaimer - %s == nil - - -#domain - %s == nil - -#domain_id - %s == nil - - -#status - %s == [] - -#available? - %s == true - -#registered? - %s == false - - -#created_on - %s == nil - -#updated_on - %s == nil - -#expires_on - %s == nil - - -#registrar - %s == nil - -#registrant_contacts - %s %CLASS{array} - %s == [] - -#admin_contacts - %s %CLASS{array} - %s == [] - -#technical_contacts - %s %CLASS{array} - %s == [] - - -#nameservers - %s %CLASS{array} - %s == [] diff --git a/spec/fixtures/responses/whois.centralnic.com/gb.com/status_available.txt b/spec/fixtures/responses/whois.centralnic.com/gb.com/status_available.txt deleted file mode 100644 index 09cc0f7e..00000000 --- a/spec/fixtures/responses/whois.centralnic.com/gb.com/status_available.txt +++ /dev/null @@ -1 +0,0 @@ -DOMAIN NOT FOUND diff --git a/spec/fixtures/responses/whois.centralnic.com/gb.com/status_registered.expected b/spec/fixtures/responses/whois.centralnic.com/gb.com/status_registered.expected deleted file mode 100644 index ba5cf5c4..00000000 --- a/spec/fixtures/responses/whois.centralnic.com/gb.com/status_registered.expected +++ /dev/null @@ -1,110 +0,0 @@ -#disclaimer - %s == "This whois service is provided by CentralNic Ltd and only contains information pertaining to Internet domain names we have registered for our customers. By using this service you are agreeing (1) not to use any information presented here for any purpose other than determining ownership of domain names, (2) not to store or reproduce this data in any way, (3) not to use any high-volume, automated, electronic processes to obtain data from this service. Abuse of this service is monitored and actions in contravention of these terms will result in being permanently blacklisted. All data is (c) CentralNic Ltd https://www.centralnic.com/" - - -#domain - %s == "hotel.gb.com" - -#domain_id - %s == "CNIC-DO403461" - - -#status - %s == ["serverTransferProhibited"] - -#available? - %s == false - -#registered? - %s == true - - -#created_on - %s %CLASS{time} - %s %TIME{2006-04-23 06:26:11 UTC} - -#updated_on - %s %CLASS{time} - %s %TIME{2014-02-12 09:45:17 UTC} - -#expires_on - %s %CLASS{time} - %s %TIME{2016-04-23 23:59:59 UTC} - - -#registrar - %s %CLASS{registrar} - %s.id == "H386560" - %s.name == "Wind Internethaus GMBH" - %s.url == "www.windinternethaus.de" - -#registrant_contacts - %s %CLASS{array} - %s %SIZE{1} - %s[0] %CLASS{contact} - %s[0].type == Whois::Parser::Contact::TYPE_REGISTRANT - %s[0].id == "H1049605" - %s[0].name == "Robert Ragge, Hotel Reservation Service Robert Ragge GmbH" - %s[0].organization == nil - %s[0].address == "Blaubach 32" - %s[0].city == "Koeln" - %s[0].zip == "50676" - %s[0].state == "NRW" - %s[0].country == nil - %s[0].country_code == "DE" - %s[0].phone == "+49.2212077222" - %s[0].fax == "+49.2212077394" - %s[0].email == "domains@hrs.de" - -#admin_contacts - %s %CLASS{array} - %s %SIZE{1} - %s[0] %CLASS{contact} - %s[0].type == Whois::Parser::Contact::TYPE_ADMINISTRATIVE - %s[0].id == "H393781" - %s[0].name == "Robert Ragge" - %s[0].organization == "Hotel Reservation Service Robert Ragge GmbH" - %s[0].address == "Blaubach 32" - %s[0].city == "Koeln" - %s[0].zip == "50676" - %s[0].state == "NRW" - %s[0].country == nil - %s[0].country_code == "DE" - %s[0].phone == "+49.2212077222" - %s[0].fax == "+49.2212077394" - %s[0].email == "domains@hrs.de" - -#technical_contacts - %s %CLASS{array} - %s %SIZE{1} - %s[0] %CLASS{contact} - %s[0].type == Whois::Parser::Contact::TYPE_TECHNICAL - %s[0].id == "H1103064" - %s[0].name == "Uwe Watzek, Wind Internethaus GMBH" - %s[0].organization == nil - %s[0].address == "Am Krebsgraben 15\nHaus 2" - %s[0].city == "Villingen-Schwenningen" - %s[0].zip == "78048" - %s[0].state == "Baden-Wuerttemberg" - %s[0].country == nil - %s[0].country_code == "DE" - %s[0].phone == "+49.77214070740" - %s[0].fax == "+49.77214070741" - %s[0].email == "info@windinternethaus.de" - - -#nameservers - %s %CLASS{array} - %s %SIZE{3} - %s[0] %CLASS{nameserver} - %s[0].name == "ns1.hrs.de" - %s[0].ipv4 == nil - %s[0].ipv6 == nil - %s[1] %CLASS{nameserver} - %s[1].name == "ns2.hrs.de" - %s[1].ipv4 == nil - %s[1].ipv6 == nil - %s[2] %CLASS{nameserver} - %s[2].name == "ns2.surfbrett.de" - %s[2].ipv4 == nil - %s[2].ipv6 == nil diff --git a/spec/fixtures/responses/whois.centralnic.com/gb.com/status_registered.txt b/spec/fixtures/responses/whois.centralnic.com/gb.com/status_registered.txt deleted file mode 100644 index 471a63ca..00000000 --- a/spec/fixtures/responses/whois.centralnic.com/gb.com/status_registered.txt +++ /dev/null @@ -1,75 +0,0 @@ -Domain ID:CNIC-DO403461 -Domain Name:HOTEL.GB.COM -Created On:2006-04-23T06:26:11.0Z -Last Updated On:2014-02-12T09:45:17.0Z -Expiration Date:2016-04-23T23:59:59.0Z -Status:serverTransferProhibited -Registrant ID:H1049605 -Registrant Name:Robert Ragge, Hotel Reservation Service Robert Ragge GmbH -Registrant Street1:Blaubach 32 -Registrant City:Koeln -Registrant State/Province:NRW -Registrant Postal Code:50676 -Registrant Country:DE -Registrant Phone:+49.2212077222 -Registrant FAX:+49.2212077394 -Registrant Email:domains@hrs.de -Admin ID:H393781 -Admin Name:Robert Ragge -Admin Organization:Hotel Reservation Service Robert Ragge GmbH -Admin Street1:Blaubach 32 -Admin City:Koeln -Admin State/Province:NRW -Admin Postal Code:50676 -Admin Country:DE -Admin Phone:+49.2212077222 -Admin FAX:+49.2212077394 -Admin Email:domains@hrs.de -Tech ID:H1103064 -Tech Name:Uwe Watzek, Wind Internethaus GMBH -Tech Street1:Am Krebsgraben 15 -Tech Street2:Haus 2 -Tech City:Villingen-Schwenningen -Tech State/Province:Baden-Wuerttemberg -Tech Postal Code:78048 -Tech Country:DE -Tech Phone:+49.77214070740 -Tech FAX:+49.77214070741 -Tech Email:info@windinternethaus.de -Billing ID:H1103064 -Billing Name:Uwe Watzek, Wind Internethaus GMBH -Billing Street1:Am Krebsgraben 15 -Billing Street2:Haus 2 -Billing City:Villingen-Schwenningen -Billing State/Province:Baden-Wuerttemberg -Billing Postal Code:78048 -Billing Country:DE -Billing Phone:+49.77214070740 -Billing FAX:+49.77214070741 -Billing Email:info@windinternethaus.de -Sponsoring Registrar ID:H386560 -Sponsoring Registrar Organization:Wind Internethaus GMBH -Sponsoring Registrar Street1:Am Krebsgraben 15 -Sponsoring Registrar Street2:Haus 2 -Sponsoring Registrar City:Villingen-Schwenningen -Sponsoring Registrar State/Province:Baden-Wuerttemberg -Sponsoring Registrar Postal Code:78048 -Sponsoring Registrar Country:DE -Sponsoring Registrar Phone:+49.77214070740 -Sponsoring Registrar FAX:+49.77214070741 -Sponsoring Registrar Website:www.windinternethaus.de -Name Server:NS1.HRS.DE -Name Server:NS2.HRS.DE -Name Server:NS2.SURFBRETT.DE -DNSSEC:Unsigned - -This whois service is provided by CentralNic Ltd and only contains -information pertaining to Internet domain names we have registered for -our customers. By using this service you are agreeing (1) not to use any -information presented here for any purpose other than determining -ownership of domain names, (2) not to store or reproduce this data in -any way, (3) not to use any high-volume, automated, electronic processes -to obtain data from this service. Abuse of this service is monitored and -actions in contravention of these terms will result in being permanently -blacklisted. All data is (c) CentralNic Ltd https://www.centralnic.com/ - diff --git a/spec/fixtures/responses/whois.centralnic.com/gb.net/status_available.expected b/spec/fixtures/responses/whois.centralnic.com/gb.net/status_available.expected deleted file mode 100644 index 2c3fe7a8..00000000 --- a/spec/fixtures/responses/whois.centralnic.com/gb.net/status_available.expected +++ /dev/null @@ -1,50 +0,0 @@ -#disclaimer - %s == nil - - -#domain - %s == nil - -#domain_id - %s == nil - - -#status - %s == [] - -#available? - %s == true - -#registered? - %s == false - - -#created_on - %s == nil - -#updated_on - %s == nil - -#expires_on - %s == nil - - -#registrar - %s == nil - -#registrant_contacts - %s %CLASS{array} - %s == [] - -#admin_contacts - %s %CLASS{array} - %s == [] - -#technical_contacts - %s %CLASS{array} - %s == [] - - -#nameservers - %s %CLASS{array} - %s == [] diff --git a/spec/fixtures/responses/whois.centralnic.com/gb.net/status_available.txt b/spec/fixtures/responses/whois.centralnic.com/gb.net/status_available.txt deleted file mode 100644 index 09cc0f7e..00000000 --- a/spec/fixtures/responses/whois.centralnic.com/gb.net/status_available.txt +++ /dev/null @@ -1 +0,0 @@ -DOMAIN NOT FOUND diff --git a/spec/fixtures/responses/whois.centralnic.com/gb.net/status_registered.expected b/spec/fixtures/responses/whois.centralnic.com/gb.net/status_registered.expected deleted file mode 100644 index f53e88cd..00000000 --- a/spec/fixtures/responses/whois.centralnic.com/gb.net/status_registered.expected +++ /dev/null @@ -1,116 +0,0 @@ -#disclaimer - %s == "This whois service is provided by CentralNic Ltd and only contains information pertaining to Internet domain names we have registered for our customers. By using this service you are agreeing (1) not to use any information presented here for any purpose other than determining ownership of domain names, (2) not to store or reproduce this data in any way, (3) not to use any high-volume, automated, electronic processes to obtain data from this service. Abuse of this service is monitored and actions in contravention of these terms will result in being permanently blacklisted. All data is (c) CentralNic Ltd https://www.centralnic.com/" - - -#domain - %s == "hotel.gb.net" - -#domain_id - %s == "CNIC-DO1423750" - - -#status - %s == ["clientTransferProhibited", "serverTransferProhibited"] - -#available? - %s == false - -#registered? - %s == true - - -#created_on - %s %CLASS{time} - %s %TIME{2013-08-25 12:36:24 UTC} - -#updated_on - %s %CLASS{time} - %s %TIME{2013-08-30 12:42:09 UTC} - -#expires_on - %s %CLASS{time} - %s %TIME{2014-08-25 23:59:59 UTC} - - -#registrar - %s %CLASS{registrar} - %s.id == "H1167922" - %s.name == "Gandi SAS" - %s.url == "http://www.gandi.net/" - -#registrant_contacts - %s %CLASS{array} - %s %SIZE{1} - %s[0] %CLASS{contact} - %s[0].type == Whois::Parser::Contact::TYPE_REGISTRANT - %s[0].id == "R1149-GANDI-PRYP" - %s[0].name == "Heinz Pierre Roeser" - %s[0].organization == "Roevertrieb" - %s[0].address == "Friedensstr. 77" - %s[0].city == "Grevenbroich" - %s[0].zip == "41517" - %s[0].state == nil - %s[0].country == nil - %s[0].country_code == "DE" - %s[0].phone == "+49.218145077" - %s[0].fax == nil - %s[0].email == "roevertrieb@aol.com" - %s[0].created_on == nil - %s[0].updated_on == nil - -#admin_contacts - %s %CLASS{array} - %s %SIZE{1} - %s[0] %CLASS{contact} - %s[0].type == Whois::Parser::Contact::TYPE_ADMINISTRATIVE - %s[0].id == "R1149-GANDI-PRYP" - %s[0].name == "Heinz Pierre Roeser" - %s[0].organization == "Roevertrieb" - %s[0].address == "Friedensstr. 77" - %s[0].city == "Grevenbroich" - %s[0].zip == "41517" - %s[0].state == nil - %s[0].country == nil - %s[0].country_code == "DE" - %s[0].phone == "+49.218145077" - %s[0].fax == nil - %s[0].email == "roevertrieb@aol.com" - %s[0].created_on == nil - %s[0].updated_on == nil - -#technical_contacts - %s %CLASS{array} - %s %SIZE{1} - %s[0] %CLASS{contact} - %s[0].type == Whois::Parser::Contact::TYPE_TECHNICAL - %s[0].id == "R1149-GANDI-PRYP" - %s[0].name == "Heinz Pierre Roeser" - %s[0].organization == "Roevertrieb" - %s[0].address == "Friedensstr. 77" - %s[0].city == "Grevenbroich" - %s[0].zip == "41517" - %s[0].state == nil - %s[0].country == nil - %s[0].country_code == "DE" - %s[0].phone == "+49.218145077" - %s[0].fax == nil - %s[0].email == "roevertrieb@aol.com" - %s[0].created_on == nil - %s[0].updated_on == nil - - -#nameservers - %s %CLASS{array} - %s %SIZE{3} - %s[0] %CLASS{nameserver} - %s[0].name == "b.dns.gandi.net" - %s[0].ipv4 == nil - %s[0].ipv6 == nil - %s[1] %CLASS{nameserver} - %s[1].name == "c.dns.gandi.net" - %s[1].ipv4 == nil - %s[1].ipv6 == nil - %s[2] %CLASS{nameserver} - %s[2].name == "a.dns.gandi.net" - %s[2].ipv4 == nil - %s[2].ipv6 == nil diff --git a/spec/fixtures/responses/whois.centralnic.com/gb.net/status_registered.txt b/spec/fixtures/responses/whois.centralnic.com/gb.net/status_registered.txt deleted file mode 100644 index 24dadee7..00000000 --- a/spec/fixtures/responses/whois.centralnic.com/gb.net/status_registered.txt +++ /dev/null @@ -1,68 +0,0 @@ -Domain ID:CNIC-DO1423750 -Domain Name:HOTEL.GB.NET -Created On:2013-08-25T12:36:24.0Z -Last Updated On:2013-08-30T12:42:09.0Z -Expiration Date:2014-08-25T23:59:59.0Z -Status:clientTransferProhibited -Status:serverTransferProhibited -Registrant ID:R1149-GANDI-PRYP -Registrant Name:Heinz Pierre Roeser -Registrant Organization:Roevertrieb -Registrant Street1:Friedensstr. 77 -Registrant City:Grevenbroich -Registrant Postal Code:41517 -Registrant Country:DE -Registrant Phone:+49.218145077 -Registrant Email:roevertrieb@aol.com -Admin ID:R1149-GANDI-PRYP -Admin Name:Heinz Pierre Roeser -Admin Organization:Roevertrieb -Admin Street1:Friedensstr. 77 -Admin City:Grevenbroich -Admin Postal Code:41517 -Admin Country:DE -Admin Phone:+49.218145077 -Admin Email:roevertrieb@aol.com -Tech ID:R1149-GANDI-PRYP -Tech Name:Heinz Pierre Roeser -Tech Organization:Roevertrieb -Tech Street1:Friedensstr. 77 -Tech City:Grevenbroich -Tech Postal Code:41517 -Tech Country:DE -Tech Phone:+49.218145077 -Tech Email:roevertrieb@aol.com -Billing ID:R1149-GANDI-PRYP -Billing Name:Heinz Pierre Roeser -Billing Organization:Roevertrieb -Billing Street1:Friedensstr. 77 -Billing City:Grevenbroich -Billing Postal Code:41517 -Billing Country:DE -Billing Phone:+49.218145077 -Billing Email:roevertrieb@aol.com -Sponsoring Registrar ID:H1167922 -Sponsoring Registrar IANA ID:81 -Sponsoring Registrar Organization:Gandi SAS -Sponsoring Registrar Street1:63-65 bd. Massena -Sponsoring Registrar City:Paris -Sponsoring Registrar Postal Code:75013 -Sponsoring Registrar Country:FR -Sponsoring Registrar Phone:+33 1 7039 3740 -Sponsoring Registrar FAX:+33 1 4373 1851 -Sponsoring Registrar Website:http://www.gandi.net/ -Name Server:B.DNS.GANDI.NET -Name Server:C.DNS.GANDI.NET -Name Server:A.DNS.GANDI.NET -DNSSEC:Unsigned - -This whois service is provided by CentralNic Ltd and only contains -information pertaining to Internet domain names we have registered for -our customers. By using this service you are agreeing (1) not to use any -information presented here for any purpose other than determining -ownership of domain names, (2) not to store or reproduce this data in -any way, (3) not to use any high-volume, automated, electronic processes -to obtain data from this service. Abuse of this service is monitored and -actions in contravention of these terms will result in being permanently -blacklisted. All data is (c) CentralNic Ltd https://www.centralnic.com/ - diff --git a/spec/fixtures/responses/whois.centralnic.com/gr.com/status_available.expected b/spec/fixtures/responses/whois.centralnic.com/gr.com/status_available.expected index 2c3fe7a8..64c3bae5 100644 --- a/spec/fixtures/responses/whois.centralnic.com/gr.com/status_available.expected +++ b/spec/fixtures/responses/whois.centralnic.com/gr.com/status_available.expected @@ -1,5 +1,5 @@ #disclaimer - %s == nil + %s == "The Whois and RDAP services are provided by CentralNic, and contain information pertaining to Internet domain names registered by our our customers. By using this service you are agreeing (1) not to use any information presented here for any purpose other than determining ownership of domain names, (2) not to store or reproduce this data in any way, (3) not to use any high-volume, automated, electronic processes to obtain data from this service. Abuse of this service is monitored and actions in contravention of these terms will result in being permanently blacklisted. All data is (c) CentralNic Ltd (https://www.centralnic.com) Access to the Whois and RDAP services is rate limited. For more information, visit https://registrar-console.centralnic.com/pub/whois_guidance." #domain @@ -10,7 +10,7 @@ #status - %s == [] + %s == :available #available? %s == true diff --git a/spec/fixtures/responses/whois.centralnic.com/gr.com/status_available.txt b/spec/fixtures/responses/whois.centralnic.com/gr.com/status_available.txt index 09cc0f7e..84bab4e3 100644 --- a/spec/fixtures/responses/whois.centralnic.com/gr.com/status_available.txt +++ b/spec/fixtures/responses/whois.centralnic.com/gr.com/status_available.txt @@ -1 +1,21 @@ -DOMAIN NOT FOUND +The queried object does not exist: DOMAIN NOT FOUND + +>>> Last update of WHOIS database: 2021-12-15T16:42:52.0Z <<< + +For more information on Whois status codes, please visit https://icann.org/epp + +>>> IMPORTANT INFORMATION ABOUT THE DEPLOYMENT OF RDAP: please visit +https://www.centralnic.com/support/rdap <<< + +The Whois and RDAP services are provided by CentralNic, and contain +information pertaining to Internet domain names registered by our +our customers. By using this service you are agreeing (1) not to use any +information presented here for any purpose other than determining +ownership of domain names, (2) not to store or reproduce this data in +any way, (3) not to use any high-volume, automated, electronic processes +to obtain data from this service. Abuse of this service is monitored and +actions in contravention of these terms will result in being permanently +blacklisted. All data is (c) CentralNic Ltd (https://www.centralnic.com) + +Access to the Whois and RDAP services is rate limited. For more +information, visit https://registrar-console.centralnic.com/pub/whois_guidance. diff --git a/spec/fixtures/responses/whois.centralnic.com/gr.com/status_registered.expected b/spec/fixtures/responses/whois.centralnic.com/gr.com/status_registered.expected index 661ce11f..0f32f3fb 100644 --- a/spec/fixtures/responses/whois.centralnic.com/gr.com/status_registered.expected +++ b/spec/fixtures/responses/whois.centralnic.com/gr.com/status_registered.expected @@ -1,16 +1,16 @@ #disclaimer - %s == "This whois service is provided by CentralNic Ltd and only contains information pertaining to Internet domain names we have registered for our customers. By using this service you are agreeing (1) not to use any information presented here for any purpose other than determining ownership of domain names, (2) not to store or reproduce this data in any way, (3) not to use any high-volume, automated, electronic processes to obtain data from this service. Abuse of this service is monitored and actions in contravention of these terms will result in being permanently blacklisted. All data is (c) CentralNic Ltd https://www.centralnic.com/" + %s == "The Whois and RDAP services are provided by CentralNic, and contain information pertaining to Internet domain names registered by our our customers. By using this service you are agreeing (1) not to use any information presented here for any purpose other than determining ownership of domain names, (2) not to store or reproduce this data in any way, (3) not to use any high-volume, automated, electronic processes to obtain data from this service. Abuse of this service is monitored and actions in contravention of these terms will result in being permanently blacklisted. All data is (c) CentralNic Ltd (https://www.centralnic.com) Access to the Whois and RDAP services is rate limited. For more information, visit https://registrar-console.centralnic.com/pub/whois_guidance." #domain %s == "google.gr.com" #domain_id - %s == "CNIC-DO735168" + %s == "D67028804-CNIC" #status - %s == ["ok"] + %s == :registered #available? %s == false @@ -21,65 +21,49 @@ #created_on %s %CLASS{time} - %s %TIME{2011-02-07 13:10:14 UTC} + %s %TIME{2018-05-07 07:21:24 UTC} #updated_on %s %CLASS{time} - %s %TIME{2012-06-23 10:38:02 UTC} + %s %TIME{2021-06-05 01:20:51 UTC} #expires_on %s %CLASS{time} - %s %TIME{2015-02-07 23:59:59 UTC} + %s %TIME{2022-05-07 23:59:59 UTC} #registrar - %s == nil + %s %CLASS{registrar} + %s.id == "1861" + %s.name == "Porkbun, LLC" + %s.url == "https://porkbun.com/" #registrant_contacts %s %CLASS{array} %s %SIZE{1} %s[0] %CLASS{contact} %s[0].type == Whois::Parser::Contact::TYPE_REGISTRANT - %s[0].id == "H1346485" - %s[0].name == nil - %s[0].organization == nil - %s[0].address == nil - %s[0].city == nil - %s[0].zip == nil - %s[0].state == nil - %s[0].country == nil - %s[0].country_code == nil - %s[0].phone == nil - %s[0].fax == nil - %s[0].email == nil + %s[0].email == "https://whois.centralnic.com/contact/google.gr.com/registrant" #admin_contacts %s %CLASS{array} - %s %SIZE{0} + %s %SIZE{1} + %s[0] %CLASS{contact} + %s[0].type == Whois::Parser::Contact::TYPE_ADMINISTRATIVE + %s[0].email == "https://whois.centralnic.com/contact/google.gr.com/admin" #technical_contacts %s %CLASS{array} %s %SIZE{1} %s[0] %CLASS{contact} %s[0].type == Whois::Parser::Contact::TYPE_TECHNICAL - %s[0].id == "H1346485" - %s[0].name == nil - %s[0].organization == nil - %s[0].address == nil - %s[0].city == nil - %s[0].zip == nil - %s[0].state == nil - %s[0].country == nil - %s[0].country_code == nil - %s[0].phone == nil - %s[0].fax == nil - %s[0].email == nil + %s[0].email == "https://whois.centralnic.com/contact/google.gr.com/tech" #nameservers %s %CLASS{array} %s %SIZE{2} %s[0] %CLASS{nameserver} - %s[0].name == "f1g1ns1.dnspod.net" + %s[0].name == "ns1.67hosting.com" %s[1] %CLASS{nameserver} - %s[1].name == "f1g1ns2.dnspod.net" + %s[1].name == "ns2.67hosting.com" diff --git a/spec/fixtures/responses/whois.centralnic.com/gr.com/status_registered.txt b/spec/fixtures/responses/whois.centralnic.com/gr.com/status_registered.txt index d3480f1a..b0dac3db 100644 --- a/spec/fixtures/responses/whois.centralnic.com/gr.com/status_registered.txt +++ b/spec/fixtures/responses/whois.centralnic.com/gr.com/status_registered.txt @@ -1,23 +1,40 @@ -Domain ID:CNIC-DO735168 -Domain Name:GOOGLE.GR.COM -Created On:2011-02-07T13:10:14.0Z -Last Updated On:2012-06-23T10:38:02.0Z -Expiration Date:2015-02-07T23:59:59.0Z -Status:ok -Registrant ID:H1346485 -Tech ID:H1346485 -Billing ID:H1346485 -Name Server:F1G1NS1.DNSPOD.NET -Name Server:F1G1NS2.DNSPOD.NET -DNSSEC:Unsigned +Domain Name: GOOGLE.GR.COM +Registry Domain ID: D67028804-CNIC +Registrar WHOIS Server: whois.porkbun.com +Registrar URL: https://porkbun.com/ +Updated Date: 2021-06-05T01:20:51.0Z +Creation Date: 2018-05-07T07:21:24.0Z +Registry Expiry Date: 2022-05-07T23:59:59.0Z +Registrar: Porkbun, LLC +Registrar IANA ID: 1861 +Domain Status: clientTransferProhibited https://icann.org/epp#clientTransferProhibited +Domain Status: clientDeleteProhibited https://icann.org/epp#clientDeleteProhibited +Registrant Email: https://whois.centralnic.com/contact/google.gr.com/registrant +Admin Email: https://whois.centralnic.com/contact/google.gr.com/admin +Tech Email: https://whois.centralnic.com/contact/google.gr.com/tech +Name Server: NS1.67HOSTING.COM +Name Server: NS2.67HOSTING.COM +DNSSEC: unsigned +Billing Email: https://whois.centralnic.com/contact/google.gr.com/billing +Registrar Abuse Contact Email: abuse@porkbun.com +Registrar Abuse Contact Phone: +1.5038508351 +URL of the ICANN Whois Inaccuracy Complaint Form: https://www.icann.org/wicf/ +>>> Last update of WHOIS database: 2021-12-15T16:41:46.0Z <<< -This whois service is provided by CentralNic Ltd and only contains -information pertaining to Internet domain names we have registered for -our customers. By using this service you are agreeing (1) not to use any -information presented here for any purpose other than determining -ownership of domain names, (2) not to store or reproduce this data in -any way, (3) not to use any high-volume, automated, electronic processes -to obtain data from this service. Abuse of this service is monitored and -actions in contravention of these terms will result in being permanently -blacklisted. All data is (c) CentralNic Ltd https://www.centralnic.com/ +For more information on Whois status codes, please visit https://icann.org/epp +>>> IMPORTANT INFORMATION ABOUT THE DEPLOYMENT OF RDAP: please visit +https://www.centralnic.com/support/rdap <<< + +The Whois and RDAP services are provided by CentralNic, and contain +information pertaining to Internet domain names registered by our +our customers. By using this service you are agreeing (1) not to use any +information presented here for any purpose other than determining +ownership of domain names, (2) not to store or reproduce this data in +any way, (3) not to use any high-volume, automated, electronic processes +to obtain data from this service. Abuse of this service is monitored and +actions in contravention of these terms will result in being permanently +blacklisted. All data is (c) CentralNic Ltd (https://www.centralnic.com) + +Access to the Whois and RDAP services is rate limited. For more +information, visit https://registrar-console.centralnic.com/pub/whois_guidance. diff --git a/spec/fixtures/responses/whois.centralnic.com/hu.com/property_contacts_omitted.txt b/spec/fixtures/responses/whois.centralnic.com/hu.com/property_contacts_omitted.txt deleted file mode 100644 index 42e4c86c..00000000 --- a/spec/fixtures/responses/whois.centralnic.com/hu.com/property_contacts_omitted.txt +++ /dev/null @@ -1,32 +0,0 @@ -This whois service is provided by CentralNic Ltd and only contains -information pertaining to Internet domain names we have registered for -our customers. By using this service you are agreeing (1) not to use any -information presented here for any purpose other than determining -ownership of domain names, (2) not to store or reproduce this data in -any way, (3) not to use any high-volume, automated, electronic processes -to obtain data from this service. Abuse of this service is monitored and -actions in contravention of these terms will result in being permanently -blacklisted. All data is (c) CentralNic Ltd https://www.centralnic.com/ - -Domain ID:CNIC-DO482594 -Domain Name:HOTEL.HU.COM -Created On:12-Mar-2007 10:50:10 UTC -Last Updated On:13-Mar-2011 00:15:10 UTC -Expiration Date:12-Mar-2012 23:59:59 UTC -Status:OK -Registrant ID:H1088667 -Admin ID:H122681 -Tech ID:H122681 -Billing ID:H1088667 -Sponsoring Registrar ID:H122681 -Sponsoring Registrar Organization:Domain Exploitation International -Sponsoring Registrar City:Santa Monica -Sponsoring Registrar State/Province:CA -Sponsoring Registrar Postal Code:90401 -Sponsoring Registrar Country:US -Sponsoring Registrar Phone: -Name Server:NS1.DOMAIN-EXPLOITATION.US.COM -Name Server:NS2.DOMAIN-EXPLOITATION.US.COM -DNSSEC:Unsigned - - diff --git a/spec/fixtures/responses/whois.centralnic.com/hu.com/status_available.expected b/spec/fixtures/responses/whois.centralnic.com/hu.com/status_available.expected deleted file mode 100644 index 2c3fe7a8..00000000 --- a/spec/fixtures/responses/whois.centralnic.com/hu.com/status_available.expected +++ /dev/null @@ -1,50 +0,0 @@ -#disclaimer - %s == nil - - -#domain - %s == nil - -#domain_id - %s == nil - - -#status - %s == [] - -#available? - %s == true - -#registered? - %s == false - - -#created_on - %s == nil - -#updated_on - %s == nil - -#expires_on - %s == nil - - -#registrar - %s == nil - -#registrant_contacts - %s %CLASS{array} - %s == [] - -#admin_contacts - %s %CLASS{array} - %s == [] - -#technical_contacts - %s %CLASS{array} - %s == [] - - -#nameservers - %s %CLASS{array} - %s == [] diff --git a/spec/fixtures/responses/whois.centralnic.com/hu.com/status_available.txt b/spec/fixtures/responses/whois.centralnic.com/hu.com/status_available.txt deleted file mode 100644 index 09cc0f7e..00000000 --- a/spec/fixtures/responses/whois.centralnic.com/hu.com/status_available.txt +++ /dev/null @@ -1 +0,0 @@ -DOMAIN NOT FOUND diff --git a/spec/fixtures/responses/whois.centralnic.com/hu.com/status_registered.expected b/spec/fixtures/responses/whois.centralnic.com/hu.com/status_registered.expected deleted file mode 100644 index b03995cb..00000000 --- a/spec/fixtures/responses/whois.centralnic.com/hu.com/status_registered.expected +++ /dev/null @@ -1,102 +0,0 @@ -#disclaimer - %s == "This whois service is provided by CentralNic Ltd and only contains information pertaining to Internet domain names we have registered for our customers. By using this service you are agreeing (1) not to use any information presented here for any purpose other than determining ownership of domain names, (2) not to store or reproduce this data in any way, (3) not to use any high-volume, automated, electronic processes to obtain data from this service. Abuse of this service is monitored and actions in contravention of these terms will result in being permanently blacklisted. All data is (c) CentralNic Ltd https://www.centralnic.com/" - - -#domain - %s == "porn.hu.com" - -#domain_id - %s == "CNIC-DO970405" - - -#status - %s == ["pendingDelete", "pendingDelete"] - -#available? - %s == false - -#registered? - %s == true - - -#created_on - %s %CLASS{time} - %s %TIME{2012-11-28 17:46:03 UTC} - -#updated_on - %s %CLASS{time} - %s %TIME{2014-02-11 00:16:13 UTC} - -#expires_on - %s %CLASS{time} - %s %TIME{2013-11-28 23:59:59 UTC} - - -#registrar - %s %CLASS{registrar} - %s.id == "H65658" - %s.name == "101Domain, Inc." - %s.url == "http://www.101domain.com" - -#registrant_contacts - %s %CLASS{array} - %s %SIZE{1} - %s[0] %CLASS{contact} - %s[0].type == Whois::Parser::Contact::TYPE_REGISTRANT - %s[0].id == "RWG000000004273D" - %s[0].name == "Gintautas Liaskus" - %s[0].organization == "G.Liaskaus firma INFOMEGA" - %s[0].address == "Kapsu 32-53" - %s[0].city == "Vilnius" - %s[0].zip == "02167" - %s[0].state == nil - %s[0].country == nil - %s[0].country_code == "LT" - %s[0].phone == "+370.52711457" - %s[0].fax == "+370.52784278" - %s[0].email == "infotau@infotau.lt" - -#admin_contacts - %s %CLASS{array} - %s %SIZE{1} - %s[0] %CLASS{contact} - %s[0].type == Whois::Parser::Contact::TYPE_ADMINISTRATIVE - %s[0].id == "RWG000000004273D" - %s[0].name == "Gintautas Liaskus" - %s[0].organization == "G.Liaskaus firma INFOMEGA" - %s[0].address == "Kapsu 32-53" - %s[0].city == "Vilnius" - %s[0].zip == "02167" - %s[0].state == nil - %s[0].country == nil - %s[0].country_code == "LT" - %s[0].phone == "+370.52711457" - %s[0].fax == "+370.52784278" - %s[0].email == "infotau@infotau.lt" - -#technical_contacts - %s %CLASS{array} - %s %SIZE{1} - %s[0] %CLASS{contact} - %s[0].type == Whois::Parser::Contact::TYPE_TECHNICAL - %s[0].id == "RWG000000004273D" - %s[0].name == "Gintautas Liaskus" - %s[0].organization == "G.Liaskaus firma INFOMEGA" - %s[0].address == "Kapsu 32-53" - %s[0].city == "Vilnius" - %s[0].zip == "02167" - %s[0].state == nil - %s[0].country == nil - %s[0].country_code == "LT" - %s[0].phone == "+370.52711457" - %s[0].fax == "+370.52784278" - %s[0].email == "infotau@infotau.lt" - - -#nameservers - %s %CLASS{array} - %s %SIZE{2} - %s[0] %CLASS{nameserver} - %s[0].name == "ns1.sedoparking.com" - %s[1] %CLASS{nameserver} - %s[1].name == "ns2.sedoparking.com" diff --git a/spec/fixtures/responses/whois.centralnic.com/hu.com/status_registered.txt b/spec/fixtures/responses/whois.centralnic.com/hu.com/status_registered.txt deleted file mode 100644 index fc0634ee..00000000 --- a/spec/fixtures/responses/whois.centralnic.com/hu.com/status_registered.txt +++ /dev/null @@ -1,73 +0,0 @@ -Domain ID:CNIC-DO970405 -Domain Name:PORN.HU.COM -Created On:2012-11-28T17:46:03.0Z -Last Updated On:2014-02-11T00:16:13.0Z -Expiration Date:2013-11-28T23:59:59.0Z -Status:pendingDelete -Status:pendingDelete -Registrant ID:RWG000000004273D -Registrant Name:Gintautas Liaskus -Registrant Organization:G.Liaskaus firma INFOMEGA -Registrant Street1:Kapsu 32-53 -Registrant City:Vilnius -Registrant Postal Code:02167 -Registrant Country:LT -Registrant Phone:+370.52711457 -Registrant FAX:+370.52784278 -Registrant Email:infotau@infotau.lt -Admin ID:RWG000000004273D -Admin Name:Gintautas Liaskus -Admin Organization:G.Liaskaus firma INFOMEGA -Admin Street1:Kapsu 32-53 -Admin City:Vilnius -Admin Postal Code:02167 -Admin Country:LT -Admin Phone:+370.52711457 -Admin FAX:+370.52784278 -Admin Email:infotau@infotau.lt -Tech ID:RWG000000004273D -Tech Name:Gintautas Liaskus -Tech Organization:G.Liaskaus firma INFOMEGA -Tech Street1:Kapsu 32-53 -Tech City:Vilnius -Tech Postal Code:02167 -Tech Country:LT -Tech Phone:+370.52711457 -Tech FAX:+370.52784278 -Tech Email:infotau@infotau.lt -Billing ID:RWG000000004273E -Billing Name:Billing Department -Billing Organization:101Domain, Inc. -Billing Street1:5858 Edison Pl. -Billing City:Carlsbad -Billing State/Province:CA -Billing Postal Code:92008 -Billing Country:US -Billing Phone:+1.7604448674 -Billing FAX:+1.7605794996 -Billing Email:tech1@101domain.com -Sponsoring Registrar ID:H65658 -Sponsoring Registrar IANA ID:1011 -Sponsoring Registrar Organization:101Domain, Inc. -Sponsoring Registrar Street1:5858 Edison Pl. -Sponsoring Registrar City:Carlsbad -Sponsoring Registrar State/Province:CA -Sponsoring Registrar Postal Code:92008 -Sponsoring Registrar Country:US -Sponsoring Registrar Phone:+1.7604448674 -Sponsoring Registrar FAX:+1.7605794996 -Sponsoring Registrar Website:http://www.101domain.com -Name Server:NS1.SEDOPARKING.COM -Name Server:NS2.SEDOPARKING.COM -DNSSEC:Unsigned - -This whois service is provided by CentralNic Ltd and only contains -information pertaining to Internet domain names we have registered for -our customers. By using this service you are agreeing (1) not to use any -information presented here for any purpose other than determining -ownership of domain names, (2) not to store or reproduce this data in -any way, (3) not to use any high-volume, automated, electronic processes -to obtain data from this service. Abuse of this service is monitored and -actions in contravention of these terms will result in being permanently -blacklisted. All data is (c) CentralNic Ltd https://www.centralnic.com/ - diff --git a/spec/fixtures/responses/whois.centralnic.com/jp.net/status_available.expected b/spec/fixtures/responses/whois.centralnic.com/jp.net/status_available.expected index 2c3fe7a8..64c3bae5 100644 --- a/spec/fixtures/responses/whois.centralnic.com/jp.net/status_available.expected +++ b/spec/fixtures/responses/whois.centralnic.com/jp.net/status_available.expected @@ -1,5 +1,5 @@ #disclaimer - %s == nil + %s == "The Whois and RDAP services are provided by CentralNic, and contain information pertaining to Internet domain names registered by our our customers. By using this service you are agreeing (1) not to use any information presented here for any purpose other than determining ownership of domain names, (2) not to store or reproduce this data in any way, (3) not to use any high-volume, automated, electronic processes to obtain data from this service. Abuse of this service is monitored and actions in contravention of these terms will result in being permanently blacklisted. All data is (c) CentralNic Ltd (https://www.centralnic.com) Access to the Whois and RDAP services is rate limited. For more information, visit https://registrar-console.centralnic.com/pub/whois_guidance." #domain @@ -10,7 +10,7 @@ #status - %s == [] + %s == :available #available? %s == true diff --git a/spec/fixtures/responses/whois.centralnic.com/jp.net/status_available.txt b/spec/fixtures/responses/whois.centralnic.com/jp.net/status_available.txt index 09cc0f7e..0c5f68ab 100644 --- a/spec/fixtures/responses/whois.centralnic.com/jp.net/status_available.txt +++ b/spec/fixtures/responses/whois.centralnic.com/jp.net/status_available.txt @@ -1 +1,21 @@ -DOMAIN NOT FOUND +The queried object does not exist: DOMAIN NOT FOUND + +>>> Last update of WHOIS database: 2021-12-15T16:49:45.0Z <<< + +For more information on Whois status codes, please visit https://icann.org/epp + +>>> IMPORTANT INFORMATION ABOUT THE DEPLOYMENT OF RDAP: please visit +https://www.centralnic.com/support/rdap <<< + +The Whois and RDAP services are provided by CentralNic, and contain +information pertaining to Internet domain names registered by our +our customers. By using this service you are agreeing (1) not to use any +information presented here for any purpose other than determining +ownership of domain names, (2) not to store or reproduce this data in +any way, (3) not to use any high-volume, automated, electronic processes +to obtain data from this service. Abuse of this service is monitored and +actions in contravention of these terms will result in being permanently +blacklisted. All data is (c) CentralNic Ltd (https://www.centralnic.com) + +Access to the Whois and RDAP services is rate limited. For more +information, visit https://registrar-console.centralnic.com/pub/whois_guidance. diff --git a/spec/fixtures/responses/whois.centralnic.com/jp.net/status_registered.expected b/spec/fixtures/responses/whois.centralnic.com/jp.net/status_registered.expected index bae999a9..3a5b97b5 100644 --- a/spec/fixtures/responses/whois.centralnic.com/jp.net/status_registered.expected +++ b/spec/fixtures/responses/whois.centralnic.com/jp.net/status_registered.expected @@ -1,16 +1,17 @@ #disclaimer - %s == "This whois service is provided by CentralNic Ltd and only contains information pertaining to Internet domain names we have registered for our customers. By using this service you are agreeing (1) not to use any information presented here for any purpose other than determining ownership of domain names, (2) not to store or reproduce this data in any way, (3) not to use any high-volume, automated, electronic processes to obtain data from this service. Abuse of this service is monitored and actions in contravention of these terms will result in being permanently blacklisted. All data is (c) CentralNic Ltd https://www.centralnic.com/" + %s == "The Whois and RDAP services are provided by CentralNic, and contain information pertaining to Internet domain names registered by our our customers. By using this service you are agreeing (1) not to use any information presented here for any purpose other than determining ownership of domain names, (2) not to store or reproduce this data in any way, (3) not to use any high-volume, automated, electronic processes to obtain data from this service. Abuse of this service is monitored and actions in contravention of these terms will result in being permanently blacklisted. All data is (c) CentralNic Ltd (https://www.centralnic.com) Access to the Whois and RDAP services is rate limited. For more information, visit https://registrar-console.centralnic.com/pub/whois_guidance." + #domain %s == "ntt.jp.net" #domain_id - %s == "CNIC-DO846061" + %s == "D195732259-CNIC" #status - %s == ["ok"] + %s == :registered #available? %s == false @@ -20,83 +21,49 @@ #created_on %s %CLASS{time} - %s %TIME{2012-03-16 11:47:23 UTC} + %s %TIME{2020-08-06 08:41:29 UTC} #updated_on %s %CLASS{time} - %s %TIME{2013-01-24 16:57:19 UTC} + %s %TIME{2020-09-04 04:22:52 UTC} #expires_on %s %CLASS{time} - %s %TIME{2018-03-16 23:59:59 UTC} + %s %TIME{2022-08-06 23:59:59 UTC} #registrar %s %CLASS{registrar} - %s.id == "H1605993" - %s.name == "GMO" - %s.url == "http://www.onamae.com" + %s.id == "1387" + %s.name == "1API GmbH" + %s.url == "http://www.1api.net" #registrant_contacts %s %CLASS{array} %s %SIZE{1} %s[0] %CLASS{contact} %s[0].type == Whois::Parser::Contact::TYPE_REGISTRANT - %s[0].id == "136151BCEFE" - %s[0].name == "zhijian xia" - %s[0].organization == "zhijian xia" - %s[0].address == "Chuo\n3-23-20" - %s[0].city == "Warabi-shi" - %s[0].zip == "335-0004" - %s[0].state == "Saitama" - %s[0].country == nil - %s[0].country_code == "JP" - %s[0].phone == "+81.08037215656" - %s[0].fax == nil - %s[0].email == "xia@ingame.jp" + %s[0].email == "https://whois.centralnic.com/contact/ntt.jp.net/registrant" #admin_contacts %s %CLASS{array} %s %SIZE{1} %s[0] %CLASS{contact} %s[0].type == Whois::Parser::Contact::TYPE_ADMINISTRATIVE - %s[0].id == "136151BD1A1" - %s[0].name == "zhijian xia" - %s[0].organization == "zhijian xia" - %s[0].address == "Chuo\n3-23-20" - %s[0].city == "Warabi-shi" - %s[0].zip == "335-0004" - %s[0].state == "Saitama" - %s[0].country == nil - %s[0].country_code == "JP" - %s[0].phone == "+81.08037215656" - %s[0].fax == nil - %s[0].email == "xia@ingame.jp" + %s[0].email == "https://whois.centralnic.com/contact/ntt.jp.net/admin" #technical_contacts %s %CLASS{array} %s %SIZE{1} %s[0] %CLASS{contact} %s[0].type == Whois::Parser::Contact::TYPE_TECHNICAL - %s[0].id == "136151BD459" - %s[0].name == "Technical Contact" - %s[0].organization == "GMO Internet Inc." - %s[0].address == "26-1 Sakuragaoka-cho\nCerulean Tower 11F" - %s[0].city == "Shibuya-ku" - %s[0].zip == "150-8512" - %s[0].state == "Tokyo" - %s[0].country == nil - %s[0].country_code == "JP" - %s[0].phone == "+81.0354562555" - %s[0].fax == "+81.0354562556" - %s[0].email == "admin@onamae.com" - + %s[0].email == "https://whois.centralnic.com/contact/ntt.jp.net/tech" #nameservers %s %CLASS{array} %s %SIZE{2} %s[0] %CLASS{nameserver} - %s[0].name == "dns1.onamae.com" + %s[0].name == "f1g1ns1.dnspod.net" %s[1] %CLASS{nameserver} - %s[1].name == "dns2.onamae.com" + %s[1].name == "f1g1ns2.dnspod.net" diff --git a/spec/fixtures/responses/whois.centralnic.com/jp.net/status_registered.txt b/spec/fixtures/responses/whois.centralnic.com/jp.net/status_registered.txt index 892c1b9b..b6868900 100644 --- a/spec/fixtures/responses/whois.centralnic.com/jp.net/status_registered.txt +++ b/spec/fixtures/responses/whois.centralnic.com/jp.net/status_registered.txt @@ -1,77 +1,39 @@ -Domain ID:CNIC-DO846061 -Domain Name:NTT.JP.NET -Created On:2012-03-16T11:47:23.0Z -Last Updated On:2013-01-24T16:57:19.0Z -Expiration Date:2018-03-16T23:59:59.0Z -Status:ok -Registrant ID:136151BCEFE -Registrant Name:zhijian xia -Registrant Organization:zhijian xia -Registrant Street1:Chuo -Registrant Street2:3-23-20 -Registrant City:Warabi-shi -Registrant State/Province:Saitama -Registrant Postal Code:335-0004 -Registrant Country:JP -Registrant Phone:+81.08037215656 -Registrant Email:xia@ingame.jp -Admin ID:136151BD1A1 -Admin Name:zhijian xia -Admin Organization:zhijian xia -Admin Street1:Chuo -Admin Street2:3-23-20 -Admin City:Warabi-shi -Admin State/Province:Saitama -Admin Postal Code:335-0004 -Admin Country:JP -Admin Phone:+81.08037215656 -Admin Email:xia@ingame.jp -Tech ID:136151BD459 -Tech Name:Technical Contact -Tech Organization:GMO Internet Inc. -Tech Street1:26-1 Sakuragaoka-cho -Tech Street2:Cerulean Tower 11F -Tech City:Shibuya-ku -Tech State/Province:Tokyo -Tech Postal Code:150-8512 -Tech Country:JP -Tech Phone:+81.0354562555 -Tech FAX:+81.0354562556 -Tech Email:admin@onamae.com -Billing ID:136151BD74A -Billing Name:zhijian xia -Billing Organization:zhijian xia -Billing Street1:Chuo -Billing Street2:3-23-20 -Billing City:Warabi-shi -Billing State/Province:Saitama -Billing Postal Code:335-0004 -Billing Country:JP -Billing Phone:+81.08037215656 -Billing Email:xia@ingame.jp -Sponsoring Registrar ID:H1605993 -Sponsoring Registrar IANA ID:49 -Sponsoring Registrar Organization:GMO -Sponsoring Registrar Street1:Cerulean Tower, -Sponsoring Registrar Street2:26-1 Sakuragaoka-cho -Sponsoring Registrar City:Shibuya-ku -Sponsoring Registrar State/Province:Tokyo -Sponsoring Registrar Postal Code:150-8512 -Sponsoring Registrar Country:JP -Sponsoring Registrar Phone:+81 3 5456 1120 -Sponsoring Registrar FAX:+81 3 3489 1038 -Sponsoring Registrar Website:http://www.onamae.com -Name Server:DNS1.ONAMAE.COM -Name Server:DNS2.ONAMAE.COM -DNSSEC:Unsigned +Domain Name: NTT.JP.NET +Registry Domain ID: D195732259-CNIC +Registrar WHOIS Server: whois.1api.net +Registrar URL: http://www.1api.net +Updated Date: 2020-09-04T04:22:52.0Z +Creation Date: 2020-08-06T08:41:29.0Z +Registry Expiry Date: 2022-08-06T23:59:59.0Z +Registrar: 1API GmbH +Registrar IANA ID: 1387 +Domain Status: ok https://icann.org/epp#ok +Registrant Email: https://whois.centralnic.com/contact/ntt.jp.net/registrant +Admin Email: https://whois.centralnic.com/contact/ntt.jp.net/admin +Tech Email: https://whois.centralnic.com/contact/ntt.jp.net/tech +Name Server: F1G1NS1.DNSPOD.NET +Name Server: F1G1NS2.DNSPOD.NET +DNSSEC: unsigned +Billing Email: https://whois.centralnic.com/contact/ntt.jp.net/billing +Registrar Abuse Contact Email: abuse@1api.net +Registrar Abuse Contact Phone: +49.68949396850 +URL of the ICANN Whois Inaccuracy Complaint Form: https://www.icann.org/wicf/ +>>> Last update of WHOIS database: 2021-12-15T16:49:27.0Z <<< -This whois service is provided by CentralNic Ltd and only contains -information pertaining to Internet domain names we have registered for -our customers. By using this service you are agreeing (1) not to use any -information presented here for any purpose other than determining -ownership of domain names, (2) not to store or reproduce this data in -any way, (3) not to use any high-volume, automated, electronic processes -to obtain data from this service. Abuse of this service is monitored and -actions in contravention of these terms will result in being permanently -blacklisted. All data is (c) CentralNic Ltd https://www.centralnic.com/ +For more information on Whois status codes, please visit https://icann.org/epp +>>> IMPORTANT INFORMATION ABOUT THE DEPLOYMENT OF RDAP: please visit +https://www.centralnic.com/support/rdap <<< + +The Whois and RDAP services are provided by CentralNic, and contain +information pertaining to Internet domain names registered by our +our customers. By using this service you are agreeing (1) not to use any +information presented here for any purpose other than determining +ownership of domain names, (2) not to store or reproduce this data in +any way, (3) not to use any high-volume, automated, electronic processes +to obtain data from this service. Abuse of this service is monitored and +actions in contravention of these terms will result in being permanently +blacklisted. All data is (c) CentralNic Ltd (https://www.centralnic.com) + +Access to the Whois and RDAP services is rate limited. For more +information, visit https://registrar-console.centralnic.com/pub/whois_guidance. diff --git a/spec/fixtures/responses/whois.centralnic.com/jpn.com/status_available.expected b/spec/fixtures/responses/whois.centralnic.com/jpn.com/status_available.expected deleted file mode 100644 index 2c3fe7a8..00000000 --- a/spec/fixtures/responses/whois.centralnic.com/jpn.com/status_available.expected +++ /dev/null @@ -1,50 +0,0 @@ -#disclaimer - %s == nil - - -#domain - %s == nil - -#domain_id - %s == nil - - -#status - %s == [] - -#available? - %s == true - -#registered? - %s == false - - -#created_on - %s == nil - -#updated_on - %s == nil - -#expires_on - %s == nil - - -#registrar - %s == nil - -#registrant_contacts - %s %CLASS{array} - %s == [] - -#admin_contacts - %s %CLASS{array} - %s == [] - -#technical_contacts - %s %CLASS{array} - %s == [] - - -#nameservers - %s %CLASS{array} - %s == [] diff --git a/spec/fixtures/responses/whois.centralnic.com/jpn.com/status_available.txt b/spec/fixtures/responses/whois.centralnic.com/jpn.com/status_available.txt deleted file mode 100644 index 09cc0f7e..00000000 --- a/spec/fixtures/responses/whois.centralnic.com/jpn.com/status_available.txt +++ /dev/null @@ -1 +0,0 @@ -DOMAIN NOT FOUND diff --git a/spec/fixtures/responses/whois.centralnic.com/jpn.com/status_registered.expected b/spec/fixtures/responses/whois.centralnic.com/jpn.com/status_registered.expected deleted file mode 100644 index a63313a7..00000000 --- a/spec/fixtures/responses/whois.centralnic.com/jpn.com/status_registered.expected +++ /dev/null @@ -1,106 +0,0 @@ -#disclaimer - %s == "This whois service is provided by CentralNic Ltd and only contains information pertaining to Internet domain names we have registered for our customers. By using this service you are agreeing (1) not to use any information presented here for any purpose other than determining ownership of domain names, (2) not to store or reproduce this data in any way, (3) not to use any high-volume, automated, electronic processes to obtain data from this service. Abuse of this service is monitored and actions in contravention of these terms will result in being permanently blacklisted. All data is (c) CentralNic Ltd https://www.centralnic.com/" - - -#domain - %s == "koi.jpn.com" - -#domain_id - %s == "CNIC-DO492866" - - -#status - %s == ["ok"] - -#available? - %s == false - -#registered? - %s == true - - -#created_on - %s %CLASS{time} - %s %TIME{2007-06-29 13:42:35 UTC} - -#updated_on - %s %CLASS{time} - %s %TIME{2013-07-01 00:18:14 UTC} - -#expires_on - %s %CLASS{time} - %s %TIME{2015-06-29 23:59:59 UTC} - - -#registrar - %s %CLASS{registrar} - %s.id == "I6467" - %s.name == "Webfusion" - %s.url == "http://www.123-reg.co.uk/domain-names/" - -#registrant_contacts - %s %CLASS{array} - %s %SIZE{1} - %s[0] %CLASS{contact} - %s[0].type == Whois::Parser::Contact::TYPE_REGISTRANT - %s[0].id == "MNT78E22765897" - %s[0].name == "Identity Protection Service" - %s[0].organization == "Identity Protect Limited" - %s[0].address == "PO Box 795" - %s[0].city == "Godalming" - %s[0].zip == "GU7 9GA" - %s[0].state == "Surrey" - %s[0].country == nil - %s[0].country_code == "GB" - %s[0].phone == "+44.1483307527" - %s[0].fax == "+44.1483304031" - %s[0].email == "koi.jpn.com@identity-protect.org" - -#admin_contacts - %s %CLASS{array} - %s %SIZE{1} - %s[0] %CLASS{contact} - %s[0].type == Whois::Parser::Contact::TYPE_ADMINISTRATIVE - %s[0].id == "MNT78E22765897" - %s[0].name == "Identity Protection Service" - %s[0].organization == "Identity Protect Limited" - %s[0].address == "PO Box 795" - %s[0].city == "Godalming" - %s[0].zip == "GU7 9GA" - %s[0].state == "Surrey" - %s[0].country == nil - %s[0].country_code == "GB" - %s[0].phone == "+44.1483307527" - %s[0].fax == "+44.1483304031" - %s[0].email == "koi.jpn.com@identity-protect.org" - -#technical_contacts - %s %CLASS{array} - %s %SIZE{1} - %s[0] %CLASS{contact} - %s[0].type == Whois::Parser::Contact::TYPE_TECHNICAL - %s[0].id == "MNT78E22765897" - %s[0].name == "Identity Protection Service" - %s[0].organization == "Identity Protect Limited" - %s[0].address == "PO Box 795" - %s[0].city == "Godalming" - %s[0].zip == "GU7 9GA" - %s[0].state == "Surrey" - %s[0].country == nil - %s[0].country_code == "GB" - %s[0].phone == "+44.1483307527" - %s[0].fax == "+44.1483304031" - %s[0].email == "koi.jpn.com@identity-protect.org" - - -#nameservers - %s %CLASS{array} - %s %SIZE{2} - %s[0] %CLASS{nameserver} - %s[0].name == "ns1.chaoshosting.co.uk" - %s[0].ipv4 == nil - %s[0].ipv6 == nil - %s[1] %CLASS{nameserver} - %s[1].name == "ns2.chaoshosting.co.uk" - %s[1].ipv4 == nil - %s[1].ipv6 == nil diff --git a/spec/fixtures/responses/whois.centralnic.com/jpn.com/status_registered.txt b/spec/fixtures/responses/whois.centralnic.com/jpn.com/status_registered.txt deleted file mode 100644 index 0744d035..00000000 --- a/spec/fixtures/responses/whois.centralnic.com/jpn.com/status_registered.txt +++ /dev/null @@ -1,76 +0,0 @@ -Domain ID:CNIC-DO492866 -Domain Name:KOI.JPN.COM -Created On:2007-06-29T13:42:35.0Z -Last Updated On:2013-07-01T00:18:14.0Z -Expiration Date:2015-06-29T23:59:59.0Z -Status:ok -Registrant ID:MNT78E22765897 -Registrant Name:Identity Protection Service -Registrant Organization:Identity Protect Limited -Registrant Street1:PO Box 795 -Registrant City:Godalming -Registrant State/Province:Surrey -Registrant Postal Code:GU7 9GA -Registrant Country:GB -Registrant Phone:+44.1483307527 -Registrant FAX:+44.1483304031 -Registrant Email:koi.jpn.com@identity-protect.org -Admin ID:MNT78E22765897 -Admin Name:Identity Protection Service -Admin Organization:Identity Protect Limited -Admin Street1:PO Box 795 -Admin City:Godalming -Admin State/Province:Surrey -Admin Postal Code:GU7 9GA -Admin Country:GB -Admin Phone:+44.1483307527 -Admin FAX:+44.1483304031 -Admin Email:koi.jpn.com@identity-protect.org -Tech ID:MNT78E22765897 -Tech Name:Identity Protection Service -Tech Organization:Identity Protect Limited -Tech Street1:PO Box 795 -Tech City:Godalming -Tech State/Province:Surrey -Tech Postal Code:GU7 9GA -Tech Country:GB -Tech Phone:+44.1483307527 -Tech FAX:+44.1483304031 -Tech Email:koi.jpn.com@identity-protect.org -Billing ID:MNT78E22765897 -Billing Name:Identity Protection Service -Billing Organization:Identity Protect Limited -Billing Street1:PO Box 795 -Billing City:Godalming -Billing State/Province:Surrey -Billing Postal Code:GU7 9GA -Billing Country:GB -Billing Phone:+44.1483307527 -Billing FAX:+44.1483304031 -Billing Email:koi.jpn.com@identity-protect.org -Sponsoring Registrar ID:I6467 -Sponsoring Registrar IANA ID:1515 -Sponsoring Registrar Organization:Webfusion -Sponsoring Registrar Street1:5 Roundwood Avenue -Sponsoring Registrar Street2:Stockley Park -Sponsoring Registrar City:Uxbridge -Sponsoring Registrar State/Province:Middlesex -Sponsoring Registrar Postal Code:UB11 1FF -Sponsoring Registrar Country:GB -Sponsoring Registrar Phone:0845 859 0018 -Sponsoring Registrar FAX:08701 650437 -Sponsoring Registrar Website:http://www.123-reg.co.uk/domain-names/ -Name Server:NS1.CHAOSHOSTING.CO.UK -Name Server:NS2.CHAOSHOSTING.CO.UK -DNSSEC:Unsigned - -This whois service is provided by CentralNic Ltd and only contains -information pertaining to Internet domain names we have registered for -our customers. By using this service you are agreeing (1) not to use any -information presented here for any purpose other than determining -ownership of domain names, (2) not to store or reproduce this data in -any way, (3) not to use any high-volume, automated, electronic processes -to obtain data from this service. Abuse of this service is monitored and -actions in contravention of these terms will result in being permanently -blacklisted. All data is (c) CentralNic Ltd https://www.centralnic.com/ - diff --git a/spec/fixtures/responses/whois.centralnic.com/kr.com/status_available.expected b/spec/fixtures/responses/whois.centralnic.com/kr.com/status_available.expected deleted file mode 100644 index 2c3fe7a8..00000000 --- a/spec/fixtures/responses/whois.centralnic.com/kr.com/status_available.expected +++ /dev/null @@ -1,50 +0,0 @@ -#disclaimer - %s == nil - - -#domain - %s == nil - -#domain_id - %s == nil - - -#status - %s == [] - -#available? - %s == true - -#registered? - %s == false - - -#created_on - %s == nil - -#updated_on - %s == nil - -#expires_on - %s == nil - - -#registrar - %s == nil - -#registrant_contacts - %s %CLASS{array} - %s == [] - -#admin_contacts - %s %CLASS{array} - %s == [] - -#technical_contacts - %s %CLASS{array} - %s == [] - - -#nameservers - %s %CLASS{array} - %s == [] diff --git a/spec/fixtures/responses/whois.centralnic.com/kr.com/status_available.txt b/spec/fixtures/responses/whois.centralnic.com/kr.com/status_available.txt deleted file mode 100644 index 09cc0f7e..00000000 --- a/spec/fixtures/responses/whois.centralnic.com/kr.com/status_available.txt +++ /dev/null @@ -1 +0,0 @@ -DOMAIN NOT FOUND diff --git a/spec/fixtures/responses/whois.centralnic.com/kr.com/status_registered.expected b/spec/fixtures/responses/whois.centralnic.com/kr.com/status_registered.expected deleted file mode 100644 index c8fa879d..00000000 --- a/spec/fixtures/responses/whois.centralnic.com/kr.com/status_registered.expected +++ /dev/null @@ -1,118 +0,0 @@ -#disclaimer - %s == "This whois service is provided by CentralNic Ltd and only contains information pertaining to Internet domain names we have registered for our customers. By using this service you are agreeing (1) not to use any information presented here for any purpose other than determining ownership of domain names, (2) not to store or reproduce this data in any way, (3) not to use any high-volume, automated, electronic processes to obtain data from this service. Abuse of this service is monitored and actions in contravention of these terms will result in being permanently blacklisted. All data is (c) CentralNic Ltd https://www.centralnic.com/" - - -#domain - %s == "academyart.kr.com" - -#domain_id - %s == "CNIC-DO569707" - - -#status - %s == ["clientTransferProhibited", "serverTransferProhibited"] - -#available? - %s == false - -#registered? - %s == true - - -#created_on - %s %CLASS{time} - %s %TIME{2008-06-11 21:25:43 UTC} - -#updated_on - %s %CLASS{time} - %s %TIME{2012-01-16 16:25:41 UTC} - -#expires_on - %s %CLASS{time} - %s %TIME{2014-06-11 23:59:59 UTC} - - -#registrar - %s %CLASS{registrar} - %s.id == "H292913" - %s.name == "Network Solutions LLC" - %s.url == "http://www.networksolutions.com/" - -#registrant_contacts - %s %CLASS{array} - %s %SIZE{1} - %s[0] %CLASS{contact} - %s[0].type == Whois::Parser::Contact::TYPE_REGISTRANT - %s[0].id == "41619876" - %s[0].name == "Academy of Art College" - %s[0].organization == "Academy of Art College" - %s[0].address == "79 NEW MONTGOMERY ST" - %s[0].city == "SAN FRANCISCO" - %s[0].zip == "94105" - %s[0].state == "CA" - %s[0].country == nil - %s[0].country_code == "US" - %s[0].phone == "+1.415618350" - %s[0].fax == nil - %s[0].email == "clefferts@academyart.edu" - -#admin_contacts - %s %CLASS{array} - %s %SIZE{1} - %s[0] %CLASS{contact} - %s[0].type == Whois::Parser::Contact::TYPE_ADMINISTRATIVE - %s[0].id == "41619876" - %s[0].name == "Academy of Art College" - %s[0].organization == "Academy of Art College" - %s[0].address == "79 NEW MONTGOMERY ST" - %s[0].city == "SAN FRANCISCO" - %s[0].zip == "94105" - %s[0].state == "CA" - %s[0].country == nil - %s[0].country_code == "US" - %s[0].phone == "+1.415618350" - %s[0].fax == nil - %s[0].email == "clefferts@academyart.edu" - -#technical_contacts - %s %CLASS{array} - %s %SIZE{1} - %s[0] %CLASS{contact} - %s[0].type == Whois::Parser::Contact::TYPE_TECHNICAL - %s[0].id == "41619876" - %s[0].name == "Academy of Art College" - %s[0].organization == "Academy of Art College" - %s[0].address == "79 NEW MONTGOMERY ST" - %s[0].city == "SAN FRANCISCO" - %s[0].zip == "94105" - %s[0].state == "CA" - %s[0].country == nil - %s[0].country_code == "US" - %s[0].phone == "+1.415618350" - %s[0].fax == nil - %s[0].email == "clefferts@academyart.edu" - - -#nameservers - %s %CLASS{array} - %s %SIZE{5} - %s[0] %CLASS{nameserver} - %s[0].name == "ns1.academyart.edu" - %s[0].ipv4 == nil - %s[0].ipv6 == nil - %s[1] %CLASS{nameserver} - %s[1].name == "dbru.br.ns.els-gms.att.net" - %s[1].ipv4 == nil - %s[1].ipv6 == nil - %s[2] %CLASS{nameserver} - %s[2].name == "dmtu.mt.ns.els-gms.att.net" - %s[2].ipv4 == nil - %s[2].ipv6 == nil - %s[3] %CLASS{nameserver} - %s[3].name == "cbru.br.ns.els-gms.att.net" - %s[3].ipv4 == nil - %s[3].ipv6 == nil - %s[4] %CLASS{nameserver} - %s[4].name == "cmtu.mt.ns.els-gms.att.net" - %s[4].ipv4 == nil - %s[4].ipv6 == nil diff --git a/spec/fixtures/responses/whois.centralnic.com/kr.com/status_registered.txt b/spec/fixtures/responses/whois.centralnic.com/kr.com/status_registered.txt deleted file mode 100644 index 27bef55c..00000000 --- a/spec/fixtures/responses/whois.centralnic.com/kr.com/status_registered.txt +++ /dev/null @@ -1,77 +0,0 @@ -Domain ID:CNIC-DO569707 -Domain Name:ACADEMYART.KR.COM -Created On:2008-06-11T21:25:43.0Z -Last Updated On:2012-01-16T16:25:41.0Z -Expiration Date:2014-06-11T23:59:59.0Z -Status:clientTransferProhibited -Status:serverTransferProhibited -Registrant ID:41619876 -Registrant Name:Academy of Art College -Registrant Organization:Academy of Art College -Registrant Street1:79 NEW MONTGOMERY ST -Registrant City:SAN FRANCISCO -Registrant State/Province:CA -Registrant Postal Code:94105 -Registrant Country:US -Registrant Phone:+1.415618350 -Registrant Email:clefferts@academyart.edu -Admin ID:41619876 -Admin Name:Academy of Art College -Admin Organization:Academy of Art College -Admin Street1:79 NEW MONTGOMERY ST -Admin City:SAN FRANCISCO -Admin State/Province:CA -Admin Postal Code:94105 -Admin Country:US -Admin Phone:+1.415618350 -Admin Email:clefferts@academyart.edu -Tech ID:41619876 -Tech Name:Academy of Art College -Tech Organization:Academy of Art College -Tech Street1:79 NEW MONTGOMERY ST -Tech City:SAN FRANCISCO -Tech State/Province:CA -Tech Postal Code:94105 -Tech Country:US -Tech Phone:+1.415618350 -Tech Email:clefferts@academyart.edu -Billing ID:41619877 -Billing Name:Academy of Art University -Billing Organization:Academy of Art -Billing Street1:79 New Montgomery, 3rd Floor -Billing Street2:IT Department -Billing City:SAN FRANCISCO -Billing State/Province:CA -Billing Postal Code:94105 -Billing Country:US -Billing Phone:+1.4156188582 -Billing FAX:+1.4156186279 -Billing Email:Padsuar@academyart.edu -Sponsoring Registrar ID:H292913 -Sponsoring Registrar IANA ID:2 -Sponsoring Registrar Organization:Network Solutions LLC -Sponsoring Registrar Street1:12808 Gran Bay Parkway West -Sponsoring Registrar City:Jacksonville -Sponsoring Registrar State/Province:FL -Sponsoring Registrar Postal Code:32258 -Sponsoring Registrar Country:US -Sponsoring Registrar Phone:+1.9046806600 -Sponsoring Registrar FAX:+1.9048800350 -Sponsoring Registrar Website:http://www.networksolutions.com/ -Name Server:NS1.ACADEMYART.EDU -Name Server:DBRU.BR.NS.ELS-GMS.ATT.NET -Name Server:DMTU.MT.NS.ELS-GMS.ATT.NET -Name Server:CBRU.BR.NS.ELS-GMS.ATT.NET -Name Server:CMTU.MT.NS.ELS-GMS.ATT.NET -DNSSEC:Unsigned - -This whois service is provided by CentralNic Ltd and only contains -information pertaining to Internet domain names we have registered for -our customers. By using this service you are agreeing (1) not to use any -information presented here for any purpose other than determining -ownership of domain names, (2) not to store or reproduce this data in -any way, (3) not to use any high-volume, automated, electronic processes -to obtain data from this service. Abuse of this service is monitored and -actions in contravention of these terms will result in being permanently -blacklisted. All data is (c) CentralNic Ltd https://www.centralnic.com/ - diff --git a/spec/fixtures/responses/whois.centralnic.com/no.com/status_available.expected b/spec/fixtures/responses/whois.centralnic.com/no.com/status_available.expected deleted file mode 100644 index 2c3fe7a8..00000000 --- a/spec/fixtures/responses/whois.centralnic.com/no.com/status_available.expected +++ /dev/null @@ -1,50 +0,0 @@ -#disclaimer - %s == nil - - -#domain - %s == nil - -#domain_id - %s == nil - - -#status - %s == [] - -#available? - %s == true - -#registered? - %s == false - - -#created_on - %s == nil - -#updated_on - %s == nil - -#expires_on - %s == nil - - -#registrar - %s == nil - -#registrant_contacts - %s %CLASS{array} - %s == [] - -#admin_contacts - %s %CLASS{array} - %s == [] - -#technical_contacts - %s %CLASS{array} - %s == [] - - -#nameservers - %s %CLASS{array} - %s == [] diff --git a/spec/fixtures/responses/whois.centralnic.com/no.com/status_available.txt b/spec/fixtures/responses/whois.centralnic.com/no.com/status_available.txt deleted file mode 100644 index 09cc0f7e..00000000 --- a/spec/fixtures/responses/whois.centralnic.com/no.com/status_available.txt +++ /dev/null @@ -1 +0,0 @@ -DOMAIN NOT FOUND diff --git a/spec/fixtures/responses/whois.centralnic.com/qc.com/status_available.expected b/spec/fixtures/responses/whois.centralnic.com/qc.com/status_available.expected deleted file mode 100644 index 2c3fe7a8..00000000 --- a/spec/fixtures/responses/whois.centralnic.com/qc.com/status_available.expected +++ /dev/null @@ -1,50 +0,0 @@ -#disclaimer - %s == nil - - -#domain - %s == nil - -#domain_id - %s == nil - - -#status - %s == [] - -#available? - %s == true - -#registered? - %s == false - - -#created_on - %s == nil - -#updated_on - %s == nil - -#expires_on - %s == nil - - -#registrar - %s == nil - -#registrant_contacts - %s %CLASS{array} - %s == [] - -#admin_contacts - %s %CLASS{array} - %s == [] - -#technical_contacts - %s %CLASS{array} - %s == [] - - -#nameservers - %s %CLASS{array} - %s == [] diff --git a/spec/fixtures/responses/whois.centralnic.com/qc.com/status_available.txt b/spec/fixtures/responses/whois.centralnic.com/qc.com/status_available.txt deleted file mode 100644 index 09cc0f7e..00000000 --- a/spec/fixtures/responses/whois.centralnic.com/qc.com/status_available.txt +++ /dev/null @@ -1 +0,0 @@ -DOMAIN NOT FOUND diff --git a/spec/fixtures/responses/whois.centralnic.com/qc.com/status_registered.expected b/spec/fixtures/responses/whois.centralnic.com/qc.com/status_registered.expected deleted file mode 100644 index 2e587987..00000000 --- a/spec/fixtures/responses/whois.centralnic.com/qc.com/status_registered.expected +++ /dev/null @@ -1,106 +0,0 @@ -#disclaimer - %s == "This whois service is provided by CentralNic Ltd and only contains information pertaining to Internet domain names we have registered for our customers. By using this service you are agreeing (1) not to use any information presented here for any purpose other than determining ownership of domain names, (2) not to store or reproduce this data in any way, (3) not to use any high-volume, automated, electronic processes to obtain data from this service. Abuse of this service is monitored and actions in contravention of these terms will result in being permanently blacklisted. All data is (c) CentralNic Ltd https://www.centralnic.com/" - - -#domain - %s == "ceo.qc.com" - -#domain_id - %s == "CNIC-DO327026" - - -#status - %s == ["ok"] - -#available? - %s == false - -#registered? - %s == true - - -#created_on - %s %CLASS{time} - %s %TIME{2004-10-08 02:12:49 UTC} - -#updated_on - %s %CLASS{time} - %s %TIME{2012-11-23 18:03:55 UTC} - -#expires_on - %s %CLASS{time} - %s %TIME{2014-10-08 23:59:59 UTC} - - -#registrar - %s %CLASS{registrar} - %s.id == "7065-EN" - %s.name == "eNom, Inc." - %s.url == "http://www.enom.com/" - -#registrant_contacts - %s %CLASS{array} - %s %SIZE{1} - %s[0] %CLASS{contact} - %s[0].type == Whois::Parser::Contact::TYPE_REGISTRANT - %s[0].id == "H1062277" - %s[0].name == "helene" - %s[0].organization == nil - %s[0].address == "309 Laurendeau, Magog Qc" - %s[0].city == nil - %s[0].zip == "J1X 3W4" - %s[0].state == nil - %s[0].country == nil - %s[0].country_code == "CA" - %s[0].phone == "+1.8198438380" - %s[0].fax == nil - %s[0].email == "docjgs@videotron.ca" - -#admin_contacts - %s %CLASS{array} - %s %SIZE{1} - %s[0] %CLASS{contact} - %s[0].type == Whois::Parser::Contact::TYPE_ADMINISTRATIVE - %s[0].id == "H114589" - %s[0].name == "helene viens" - %s[0].organization == nil - %s[0].address == "309 Laurendeau, Magog Qc" - %s[0].city == nil - %s[0].zip == "J1X 3W4" - %s[0].state == nil - %s[0].country == nil - %s[0].country_code == "CA" - %s[0].phone == "+1.8198438380" - %s[0].fax == nil - %s[0].email == "docjgs@videotron.ca" - -#technical_contacts - %s %CLASS{array} - %s %SIZE{1} - %s[0] %CLASS{contact} - %s[0].type == Whois::Parser::Contact::TYPE_TECHNICAL - %s[0].id == "H114590" - %s[0].name == "helene viens" - %s[0].organization == nil - %s[0].address == "309 Laurendeau, Magog Qc" - %s[0].city == nil - %s[0].zip == "J1X 3W4" - %s[0].state == nil - %s[0].country == nil - %s[0].country_code == "CA" - %s[0].phone == "+1.8198438380" - %s[0].fax == nil - %s[0].email == "docjgs@videotron.ca" - - -#nameservers - %s %CLASS{array} - %s %SIZE{2} - %s[0] %CLASS{nameserver} - %s[0].name == "ns12.zoneedit.com" - %s[0].ipv4 == nil - %s[0].ipv6 == nil - %s[1] %CLASS{nameserver} - %s[1].name == "t1.zoneedit.com" - %s[1].ipv4 == nil - %s[1].ipv6 == nil diff --git a/spec/fixtures/responses/whois.centralnic.com/qc.com/status_registered.txt b/spec/fixtures/responses/whois.centralnic.com/qc.com/status_registered.txt deleted file mode 100644 index e1806faa..00000000 --- a/spec/fixtures/responses/whois.centralnic.com/qc.com/status_registered.txt +++ /dev/null @@ -1,52 +0,0 @@ -Domain ID:CNIC-DO327026 -Domain Name:CEO.QC.COM -Created On:2004-10-08T02:12:49.0Z -Last Updated On:2012-11-23T18:03:55.0Z -Expiration Date:2014-10-08T23:59:59.0Z -Status:ok -Registrant ID:H1062277 -Registrant Name:helene -Registrant Street1:309 Laurendeau, Magog Qc -Registrant Postal Code:J1X 3W4 -Registrant Country:CA -Registrant Phone:+1.8198438380 -Registrant Email:docjgs@videotron.ca -Admin ID:H114589 -Admin Name:helene viens -Admin Street1:309 Laurendeau, Magog Qc -Admin Postal Code:J1X 3W4 -Admin Country:CA -Admin Phone:+1.8198438380 -Admin Email:docjgs@videotron.ca -Tech ID:H114590 -Tech Name:helene viens -Tech Street1:309 Laurendeau, Magog Qc -Tech Postal Code:J1X 3W4 -Tech Country:CA -Tech Phone:+1.8198438380 -Tech Email:docjgs@videotron.ca -Sponsoring Registrar ID:7065-EN -Sponsoring Registrar IANA ID:48 -Sponsoring Registrar Organization:eNom, Inc. -Sponsoring Registrar Street1:5808 Lake Washington Boulevard -Sponsoring Registrar City:Kirkland -Sponsoring Registrar State/Province:WA -Sponsoring Registrar Postal Code:98034 -Sponsoring Registrar Country:US -Sponsoring Registrar Phone:425-274-4500 -Sponsoring Registrar FAX:425-974-4796 -Sponsoring Registrar Website:http://www.enom.com/ -Name Server:NS12.ZONEEDIT.COM -Name Server:T1.ZONEEDIT.COM -DNSSEC:Unsigned - -This whois service is provided by CentralNic Ltd and only contains -information pertaining to Internet domain names we have registered for -our customers. By using this service you are agreeing (1) not to use any -information presented here for any purpose other than determining -ownership of domain names, (2) not to store or reproduce this data in -any way, (3) not to use any high-volume, automated, electronic processes -to obtain data from this service. Abuse of this service is monitored and -actions in contravention of these terms will result in being permanently -blacklisted. All data is (c) CentralNic Ltd https://www.centralnic.com/ - diff --git a/spec/fixtures/responses/whois.centralnic.com/ru.com/status_available.expected b/spec/fixtures/responses/whois.centralnic.com/ru.com/status_available.expected index 2c3fe7a8..64c3bae5 100644 --- a/spec/fixtures/responses/whois.centralnic.com/ru.com/status_available.expected +++ b/spec/fixtures/responses/whois.centralnic.com/ru.com/status_available.expected @@ -1,5 +1,5 @@ #disclaimer - %s == nil + %s == "The Whois and RDAP services are provided by CentralNic, and contain information pertaining to Internet domain names registered by our our customers. By using this service you are agreeing (1) not to use any information presented here for any purpose other than determining ownership of domain names, (2) not to store or reproduce this data in any way, (3) not to use any high-volume, automated, electronic processes to obtain data from this service. Abuse of this service is monitored and actions in contravention of these terms will result in being permanently blacklisted. All data is (c) CentralNic Ltd (https://www.centralnic.com) Access to the Whois and RDAP services is rate limited. For more information, visit https://registrar-console.centralnic.com/pub/whois_guidance." #domain @@ -10,7 +10,7 @@ #status - %s == [] + %s == :available #available? %s == true diff --git a/spec/fixtures/responses/whois.centralnic.com/ru.com/status_available.txt b/spec/fixtures/responses/whois.centralnic.com/ru.com/status_available.txt index 09cc0f7e..c89b6ee7 100644 --- a/spec/fixtures/responses/whois.centralnic.com/ru.com/status_available.txt +++ b/spec/fixtures/responses/whois.centralnic.com/ru.com/status_available.txt @@ -1 +1,21 @@ -DOMAIN NOT FOUND +The queried object does not exist: DOMAIN NOT FOUND + +>>> Last update of WHOIS database: 2021-12-15T16:58:37.0Z <<< + +For more information on Whois status codes, please visit https://icann.org/epp + +>>> IMPORTANT INFORMATION ABOUT THE DEPLOYMENT OF RDAP: please visit +https://www.centralnic.com/support/rdap <<< + +The Whois and RDAP services are provided by CentralNic, and contain +information pertaining to Internet domain names registered by our +our customers. By using this service you are agreeing (1) not to use any +information presented here for any purpose other than determining +ownership of domain names, (2) not to store or reproduce this data in +any way, (3) not to use any high-volume, automated, electronic processes +to obtain data from this service. Abuse of this service is monitored and +actions in contravention of these terms will result in being permanently +blacklisted. All data is (c) CentralNic Ltd (https://www.centralnic.com) + +Access to the Whois and RDAP services is rate limited. For more +information, visit https://registrar-console.centralnic.com/pub/whois_guidance. diff --git a/spec/fixtures/responses/whois.centralnic.com/ru.com/status_registered.expected b/spec/fixtures/responses/whois.centralnic.com/ru.com/status_registered.expected index bebda246..20e91679 100644 --- a/spec/fixtures/responses/whois.centralnic.com/ru.com/status_registered.expected +++ b/spec/fixtures/responses/whois.centralnic.com/ru.com/status_registered.expected @@ -1,16 +1,15 @@ #disclaimer - %s == "This whois service is provided by CentralNic Ltd and only contains information pertaining to Internet domain names we have registered for our customers. By using this service you are agreeing (1) not to use any information presented here for any purpose other than determining ownership of domain names, (2) not to store or reproduce this data in any way, (3) not to use any high-volume, automated, electronic processes to obtain data from this service. Abuse of this service is monitored and actions in contravention of these terms will result in being permanently blacklisted. All data is (c) CentralNic Ltd https://www.centralnic.com/" - + %s == "The Whois and RDAP services are provided by CentralNic, and contain information pertaining to Internet domain names registered by our our customers. By using this service you are agreeing (1) not to use any information presented here for any purpose other than determining ownership of domain names, (2) not to store or reproduce this data in any way, (3) not to use any high-volume, automated, electronic processes to obtain data from this service. Abuse of this service is monitored and actions in contravention of these terms will result in being permanently blacklisted. All data is (c) CentralNic Ltd (https://www.centralnic.com) Access to the Whois and RDAP services is rate limited. For more information, visit https://registrar-console.centralnic.com/pub/whois_guidance." #domain %s == "srk.ru.com" #domain_id - %s == "CNIC-DO450826" + %s == "D450826-CNIC" #status - %s == ["ok"] + %s == :registered #available? %s == false @@ -25,69 +24,39 @@ #updated_on %s %CLASS{time} - %s %TIME{2012-07-10 08:16:19 UTC} + %s %TIME{2021-04-19 15:40:48 UTC} #expires_on %s %CLASS{time} - %s %TIME{2014-07-31 23:59:59 UTC} + %s %TIME{2025-07-31 23:59:59 UTC} #registrar - %s == nil + %s %CLASS{registrar} + %s.id == "1376" + %s.name == "Instra Corporation Pty Ltd" + %s.url == "https://instra.com/" #registrant_contacts %s %CLASS{array} %s %SIZE{1} %s[0] %CLASS{contact} %s[0].type == Whois::Parser::Contact::TYPE_REGISTRANT - %s[0].id == "H1037013" - %s[0].name == "Anthony Lloyd, SRK Consulting (UK) Limited" - %s[0].organization == nil - %s[0].address == "5th Floor\nChurchill House\n17 Churchill Way" - %s[0].city == "Cardiff" - %s[0].zip == "CF10 2HH" - %s[0].state == nil - %s[0].country == nil - %s[0].country_code == "GB" - %s[0].phone == "+44.2920348150" - %s[0].fax == nil - %s[0].email == "alloyd@srk.co.uk" + %s[0].email == "https://whois.centralnic.com/contact/srk.ru.com/registrant" #admin_contacts %s %CLASS{array} %s %SIZE{1} %s[0] %CLASS{contact} %s[0].type == Whois::Parser::Contact::TYPE_ADMINISTRATIVE - %s[0].id == "H265405" - %s[0].name == "Anthony Lloyd" - %s[0].organization == "SRK Consulting (UK) Limited" - %s[0].address == "5th Floor\nChurchill House\n17 Churchill Way" - %s[0].city == "Cardiff" - %s[0].zip == "CF10 2HH" - %s[0].state == nil - %s[0].country == nil - %s[0].country_code == "GB" - %s[0].phone == "+44.2920348150" - %s[0].fax == nil - %s[0].email == "alloyd@srk.co.uk" + %s[0].email == "https://whois.centralnic.com/contact/srk.ru.com/admin" #technical_contacts %s %CLASS{array} %s %SIZE{1} %s[0] %CLASS{contact} %s[0].type == Whois::Parser::Contact::TYPE_TECHNICAL - %s[0].id == "H265405" - %s[0].name == "Anthony Lloyd" - %s[0].organization == "SRK Consulting (UK) Limited" - %s[0].address == "5th Floor\nChurchill House\n17 Churchill Way" - %s[0].city == "Cardiff" - %s[0].zip == "CF10 2HH" - %s[0].state == nil - %s[0].country == nil - %s[0].country_code == "GB" - %s[0].phone == "+44.2920348150" - %s[0].fax == nil - %s[0].email == "alloyd@srk.co.uk" + %s[0].email == "https://whois.centralnic.com/contact/srk.ru.com/tech" #nameservers @@ -96,4 +65,4 @@ %s[0] %CLASS{nameserver} %s[0].name == "ns7.zoneedit.com" %s[1] %CLASS{nameserver} - %s[1].name == "ns12.zoneedit.com" + %s[1].name == "ns11.zoneedit.com" diff --git a/spec/fixtures/responses/whois.centralnic.com/ru.com/status_registered.txt b/spec/fixtures/responses/whois.centralnic.com/ru.com/status_registered.txt index 71a4491a..945360e2 100644 --- a/spec/fixtures/responses/whois.centralnic.com/ru.com/status_registered.txt +++ b/spec/fixtures/responses/whois.centralnic.com/ru.com/status_registered.txt @@ -1,62 +1,39 @@ -Domain ID:CNIC-DO450826 -Domain Name:SRK.RU.COM -Created On:2006-07-31T10:06:04.0Z -Last Updated On:2012-07-10T08:16:19.0Z -Expiration Date:2014-07-31T23:59:59.0Z -Status:ok -Registrant ID:H1037013 -Registrant Name:Anthony Lloyd, SRK Consulting (UK) Limited -Registrant Street1:5th Floor -Registrant Street2:Churchill House -Registrant Street3:17 Churchill Way -Registrant City:Cardiff -Registrant Postal Code:CF10 2HH -Registrant Country:GB -Registrant Phone:+44.2920348150 -Registrant Email:alloyd@srk.co.uk -Admin ID:H265405 -Admin Name:Anthony Lloyd -Admin Organization:SRK Consulting (UK) Limited -Admin Street1:5th Floor -Admin Street2:Churchill House -Admin Street3:17 Churchill Way -Admin City:Cardiff -Admin Postal Code:CF10 2HH -Admin Country:GB -Admin Phone:+44.2920348150 -Admin Email:alloyd@srk.co.uk -Tech ID:H265405 -Tech Name:Anthony Lloyd -Tech Organization:SRK Consulting (UK) Limited -Tech Street1:5th Floor -Tech Street2:Churchill House -Tech Street3:17 Churchill Way -Tech City:Cardiff -Tech Postal Code:CF10 2HH -Tech Country:GB -Tech Phone:+44.2920348150 -Tech Email:alloyd@srk.co.uk -Billing ID:H265406 -Billing Name:A R Lloyd -Billing Organization:SRK Consulting (UK) Limited -Billing Street1:Windsor Court -Billing Street2:1-3 Windsor Place -Billing Street3:Cardiff -Billing Postal Code:CF10 3BX -Billing Country:GB -Billing Phone:+44.2920348150 -Billing Email:alloyd@srk.co.uk -Name Server:NS7.ZONEEDIT.COM -Name Server:NS12.ZONEEDIT.COM -DNSSEC:Unsigned +Domain Name: SRK.RU.COM +Registry Domain ID: D450826-CNIC +Registrar WHOIS Server: whois.instra.net +Registrar URL: https://instra.com/ +Updated Date: 2021-04-19T15:40:48.0Z +Creation Date: 2006-07-31T10:06:04.0Z +Registry Expiry Date: 2025-07-31T23:59:59.0Z +Registrar: Instra Corporation Pty Ltd +Registrar IANA ID: 1376 +Domain Status: ok https://icann.org/epp#ok +Registrant Email: https://whois.centralnic.com/contact/srk.ru.com/registrant +Admin Email: https://whois.centralnic.com/contact/srk.ru.com/admin +Tech Email: https://whois.centralnic.com/contact/srk.ru.com/tech +Name Server: NS7.ZONEEDIT.COM +Name Server: NS11.ZONEEDIT.COM +DNSSEC: unsigned +Billing Email: https://whois.centralnic.com/contact/srk.ru.com/billing +Registrar Abuse Contact Email: compliance@instra.com +Registrar Abuse Contact Phone: +61.397831800 +URL of the ICANN Whois Inaccuracy Complaint Form: https://www.icann.org/wicf/ +>>> Last update of WHOIS database: 2021-12-15T16:58:26.0Z <<< -This whois service is provided by CentralNic Ltd and only contains -information pertaining to Internet domain names we have registered for -our customers. By using this service you are agreeing (1) not to use any -information presented here for any purpose other than determining -ownership of domain names, (2) not to store or reproduce this data in -any way, (3) not to use any high-volume, automated, electronic processes -to obtain data from this service. Abuse of this service is monitored and -actions in contravention of these terms will result in being permanently -blacklisted. All data is (c) CentralNic Ltd https://www.centralnic.com/ +For more information on Whois status codes, please visit https://icann.org/epp +>>> IMPORTANT INFORMATION ABOUT THE DEPLOYMENT OF RDAP: please visit +https://www.centralnic.com/support/rdap <<< + +The Whois and RDAP services are provided by CentralNic, and contain +information pertaining to Internet domain names registered by our +our customers. By using this service you are agreeing (1) not to use any +information presented here for any purpose other than determining +ownership of domain names, (2) not to store or reproduce this data in +any way, (3) not to use any high-volume, automated, electronic processes +to obtain data from this service. Abuse of this service is monitored and +actions in contravention of these terms will result in being permanently +blacklisted. All data is (c) CentralNic Ltd (https://www.centralnic.com) + +Access to the Whois and RDAP services is rate limited. For more +information, visit https://registrar-console.centralnic.com/pub/whois_guidance. diff --git a/spec/fixtures/responses/whois.centralnic.com/sa.com/status_available.expected b/spec/fixtures/responses/whois.centralnic.com/sa.com/status_available.expected deleted file mode 100644 index 2c3fe7a8..00000000 --- a/spec/fixtures/responses/whois.centralnic.com/sa.com/status_available.expected +++ /dev/null @@ -1,50 +0,0 @@ -#disclaimer - %s == nil - - -#domain - %s == nil - -#domain_id - %s == nil - - -#status - %s == [] - -#available? - %s == true - -#registered? - %s == false - - -#created_on - %s == nil - -#updated_on - %s == nil - -#expires_on - %s == nil - - -#registrar - %s == nil - -#registrant_contacts - %s %CLASS{array} - %s == [] - -#admin_contacts - %s %CLASS{array} - %s == [] - -#technical_contacts - %s %CLASS{array} - %s == [] - - -#nameservers - %s %CLASS{array} - %s == [] diff --git a/spec/fixtures/responses/whois.centralnic.com/sa.com/status_available.txt b/spec/fixtures/responses/whois.centralnic.com/sa.com/status_available.txt deleted file mode 100644 index 09cc0f7e..00000000 --- a/spec/fixtures/responses/whois.centralnic.com/sa.com/status_available.txt +++ /dev/null @@ -1 +0,0 @@ -DOMAIN NOT FOUND diff --git a/spec/fixtures/responses/whois.centralnic.com/sa.com/status_registered.expected b/spec/fixtures/responses/whois.centralnic.com/sa.com/status_registered.expected deleted file mode 100644 index e23ef910..00000000 --- a/spec/fixtures/responses/whois.centralnic.com/sa.com/status_registered.expected +++ /dev/null @@ -1,102 +0,0 @@ -#disclaimer - %s == "This whois service is provided by CentralNic Ltd and only contains information pertaining to Internet domain names we have registered for our customers. By using this service you are agreeing (1) not to use any information presented here for any purpose other than determining ownership of domain names, (2) not to store or reproduce this data in any way, (3) not to use any high-volume, automated, electronic processes to obtain data from this service. Abuse of this service is monitored and actions in contravention of these terms will result in being permanently blacklisted. All data is (c) CentralNic Ltd https://www.centralnic.com/" - - -#domain - %s == "fynbos.sa.com" - -#domain_id - %s == "CNIC-DO501005" - - -#status - %s == ["ok"] - -#available? - %s == false - -#registered? - %s == true - - -#created_on - %s %CLASS{time} - %s %TIME{2007-09-27 18:14:53 UTC} - -#updated_on - %s %CLASS{time} - %s %TIME{2013-11-02 13:42:11 UTC} - -#expires_on - %s %CLASS{time} - %s %TIME{2014-09-27 23:59:59 UTC} - - -#registrar - %s %CLASS{registrar} - %s.id == "C30342" - %s.name == "Paragon Internet Group" - %s.url == "http://www.paragon.net.uk" - -#registrant_contacts - %s %CLASS{array} - %s %SIZE{1} - %s[0] %CLASS{contact} - %s[0].type == Whois::Parser::Contact::TYPE_REGISTRANT - %s[0].id == "H323273" - %s[0].name == "Maarten Groos" - %s[0].organization == nil - %s[0].address == "farm 215 fynbos reserve\nPO Box 1314" - %s[0].city == "Gansbaai" - %s[0].zip == "7220" - %s[0].state == "Western Cape" - %s[0].country == nil - %s[0].country_code == "ZA" - %s[0].phone == "+27.283880920" - %s[0].fax == nil - %s[0].email == "maarten@farm215.co.za" - -#admin_contacts - %s %CLASS{array} - %s %SIZE{1} - %s[0] %CLASS{contact} - %s[0].type == Whois::Parser::Contact::TYPE_ADMINISTRATIVE - %s[0].id == "H323273" - %s[0].name == "Maarten Groos" - %s[0].organization == nil - %s[0].address == "farm 215 fynbos reserve\nPO Box 1314" - %s[0].city == "Gansbaai" - %s[0].zip == "7220" - %s[0].state == "Western Cape" - %s[0].country == nil - %s[0].country_code == "ZA" - %s[0].phone == "+27.283880920" - %s[0].fax == nil - %s[0].email == "maarten@farm215.co.za" - -#technical_contacts - %s %CLASS{array} - %s %SIZE{1} - %s[0] %CLASS{contact} - %s[0].type == Whois::Parser::Contact::TYPE_TECHNICAL - %s[0].id == "C30342" - %s[0].name == "Seb de Lemos" - %s[0].organization == "Paragon Internet Group" - %s[0].address == "St Andrew's House\nSt Mary's Walk" - %s[0].city == "Maidenhead" - %s[0].zip == "SL6 1QZ" - %s[0].state == "Berkshire" - %s[0].country == nil - %s[0].country_code == "GB" - %s[0].phone == "+44.2031377651" - %s[0].fax == nil - %s[0].email == "domains@paragon.net.uk" - - -#nameservers - %s %CLASS{array} - %s %SIZE{2} - %s[0] %CLASS{nameserver} - %s[0].name == "ns1191.websitewelcome.com" - %s[1] %CLASS{nameserver} - %s[1].name == "ns1192.websitewelcome.com" diff --git a/spec/fixtures/responses/whois.centralnic.com/sa.com/status_registered.txt b/spec/fixtures/responses/whois.centralnic.com/sa.com/status_registered.txt deleted file mode 100644 index 296b6af3..00000000 --- a/spec/fixtures/responses/whois.centralnic.com/sa.com/status_registered.txt +++ /dev/null @@ -1,61 +0,0 @@ -Domain ID:CNIC-DO501005 -Domain Name:FYNBOS.SA.COM -Created On:2007-09-27T18:14:53.0Z -Last Updated On:2013-11-02T13:42:11.0Z -Expiration Date:2014-09-27T23:59:59.0Z -Status:ok -Registrant ID:H323273 -Registrant Name:Maarten Groos -Registrant Street1:farm 215 fynbos reserve -Registrant Street2:PO Box 1314 -Registrant City:Gansbaai -Registrant State/Province:Western Cape -Registrant Postal Code:7220 -Registrant Country:ZA -Registrant Phone:+27.283880920 -Registrant Email:maarten@farm215.co.za -Admin ID:H323273 -Admin Name:Maarten Groos -Admin Street1:farm 215 fynbos reserve -Admin Street2:PO Box 1314 -Admin City:Gansbaai -Admin State/Province:Western Cape -Admin Postal Code:7220 -Admin Country:ZA -Admin Phone:+27.283880920 -Admin Email:maarten@farm215.co.za -Tech ID:C30342 -Tech Name:Seb de Lemos -Tech Organization:Paragon Internet Group -Tech Street1:St Andrew's House -Tech Street2:St Mary's Walk -Tech City:Maidenhead -Tech State/Province:Berkshire -Tech Postal Code:SL6 1QZ -Tech Country:GB -Tech Phone:+44.2031377651 -Tech Email:domains@paragon.net.uk -Sponsoring Registrar ID:C30342 -Sponsoring Registrar Organization:Paragon Internet Group -Sponsoring Registrar Street1:St Andrew's House -Sponsoring Registrar Street2:St Mary's Walk -Sponsoring Registrar City:Maidenhead -Sponsoring Registrar State/Province:Berkshire -Sponsoring Registrar Postal Code:SL6 1QZ -Sponsoring Registrar Country:GB -Sponsoring Registrar Phone:020 3137 7651 -Sponsoring Registrar Website:http://www.paragon.net.uk -Name Server:NS1191.WEBSITEWELCOME.COM -Name Server:NS1192.WEBSITEWELCOME.COM -DNSSEC:Unsigned - -This whois service is provided by CentralNic Ltd and only contains -information pertaining to Internet domain names we have registered for -our customers. By using this service you are agreeing (1) not to use any -information presented here for any purpose other than determining -ownership of domain names, (2) not to store or reproduce this data in -any way, (3) not to use any high-volume, automated, electronic processes -to obtain data from this service. Abuse of this service is monitored and -actions in contravention of these terms will result in being permanently -blacklisted. All data is (c) CentralNic Ltd https://www.centralnic.com/ - diff --git a/spec/fixtures/responses/whois.centralnic.com/se.com/status_available.expected b/spec/fixtures/responses/whois.centralnic.com/se.com/status_available.expected deleted file mode 100644 index 2c3fe7a8..00000000 --- a/spec/fixtures/responses/whois.centralnic.com/se.com/status_available.expected +++ /dev/null @@ -1,50 +0,0 @@ -#disclaimer - %s == nil - - -#domain - %s == nil - -#domain_id - %s == nil - - -#status - %s == [] - -#available? - %s == true - -#registered? - %s == false - - -#created_on - %s == nil - -#updated_on - %s == nil - -#expires_on - %s == nil - - -#registrar - %s == nil - -#registrant_contacts - %s %CLASS{array} - %s == [] - -#admin_contacts - %s %CLASS{array} - %s == [] - -#technical_contacts - %s %CLASS{array} - %s == [] - - -#nameservers - %s %CLASS{array} - %s == [] diff --git a/spec/fixtures/responses/whois.centralnic.com/se.com/status_available.txt b/spec/fixtures/responses/whois.centralnic.com/se.com/status_available.txt deleted file mode 100644 index 09cc0f7e..00000000 --- a/spec/fixtures/responses/whois.centralnic.com/se.com/status_available.txt +++ /dev/null @@ -1 +0,0 @@ -DOMAIN NOT FOUND diff --git a/spec/fixtures/responses/whois.centralnic.com/se.com/status_registered.expected b/spec/fixtures/responses/whois.centralnic.com/se.com/status_registered.expected deleted file mode 100644 index a87d0bf8..00000000 --- a/spec/fixtures/responses/whois.centralnic.com/se.com/status_registered.expected +++ /dev/null @@ -1,110 +0,0 @@ -#disclaimer - %s == "This whois service is provided by CentralNic Ltd and only contains information pertaining to Internet domain names we have registered for our customers. By using this service you are agreeing (1) not to use any information presented here for any purpose other than determining ownership of domain names, (2) not to store or reproduce this data in any way, (3) not to use any high-volume, automated, electronic processes to obtain data from this service. Abuse of this service is monitored and actions in contravention of these terms will result in being permanently blacklisted. All data is (c) CentralNic Ltd https://www.centralnic.com/" - - -#domain - %s == "hotel.se.com" - -#domain_id - %s == "CNIC-DO561053" - - -#status - %s == ["ok"] - -#available? - %s == false - -#registered? - %s == true - - -#created_on - %s %CLASS{time} - %s %TIME{2008-05-10 05:17:32 UTC} - -#updated_on - %s %CLASS{time} - %s %TIME{2013-06-03 10:33:46 UTC} - -#expires_on - %s %CLASS{time} - %s %TIME{2014-05-10 23:59:59 UTC} - - -#registrar - %s %CLASS{registrar} - %s.id == "7145-IX" - %s.name == "InternetX GmbH" - %s.url == "http://www.internetx.de/" - -#registrant_contacts - %s %CLASS{array} - %s %SIZE{1} - %s[0] %CLASS{contact} - %s[0].type == Whois::Parser::Contact::TYPE_REGISTRANT - %s[0].id == "INX-10599082com" - %s[0].name == "Hotel Reservation Service Robert Ragge GmbH" - %s[0].organization == "Hotel Reservation Service Robert Ragge GmbH" - %s[0].address == "Blaubach 32" - %s[0].city == "Koeln" - %s[0].zip == "50676" - %s[0].state == "NRW" - %s[0].country == nil - %s[0].country_code == "DE" - %s[0].phone == "+49.2212077222" - %s[0].fax == "+49.2212077394" - %s[0].email == "domains@hrs.de" - -#admin_contacts - %s %CLASS{array} - %s %SIZE{1} - %s[0] %CLASS{contact} - %s[0].type == Whois::Parser::Contact::TYPE_ADMINISTRATIVE - %s[0].id == "INX-201727com" - %s[0].name == "Robert Ragge" - %s[0].organization == "Hotel Reservation Service Robert Ragge GmbH" - %s[0].address == "Blaubach 32" - %s[0].city == "Koeln" - %s[0].zip == "50676" - %s[0].state == "DE" - %s[0].country == nil - %s[0].country_code == "DE" - %s[0].phone == "+49.2212077222" - %s[0].fax == "+49.2212077394" - %s[0].email == "domains@hrs.de" - -#technical_contacts - %s %CLASS{array} - %s %SIZE{1} - %s[0] %CLASS{contact} - %s[0].type == Whois::Parser::Contact::TYPE_TECHNICAL - %s[0].id == "INX-201728com" - %s[0].name == "Uwe Watzek" - %s[0].organization == "Wind Internethaus GmbH" - %s[0].address == "Am Krebsgraben 15\nHaus 2" - %s[0].city == "Villingen-Schwenningen" - %s[0].zip == "78048" - %s[0].state == "Baden-Wuerttemberg" - %s[0].country == nil - %s[0].country_code == "DE" - %s[0].phone == "+49.77214070740" - %s[0].fax == "+49.77214070741" - %s[0].email == "info@windinternethaus.de" - - -#nameservers - %s %CLASS{array} - %s %SIZE{3} - %s[0] %CLASS{nameserver} - %s[0].name == "ns1.hrs.de" - %s[0].ipv4 == nil - %s[0].ipv6 == nil - %s[1] %CLASS{nameserver} - %s[1].name == "ns2.hrs.de" - %s[1].ipv4 == nil - %s[1].ipv6 == nil - %s[2] %CLASS{nameserver} - %s[2].name == "ns2.surfbrett.de" - %s[2].ipv4 == nil - %s[2].ipv6 == nil diff --git a/spec/fixtures/responses/whois.centralnic.com/se.com/status_registered.txt b/spec/fixtures/responses/whois.centralnic.com/se.com/status_registered.txt deleted file mode 100644 index 3fb163bb..00000000 --- a/spec/fixtures/responses/whois.centralnic.com/se.com/status_registered.txt +++ /dev/null @@ -1,75 +0,0 @@ -Domain ID:CNIC-DO561053 -Domain Name:HOTEL.SE.COM -Created On:2008-05-10T05:17:32.0Z -Last Updated On:2013-06-03T10:33:46.0Z -Expiration Date:2014-05-10T23:59:59.0Z -Status:ok -Registrant ID:INX-10599082com -Registrant Name:Hotel Reservation Service Robert Ragge GmbH -Registrant Organization:Hotel Reservation Service Robert Ragge GmbH -Registrant Street1:Blaubach 32 -Registrant City:Koeln -Registrant State/Province:NRW -Registrant Postal Code:50676 -Registrant Country:DE -Registrant Phone:+49.2212077222 -Registrant FAX:+49.2212077394 -Registrant Email:domains@hrs.de -Admin ID:INX-201727com -Admin Name:Robert Ragge -Admin Organization:Hotel Reservation Service Robert Ragge GmbH -Admin Street1:Blaubach 32 -Admin City:Koeln -Admin State/Province:DE -Admin Postal Code:50676 -Admin Country:DE -Admin Phone:+49.2212077222 -Admin FAX:+49.2212077394 -Admin Email:domains@hrs.de -Tech ID:INX-201728com -Tech Name:Uwe Watzek -Tech Organization:Wind Internethaus GmbH -Tech Street1:Am Krebsgraben 15 -Tech Street2:Haus 2 -Tech City:Villingen-Schwenningen -Tech State/Province:Baden-Wuerttemberg -Tech Postal Code:78048 -Tech Country:DE -Tech Phone:+49.77214070740 -Tech FAX:+49.77214070741 -Tech Email:info@windinternethaus.de -Billing ID:INX-10599082com -Billing Name:Hotel Reservation Service Robert Ragge GmbH -Billing Organization:Hotel Reservation Service Robert Ragge GmbH -Billing Street1:Blaubach 32 -Billing City:Koeln -Billing State/Province:NRW -Billing Postal Code:50676 -Billing Country:DE -Billing Phone:+49.2212077222 -Billing FAX:+49.2212077394 -Billing Email:domains@hrs.de -Sponsoring Registrar ID:7145-IX -Sponsoring Registrar Organization:InternetX GmbH -Sponsoring Registrar Street1:Maximilianstr. 6 -Sponsoring Registrar City:Regensburg -Sponsoring Registrar Postal Code:93047 -Sponsoring Registrar Country:DE -Sponsoring Registrar Phone:+49-941-595590 -Sponsoring Registrar FAX:+49-941-59579054 -Sponsoring Registrar Website:http://www.internetx.de/ -Name Server:NS1.HRS.DE -Name Server:NS2.HRS.DE -Name Server:NS2.SURFBRETT.DE -DNSSEC:Unsigned - -This whois service is provided by CentralNic Ltd and only contains -information pertaining to Internet domain names we have registered for -our customers. By using this service you are agreeing (1) not to use any -information presented here for any purpose other than determining -ownership of domain names, (2) not to store or reproduce this data in -any way, (3) not to use any high-volume, automated, electronic processes -to obtain data from this service. Abuse of this service is monitored and -actions in contravention of these terms will result in being permanently -blacklisted. All data is (c) CentralNic Ltd https://www.centralnic.com/ - diff --git a/spec/fixtures/responses/whois.centralnic.com/se.net/status_available.expected b/spec/fixtures/responses/whois.centralnic.com/se.net/status_available.expected deleted file mode 100644 index 2c3fe7a8..00000000 --- a/spec/fixtures/responses/whois.centralnic.com/se.net/status_available.expected +++ /dev/null @@ -1,50 +0,0 @@ -#disclaimer - %s == nil - - -#domain - %s == nil - -#domain_id - %s == nil - - -#status - %s == [] - -#available? - %s == true - -#registered? - %s == false - - -#created_on - %s == nil - -#updated_on - %s == nil - -#expires_on - %s == nil - - -#registrar - %s == nil - -#registrant_contacts - %s %CLASS{array} - %s == [] - -#admin_contacts - %s %CLASS{array} - %s == [] - -#technical_contacts - %s %CLASS{array} - %s == [] - - -#nameservers - %s %CLASS{array} - %s == [] diff --git a/spec/fixtures/responses/whois.centralnic.com/se.net/status_available.txt b/spec/fixtures/responses/whois.centralnic.com/se.net/status_available.txt deleted file mode 100644 index 09cc0f7e..00000000 --- a/spec/fixtures/responses/whois.centralnic.com/se.net/status_available.txt +++ /dev/null @@ -1 +0,0 @@ -DOMAIN NOT FOUND diff --git a/spec/fixtures/responses/whois.centralnic.com/se.net/status_registered.expected b/spec/fixtures/responses/whois.centralnic.com/se.net/status_registered.expected deleted file mode 100644 index dda1e6ba..00000000 --- a/spec/fixtures/responses/whois.centralnic.com/se.net/status_registered.expected +++ /dev/null @@ -1,112 +0,0 @@ -#disclaimer - %s == "This whois service is provided by CentralNic Ltd and only contains information pertaining to Internet domain names we have registered for our customers. By using this service you are agreeing (1) not to use any information presented here for any purpose other than determining ownership of domain names, (2) not to store or reproduce this data in any way, (3) not to use any high-volume, automated, electronic processes to obtain data from this service. Abuse of this service is monitored and actions in contravention of these terms will result in being permanently blacklisted. All data is (c) CentralNic Ltd https://www.centralnic.com/" - - -#domain - %s == "hotel.se.net" - -#domain_id - %s == "CNIC-DO1617446" - - -#status - %s == ["ok"] - -#available? - %s == false - -#registered? - %s == true - - -#created_on - %s %CLASS{time} - %s %TIME{2013-11-13 10:35:03 UTC} - -#updated_on - %s %CLASS{time} - %s %TIME{2013-11-28 11:49:39 UTC} - -#expires_on - %s %CLASS{time} - %s %TIME{2014-11-13 23:59:59 UTC} - - -#registrar - %s %CLASS{registrar} - %s.id == "H2307235" - %s.name == "Soluciones Corporativas IP, S.L.U." - %s.url == "www.scip.es" - -#registrant_contacts - %s %CLASS{array} - %s %SIZE{1} - %s[0] %CLASS{contact} - %s[0].type == Whois::Parser::Contact::TYPE_REGISTRANT - %s[0].id == "scipr000323588" - %s[0].name == "Christoph Donath" - %s[0].organization == "Christoph Donath" - %s[0].address == "C. Tijarafe 24, 2c" - %s[0].city == "Cruce de Arinaga" - %s[0].zip == "35118" - %s[0].state == "Palmas (Las)" - %s[0].country == nil - %s[0].country_code == "ES" - %s[0].phone == "+34.667889082" - %s[0].fax == nil - %s[0].email == "info@christophdonath.com" - %s[0].created_on == nil - %s[0].updated_on == nil - -#admin_contacts - %s %CLASS{array} - %s %SIZE{1} - %s[0] %CLASS{contact} - %s[0].type == Whois::Parser::Contact::TYPE_ADMINISTRATIVE - %s[0].id == "scipa000323588" - %s[0].name == "Christoph Donath" - %s[0].organization == "Christoph Donath" - %s[0].address == "C. Tijarafe 24, 2c" - %s[0].city == "Cruce de Arinaga" - %s[0].zip == "35118" - %s[0].state == "Palmas (Las)" - %s[0].country == nil - %s[0].country_code == "ES" - %s[0].phone == "+34.667889082" - %s[0].fax == nil - %s[0].email == "info@christophdonath.com" - %s[0].created_on == nil - %s[0].updated_on == nil - -#technical_contacts - %s %CLASS{array} - %s %SIZE{1} - %s[0] %CLASS{contact} - %s[0].type == Whois::Parser::Contact::TYPE_TECHNICAL - %s[0].id == "scipt000323588" - %s[0].name == "Christoph Donath" - %s[0].organization == "Christoph Donath" - %s[0].address == "C. Tijarafe 24, 2c" - %s[0].city == "Cruce de Arinaga" - %s[0].zip == "35118" - %s[0].state == "Palmas (Las)" - %s[0].country == nil - %s[0].country_code == "ES" - %s[0].phone == "+34.667889082" - %s[0].fax == nil - %s[0].email == "info@christophdonath.com" - %s[0].created_on == nil - %s[0].updated_on == nil - - -#nameservers - %s %CLASS{array} - %s %SIZE{2} - %s[0] %CLASS{nameserver} - %s[0].name == "ns8261.hostgator.com" - %s[0].ipv4 == nil - %s[0].ipv6 == nil - %s[1] %CLASS{nameserver} - %s[1].name == "ns8262.hostgator.com" - %s[1].ipv4 == nil - %s[1].ipv6 == nil diff --git a/spec/fixtures/responses/whois.centralnic.com/se.net/status_registered.txt b/spec/fixtures/responses/whois.centralnic.com/se.net/status_registered.txt deleted file mode 100644 index d21f8dea..00000000 --- a/spec/fixtures/responses/whois.centralnic.com/se.net/status_registered.txt +++ /dev/null @@ -1,71 +0,0 @@ -Domain ID:CNIC-DO1617446 -Domain Name:HOTEL.SE.NET -Created On:2013-11-13T10:35:03.0Z -Last Updated On:2013-11-28T11:49:39.0Z -Expiration Date:2014-11-13T23:59:59.0Z -Status:ok -Registrant ID:scipr000323588 -Registrant Name:Christoph Donath -Registrant Organization:Christoph Donath -Registrant Street1:C. Tijarafe 24, 2c -Registrant City:Cruce de Arinaga -Registrant State/Province:Palmas (Las) -Registrant Postal Code:35118 -Registrant Country:ES -Registrant Phone:+34.667889082 -Registrant Email:info@christophdonath.com -Admin ID:scipa000323588 -Admin Name:Christoph Donath -Admin Organization:Christoph Donath -Admin Street1:C. Tijarafe 24, 2c -Admin City:Cruce de Arinaga -Admin State/Province:Palmas (Las) -Admin Postal Code:35118 -Admin Country:ES -Admin Phone:+34.667889082 -Admin Email:info@christophdonath.com -Tech ID:scipt000323588 -Tech Name:Christoph Donath -Tech Organization:Christoph Donath -Tech Street1:C. Tijarafe 24, 2c -Tech City:Cruce de Arinaga -Tech State/Province:Palmas (Las) -Tech Postal Code:35118 -Tech Country:ES -Tech Phone:+34.667889082 -Tech Email:info@christophdonath.com -Billing ID:scipb000323588 -Billing Name:Christoph Donath -Billing Organization:Christoph Donath -Billing Street1:C. Tijarafe 24, 2c -Billing City:Cruce de Arinaga -Billing State/Province:Palmas (Las) -Billing Postal Code:35118 -Billing Country:ES -Billing Phone:+34.667889082 -Billing Email:info@christophdonath.com -Sponsoring Registrar ID:H2307235 -Sponsoring Registrar IANA ID:1383 -Sponsoring Registrar Organization:Soluciones Corporativas IP, S.L.U. -Sponsoring Registrar Street1:C/ Ses Parres esq. Brunete, 21 1º -Sponsoring Registrar City:Manacor -Sponsoring Registrar State/Province:Illes Balears -Sponsoring Registrar Postal Code:07500 -Sponsoring Registrar Country:ES -Sponsoring Registrar Phone:+34.871986600 -Sponsoring Registrar FAX:+34.871986601 -Sponsoring Registrar Website:www.scip.es -Name Server:NS8261.HOSTGATOR.COM -Name Server:NS8262.HOSTGATOR.COM -DNSSEC:Unsigned - -This whois service is provided by CentralNic Ltd and only contains -information pertaining to Internet domain names we have registered for -our customers. By using this service you are agreeing (1) not to use any -information presented here for any purpose other than determining -ownership of domain names, (2) not to store or reproduce this data in -any way, (3) not to use any high-volume, automated, electronic processes -to obtain data from this service. Abuse of this service is monitored and -actions in contravention of these terms will result in being permanently -blacklisted. All data is (c) CentralNic Ltd https://www.centralnic.com/ - diff --git a/spec/fixtures/responses/whois.centralnic.com/uk.com/status_available.expected b/spec/fixtures/responses/whois.centralnic.com/uk.com/status_available.expected index 2c3fe7a8..64c3bae5 100644 --- a/spec/fixtures/responses/whois.centralnic.com/uk.com/status_available.expected +++ b/spec/fixtures/responses/whois.centralnic.com/uk.com/status_available.expected @@ -1,5 +1,5 @@ #disclaimer - %s == nil + %s == "The Whois and RDAP services are provided by CentralNic, and contain information pertaining to Internet domain names registered by our our customers. By using this service you are agreeing (1) not to use any information presented here for any purpose other than determining ownership of domain names, (2) not to store or reproduce this data in any way, (3) not to use any high-volume, automated, electronic processes to obtain data from this service. Abuse of this service is monitored and actions in contravention of these terms will result in being permanently blacklisted. All data is (c) CentralNic Ltd (https://www.centralnic.com) Access to the Whois and RDAP services is rate limited. For more information, visit https://registrar-console.centralnic.com/pub/whois_guidance." #domain @@ -10,7 +10,7 @@ #status - %s == [] + %s == :available #available? %s == true diff --git a/spec/fixtures/responses/whois.centralnic.com/uk.com/status_available.txt b/spec/fixtures/responses/whois.centralnic.com/uk.com/status_available.txt index 09cc0f7e..d9fc564f 100644 --- a/spec/fixtures/responses/whois.centralnic.com/uk.com/status_available.txt +++ b/spec/fixtures/responses/whois.centralnic.com/uk.com/status_available.txt @@ -1 +1,21 @@ -DOMAIN NOT FOUND +The queried object does not exist: DOMAIN NOT FOUND + +>>> Last update of WHOIS database: 2021-12-15T17:03:44.0Z <<< + +For more information on Whois status codes, please visit https://icann.org/epp + +>>> IMPORTANT INFORMATION ABOUT THE DEPLOYMENT OF RDAP: please visit +https://www.centralnic.com/support/rdap <<< + +The Whois and RDAP services are provided by CentralNic, and contain +information pertaining to Internet domain names registered by our +our customers. By using this service you are agreeing (1) not to use any +information presented here for any purpose other than determining +ownership of domain names, (2) not to store or reproduce this data in +any way, (3) not to use any high-volume, automated, electronic processes +to obtain data from this service. Abuse of this service is monitored and +actions in contravention of these terms will result in being permanently +blacklisted. All data is (c) CentralNic Ltd (https://www.centralnic.com) + +Access to the Whois and RDAP services is rate limited. For more +information, visit https://registrar-console.centralnic.com/pub/whois_guidance. diff --git a/spec/fixtures/responses/whois.centralnic.com/uk.com/status_registered.expected b/spec/fixtures/responses/whois.centralnic.com/uk.com/status_registered.expected index dc4626ab..e198201e 100644 --- a/spec/fixtures/responses/whois.centralnic.com/uk.com/status_registered.expected +++ b/spec/fixtures/responses/whois.centralnic.com/uk.com/status_registered.expected @@ -1,16 +1,16 @@ #disclaimer - %s == "This whois service is provided by CentralNic Ltd and only contains information pertaining to Internet domain names we have registered for our customers. By using this service you are agreeing (1) not to use any information presented here for any purpose other than determining ownership of domain names, (2) not to store or reproduce this data in any way, (3) not to use any high-volume, automated, electronic processes to obtain data from this service. Abuse of this service is monitored and actions in contravention of these terms will result in being permanently blacklisted. All data is (c) CentralNic Ltd https://www.centralnic.com/" + %s == "The Whois and RDAP services are provided by CentralNic, and contain information pertaining to Internet domain names registered by our our customers. By using this service you are agreeing (1) not to use any information presented here for any purpose other than determining ownership of domain names, (2) not to store or reproduce this data in any way, (3) not to use any high-volume, automated, electronic processes to obtain data from this service. Abuse of this service is monitored and actions in contravention of these terms will result in being permanently blacklisted. All data is (c) CentralNic Ltd (https://www.centralnic.com) Access to the Whois and RDAP services is rate limited. For more information, visit https://registrar-console.centralnic.com/pub/whois_guidance." #domain %s == "history.uk.com" #domain_id - %s == "CNIC-DO86293" + %s == "D64550744-CNIC" #status - %s == ["ok"] + %s == :registered #available? %s == false @@ -21,86 +21,49 @@ #created_on %s %CLASS{time} - %s %TIME{2001-08-31 11:50:57 UTC} + %s %TIME{2018-03-27 13:46:06 UTC} #updated_on %s %CLASS{time} - %s %TIME{2013-09-03 10:36:47 UTC} + %s %TIME{2021-06-29 01:17:20 UTC} #expires_on %s %CLASS{time} - %s %TIME{2015-08-31 23:59:59 UTC} + %s %TIME{2022-03-27 23:59:59 UTC} #registrar %s %CLASS{registrar} - %s.id == "H78362" - %s.name == "E-VELOCITY LTD" - %s.url == "http://www.e-velocity.co.uk/" + %s.id == "1861" + %s.name == "Porkbun, LLC" + %s.url == "https://porkbun.com/" #registrant_contacts %s %CLASS{array} %s %SIZE{1} %s[0] %CLASS{contact} %s[0].type == Whois::Parser::Contact::TYPE_REGISTRANT - %s[0].id == "H1045821" - %s[0].name == "Mr. Ray Hatley" - %s[0].organization == nil - %s[0].address == "Tallow House\n65-66 Lower Galdeford" - %s[0].city == "Ludlow" - %s[0].zip == "SY8 1RU" - %s[0].state == "Shropshire" - %s[0].country == nil - %s[0].country_code == "GB" - %s[0].phone == "+44.1584873633" - %s[0].fax == nil - %s[0].email == "ray@hatley.co.uk" + %s[0].email == "https://whois.centralnic.com/contact/history.uk.com/registrant" #admin_contacts %s %CLASS{array} %s %SIZE{1} %s[0] %CLASS{contact} %s[0].type == Whois::Parser::Contact::TYPE_ADMINISTRATIVE - %s[0].id == "H305798" - %s[0].name == "Mr. Ray Hatley" - %s[0].organization == nil - %s[0].address == "Tallow House\n65-66 Lower Galdeford" - %s[0].city == "Ludlow" - %s[0].zip == "SY8 1RU" - %s[0].state == "Shropshire" - %s[0].country == nil - %s[0].country_code == "GB" - %s[0].phone == "+44.1584873633" - %s[0].fax == nil - %s[0].email == "ray@hatley.co.uk" + %s[0].email == "https://whois.centralnic.com/contact/history.uk.com/admin" #technical_contacts %s %CLASS{array} %s %SIZE{1} %s[0] %CLASS{contact} %s[0].type == Whois::Parser::Contact::TYPE_TECHNICAL - %s[0].id == "H78362" - %s[0].name == "Mr Simon Williams" - %s[0].organization == "E-VELOCITY LTD" - %s[0].address == "P.O Box 3295\nBrighton" - %s[0].city == nil - %s[0].zip == "BN50 9EY" - %s[0].state == nil - %s[0].country == nil - %s[0].country_code == "GB" - %s[0].phone == "+44.1273684969" - %s[0].fax == nil - %s[0].email == "simon@e-velocity.co.uk" + %s[0].email == "https://whois.centralnic.com/contact/history.uk.com/tech" #nameservers %s %CLASS{array} %s %SIZE{2} %s[0] %CLASS{nameserver} - %s[0].name == "ns37.eukdns.com" - %s[0].ipv4 == nil - %s[0].ipv6 == nil + %s[0].name == "ns15.stlbg.net" %s[1] %CLASS{nameserver} - %s[1].name == "ns38.eukdns.com" - %s[1].ipv4 == nil - %s[1].ipv6 == nil + %s[1].name == "ns16.stlbg.net" diff --git a/spec/fixtures/responses/whois.centralnic.com/uk.com/status_registered.txt b/spec/fixtures/responses/whois.centralnic.com/uk.com/status_registered.txt index d26fbf34..4e412547 100644 --- a/spec/fixtures/responses/whois.centralnic.com/uk.com/status_registered.txt +++ b/spec/fixtures/responses/whois.centralnic.com/uk.com/status_registered.txt @@ -1,57 +1,40 @@ -Domain ID:CNIC-DO86293 -Domain Name:HISTORY.UK.COM -Created On:2001-08-31T11:50:57.0Z -Last Updated On:2013-09-03T10:36:47.0Z -Expiration Date:2015-08-31T23:59:59.0Z -Status:ok -Registrant ID:H1045821 -Registrant Name:Mr. Ray Hatley -Registrant Street1:Tallow House -Registrant Street2:65-66 Lower Galdeford -Registrant City:Ludlow -Registrant State/Province:Shropshire -Registrant Postal Code:SY8 1RU -Registrant Country:GB -Registrant Phone:+44.1584873633 -Registrant Email:ray@hatley.co.uk -Admin ID:H305798 -Admin Name:Mr. Ray Hatley -Admin Street1:Tallow House -Admin Street2:65-66 Lower Galdeford -Admin City:Ludlow -Admin State/Province:Shropshire -Admin Postal Code:SY8 1RU -Admin Country:GB -Admin Phone:+44.1584873633 -Admin Email:ray@hatley.co.uk -Tech ID:H78362 -Tech Name:Mr Simon Williams -Tech Organization:E-VELOCITY LTD -Tech Street1:P.O Box 3295 -Tech Street2:Brighton -Tech Postal Code:BN50 9EY -Tech Country:GB -Tech Phone:+44.1273684969 -Tech Email:simon@e-velocity.co.uk -Sponsoring Registrar ID:H78362 -Sponsoring Registrar Organization:E-VELOCITY LTD -Sponsoring Registrar Street1:P.O Box 3295 -Sponsoring Registrar Street2:Brighton -Sponsoring Registrar Postal Code:BN50 9EY -Sponsoring Registrar Country:GB -Sponsoring Registrar Phone:01273 684969 -Sponsoring Registrar Website:http://www.e-velocity.co.uk/ -Name Server:NS37.EUKDNS.COM -Name Server:NS38.EUKDNS.COM -DNSSEC:Unsigned +Domain Name: HISTORY.UK.COM +Registry Domain ID: D64550744-CNIC +Registrar WHOIS Server: whois.porkbun.com +Registrar URL: https://porkbun.com/ +Updated Date: 2021-06-29T01:17:20.0Z +Creation Date: 2018-03-27T13:46:06.0Z +Registry Expiry Date: 2022-03-27T23:59:59.0Z +Registrar: Porkbun, LLC +Registrar IANA ID: 1861 +Domain Status: clientTransferProhibited https://icann.org/epp#clientTransferProhibited +Domain Status: clientDeleteProhibited https://icann.org/epp#clientDeleteProhibited +Registrant Email: https://whois.centralnic.com/contact/history.uk.com/registrant +Admin Email: https://whois.centralnic.com/contact/history.uk.com/admin +Tech Email: https://whois.centralnic.com/contact/history.uk.com/tech +Name Server: NS15.STLBG.NET +Name Server: NS16.STLBG.NET +DNSSEC: unsigned +Billing Email: https://whois.centralnic.com/contact/history.uk.com/billing +Registrar Abuse Contact Email: abuse@porkbun.com +Registrar Abuse Contact Phone: +1.5038508351 +URL of the ICANN Whois Inaccuracy Complaint Form: https://www.icann.org/wicf/ +>>> Last update of WHOIS database: 2021-12-15T17:03:35.0Z <<< -This whois service is provided by CentralNic Ltd and only contains -information pertaining to Internet domain names we have registered for -our customers. By using this service you are agreeing (1) not to use any -information presented here for any purpose other than determining -ownership of domain names, (2) not to store or reproduce this data in -any way, (3) not to use any high-volume, automated, electronic processes -to obtain data from this service. Abuse of this service is monitored and -actions in contravention of these terms will result in being permanently -blacklisted. All data is (c) CentralNic Ltd https://www.centralnic.com/ +For more information on Whois status codes, please visit https://icann.org/epp +>>> IMPORTANT INFORMATION ABOUT THE DEPLOYMENT OF RDAP: please visit +https://www.centralnic.com/support/rdap <<< + +The Whois and RDAP services are provided by CentralNic, and contain +information pertaining to Internet domain names registered by our +our customers. By using this service you are agreeing (1) not to use any +information presented here for any purpose other than determining +ownership of domain names, (2) not to store or reproduce this data in +any way, (3) not to use any high-volume, automated, electronic processes +to obtain data from this service. Abuse of this service is monitored and +actions in contravention of these terms will result in being permanently +blacklisted. All data is (c) CentralNic Ltd (https://www.centralnic.com) + +Access to the Whois and RDAP services is rate limited. For more +information, visit https://registrar-console.centralnic.com/pub/whois_guidance. diff --git a/spec/fixtures/responses/whois.centralnic.com/uk.net/status_available.expected b/spec/fixtures/responses/whois.centralnic.com/uk.net/status_available.expected index 2c3fe7a8..64c3bae5 100644 --- a/spec/fixtures/responses/whois.centralnic.com/uk.net/status_available.expected +++ b/spec/fixtures/responses/whois.centralnic.com/uk.net/status_available.expected @@ -1,5 +1,5 @@ #disclaimer - %s == nil + %s == "The Whois and RDAP services are provided by CentralNic, and contain information pertaining to Internet domain names registered by our our customers. By using this service you are agreeing (1) not to use any information presented here for any purpose other than determining ownership of domain names, (2) not to store or reproduce this data in any way, (3) not to use any high-volume, automated, electronic processes to obtain data from this service. Abuse of this service is monitored and actions in contravention of these terms will result in being permanently blacklisted. All data is (c) CentralNic Ltd (https://www.centralnic.com) Access to the Whois and RDAP services is rate limited. For more information, visit https://registrar-console.centralnic.com/pub/whois_guidance." #domain @@ -10,7 +10,7 @@ #status - %s == [] + %s == :available #available? %s == true diff --git a/spec/fixtures/responses/whois.centralnic.com/uk.net/status_available.txt b/spec/fixtures/responses/whois.centralnic.com/uk.net/status_available.txt index 09cc0f7e..29754cfd 100644 --- a/spec/fixtures/responses/whois.centralnic.com/uk.net/status_available.txt +++ b/spec/fixtures/responses/whois.centralnic.com/uk.net/status_available.txt @@ -1 +1,21 @@ -DOMAIN NOT FOUND +The queried object does not exist: DOMAIN NOT FOUND + +>>> Last update of WHOIS database: 2021-12-15T17:13:52.0Z <<< + +For more information on Whois status codes, please visit https://icann.org/epp + +>>> IMPORTANT INFORMATION ABOUT THE DEPLOYMENT OF RDAP: please visit +https://www.centralnic.com/support/rdap <<< + +The Whois and RDAP services are provided by CentralNic, and contain +information pertaining to Internet domain names registered by our +our customers. By using this service you are agreeing (1) not to use any +information presented here for any purpose other than determining +ownership of domain names, (2) not to store or reproduce this data in +any way, (3) not to use any high-volume, automated, electronic processes +to obtain data from this service. Abuse of this service is monitored and +actions in contravention of these terms will result in being permanently +blacklisted. All data is (c) CentralNic Ltd (https://www.centralnic.com) + +Access to the Whois and RDAP services is rate limited. For more +information, visit https://registrar-console.centralnic.com/pub/whois_guidance. diff --git a/spec/fixtures/responses/whois.centralnic.com/uk.net/status_registered.expected b/spec/fixtures/responses/whois.centralnic.com/uk.net/status_registered.expected index 577d670c..cc4b1d59 100644 --- a/spec/fixtures/responses/whois.centralnic.com/uk.net/status_registered.expected +++ b/spec/fixtures/responses/whois.centralnic.com/uk.net/status_registered.expected @@ -1,16 +1,16 @@ #disclaimer - %s == "This whois service is provided by CentralNic Ltd and only contains information pertaining to Internet domain names we have registered for our customers. By using this service you are agreeing (1) not to use any information presented here for any purpose other than determining ownership of domain names, (2) not to store or reproduce this data in any way, (3) not to use any high-volume, automated, electronic processes to obtain data from this service. Abuse of this service is monitored and actions in contravention of these terms will result in being permanently blacklisted. All data is (c) CentralNic Ltd https://www.centralnic.com/" + %s == "The Whois and RDAP services are provided by CentralNic, and contain information pertaining to Internet domain names registered by our our customers. By using this service you are agreeing (1) not to use any information presented here for any purpose other than determining ownership of domain names, (2) not to store or reproduce this data in any way, (3) not to use any high-volume, automated, electronic processes to obtain data from this service. Abuse of this service is monitored and actions in contravention of these terms will result in being permanently blacklisted. All data is (c) CentralNic Ltd (https://www.centralnic.com) Access to the Whois and RDAP services is rate limited. For more information, visit https://registrar-console.centralnic.com/pub/whois_guidance." #domain %s == "paramount.uk.net" #domain_id - %s == "CNIC-DO393884" + %s == "D123061216-CNIC" #status - %s == ["ok"] + %s == :registered #available? %s == false @@ -21,86 +21,49 @@ #created_on %s %CLASS{time} - %s %TIME{2006-02-28 12:17:01 UTC} + %s %TIME{2019-09-03 15:47:37 UTC} #updated_on %s %CLASS{time} - %s %TIME{2013-04-03 12:59:45 UTC} + %s %TIME{2021-08-12 04:46:26 UTC} #expires_on %s %CLASS{time} - %s %TIME{2014-02-28 23:59:59 UTC} + %s %TIME{2022-09-03 23:59:59 UTC} #registrar %s %CLASS{registrar} - %s.id == "I6467" - %s.name == "Webfusion" - %s.url == "http://www.123-reg.co.uk/domain-names/" + %s.id == "1564" + %s.name == "TLD Registrar Solutions Ltd" + %s.url == "http://www.tldregistrarsolutions.com" #registrant_contacts %s %CLASS{array} %s %SIZE{1} %s[0] %CLASS{contact} %s[0].type == Whois::Parser::Contact::TYPE_REGISTRANT - %s[0].id == "MNT60424953041" - %s[0].name == "Identity Protection Service" - %s[0].organization == "Identity Protect Limited" - %s[0].address == "PO Box 795" - %s[0].city == "Godalming" - %s[0].zip == "GU7 9GA" - %s[0].state == "Surrey" - %s[0].country == nil - %s[0].country_code == "GB" - %s[0].phone == "+44.1483307527" - %s[0].fax == "+44.1483304031" - %s[0].email == "paramount.uk.net@identity-protect.org" + %s[0].email == "https://whois.centralnic.com/contact/paramount.uk.net/registrant" #admin_contacts %s %CLASS{array} %s %SIZE{1} %s[0] %CLASS{contact} %s[0].type == Whois::Parser::Contact::TYPE_ADMINISTRATIVE - %s[0].id == "MNT60424953041" - %s[0].name == "Identity Protection Service" - %s[0].organization == "Identity Protect Limited" - %s[0].address == "PO Box 795" - %s[0].city == "Godalming" - %s[0].zip == "GU7 9GA" - %s[0].state == "Surrey" - %s[0].country == nil - %s[0].country_code == "GB" - %s[0].phone == "+44.1483307527" - %s[0].fax == "+44.1483304031" - %s[0].email == "paramount.uk.net@identity-protect.org" + %s[0].email == "https://whois.centralnic.com/contact/paramount.uk.net/admin" #technical_contacts %s %CLASS{array} %s %SIZE{1} %s[0] %CLASS{contact} %s[0].type == Whois::Parser::Contact::TYPE_TECHNICAL - %s[0].id == "MNT60424953041" - %s[0].name == "Identity Protection Service" - %s[0].organization == "Identity Protect Limited" - %s[0].address == "PO Box 795" - %s[0].city == "Godalming" - %s[0].zip == "GU7 9GA" - %s[0].state == "Surrey" - %s[0].country == nil - %s[0].country_code == "GB" - %s[0].phone == "+44.1483307527" - %s[0].fax == "+44.1483304031" - %s[0].email == "paramount.uk.net@identity-protect.org" + %s[0].email == "https://whois.centralnic.com/contact/paramount.uk.net/tech" #nameservers %s %CLASS{array} %s %SIZE{2} %s[0] %CLASS{nameserver} - %s[0].name == "ns1.myhostcp.com" - %s[0].ipv4 == nil - %s[0].ipv6 == nil + %s[0].name == "ns1.gsgp1001.siteground.asia" %s[1] %CLASS{nameserver} - %s[1].name == "ns2.myhostcp.com" - %s[1].ipv4 == nil - %s[1].ipv6 == nil + %s[1].name == "ns2.gsgp1001.siteground.asia" diff --git a/spec/fixtures/responses/whois.centralnic.com/uk.net/status_registered.txt b/spec/fixtures/responses/whois.centralnic.com/uk.net/status_registered.txt index 5f246e70..6e56d80b 100644 --- a/spec/fixtures/responses/whois.centralnic.com/uk.net/status_registered.txt +++ b/spec/fixtures/responses/whois.centralnic.com/uk.net/status_registered.txt @@ -1,76 +1,39 @@ -Domain ID:CNIC-DO393884 -Domain Name:PARAMOUNT.UK.NET -Created On:2006-02-28T12:17:01.0Z -Last Updated On:2013-04-03T12:59:45.0Z -Expiration Date:2014-02-28T23:59:59.0Z -Status:ok -Registrant ID:MNT60424953041 -Registrant Name:Identity Protection Service -Registrant Organization:Identity Protect Limited -Registrant Street1:PO Box 795 -Registrant City:Godalming -Registrant State/Province:Surrey -Registrant Postal Code:GU7 9GA -Registrant Country:GB -Registrant Phone:+44.1483307527 -Registrant FAX:+44.1483304031 -Registrant Email:paramount.uk.net@identity-protect.org -Admin ID:MNT60424953041 -Admin Name:Identity Protection Service -Admin Organization:Identity Protect Limited -Admin Street1:PO Box 795 -Admin City:Godalming -Admin State/Province:Surrey -Admin Postal Code:GU7 9GA -Admin Country:GB -Admin Phone:+44.1483307527 -Admin FAX:+44.1483304031 -Admin Email:paramount.uk.net@identity-protect.org -Tech ID:MNT60424953041 -Tech Name:Identity Protection Service -Tech Organization:Identity Protect Limited -Tech Street1:PO Box 795 -Tech City:Godalming -Tech State/Province:Surrey -Tech Postal Code:GU7 9GA -Tech Country:GB -Tech Phone:+44.1483307527 -Tech FAX:+44.1483304031 -Tech Email:paramount.uk.net@identity-protect.org -Billing ID:MNT60424953041 -Billing Name:Identity Protection Service -Billing Organization:Identity Protect Limited -Billing Street1:PO Box 795 -Billing City:Godalming -Billing State/Province:Surrey -Billing Postal Code:GU7 9GA -Billing Country:GB -Billing Phone:+44.1483307527 -Billing FAX:+44.1483304031 -Billing Email:paramount.uk.net@identity-protect.org -Sponsoring Registrar ID:I6467 -Sponsoring Registrar IANA ID:1515 -Sponsoring Registrar Organization:Webfusion -Sponsoring Registrar Street1:5 Roundwood Avenue -Sponsoring Registrar Street2:Stockley Park -Sponsoring Registrar City:Uxbridge -Sponsoring Registrar State/Province:Middlesex -Sponsoring Registrar Postal Code:UB11 1FF -Sponsoring Registrar Country:GB -Sponsoring Registrar Phone:0845 859 0018 -Sponsoring Registrar FAX:08701 650437 -Sponsoring Registrar Website:http://www.123-reg.co.uk/domain-names/ -Name Server:NS1.MYHOSTCP.COM -Name Server:NS2.MYHOSTCP.COM -DNSSEC:Unsigned +Domain Name: PARAMOUNT.UK.NET +Registry Domain ID: D123061216-CNIC +Registrar WHOIS Server: whois.tldregistrarsolutions.com +Registrar URL: http://www.tldregistrarsolutions.com +Updated Date: 2021-08-12T04:46:26.0Z +Creation Date: 2019-09-03T15:47:37.0Z +Registry Expiry Date: 2022-09-03T23:59:59.0Z +Registrar: TLD Registrar Solutions Ltd +Registrar IANA ID: 1564 +Domain Status: clientTransferProhibited https://icann.org/epp#clientTransferProhibited +Registrant Email: https://whois.centralnic.com/contact/paramount.uk.net/registrant +Admin Email: https://whois.centralnic.com/contact/paramount.uk.net/admin +Tech Email: https://whois.centralnic.com/contact/paramount.uk.net/tech +Name Server: NS1.GSGP1001.SITEGROUND.ASIA +Name Server: NS2.GSGP1001.SITEGROUND.ASIA +DNSSEC: unsigned +Billing Email: https://whois.centralnic.com/contact/paramount.uk.net/billing +Registrar Abuse Contact Email: abuse@tldregistrarsolutions.com +Registrar Abuse Contact Phone: +1.5167401179 +URL of the ICANN Whois Inaccuracy Complaint Form: https://www.icann.org/wicf/ +>>> Last update of WHOIS database: 2021-12-15T17:11:16.0Z <<< -This whois service is provided by CentralNic Ltd and only contains -information pertaining to Internet domain names we have registered for -our customers. By using this service you are agreeing (1) not to use any -information presented here for any purpose other than determining -ownership of domain names, (2) not to store or reproduce this data in -any way, (3) not to use any high-volume, automated, electronic processes -to obtain data from this service. Abuse of this service is monitored and -actions in contravention of these terms will result in being permanently -blacklisted. All data is (c) CentralNic Ltd https://www.centralnic.com/ +For more information on Whois status codes, please visit https://icann.org/epp +>>> IMPORTANT INFORMATION ABOUT THE DEPLOYMENT OF RDAP: please visit +https://www.centralnic.com/support/rdap <<< + +The Whois and RDAP services are provided by CentralNic, and contain +information pertaining to Internet domain names registered by our +our customers. By using this service you are agreeing (1) not to use any +information presented here for any purpose other than determining +ownership of domain names, (2) not to store or reproduce this data in +any way, (3) not to use any high-volume, automated, electronic processes +to obtain data from this service. Abuse of this service is monitored and +actions in contravention of these terms will result in being permanently +blacklisted. All data is (c) CentralNic Ltd (https://www.centralnic.com) + +Access to the Whois and RDAP services is rate limited. For more +information, visit https://registrar-console.centralnic.com/pub/whois_guidance. diff --git a/spec/fixtures/responses/whois.centralnic.com/us.com/status_available.expected b/spec/fixtures/responses/whois.centralnic.com/us.com/status_available.expected index 2c3fe7a8..64c3bae5 100644 --- a/spec/fixtures/responses/whois.centralnic.com/us.com/status_available.expected +++ b/spec/fixtures/responses/whois.centralnic.com/us.com/status_available.expected @@ -1,5 +1,5 @@ #disclaimer - %s == nil + %s == "The Whois and RDAP services are provided by CentralNic, and contain information pertaining to Internet domain names registered by our our customers. By using this service you are agreeing (1) not to use any information presented here for any purpose other than determining ownership of domain names, (2) not to store or reproduce this data in any way, (3) not to use any high-volume, automated, electronic processes to obtain data from this service. Abuse of this service is monitored and actions in contravention of these terms will result in being permanently blacklisted. All data is (c) CentralNic Ltd (https://www.centralnic.com) Access to the Whois and RDAP services is rate limited. For more information, visit https://registrar-console.centralnic.com/pub/whois_guidance." #domain @@ -10,7 +10,7 @@ #status - %s == [] + %s == :available #available? %s == true diff --git a/spec/fixtures/responses/whois.centralnic.com/us.com/status_available.txt b/spec/fixtures/responses/whois.centralnic.com/us.com/status_available.txt index 09cc0f7e..88a130e8 100644 --- a/spec/fixtures/responses/whois.centralnic.com/us.com/status_available.txt +++ b/spec/fixtures/responses/whois.centralnic.com/us.com/status_available.txt @@ -1 +1,21 @@ -DOMAIN NOT FOUND +The queried object does not exist: DOMAIN NOT FOUND + +>>> Last update of WHOIS database: 2021-12-15T17:18:01.0Z <<< + +For more information on Whois status codes, please visit https://icann.org/epp + +>>> IMPORTANT INFORMATION ABOUT THE DEPLOYMENT OF RDAP: please visit +https://www.centralnic.com/support/rdap <<< + +The Whois and RDAP services are provided by CentralNic, and contain +information pertaining to Internet domain names registered by our +our customers. By using this service you are agreeing (1) not to use any +information presented here for any purpose other than determining +ownership of domain names, (2) not to store or reproduce this data in +any way, (3) not to use any high-volume, automated, electronic processes +to obtain data from this service. Abuse of this service is monitored and +actions in contravention of these terms will result in being permanently +blacklisted. All data is (c) CentralNic Ltd (https://www.centralnic.com) + +Access to the Whois and RDAP services is rate limited. For more +information, visit https://registrar-console.centralnic.com/pub/whois_guidance. diff --git a/spec/fixtures/responses/whois.centralnic.com/us.com/status_registered.expected b/spec/fixtures/responses/whois.centralnic.com/us.com/status_registered.expected index 6da8d515..d6c78711 100644 --- a/spec/fixtures/responses/whois.centralnic.com/us.com/status_registered.expected +++ b/spec/fixtures/responses/whois.centralnic.com/us.com/status_registered.expected @@ -1,16 +1,16 @@ #disclaimer - %s == "This whois service is provided by CentralNic Ltd and only contains information pertaining to Internet domain names we have registered for our customers. By using this service you are agreeing (1) not to use any information presented here for any purpose other than determining ownership of domain names, (2) not to store or reproduce this data in any way, (3) not to use any high-volume, automated, electronic processes to obtain data from this service. Abuse of this service is monitored and actions in contravention of these terms will result in being permanently blacklisted. All data is (c) CentralNic Ltd https://www.centralnic.com/" + %s == "The Whois and RDAP services are provided by CentralNic, and contain information pertaining to Internet domain names registered by our our customers. By using this service you are agreeing (1) not to use any information presented here for any purpose other than determining ownership of domain names, (2) not to store or reproduce this data in any way, (3) not to use any high-volume, automated, electronic processes to obtain data from this service. Abuse of this service is monitored and actions in contravention of these terms will result in being permanently blacklisted. All data is (c) CentralNic Ltd (https://www.centralnic.com) Access to the Whois and RDAP services is rate limited. For more information, visit https://registrar-console.centralnic.com/pub/whois_guidance." #domain %s == "college.us.com" #domain_id - %s == "CNIC-DO275307" + %s == "D189945299-CNIC" #status - %s == ["ok"] + %s == :registered #available? %s == false @@ -21,91 +21,48 @@ #created_on %s %CLASS{time} - %s %TIME{2003-10-20 10:03:28 UTC} + %s %TIME{2020-06-17 23:31:11 UTC} #updated_on %s %CLASS{time} - %s %TIME{2012-01-16 16:27:26 UTC} + %s %TIME{2021-07-27 13:34:05 UTC} #expires_on %s %CLASS{time} - %s %TIME{2014-10-20 23:59:59 UTC} + %s %TIME{2022-06-17 23:59:59 UTC} #registrar - %s == nil + %s %CLASS{registrar} + %s.id == "1564" + %s.name == "TLD Registrar Solutions Ltd" + %s.url == "http://www.tldregistrarsolutions.com" #registrant_contacts %s %CLASS{array} %s %SIZE{1} %s[0] %CLASS{contact} %s[0].type == Whois::Parser::Contact::TYPE_REGISTRANT - %s[0].id == "H1044037" - %s[0].name == "Vantage Media Corporation" - %s[0].organization == nil - %s[0].address == "2101 Rosecrans Ave.\nSuite 2000" - %s[0].city == nil - %s[0].zip == "90245" - %s[0].state == nil - %s[0].country == nil - %s[0].country_code == "US" - %s[0].phone == "+1.3102196200" - %s[0].fax == "+1.8665897214" - %s[0].email == "domainadmin@vantagemedia.com" + %s[0].email == "https://whois.centralnic.com/contact/college.us.com/registrant" #admin_contacts %s %CLASS{array} %s %SIZE{1} %s[0] %CLASS{contact} %s[0].type == Whois::Parser::Contact::TYPE_ADMINISTRATIVE - %s[0].id == "H143205" - %s[0].name == "Domain Administrator" - %s[0].organization == "Vantage Media LLC" - %s[0].address == "2101 Rosecrans Ave.\nSuite 2000" - %s[0].city == nil - %s[0].zip == "90245" - %s[0].state == nil - %s[0].country == nil - %s[0].country_code == "US" - %s[0].phone == "+1.3102196200" - %s[0].fax == "+1.8665897214" - %s[0].email == "domainadmin@vantagemedia.com" + %s[0].email == "https://whois.centralnic.com/contact/college.us.com/admin" #technical_contacts %s %CLASS{array} %s %SIZE{1} %s[0] %CLASS{contact} %s[0].type == Whois::Parser::Contact::TYPE_TECHNICAL - %s[0].id == "H143205" - %s[0].name == "Domain Administrator" - %s[0].organization == "Vantage Media LLC" - %s[0].address == "2101 Rosecrans Ave.\nSuite 2000" - %s[0].city == nil - %s[0].zip == "90245" - %s[0].state == nil - %s[0].country == nil - %s[0].country_code == "US" - %s[0].phone == "+1.3102196200" - %s[0].fax == "+1.8665897214" - %s[0].email == "domainadmin@vantagemedia.com" - + %s[0].email == "https://whois.centralnic.com/contact/college.us.com/tech" #nameservers %s %CLASS{array} - %s %SIZE{4} + %s %SIZE{2} %s[0] %CLASS{nameserver} - %s[0].name == "ns1.p17.dynect.net" - %s[0].ipv4 == nil - %s[0].ipv6 == nil + %s[0].name == "elinore.ns.cloudflare.com" %s[1] %CLASS{nameserver} - %s[1].name == "ns2.p17.dynect.net" - %s[1].ipv4 == nil - %s[1].ipv6 == nil - %s[2] %CLASS{nameserver} - %s[2].name == "ns3.p17.dynect.net" - %s[2].ipv4 == nil - %s[2].ipv6 == nil - %s[3] %CLASS{nameserver} - %s[3].name == "ns4.p17.dynect.net" - %s[3].ipv4 == nil - %s[3].ipv6 == nil + %s[1].name == "frank.ns.cloudflare.com" diff --git a/spec/fixtures/responses/whois.centralnic.com/us.com/status_registered.txt b/spec/fixtures/responses/whois.centralnic.com/us.com/status_registered.txt index 87e65356..a1f6a83c 100644 --- a/spec/fixtures/responses/whois.centralnic.com/us.com/status_registered.txt +++ b/spec/fixtures/responses/whois.centralnic.com/us.com/status_registered.txt @@ -1,61 +1,39 @@ -Domain ID:CNIC-DO275307 -Domain Name:COLLEGE.US.COM -Created On:2003-10-20T10:03:28.0Z -Last Updated On:2012-01-16T16:27:26.0Z -Expiration Date:2014-10-20T23:59:59.0Z -Status:ok -Registrant ID:H1044037 -Registrant Name:Vantage Media Corporation -Registrant Street1:2101 Rosecrans Ave. -Registrant Street2:Suite 2000 -Registrant Postal Code:90245 -Registrant Country:US -Registrant Phone:+1.3102196200 -Registrant FAX:+1.8665897214 -Registrant Email:domainadmin@vantagemedia.com -Admin ID:H143205 -Admin Name:Domain Administrator -Admin Organization:Vantage Media LLC -Admin Street1:2101 Rosecrans Ave. -Admin Street2:Suite 2000 -Admin Postal Code:90245 -Admin Country:US -Admin Phone:+1.3102196200 -Admin FAX:+1.8665897214 -Admin Email:domainadmin@vantagemedia.com -Tech ID:H143205 -Tech Name:Domain Administrator -Tech Organization:Vantage Media LLC -Tech Street1:2101 Rosecrans Ave. -Tech Street2:Suite 2000 -Tech Postal Code:90245 -Tech Country:US -Tech Phone:+1.3102196200 -Tech FAX:+1.8665897214 -Tech Email:domainadmin@vantagemedia.com -Billing ID:H143205 -Billing Name:Domain Administrator -Billing Organization:Vantage Media LLC -Billing Street1:2101 Rosecrans Ave. -Billing Street2:Suite 2000 -Billing Postal Code:90245 -Billing Country:US -Billing Phone:+1.3102196200 -Billing FAX:+1.8665897214 -Billing Email:domainadmin@vantagemedia.com -Name Server:NS1.P17.DYNECT.NET -Name Server:NS2.P17.DYNECT.NET -Name Server:NS3.P17.DYNECT.NET -Name Server:NS4.P17.DYNECT.NET -DNSSEC:Unsigned +Domain Name: COLLEGE.US.COM +Registry Domain ID: D189945299-CNIC +Registrar WHOIS Server: whois.tldregistrarsolutions.com +Registrar URL: http://www.tldregistrarsolutions.com +Updated Date: 2021-07-27T13:34:05.0Z +Creation Date: 2020-06-17T23:31:11.0Z +Registry Expiry Date: 2022-06-17T23:59:59.0Z +Registrar: TLD Registrar Solutions Ltd +Registrar IANA ID: 1564 +Domain Status: clientTransferProhibited https://icann.org/epp#clientTransferProhibited +Registrant Email: https://whois.centralnic.com/contact/college.us.com/registrant +Admin Email: https://whois.centralnic.com/contact/college.us.com/admin +Tech Email: https://whois.centralnic.com/contact/college.us.com/tech +Name Server: ELINORE.NS.CLOUDFLARE.COM +Name Server: FRANK.NS.CLOUDFLARE.COM +DNSSEC: unsigned +Billing Email: https://whois.centralnic.com/contact/college.us.com/billing +Registrar Abuse Contact Email: abuse@tldregistrarsolutions.com +Registrar Abuse Contact Phone: +1.5167401179 +URL of the ICANN Whois Inaccuracy Complaint Form: https://www.icann.org/wicf/ +>>> Last update of WHOIS database: 2021-12-15T17:17:58.0Z <<< -This whois service is provided by CentralNic Ltd and only contains -information pertaining to Internet domain names we have registered for -our customers. By using this service you are agreeing (1) not to use any -information presented here for any purpose other than determining -ownership of domain names, (2) not to store or reproduce this data in -any way, (3) not to use any high-volume, automated, electronic processes -to obtain data from this service. Abuse of this service is monitored and -actions in contravention of these terms will result in being permanently -blacklisted. All data is (c) CentralNic Ltd https://www.centralnic.com/ +For more information on Whois status codes, please visit https://icann.org/epp +>>> IMPORTANT INFORMATION ABOUT THE DEPLOYMENT OF RDAP: please visit +https://www.centralnic.com/support/rdap <<< + +The Whois and RDAP services are provided by CentralNic, and contain +information pertaining to Internet domain names registered by our +our customers. By using this service you are agreeing (1) not to use any +information presented here for any purpose other than determining +ownership of domain names, (2) not to store or reproduce this data in +any way, (3) not to use any high-volume, automated, electronic processes +to obtain data from this service. Abuse of this service is monitored and +actions in contravention of these terms will result in being permanently +blacklisted. All data is (c) CentralNic Ltd (https://www.centralnic.com) + +Access to the Whois and RDAP services is rate limited. For more +information, visit https://registrar-console.centralnic.com/pub/whois_guidance. diff --git a/spec/fixtures/responses/whois.centralnic.com/us.org/status_available.expected b/spec/fixtures/responses/whois.centralnic.com/us.org/status_available.expected deleted file mode 100644 index 2c3fe7a8..00000000 --- a/spec/fixtures/responses/whois.centralnic.com/us.org/status_available.expected +++ /dev/null @@ -1,50 +0,0 @@ -#disclaimer - %s == nil - - -#domain - %s == nil - -#domain_id - %s == nil - - -#status - %s == [] - -#available? - %s == true - -#registered? - %s == false - - -#created_on - %s == nil - -#updated_on - %s == nil - -#expires_on - %s == nil - - -#registrar - %s == nil - -#registrant_contacts - %s %CLASS{array} - %s == [] - -#admin_contacts - %s %CLASS{array} - %s == [] - -#technical_contacts - %s %CLASS{array} - %s == [] - - -#nameservers - %s %CLASS{array} - %s == [] diff --git a/spec/fixtures/responses/whois.centralnic.com/us.org/status_available.txt b/spec/fixtures/responses/whois.centralnic.com/us.org/status_available.txt deleted file mode 100644 index 09cc0f7e..00000000 --- a/spec/fixtures/responses/whois.centralnic.com/us.org/status_available.txt +++ /dev/null @@ -1 +0,0 @@ -DOMAIN NOT FOUND diff --git a/spec/fixtures/responses/whois.centralnic.com/uy.com/property_contacts_omitted.txt b/spec/fixtures/responses/whois.centralnic.com/uy.com/property_contacts_omitted.txt deleted file mode 100644 index 224a5bc2..00000000 --- a/spec/fixtures/responses/whois.centralnic.com/uy.com/property_contacts_omitted.txt +++ /dev/null @@ -1,32 +0,0 @@ -This whois service is provided by CentralNic Ltd and only contains -information pertaining to Internet domain names we have registered for -our customers. By using this service you are agreeing (1) not to use any -information presented here for any purpose other than determining -ownership of domain names, (2) not to store or reproduce this data in -any way, (3) not to use any high-volume, automated, electronic processes -to obtain data from this service. Abuse of this service is monitored and -actions in contravention of these terms will result in being permanently -blacklisted. All data is (c) CentralNic Ltd https://www.centralnic.com/ - -Domain ID:CNIC-DO705337 -Domain Name:BINGO.UY.COM -Created On:02-Aug-2010 09:47:07 UTC -Last Updated On:03-Aug-2011 00:15:14 UTC -Expiration Date:02-Aug-2012 23:59:59 UTC -Status:OK -Registrant ID:H122681 -Admin ID:H122681 -Tech ID:H122681 -Billing ID:H122681 -Sponsoring Registrar ID:H122681 -Sponsoring Registrar Organization:Domain Exploitation International -Sponsoring Registrar City:Santa Monica -Sponsoring Registrar State/Province:CA -Sponsoring Registrar Postal Code:90401 -Sponsoring Registrar Country:US -Sponsoring Registrar Phone: -Name Server:NS2.DOMAIN-EXPLOITATION.US.COM -Name Server:NS1.DOMAIN-EXPLOITATION.US.COM -DNSSEC:Unsigned - - diff --git a/spec/fixtures/responses/whois.centralnic.com/uy.com/status_available.expected b/spec/fixtures/responses/whois.centralnic.com/uy.com/status_available.expected deleted file mode 100644 index 2c3fe7a8..00000000 --- a/spec/fixtures/responses/whois.centralnic.com/uy.com/status_available.expected +++ /dev/null @@ -1,50 +0,0 @@ -#disclaimer - %s == nil - - -#domain - %s == nil - -#domain_id - %s == nil - - -#status - %s == [] - -#available? - %s == true - -#registered? - %s == false - - -#created_on - %s == nil - -#updated_on - %s == nil - -#expires_on - %s == nil - - -#registrar - %s == nil - -#registrant_contacts - %s %CLASS{array} - %s == [] - -#admin_contacts - %s %CLASS{array} - %s == [] - -#technical_contacts - %s %CLASS{array} - %s == [] - - -#nameservers - %s %CLASS{array} - %s == [] diff --git a/spec/fixtures/responses/whois.centralnic.com/uy.com/status_available.txt b/spec/fixtures/responses/whois.centralnic.com/uy.com/status_available.txt deleted file mode 100644 index 09cc0f7e..00000000 --- a/spec/fixtures/responses/whois.centralnic.com/uy.com/status_available.txt +++ /dev/null @@ -1 +0,0 @@ -DOMAIN NOT FOUND diff --git a/spec/fixtures/responses/whois.centralnic.com/uy.com/status_registered.expected b/spec/fixtures/responses/whois.centralnic.com/uy.com/status_registered.expected deleted file mode 100644 index afa3ac84..00000000 --- a/spec/fixtures/responses/whois.centralnic.com/uy.com/status_registered.expected +++ /dev/null @@ -1,102 +0,0 @@ -#disclaimer - %s == "This whois service is provided by CentralNic Ltd and only contains information pertaining to Internet domain names we have registered for our customers. By using this service you are agreeing (1) not to use any information presented here for any purpose other than determining ownership of domain names, (2) not to store or reproduce this data in any way, (3) not to use any high-volume, automated, electronic processes to obtain data from this service. Abuse of this service is monitored and actions in contravention of these terms will result in being permanently blacklisted. All data is (c) CentralNic Ltd https://www.centralnic.com/" - - -#domain - %s == "bestb.uy.com" - -#domain_id - %s == "CNIC-DO493832" - - -#status - %s == ["ok"] - -#available? - %s == false - -#registered? - %s == true - - -#created_on - %s %CLASS{time} - %s %TIME{2007-07-12 13:49:25 UTC} - -#updated_on - %s %CLASS{time} - %s %TIME{2013-07-10 00:27:20 UTC} - -#expires_on - %s %CLASS{time} - %s %TIME{2015-07-12 23:59:59 UTC} - - -#registrar - %s %CLASS{registrar} - %s.id == "I6467" - %s.name == "Webfusion" - %s.url == "http://www.123-reg.co.uk/domain-names/" - -#registrant_contacts - %s %CLASS{array} - %s %SIZE{1} - %s[0] %CLASS{contact} - %s[0].type == Whois::Parser::Contact::TYPE_REGISTRANT - %s[0].id == "MNT32524959440" - %s[0].name == "Identity Protection Service" - %s[0].organization == "Identity Protect Limited" - %s[0].address == "PO Box 795" - %s[0].city == "Godalming" - %s[0].zip == "GU7 9GA" - %s[0].state == "Surrey" - %s[0].country == nil - %s[0].country_code == "GB" - %s[0].phone == "+44.1483307527" - %s[0].fax == "+44.1483304031" - %s[0].email == "bestb.uy.com@identity-protect.org" - -#admin_contacts - %s %CLASS{array} - %s %SIZE{1} - %s[0] %CLASS{contact} - %s[0].type == Whois::Parser::Contact::TYPE_ADMINISTRATIVE - %s[0].id == "MNT32524959440" - %s[0].name == "Identity Protection Service" - %s[0].organization == "Identity Protect Limited" - %s[0].address == "PO Box 795" - %s[0].city == "Godalming" - %s[0].zip == "GU7 9GA" - %s[0].state == "Surrey" - %s[0].country == nil - %s[0].country_code == "GB" - %s[0].phone == "+44.1483307527" - %s[0].fax == "+44.1483304031" - %s[0].email == "bestb.uy.com@identity-protect.org" - -#technical_contacts - %s %CLASS{array} - %s %SIZE{1} - %s[0] %CLASS{contact} - %s[0].type == Whois::Parser::Contact::TYPE_TECHNICAL - %s[0].id == "MNT32524959440" - %s[0].name == "Identity Protection Service" - %s[0].organization == "Identity Protect Limited" - %s[0].address == "PO Box 795" - %s[0].city == "Godalming" - %s[0].zip == "GU7 9GA" - %s[0].state == "Surrey" - %s[0].country == nil - %s[0].country_code == "GB" - %s[0].phone == "+44.1483307527" - %s[0].fax == "+44.1483304031" - %s[0].email == "bestb.uy.com@identity-protect.org" - - -#nameservers - %s %CLASS{array} - %s %SIZE{2} - %s[0] %CLASS{nameserver} - %s[0].name == "ns2.123-reg.co.uk" - %s[1] %CLASS{nameserver} - %s[1].name == "ns.123-reg.co.uk" diff --git a/spec/fixtures/responses/whois.centralnic.com/uy.com/status_registered.txt b/spec/fixtures/responses/whois.centralnic.com/uy.com/status_registered.txt deleted file mode 100644 index 0ae493b7..00000000 --- a/spec/fixtures/responses/whois.centralnic.com/uy.com/status_registered.txt +++ /dev/null @@ -1,76 +0,0 @@ -Domain ID:CNIC-DO493832 -Domain Name:BESTB.UY.COM -Created On:2007-07-12T13:49:25.0Z -Last Updated On:2013-07-10T00:27:20.0Z -Expiration Date:2015-07-12T23:59:59.0Z -Status:ok -Registrant ID:MNT32524959440 -Registrant Name:Identity Protection Service -Registrant Organization:Identity Protect Limited -Registrant Street1:PO Box 795 -Registrant City:Godalming -Registrant State/Province:Surrey -Registrant Postal Code:GU7 9GA -Registrant Country:GB -Registrant Phone:+44.1483307527 -Registrant FAX:+44.1483304031 -Registrant Email:bestb.uy.com@identity-protect.org -Admin ID:MNT32524959440 -Admin Name:Identity Protection Service -Admin Organization:Identity Protect Limited -Admin Street1:PO Box 795 -Admin City:Godalming -Admin State/Province:Surrey -Admin Postal Code:GU7 9GA -Admin Country:GB -Admin Phone:+44.1483307527 -Admin FAX:+44.1483304031 -Admin Email:bestb.uy.com@identity-protect.org -Tech ID:MNT32524959440 -Tech Name:Identity Protection Service -Tech Organization:Identity Protect Limited -Tech Street1:PO Box 795 -Tech City:Godalming -Tech State/Province:Surrey -Tech Postal Code:GU7 9GA -Tech Country:GB -Tech Phone:+44.1483307527 -Tech FAX:+44.1483304031 -Tech Email:bestb.uy.com@identity-protect.org -Billing ID:MNT32524959440 -Billing Name:Identity Protection Service -Billing Organization:Identity Protect Limited -Billing Street1:PO Box 795 -Billing City:Godalming -Billing State/Province:Surrey -Billing Postal Code:GU7 9GA -Billing Country:GB -Billing Phone:+44.1483307527 -Billing FAX:+44.1483304031 -Billing Email:bestb.uy.com@identity-protect.org -Sponsoring Registrar ID:I6467 -Sponsoring Registrar IANA ID:1515 -Sponsoring Registrar Organization:Webfusion -Sponsoring Registrar Street1:5 Roundwood Avenue -Sponsoring Registrar Street2:Stockley Park -Sponsoring Registrar City:Uxbridge -Sponsoring Registrar State/Province:Middlesex -Sponsoring Registrar Postal Code:UB11 1FF -Sponsoring Registrar Country:GB -Sponsoring Registrar Phone:0845 859 0018 -Sponsoring Registrar FAX:08701 650437 -Sponsoring Registrar Website:http://www.123-reg.co.uk/domain-names/ -Name Server:NS2.123-REG.CO.UK -Name Server:NS.123-REG.CO.UK -DNSSEC:Unsigned - -This whois service is provided by CentralNic Ltd and only contains -information pertaining to Internet domain names we have registered for -our customers. By using this service you are agreeing (1) not to use any -information presented here for any purpose other than determining -ownership of domain names, (2) not to store or reproduce this data in -any way, (3) not to use any high-volume, automated, electronic processes -to obtain data from this service. Abuse of this service is monitored and -actions in contravention of these terms will result in being permanently -blacklisted. All data is (c) CentralNic Ltd https://www.centralnic.com/ - diff --git a/spec/fixtures/responses/whois.centralnic.com/za.com/status_available.expected b/spec/fixtures/responses/whois.centralnic.com/za.com/status_available.expected index 2c3fe7a8..64c3bae5 100644 --- a/spec/fixtures/responses/whois.centralnic.com/za.com/status_available.expected +++ b/spec/fixtures/responses/whois.centralnic.com/za.com/status_available.expected @@ -1,5 +1,5 @@ #disclaimer - %s == nil + %s == "The Whois and RDAP services are provided by CentralNic, and contain information pertaining to Internet domain names registered by our our customers. By using this service you are agreeing (1) not to use any information presented here for any purpose other than determining ownership of domain names, (2) not to store or reproduce this data in any way, (3) not to use any high-volume, automated, electronic processes to obtain data from this service. Abuse of this service is monitored and actions in contravention of these terms will result in being permanently blacklisted. All data is (c) CentralNic Ltd (https://www.centralnic.com) Access to the Whois and RDAP services is rate limited. For more information, visit https://registrar-console.centralnic.com/pub/whois_guidance." #domain @@ -10,7 +10,7 @@ #status - %s == [] + %s == :available #available? %s == true diff --git a/spec/fixtures/responses/whois.centralnic.com/za.com/status_available.txt b/spec/fixtures/responses/whois.centralnic.com/za.com/status_available.txt index 09cc0f7e..a876e6ce 100644 --- a/spec/fixtures/responses/whois.centralnic.com/za.com/status_available.txt +++ b/spec/fixtures/responses/whois.centralnic.com/za.com/status_available.txt @@ -1 +1,21 @@ -DOMAIN NOT FOUND +The queried object does not exist: DOMAIN NOT FOUND + +>>> Last update of WHOIS database: 2021-12-15T17:21:44.0Z <<< + +For more information on Whois status codes, please visit https://icann.org/epp + +>>> IMPORTANT INFORMATION ABOUT THE DEPLOYMENT OF RDAP: please visit +https://www.centralnic.com/support/rdap <<< + +The Whois and RDAP services are provided by CentralNic, and contain +information pertaining to Internet domain names registered by our +our customers. By using this service you are agreeing (1) not to use any +information presented here for any purpose other than determining +ownership of domain names, (2) not to store or reproduce this data in +any way, (3) not to use any high-volume, automated, electronic processes +to obtain data from this service. Abuse of this service is monitored and +actions in contravention of these terms will result in being permanently +blacklisted. All data is (c) CentralNic Ltd (https://www.centralnic.com) + +Access to the Whois and RDAP services is rate limited. For more +information, visit https://registrar-console.centralnic.com/pub/whois_guidance. diff --git a/spec/fixtures/responses/whois.centralnic.com/za.com/status_registered.expected b/spec/fixtures/responses/whois.centralnic.com/za.com/status_registered.expected index 6736fa4a..51e028ec 100644 --- a/spec/fixtures/responses/whois.centralnic.com/za.com/status_registered.expected +++ b/spec/fixtures/responses/whois.centralnic.com/za.com/status_registered.expected @@ -1,16 +1,16 @@ #disclaimer - %s == "This whois service is provided by CentralNic Ltd and only contains information pertaining to Internet domain names we have registered for our customers. By using this service you are agreeing (1) not to use any information presented here for any purpose other than determining ownership of domain names, (2) not to store or reproduce this data in any way, (3) not to use any high-volume, automated, electronic processes to obtain data from this service. Abuse of this service is monitored and actions in contravention of these terms will result in being permanently blacklisted. All data is (c) CentralNic Ltd https://www.centralnic.com/" + %s == "The Whois and RDAP services are provided by CentralNic, and contain information pertaining to Internet domain names registered by our our customers. By using this service you are agreeing (1) not to use any information presented here for any purpose other than determining ownership of domain names, (2) not to store or reproduce this data in any way, (3) not to use any high-volume, automated, electronic processes to obtain data from this service. Abuse of this service is monitored and actions in contravention of these terms will result in being permanently blacklisted. All data is (c) CentralNic Ltd (https://www.centralnic.com) Access to the Whois and RDAP services is rate limited. For more information, visit https://registrar-console.centralnic.com/pub/whois_guidance." #domain %s == "siyenza.za.com" #domain_id - %s == "CNIC-DO333077" + %s == "D333077-CNIC" #status - %s == ["ok"] + %s == :registered #available? %s == false @@ -25,16 +25,16 @@ #updated_on %s %CLASS{time} - %s %TIME{2013-12-03 12:33:13 UTC} + %s %TIME{2019-01-30 08:43:57 UTC} #expires_on %s %CLASS{time} - %s %TIME{2014-11-17 23:59:59 UTC} + %s %TIME{2022-11-17 23:59:59 UTC} #registrar %s %CLASS{registrar} - %s.id == "C12112" + %s.id == "" %s.name == "Megaweb Internet Services" %s.url == "http://www.megaweb.co.za/" @@ -43,54 +43,21 @@ %s %SIZE{1} %s[0] %CLASS{contact} %s[0].type == Whois::Parser::Contact::TYPE_REGISTRANT - %s[0].id == "H1063006" - %s[0].name == "MegaWeb Internet Services cc" - %s[0].organization == nil - %s[0].address == "PO Box 3738\nCramerview" - %s[0].city == nil - %s[0].zip == "2060" - %s[0].state == nil - %s[0].country == nil - %s[0].country_code == "ZA" - %s[0].phone == "+27.0114851984" - %s[0].fax == "+27.0114855999" - %s[0].email == "dns-admin@megaweb.co.za" + %s[0].email == "https://whois.centralnic.com/contact/siyenza.za.com/registrant" #admin_contacts %s %CLASS{array} %s %SIZE{1} %s[0] %CLASS{contact} %s[0].type == Whois::Parser::Contact::TYPE_ADMINISTRATIVE - %s[0].id == "H119106" - %s[0].name == "Liz Hart" - %s[0].organization == "Siyenza Management" - %s[0].address == "PO Box 3738\nCramerview" - %s[0].city == nil - %s[0].zip == "2060" - %s[0].state == nil - %s[0].country == nil - %s[0].country_code == "ZA" - %s[0].phone == "+27.0114851984" - %s[0].fax == "+27.0114855999" - %s[0].email == "dns-admin@megaweb.co.za" + %s[0].email == "https://whois.centralnic.com/contact/siyenza.za.com/admin" #technical_contacts %s %CLASS{array} %s %SIZE{1} %s[0] %CLASS{contact} %s[0].type == Whois::Parser::Contact::TYPE_TECHNICAL - %s[0].id == "C12112" - %s[0].name == "Laida Peters" - %s[0].organization == "Megaweb Internet Services" - %s[0].address == nil - %s[0].city == "Gauteng" - %s[0].zip == "2192" - %s[0].state == nil - %s[0].country == nil - %s[0].country_code == "ZA" - %s[0].phone == "+27.027114851984" - %s[0].fax == "+27.027114851986" - %s[0].email == "dns-admin@megaweb.co.za" + %s[0].email == "https://whois.centralnic.com/contact/siyenza.za.com/tech" #nameservers diff --git a/spec/fixtures/responses/whois.centralnic.com/za.com/status_registered.txt b/spec/fixtures/responses/whois.centralnic.com/za.com/status_registered.txt index 27cebec3..a2dd5f38 100644 --- a/spec/fixtures/responses/whois.centralnic.com/za.com/status_registered.txt +++ b/spec/fixtures/responses/whois.centralnic.com/za.com/status_registered.txt @@ -1,56 +1,39 @@ -Domain ID:CNIC-DO333077 -Domain Name:SIYENZA.ZA.COM -Created On:2004-11-17T11:47:29.0Z -Last Updated On:2013-12-03T12:33:13.0Z -Expiration Date:2014-11-17T23:59:59.0Z -Status:ok -Registrant ID:H1063006 -Registrant Name:MegaWeb Internet Services cc -Registrant Street1:PO Box 3738 -Registrant Street2:Cramerview -Registrant Postal Code:2060 -Registrant Country:ZA -Registrant Phone:+27.0114851984 -Registrant FAX:+27.0114855999 -Registrant Email:dns-admin@megaweb.co.za -Admin ID:H119106 -Admin Name:Liz Hart -Admin Organization:Siyenza Management -Admin Street1:PO Box 3738 -Admin Street2:Cramerview -Admin Postal Code:2060 -Admin Country:ZA -Admin Phone:+27.0114851984 -Admin FAX:+27.0114855999 -Admin Email:dns-admin@megaweb.co.za -Tech ID:C12112 -Tech Name:Laida Peters -Tech Organization:Megaweb Internet Services -Tech City:Gauteng -Tech Postal Code:2192 -Tech Country:ZA -Tech Phone:+27.027114851984 -Tech FAX:+27.027114851986 -Tech Email:dns-admin@megaweb.co.za -Sponsoring Registrar ID:C12112 -Sponsoring Registrar Organization:Megaweb Internet Services -Sponsoring Registrar City:Gauteng -Sponsoring Registrar Postal Code:2192 -Sponsoring Registrar Country:ZA -Sponsoring Registrar Phone:02711 485 1984 -Sponsoring Registrar FAX:02711 485 1986 -Sponsoring Registrar Website:http://www.megaweb.co.za/ -Name Server:NS1A.YOUR-SERVER.CO.ZA -Name Server:NSA.SECOND-NS.CO.ZA -DNSSEC:Unsigned +Domain Name: SIYENZA.ZA.COM +Registry Domain ID: D333077-CNIC +Registrar WHOIS Server: whois.megaweb.co.za +Registrar URL: http://www.megaweb.co.za/ +Updated Date: 2019-01-30T08:43:57.0Z +Creation Date: 2004-11-17T11:47:29.0Z +Registry Expiry Date: 2022-11-17T23:59:59.0Z +Registrar: Megaweb Internet Services +Registrar IANA ID: +Domain Status: ok https://icann.org/epp#ok +Domain Status: autoRenewPeriod https://icann.org/epp#autoRenewPeriod +Registrant Email: https://whois.centralnic.com/contact/siyenza.za.com/registrant +Admin Email: https://whois.centralnic.com/contact/siyenza.za.com/admin +Tech Email: https://whois.centralnic.com/contact/siyenza.za.com/tech +Name Server: NS1A.YOUR-SERVER.CO.ZA +Name Server: NSA.SECOND-NS.CO.ZA +DNSSEC: unsigned +Registrar Abuse Contact Email: dns-admin@megaweb.co.za +Registrar Abuse Contact Phone: +27.27114851984 +URL of the ICANN Whois Inaccuracy Complaint Form: https://www.icann.org/wicf/ +>>> Last update of WHOIS database: 2021-12-15T17:21:34.0Z <<< -This whois service is provided by CentralNic Ltd and only contains -information pertaining to Internet domain names we have registered for -our customers. By using this service you are agreeing (1) not to use any -information presented here for any purpose other than determining -ownership of domain names, (2) not to store or reproduce this data in -any way, (3) not to use any high-volume, automated, electronic processes -to obtain data from this service. Abuse of this service is monitored and -actions in contravention of these terms will result in being permanently -blacklisted. All data is (c) CentralNic Ltd https://www.centralnic.com/ +For more information on Whois status codes, please visit https://icann.org/epp +>>> IMPORTANT INFORMATION ABOUT THE DEPLOYMENT OF RDAP: please visit +https://www.centralnic.com/support/rdap <<< + +The Whois and RDAP services are provided by CentralNic, and contain +information pertaining to Internet domain names registered by our +our customers. By using this service you are agreeing (1) not to use any +information presented here for any purpose other than determining +ownership of domain names, (2) not to store or reproduce this data in +any way, (3) not to use any high-volume, automated, electronic processes +to obtain data from this service. Abuse of this service is monitored and +actions in contravention of these terms will result in being permanently +blacklisted. All data is (c) CentralNic Ltd (https://www.centralnic.com) + +Access to the Whois and RDAP services is rate limited. For more +information, visit https://registrar-console.centralnic.com/pub/whois_guidance. diff --git a/spec/fixtures/responses/whois.enom.com/status_registered.expected b/spec/fixtures/responses/whois.enom.com/status_registered.expected index 38d358b9..94c046a3 100644 --- a/spec/fixtures/responses/whois.enom.com/status_registered.expected +++ b/spec/fixtures/responses/whois.enom.com/status_registered.expected @@ -47,9 +47,9 @@ %s[0].state == "WA" %s[0].country == nil %s[0].country_code == "US" - %s[0].phone == "" - %s[0].fax == "" - %s[0].email == "" + %s[0].phone == nil + %s[0].fax == nil + %s[0].email == nil %s[0].created_on == nil %s[0].updated_on == nil diff --git a/spec/fixtures/responses/whois.nic.college/college/status_available.expected b/spec/fixtures/responses/whois.nic.college/college/status_available.expected index 2c3fe7a8..64c3bae5 100644 --- a/spec/fixtures/responses/whois.nic.college/college/status_available.expected +++ b/spec/fixtures/responses/whois.nic.college/college/status_available.expected @@ -1,5 +1,5 @@ #disclaimer - %s == nil + %s == "The Whois and RDAP services are provided by CentralNic, and contain information pertaining to Internet domain names registered by our our customers. By using this service you are agreeing (1) not to use any information presented here for any purpose other than determining ownership of domain names, (2) not to store or reproduce this data in any way, (3) not to use any high-volume, automated, electronic processes to obtain data from this service. Abuse of this service is monitored and actions in contravention of these terms will result in being permanently blacklisted. All data is (c) CentralNic Ltd (https://www.centralnic.com) Access to the Whois and RDAP services is rate limited. For more information, visit https://registrar-console.centralnic.com/pub/whois_guidance." #domain @@ -10,7 +10,7 @@ #status - %s == [] + %s == :available #available? %s == true diff --git a/spec/fixtures/responses/whois.nic.college/college/status_available.txt b/spec/fixtures/responses/whois.nic.college/college/status_available.txt index b1b30e98..f99ef237 100644 --- a/spec/fixtures/responses/whois.nic.college/college/status_available.txt +++ b/spec/fixtures/responses/whois.nic.college/college/status_available.txt @@ -1 +1,21 @@ -DOMAIN NOT FOUND +The queried object does not exist: DOMAIN NOT FOUND + +>>> Last update of WHOIS database: 2021-12-15T18:03:37.0Z <<< + +For more information on Whois status codes, please visit https://icann.org/epp + +>>> IMPORTANT INFORMATION ABOUT THE DEPLOYMENT OF RDAP: please visit +https://www.centralnic.com/support/rdap <<< + +The Whois and RDAP services are provided by CentralNic, and contain +information pertaining to Internet domain names registered by our +our customers. By using this service you are agreeing (1) not to use any +information presented here for any purpose other than determining +ownership of domain names, (2) not to store or reproduce this data in +any way, (3) not to use any high-volume, automated, electronic processes +to obtain data from this service. Abuse of this service is monitored and +actions in contravention of these terms will result in being permanently +blacklisted. All data is (c) CentralNic Ltd (https://www.centralnic.com) + +Access to the Whois and RDAP services is rate limited. For more +information, visit https://registrar-console.centralnic.com/pub/whois_guidance. diff --git a/spec/fixtures/responses/whois.nic.college/college/status_registered.expected b/spec/fixtures/responses/whois.nic.college/college/status_registered.expected index ae2b2e3f..3ad63d88 100644 --- a/spec/fixtures/responses/whois.nic.college/college/status_registered.expected +++ b/spec/fixtures/responses/whois.nic.college/college/status_registered.expected @@ -1,5 +1,5 @@ #disclaimer - %s == "Access to the whois service is rate limited. For more information, please see https://registrar-console.centralnic.com/pub/whois_guidance." + %s == "The Whois and RDAP services are provided by CentralNic, and contain information pertaining to Internet domain names registered by our our customers. By using this service you are agreeing (1) not to use any information presented here for any purpose other than determining ownership of domain names, (2) not to store or reproduce this data in any way, (3) not to use any high-volume, automated, electronic processes to obtain data from this service. Abuse of this service is monitored and actions in contravention of these terms will result in being permanently blacklisted. All data is (c) CentralNic Ltd (https://www.centralnic.com) Access to the Whois and RDAP services is rate limited. For more information, visit https://registrar-console.centralnic.com/pub/whois_guidance." #domain @@ -10,7 +10,7 @@ #status - %s == ["serverTransferProhibited", "serverUpdateProhibited", "serverDeleteProhibited", "serverRenewProhibited"] + %s == :registered #available? %s == false @@ -21,102 +21,64 @@ #created_on %s %CLASS{time} - %s %TIME{2013-09-11 00:00:00 UTC} + %s %TIME{2013-09-11 11:58:15 UTC} #updated_on %s %CLASS{time} - %s %TIME{2014-09-12 00:15:47 UTC} + %s %TIME{2021-09-05 00:10:44 UTC} #expires_on %s %CLASS{time} - %s %TIME{2015-09-11 23:59:59 UTC} + %s %TIME{2022-09-11 23:59:59 UTC} #registrar %s %CLASS{registrar} %s.id == "9999" %s.name == "CentralNic Ltd" - %s.url == nil + %s.url == "https://www.centralnic.com/" #registrant_contacts %s %CLASS{array} %s %SIZE{1} %s[0] %CLASS{contact} %s[0].type == Whois::Parser::Contact::TYPE_REGISTRANT - %s[0].id == "H5178905" - %s[0].name == "Domain Administrator" + %s[0].id == nil + %s[0].name == nil %s[0].organization == "XYZ.COM LLC" - %s[0].address == "2121 E Tropicana Ave Suite #2" - %s[0].city == "Las Vegas" - %s[0].zip == "89119" + %s[0].address == nil + %s[0].city == nil + %s[0].zip == nil %s[0].state == "NV" %s[0].country == nil %s[0].country_code == "US" - %s[0].phone == "+1.8009998422" - %s[0].fax == "+1.7023578299" - %s[0].email == "icann@xyz.com" + %s[0].phone == nil + %s[0].fax == nil + %s[0].email == "Please query the RDDS service of the Registrar of Record identified in this output for information on how to contact the Registrant, Admin, or Tech contact of the queried domain name." #admin_contacts %s %CLASS{array} %s %SIZE{1} %s[0] %CLASS{contact} %s[0].type == Whois::Parser::Contact::TYPE_ADMINISTRATIVE - %s[0].id == "H5178905" - %s[0].name == "Domain Administrator" - %s[0].organization == "XYZ.COM LLC" - %s[0].address == "2121 E Tropicana Ave Suite #2" - %s[0].city == "Las Vegas" - %s[0].zip == "89119" - %s[0].state == "NV" - %s[0].country == nil - %s[0].country_code == "US" - %s[0].phone == "+1.8009998422" - %s[0].fax == "+1.7023578299" - %s[0].email == "icann@xyz.com" + %s[0].email == "Please query the RDDS service of the Registrar of Record identified in this output for information on how to contact the Registrant, Admin, or Tech contact of the queried domain name." #technical_contacts %s %CLASS{array} %s %SIZE{1} %s[0] %CLASS{contact} %s[0].type == Whois::Parser::Contact::TYPE_TECHNICAL - %s[0].id == "H5178905" - %s[0].name == "Domain Administrator" - %s[0].organization == "XYZ.COM LLC" - %s[0].address == "2121 E Tropicana Ave Suite #2" - %s[0].city == "Las Vegas" - %s[0].zip == "89119" - %s[0].state == "NV" - %s[0].country == nil - %s[0].country_code == "US" - %s[0].phone == "+1.8009998422" - %s[0].fax == "+1.7023578299" - %s[0].email == "icann@xyz.com" + %s[0].email == "Please query the RDDS service of the Registrar of Record identified in this output for information on how to contact the Registrant, Admin, or Tech contact of the queried domain name." #nameservers %s %CLASS{array} - %s %SIZE{6} + %s %SIZE{4} %s[0] %CLASS{nameserver} - %s[0].name == "ns0.centralnic-dns.com" - %s[0].ipv4 == nil - %s[0].ipv6 == nil + %s[0].name == "a.nic.college" %s[1] %CLASS{nameserver} - %s[1].name == "ns1.centralnic-dns.com" - %s[1].ipv4 == nil - %s[1].ipv6 == nil + %s[1].name == "b.nic.college" %s[2] %CLASS{nameserver} - %s[2].name == "ns2.centralnic-dns.com" - %s[2].ipv4 == nil - %s[2].ipv6 == nil + %s[2].name == "c.nic.college" %s[3] %CLASS{nameserver} - %s[3].name == "ns3.centralnic-dns.com" - %s[3].ipv4 == nil - %s[3].ipv6 == nil - %s[4] %CLASS{nameserver} - %s[4].name == "ns4.centralnic-dns.com" - %s[4].ipv4 == nil - %s[4].ipv6 == nil - %s[5] %CLASS{nameserver} - %s[5].name == "ns5.centralnic-dns.com" - %s[5].ipv4 == nil - %s[5].ipv6 == nil + %s[3].name == "d.nic.college" diff --git a/spec/fixtures/responses/whois.nic.college/college/status_registered.txt b/spec/fixtures/responses/whois.nic.college/college/status_registered.txt index 271cd914..0579a476 100644 --- a/spec/fixtures/responses/whois.nic.college/college/status_registered.txt +++ b/spec/fixtures/responses/whois.nic.college/college/status_registered.txt @@ -1,89 +1,47 @@ Domain Name: NIC.COLLEGE -Domain ID: D1465621-CNIC -WHOIS Server: whois.centralnic.com -Referral URL: http://www.centralnic.com/ -Updated Date: 2014-09-12T00:15:47.0Z -Creation Date: 2013-09-11T00:00:00.0Z -Registry Expiry Date: 2015-09-11T23:59:59.0Z -Sponsoring Registrar: CentralNic Ltd -Sponsoring Registrar IANA ID: 9999 -Domain Status: serverTransferProhibited -Domain Status: serverUpdateProhibited -Domain Status: serverDeleteProhibited -Domain Status: serverRenewProhibited -Registrant ID: H5178905 -Registrant Name: Domain Administrator +Registry Domain ID: D1465621-CNIC +Registrar WHOIS Server: whois.centralnic.com +Registrar URL: https://www.centralnic.com/ +Updated Date: 2021-09-05T00:10:44.0Z +Creation Date: 2013-09-11T11:58:15.0Z +Registry Expiry Date: 2022-09-11T23:59:59.0Z +Registrar: CentralNic Ltd +Registrar IANA ID: 9999 +Domain Status: serverTransferProhibited https://icann.org/epp#serverTransferProhibited +Domain Status: serverUpdateProhibited https://icann.org/epp#serverUpdateProhibited +Domain Status: serverDeleteProhibited https://icann.org/epp#serverDeleteProhibited +Domain Status: serverRenewProhibited https://icann.org/epp#serverRenewProhibited Registrant Organization: XYZ.COM LLC -Registrant Street: 2121 E Tropicana Ave Suite #2 -Registrant City: Las Vegas Registrant State/Province: NV -Registrant Postal Code: 89119 Registrant Country: US -Registrant Phone: +1.8009998422 -Registrant Phone Ext: -Registrant Fax: +1.7023578299 -Registrant Fax Ext: -Registrant Email: icann@xyz.com -Admin ID: H5178905 -Admin Name: Domain Administrator -Admin Organization: XYZ.COM LLC -Admin Street: 2121 E Tropicana Ave Suite #2 -Admin City: Las Vegas -Admin State/Province: NV -Admin Postal Code: 89119 -Admin Country: US -Admin Phone: +1.8009998422 -Admin Phone Ext: -Admin Fax: +1.7023578299 -Admin Fax Ext: -Admin Email: icann@xyz.com -Tech ID: H5178905 -Tech Name: Domain Administrator -Tech Organization: XYZ.COM LLC -Tech Street: 2121 E Tropicana Ave Suite #2 -Tech City: Las Vegas -Tech State/Province: NV -Tech Postal Code: 89119 -Tech Country: US -Tech Phone: +1.8009998422 -Tech Phone Ext: -Tech Fax: +1.7023578299 -Tech Fax Ext: -Tech Email: icann@xyz.com -Name Server: NS0.CENTRALNIC-DNS.COM -Name Server: NS1.CENTRALNIC-DNS.COM -Name Server: NS2.CENTRALNIC-DNS.COM -Name Server: NS3.CENTRALNIC-DNS.COM -Name Server: NS4.CENTRALNIC-DNS.COM -Name Server: NS5.CENTRALNIC-DNS.COM +Registrant Email: Please query the RDDS service of the Registrar of Record identified in this output for information on how to contact the Registrant, Admin, or Tech contact of the queried domain name. +Admin Email: Please query the RDDS service of the Registrar of Record identified in this output for information on how to contact the Registrant, Admin, or Tech contact of the queried domain name. +Tech Email: Please query the RDDS service of the Registrar of Record identified in this output for information on how to contact the Registrant, Admin, or Tech contact of the queried domain name. +Name Server: A.NIC.COLLEGE +Name Server: B.NIC.COLLEGE +Name Server: C.NIC.COLLEGE +Name Server: D.NIC.COLLEGE DNSSEC: unsigned -Billing ID: H5178905 -Billing Name: Domain Administrator -Billing Organization: XYZ.COM LLC -Billing Street: 2121 E Tropicana Ave Suite #2 -Billing City: Las Vegas -Billing State/Province: NV -Billing Postal Code: 89119 -Billing Country: US -Billing Phone: +1.8009998422 -Billing Phone Ext: -Billing Fax: +1.7023578299 -Billing Fax Ext: -Billing Email: icann@xyz.com ->>> Last update of WHOIS database: 2015-05-13T10:34:31.0Z <<< +Billing Email: Please query the RDDS service of the Registrar of Record identified in this output for information on how to contact the Registrant, Admin, or Tech contact of the queried domain name. +Registrar Abuse Contact Email: ops@centralnic.com +Registrar Abuse Contact Phone: +44.2033880600 +URL of the ICANN Whois Inaccuracy Complaint Form: https://www.icann.org/wicf/ +>>> Last update of WHOIS database: 2021-12-15T18:03:26.0Z <<< For more information on Whois status codes, please visit https://icann.org/epp -This whois service is provided by CentralNic Ltd and only contains +>>> IMPORTANT INFORMATION ABOUT THE DEPLOYMENT OF RDAP: please visit +https://www.centralnic.com/support/rdap <<< + +The Whois and RDAP services are provided by CentralNic, and contain information pertaining to Internet domain names registered by our our customers. By using this service you are agreeing (1) not to use any information presented here for any purpose other than determining -ownership of domain names, (2) not to store or reproduce this data in +ownership of domain names, (2) not to store or reproduce this data in any way, (3) not to use any high-volume, automated, electronic processes to obtain data from this service. Abuse of this service is monitored and actions in contravention of these terms will result in being permanently -blacklisted. All data is (c) CentralNic Ltd https://www.centralnic.com/ - -Access to the whois service is rate limited. For more information, please -see https://registrar-console.centralnic.com/pub/whois_guidance. +blacklisted. All data is (c) CentralNic Ltd (https://www.centralnic.com) +Access to the Whois and RDAP services is rate limited. For more +information, visit https://registrar-console.centralnic.com/pub/whois_guidance. diff --git a/spec/fixtures/responses/whois.nic.design/design/status_available.expected b/spec/fixtures/responses/whois.nic.design/design/status_available.expected index 2c3fe7a8..64c3bae5 100644 --- a/spec/fixtures/responses/whois.nic.design/design/status_available.expected +++ b/spec/fixtures/responses/whois.nic.design/design/status_available.expected @@ -1,5 +1,5 @@ #disclaimer - %s == nil + %s == "The Whois and RDAP services are provided by CentralNic, and contain information pertaining to Internet domain names registered by our our customers. By using this service you are agreeing (1) not to use any information presented here for any purpose other than determining ownership of domain names, (2) not to store or reproduce this data in any way, (3) not to use any high-volume, automated, electronic processes to obtain data from this service. Abuse of this service is monitored and actions in contravention of these terms will result in being permanently blacklisted. All data is (c) CentralNic Ltd (https://www.centralnic.com) Access to the Whois and RDAP services is rate limited. For more information, visit https://registrar-console.centralnic.com/pub/whois_guidance." #domain @@ -10,7 +10,7 @@ #status - %s == [] + %s == :available #available? %s == true diff --git a/spec/fixtures/responses/whois.nic.design/design/status_available.txt b/spec/fixtures/responses/whois.nic.design/design/status_available.txt index b1b30e98..d8a8400e 100644 --- a/spec/fixtures/responses/whois.nic.design/design/status_available.txt +++ b/spec/fixtures/responses/whois.nic.design/design/status_available.txt @@ -1 +1,21 @@ -DOMAIN NOT FOUND +The queried object does not exist: DOMAIN NOT FOUND + +>>> Last update of WHOIS database: 2021-12-15T18:08:22.0Z <<< + +For more information on Whois status codes, please visit https://icann.org/epp + +>>> IMPORTANT INFORMATION ABOUT THE DEPLOYMENT OF RDAP: please visit +https://www.centralnic.com/support/rdap <<< + +The Whois and RDAP services are provided by CentralNic, and contain +information pertaining to Internet domain names registered by our +our customers. By using this service you are agreeing (1) not to use any +information presented here for any purpose other than determining +ownership of domain names, (2) not to store or reproduce this data in +any way, (3) not to use any high-volume, automated, electronic processes +to obtain data from this service. Abuse of this service is monitored and +actions in contravention of these terms will result in being permanently +blacklisted. All data is (c) CentralNic Ltd (https://www.centralnic.com) + +Access to the Whois and RDAP services is rate limited. For more +information, visit https://registrar-console.centralnic.com/pub/whois_guidance. diff --git a/spec/fixtures/responses/whois.nic.design/design/status_registered.expected b/spec/fixtures/responses/whois.nic.design/design/status_registered.expected index bcee79cf..2c5339e4 100644 --- a/spec/fixtures/responses/whois.nic.design/design/status_registered.expected +++ b/spec/fixtures/responses/whois.nic.design/design/status_registered.expected @@ -1,16 +1,16 @@ #disclaimer - %s == "Access to the whois service is rate limited. For more information, please see https://registrar-console.centralnic.com/pub/whois_guidance." + %s == "The Whois and RDAP services are provided by CentralNic, and contain information pertaining to Internet domain names registered by our our customers. By using this service you are agreeing (1) not to use any information presented here for any purpose other than determining ownership of domain names, (2) not to store or reproduce this data in any way, (3) not to use any high-volume, automated, electronic processes to obtain data from this service. Abuse of this service is monitored and actions in contravention of these terms will result in being permanently blacklisted. All data is (c) CentralNic Ltd (https://www.centralnic.com) Access to the Whois and RDAP services is rate limited. For more information, visit https://registrar-console.centralnic.com/pub/whois_guidance." #domain %s == "toplevel.design" #domain_id - %s == "D7069819-CNIC" + %s == "D44478444-CNIC" #status - %s == ["ok"] + %s == :registered #available? %s == false @@ -21,76 +21,54 @@ #created_on %s %CLASS{time} - %s %TIME{2015-02-27 16:08:32 UTC} + %s %TIME{2017-02-16 20:11:45 UTC} #updated_on %s %CLASS{time} - %s %TIME{2015-04-21 17:48:34 UTC} + %s %TIME{2021-08-30 22:42:53 UTC} #expires_on %s %CLASS{time} - %s %TIME{2016-02-27 23:59:59 UTC} + %s %TIME{2022-02-16 23:59:59 UTC} #registrar %s %CLASS{registrar} - %s.id == "9999" - %s.name == "Top Level Design, LLC" - %s.url == nil + %s.id == "1861" + %s.name == "Porkbun, LLC" + %s.url == "https://porkbun.com/" #registrant_contacts %s %CLASS{array} %s %SIZE{1} %s[0] %CLASS{contact} %s[0].type == Whois::Parser::Contact::TYPE_REGISTRANT - %s[0].id == "H4596017" - %s[0].name == "Domain Administrator" - %s[0].organization == "Top Level Design, LLC" - %s[0].address == "742 Ocean Club Place" - %s[0].city == "Fernandina Beach" - %s[0].zip == "32034" - %s[0].state == "Florida" + %s[0].id == nil + %s[0].name == nil + %s[0].organization == "Top Level Design LLC" + %s[0].address == nil + %s[0].city == nil + %s[0].zip == nil + %s[0].state == "Oregon" %s[0].country == nil %s[0].country_code == "US" - %s[0].phone == "+1.5038888808" - %s[0].fax == "+1.6788841468" - %s[0].email == "ray@tldesign.co" + %s[0].phone == nil + %s[0].fax == nil + %s[0].email == "Please query the RDDS service of the Registrar of Record identified in this output for information on how to contact the Registrant, Admin, or Tech contact of the queried domain name." #admin_contacts %s %CLASS{array} %s %SIZE{1} %s[0] %CLASS{contact} %s[0].type == Whois::Parser::Contact::TYPE_ADMINISTRATIVE - %s[0].id == "H4596017" - %s[0].name == "Domain Administrator" - %s[0].organization == "Top Level Design, LLC" - %s[0].address == "742 Ocean Club Place" - %s[0].city == "Fernandina Beach" - %s[0].zip == "32034" - %s[0].state == "Florida" - %s[0].country == nil - %s[0].country_code == "US" - %s[0].phone == "+1.5038888808" - %s[0].fax == "+1.6788841468" - %s[0].email == "ray@tldesign.co" + %s[0].email == "Please query the RDDS service of the Registrar of Record identified in this output for information on how to contact the Registrant, Admin, or Tech contact of the queried domain name." #technical_contacts %s %CLASS{array} %s %SIZE{1} %s[0] %CLASS{contact} %s[0].type == Whois::Parser::Contact::TYPE_TECHNICAL - %s[0].id == "H4596017" - %s[0].name == "Domain Administrator" - %s[0].organization == "Top Level Design, LLC" - %s[0].address == "742 Ocean Club Place" - %s[0].city == "Fernandina Beach" - %s[0].zip == "32034" - %s[0].state == "Florida" - %s[0].country == nil - %s[0].country_code == "US" - %s[0].phone == "+1.5038888808" - %s[0].fax == "+1.6788841468" - %s[0].email == "ray@tldesign.co" + %s[0].email == "Please query the RDDS service of the Registrar of Record identified in this output for information on how to contact the Registrant, Admin, or Tech contact of the queried domain name." #nameservers @@ -98,17 +76,9 @@ %s %SIZE{4} %s[0] %CLASS{nameserver} %s[0].name == "ns-170.awsdns-21.com" - %s[0].ipv4 == nil - %s[0].ipv6 == nil %s[1] %CLASS{nameserver} %s[1].name == "ns-904.awsdns-49.net" - %s[1].ipv4 == nil - %s[1].ipv6 == nil %s[2] %CLASS{nameserver} %s[2].name == "ns-1067.awsdns-05.org" - %s[2].ipv4 == nil - %s[2].ipv6 == nil %s[3] %CLASS{nameserver} %s[3].name == "ns-1873.awsdns-42.co.uk" - %s[3].ipv4 == nil - %s[3].ipv6 == nil diff --git a/spec/fixtures/responses/whois.nic.design/design/status_registered.txt b/spec/fixtures/responses/whois.nic.design/design/status_registered.txt index f82ac8f3..2b87542d 100644 --- a/spec/fixtures/responses/whois.nic.design/design/status_registered.txt +++ b/spec/fixtures/responses/whois.nic.design/design/status_registered.txt @@ -1,84 +1,45 @@ Domain Name: TOPLEVEL.DESIGN -Domain ID: D7069819-CNIC -WHOIS Server: whois.nic.wiki -Referral URL: -Updated Date: 2015-04-21T17:48:34.0Z -Creation Date: 2015-02-27T16:08:32.0Z -Registry Expiry Date: 2016-02-27T23:59:59.0Z -Sponsoring Registrar: Top Level Design, LLC -Sponsoring Registrar IANA ID: 9999 -Domain Status: ok -Registrant ID: H4596017 -Registrant Name: Domain Administrator -Registrant Organization: Top Level Design, LLC -Registrant Street: 742 Ocean Club Place -Registrant City: Fernandina Beach -Registrant State/Province: Florida -Registrant Postal Code: 32034 +Registry Domain ID: D44478444-CNIC +Registrar WHOIS Server: whois.porkbun.com +Registrar URL: https://porkbun.com/ +Updated Date: 2021-08-30T22:42:53.0Z +Creation Date: 2017-02-16T20:11:45.0Z +Registry Expiry Date: 2022-02-16T23:59:59.0Z +Registrar: Porkbun, LLC +Registrar IANA ID: 1861 +Domain Status: clientTransferProhibited https://icann.org/epp#clientTransferProhibited +Domain Status: clientDeleteProhibited https://icann.org/epp#clientDeleteProhibited +Registrant Organization: Top Level Design LLC +Registrant State/Province: Oregon Registrant Country: US -Registrant Phone: +1.5038888808 -Registrant Phone Ext: -Registrant Fax: +1.6788841468 -Registrant Fax Ext: -Registrant Email: ray@tldesign.co -Admin ID: H4596017 -Admin Name: Domain Administrator -Admin Organization: Top Level Design, LLC -Admin Street: 742 Ocean Club Place -Admin City: Fernandina Beach -Admin State/Province: Florida -Admin Postal Code: 32034 -Admin Country: US -Admin Phone: +1.5038888808 -Admin Phone Ext: -Admin Fax: +1.6788841468 -Admin Fax Ext: -Admin Email: ray@tldesign.co -Tech ID: H4596017 -Tech Name: Domain Administrator -Tech Organization: Top Level Design, LLC -Tech Street: 742 Ocean Club Place -Tech City: Fernandina Beach -Tech State/Province: Florida -Tech Postal Code: 32034 -Tech Country: US -Tech Phone: +1.5038888808 -Tech Phone Ext: -Tech Fax: +1.6788841468 -Tech Fax Ext: -Tech Email: ray@tldesign.co +Registrant Email: Please query the RDDS service of the Registrar of Record identified in this output for information on how to contact the Registrant, Admin, or Tech contact of the queried domain name. +Admin Email: Please query the RDDS service of the Registrar of Record identified in this output for information on how to contact the Registrant, Admin, or Tech contact of the queried domain name. +Tech Email: Please query the RDDS service of the Registrar of Record identified in this output for information on how to contact the Registrant, Admin, or Tech contact of the queried domain name. Name Server: NS-170.AWSDNS-21.COM Name Server: NS-904.AWSDNS-49.NET Name Server: NS-1067.AWSDNS-05.ORG Name Server: NS-1873.AWSDNS-42.CO.UK DNSSEC: unsigned -Billing ID: H4596017 -Billing Name: Domain Administrator -Billing Organization: Top Level Design, LLC -Billing Street: 742 Ocean Club Place -Billing City: Fernandina Beach -Billing State/Province: Florida -Billing Postal Code: 32034 -Billing Country: US -Billing Phone: +1.5038888808 -Billing Phone Ext: -Billing Fax: +1.6788841468 -Billing Fax Ext: -Billing Email: ray@tldesign.co ->>> Last update of WHOIS database: 2015-05-13T10:09:55.0Z <<< +Billing Email: Please query the RDDS service of the Registrar of Record identified in this output for information on how to contact the Registrant, Admin, or Tech contact of the queried domain name. +Registrar Abuse Contact Email: abuse@porkbun.com +Registrar Abuse Contact Phone: +1.5038508351 +URL of the ICANN Whois Inaccuracy Complaint Form: https://www.icann.org/wicf/ +>>> Last update of WHOIS database: 2021-12-15T18:08:15.0Z <<< For more information on Whois status codes, please visit https://icann.org/epp -This whois service is provided by CentralNic Ltd and only contains +>>> IMPORTANT INFORMATION ABOUT THE DEPLOYMENT OF RDAP: please visit +https://www.centralnic.com/support/rdap <<< + +The Whois and RDAP services are provided by CentralNic, and contain information pertaining to Internet domain names registered by our our customers. By using this service you are agreeing (1) not to use any information presented here for any purpose other than determining -ownership of domain names, (2) not to store or reproduce this data in +ownership of domain names, (2) not to store or reproduce this data in any way, (3) not to use any high-volume, automated, electronic processes to obtain data from this service. Abuse of this service is monitored and actions in contravention of these terms will result in being permanently -blacklisted. All data is (c) CentralNic Ltd https://www.centralnic.com/ - -Access to the whois service is rate limited. For more information, please -see https://registrar-console.centralnic.com/pub/whois_guidance. +blacklisted. All data is (c) CentralNic Ltd (https://www.centralnic.com) +Access to the Whois and RDAP services is rate limited. For more +information, visit https://registrar-console.centralnic.com/pub/whois_guidance. diff --git a/spec/fixtures/responses/whois.nic.la/la/property_status_multiple.expected b/spec/fixtures/responses/whois.nic.la/la/property_status_multiple.expected deleted file mode 100644 index 3247ae0d..00000000 --- a/spec/fixtures/responses/whois.nic.la/la/property_status_multiple.expected +++ /dev/null @@ -1,2 +0,0 @@ -#status - %s == ["TRANSFER PROHIBITED", "RENEW PERIOD"] diff --git a/spec/fixtures/responses/whois.nic.la/la/property_status_multiple.txt b/spec/fixtures/responses/whois.nic.la/la/property_status_multiple.txt deleted file mode 100644 index 4807eb4c..00000000 --- a/spec/fixtures/responses/whois.nic.la/la/property_status_multiple.txt +++ /dev/null @@ -1,75 +0,0 @@ -This whois service is provided by CentralNic Ltd and only contains -information pertaining to Internet domain names we have registered for -our customers. By using this service you are agreeing (1) not to use any -information presented here for any purpose other than determining -ownership of domain names, (2) not to store or reproduce this data in -any way, (3) not to use any high-volume, automated, electronic processes -to obtain data from this service. Abuse of this service is monitored and -actions in contravention of these terms will result in being permanently -blacklisted. All data is (c) CentralNic Ltd https://www.centralnic.com/ - -Domain ID:CNIC-DO469366 -Domain Name:PLASTICSURGERY.LA -Created On:02-Feb-2004 01:00:00 UTC -Last Updated On:31-Mar-2010 12:43:59 UTC -Expiration Date:02-Feb-2017 23:59:59 UTC -Status:TRANSFER PROHIBITED -Status:RENEW PERIOD -Registrant ID:P-1901109 -Registrant Name:Jay Granzow -Registrant Organization:Jay Granzow -Registrant Street1:22930 Crenshaw Blvd. Suite D -Registrant City:Torrance -Registrant State/Province:CA -Registrant Postal Code:90505 -Registrant Country:US -Registrant Phone:+1.3105304200 -Registrant FAX:+1.3105301652 -Registrant Email:jwgranzow@gmail.com -Admin ID:P-1901109 -Admin Name:Jay Granzow -Admin Organization:Jay Granzow -Admin Street1:22930 Crenshaw Blvd. Suite D -Admin City:Torrance -Admin State/Province:CA -Admin Postal Code:90505 -Admin Country:US -Admin Phone:+1.3105304200 -Admin FAX:+1.3105301652 -Admin Email:jwgranzow@gmail.com -Tech ID:P-9055753 -Tech Name:Jay Granzow -Tech Organization:Jay Granzow -Tech Street1:22930 Crenshaw Blvd. Suite D -Tech City:Torrance -Tech State/Province:CA -Tech Postal Code:90505 -Tech Country:US -Tech Phone:+1.3105304200 -Tech FAX:+1.3105301652 -Tech Email:jwgranzow@yahoo.com -Billing ID:P-1901109 -Billing Name:Jay Granzow -Billing Organization:Jay Granzow -Billing Street1:22930 Crenshaw Blvd. Suite D -Billing City:Torrance -Billing State/Province:CA -Billing Postal Code:90505 -Billing Country:US -Billing Phone:+1.3105304200 -Billing FAX:+1.3105301652 -Billing Email:jwgranzow@gmail.com -Sponsoring Registrar ID:7091-KS -Sponsoring Registrar Organization:Key Systems GmbH -Sponsoring Registrar Street1:Im Oberen Werk 1 -Sponsoring Registrar City:St. Ingbert -Sponsoring Registrar Postal Code:66386 -Sponsoring Registrar Country:DE -Sponsoring Registrar Phone:+49.68949396850 -Sponsoring Registrar FAX:+49 (0)68949396851 -Sponsoring Registrar Website:http://www.key-systems.net/ -Name Server:NS2.SLCIT.COM -Name Server:NS1.SLCIT.COM -DNSSEC:Unsigned - - diff --git a/spec/fixtures/responses/whois.nic.la/la/property_status_single.expected b/spec/fixtures/responses/whois.nic.la/la/property_status_single.expected deleted file mode 100644 index 0075a8d4..00000000 --- a/spec/fixtures/responses/whois.nic.la/la/property_status_single.expected +++ /dev/null @@ -1,2 +0,0 @@ -#status - %s == ["OK"] diff --git a/spec/fixtures/responses/whois.nic.la/la/property_status_single.txt b/spec/fixtures/responses/whois.nic.la/la/property_status_single.txt deleted file mode 100644 index ef321e34..00000000 --- a/spec/fixtures/responses/whois.nic.la/la/property_status_single.txt +++ /dev/null @@ -1,70 +0,0 @@ -This whois service is provided by CentralNic Ltd and only contains information -pertaining to Internet domain names we have registered for our customers. By -using this service you are agreeing (1) not to use any information presented -here for any purpose other than determining ownership of domain names (2) not -to store or reproduce this data in any way. CentralNic Ltd - www.centralnic.com - -Domain ID:CNIC-DO471480 -Domain Name:GOOGLE.LA -Created On:18-Jul-2002 01:00:00 UTC -Last Updated On:15-Sep-2009 16:48:47 UTC -Expiration Date:18-Jul-2010 23:59:59 UTC -Status:OK -Registrant ID:ndn-96955 -Registrant Name:Google Inc -Registrant Organization:Google Inc -Registrant Street1:1600 Amphitheatre Parkway -Registrant City:Mountain View -Registrant State/Province:Ca -Registrant Postal Code:94043 -Registrant Country:US -Registrant Phone:+1.6502530000 -Registrant FAX:+1.65067188571 -Registrant Email:dns-admin@google.com -Admin ID:ndn-96955 -Admin Name:Google Inc -Admin Organization:Google Inc -Admin Street1:1600 Amphitheatre Parkway -Admin City:Mountain View -Admin State/Province:Ca -Admin Postal Code:94043 -Admin Country:US -Admin Phone:+1.6502530000 -Admin FAX:+1.65067188571 -Admin Email:dns-admin@google.com -Tech ID:ndn-96955 -Tech Name:Google Inc -Tech Organization:Google Inc -Tech Street1:1600 Amphitheatre Parkway -Tech City:Mountain View -Tech State/Province:Ca -Tech Postal Code:94043 -Tech Country:US -Tech Phone:+1.6502530000 -Tech FAX:+1.65067188571 -Tech Email:dns-admin@google.com -Billing ID:ndn-24412 -Billing Name:Domain Billing -Billing Organization:Markmonitor -Billing Street1:10400 Overland Rd. -Billing City:Boise -Billing State/Province:ID -Billing Postal Code:83709 -Billing Country:US -Billing Phone:+1.20838957 -Billing Email:ccops@markmonitor.com -Sponsoring Registrar ID:7279-LN -Sponsoring Registrar Organization:LA Registry Pte Ltd -Sponsoring Registrar Street1:120 Telok Ayer Street -Sponsoring Registrar City:Singapore -Sponsoring Registrar Postal Code:06859 -Sponsoring Registrar Country:SG -Sponsoring Registrar Phone:+44.8700170900 -Sponsoring Registrar FAX:+44.8700170901 -Sponsoring Registrar Website:http://www.la/ -Name Server:NS1.GOOGLE.COM -Name Server:NS2.GOOGLE.COM -Name Server:NS3.GOOGLE.COM -Name Server:NS4.GOOGLE.COM - - diff --git a/spec/fixtures/responses/whois.nic.la/la/status_available.expected b/spec/fixtures/responses/whois.nic.la/la/status_available.expected index 2c3fe7a8..c203a3b3 100644 --- a/spec/fixtures/responses/whois.nic.la/la/status_available.expected +++ b/spec/fixtures/responses/whois.nic.la/la/status_available.expected @@ -1,5 +1,5 @@ #disclaimer - %s == nil + %s == "This whois service is provided by LANIC and only contains information pertaining to Internet domain names registered by our our customers. By using this service you are agreeing (1) not to use any information presented here for any purpose other than determining ownership of domain names, (2) not to store or reproduce this data in any way, (3) not to use any high-volume, automated, electronic processes to obtain data from this service. Abuse of this service is monitored and actions in contravention of these terms will result in being permanently blacklisted. All data is (c) LANIC http://www.lanic.gov.la/ Access to the whois service is rate limited. For more information, please see https://registrar-console.lanic.la/pub/whois_guidance." #domain @@ -10,7 +10,7 @@ #status - %s == [] + %s == :available #available? %s == true diff --git a/spec/fixtures/responses/whois.nic.la/la/status_available.txt b/spec/fixtures/responses/whois.nic.la/la/status_available.txt index 09cc0f7e..2156c5a7 100644 --- a/spec/fixtures/responses/whois.nic.la/la/status_available.txt +++ b/spec/fixtures/responses/whois.nic.la/la/status_available.txt @@ -1 +1,18 @@ -DOMAIN NOT FOUND +The queried object does not exist: DOMAIN NOT FOUND + +>>> Last update of WHOIS database: 2021-12-16T10:39:33.0Z <<< + +For more information on Whois status codes, please visit https://icann.org/epp + +This whois service is provided by LANIC and only contains +information pertaining to Internet domain names registered by our +our customers. By using this service you are agreeing (1) not to use any +information presented here for any purpose other than determining +ownership of domain names, (2) not to store or reproduce this data in +any way, (3) not to use any high-volume, automated, electronic processes +to obtain data from this service. Abuse of this service is monitored and +actions in contravention of these terms will result in being permanently +blacklisted. All data is (c) LANIC http://www.lanic.gov.la/ + +Access to the whois service is rate limited. For more information, please +see https://registrar-console.lanic.la/pub/whois_guidance. diff --git a/spec/fixtures/responses/whois.nic.la/la/status_registered.expected b/spec/fixtures/responses/whois.nic.la/la/status_registered.expected index f454135e..7e278330 100644 --- a/spec/fixtures/responses/whois.nic.la/la/status_registered.expected +++ b/spec/fixtures/responses/whois.nic.la/la/status_registered.expected @@ -1,16 +1,16 @@ #disclaimer - %s == "This whois service is provided by CentralNic Ltd and only contains information pertaining to Internet domain names we have registered for our customers. By using this service you are agreeing (1) not to use any information presented here for any purpose other than determining ownership of domain names, (2) not to store or reproduce this data in any way, (3) not to use any high-volume, automated, electronic processes to obtain data from this service. Abuse of this service is monitored and actions in contravention of these terms will result in being permanently blacklisted. All data is (c) CentralNic Ltd https://www.centralnic.com/" + %s == "This whois service is provided by LANIC and only contains information pertaining to Internet domain names registered by our our customers. By using this service you are agreeing (1) not to use any information presented here for any purpose other than determining ownership of domain names, (2) not to store or reproduce this data in any way, (3) not to use any high-volume, automated, electronic processes to obtain data from this service. Abuse of this service is monitored and actions in contravention of these terms will result in being permanently blacklisted. All data is (c) LANIC http://www.lanic.gov.la/ Access to the whois service is rate limited. For more information, please see https://registrar-console.lanic.la/pub/whois_guidance." #domain %s == "google.la" #domain_id - %s == "CNIC-DO471480" + %s == "D471480-LANIC" #status - %s == ["clientTransferProhibited", "serverTransferProhibited"] + %s == :registered #available? %s == false @@ -25,72 +25,39 @@ #updated_on %s %CLASS{time} - %s %TIME{2013-08-01 15:09:21 UTC} + %s %TIME{2021-07-04 21:39:38 UTC} #expires_on %s %CLASS{time} - %s %TIME{2014-07-18 23:59:59 UTC} + %s %TIME{2022-07-18 23:59:59 UTC} #registrar %s %CLASS{registrar} - %s.id == "H2948863" + %s.id == "" %s.name == "TLD Registrar Solutions Ltd" - %s.url == "www.tldregistrarsolutions.com" + %s.url == "" #registrant_contacts %s %CLASS{array} %s %SIZE{1} %s[0] %CLASS{contact} %s[0].type == Whois::Parser::Contact::TYPE_REGISTRANT - %s[0].id == "ndn-96955" - %s[0].name == "Google Inc" - %s[0].organization == "Google Inc" - %s[0].address == "1600 Amphitheatre Parkway" - %s[0].city == "Mountain View" - %s[0].zip == "94043" - %s[0].state == "Ca" - %s[0].country == nil - %s[0].country_code == "US" - %s[0].phone == "+1.6502530000" - %s[0].fax == "+1.65067188571" - %s[0].email == "dns-admin@google.com" + %s[0].email == "https://whois.nic.la/contact/google.la/registrant" #admin_contacts %s %CLASS{array} %s %SIZE{1} %s[0] %CLASS{contact} %s[0].type == Whois::Parser::Contact::TYPE_ADMINISTRATIVE - %s[0].id == "ndn-96955" - %s[0].name == "Google Inc" - %s[0].organization == "Google Inc" - %s[0].address == "1600 Amphitheatre Parkway" - %s[0].city == "Mountain View" - %s[0].zip == "94043" - %s[0].state == "Ca" - %s[0].country == nil - %s[0].country_code == "US" - %s[0].phone == "+1.6502530000" - %s[0].fax == "+1.65067188571" - %s[0].email == "dns-admin@google.com" + %s[0].email == "https://whois.nic.la/contact/google.la/admin" #technical_contacts %s %CLASS{array} %s %SIZE{1} %s[0] %CLASS{contact} %s[0].type == Whois::Parser::Contact::TYPE_TECHNICAL - %s[0].id == "ndn-96955" - %s[0].name == "Google Inc" - %s[0].organization == "Google Inc" - %s[0].address == "1600 Amphitheatre Parkway" - %s[0].city == "Mountain View" - %s[0].zip == "94043" - %s[0].state == "Ca" - %s[0].country == nil - %s[0].country_code == "US" - %s[0].phone == "+1.6502530000" - %s[0].fax == "+1.65067188571" - %s[0].email == "dns-admin@google.com" + %s[0].email == "https://whois.nic.la/contact/google.la/tech" #nameservers diff --git a/spec/fixtures/responses/whois.nic.la/la/status_registered.txt b/spec/fixtures/responses/whois.nic.la/la/status_registered.txt index 59eefcf2..ce248f78 100644 --- a/spec/fixtures/responses/whois.nic.la/la/status_registered.txt +++ b/spec/fixtures/responses/whois.nic.la/la/status_registered.txt @@ -1,77 +1,38 @@ -Domain ID:CNIC-DO471480 -Domain Name:GOOGLE.LA -Created On:2002-07-18T01:00:00.0Z -Last Updated On:2013-08-01T15:09:21.0Z -Expiration Date:2014-07-18T23:59:59.0Z -Status:clientTransferProhibited -Status:serverTransferProhibited -Registrant ID:ndn-96955 -Registrant Name:Google Inc -Registrant Organization:Google Inc -Registrant Street1:1600 Amphitheatre Parkway -Registrant City:Mountain View -Registrant State/Province:Ca -Registrant Postal Code:94043 -Registrant Country:US -Registrant Phone:+1.6502530000 -Registrant FAX:+1.65067188571 -Registrant Email:dns-admin@google.com -Admin ID:ndn-96955 -Admin Name:Google Inc -Admin Organization:Google Inc -Admin Street1:1600 Amphitheatre Parkway -Admin City:Mountain View -Admin State/Province:Ca -Admin Postal Code:94043 -Admin Country:US -Admin Phone:+1.6502530000 -Admin FAX:+1.65067188571 -Admin Email:dns-admin@google.com -Tech ID:ndn-96955 -Tech Name:Google Inc -Tech Organization:Google Inc -Tech Street1:1600 Amphitheatre Parkway -Tech City:Mountain View -Tech State/Province:Ca -Tech Postal Code:94043 -Tech Country:US -Tech Phone:+1.6502530000 -Tech FAX:+1.65067188571 -Tech Email:dns-admin@google.com -Billing ID:LAREG-4FB6D5852C61F054 -Billing Name:MarkMonitor, Inc. -Billing Organization:MarkMonitor, Inc. -Billing Street1:391 N Ancestor Place -Billing City:Boise -Billing State/Province:ID -Billing Postal Code:83704 -Billing Country:US -Billing Phone:+1.2083895740 -Billing FAX:+1.2083895771 -Billing Email:ccopsbilling@markmonitor.com -Sponsoring Registrar ID:H2948863 -Sponsoring Registrar IANA ID:1564 -Sponsoring Registrar Organization:TLD Registrar Solutions Ltd -Sponsoring Registrar Street1:35-39 Moorgate -Sponsoring Registrar City:London -Sponsoring Registrar State/Province:London -Sponsoring Registrar Postal Code:EC2R 6AR -Sponsoring Registrar Country:GB -Sponsoring Registrar Phone:020 33 88 0600 -Sponsoring Registrar Website:www.tldregistrarsolutions.com -Name Server:NS1.GOOGLE.COM -Name Server:NS2.GOOGLE.COM -Name Server:NS3.GOOGLE.COM -Name Server:NS4.GOOGLE.COM -DNSSEC:Unsigned +Domain Name: GOOGLE.LA +Registry Domain ID: D471480-LANIC +Registrar WHOIS Server: +Registrar URL: +Updated Date: 2021-07-04T21:39:38.0Z +Creation Date: 2002-07-18T01:00:00.0Z +Registry Expiry Date: 2022-07-18T23:59:59.0Z +Registrar: TLD Registrar Solutions Ltd +Registrar IANA ID: +Domain Status: clientTransferProhibited https://icann.org/epp#clientTransferProhibited +Registrant Email: https://whois.nic.la/contact/google.la/registrant +Admin Email: https://whois.nic.la/contact/google.la/admin +Tech Email: https://whois.nic.la/contact/google.la/tech +Name Server: NS1.GOOGLE.COM +Name Server: NS2.GOOGLE.COM +Name Server: NS3.GOOGLE.COM +Name Server: NS4.GOOGLE.COM +DNSSEC: unsigned +Billing Email: https://whois.nic.la/contact/google.la/billing +Registrar Abuse Contact Email: abuse@centralnic.com +Registrar Abuse Contact Phone: +44.20338806 +URL of the ICANN Whois Inaccuracy Complaint Form: https://www.icann.org/wicf/ +>>> Last update of WHOIS database: 2021-12-16T09:38:33.0Z <<< -This whois service is provided by CentralNic Ltd and only contains -information pertaining to Internet domain names we have registered for -our customers. By using this service you are agreeing (1) not to use any -information presented here for any purpose other than determining -ownership of domain names, (2) not to store or reproduce this data in -any way, (3) not to use any high-volume, automated, electronic processes -to obtain data from this service. Abuse of this service is monitored and -actions in contravention of these terms will result in being permanently -blacklisted. All data is (c) CentralNic Ltd https://www.centralnic.com/ +For more information on Whois status codes, please visit https://icann.org/epp +This whois service is provided by LANIC and only contains +information pertaining to Internet domain names registered by our +our customers. By using this service you are agreeing (1) not to use any +information presented here for any purpose other than determining +ownership of domain names, (2) not to store or reproduce this data in +any way, (3) not to use any high-volume, automated, electronic processes +to obtain data from this service. Abuse of this service is monitored and +actions in contravention of these terms will result in being permanently +blacklisted. All data is (c) LANIC http://www.lanic.gov.la/ + +Access to the whois service is rate limited. For more information, please +see https://registrar-console.lanic.la/pub/whois_guidance. diff --git a/spec/fixtures/responses/whois.nic.online/online/status_available.expected b/spec/fixtures/responses/whois.nic.online/online/status_available.expected new file mode 100644 index 00000000..64c3bae5 --- /dev/null +++ b/spec/fixtures/responses/whois.nic.online/online/status_available.expected @@ -0,0 +1,50 @@ +#disclaimer + %s == "The Whois and RDAP services are provided by CentralNic, and contain information pertaining to Internet domain names registered by our our customers. By using this service you are agreeing (1) not to use any information presented here for any purpose other than determining ownership of domain names, (2) not to store or reproduce this data in any way, (3) not to use any high-volume, automated, electronic processes to obtain data from this service. Abuse of this service is monitored and actions in contravention of these terms will result in being permanently blacklisted. All data is (c) CentralNic Ltd (https://www.centralnic.com) Access to the Whois and RDAP services is rate limited. For more information, visit https://registrar-console.centralnic.com/pub/whois_guidance." + + +#domain + %s == nil + +#domain_id + %s == nil + + +#status + %s == :available + +#available? + %s == true + +#registered? + %s == false + + +#created_on + %s == nil + +#updated_on + %s == nil + +#expires_on + %s == nil + + +#registrar + %s == nil + +#registrant_contacts + %s %CLASS{array} + %s == [] + +#admin_contacts + %s %CLASS{array} + %s == [] + +#technical_contacts + %s %CLASS{array} + %s == [] + + +#nameservers + %s %CLASS{array} + %s == [] diff --git a/spec/fixtures/responses/whois.nic.online/online/status_available.txt b/spec/fixtures/responses/whois.nic.online/online/status_available.txt new file mode 100644 index 00000000..89913588 --- /dev/null +++ b/spec/fixtures/responses/whois.nic.online/online/status_available.txt @@ -0,0 +1,21 @@ +The queried object does not exist: DOMAIN NOT FOUND + +>>> Last update of WHOIS database: 2021-12-15T15:30:47.0Z <<< + +For more information on Whois status codes, please visit https://icann.org/epp + +>>> IMPORTANT INFORMATION ABOUT THE DEPLOYMENT OF RDAP: please visit +https://www.centralnic.com/support/rdap <<< + +The Whois and RDAP services are provided by CentralNic, and contain +information pertaining to Internet domain names registered by our +our customers. By using this service you are agreeing (1) not to use any +information presented here for any purpose other than determining +ownership of domain names, (2) not to store or reproduce this data in +any way, (3) not to use any high-volume, automated, electronic processes +to obtain data from this service. Abuse of this service is monitored and +actions in contravention of these terms will result in being permanently +blacklisted. All data is (c) CentralNic Ltd (https://www.centralnic.com) + +Access to the Whois and RDAP services is rate limited. For more +information, visit https://registrar-console.centralnic.com/pub/whois_guidance. diff --git a/spec/fixtures/responses/whois.nic.online/online/status_registered.expected b/spec/fixtures/responses/whois.nic.online/online/status_registered.expected new file mode 100644 index 00000000..a5263865 --- /dev/null +++ b/spec/fixtures/responses/whois.nic.online/online/status_registered.expected @@ -0,0 +1,106 @@ +#disclaimer + %s == "The Whois and RDAP services are provided by CentralNic, and contain information pertaining to Internet domain names registered by our our customers. By using this service you are agreeing (1) not to use any information presented here for any purpose other than determining ownership of domain names, (2) not to store or reproduce this data in any way, (3) not to use any high-volume, automated, electronic processes to obtain data from this service. Abuse of this service is monitored and actions in contravention of these terms will result in being permanently blacklisted. All data is (c) CentralNic Ltd (https://www.centralnic.com) Access to the Whois and RDAP services is rate limited. For more information, visit https://registrar-console.centralnic.com/pub/whois_guidance." + + +#domain + %s == "google.online" + +#domain_id + %s == "D9566483-CNIC" + + +#status + %s == :registered + +#available? + %s == false + +#registered? + %s == true + + +#created_on + %s %CLASS{time} + %s %TIME{2015-08-19 11:27:00 UTC} + +#updated_on + %s %CLASS{time} + %s %TIME{2021-08-25 01:16:45 UTC} + +#expires_on + %s %CLASS{time} + %s %TIME{2022-08-19 23:59:59 UTC} + + +#registrar + %s %CLASS{registrar} + %s.id == "292" + %s.name == "MarkMonitor, Inc (TLDs)" + %s.url == "" + +#registrant_contacts + %s %CLASS{array} + %s %SIZE{1} + %s[0] %CLASS{contact} + %s[0].type == Whois::Parser::Contact::TYPE_REGISTRANT + %s[0].id == nil + %s[0].name == nil + %s[0].organization == "Google LLC" + %s[0].address == nil + %s[0].city == nil + %s[0].zip == nil + %s[0].state == "CA" + %s[0].country == nil + %s[0].country_code == "US" + %s[0].phone == nil + %s[0].fax == nil + %s[0].email == "Please query the RDDS service of the Registrar of Record identified in this output for information on how to contact the Registrant, Admin, or Tech contact of the queried domain name." + +#admin_contacts + %s %CLASS{array} + %s %SIZE{1} + %s[0] %CLASS{contact} + %s[0].type == Whois::Parser::Contact::TYPE_ADMINISTRATIVE + %s[0].id == nil + %s[0].name == nil + %s[0].organization == nil + %s[0].address == nil + %s[0].city == nil + %s[0].zip == nil + %s[0].state == nil + %s[0].country == nil + %s[0].country_code == nil + %s[0].phone == nil + %s[0].fax == nil + %s[0].email == "Please query the RDDS service of the Registrar of Record identified in this output for information on how to contact the Registrant, Admin, or Tech contact of the queried domain name." + +#technical_contacts + %s %CLASS{array} + %s %SIZE{1} + %s[0] %CLASS{contact} + %s[0].type == Whois::Parser::Contact::TYPE_TECHNICAL + %s[0].id == nil + %s[0].name == nil + %s[0].organization == nil + %s[0].address == nil + %s[0].city == nil + %s[0].zip == nil + %s[0].state == nil + %s[0].country == nil + %s[0].country_code == nil + %s[0].phone == nil + %s[0].fax == nil + %s[0].email == "Please query the RDDS service of the Registrar of Record identified in this output for information on how to contact the Registrant, Admin, or Tech contact of the queried domain name." + + +#nameservers + %s %CLASS{array} + %s %SIZE{4} + %s[0] %CLASS{nameserver} + %s[0].name == "ns3.googledomains.com" + %s[1] %CLASS{nameserver} + %s[1].name == "ns1.googledomains.com" + %s[2] %CLASS{nameserver} + %s[2].name == "ns2.googledomains.com" + %s[3] %CLASS{nameserver} + %s[3].name == "ns4.googledomains.com" diff --git a/spec/fixtures/responses/whois.nic.online/online/status_registered.txt b/spec/fixtures/responses/whois.nic.online/online/status_registered.txt new file mode 100644 index 00000000..f28a030f --- /dev/null +++ b/spec/fixtures/responses/whois.nic.online/online/status_registered.txt @@ -0,0 +1,45 @@ +Domain Name: GOOGLE.ONLINE +Registry Domain ID: D9566483-CNIC +Registrar WHOIS Server: whois.markmonitor.com +Registrar URL: +Updated Date: 2021-08-25T01:16:45.0Z +Creation Date: 2015-08-19T11:27:00.0Z +Registry Expiry Date: 2022-08-19T23:59:59.0Z +Registrar: MarkMonitor, Inc (TLDs) +Registrar IANA ID: 292 +Domain Status: clientTransferProhibited https://icann.org/epp#clientTransferProhibited +Domain Status: clientUpdateProhibited https://icann.org/epp#clientUpdateProhibited +Domain Status: clientDeleteProhibited https://icann.org/epp#clientDeleteProhibited +Registrant Organization: Google LLC +Registrant State/Province: CA +Registrant Country: US +Registrant Email: Please query the RDDS service of the Registrar of Record identified in this output for information on how to contact the Registrant, Admin, or Tech contact of the queried domain name. +Admin Email: Please query the RDDS service of the Registrar of Record identified in this output for information on how to contact the Registrant, Admin, or Tech contact of the queried domain name. +Tech Email: Please query the RDDS service of the Registrar of Record identified in this output for information on how to contact the Registrant, Admin, or Tech contact of the queried domain name. +Name Server: NS3.GOOGLEDOMAINS.COM +Name Server: NS1.GOOGLEDOMAINS.COM +Name Server: NS2.GOOGLEDOMAINS.COM +Name Server: NS4.GOOGLEDOMAINS.COM +DNSSEC: unsigned +Registrar Abuse Contact Email: ccops@markmonitor.com +Registrar Abuse Contact Phone: +1.2083895740 +URL of the ICANN Whois Inaccuracy Complaint Form: https://www.icann.org/wicf/ +>>> Last update of WHOIS database: 2021-12-15T15:30:37.0Z <<< + +For more information on Whois status codes, please visit https://icann.org/epp + +>>> IMPORTANT INFORMATION ABOUT THE DEPLOYMENT OF RDAP: please visit +https://www.centralnic.com/support/rdap <<< + +The Whois and RDAP services are provided by CentralNic, and contain +information pertaining to Internet domain names registered by our +our customers. By using this service you are agreeing (1) not to use any +information presented here for any purpose other than determining +ownership of domain names, (2) not to store or reproduce this data in +any way, (3) not to use any high-volume, automated, electronic processes +to obtain data from this service. Abuse of this service is monitored and +actions in contravention of these terms will result in being permanently +blacklisted. All data is (c) CentralNic Ltd (https://www.centralnic.com) + +Access to the Whois and RDAP services is rate limited. For more +information, visit https://registrar-console.centralnic.com/pub/whois_guidance. diff --git a/spec/fixtures/responses/whois.nic.pw/pw/status_available.expected b/spec/fixtures/responses/whois.nic.pw/pw/status_available.expected index 2c3fe7a8..64c3bae5 100644 --- a/spec/fixtures/responses/whois.nic.pw/pw/status_available.expected +++ b/spec/fixtures/responses/whois.nic.pw/pw/status_available.expected @@ -1,5 +1,5 @@ #disclaimer - %s == nil + %s == "The Whois and RDAP services are provided by CentralNic, and contain information pertaining to Internet domain names registered by our our customers. By using this service you are agreeing (1) not to use any information presented here for any purpose other than determining ownership of domain names, (2) not to store or reproduce this data in any way, (3) not to use any high-volume, automated, electronic processes to obtain data from this service. Abuse of this service is monitored and actions in contravention of these terms will result in being permanently blacklisted. All data is (c) CentralNic Ltd (https://www.centralnic.com) Access to the Whois and RDAP services is rate limited. For more information, visit https://registrar-console.centralnic.com/pub/whois_guidance." #domain @@ -10,7 +10,7 @@ #status - %s == [] + %s == :available #available? %s == true diff --git a/spec/fixtures/responses/whois.nic.pw/pw/status_available.txt b/spec/fixtures/responses/whois.nic.pw/pw/status_available.txt index 09cc0f7e..57216f02 100644 --- a/spec/fixtures/responses/whois.nic.pw/pw/status_available.txt +++ b/spec/fixtures/responses/whois.nic.pw/pw/status_available.txt @@ -1 +1,21 @@ -DOMAIN NOT FOUND +The queried object does not exist: previous registration D10194332-CNIC was purged on 2016-12-16T06:35:25.0Z (DOMAIN NOT FOUND) + +>>> Last update of WHOIS database: 2021-12-16T10:47:34.0Z <<< + +For more information on Whois status codes, please visit https://icann.org/epp + +>>> IMPORTANT INFORMATION ABOUT THE DEPLOYMENT OF RDAP: please visit +https://www.centralnic.com/support/rdap <<< + +The Whois and RDAP services are provided by CentralNic, and contain +information pertaining to Internet domain names registered by our +our customers. By using this service you are agreeing (1) not to use any +information presented here for any purpose other than determining +ownership of domain names, (2) not to store or reproduce this data in +any way, (3) not to use any high-volume, automated, electronic processes +to obtain data from this service. Abuse of this service is monitored and +actions in contravention of these terms will result in being permanently +blacklisted. All data is (c) CentralNic Ltd (https://www.centralnic.com) + +Access to the Whois and RDAP services is rate limited. For more +information, visit https://registrar-console.centralnic.com/pub/whois_guidance. diff --git a/spec/fixtures/responses/whois.nic.pw/pw/status_registered.expected b/spec/fixtures/responses/whois.nic.pw/pw/status_registered.expected index e25216a3..636c4ec0 100644 --- a/spec/fixtures/responses/whois.nic.pw/pw/status_registered.expected +++ b/spec/fixtures/responses/whois.nic.pw/pw/status_registered.expected @@ -1,16 +1,16 @@ #disclaimer - %s == "This whois service is provided by CentralNic Ltd and only contains information pertaining to Internet domain names we have registered for our customers. By using this service you are agreeing (1) not to use any information presented here for any purpose other than determining ownership of domain names, (2) not to store or reproduce this data in any way, (3) not to use any high-volume, automated, electronic processes to obtain data from this service. Abuse of this service is monitored and actions in contravention of these terms will result in being permanently blacklisted. All data is (c) CentralNic Ltd https://www.centralnic.com/" + %s == "The Whois and RDAP services are provided by CentralNic, and contain information pertaining to Internet domain names registered by our our customers. By using this service you are agreeing (1) not to use any information presented here for any purpose other than determining ownership of domain names, (2) not to store or reproduce this data in any way, (3) not to use any high-volume, automated, electronic processes to obtain data from this service. Abuse of this service is monitored and actions in contravention of these terms will result in being permanently blacklisted. All data is (c) CentralNic Ltd (https://www.centralnic.com) Access to the Whois and RDAP services is rate limited. For more information, visit https://registrar-console.centralnic.com/pub/whois_guidance." #domain %s == "google.pw" #domain_id - %s == "CNIC-DO949924" + %s == "D949924-CNIC" #status - %s == ["clientTransferProhibited", "clientUpdateProhibited", "clientDeleteProhibited", "serverTransferProhibited"] + %s == :registered #available? %s == false @@ -25,102 +25,41 @@ #updated_on %s %CLASS{time} - %s %TIME{2014-01-18 00:13:36 UTC} + %s %TIME{2021-02-04 15:18:38 UTC} #expires_on %s %CLASS{time} - %s %TIME{2017-02-10 23:59:59 UTC} + %s %TIME{2022-02-10 23:59:59 UTC} #registrar %s %CLASS{registrar} - %s.id == "7061-EM" + %s.id == "292" %s.name == "MarkMonitor, Inc." - %s.url == "http://www.markmonitor.com/" + %s.url == "" #registrant_contacts %s %CLASS{array} %s %SIZE{1} %s[0] %CLASS{contact} %s[0].type == Whois::Parser::Contact::TYPE_REGISTRANT - %s[0].id == "H2396041" - %s[0].name == "DNS Admin - Google Inc" - %s[0].organization == "Google Inc" - %s[0].address == "1600 Amphitheatre Parkway" - %s[0].city == "Mountain View" - %s[0].zip == "94043" - %s[0].state == "CA" - %s[0].country == nil - %s[0].country_code == "US" - %s[0].phone == "+1.6502530000" - %s[0].fax == "+1.6502530001" - %s[0].email == "dns-admin@google.com" + %s[0].email == "https://whois.nic.pw/contact/google.pw/registrant" #admin_contacts %s %CLASS{array} %s %SIZE{1} %s[0] %CLASS{contact} %s[0].type == Whois::Parser::Contact::TYPE_ADMINISTRATIVE - %s[0].id == "H2396041" - %s[0].name == "DNS Admin - Google Inc" - %s[0].organization == "Google Inc" - %s[0].address == "1600 Amphitheatre Parkway" - %s[0].city == "Mountain View" - %s[0].zip == "94043" - %s[0].state == "CA" - %s[0].country == nil - %s[0].country_code == "US" - %s[0].phone == "+1.6502530000" - %s[0].fax == "+1.6502530001" - %s[0].email == "dns-admin@google.com" + %s[0].email == "https://whois.nic.pw/contact/google.pw/admin" #technical_contacts %s %CLASS{array} %s %SIZE{1} %s[0] %CLASS{contact} %s[0].type == Whois::Parser::Contact::TYPE_TECHNICAL - %s[0].id == "H2396041" - %s[0].name == "DNS Admin - Google Inc" - %s[0].organization == "Google Inc" - %s[0].address == "1600 Amphitheatre Parkway" - %s[0].city == "Mountain View" - %s[0].zip == "94043" - %s[0].state == "CA" - %s[0].country == nil - %s[0].country_code == "US" - %s[0].phone == "+1.6502530000" - %s[0].fax == "+1.6502530001" - %s[0].email == "dns-admin@google.com" + %s[0].email == "https://whois.nic.pw/contact/google.pw/tech" #nameservers %s %CLASS{array} - %s %SIZE{7} - %s[0] %CLASS{nameserver} - %s[0].name == "ns1.markmonitor.com" - %s[0].ipv4 == nil - %s[0].ipv6 == nil - %s[1] %CLASS{nameserver} - %s[1].name == "ns2.markmonitor.com" - %s[1].ipv4 == nil - %s[1].ipv6 == nil - %s[2] %CLASS{nameserver} - %s[2].name == "ns3.markmonitor.com" - %s[2].ipv4 == nil - %s[2].ipv6 == nil - %s[3] %CLASS{nameserver} - %s[3].name == "ns4.markmonitor.com" - %s[3].ipv4 == nil - %s[3].ipv6 == nil - %s[4] %CLASS{nameserver} - %s[4].name == "ns5.markmonitor.com" - %s[4].ipv4 == nil - %s[4].ipv6 == nil - %s[5] %CLASS{nameserver} - %s[5].name == "ns6.markmonitor.com" - %s[5].ipv4 == nil - %s[5].ipv6 == nil - %s[6] %CLASS{nameserver} - %s[6].name == "ns7.markmonitor.com" - %s[6].ipv4 == nil - %s[6].ipv6 == nil + %s %SIZE{0} diff --git a/spec/fixtures/responses/whois.nic.pw/pw/status_registered.txt b/spec/fixtures/responses/whois.nic.pw/pw/status_registered.txt index e60c3bfe..0cad9f25 100644 --- a/spec/fixtures/responses/whois.nic.pw/pw/status_registered.txt +++ b/spec/fixtures/responses/whois.nic.pw/pw/status_registered.txt @@ -1,85 +1,40 @@ -Domain ID:CNIC-DO949924 -Domain Name:GOOGLE.PW -Created On:2012-10-12T10:19:46.0Z -Last Updated On:2014-01-18T00:13:36.0Z -Expiration Date:2017-02-10T23:59:59.0Z -Status:clientTransferProhibited -Status:clientUpdateProhibited -Status:clientDeleteProhibited -Status:serverTransferProhibited -Registrant ID:H2396041 -Registrant Name:DNS Admin - Google Inc -Registrant Organization:Google Inc -Registrant Street1:1600 Amphitheatre Parkway -Registrant City:Mountain View -Registrant State/Province:CA -Registrant Postal Code:94043 -Registrant Country:US -Registrant Phone:+1.6502530000 -Registrant FAX:+1.6502530001 -Registrant Email:dns-admin@google.com -Admin ID:H2396041 -Admin Name:DNS Admin - Google Inc -Admin Organization:Google Inc -Admin Street1:1600 Amphitheatre Parkway -Admin City:Mountain View -Admin State/Province:CA -Admin Postal Code:94043 -Admin Country:US -Admin Phone:+1.6502530000 -Admin FAX:+1.6502530001 -Admin Email:dns-admin@google.com -Tech ID:H2396041 -Tech Name:DNS Admin - Google Inc -Tech Organization:Google Inc -Tech Street1:1600 Amphitheatre Parkway -Tech City:Mountain View -Tech State/Province:CA -Tech Postal Code:94043 -Tech Country:US -Tech Phone:+1.6502530000 -Tech FAX:+1.6502530001 -Tech Email:dns-admin@google.com -Billing ID:7061-EM -Billing Name:Domain Administrator -Billing Organization:MarkMonitor, Inc. -Billing Street1:Emerald Tech Center -Billing Street2:391 N. Ancestor Place -Billing City:Boise -Billing State/Province:ID -Billing Postal Code:83704 -Billing Country:US -Billing Phone:+1.2083895740 -Billing FAX:+1.2083895771 -Billing Email:ccops@markmonitor.com -Sponsoring Registrar ID:7061-EM -Sponsoring Registrar IANA ID:292 -Sponsoring Registrar Organization:MarkMonitor, Inc. -Sponsoring Registrar Street1:Emerald Tech Center -Sponsoring Registrar Street2:391 N. Ancestor Place -Sponsoring Registrar City:Boise -Sponsoring Registrar State/Province:ID -Sponsoring Registrar Postal Code:83704 -Sponsoring Registrar Country:US -Sponsoring Registrar Phone:+1.2083895740 -Sponsoring Registrar FAX:+1.2083895771 -Sponsoring Registrar Website:http://www.markmonitor.com/ -Name Server:NS1.MARKMONITOR.COM -Name Server:NS2.MARKMONITOR.COM -Name Server:NS3.MARKMONITOR.COM -Name Server:NS4.MARKMONITOR.COM -Name Server:NS5.MARKMONITOR.COM -Name Server:NS6.MARKMONITOR.COM -Name Server:NS7.MARKMONITOR.COM -DNSSEC:Unsigned +Domain Name: GOOGLE.PW +Registry Domain ID: D949924-CNIC +Registrar WHOIS Server: whois.markmonitor.com +Registrar URL: +Updated Date: 2021-02-04T15:18:38.0Z +Creation Date: 2012-10-12T10:19:46.0Z +Registry Expiry Date: 2022-02-10T23:59:59.0Z +Registrar: MarkMonitor, Inc. +Registrar IANA ID: 292 +Domain Status: clientTransferProhibited https://icann.org/epp#clientTransferProhibited +Domain Status: clientUpdateProhibited https://icann.org/epp#clientUpdateProhibited +Domain Status: clientDeleteProhibited https://icann.org/epp#clientDeleteProhibited +Domain Status: inactive https://icann.org/epp#inactive +Registrant Email: https://whois.nic.pw/contact/google.pw/registrant +Admin Email: https://whois.nic.pw/contact/google.pw/admin +Tech Email: https://whois.nic.pw/contact/google.pw/tech +Name Server: +DNSSEC: unsigned +Registrar Abuse Contact Email: ccops@markmonitor.com +Registrar Abuse Contact Phone: +1.2083895740 +URL of the ICANN Whois Inaccuracy Complaint Form: https://www.icann.org/wicf/ +>>> Last update of WHOIS database: 2021-12-16T10:47:36.0Z <<< -This whois service is provided by CentralNic Ltd and only contains -information pertaining to Internet domain names we have registered for -our customers. By using this service you are agreeing (1) not to use any -information presented here for any purpose other than determining -ownership of domain names, (2) not to store or reproduce this data in -any way, (3) not to use any high-volume, automated, electronic processes -to obtain data from this service. Abuse of this service is monitored and -actions in contravention of these terms will result in being permanently -blacklisted. All data is (c) CentralNic Ltd https://www.centralnic.com/ +For more information on Whois status codes, please visit https://icann.org/epp +>>> IMPORTANT INFORMATION ABOUT THE DEPLOYMENT OF RDAP: please visit +https://www.centralnic.com/support/rdap <<< + +The Whois and RDAP services are provided by CentralNic, and contain +information pertaining to Internet domain names registered by our +our customers. By using this service you are agreeing (1) not to use any +information presented here for any purpose other than determining +ownership of domain names, (2) not to store or reproduce this data in +any way, (3) not to use any high-volume, automated, electronic processes +to obtain data from this service. Abuse of this service is monitored and +actions in contravention of these terms will result in being permanently +blacklisted. All data is (c) CentralNic Ltd (https://www.centralnic.com) + +Access to the Whois and RDAP services is rate limited. For more +information, visit https://registrar-console.centralnic.com/pub/whois_guidance. diff --git a/spec/fixtures/responses/whois.nic.space/space/status_available.expected b/spec/fixtures/responses/whois.nic.space/space/status_available.expected index 2c3fe7a8..64c3bae5 100644 --- a/spec/fixtures/responses/whois.nic.space/space/status_available.expected +++ b/spec/fixtures/responses/whois.nic.space/space/status_available.expected @@ -1,5 +1,5 @@ #disclaimer - %s == nil + %s == "The Whois and RDAP services are provided by CentralNic, and contain information pertaining to Internet domain names registered by our our customers. By using this service you are agreeing (1) not to use any information presented here for any purpose other than determining ownership of domain names, (2) not to store or reproduce this data in any way, (3) not to use any high-volume, automated, electronic processes to obtain data from this service. Abuse of this service is monitored and actions in contravention of these terms will result in being permanently blacklisted. All data is (c) CentralNic Ltd (https://www.centralnic.com) Access to the Whois and RDAP services is rate limited. For more information, visit https://registrar-console.centralnic.com/pub/whois_guidance." #domain @@ -10,7 +10,7 @@ #status - %s == [] + %s == :available #available? %s == true diff --git a/spec/fixtures/responses/whois.nic.space/space/status_available.txt b/spec/fixtures/responses/whois.nic.space/space/status_available.txt index 09cc0f7e..31b21ab4 100644 --- a/spec/fixtures/responses/whois.nic.space/space/status_available.txt +++ b/spec/fixtures/responses/whois.nic.space/space/status_available.txt @@ -1 +1,21 @@ -DOMAIN NOT FOUND +The queried object does not exist: DOMAIN NOT FOUND + +>>> Last update of WHOIS database: 2021-12-16T10:59:29.0Z <<< + +For more information on Whois status codes, please visit https://icann.org/epp + +>>> IMPORTANT INFORMATION ABOUT THE DEPLOYMENT OF RDAP: please visit +https://www.centralnic.com/support/rdap <<< + +The Whois and RDAP services are provided by CentralNic, and contain +information pertaining to Internet domain names registered by our +our customers. By using this service you are agreeing (1) not to use any +information presented here for any purpose other than determining +ownership of domain names, (2) not to store or reproduce this data in +any way, (3) not to use any high-volume, automated, electronic processes +to obtain data from this service. Abuse of this service is monitored and +actions in contravention of these terms will result in being permanently +blacklisted. All data is (c) CentralNic Ltd (https://www.centralnic.com) + +Access to the Whois and RDAP services is rate limited. For more +information, visit https://registrar-console.centralnic.com/pub/whois_guidance. diff --git a/spec/fixtures/responses/whois.nic.space/space/status_registered.expected b/spec/fixtures/responses/whois.nic.space/space/status_registered.expected index a7478646..673896cd 100644 --- a/spec/fixtures/responses/whois.nic.space/space/status_registered.expected +++ b/spec/fixtures/responses/whois.nic.space/space/status_registered.expected @@ -1,5 +1,5 @@ #disclaimer - %s == "Access to the whois service is rate limited. For more information, please see https://registrar-console.centralnic.com/pub/whois_guidance." + %s == "The Whois and RDAP services are provided by CentralNic, and contain information pertaining to Internet domain names registered by our our customers. By using this service you are agreeing (1) not to use any information presented here for any purpose other than determining ownership of domain names, (2) not to store or reproduce this data in any way, (3) not to use any high-volume, automated, electronic processes to obtain data from this service. Abuse of this service is monitored and actions in contravention of these terms will result in being permanently blacklisted. All data is (c) CentralNic Ltd (https://www.centralnic.com) Access to the Whois and RDAP services is rate limited. For more information, visit https://registrar-console.centralnic.com/pub/whois_guidance." #domain @@ -10,7 +10,7 @@ #status - %s == ["ok https://icann.org/epp#ok"] + %s == :registered #available? %s == false @@ -21,96 +21,83 @@ #created_on %s %CLASS{time} - %s %TIME{2014-04-10T09:14:07.0Z} + %s %TIME{2014-04-10 09:14:07 UTC} #updated_on %s %CLASS{time} - %s %TIME{2015-04-04T00:14:21.0Z} + %s %TIME{2021-06-01 11:38:04 UTC} #expires_on %s %CLASS{time} - %s %TIME{2016-04-10T23:59:59.0Z} + %s %TIME{2022-04-10 23:59:59 UTC} #registrar %s %CLASS{registrar} %s.id == "9999" %s.name == "CentralNic Ltd" - %s.url == nil + %s.url == "https://www.centralnic.com/" #registrant_contacts %s %CLASS{array} %s %SIZE{1} %s[0] %CLASS{contact} %s[0].type == Whois::Parser::Contact::TYPE_REGISTRANT - %s[0].id == "C11480" + %s[0].id == nil %s[0].name == "Domain Administrator" %s[0].organization == "CentralNic Ltd" %s[0].address == "35-39 Moorgate" %s[0].city == "London" %s[0].zip == "EC2R 6AR" %s[0].state == "" - %s[0].country == nil %s[0].country_code == "GB" %s[0].phone == "+44.2033880600" %s[0].fax == "+44.2033880601" %s[0].email == "domains@centralnic.com" - %s[0].created_on == nil - %s[0].updated_on == nil #admin_contacts %s %CLASS{array} %s %SIZE{1} %s[0] %CLASS{contact} %s[0].type == Whois::Parser::Contact::TYPE_ADMINISTRATIVE - %s[0].id == "C11480" + %s[0].id == nil %s[0].name == "Domain Administrator" %s[0].organization == "CentralNic Ltd" %s[0].address == "35-39 Moorgate" %s[0].city == "London" %s[0].zip == "EC2R 6AR" %s[0].state == "" - %s[0].country == nil %s[0].country_code == "GB" %s[0].phone == "+44.2033880600" %s[0].fax == "+44.2033880601" %s[0].email == "domains@centralnic.com" - %s[0].created_on == nil - %s[0].updated_on == nil #technical_contacts %s %CLASS{array} %s %SIZE{1} %s[0] %CLASS{contact} %s[0].type == Whois::Parser::Contact::TYPE_TECHNICAL - %s[0].id == "C11480" + %s[0].id == nil %s[0].name == "Domain Administrator" %s[0].organization == "CentralNic Ltd" %s[0].address == "35-39 Moorgate" %s[0].city == "London" %s[0].zip == "EC2R 6AR" %s[0].state == "" - %s[0].country == nil %s[0].country_code == "GB" %s[0].phone == "+44.2033880600" %s[0].fax == "+44.2033880601" %s[0].email == "domains@centralnic.com" - %s[0].created_on == nil - %s[0].updated_on == nil #nameservers %s %CLASS{array} - %s %SIZE{6} + %s %SIZE{4} %s[0] %CLASS{nameserver} - %s[0].name == "ns0.centralnic-dns.com" + %s[0].name == "a.nic.space" %s[1] %CLASS{nameserver} - %s[1].name == "ns1.centralnic-dns.com" + %s[1].name == "b.nic.space" %s[2] %CLASS{nameserver} - %s[2].name == "ns2.centralnic-dns.com" + %s[2].name == "e.nic.space" %s[3] %CLASS{nameserver} - %s[3].name == "ns3.centralnic-dns.com" - %s[4] %CLASS{nameserver} - %s[4].name == "ns4.centralnic-dns.com" - %s[5] %CLASS{nameserver} - %s[5].name == "ns5.centralnic-dns.com" + %s[3].name == "f.nic.space" diff --git a/spec/fixtures/responses/whois.nic.space/space/status_registered.txt b/spec/fixtures/responses/whois.nic.space/space/status_registered.txt index 66679c66..d61fad1e 100644 --- a/spec/fixtures/responses/whois.nic.space/space/status_registered.txt +++ b/spec/fixtures/responses/whois.nic.space/space/status_registered.txt @@ -1,86 +1,80 @@ Domain Name: NIC.SPACE -Domain ID: D2361836-CNIC -WHOIS Server: whois.centralnic.com -Referral URL: http://www.centralnic.com/ -Updated Date: 2015-04-04T00:14:21.0Z +Registry Domain ID: D2361836-CNIC +Registrar WHOIS Server: whois.centralnic.com +Registrar URL: https://www.centralnic.com/ +Updated Date: 2021-06-01T11:38:04.0Z Creation Date: 2014-04-10T09:14:07.0Z -Registry Expiry Date: 2016-04-10T23:59:59.0Z -Sponsoring Registrar: CentralNic Ltd -Sponsoring Registrar IANA ID: 9999 -Domain Status: ok https://icann.org/epp#ok -Registrant ID: C11480 +Registry Expiry Date: 2022-04-10T23:59:59.0Z +Registrar: CentralNic Ltd +Registrar IANA ID: 9999 +Domain Status: serverTransferProhibited https://icann.org/epp#serverTransferProhibited +Domain Status: serverUpdateProhibited https://icann.org/epp#serverUpdateProhibited +Domain Status: serverDeleteProhibited https://icann.org/epp#serverDeleteProhibited +Domain Status: serverRenewProhibited https://icann.org/epp#serverRenewProhibited Registrant Name: Domain Administrator Registrant Organization: CentralNic Ltd Registrant Street: 35-39 Moorgate Registrant City: London -Registrant State/Province: +Registrant State/Province: Registrant Postal Code: EC2R 6AR Registrant Country: GB Registrant Phone: +44.2033880600 -Registrant Phone Ext: Registrant Fax: +44.2033880601 -Registrant Fax Ext: Registrant Email: domains@centralnic.com -Admin ID: C11480 Admin Name: Domain Administrator Admin Organization: CentralNic Ltd Admin Street: 35-39 Moorgate Admin City: London -Admin State/Province: +Admin State/Province: Admin Postal Code: EC2R 6AR Admin Country: GB Admin Phone: +44.2033880600 -Admin Phone Ext: Admin Fax: +44.2033880601 -Admin Fax Ext: Admin Email: domains@centralnic.com -Tech ID: C11480 Tech Name: Domain Administrator Tech Organization: CentralNic Ltd Tech Street: 35-39 Moorgate Tech City: London -Tech State/Province: +Tech State/Province: Tech Postal Code: EC2R 6AR Tech Country: GB Tech Phone: +44.2033880600 -Tech Phone Ext: Tech Fax: +44.2033880601 -Tech Fax Ext: Tech Email: domains@centralnic.com -Name Server: NS0.CENTRALNIC-DNS.COM -Name Server: NS1.CENTRALNIC-DNS.COM -Name Server: NS2.CENTRALNIC-DNS.COM -Name Server: NS3.CENTRALNIC-DNS.COM -Name Server: NS4.CENTRALNIC-DNS.COM -Name Server: NS5.CENTRALNIC-DNS.COM +Name Server: A.NIC.SPACE +Name Server: B.NIC.SPACE +Name Server: E.NIC.SPACE +Name Server: F.NIC.SPACE DNSSEC: unsigned -Billing ID: C11480 Billing Name: Domain Administrator Billing Organization: CentralNic Ltd Billing Street: 35-39 Moorgate Billing City: London -Billing State/Province: +Billing State/Province: Billing Postal Code: EC2R 6AR Billing Country: GB Billing Phone: +44.2033880600 -Billing Phone Ext: Billing Fax: +44.2033880601 -Billing Fax Ext: Billing Email: domains@centralnic.com ->>> Last update of WHOIS database: 2015-11-30T04:08:49.0Z <<< +Registrar Abuse Contact Email: ops@centralnic.com +Registrar Abuse Contact Phone: +44.2033880600 +URL of the ICANN Whois Inaccuracy Complaint Form: https://www.icann.org/wicf/ +>>> Last update of WHOIS database: 2021-12-16T10:57:32.0Z <<< For more information on Whois status codes, please visit https://icann.org/epp -This whois service is provided by CentralNic Ltd and only contains +>>> IMPORTANT INFORMATION ABOUT THE DEPLOYMENT OF RDAP: please visit +https://www.centralnic.com/support/rdap <<< + +The Whois and RDAP services are provided by CentralNic, and contain information pertaining to Internet domain names registered by our our customers. By using this service you are agreeing (1) not to use any information presented here for any purpose other than determining -ownership of domain names, (2) not to store or reproduce this data in +ownership of domain names, (2) not to store or reproduce this data in any way, (3) not to use any high-volume, automated, electronic processes to obtain data from this service. Abuse of this service is monitored and actions in contravention of these terms will result in being permanently -blacklisted. All data is (c) CentralNic Ltd https://www.centralnic.com/ - -Access to the whois service is rate limited. For more information, please -see https://registrar-console.centralnic.com/pub/whois_guidance. +blacklisted. All data is (c) CentralNic Ltd (https://www.centralnic.com) +Access to the Whois and RDAP services is rate limited. For more +information, visit https://registrar-console.centralnic.com/pub/whois_guidance. diff --git a/spec/fixtures/responses/whois.nic.tech/tech/status_available.expected b/spec/fixtures/responses/whois.nic.tech/tech/status_available.expected index 2c3fe7a8..64c3bae5 100644 --- a/spec/fixtures/responses/whois.nic.tech/tech/status_available.expected +++ b/spec/fixtures/responses/whois.nic.tech/tech/status_available.expected @@ -1,5 +1,5 @@ #disclaimer - %s == nil + %s == "The Whois and RDAP services are provided by CentralNic, and contain information pertaining to Internet domain names registered by our our customers. By using this service you are agreeing (1) not to use any information presented here for any purpose other than determining ownership of domain names, (2) not to store or reproduce this data in any way, (3) not to use any high-volume, automated, electronic processes to obtain data from this service. Abuse of this service is monitored and actions in contravention of these terms will result in being permanently blacklisted. All data is (c) CentralNic Ltd (https://www.centralnic.com) Access to the Whois and RDAP services is rate limited. For more information, visit https://registrar-console.centralnic.com/pub/whois_guidance." #domain @@ -10,7 +10,7 @@ #status - %s == [] + %s == :available #available? %s == true diff --git a/spec/fixtures/responses/whois.nic.tech/tech/status_available.txt b/spec/fixtures/responses/whois.nic.tech/tech/status_available.txt index 09cc0f7e..5ce8c7fb 100644 --- a/spec/fixtures/responses/whois.nic.tech/tech/status_available.txt +++ b/spec/fixtures/responses/whois.nic.tech/tech/status_available.txt @@ -1 +1,21 @@ -DOMAIN NOT FOUND +The queried object does not exist: DOMAIN NOT FOUND + +>>> Last update of WHOIS database: 2021-12-16T13:48:48.0Z <<< + +For more information on Whois status codes, please visit https://icann.org/epp + +>>> IMPORTANT INFORMATION ABOUT THE DEPLOYMENT OF RDAP: please visit +https://www.centralnic.com/support/rdap <<< + +The Whois and RDAP services are provided by CentralNic, and contain +information pertaining to Internet domain names registered by our +our customers. By using this service you are agreeing (1) not to use any +information presented here for any purpose other than determining +ownership of domain names, (2) not to store or reproduce this data in +any way, (3) not to use any high-volume, automated, electronic processes +to obtain data from this service. Abuse of this service is monitored and +actions in contravention of these terms will result in being permanently +blacklisted. All data is (c) CentralNic Ltd (https://www.centralnic.com) + +Access to the Whois and RDAP services is rate limited. For more +information, visit https://registrar-console.centralnic.com/pub/whois_guidance. diff --git a/spec/fixtures/responses/whois.nic.tech/tech/status_registered.expected b/spec/fixtures/responses/whois.nic.tech/tech/status_registered.expected index e8486714..5bf4a7ce 100644 --- a/spec/fixtures/responses/whois.nic.tech/tech/status_registered.expected +++ b/spec/fixtures/responses/whois.nic.tech/tech/status_registered.expected @@ -1,5 +1,5 @@ #disclaimer - %s == "Access to the whois service is rate limited. For more information, please see https://registrar-console.centralnic.com/pub/whois_guidance." + %s == "The Whois and RDAP services are provided by CentralNic, and contain information pertaining to Internet domain names registered by our our customers. By using this service you are agreeing (1) not to use any information presented here for any purpose other than determining ownership of domain names, (2) not to store or reproduce this data in any way, (3) not to use any high-volume, automated, electronic processes to obtain data from this service. Abuse of this service is monitored and actions in contravention of these terms will result in being permanently blacklisted. All data is (c) CentralNic Ltd (https://www.centralnic.com) Access to the Whois and RDAP services is rate limited. For more information, visit https://registrar-console.centralnic.com/pub/whois_guidance." #domain @@ -10,7 +10,7 @@ #status - %s == ["serverTransferProhibited https://icann.org/epp#serverTransferProhibited", "clientTransferProhibited https://icann.org/epp#clientTransferProhibited", "clientUpdateProhibited https://icann.org/epp#clientUpdateProhibited", "clientDeleteProhibited https://icann.org/epp#clientDeleteProhibited"] + %s == :registered #available? %s == false @@ -21,76 +21,54 @@ #created_on %s %CLASS{time} - %s %TIME{2015-07-29 00:00:00 UTC} + %s %TIME{2015-07-29 14:20:05 UTC} #updated_on %s %CLASS{time} - %s %TIME{2015-08-04 09:00:43 UTC} + %s %TIME{2021-08-25 01:16:43 UTC} #expires_on %s %CLASS{time} - %s %TIME{2017-07-29 23:59:59 UTC} + %s %TIME{2022-07-29 23:59:59 UTC} #registrar %s %CLASS{registrar} %s.id == "292" %s.name == "MarkMonitor, Inc (TLDs)" - %s.url == nil + %s.url == "" #registrant_contacts %s %CLASS{array} %s %SIZE{1} %s[0] %CLASS{contact} %s[0].type == Whois::Parser::Contact::TYPE_REGISTRANT - %s[0].id == "mmr-87489" - %s[0].name == "DNS Admin" - %s[0].organization == "Google Inc." - %s[0].address == "1600 Amphitheatre Parkway" - %s[0].city == "Mountain View" - %s[0].zip == "94043" + %s[0].id == nil + %s[0].name == nil + %s[0].organization == "Google LLC" + %s[0].address == nil + %s[0].city == nil + %s[0].zip == nil %s[0].state == "CA" %s[0].country == nil %s[0].country_code == "US" - %s[0].phone == "+1.6502530000" - %s[0].fax == "+1.6502530001" - %s[0].email == "dns-admin@google.com" + %s[0].phone == nil + %s[0].fax == nil + %s[0].email == "Please query the RDDS service of the Registrar of Record identified in this output for information on how to contact the Registrant, Admin, or Tech contact of the queried domain name." #admin_contacts %s %CLASS{array} %s %SIZE{1} %s[0] %CLASS{contact} %s[0].type == Whois::Parser::Contact::TYPE_ADMINISTRATIVE - %s[0].id == "mmr-87489" - %s[0].name == "DNS Admin" - %s[0].organization == "Google Inc." - %s[0].address == "1600 Amphitheatre Parkway" - %s[0].city == "Mountain View" - %s[0].zip == "94043" - %s[0].state == "CA" - %s[0].country == nil - %s[0].country_code == "US" - %s[0].phone == "+1.6502530000" - %s[0].fax == "+1.6502530001" - %s[0].email == "dns-admin@google.com" + %s[0].email == "Please query the RDDS service of the Registrar of Record identified in this output for information on how to contact the Registrant, Admin, or Tech contact of the queried domain name." #technical_contacts %s %CLASS{array} %s %SIZE{1} %s[0] %CLASS{contact} %s[0].type == Whois::Parser::Contact::TYPE_TECHNICAL - %s[0].id == "mmr-87489" - %s[0].name == "DNS Admin" - %s[0].organization == "Google Inc." - %s[0].address == "1600 Amphitheatre Parkway" - %s[0].city == "Mountain View" - %s[0].zip == "94043" - %s[0].state == "CA" - %s[0].country == nil - %s[0].country_code == "US" - %s[0].phone == "+1.6502530000" - %s[0].fax == "+1.6502530001" - %s[0].email == "dns-admin@google.com" + %s[0].email == "Please query the RDDS service of the Registrar of Record identified in this output for information on how to contact the Registrant, Admin, or Tech contact of the queried domain name." #nameservers diff --git a/spec/fixtures/responses/whois.nic.tech/tech/status_registered.txt b/spec/fixtures/responses/whois.nic.tech/tech/status_registered.txt index 5f5e2ce1..3f1ccfcc 100644 --- a/spec/fixtures/responses/whois.nic.tech/tech/status_registered.txt +++ b/spec/fixtures/responses/whois.nic.tech/tech/status_registered.txt @@ -1,65 +1,37 @@ Domain Name: GOOGLE.TECH -Domain ID: D9157622-CNIC -WHOIS Server: whois.markmonitor.com -Referral URL: https://www.markmonitor.com/ -Updated Date: 2015-08-04T09:00:43.0Z -Creation Date: 2015-07-29T00:00:00.0Z -Registry Expiry Date: 2017-07-29T23:59:59.0Z -Sponsoring Registrar: MarkMonitor, Inc (TLDs) -Sponsoring Registrar IANA ID: 292 -Domain Status: serverTransferProhibited https://icann.org/epp#serverTransferProhibited +Registry Domain ID: D9157622-CNIC +Registrar WHOIS Server: whois.markmonitor.com +Registrar URL: +Updated Date: 2021-08-25T01:16:43.0Z +Creation Date: 2015-07-29T14:20:05.0Z +Registry Expiry Date: 2022-07-29T23:59:59.0Z +Registrar: MarkMonitor, Inc (TLDs) +Registrar IANA ID: 292 Domain Status: clientTransferProhibited https://icann.org/epp#clientTransferProhibited Domain Status: clientUpdateProhibited https://icann.org/epp#clientUpdateProhibited Domain Status: clientDeleteProhibited https://icann.org/epp#clientDeleteProhibited -Registrant ID: mmr-87489 -Registrant Name: DNS Admin -Registrant Organization: Google Inc. -Registrant Street: 1600 Amphitheatre Parkway -Registrant City: Mountain View +Registrant Organization: Google LLC Registrant State/Province: CA -Registrant Postal Code: 94043 Registrant Country: US -Registrant Phone: +1.6502530000 -Registrant Phone Ext: -Registrant Fax: +1.6502530001 -Registrant Fax Ext: -Registrant Email: dns-admin@google.com -Admin ID: mmr-87489 -Admin Name: DNS Admin -Admin Organization: Google Inc. -Admin Street: 1600 Amphitheatre Parkway -Admin City: Mountain View -Admin State/Province: CA -Admin Postal Code: 94043 -Admin Country: US -Admin Phone: +1.6502530000 -Admin Phone Ext: -Admin Fax: +1.6502530001 -Admin Fax Ext: -Admin Email: dns-admin@google.com -Tech ID: mmr-87489 -Tech Name: DNS Admin -Tech Organization: Google Inc. -Tech Street: 1600 Amphitheatre Parkway -Tech City: Mountain View -Tech State/Province: CA -Tech Postal Code: 94043 -Tech Country: US -Tech Phone: +1.6502530000 -Tech Phone Ext: -Tech Fax: +1.6502530001 -Tech Fax Ext: -Tech Email: dns-admin@google.com +Registrant Email: Please query the RDDS service of the Registrar of Record identified in this output for information on how to contact the Registrant, Admin, or Tech contact of the queried domain name. +Admin Email: Please query the RDDS service of the Registrar of Record identified in this output for information on how to contact the Registrant, Admin, or Tech contact of the queried domain name. +Tech Email: Please query the RDDS service of the Registrar of Record identified in this output for information on how to contact the Registrant, Admin, or Tech contact of the queried domain name. Name Server: NS2.GOOGLE.COM Name Server: NS4.GOOGLE.COM Name Server: NS3.GOOGLE.COM Name Server: NS1.GOOGLE.COM DNSSEC: unsigned ->>> Last update of WHOIS database: 2015-09-18T00:34:52.0Z <<< +Registrar Abuse Contact Email: ccops@markmonitor.com +Registrar Abuse Contact Phone: +1.2083895740 +URL of the ICANN Whois Inaccuracy Complaint Form: https://www.icann.org/wicf/ +>>> Last update of WHOIS database: 2021-12-16T13:48:38.0Z <<< For more information on Whois status codes, please visit https://icann.org/epp -This whois service is provided by CentralNic Ltd and only contains +>>> IMPORTANT INFORMATION ABOUT THE DEPLOYMENT OF RDAP: please visit +https://www.centralnic.com/support/rdap <<< + +The Whois and RDAP services are provided by CentralNic, and contain information pertaining to Internet domain names registered by our our customers. By using this service you are agreeing (1) not to use any information presented here for any purpose other than determining @@ -67,8 +39,7 @@ ownership of domain names, (2) not to store or reproduce this data in any way, (3) not to use any high-volume, automated, electronic processes to obtain data from this service. Abuse of this service is monitored and actions in contravention of these terms will result in being permanently -blacklisted. All data is (c) CentralNic Ltd https://www.centralnic.com/ - -Access to the whois service is rate limited. For more information, please -see https://registrar-console.centralnic.com/pub/whois_guidance. +blacklisted. All data is (c) CentralNic Ltd (https://www.centralnic.com) +Access to the Whois and RDAP services is rate limited. For more +information, visit https://registrar-console.centralnic.com/pub/whois_guidance. diff --git a/spec/fixtures/responses/whois.nic.xyz/xyz/status_available.expected b/spec/fixtures/responses/whois.nic.xyz/xyz/status_available.expected index 2c3fe7a8..64c3bae5 100644 --- a/spec/fixtures/responses/whois.nic.xyz/xyz/status_available.expected +++ b/spec/fixtures/responses/whois.nic.xyz/xyz/status_available.expected @@ -1,5 +1,5 @@ #disclaimer - %s == nil + %s == "The Whois and RDAP services are provided by CentralNic, and contain information pertaining to Internet domain names registered by our our customers. By using this service you are agreeing (1) not to use any information presented here for any purpose other than determining ownership of domain names, (2) not to store or reproduce this data in any way, (3) not to use any high-volume, automated, electronic processes to obtain data from this service. Abuse of this service is monitored and actions in contravention of these terms will result in being permanently blacklisted. All data is (c) CentralNic Ltd (https://www.centralnic.com) Access to the Whois and RDAP services is rate limited. For more information, visit https://registrar-console.centralnic.com/pub/whois_guidance." #domain @@ -10,7 +10,7 @@ #status - %s == [] + %s == :available #available? %s == true diff --git a/spec/fixtures/responses/whois.nic.xyz/xyz/status_available.txt b/spec/fixtures/responses/whois.nic.xyz/xyz/status_available.txt index 09cc0f7e..8295f14b 100644 --- a/spec/fixtures/responses/whois.nic.xyz/xyz/status_available.txt +++ b/spec/fixtures/responses/whois.nic.xyz/xyz/status_available.txt @@ -1 +1,21 @@ -DOMAIN NOT FOUND +The queried object does not exist: DOMAIN NOT FOUND + +>>> Last update of WHOIS database: 2021-12-16T13:52:59.0Z <<< + +For more information on Whois status codes, please visit https://icann.org/epp + +>>> IMPORTANT INFORMATION ABOUT THE DEPLOYMENT OF RDAP: please visit +https://www.centralnic.com/support/rdap <<< + +The Whois and RDAP services are provided by CentralNic, and contain +information pertaining to Internet domain names registered by our +our customers. By using this service you are agreeing (1) not to use any +information presented here for any purpose other than determining +ownership of domain names, (2) not to store or reproduce this data in +any way, (3) not to use any high-volume, automated, electronic processes +to obtain data from this service. Abuse of this service is monitored and +actions in contravention of these terms will result in being permanently +blacklisted. All data is (c) CentralNic Ltd (https://www.centralnic.com) + +Access to the Whois and RDAP services is rate limited. For more +information, visit https://registrar-console.centralnic.com/pub/whois_guidance. diff --git a/spec/fixtures/responses/whois.nic.xyz/xyz/status_registered.expected b/spec/fixtures/responses/whois.nic.xyz/xyz/status_registered.expected index 3bd8e221..8b2555ca 100644 --- a/spec/fixtures/responses/whois.nic.xyz/xyz/status_registered.expected +++ b/spec/fixtures/responses/whois.nic.xyz/xyz/status_registered.expected @@ -1,5 +1,5 @@ #disclaimer - %s == "Access to the whois service is rate limited. For more information, please see https://registrar-console.centralnic.com/pub/whois_guidance." + %s == "The Whois and RDAP services are provided by CentralNic, and contain information pertaining to Internet domain names registered by our our customers. By using this service you are agreeing (1) not to use any information presented here for any purpose other than determining ownership of domain names, (2) not to store or reproduce this data in any way, (3) not to use any high-volume, automated, electronic processes to obtain data from this service. Abuse of this service is monitored and actions in contravention of these terms will result in being permanently blacklisted. All data is (c) CentralNic Ltd (https://www.centralnic.com) Access to the Whois and RDAP services is rate limited. For more information, visit https://registrar-console.centralnic.com/pub/whois_guidance." #domain @@ -10,7 +10,7 @@ #status - %s == ["clientTransferProhibited https://icann.org/epp#clientTransferProhibited", "clientUpdateProhibited https://icann.org/epp#clientUpdateProhibited", "clientDeleteProhibited https://icann.org/epp#clientDeleteProhibited"] + %s == :registered #available? %s == false @@ -25,9 +25,9 @@ #updated_on %s %CLASS{time} - %s %TIME{2015-08-18 15:09:36 UTC} + %s %TIME{2018-04-23 22:02:32 UTC} -#expires_on +#expires_on %s %CLASS{time} %s %TIME{2025-03-20 23:59:59 UTC} @@ -36,70 +36,39 @@ %s %CLASS{registrar} %s.id == "292" %s.name == "MarkMonitor, Inc (TLDs)" - %s.url == nil + %s.url == "" #registrant_contacts %s %CLASS{array} %s %SIZE{1} %s[0] %CLASS{contact} %s[0].type == Whois::Parser::Contact::TYPE_REGISTRANT - %s[0].id == "mmr-87489" - %s[0].name == "DNS Admin" - %s[0].organization == "Google Inc." - %s[0].address == "1600 Amphitheatre Parkway" - %s[0].city == "Mountain View" - %s[0].zip == "94043" + %s[0].id == nil + %s[0].name == nil + %s[0].organization == "Google LLC" + %s[0].address == nil + %s[0].city == nil + %s[0].zip == nil %s[0].state == "CA" %s[0].country == nil %s[0].country_code == "US" - %s[0].phone == "+1.6502530000" - %s[0].fax == "+1.6502530001" - %s[0].email == "dns-admin@google.com" - %s[0].url == nil - %s[0].created_on == nil - %s[0].updated_on == nil + %s[0].phone == nil + %s[0].fax == nil + %s[0].email == "Please query the RDDS service of the Registrar of Record identified in this output for information on how to contact the Registrant, Admin, or Tech contact of the queried domain name." #admin_contacts %s %CLASS{array} %s %SIZE{1} %s[0] %CLASS{contact} %s[0].type == Whois::Parser::Contact::TYPE_ADMINISTRATIVE - %s[0].id == "mmr-87489" - %s[0].name == "DNS Admin" - %s[0].organization == "Google Inc." - %s[0].address == "1600 Amphitheatre Parkway" - %s[0].city == "Mountain View" - %s[0].zip == "94043" - %s[0].state == "CA" - %s[0].country == nil - %s[0].country_code == "US" - %s[0].phone == "+1.6502530000" - %s[0].fax == "+1.6502530001" - %s[0].email == "dns-admin@google.com" - %s[0].url == nil - %s[0].created_on == nil - %s[0].updated_on == nil + %s[0].email == "Please query the RDDS service of the Registrar of Record identified in this output for information on how to contact the Registrant, Admin, or Tech contact of the queried domain name." #technical_contacts %s %CLASS{array} %s %SIZE{1} %s[0] %CLASS{contact} %s[0].type == Whois::Parser::Contact::TYPE_TECHNICAL - %s[0].id == "mmr-87489" - %s[0].name == "DNS Admin" - %s[0].organization == "Google Inc." - %s[0].address == "1600 Amphitheatre Parkway" - %s[0].city == "Mountain View" - %s[0].zip == "94043" - %s[0].state == "CA" - %s[0].country == nil - %s[0].country_code == "US" - %s[0].phone == "+1.6502530000" - %s[0].fax == "+1.6502530001" - %s[0].email == "dns-admin@google.com" - %s[0].url == nil - %s[0].created_on == nil - %s[0].updated_on == nil + %s[0].email == "Please query the RDDS service of the Registrar of Record identified in this output for information on how to contact the Registrant, Admin, or Tech contact of the queried domain name." #nameservers @@ -107,17 +76,9 @@ %s %SIZE{4} %s[0] %CLASS{nameserver} %s[0].name == "ns2.google.com" - %s[0].ipv4 == nil - %s[0].ipv6 == nil %s[1] %CLASS{nameserver} %s[1].name == "ns4.google.com" - %s[1].ipv4 == nil - %s[1].ipv6 == nil %s[2] %CLASS{nameserver} %s[2].name == "ns3.google.com" - %s[2].ipv4 == nil - %s[2].ipv6 == nil %s[3] %CLASS{nameserver} %s[3].name == "ns1.google.com" - %s[3].ipv4 == nil - %s[3].ipv6 == nil diff --git a/spec/fixtures/responses/whois.nic.xyz/xyz/status_registered.txt b/spec/fixtures/responses/whois.nic.xyz/xyz/status_registered.txt index 1cd82ab7..cac6af94 100644 --- a/spec/fixtures/responses/whois.nic.xyz/xyz/status_registered.txt +++ b/spec/fixtures/responses/whois.nic.xyz/xyz/status_registered.txt @@ -1,73 +1,45 @@ Domain Name: ABC.XYZ -Domain ID: D2192285-CNIC -WHOIS Server: whois.markmonitor.com -Referral URL: https://www.markmonitor.com/ -Updated Date: 2015-08-18T15:09:36.0Z +Registry Domain ID: D2192285-CNIC +Registrar WHOIS Server: whois.markmonitor.com +Registrar URL: +Updated Date: 2018-04-23T22:02:32.0Z Creation Date: 2014-03-20T12:59:17.0Z Registry Expiry Date: 2025-03-20T23:59:59.0Z -Sponsoring Registrar: MarkMonitor, Inc (TLDs) -Sponsoring Registrar IANA ID: 292 +Registrar: MarkMonitor, Inc (TLDs) +Registrar IANA ID: 292 Domain Status: clientTransferProhibited https://icann.org/epp#clientTransferProhibited Domain Status: clientUpdateProhibited https://icann.org/epp#clientUpdateProhibited Domain Status: clientDeleteProhibited https://icann.org/epp#clientDeleteProhibited -Registrant ID: mmr-87489 -Registrant Name: DNS Admin -Registrant Organization: Google Inc. -Registrant Street: 1600 Amphitheatre Parkway -Registrant City: Mountain View +Registrant Organization: Google LLC Registrant State/Province: CA -Registrant Postal Code: 94043 Registrant Country: US -Registrant Phone: +1.6502530000 -Registrant Phone Ext: -Registrant Fax: +1.6502530001 -Registrant Fax Ext: -Registrant Email: dns-admin@google.com -Admin ID: mmr-87489 -Admin Name: DNS Admin -Admin Organization: Google Inc. -Admin Street: 1600 Amphitheatre Parkway -Admin City: Mountain View -Admin State/Province: CA -Admin Postal Code: 94043 -Admin Country: US -Admin Phone: +1.6502530000 -Admin Phone Ext: -Admin Fax: +1.6502530001 -Admin Fax Ext: -Admin Email: dns-admin@google.com -Tech ID: mmr-87489 -Tech Name: DNS Admin -Tech Organization: Google Inc. -Tech Street: 1600 Amphitheatre Parkway -Tech City: Mountain View -Tech State/Province: CA -Tech Postal Code: 94043 -Tech Country: US -Tech Phone: +1.6502530000 -Tech Phone Ext: -Tech Fax: +1.6502530001 -Tech Fax Ext: -Tech Email: dns-admin@google.com +Registrant Email: Please query the RDDS service of the Registrar of Record identified in this output for information on how to contact the Registrant, Admin, or Tech contact of the queried domain name. +Admin Email: Please query the RDDS service of the Registrar of Record identified in this output for information on how to contact the Registrant, Admin, or Tech contact of the queried domain name. +Tech Email: Please query the RDDS service of the Registrar of Record identified in this output for information on how to contact the Registrant, Admin, or Tech contact of the queried domain name. Name Server: NS2.GOOGLE.COM Name Server: NS4.GOOGLE.COM Name Server: NS3.GOOGLE.COM Name Server: NS1.GOOGLE.COM DNSSEC: unsigned ->>> Last update of WHOIS database: 2015-11-29T21:11:15.0Z <<< +Registrar Abuse Contact Email: ccops@markmonitor.com +Registrar Abuse Contact Phone: +1.2083895740 +URL of the ICANN Whois Inaccuracy Complaint Form: https://www.icann.org/wicf/ +>>> Last update of WHOIS database: 2021-12-16T13:52:29.0Z <<< For more information on Whois status codes, please visit https://icann.org/epp -This whois service is provided by CentralNic Ltd and only contains +>>> IMPORTANT INFORMATION ABOUT THE DEPLOYMENT OF RDAP: please visit +https://www.centralnic.com/support/rdap <<< + +The Whois and RDAP services are provided by CentralNic, and contain information pertaining to Internet domain names registered by our our customers. By using this service you are agreeing (1) not to use any information presented here for any purpose other than determining -ownership of domain names, (2) not to store or reproduce this data in +ownership of domain names, (2) not to store or reproduce this data in any way, (3) not to use any high-volume, automated, electronic processes to obtain data from this service. Abuse of this service is monitored and actions in contravention of these terms will result in being permanently -blacklisted. All data is (c) CentralNic Ltd https://www.centralnic.com/ - -Access to the whois service is rate limited. For more information, please -see https://registrar-console.centralnic.com/pub/whois_guidance. +blacklisted. All data is (c) CentralNic Ltd (https://www.centralnic.com) +Access to the Whois and RDAP services is rate limited. For more +information, visit https://registrar-console.centralnic.com/pub/whois_guidance. diff --git a/spec/fixtures/responses/whois.pairnic.com/status_registered.expected b/spec/fixtures/responses/whois.pairnic.com/status_registered.expected index bd85ae45..e7d43079 100644 --- a/spec/fixtures/responses/whois.pairnic.com/status_registered.expected +++ b/spec/fixtures/responses/whois.pairnic.com/status_registered.expected @@ -48,9 +48,9 @@ %s[0].zip == "15203" %s[0].state == "PA" %s[0].country_code == "US" - %s[0].phone == "" - %s[0].fax == "" - %s[0].email == "" + %s[0].phone == nil + %s[0].fax == nil + %s[0].email == nil #admin_contacts %s %CLASS{array} diff --git a/spec/fixtures/responses/whois.pandi.or.id/id/status_available.expected b/spec/fixtures/responses/whois.pandi.or.id/id/status_available.expected deleted file mode 100644 index 2c3fe7a8..00000000 --- a/spec/fixtures/responses/whois.pandi.or.id/id/status_available.expected +++ /dev/null @@ -1,50 +0,0 @@ -#disclaimer - %s == nil - - -#domain - %s == nil - -#domain_id - %s == nil - - -#status - %s == [] - -#available? - %s == true - -#registered? - %s == false - - -#created_on - %s == nil - -#updated_on - %s == nil - -#expires_on - %s == nil - - -#registrar - %s == nil - -#registrant_contacts - %s %CLASS{array} - %s == [] - -#admin_contacts - %s %CLASS{array} - %s == [] - -#technical_contacts - %s %CLASS{array} - %s == [] - - -#nameservers - %s %CLASS{array} - %s == [] diff --git a/spec/fixtures/responses/whois.pandi.or.id/id/status_available.txt b/spec/fixtures/responses/whois.pandi.or.id/id/status_available.txt deleted file mode 100644 index 09cc0f7e..00000000 --- a/spec/fixtures/responses/whois.pandi.or.id/id/status_available.txt +++ /dev/null @@ -1 +0,0 @@ -DOMAIN NOT FOUND diff --git a/spec/fixtures/responses/whois.pandi.or.id/id/status_registered.expected b/spec/fixtures/responses/whois.pandi.or.id/id/status_registered.expected deleted file mode 100644 index a63fd792..00000000 --- a/spec/fixtures/responses/whois.pandi.or.id/id/status_registered.expected +++ /dev/null @@ -1,114 +0,0 @@ -#disclaimer - %s == nil - - -#domain - %s == "google.co.id" - -#domain_id - %s == "PANDI-DO246796" - - -#status - %s == ["clientTransferProhibited", "serverTransferProhibited"] - -#available? - %s == false - -#registered? - %s == true - - -#created_on - %s %CLASS{time} - %s %TIME{2004-12-18 13:33:21 UTC} - -#updated_on - %s %CLASS{time} - %s %TIME{2013-09-20 23:24:51 UTC} - -#expires_on - %s %CLASS{time} - %s %TIME{2014-09-01 23:59:59 UTC} - - -#registrar - %s %CLASS{registrar} - %s.id == "digitalreg" - %s.name == "Digital Registra" - %s.url == nil - -#registrant_contacts - %s %CLASS{array} - %s %SIZE{1} - %s[0] %CLASS{contact} - %s[0].type == Whois::Parser::Contact::TYPE_REGISTRANT - %s[0].id == "0123459P2ZC" - %s[0].name == "Domain Administrator" - %s[0].organization == "PT Google Indonesia" - %s[0].address == "Menara BCA Grand Indonesia\nRegus Grand Indonesia" - %s[0].city == "Jakarta" - %s[0].zip == "10310" - %s[0].state == "Jakarta" - %s[0].country == nil - %s[0].country_code == "ID" - %s[0].phone == "+62.2123584400" - %s[0].fax == "+62.2123584400" - %s[0].email == "dns-admin@google.com" - -#admin_contacts - %s %CLASS{array} - %s %SIZE{1} - %s[0] %CLASS{contact} - %s[0].type == Whois::Parser::Contact::TYPE_ADMINISTRATIVE - %s[0].id == "0123459P2ZC" - %s[0].name == "Domain Administrator" - %s[0].organization == "PT Google Indonesia" - %s[0].address == "Menara BCA Grand Indonesia\nRegus Grand Indonesia" - %s[0].city == "Jakarta" - %s[0].zip == "10310" - %s[0].state == "Jakarta" - %s[0].country == nil - %s[0].country_code == "ID" - %s[0].phone == "+62.2123584400" - %s[0].fax == "+62.2123584400" - %s[0].email == "dns-admin@google.com" - -#technical_contacts - %s %CLASS{array} - %s %SIZE{1} - %s[0] %CLASS{contact} - %s[0].type == Whois::Parser::Contact::TYPE_TECHNICAL - %s[0].id == "01234616RFG" - %s[0].name == "DNS Admin" - %s[0].organization == "Google Inc." - %s[0].address == "1600 Amphitheatre Parkway" - %s[0].city == "Mountain View" - %s[0].zip == "94043" - %s[0].state == "CA" - %s[0].country == nil - %s[0].country_code == "US" - %s[0].phone == "+1.65030000" - %s[0].fax == "+1.65030001" - %s[0].email == "dns-admin@google.com" - - -#nameservers - %s %CLASS{array} - %s %SIZE{4} - %s[0] %CLASS{nameserver} - %s[0].name == "ns1.google.com" - %s[0].ipv4 == nil - %s[0].ipv6 == nil - %s[1] %CLASS{nameserver} - %s[1].name == "ns2.google.com" - %s[1].ipv4 == nil - %s[1].ipv6 == nil - %s[2] %CLASS{nameserver} - %s[2].name == "ns3.google.com" - %s[2].ipv4 == nil - %s[2].ipv6 == nil - %s[3] %CLASS{nameserver} - %s[3].name == "ns4.google.com" - %s[3].ipv4 == nil - %s[3].ipv6 == nil diff --git a/spec/fixtures/responses/whois.pandi.or.id/id/status_registered.txt b/spec/fixtures/responses/whois.pandi.or.id/id/status_registered.txt deleted file mode 100644 index fd23f7dc..00000000 --- a/spec/fixtures/responses/whois.pandi.or.id/id/status_registered.txt +++ /dev/null @@ -1,66 +0,0 @@ -Domain ID:PANDI-DO246796 -Domain Name:GOOGLE.CO.ID -Created On:18-Dec-2004 13:33:21 UTC -Last Updated On:20-Sep-2013 23:24:51 UTC -Expiration Date:01-Sep-2014 23:59:59 UTC -Status:clientTransferProhibited -Status:serverTransferProhibited -Registrant ID:0123459P2ZC -Registrant Name:Domain Administrator -Registrant Organization:PT Google Indonesia -Registrant Street1:Menara BCA Grand Indonesia -Registrant Street2:Regus Grand Indonesia -Registrant City:Jakarta -Registrant State/Province:Jakarta -Registrant Postal Code:10310 -Registrant Country:ID -Registrant Phone:+62.2123584400 -Registrant FAX:+62.2123584400 -Registrant Email:dns-admin@google.com -Admin ID:0123459P2ZC -Admin Name:Domain Administrator -Admin Organization:PT Google Indonesia -Admin Street1:Menara BCA Grand Indonesia -Admin Street2:Regus Grand Indonesia -Admin City:Jakarta -Admin State/Province:Jakarta -Admin Postal Code:10310 -Admin Country:ID -Admin Phone:+62.2123584400 -Admin FAX:+62.2123584400 -Admin Email:dns-admin@google.com -Tech ID:01234616RFG -Tech Name:DNS Admin -Tech Organization:Google Inc. -Tech Street1:1600 Amphitheatre Parkway -Tech City:Mountain View -Tech State/Province:CA -Tech Postal Code:94043 -Tech Country:US -Tech Phone:+1.65030000 -Tech FAX:+1.65030001 -Tech Email:dns-admin@google.com -Billing ID:0120505a1pl -Billing Name:CCOPS Billing -Billing Organization:MarkMonitor Inc. -Billing Street1:JL.Hang Kesturi KM 4 Kabil Indus -Billing City:Boise -Billing State/Province:ID -Billing Postal Code:83704 -Billing Country:US -Billing Phone:+1.2083895741 -Billing FAX:+1.2083895771 -Billing Email:ccopsbilling@markmonitor.com -Sponsoring Registrar ID:digitalreg -Sponsoring Registrar Organization:Digital Registra -Sponsoring Registrar Postal Code:55281 -Sponsoring Registrar Country:ID -Sponsoring Registrar Phone:0274882257 -Name Server:NS1.GOOGLE.COM -Name Server:NS2.GOOGLE.COM -Name Server:NS3.GOOGLE.COM -Name Server:NS4.GOOGLE.COM -DNSSEC:Unsigned - - - diff --git a/spec/fixtures/responses/whois.schlund.info/status_registered.expected b/spec/fixtures/responses/whois.schlund.info/status_registered.expected index 2951e4e6..d3125908 100644 --- a/spec/fixtures/responses/whois.schlund.info/status_registered.expected +++ b/spec/fixtures/responses/whois.schlund.info/status_registered.expected @@ -46,7 +46,7 @@ %s[0].address == "Elgendorfer Str. 57" %s[0].city == "Montabaur" %s[0].zip == "56410" - %s[0].state == "" + %s[0].state == nil %s[0].country_code == "DE" %s[0].phone == "+49.2602960" %s[0].fax == "+49.72191374215" @@ -63,7 +63,7 @@ %s[0].address == "Elgendorfer Str. 57" %s[0].city == "Montabaur" %s[0].zip == "56410" - %s[0].state == "" + %s[0].state == nil %s[0].country_code == "DE" %s[0].phone == "+49.2602960" %s[0].fax == "+49.72191374215" @@ -80,7 +80,7 @@ %s[0].address == "Brauerstr. 48" %s[0].city == "Karlsruhe" %s[0].zip == "76135" - %s[0].state == "" + %s[0].state == nil %s[0].country_code == "DE" %s[0].phone == "+49.7219600" %s[0].fax == "+49.72191374248" diff --git a/spec/tlds.yml b/spec/tlds.yml index 84ffb587..3a51e0e1 100644 --- a/spec/tlds.yml +++ b/spec/tlds.yml @@ -2,17 +2,13 @@ ae.org: _server: whois.centralnic.com _subdir: ae.org status_available: u34jedzcq.ae.org - status_registered: kidzlink.ae.org -ar.com: - _server: whois.centralnic.com - _subdir: ar.com - status_available: u34jedzcq.ar.com - status_registered: hotel.ar.com + status_registered: greenflame.ae.org + status_purged: kidzlink.ae.org br.com: _server: whois.centralnic.com _subdir: br.com status_available: u34jedzcq.br.com - status_registered: billboard.br.com + status_registered: linet.br.com cn.com: _server: whois.centralnic.com _subdir: cn.com @@ -33,71 +29,21 @@ eu.com: _subdir: eu.com status_available: u34jedzcq.eu.com status_registered: walkabout.eu.com -gb.com: - _server: whois.centralnic.com - _subdir: gb.com - status_available: u34jedzcq.gb.com - status_registered: hotel.gb.com -gb.net: - _server: whois.centralnic.com - _subdir: gb.net - status_available: u34jedzcq.gb.net - status_registered: hotel.gb.net gr.com: _server: whois.centralnic.com _subdir: gr.com status_available: u34jedzcq.gr.com status_registered: google.gr.com -hu.com: - _server: whois.centralnic.com - _subdir: hu.com - status_available: u34jedzcq.hu.com - status_registered: porn.hu.com jp.net: _server: whois.centralnic.com _subdir: jp.net status_available: u34jedzcq.jp.net status_registered: ntt.jp.net -jpn.com: - _server: whois.centralnic.com - _subdir: jpn.com - status_available: u34jedzcq.jpn.com - status_registered: koi.jpn.com -kr.com: - _server: whois.centralnic.com - _subdir: kr.com - status_available: u34jedzcq.kr.com - status_registered: academyart.kr.com -no.com: - _server: whois.centralnic.com - _subdir: no.com - status_available: u34jedzcq.no.com - # status_registered: mrsa.no.com -qc.com: - _server: whois.centralnic.com - _subdir: qc.com - status_available: u34jedzcq.qc.com - status_registered: ceo.qc.com ru.com: _server: whois.centralnic.com _subdir: ru.com status_available: u34jedzcq.ru.com status_registered: srk.ru.com -sa.com: - _server: whois.centralnic.com - _subdir: sa.com - status_available: u34jedzcq.sa.com - status_registered: fynbos.sa.com -se.com: - _server: whois.centralnic.com - _subdir: se.com - status_available: u34jedzcq.se.com - status_registered: hotel.se.com -se.net: - _server: whois.centralnic.com - _subdir: se.net - status_available: u34jedzcq.se.net - status_registered: hotel.se.net uk.com: _server: whois.centralnic.com _subdir: uk.com @@ -641,10 +587,6 @@ hu: _server: whois.nic.hu status_available: u34jedzcq.hu status_registered: google.hu -id: - _server: whois.pandi.or.id - status_available: u34jedzcq.co.id - status_registered: google.co.id ie: _server: whois.domainregistry.ie status_available: u34jedzcq.ie @@ -1438,3 +1380,7 @@ systems: status_available_premium: tld.systems status_registered: donuts.systems status_reserved: google.systems +online: + _server: whois.nic.online + status_available: u34jedzcq.online + status_registered: google.online diff --git a/spec/whois/parsers/responses/whois.1und1.info/status_registered_spec.rb b/spec/whois/parsers/responses/whois.1und1.info/status_registered_spec.rb index 3fa35fd3..c4592b43 100644 --- a/spec/whois/parsers/responses/whois.1und1.info/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.1und1.info/status_registered_spec.rb @@ -46,7 +46,7 @@ expect(subject.registrant_contacts[0].address).to eq("Elgendorfer Strasse 57") expect(subject.registrant_contacts[0].city).to eq("Montabaur") expect(subject.registrant_contacts[0].zip).to eq("56410") - expect(subject.registrant_contacts[0].state).to eq("") + expect(subject.registrant_contacts[0].state).to eq(nil) expect(subject.registrant_contacts[0].country_code).to eq("DE") expect(subject.registrant_contacts[0].phone).to eq("+49.2602960") expect(subject.registrant_contacts[0].fax).to eq("+49.72191374215") @@ -61,7 +61,7 @@ expect(subject.admin_contacts[0].address).to eq("Elgendorfer Strasse 57") expect(subject.admin_contacts[0].city).to eq("Montabaur") expect(subject.admin_contacts[0].zip).to eq("56410") - expect(subject.admin_contacts[0].state).to eq("") + expect(subject.admin_contacts[0].state).to eq(nil) expect(subject.admin_contacts[0].country_code).to eq("DE") expect(subject.admin_contacts[0].phone).to eq("+49.2602960") expect(subject.admin_contacts[0].fax).to eq("+49.72191374215") @@ -76,7 +76,7 @@ expect(subject.technical_contacts[0].address).to eq("Elgendorfer Strasse 57") expect(subject.technical_contacts[0].city).to eq("Montabaur") expect(subject.technical_contacts[0].zip).to eq("56410") - expect(subject.technical_contacts[0].state).to eq("") + expect(subject.technical_contacts[0].state).to eq(nil) expect(subject.technical_contacts[0].country_code).to eq("DE") expect(subject.technical_contacts[0].phone).to eq("+49.2602960") expect(subject.technical_contacts[0].fax).to eq("+49.72191374215") diff --git a/spec/whois/parsers/responses/whois.centralnic.com/ae.org/status_available_spec.rb b/spec/whois/parsers/responses/whois.centralnic.com/ae.org/status_available_spec.rb index 51b927f1..cf9bc5e1 100644 --- a/spec/whois/parsers/responses/whois.centralnic.com/ae.org/status_available_spec.rb +++ b/spec/whois/parsers/responses/whois.centralnic.com/ae.org/status_available_spec.rb @@ -21,10 +21,10 @@ end it "matches status_available.expected" do - expect(subject.disclaimer).to eq(nil) + expect(subject.disclaimer).to eq("The Whois and RDAP services are provided by CentralNic, and contain information pertaining to Internet domain names registered by our our customers. By using this service you are agreeing (1) not to use any information presented here for any purpose other than determining ownership of domain names, (2) not to store or reproduce this data in any way, (3) not to use any high-volume, automated, electronic processes to obtain data from this service. Abuse of this service is monitored and actions in contravention of these terms will result in being permanently blacklisted. All data is (c) CentralNic Ltd (https://www.centralnic.com) Access to the Whois and RDAP services is rate limited. For more information, visit https://registrar-console.centralnic.com/pub/whois_guidance.") expect(subject.domain).to eq(nil) expect(subject.domain_id).to eq(nil) - expect(subject.status).to eq([]) + expect(subject.status).to eq(:available) expect(subject.available?).to eq(true) expect(subject.registered?).to eq(false) expect(subject.created_on).to eq(nil) diff --git a/spec/whois/parsers/responses/whois.centralnic.com/hu.com/status_available_spec.rb b/spec/whois/parsers/responses/whois.centralnic.com/ae.org/status_purged_spec.rb similarity index 52% rename from spec/whois/parsers/responses/whois.centralnic.com/hu.com/status_available_spec.rb rename to spec/whois/parsers/responses/whois.centralnic.com/ae.org/status_purged_spec.rb index ce4c9b66..d3a91b02 100644 --- a/spec/whois/parsers/responses/whois.centralnic.com/hu.com/status_available_spec.rb +++ b/spec/whois/parsers/responses/whois.centralnic.com/ae.org/status_purged_spec.rb @@ -3,7 +3,7 @@ # This file is autogenerated. Do not edit it manually. # If you want change the content of this file, edit # -# /spec/fixtures/responses/whois.centralnic.com/hu.com/status_available.expected +# /spec/fixtures/responses/whois.centralnic.com/ae.org/status_purged.expected # # and regenerate the tests with the following rake task # @@ -15,16 +15,16 @@ describe "whois.centralnic.com", :aggregate_failures do subject do - file = fixture("responses", "whois.centralnic.com/hu.com/status_available.txt") + file = fixture("responses", "whois.centralnic.com/ae.org/status_purged.txt") part = Whois::Record::Part.new(body: File.read(file), host: "whois.centralnic.com") Whois::Parser.parser_for(part) end - it "matches status_available.expected" do - expect(subject.disclaimer).to eq(nil) + it "matches status_purged.expected" do + expect(subject.disclaimer).to eq("The Whois and RDAP services are provided by CentralNic, and contain information pertaining to Internet domain names registered by our our customers. By using this service you are agreeing (1) not to use any information presented here for any purpose other than determining ownership of domain names, (2) not to store or reproduce this data in any way, (3) not to use any high-volume, automated, electronic processes to obtain data from this service. Abuse of this service is monitored and actions in contravention of these terms will result in being permanently blacklisted. All data is (c) CentralNic Ltd (https://www.centralnic.com) Access to the Whois and RDAP services is rate limited. For more information, visit https://registrar-console.centralnic.com/pub/whois_guidance.") expect(subject.domain).to eq(nil) expect(subject.domain_id).to eq(nil) - expect(subject.status).to eq([]) + expect(subject.status).to eq(:available) expect(subject.available?).to eq(true) expect(subject.registered?).to eq(false) expect(subject.created_on).to eq(nil) diff --git a/spec/whois/parsers/responses/whois.centralnic.com/ae.org/status_registered_spec.rb b/spec/whois/parsers/responses/whois.centralnic.com/ae.org/status_registered_spec.rb index 9d39963d..5d3f8e5e 100644 --- a/spec/whois/parsers/responses/whois.centralnic.com/ae.org/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.centralnic.com/ae.org/status_registered_spec.rb @@ -21,79 +21,75 @@ end it "matches status_registered.expected" do - expect(subject.disclaimer).to eq("This whois service is provided by CentralNic Ltd and only contains information pertaining to Internet domain names we have registered for our customers. By using this service you are agreeing (1) not to use any information presented here for any purpose other than determining ownership of domain names, (2) not to store or reproduce this data in any way, (3) not to use any high-volume, automated, electronic processes to obtain data from this service. Abuse of this service is monitored and actions in contravention of these terms will result in being permanently blacklisted. All data is (c) CentralNic Ltd https://www.centralnic.com/") - expect(subject.domain).to eq("kidzlink.ae.org") - expect(subject.domain_id).to eq("CNIC-DO887354") - expect(subject.status).to eq(["clientTransferProhibited", "serverTransferProhibited"]) + expect(subject.disclaimer).to eq("The Whois and RDAP services are provided by CentralNic, and contain information pertaining to Internet domain names registered by our our customers. By using this service you are agreeing (1) not to use any information presented here for any purpose other than determining ownership of domain names, (2) not to store or reproduce this data in any way, (3) not to use any high-volume, automated, electronic processes to obtain data from this service. Abuse of this service is monitored and actions in contravention of these terms will result in being permanently blacklisted. All data is (c) CentralNic Ltd (https://www.centralnic.com) Access to the Whois and RDAP services is rate limited. For more information, visit https://registrar-console.centralnic.com/pub/whois_guidance.") + expect(subject.domain).to eq("greenflame.ae.org") + expect(subject.domain_id).to eq("D220363148-CNIC") + expect(subject.status).to eq(:registered) expect(subject.available?).to eq(false) expect(subject.registered?).to eq(true) expect(subject.created_on).to be_a(Time) - expect(subject.created_on).to eq(DateTime.parse("2012-08-03 15:37:33 UTC")) + expect(subject.created_on).to eq(DateTime.parse("2021-02-04 08:51:08 UTC")) expect(subject.updated_on).to be_a(Time) - expect(subject.updated_on).to eq(DateTime.parse("2013-06-09 00:12:37 UTC")) + expect(subject.updated_on).to eq(DateTime.parse("2021-03-24 15:08:42 UTC")) expect(subject.expires_on).to be_a(Time) - expect(subject.expires_on).to eq(DateTime.parse("2014-08-03 23:59:59 UTC")) + expect(subject.expires_on).to eq(DateTime.parse("2022-02-04 23:59:59 UTC")) expect(subject.registrar).to be_a(Whois::Parser::Registrar) - expect(subject.registrar.id).to eq("H65658") - expect(subject.registrar.name).to eq("101Domain, Inc.") - expect(subject.registrar.url).to eq("http://www.101domain.com") + expect(subject.registrar.id).to eq("1647") + expect(subject.registrar.name).to eq("Hosting Concepts B.V. d/b/a Registrar.eu") + expect(subject.registrar.url).to eq("https://www.openprovider.com/") expect(subject.registrant_contacts).to be_a(Array) expect(subject.registrant_contacts.size).to eq(1) expect(subject.registrant_contacts[0]).to be_a(Whois::Parser::Contact) expect(subject.registrant_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_REGISTRANT) - expect(subject.registrant_contacts[0].id).to eq("RWG000000003DA24") - expect(subject.registrant_contacts[0].name).to eq("IPC C/O Clarenter") - expect(subject.registrant_contacts[0].organization).to eq("Clarenter") - expect(subject.registrant_contacts[0].address).to eq("110 E Broward Blvd\nSte. 1720") - expect(subject.registrant_contacts[0].city).to eq("Fort Lauderdale") - expect(subject.registrant_contacts[0].zip).to eq("33301") - expect(subject.registrant_contacts[0].state).to eq("FL") + expect(subject.registrant_contacts[0].id).to eq(nil) + expect(subject.registrant_contacts[0].name).to eq(nil) + expect(subject.registrant_contacts[0].organization).to eq(nil) + expect(subject.registrant_contacts[0].address).to eq(nil) + expect(subject.registrant_contacts[0].city).to eq(nil) + expect(subject.registrant_contacts[0].zip).to eq(nil) + expect(subject.registrant_contacts[0].state).to eq(nil) expect(subject.registrant_contacts[0].country).to eq(nil) - expect(subject.registrant_contacts[0].country_code).to eq("US") - expect(subject.registrant_contacts[0].phone).to eq("+1.18888443911") + expect(subject.registrant_contacts[0].country_code).to eq(nil) + expect(subject.registrant_contacts[0].phone).to eq(nil) expect(subject.registrant_contacts[0].fax).to eq(nil) - expect(subject.registrant_contacts[0].email).to eq("patricia@internationalpreschoolcurriculum.com") + expect(subject.registrant_contacts[0].email).to eq("https://whois.centralnic.com/contact/greenflame.ae.org/registrant") expect(subject.admin_contacts).to be_a(Array) expect(subject.admin_contacts.size).to eq(1) expect(subject.admin_contacts[0]).to be_a(Whois::Parser::Contact) expect(subject.admin_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_ADMINISTRATIVE) - expect(subject.admin_contacts[0].id).to eq("RWG000000003DA24") - expect(subject.admin_contacts[0].name).to eq("IPC C/O Clarenter") - expect(subject.admin_contacts[0].organization).to eq("Clarenter") - expect(subject.admin_contacts[0].address).to eq("110 E Broward Blvd\nSte. 1720") - expect(subject.admin_contacts[0].city).to eq("Fort Lauderdale") - expect(subject.admin_contacts[0].zip).to eq("33301") - expect(subject.admin_contacts[0].state).to eq("FL") + expect(subject.admin_contacts[0].id).to eq(nil) + expect(subject.admin_contacts[0].name).to eq(nil) + expect(subject.admin_contacts[0].organization).to eq(nil) + expect(subject.admin_contacts[0].address).to eq(nil) + expect(subject.admin_contacts[0].city).to eq(nil) + expect(subject.admin_contacts[0].zip).to eq(nil) + expect(subject.admin_contacts[0].state).to eq(nil) expect(subject.admin_contacts[0].country).to eq(nil) - expect(subject.admin_contacts[0].country_code).to eq("US") - expect(subject.admin_contacts[0].phone).to eq("+1.18888443911") + expect(subject.admin_contacts[0].country_code).to eq(nil) + expect(subject.admin_contacts[0].phone).to eq(nil) expect(subject.admin_contacts[0].fax).to eq(nil) - expect(subject.admin_contacts[0].email).to eq("patricia@internationalpreschoolcurriculum.com") + expect(subject.admin_contacts[0].email).to eq("https://whois.centralnic.com/contact/greenflame.ae.org/admin") expect(subject.technical_contacts).to be_a(Array) expect(subject.technical_contacts.size).to eq(1) expect(subject.technical_contacts[0]).to be_a(Whois::Parser::Contact) expect(subject.technical_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_TECHNICAL) - expect(subject.technical_contacts[0].id).to eq("RWG000000003DA24") - expect(subject.technical_contacts[0].name).to eq("IPC C/O Clarenter") - expect(subject.technical_contacts[0].organization).to eq("Clarenter") - expect(subject.technical_contacts[0].address).to eq("110 E Broward Blvd\nSte. 1720") - expect(subject.technical_contacts[0].city).to eq("Fort Lauderdale") - expect(subject.technical_contacts[0].zip).to eq("33301") - expect(subject.technical_contacts[0].state).to eq("FL") + expect(subject.technical_contacts[0].id).to eq(nil) + expect(subject.technical_contacts[0].name).to eq(nil) + expect(subject.technical_contacts[0].organization).to eq(nil) + expect(subject.technical_contacts[0].address).to eq(nil) + expect(subject.technical_contacts[0].city).to eq(nil) + expect(subject.technical_contacts[0].zip).to eq(nil) + expect(subject.technical_contacts[0].state).to eq(nil) expect(subject.technical_contacts[0].country).to eq(nil) - expect(subject.technical_contacts[0].country_code).to eq("US") - expect(subject.technical_contacts[0].phone).to eq("+1.18888443911") + expect(subject.technical_contacts[0].country_code).to eq(nil) + expect(subject.technical_contacts[0].phone).to eq(nil) expect(subject.technical_contacts[0].fax).to eq(nil) - expect(subject.technical_contacts[0].email).to eq("patricia@internationalpreschoolcurriculum.com") + expect(subject.technical_contacts[0].email).to eq("https://whois.centralnic.com/contact/greenflame.ae.org/tech") expect(subject.nameservers).to be_a(Array) expect(subject.nameservers.size).to eq(2) expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[0].name).to eq("ns37.domaincontrol.com") - expect(subject.nameservers[0].ipv4).to eq(nil) - expect(subject.nameservers[0].ipv6).to eq(nil) + expect(subject.nameservers[0].name).to eq("ns1.dns-parking.com") expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[1].name).to eq("ns38.domaincontrol.com") - expect(subject.nameservers[1].ipv4).to eq(nil) - expect(subject.nameservers[1].ipv6).to eq(nil) + expect(subject.nameservers[1].name).to eq("ns2.dns-parking.com") end end diff --git a/spec/whois/parsers/responses/whois.centralnic.com/ar.com/status_registered_spec.rb b/spec/whois/parsers/responses/whois.centralnic.com/ar.com/status_registered_spec.rb deleted file mode 100644 index 6ec67104..00000000 --- a/spec/whois/parsers/responses/whois.centralnic.com/ar.com/status_registered_spec.rb +++ /dev/null @@ -1,103 +0,0 @@ -# encoding: utf-8 - -# This file is autogenerated. Do not edit it manually. -# If you want change the content of this file, edit -# -# /spec/fixtures/responses/whois.centralnic.com/ar.com/status_registered.expected -# -# and regenerate the tests with the following rake task -# -# $ rake spec:generate -# - -require 'spec_helper' - -describe "whois.centralnic.com", :aggregate_failures do - - subject do - file = fixture("responses", "whois.centralnic.com/ar.com/status_registered.txt") - part = Whois::Record::Part.new(body: File.read(file), host: "whois.centralnic.com") - Whois::Parser.parser_for(part) - end - - it "matches status_registered.expected" do - expect(subject.disclaimer).to eq("This whois service is provided by CentralNic Ltd and only contains information pertaining to Internet domain names we have registered for our customers. By using this service you are agreeing (1) not to use any information presented here for any purpose other than determining ownership of domain names, (2) not to store or reproduce this data in any way, (3) not to use any high-volume, automated, electronic processes to obtain data from this service. Abuse of this service is monitored and actions in contravention of these terms will result in being permanently blacklisted. All data is (c) CentralNic Ltd https://www.centralnic.com/") - expect(subject.domain).to eq("hotel.ar.com") - expect(subject.domain_id).to eq("CNIC-DO557730") - expect(subject.status).to eq(["ok"]) - expect(subject.available?).to eq(false) - expect(subject.registered?).to eq(true) - expect(subject.created_on).to be_a(Time) - expect(subject.created_on).to eq(DateTime.parse("2008-04-25 16:22:13 UTC")) - expect(subject.updated_on).to be_a(Time) - expect(subject.updated_on).to eq(DateTime.parse("2013-04-26 00:15:40 UTC")) - expect(subject.expires_on).to be_a(Time) - expect(subject.expires_on).to eq(DateTime.parse("2014-04-25 23:59:59 UTC")) - expect(subject.registrar).to be_a(Whois::Parser::Registrar) - expect(subject.registrar.id).to eq("H1323241") - expect(subject.registrar.name).to eq("CentralNic Ltd") - expect(subject.registrar.url).to eq(nil) - expect(subject.registrant_contacts).to be_a(Array) - expect(subject.registrant_contacts.size).to eq(1) - expect(subject.registrant_contacts[0]).to be_a(Whois::Parser::Contact) - expect(subject.registrant_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_REGISTRANT) - expect(subject.registrant_contacts[0].id).to eq("H1323241") - expect(subject.registrant_contacts[0].name).to eq("Reserved Domains") - expect(subject.registrant_contacts[0].organization).to eq("CentralNic Ltd") - expect(subject.registrant_contacts[0].address).to eq("35-39 Moorgate") - expect(subject.registrant_contacts[0].city).to eq("London") - expect(subject.registrant_contacts[0].zip).to eq("EC2R 6AR") - expect(subject.registrant_contacts[0].state).to eq(nil) - expect(subject.registrant_contacts[0].country).to eq(nil) - expect(subject.registrant_contacts[0].country_code).to eq("GB") - expect(subject.registrant_contacts[0].phone).to eq("+44.8700170900") - expect(subject.registrant_contacts[0].fax).to eq("+44.8700170901") - expect(subject.registrant_contacts[0].email).to eq("domains@centralnic.com") - expect(subject.admin_contacts).to be_a(Array) - expect(subject.admin_contacts.size).to eq(1) - expect(subject.admin_contacts[0]).to be_a(Whois::Parser::Contact) - expect(subject.admin_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_ADMINISTRATIVE) - expect(subject.admin_contacts[0].id).to eq("H1323241") - expect(subject.admin_contacts[0].name).to eq("Reserved Domains") - expect(subject.admin_contacts[0].organization).to eq("CentralNic Ltd") - expect(subject.admin_contacts[0].address).to eq("35-39 Moorgate") - expect(subject.admin_contacts[0].city).to eq("London") - expect(subject.admin_contacts[0].zip).to eq("EC2R 6AR") - expect(subject.admin_contacts[0].state).to eq(nil) - expect(subject.admin_contacts[0].country).to eq(nil) - expect(subject.admin_contacts[0].country_code).to eq("GB") - expect(subject.admin_contacts[0].phone).to eq("+44.8700170900") - expect(subject.admin_contacts[0].fax).to eq("+44.8700170901") - expect(subject.admin_contacts[0].email).to eq("domains@centralnic.com") - expect(subject.technical_contacts).to be_a(Array) - expect(subject.technical_contacts.size).to eq(1) - expect(subject.technical_contacts[0]).to be_a(Whois::Parser::Contact) - expect(subject.technical_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_TECHNICAL) - expect(subject.technical_contacts[0].id).to eq("H1323241") - expect(subject.technical_contacts[0].name).to eq("Reserved Domains") - expect(subject.technical_contacts[0].organization).to eq("CentralNic Ltd") - expect(subject.technical_contacts[0].address).to eq("35-39 Moorgate") - expect(subject.technical_contacts[0].city).to eq("London") - expect(subject.technical_contacts[0].zip).to eq("EC2R 6AR") - expect(subject.technical_contacts[0].state).to eq(nil) - expect(subject.technical_contacts[0].country).to eq(nil) - expect(subject.technical_contacts[0].country_code).to eq("GB") - expect(subject.technical_contacts[0].phone).to eq("+44.8700170900") - expect(subject.technical_contacts[0].fax).to eq("+44.8700170901") - expect(subject.technical_contacts[0].email).to eq("domains@centralnic.com") - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers.size).to eq(6) - expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[0].name).to eq("ns0.centralnic-dns.com") - expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[1].name).to eq("ns1.centralnic-dns.com") - expect(subject.nameservers[2]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[2].name).to eq("ns2.centralnic-dns.com") - expect(subject.nameservers[3]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[3].name).to eq("ns3.centralnic-dns.com") - expect(subject.nameservers[4]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[4].name).to eq("ns4.centralnic-dns.com") - expect(subject.nameservers[5]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[5].name).to eq("ns5.centralnic-dns.com") - end -end diff --git a/spec/whois/parsers/responses/whois.centralnic.com/br.com/status_available_spec.rb b/spec/whois/parsers/responses/whois.centralnic.com/br.com/status_available_spec.rb index 6868cec2..9fd9e9e3 100644 --- a/spec/whois/parsers/responses/whois.centralnic.com/br.com/status_available_spec.rb +++ b/spec/whois/parsers/responses/whois.centralnic.com/br.com/status_available_spec.rb @@ -21,10 +21,10 @@ end it "matches status_available.expected" do - expect(subject.disclaimer).to eq(nil) + expect(subject.disclaimer).to eq("The Whois and RDAP services are provided by CentralNic, and contain information pertaining to Internet domain names registered by our our customers. By using this service you are agreeing (1) not to use any information presented here for any purpose other than determining ownership of domain names, (2) not to store or reproduce this data in any way, (3) not to use any high-volume, automated, electronic processes to obtain data from this service. Abuse of this service is monitored and actions in contravention of these terms will result in being permanently blacklisted. All data is (c) CentralNic Ltd (https://www.centralnic.com) Access to the Whois and RDAP services is rate limited. For more information, visit https://registrar-console.centralnic.com/pub/whois_guidance.") expect(subject.domain).to eq(nil) expect(subject.domain_id).to eq(nil) - expect(subject.status).to eq([]) + expect(subject.status).to eq(:available) expect(subject.available?).to eq(true) expect(subject.registered?).to eq(false) expect(subject.created_on).to eq(nil) diff --git a/spec/whois/parsers/responses/whois.centralnic.com/br.com/status_registered_spec.rb b/spec/whois/parsers/responses/whois.centralnic.com/br.com/status_registered_spec.rb index fdebfb32..0ee111bd 100644 --- a/spec/whois/parsers/responses/whois.centralnic.com/br.com/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.centralnic.com/br.com/status_registered_spec.rb @@ -21,79 +21,46 @@ end it "matches status_registered.expected" do - expect(subject.disclaimer).to eq("This whois service is provided by CentralNic Ltd and only contains information pertaining to Internet domain names we have registered for our customers. By using this service you are agreeing (1) not to use any information presented here for any purpose other than determining ownership of domain names, (2) not to store or reproduce this data in any way, (3) not to use any high-volume, automated, electronic processes to obtain data from this service. Abuse of this service is monitored and actions in contravention of these terms will result in being permanently blacklisted. All data is (c) CentralNic Ltd https://www.centralnic.com/") - expect(subject.domain).to eq("billboard.br.com") - expect(subject.domain_id).to eq("CNIC-DO624205") - expect(subject.status).to eq(["clientTransferProhibited", "serverTransferProhibited", "renewPeriod"]) + expect(subject.disclaimer).to eq("The Whois and RDAP services are provided by CentralNic, and contain information pertaining to Internet domain names registered by our our customers. By using this service you are agreeing (1) not to use any information presented here for any purpose other than determining ownership of domain names, (2) not to store or reproduce this data in any way, (3) not to use any high-volume, automated, electronic processes to obtain data from this service. Abuse of this service is monitored and actions in contravention of these terms will result in being permanently blacklisted. All data is (c) CentralNic Ltd (https://www.centralnic.com) Access to the Whois and RDAP services is rate limited. For more information, visit https://registrar-console.centralnic.com/pub/whois_guidance.") + expect(subject.domain).to eq("linet.br.com") + expect(subject.domain_id).to eq("D1656506-CNIC") + expect(subject.status).to eq(:registered) expect(subject.available?).to eq(false) expect(subject.registered?).to eq(true) expect(subject.created_on).to be_a(Time) - expect(subject.created_on).to eq(DateTime.parse("2009-04-17 12:22:49 UTC")) + expect(subject.created_on).to eq(DateTime.parse("2013-11-28 13:16:50 UTC")) expect(subject.updated_on).to be_a(Time) - expect(subject.updated_on).to eq(DateTime.parse("2012-01-16 16:23:18 UTC")) + expect(subject.updated_on).to eq(DateTime.parse("2021-03-11 11:49:22 UTC")) expect(subject.expires_on).to be_a(Time) - expect(subject.expires_on).to eq(DateTime.parse("2017-04-17 23:59:59 UTC")) + expect(subject.expires_on).to eq(DateTime.parse("2022-11-28 23:59:59 UTC")) expect(subject.registrar).to be_a(Whois::Parser::Registrar) - expect(subject.registrar.id).to eq("H292913") - expect(subject.registrar.name).to eq("Network Solutions LLC") - expect(subject.registrar.url).to eq("http://www.networksolutions.com/") + expect(subject.registrar.id).to eq("1387") + expect(subject.registrar.name).to eq("1API GmbH") + expect(subject.registrar.url).to eq("http://www.1api.net") expect(subject.registrant_contacts).to be_a(Array) expect(subject.registrant_contacts.size).to eq(1) expect(subject.registrant_contacts[0]).to be_a(Whois::Parser::Contact) expect(subject.registrant_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_REGISTRANT) - expect(subject.registrant_contacts[0].id).to eq("36542943") - expect(subject.registrant_contacts[0].name).to eq("Antonio Camarotti Pinto") - expect(subject.registrant_contacts[0].organization).to eq(nil) - expect(subject.registrant_contacts[0].address).to eq("Rua Urussui, 238\n#22") - expect(subject.registrant_contacts[0].city).to eq("Sao Paulo") - expect(subject.registrant_contacts[0].zip).to eq("04542-050") - expect(subject.registrant_contacts[0].state).to eq("Sao Paulo") - expect(subject.registrant_contacts[0].country).to eq(nil) - expect(subject.registrant_contacts[0].country_code).to eq("BR") - expect(subject.registrant_contacts[0].phone).to eq("+1.551130787711") - expect(subject.registrant_contacts[0].fax).to eq(nil) - expect(subject.registrant_contacts[0].email).to eq("ac@bpp.bz") + expect(subject.registrant_contacts[0].email).to eq("https://whois.centralnic.com/contact/linet.br.com/registrant") expect(subject.admin_contacts).to be_a(Array) expect(subject.admin_contacts.size).to eq(1) expect(subject.admin_contacts[0]).to be_a(Whois::Parser::Contact) expect(subject.admin_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_ADMINISTRATIVE) - expect(subject.admin_contacts[0].id).to eq("36542943") - expect(subject.admin_contacts[0].name).to eq("Antonio Camarotti Pinto") - expect(subject.admin_contacts[0].organization).to eq(nil) - expect(subject.admin_contacts[0].address).to eq("Rua Urussui, 238\n#22") - expect(subject.admin_contacts[0].city).to eq("Sao Paulo") - expect(subject.admin_contacts[0].zip).to eq("04542-050") - expect(subject.admin_contacts[0].state).to eq("Sao Paulo") - expect(subject.admin_contacts[0].country).to eq(nil) - expect(subject.admin_contacts[0].country_code).to eq("BR") - expect(subject.admin_contacts[0].phone).to eq("+1.551130787711") - expect(subject.admin_contacts[0].fax).to eq(nil) - expect(subject.admin_contacts[0].email).to eq("ac@bpp.bz") + expect(subject.admin_contacts[0].email).to eq("https://whois.centralnic.com/contact/linet.br.com/admin") expect(subject.technical_contacts).to be_a(Array) expect(subject.technical_contacts.size).to eq(1) expect(subject.technical_contacts[0]).to be_a(Whois::Parser::Contact) expect(subject.technical_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_TECHNICAL) - expect(subject.technical_contacts[0].id).to eq("36542943") - expect(subject.technical_contacts[0].name).to eq("Antonio Camarotti Pinto") - expect(subject.technical_contacts[0].organization).to eq(nil) - expect(subject.technical_contacts[0].address).to eq("Rua Urussui, 238\n#22") - expect(subject.technical_contacts[0].city).to eq("Sao Paulo") - expect(subject.technical_contacts[0].zip).to eq("04542-050") - expect(subject.technical_contacts[0].state).to eq("Sao Paulo") - expect(subject.technical_contacts[0].country).to eq(nil) - expect(subject.technical_contacts[0].country_code).to eq("BR") - expect(subject.technical_contacts[0].phone).to eq("+1.551130787711") - expect(subject.technical_contacts[0].fax).to eq(nil) - expect(subject.technical_contacts[0].email).to eq("ac@bpp.bz") + expect(subject.technical_contacts[0].email).to eq("https://whois.centralnic.com/contact/linet.br.com/tech") expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers.size).to eq(2) + expect(subject.nameservers.size).to eq(4) expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[0].name).to eq("ns1.locaweb.com.br") - expect(subject.nameservers[0].ipv4).to eq(nil) - expect(subject.nameservers[0].ipv6).to eq(nil) + expect(subject.nameservers[0].name).to eq("ns1.iwantmyname.net") expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[1].name).to eq("ns2.locaweb.com.br") - expect(subject.nameservers[1].ipv4).to eq(nil) - expect(subject.nameservers[1].ipv6).to eq(nil) + expect(subject.nameservers[1].name).to eq("ns2.iwantmyname.net") + expect(subject.nameservers[2]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[2].name).to eq("ns3.iwantmyname.net") + expect(subject.nameservers[3]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[3].name).to eq("ns4.iwantmyname.net") end end diff --git a/spec/whois/parsers/responses/whois.centralnic.com/cn.com/status_available_spec.rb b/spec/whois/parsers/responses/whois.centralnic.com/cn.com/status_available_spec.rb index 1302f574..491d5b4a 100644 --- a/spec/whois/parsers/responses/whois.centralnic.com/cn.com/status_available_spec.rb +++ b/spec/whois/parsers/responses/whois.centralnic.com/cn.com/status_available_spec.rb @@ -21,10 +21,10 @@ end it "matches status_available.expected" do - expect(subject.disclaimer).to eq(nil) + expect(subject.disclaimer).to eq("The Whois and RDAP services are provided by CentralNic, and contain information pertaining to Internet domain names registered by our our customers. By using this service you are agreeing (1) not to use any information presented here for any purpose other than determining ownership of domain names, (2) not to store or reproduce this data in any way, (3) not to use any high-volume, automated, electronic processes to obtain data from this service. Abuse of this service is monitored and actions in contravention of these terms will result in being permanently blacklisted. All data is (c) CentralNic Ltd (https://www.centralnic.com) Access to the Whois and RDAP services is rate limited. For more information, visit https://registrar-console.centralnic.com/pub/whois_guidance.") expect(subject.domain).to eq(nil) expect(subject.domain_id).to eq(nil) - expect(subject.status).to eq([]) + expect(subject.status).to eq(:available) expect(subject.available?).to eq(true) expect(subject.registered?).to eq(false) expect(subject.created_on).to eq(nil) diff --git a/spec/whois/parsers/responses/whois.centralnic.com/cn.com/status_registered_spec.rb b/spec/whois/parsers/responses/whois.centralnic.com/cn.com/status_registered_spec.rb index 2a897457..c1980b65 100644 --- a/spec/whois/parsers/responses/whois.centralnic.com/cn.com/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.centralnic.com/cn.com/status_registered_spec.rb @@ -21,75 +21,46 @@ end it "matches status_registered.expected" do - expect(subject.disclaimer).to eq("This whois service is provided by CentralNic Ltd and only contains information pertaining to Internet domain names we have registered for our customers. By using this service you are agreeing (1) not to use any information presented here for any purpose other than determining ownership of domain names, (2) not to store or reproduce this data in any way, (3) not to use any high-volume, automated, electronic processes to obtain data from this service. Abuse of this service is monitored and actions in contravention of these terms will result in being permanently blacklisted. All data is (c) CentralNic Ltd https://www.centralnic.com/") + expect(subject.disclaimer).to eq("The Whois and RDAP services are provided by CentralNic, and contain information pertaining to Internet domain names registered by our our customers. By using this service you are agreeing (1) not to use any information presented here for any purpose other than determining ownership of domain names, (2) not to store or reproduce this data in any way, (3) not to use any high-volume, automated, electronic processes to obtain data from this service. Abuse of this service is monitored and actions in contravention of these terms will result in being permanently blacklisted. All data is (c) CentralNic Ltd (https://www.centralnic.com) Access to the Whois and RDAP services is rate limited. For more information, visit https://registrar-console.centralnic.com/pub/whois_guidance.") expect(subject.domain).to eq("gsn.cn.com") - expect(subject.domain_id).to eq("CNIC-DO323367") - expect(subject.status).to eq(["clientTransferProhibited", "serverTransferProhibited"]) + expect(subject.domain_id).to eq("D323367-CNIC") + expect(subject.status).to eq(:registered) expect(subject.available?).to eq(false) expect(subject.registered?).to eq(true) expect(subject.created_on).to be_a(Time) expect(subject.created_on).to eq(DateTime.parse("2005-11-23 15:44:03 UTC")) expect(subject.updated_on).to be_a(Time) - expect(subject.updated_on).to eq(DateTime.parse("2013-11-26 12:16:45 UTC")) + expect(subject.updated_on).to eq(DateTime.parse("2021-11-11 02:14:17 UTC")) expect(subject.expires_on).to be_a(Time) - expect(subject.expires_on).to eq(DateTime.parse("2014-11-23 23:59:59 UTC")) + expect(subject.expires_on).to eq(DateTime.parse("2022-11-23 23:59:59 UTC")) expect(subject.registrar).to be_a(Whois::Parser::Registrar) - expect(subject.registrar.id).to eq("H67436") + expect(subject.registrar.id).to eq("1408") expect(subject.registrar.name).to eq("united-domains AG") - expect(subject.registrar.url).to eq("http://www.united-domains.de") + expect(subject.registrar.url).to eq("https://www.united-domains.de/") expect(subject.registrant_contacts).to be_a(Array) expect(subject.registrant_contacts.size).to eq(1) expect(subject.registrant_contacts[0]).to be_a(Whois::Parser::Contact) expect(subject.registrant_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_REGISTRANT) - expect(subject.registrant_contacts[0].id).to eq("H1062079") - expect(subject.registrant_contacts[0].name).to eq("GSN Electronics Incorporation Pte Ltd") - expect(subject.registrant_contacts[0].organization).to eq(nil) - expect(subject.registrant_contacts[0].address).to eq("Straits Trading Building 9 Battery Road 16-08\nSingapore") - expect(subject.registrant_contacts[0].city).to eq(nil) - expect(subject.registrant_contacts[0].zip).to eq("049910") - expect(subject.registrant_contacts[0].state).to eq(nil) - expect(subject.registrant_contacts[0].country).to eq(nil) - expect(subject.registrant_contacts[0].country_code).to eq("SG") - expect(subject.registrant_contacts[0].phone).to eq("+65.62336919") - expect(subject.registrant_contacts[0].fax).to eq(nil) - expect(subject.registrant_contacts[0].email).to eq("abuse@gsn.in") + expect(subject.registrant_contacts[0].email).to eq("https://whois.centralnic.com/contact/gsn.cn.com/registrant") expect(subject.admin_contacts).to be_a(Array) expect(subject.admin_contacts.size).to eq(1) expect(subject.admin_contacts[0]).to be_a(Whois::Parser::Contact) expect(subject.admin_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_ADMINISTRATIVE) - expect(subject.admin_contacts[0].id).to eq("AUTO-DRZK-SNVHSY") - expect(subject.admin_contacts[0].name).to eq("Pauline Ang") - expect(subject.admin_contacts[0].organization).to eq("GSN Electronics Incorporation Pte Ltd") - expect(subject.admin_contacts[0].address).to eq("Straits Trading Building 9 Battery Road 16-08") - expect(subject.admin_contacts[0].city).to eq("Singapore") - expect(subject.admin_contacts[0].zip).to eq("049910") - expect(subject.admin_contacts[0].state).to eq(nil) - expect(subject.admin_contacts[0].country).to eq(nil) - expect(subject.admin_contacts[0].country_code).to eq("SG") - expect(subject.admin_contacts[0].phone).to eq("+65.62336919") - expect(subject.admin_contacts[0].fax).to eq(nil) - expect(subject.admin_contacts[0].email).to eq("abuse@gsn.in") + expect(subject.admin_contacts[0].email).to eq("https://whois.centralnic.com/contact/gsn.cn.com/admin") expect(subject.technical_contacts).to be_a(Array) expect(subject.technical_contacts.size).to eq(1) expect(subject.technical_contacts[0]).to be_a(Whois::Parser::Contact) expect(subject.technical_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_TECHNICAL) - expect(subject.technical_contacts[0].id).to eq("C-UHM65D7-TJGULR") - expect(subject.technical_contacts[0].name).to eq("Host Master") - expect(subject.technical_contacts[0].organization).to eq("united-domains AG") - expect(subject.technical_contacts[0].address).to eq("Gautinger Str. 10") - expect(subject.technical_contacts[0].city).to eq("Starnberg") - expect(subject.technical_contacts[0].zip).to eq("82319") - expect(subject.technical_contacts[0].state).to eq("Bayern") - expect(subject.technical_contacts[0].country).to eq(nil) - expect(subject.technical_contacts[0].country_code).to eq("DE") - expect(subject.technical_contacts[0].phone).to eq("+49.8151368670") - expect(subject.technical_contacts[0].fax).to eq("+49.81513686777") - expect(subject.technical_contacts[0].email).to eq("hostmaster@united-domains.de") + expect(subject.technical_contacts[0].email).to eq("https://whois.centralnic.com/contact/gsn.cn.com/tech") expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers.size).to eq(2) + expect(subject.nameservers.size).to eq(4) expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[0].name).to eq("ns1.meteos.it") + expect(subject.nameservers[0].name).to eq("ns1045.ui-dns.biz") expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[1].name).to eq("ns2.meteos.it") + expect(subject.nameservers[1].name).to eq("ns1045.ui-dns.de") + expect(subject.nameservers[2]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[2].name).to eq("ns1045.ui-dns.org") + expect(subject.nameservers[3]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[3].name).to eq("ns1045.ui-dns.com") end end diff --git a/spec/whois/parsers/responses/whois.centralnic.com/de.com/status_available_spec.rb b/spec/whois/parsers/responses/whois.centralnic.com/de.com/status_available_spec.rb index d2729d27..d94afc73 100644 --- a/spec/whois/parsers/responses/whois.centralnic.com/de.com/status_available_spec.rb +++ b/spec/whois/parsers/responses/whois.centralnic.com/de.com/status_available_spec.rb @@ -21,10 +21,10 @@ end it "matches status_available.expected" do - expect(subject.disclaimer).to eq(nil) + expect(subject.disclaimer).to eq("The Whois and RDAP services are provided by CentralNic, and contain information pertaining to Internet domain names registered by our our customers. By using this service you are agreeing (1) not to use any information presented here for any purpose other than determining ownership of domain names, (2) not to store or reproduce this data in any way, (3) not to use any high-volume, automated, electronic processes to obtain data from this service. Abuse of this service is monitored and actions in contravention of these terms will result in being permanently blacklisted. All data is (c) CentralNic Ltd (https://www.centralnic.com) Access to the Whois and RDAP services is rate limited. For more information, visit https://registrar-console.centralnic.com/pub/whois_guidance.") expect(subject.domain).to eq(nil) expect(subject.domain_id).to eq(nil) - expect(subject.status).to eq([]) + expect(subject.status).to eq(:available) expect(subject.available?).to eq(true) expect(subject.registered?).to eq(false) expect(subject.created_on).to eq(nil) diff --git a/spec/whois/parsers/responses/whois.centralnic.com/de.com/status_registered_spec.rb b/spec/whois/parsers/responses/whois.centralnic.com/de.com/status_registered_spec.rb index 51c7921a..6ac418e1 100644 --- a/spec/whois/parsers/responses/whois.centralnic.com/de.com/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.centralnic.com/de.com/status_registered_spec.rb @@ -21,79 +21,44 @@ end it "matches status_registered.expected" do - expect(subject.disclaimer).to eq("This whois service is provided by CentralNic Ltd and only contains information pertaining to Internet domain names we have registered for our customers. By using this service you are agreeing (1) not to use any information presented here for any purpose other than determining ownership of domain names, (2) not to store or reproduce this data in any way, (3) not to use any high-volume, automated, electronic processes to obtain data from this service. Abuse of this service is monitored and actions in contravention of these terms will result in being permanently blacklisted. All data is (c) CentralNic Ltd https://www.centralnic.com/") + expect(subject.disclaimer).to eq("The Whois and RDAP services are provided by CentralNic, and contain information pertaining to Internet domain names registered by our our customers. By using this service you are agreeing (1) not to use any information presented here for any purpose other than determining ownership of domain names, (2) not to store or reproduce this data in any way, (3) not to use any high-volume, automated, electronic processes to obtain data from this service. Abuse of this service is monitored and actions in contravention of these terms will result in being permanently blacklisted. All data is (c) CentralNic Ltd (https://www.centralnic.com) Access to the Whois and RDAP services is rate limited. For more information, visit https://registrar-console.centralnic.com/pub/whois_guidance.") expect(subject.domain).to eq("autopoint.de.com") - expect(subject.domain_id).to eq("CNIC-DO578833") - expect(subject.status).to eq(["clientTransferProhibited", "serverTransferProhibited"]) + expect(subject.domain_id).to eq("D578833-CNIC") + expect(subject.status).to eq(:registered) expect(subject.available?).to eq(false) expect(subject.registered?).to eq(true) expect(subject.created_on).to be_a(Time) expect(subject.created_on).to eq(DateTime.parse("2008-07-04 20:30:08 UTC")) expect(subject.updated_on).to be_a(Time) - expect(subject.updated_on).to eq(DateTime.parse("2013-07-12 10:03:56 UTC")) + expect(subject.updated_on).to eq(DateTime.parse("2021-11-11 15:12:54 UTC")) expect(subject.expires_on).to be_a(Time) - expect(subject.expires_on).to eq(DateTime.parse("2014-07-04 23:59:59 UTC")) + expect(subject.expires_on).to eq(DateTime.parse("2022-07-04 23:59:59 UTC")) expect(subject.registrar).to be_a(Whois::Parser::Registrar) - expect(subject.registrar.id).to eq("H67436") + expect(subject.registrar.id).to eq("1408") expect(subject.registrar.name).to eq("united-domains AG") - expect(subject.registrar.url).to eq("http://www.united-domains.de") + expect(subject.registrar.url).to eq("https://www.united-domains.de/") expect(subject.registrant_contacts).to be_a(Array) expect(subject.registrant_contacts.size).to eq(1) expect(subject.registrant_contacts[0]).to be_a(Whois::Parser::Contact) expect(subject.registrant_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_REGISTRANT) - expect(subject.registrant_contacts[0].id).to eq("H1102323") - expect(subject.registrant_contacts[0].name).to eq("Stefan Von Gehlen") - expect(subject.registrant_contacts[0].organization).to eq(nil) - expect(subject.registrant_contacts[0].address).to eq("Muelgaustr. 292-294, Moenchengladbach") - expect(subject.registrant_contacts[0].city).to eq(nil) - expect(subject.registrant_contacts[0].zip).to eq("41238") - expect(subject.registrant_contacts[0].state).to eq(nil) - expect(subject.registrant_contacts[0].country).to eq(nil) - expect(subject.registrant_contacts[0].country_code).to eq("DE") - expect(subject.registrant_contacts[0].phone).to eq("+49.2166120626") - expect(subject.registrant_contacts[0].fax).to eq(nil) - expect(subject.registrant_contacts[0].email).to eq("s.vongehlen@arcor.de") + expect(subject.registrant_contacts[0].email).to eq("https://whois.centralnic.com/contact/autopoint.de.com/registrant") expect(subject.admin_contacts).to be_a(Array) expect(subject.admin_contacts.size).to eq(1) expect(subject.admin_contacts[0]).to be_a(Whois::Parser::Contact) expect(subject.admin_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_ADMINISTRATIVE) - expect(subject.admin_contacts[0].id).to eq("H402505") - expect(subject.admin_contacts[0].name).to eq("Stefan Von Gehlen") - expect(subject.admin_contacts[0].organization).to eq(nil) - expect(subject.admin_contacts[0].address).to eq("Muelgaustr. 292-294, Moenchengladbach") - expect(subject.admin_contacts[0].city).to eq(nil) - expect(subject.admin_contacts[0].zip).to eq("41238") - expect(subject.admin_contacts[0].state).to eq(nil) - expect(subject.admin_contacts[0].country).to eq(nil) - expect(subject.admin_contacts[0].country_code).to eq("DE") - expect(subject.admin_contacts[0].phone).to eq("+49.2166120626") - expect(subject.admin_contacts[0].fax).to eq(nil) - expect(subject.admin_contacts[0].email).to eq("s.vongehlen@arcor.de") + expect(subject.admin_contacts[0].email).to eq("https://whois.centralnic.com/contact/autopoint.de.com/admin") expect(subject.technical_contacts).to be_a(Array) expect(subject.technical_contacts.size).to eq(1) expect(subject.technical_contacts[0]).to be_a(Whois::Parser::Contact) expect(subject.technical_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_TECHNICAL) - expect(subject.technical_contacts[0].id).to eq("C-UHM65D7-TJGULR") - expect(subject.technical_contacts[0].name).to eq("Host Master") - expect(subject.technical_contacts[0].organization).to eq("united-domains AG") - expect(subject.technical_contacts[0].address).to eq("Gautinger Str. 10") - expect(subject.technical_contacts[0].city).to eq("Starnberg") - expect(subject.technical_contacts[0].zip).to eq("82319") - expect(subject.technical_contacts[0].state).to eq("Bayern") - expect(subject.technical_contacts[0].country).to eq(nil) - expect(subject.technical_contacts[0].country_code).to eq("DE") - expect(subject.technical_contacts[0].phone).to eq("+49.8151368670") - expect(subject.technical_contacts[0].fax).to eq("+49.81513686777") - expect(subject.technical_contacts[0].email).to eq("hostmaster@united-domains.de") + expect(subject.technical_contacts[0].email).to eq("https://whois.centralnic.com/contact/autopoint.de.com/tech") expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers.size).to eq(2) + expect(subject.nameservers.size).to eq(3) expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[0].name).to eq("ns.udagdns.net") - expect(subject.nameservers[0].ipv4).to eq(nil) - expect(subject.nameservers[0].ipv6).to eq(nil) + expect(subject.nameservers[0].name).to eq("ns.udag.org") expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[1].name).to eq("ns.udagdns.de") - expect(subject.nameservers[1].ipv4).to eq(nil) - expect(subject.nameservers[1].ipv6).to eq(nil) + expect(subject.nameservers[1].name).to eq("ns.udag.de") + expect(subject.nameservers[2]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[2].name).to eq("ns.udag.net") end end diff --git a/spec/whois/parsers/responses/whois.centralnic.com/eu.com/status_available_spec.rb b/spec/whois/parsers/responses/whois.centralnic.com/eu.com/status_available_spec.rb index 8c9603e1..8fae4953 100644 --- a/spec/whois/parsers/responses/whois.centralnic.com/eu.com/status_available_spec.rb +++ b/spec/whois/parsers/responses/whois.centralnic.com/eu.com/status_available_spec.rb @@ -21,10 +21,10 @@ end it "matches status_available.expected" do - expect(subject.disclaimer).to eq(nil) + expect(subject.disclaimer).to eq("The Whois and RDAP services are provided by CentralNic, and contain information pertaining to Internet domain names registered by our our customers. By using this service you are agreeing (1) not to use any information presented here for any purpose other than determining ownership of domain names, (2) not to store or reproduce this data in any way, (3) not to use any high-volume, automated, electronic processes to obtain data from this service. Abuse of this service is monitored and actions in contravention of these terms will result in being permanently blacklisted. All data is (c) CentralNic Ltd (https://www.centralnic.com) Access to the Whois and RDAP services is rate limited. For more information, visit https://registrar-console.centralnic.com/pub/whois_guidance.") expect(subject.domain).to eq(nil) expect(subject.domain_id).to eq(nil) - expect(subject.status).to eq([]) + expect(subject.status).to eq(:available) expect(subject.available?).to eq(true) expect(subject.registered?).to eq(false) expect(subject.created_on).to eq(nil) diff --git a/spec/whois/parsers/responses/whois.centralnic.com/eu.com/status_registered_spec.rb b/spec/whois/parsers/responses/whois.centralnic.com/eu.com/status_registered_spec.rb index 5497ac8b..1a9db72d 100644 --- a/spec/whois/parsers/responses/whois.centralnic.com/eu.com/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.centralnic.com/eu.com/status_registered_spec.rb @@ -21,85 +21,52 @@ end it "matches status_registered.expected" do - expect(subject.disclaimer).to eq("This whois service is provided by CentralNic Ltd and only contains information pertaining to Internet domain names we have registered for our customers. By using this service you are agreeing (1) not to use any information presented here for any purpose other than determining ownership of domain names, (2) not to store or reproduce this data in any way, (3) not to use any high-volume, automated, electronic processes to obtain data from this service. Abuse of this service is monitored and actions in contravention of these terms will result in being permanently blacklisted. All data is (c) CentralNic Ltd https://www.centralnic.com/") + expect(subject.disclaimer).to eq("The Whois and RDAP services are provided by CentralNic, and contain information pertaining to Internet domain names registered by our our customers. By using this service you are agreeing (1) not to use any information presented here for any purpose other than determining ownership of domain names, (2) not to store or reproduce this data in any way, (3) not to use any high-volume, automated, electronic processes to obtain data from this service. Abuse of this service is monitored and actions in contravention of these terms will result in being permanently blacklisted. All data is (c) CentralNic Ltd (https://www.centralnic.com) Access to the Whois and RDAP services is rate limited. For more information, visit https://registrar-console.centralnic.com/pub/whois_guidance.") expect(subject.domain).to eq("walkabout.eu.com") - expect(subject.domain_id).to eq("CNIC-DO85080") - expect(subject.status).to eq(["ok"]) + expect(subject.domain_id).to eq("D93652968-CNIC") + expect(subject.status).to eq(:registered) expect(subject.available?).to eq(false) expect(subject.registered?).to eq(true) expect(subject.created_on).to be_a(Time) - expect(subject.created_on).to eq(DateTime.parse("2001-08-14 10:14:41 UTC")) + expect(subject.created_on).to eq(DateTime.parse("2019-02-14 09:07:09 UTC")) expect(subject.updated_on).to be_a(Time) - expect(subject.updated_on).to eq(DateTime.parse("2013-08-15 11:25:43 UTC")) + expect(subject.updated_on).to eq(DateTime.parse("2021-08-11 10:15:35 UTC")) expect(subject.expires_on).to be_a(Time) - expect(subject.expires_on).to eq(DateTime.parse("2015-08-14 23:59:59 UTC")) + expect(subject.expires_on).to eq(DateTime.parse("2022-02-14 23:59:59 UTC")) expect(subject.registrar).to be_a(Whois::Parser::Registrar) - expect(subject.registrar.id).to eq("H126914") - expect(subject.registrar.name).to eq("iTransact Ltd") - expect(subject.registrar.url).to eq("www.itransact.ltd.uk") + expect(subject.registrar.id).to eq("470") + expect(subject.registrar.name).to eq("Nom-iq Ltd. dba Com Laude") + expect(subject.registrar.url).to eq("http://www.comlaude.com") expect(subject.registrant_contacts).to be_a(Array) expect(subject.registrant_contacts.size).to eq(1) expect(subject.registrant_contacts[0]).to be_a(Whois::Parser::Contact) expect(subject.registrant_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_REGISTRANT) - expect(subject.registrant_contacts[0].id).to eq("H1045382") - expect(subject.registrant_contacts[0].name).to eq("Regent Inns Plc") - expect(subject.registrant_contacts[0].organization).to eq(nil) - expect(subject.registrant_contacts[0].address).to eq("77 Muswell Hill\nLondon") - expect(subject.registrant_contacts[0].city).to eq(nil) - expect(subject.registrant_contacts[0].zip).to eq("N10 3PJ") - expect(subject.registrant_contacts[0].state).to eq(nil) - expect(subject.registrant_contacts[0].country).to eq(nil) - expect(subject.registrant_contacts[0].country_code).to eq("GB") - expect(subject.registrant_contacts[0].phone).to eq("+44.2083753155") - expect(subject.registrant_contacts[0].fax).to eq("+44.2083753001") - expect(subject.registrant_contacts[0].email).to eq("john.boyle@regent-inns.plc.uk") + expect(subject.registrant_contacts[0].email).to eq("https://whois.centralnic.com/contact/walkabout.eu.com/registrant") expect(subject.admin_contacts).to be_a(Array) expect(subject.admin_contacts.size).to eq(1) expect(subject.admin_contacts[0]).to be_a(Whois::Parser::Contact) expect(subject.admin_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_ADMINISTRATIVE) - expect(subject.admin_contacts[0].id).to eq("H64717") - expect(subject.admin_contacts[0].name).to eq("John Boyle") - expect(subject.admin_contacts[0].organization).to eq("Regent Inns Plc") - expect(subject.admin_contacts[0].address).to eq("77 Muswell Hill\nLondon") - expect(subject.admin_contacts[0].city).to eq(nil) - expect(subject.admin_contacts[0].zip).to eq("N10 3PJ") - expect(subject.admin_contacts[0].state).to eq(nil) - expect(subject.admin_contacts[0].country).to eq(nil) - expect(subject.admin_contacts[0].country_code).to eq("GB") - expect(subject.admin_contacts[0].phone).to eq("+44.2083753155") - expect(subject.admin_contacts[0].fax).to eq("+44.2083753001") - expect(subject.admin_contacts[0].email).to eq("john.boyle@regent-inns.plc.uk") + expect(subject.admin_contacts[0].email).to eq("https://whois.centralnic.com/contact/walkabout.eu.com/admin") expect(subject.technical_contacts).to be_a(Array) expect(subject.technical_contacts.size).to eq(1) expect(subject.technical_contacts[0]).to be_a(Whois::Parser::Contact) expect(subject.technical_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_TECHNICAL) - expect(subject.technical_contacts[0].id).to eq("H126914") - expect(subject.technical_contacts[0].name).to eq("Constantine Pagonis") - expect(subject.technical_contacts[0].organization).to eq("iTransact Ltd") - expect(subject.technical_contacts[0].address).to eq("PO Box 430\nCambridge\nCambs") - expect(subject.technical_contacts[0].city).to eq(nil) - expect(subject.technical_contacts[0].zip).to eq("CB1 2WE") - expect(subject.technical_contacts[0].state).to eq(nil) - expect(subject.technical_contacts[0].country).to eq(nil) - expect(subject.technical_contacts[0].country_code).to eq("GB") - expect(subject.technical_contacts[0].phone).to eq("+44.1223700322") - expect(subject.technical_contacts[0].fax).to eq(nil) - expect(subject.technical_contacts[0].email).to eq("constantine@itransact.ltd.uk") + expect(subject.technical_contacts[0].email).to eq("https://whois.centralnic.com/contact/walkabout.eu.com/tech") expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers.size).to eq(4) + expect(subject.nameservers.size).to eq(7) expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[0].name).to eq("ns-1146.awsdns-15.org") - expect(subject.nameservers[0].ipv4).to eq(nil) - expect(subject.nameservers[0].ipv6).to eq(nil) + expect(subject.nameservers[0].name).to eq("ns0.demysdns.net") expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[1].name).to eq("ns-1741.awsdns-25.co.uk") - expect(subject.nameservers[1].ipv4).to eq(nil) - expect(subject.nameservers[1].ipv6).to eq(nil) - expect(subject.nameservers[2].name).to eq("ns-374.awsdns-46.com") - expect(subject.nameservers[2].ipv4).to eq(nil) - expect(subject.nameservers[2].ipv6).to eq(nil) - expect(subject.nameservers[3].name).to eq("ns-914.awsdns-50.net") - expect(subject.nameservers[3].ipv4).to eq(nil) - expect(subject.nameservers[3].ipv6).to eq(nil) + expect(subject.nameservers[1].name).to eq("ns1.demysdns.net") + expect(subject.nameservers[2]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[2].name).to eq("ns2.demysdns.net") + expect(subject.nameservers[3]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[3].name).to eq("ns3.demysdns.net") + expect(subject.nameservers[4]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[4].name).to eq("ns4.demysdns.co.uk") + expect(subject.nameservers[5]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[5].name).to eq("ns5.demysdns.co.uk") + expect(subject.nameservers[6]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[6].name).to eq("ns6.demysdns.co.uk") end end diff --git a/spec/whois/parsers/responses/whois.centralnic.com/gb.com/status_available_spec.rb b/spec/whois/parsers/responses/whois.centralnic.com/gb.com/status_available_spec.rb deleted file mode 100644 index 8125b607..00000000 --- a/spec/whois/parsers/responses/whois.centralnic.com/gb.com/status_available_spec.rb +++ /dev/null @@ -1,43 +0,0 @@ -# encoding: utf-8 - -# This file is autogenerated. Do not edit it manually. -# If you want change the content of this file, edit -# -# /spec/fixtures/responses/whois.centralnic.com/gb.com/status_available.expected -# -# and regenerate the tests with the following rake task -# -# $ rake spec:generate -# - -require 'spec_helper' - -describe "whois.centralnic.com", :aggregate_failures do - - subject do - file = fixture("responses", "whois.centralnic.com/gb.com/status_available.txt") - part = Whois::Record::Part.new(body: File.read(file), host: "whois.centralnic.com") - Whois::Parser.parser_for(part) - end - - it "matches status_available.expected" do - expect(subject.disclaimer).to eq(nil) - expect(subject.domain).to eq(nil) - expect(subject.domain_id).to eq(nil) - expect(subject.status).to eq([]) - expect(subject.available?).to eq(true) - expect(subject.registered?).to eq(false) - expect(subject.created_on).to eq(nil) - expect(subject.updated_on).to eq(nil) - expect(subject.expires_on).to eq(nil) - expect(subject.registrar).to eq(nil) - expect(subject.registrant_contacts).to be_a(Array) - expect(subject.registrant_contacts).to eq([]) - expect(subject.admin_contacts).to be_a(Array) - expect(subject.admin_contacts).to eq([]) - expect(subject.technical_contacts).to be_a(Array) - expect(subject.technical_contacts).to eq([]) - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers).to eq([]) - end -end diff --git a/spec/whois/parsers/responses/whois.centralnic.com/gb.com/status_registered_spec.rb b/spec/whois/parsers/responses/whois.centralnic.com/gb.com/status_registered_spec.rb deleted file mode 100644 index 900b3d6d..00000000 --- a/spec/whois/parsers/responses/whois.centralnic.com/gb.com/status_registered_spec.rb +++ /dev/null @@ -1,103 +0,0 @@ -# encoding: utf-8 - -# This file is autogenerated. Do not edit it manually. -# If you want change the content of this file, edit -# -# /spec/fixtures/responses/whois.centralnic.com/gb.com/status_registered.expected -# -# and regenerate the tests with the following rake task -# -# $ rake spec:generate -# - -require 'spec_helper' - -describe "whois.centralnic.com", :aggregate_failures do - - subject do - file = fixture("responses", "whois.centralnic.com/gb.com/status_registered.txt") - part = Whois::Record::Part.new(body: File.read(file), host: "whois.centralnic.com") - Whois::Parser.parser_for(part) - end - - it "matches status_registered.expected" do - expect(subject.disclaimer).to eq("This whois service is provided by CentralNic Ltd and only contains information pertaining to Internet domain names we have registered for our customers. By using this service you are agreeing (1) not to use any information presented here for any purpose other than determining ownership of domain names, (2) not to store or reproduce this data in any way, (3) not to use any high-volume, automated, electronic processes to obtain data from this service. Abuse of this service is monitored and actions in contravention of these terms will result in being permanently blacklisted. All data is (c) CentralNic Ltd https://www.centralnic.com/") - expect(subject.domain).to eq("hotel.gb.com") - expect(subject.domain_id).to eq("CNIC-DO403461") - expect(subject.status).to eq(["serverTransferProhibited"]) - expect(subject.available?).to eq(false) - expect(subject.registered?).to eq(true) - expect(subject.created_on).to be_a(Time) - expect(subject.created_on).to eq(DateTime.parse("2006-04-23 06:26:11 UTC")) - expect(subject.updated_on).to be_a(Time) - expect(subject.updated_on).to eq(DateTime.parse("2014-02-12 09:45:17 UTC")) - expect(subject.expires_on).to be_a(Time) - expect(subject.expires_on).to eq(DateTime.parse("2016-04-23 23:59:59 UTC")) - expect(subject.registrar).to be_a(Whois::Parser::Registrar) - expect(subject.registrar.id).to eq("H386560") - expect(subject.registrar.name).to eq("Wind Internethaus GMBH") - expect(subject.registrar.url).to eq("www.windinternethaus.de") - expect(subject.registrant_contacts).to be_a(Array) - expect(subject.registrant_contacts.size).to eq(1) - expect(subject.registrant_contacts[0]).to be_a(Whois::Parser::Contact) - expect(subject.registrant_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_REGISTRANT) - expect(subject.registrant_contacts[0].id).to eq("H1049605") - expect(subject.registrant_contacts[0].name).to eq("Robert Ragge, Hotel Reservation Service Robert Ragge GmbH") - expect(subject.registrant_contacts[0].organization).to eq(nil) - expect(subject.registrant_contacts[0].address).to eq("Blaubach 32") - expect(subject.registrant_contacts[0].city).to eq("Koeln") - expect(subject.registrant_contacts[0].zip).to eq("50676") - expect(subject.registrant_contacts[0].state).to eq("NRW") - expect(subject.registrant_contacts[0].country).to eq(nil) - expect(subject.registrant_contacts[0].country_code).to eq("DE") - expect(subject.registrant_contacts[0].phone).to eq("+49.2212077222") - expect(subject.registrant_contacts[0].fax).to eq("+49.2212077394") - expect(subject.registrant_contacts[0].email).to eq("domains@hrs.de") - expect(subject.admin_contacts).to be_a(Array) - expect(subject.admin_contacts.size).to eq(1) - expect(subject.admin_contacts[0]).to be_a(Whois::Parser::Contact) - expect(subject.admin_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_ADMINISTRATIVE) - expect(subject.admin_contacts[0].id).to eq("H393781") - expect(subject.admin_contacts[0].name).to eq("Robert Ragge") - expect(subject.admin_contacts[0].organization).to eq("Hotel Reservation Service Robert Ragge GmbH") - expect(subject.admin_contacts[0].address).to eq("Blaubach 32") - expect(subject.admin_contacts[0].city).to eq("Koeln") - expect(subject.admin_contacts[0].zip).to eq("50676") - expect(subject.admin_contacts[0].state).to eq("NRW") - expect(subject.admin_contacts[0].country).to eq(nil) - expect(subject.admin_contacts[0].country_code).to eq("DE") - expect(subject.admin_contacts[0].phone).to eq("+49.2212077222") - expect(subject.admin_contacts[0].fax).to eq("+49.2212077394") - expect(subject.admin_contacts[0].email).to eq("domains@hrs.de") - expect(subject.technical_contacts).to be_a(Array) - expect(subject.technical_contacts.size).to eq(1) - expect(subject.technical_contacts[0]).to be_a(Whois::Parser::Contact) - expect(subject.technical_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_TECHNICAL) - expect(subject.technical_contacts[0].id).to eq("H1103064") - expect(subject.technical_contacts[0].name).to eq("Uwe Watzek, Wind Internethaus GMBH") - expect(subject.technical_contacts[0].organization).to eq(nil) - expect(subject.technical_contacts[0].address).to eq("Am Krebsgraben 15\nHaus 2") - expect(subject.technical_contacts[0].city).to eq("Villingen-Schwenningen") - expect(subject.technical_contacts[0].zip).to eq("78048") - expect(subject.technical_contacts[0].state).to eq("Baden-Wuerttemberg") - expect(subject.technical_contacts[0].country).to eq(nil) - expect(subject.technical_contacts[0].country_code).to eq("DE") - expect(subject.technical_contacts[0].phone).to eq("+49.77214070740") - expect(subject.technical_contacts[0].fax).to eq("+49.77214070741") - expect(subject.technical_contacts[0].email).to eq("info@windinternethaus.de") - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers.size).to eq(3) - expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[0].name).to eq("ns1.hrs.de") - expect(subject.nameservers[0].ipv4).to eq(nil) - expect(subject.nameservers[0].ipv6).to eq(nil) - expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[1].name).to eq("ns2.hrs.de") - expect(subject.nameservers[1].ipv4).to eq(nil) - expect(subject.nameservers[1].ipv6).to eq(nil) - expect(subject.nameservers[2]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[2].name).to eq("ns2.surfbrett.de") - expect(subject.nameservers[2].ipv4).to eq(nil) - expect(subject.nameservers[2].ipv6).to eq(nil) - end -end diff --git a/spec/whois/parsers/responses/whois.centralnic.com/gb.net/status_available_spec.rb b/spec/whois/parsers/responses/whois.centralnic.com/gb.net/status_available_spec.rb deleted file mode 100644 index 349c0c02..00000000 --- a/spec/whois/parsers/responses/whois.centralnic.com/gb.net/status_available_spec.rb +++ /dev/null @@ -1,43 +0,0 @@ -# encoding: utf-8 - -# This file is autogenerated. Do not edit it manually. -# If you want change the content of this file, edit -# -# /spec/fixtures/responses/whois.centralnic.com/gb.net/status_available.expected -# -# and regenerate the tests with the following rake task -# -# $ rake spec:generate -# - -require 'spec_helper' - -describe "whois.centralnic.com", :aggregate_failures do - - subject do - file = fixture("responses", "whois.centralnic.com/gb.net/status_available.txt") - part = Whois::Record::Part.new(body: File.read(file), host: "whois.centralnic.com") - Whois::Parser.parser_for(part) - end - - it "matches status_available.expected" do - expect(subject.disclaimer).to eq(nil) - expect(subject.domain).to eq(nil) - expect(subject.domain_id).to eq(nil) - expect(subject.status).to eq([]) - expect(subject.available?).to eq(true) - expect(subject.registered?).to eq(false) - expect(subject.created_on).to eq(nil) - expect(subject.updated_on).to eq(nil) - expect(subject.expires_on).to eq(nil) - expect(subject.registrar).to eq(nil) - expect(subject.registrant_contacts).to be_a(Array) - expect(subject.registrant_contacts).to eq([]) - expect(subject.admin_contacts).to be_a(Array) - expect(subject.admin_contacts).to eq([]) - expect(subject.technical_contacts).to be_a(Array) - expect(subject.technical_contacts).to eq([]) - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers).to eq([]) - end -end diff --git a/spec/whois/parsers/responses/whois.centralnic.com/gb.net/status_registered_spec.rb b/spec/whois/parsers/responses/whois.centralnic.com/gb.net/status_registered_spec.rb deleted file mode 100644 index c1a0772f..00000000 --- a/spec/whois/parsers/responses/whois.centralnic.com/gb.net/status_registered_spec.rb +++ /dev/null @@ -1,109 +0,0 @@ -# encoding: utf-8 - -# This file is autogenerated. Do not edit it manually. -# If you want change the content of this file, edit -# -# /spec/fixtures/responses/whois.centralnic.com/gb.net/status_registered.expected -# -# and regenerate the tests with the following rake task -# -# $ rake spec:generate -# - -require 'spec_helper' - -describe "whois.centralnic.com", :aggregate_failures do - - subject do - file = fixture("responses", "whois.centralnic.com/gb.net/status_registered.txt") - part = Whois::Record::Part.new(body: File.read(file), host: "whois.centralnic.com") - Whois::Parser.parser_for(part) - end - - it "matches status_registered.expected" do - expect(subject.disclaimer).to eq("This whois service is provided by CentralNic Ltd and only contains information pertaining to Internet domain names we have registered for our customers. By using this service you are agreeing (1) not to use any information presented here for any purpose other than determining ownership of domain names, (2) not to store or reproduce this data in any way, (3) not to use any high-volume, automated, electronic processes to obtain data from this service. Abuse of this service is monitored and actions in contravention of these terms will result in being permanently blacklisted. All data is (c) CentralNic Ltd https://www.centralnic.com/") - expect(subject.domain).to eq("hotel.gb.net") - expect(subject.domain_id).to eq("CNIC-DO1423750") - expect(subject.status).to eq(["clientTransferProhibited", "serverTransferProhibited"]) - expect(subject.available?).to eq(false) - expect(subject.registered?).to eq(true) - expect(subject.created_on).to be_a(Time) - expect(subject.created_on).to eq(DateTime.parse("2013-08-25 12:36:24 UTC")) - expect(subject.updated_on).to be_a(Time) - expect(subject.updated_on).to eq(DateTime.parse("2013-08-30 12:42:09 UTC")) - expect(subject.expires_on).to be_a(Time) - expect(subject.expires_on).to eq(DateTime.parse("2014-08-25 23:59:59 UTC")) - expect(subject.registrar).to be_a(Whois::Parser::Registrar) - expect(subject.registrar.id).to eq("H1167922") - expect(subject.registrar.name).to eq("Gandi SAS") - expect(subject.registrar.url).to eq("http://www.gandi.net/") - expect(subject.registrant_contacts).to be_a(Array) - expect(subject.registrant_contacts.size).to eq(1) - expect(subject.registrant_contacts[0]).to be_a(Whois::Parser::Contact) - expect(subject.registrant_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_REGISTRANT) - expect(subject.registrant_contacts[0].id).to eq("R1149-GANDI-PRYP") - expect(subject.registrant_contacts[0].name).to eq("Heinz Pierre Roeser") - expect(subject.registrant_contacts[0].organization).to eq("Roevertrieb") - expect(subject.registrant_contacts[0].address).to eq("Friedensstr. 77") - expect(subject.registrant_contacts[0].city).to eq("Grevenbroich") - expect(subject.registrant_contacts[0].zip).to eq("41517") - expect(subject.registrant_contacts[0].state).to eq(nil) - expect(subject.registrant_contacts[0].country).to eq(nil) - expect(subject.registrant_contacts[0].country_code).to eq("DE") - expect(subject.registrant_contacts[0].phone).to eq("+49.218145077") - expect(subject.registrant_contacts[0].fax).to eq(nil) - expect(subject.registrant_contacts[0].email).to eq("roevertrieb@aol.com") - expect(subject.registrant_contacts[0].created_on).to eq(nil) - expect(subject.registrant_contacts[0].updated_on).to eq(nil) - expect(subject.admin_contacts).to be_a(Array) - expect(subject.admin_contacts.size).to eq(1) - expect(subject.admin_contacts[0]).to be_a(Whois::Parser::Contact) - expect(subject.admin_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_ADMINISTRATIVE) - expect(subject.admin_contacts[0].id).to eq("R1149-GANDI-PRYP") - expect(subject.admin_contacts[0].name).to eq("Heinz Pierre Roeser") - expect(subject.admin_contacts[0].organization).to eq("Roevertrieb") - expect(subject.admin_contacts[0].address).to eq("Friedensstr. 77") - expect(subject.admin_contacts[0].city).to eq("Grevenbroich") - expect(subject.admin_contacts[0].zip).to eq("41517") - expect(subject.admin_contacts[0].state).to eq(nil) - expect(subject.admin_contacts[0].country).to eq(nil) - expect(subject.admin_contacts[0].country_code).to eq("DE") - expect(subject.admin_contacts[0].phone).to eq("+49.218145077") - expect(subject.admin_contacts[0].fax).to eq(nil) - expect(subject.admin_contacts[0].email).to eq("roevertrieb@aol.com") - expect(subject.admin_contacts[0].created_on).to eq(nil) - expect(subject.admin_contacts[0].updated_on).to eq(nil) - expect(subject.technical_contacts).to be_a(Array) - expect(subject.technical_contacts.size).to eq(1) - expect(subject.technical_contacts[0]).to be_a(Whois::Parser::Contact) - expect(subject.technical_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_TECHNICAL) - expect(subject.technical_contacts[0].id).to eq("R1149-GANDI-PRYP") - expect(subject.technical_contacts[0].name).to eq("Heinz Pierre Roeser") - expect(subject.technical_contacts[0].organization).to eq("Roevertrieb") - expect(subject.technical_contacts[0].address).to eq("Friedensstr. 77") - expect(subject.technical_contacts[0].city).to eq("Grevenbroich") - expect(subject.technical_contacts[0].zip).to eq("41517") - expect(subject.technical_contacts[0].state).to eq(nil) - expect(subject.technical_contacts[0].country).to eq(nil) - expect(subject.technical_contacts[0].country_code).to eq("DE") - expect(subject.technical_contacts[0].phone).to eq("+49.218145077") - expect(subject.technical_contacts[0].fax).to eq(nil) - expect(subject.technical_contacts[0].email).to eq("roevertrieb@aol.com") - expect(subject.technical_contacts[0].created_on).to eq(nil) - expect(subject.technical_contacts[0].updated_on).to eq(nil) - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers.size).to eq(3) - expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[0].name).to eq("b.dns.gandi.net") - expect(subject.nameservers[0].ipv4).to eq(nil) - expect(subject.nameservers[0].ipv6).to eq(nil) - expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[1].name).to eq("c.dns.gandi.net") - expect(subject.nameservers[1].ipv4).to eq(nil) - expect(subject.nameservers[1].ipv6).to eq(nil) - expect(subject.nameservers[2]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[2].name).to eq("a.dns.gandi.net") - expect(subject.nameservers[2].ipv4).to eq(nil) - expect(subject.nameservers[2].ipv6).to eq(nil) - end -end diff --git a/spec/whois/parsers/responses/whois.centralnic.com/gr.com/status_available_spec.rb b/spec/whois/parsers/responses/whois.centralnic.com/gr.com/status_available_spec.rb index 0b8e5e0c..008e0ddf 100644 --- a/spec/whois/parsers/responses/whois.centralnic.com/gr.com/status_available_spec.rb +++ b/spec/whois/parsers/responses/whois.centralnic.com/gr.com/status_available_spec.rb @@ -21,10 +21,10 @@ end it "matches status_available.expected" do - expect(subject.disclaimer).to eq(nil) + expect(subject.disclaimer).to eq("The Whois and RDAP services are provided by CentralNic, and contain information pertaining to Internet domain names registered by our our customers. By using this service you are agreeing (1) not to use any information presented here for any purpose other than determining ownership of domain names, (2) not to store or reproduce this data in any way, (3) not to use any high-volume, automated, electronic processes to obtain data from this service. Abuse of this service is monitored and actions in contravention of these terms will result in being permanently blacklisted. All data is (c) CentralNic Ltd (https://www.centralnic.com) Access to the Whois and RDAP services is rate limited. For more information, visit https://registrar-console.centralnic.com/pub/whois_guidance.") expect(subject.domain).to eq(nil) expect(subject.domain_id).to eq(nil) - expect(subject.status).to eq([]) + expect(subject.status).to eq(:available) expect(subject.available?).to eq(true) expect(subject.registered?).to eq(false) expect(subject.created_on).to eq(nil) diff --git a/spec/whois/parsers/responses/whois.centralnic.com/gr.com/status_registered_spec.rb b/spec/whois/parsers/responses/whois.centralnic.com/gr.com/status_registered_spec.rb index 0ce21a24..9c646598 100644 --- a/spec/whois/parsers/responses/whois.centralnic.com/gr.com/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.centralnic.com/gr.com/status_registered_spec.rb @@ -21,58 +21,42 @@ end it "matches status_registered.expected" do - expect(subject.disclaimer).to eq("This whois service is provided by CentralNic Ltd and only contains information pertaining to Internet domain names we have registered for our customers. By using this service you are agreeing (1) not to use any information presented here for any purpose other than determining ownership of domain names, (2) not to store or reproduce this data in any way, (3) not to use any high-volume, automated, electronic processes to obtain data from this service. Abuse of this service is monitored and actions in contravention of these terms will result in being permanently blacklisted. All data is (c) CentralNic Ltd https://www.centralnic.com/") + expect(subject.disclaimer).to eq("The Whois and RDAP services are provided by CentralNic, and contain information pertaining to Internet domain names registered by our our customers. By using this service you are agreeing (1) not to use any information presented here for any purpose other than determining ownership of domain names, (2) not to store or reproduce this data in any way, (3) not to use any high-volume, automated, electronic processes to obtain data from this service. Abuse of this service is monitored and actions in contravention of these terms will result in being permanently blacklisted. All data is (c) CentralNic Ltd (https://www.centralnic.com) Access to the Whois and RDAP services is rate limited. For more information, visit https://registrar-console.centralnic.com/pub/whois_guidance.") expect(subject.domain).to eq("google.gr.com") - expect(subject.domain_id).to eq("CNIC-DO735168") - expect(subject.status).to eq(["ok"]) + expect(subject.domain_id).to eq("D67028804-CNIC") + expect(subject.status).to eq(:registered) expect(subject.available?).to eq(false) expect(subject.registered?).to eq(true) expect(subject.created_on).to be_a(Time) - expect(subject.created_on).to eq(DateTime.parse("2011-02-07 13:10:14 UTC")) + expect(subject.created_on).to eq(DateTime.parse("2018-05-07 07:21:24 UTC")) expect(subject.updated_on).to be_a(Time) - expect(subject.updated_on).to eq(DateTime.parse("2012-06-23 10:38:02 UTC")) + expect(subject.updated_on).to eq(DateTime.parse("2021-06-05 01:20:51 UTC")) expect(subject.expires_on).to be_a(Time) - expect(subject.expires_on).to eq(DateTime.parse("2015-02-07 23:59:59 UTC")) - expect(subject.registrar).to eq(nil) + expect(subject.expires_on).to eq(DateTime.parse("2022-05-07 23:59:59 UTC")) + expect(subject.registrar).to be_a(Whois::Parser::Registrar) + expect(subject.registrar.id).to eq("1861") + expect(subject.registrar.name).to eq("Porkbun, LLC") + expect(subject.registrar.url).to eq("https://porkbun.com/") expect(subject.registrant_contacts).to be_a(Array) expect(subject.registrant_contacts.size).to eq(1) expect(subject.registrant_contacts[0]).to be_a(Whois::Parser::Contact) expect(subject.registrant_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_REGISTRANT) - expect(subject.registrant_contacts[0].id).to eq("H1346485") - expect(subject.registrant_contacts[0].name).to eq(nil) - expect(subject.registrant_contacts[0].organization).to eq(nil) - expect(subject.registrant_contacts[0].address).to eq(nil) - expect(subject.registrant_contacts[0].city).to eq(nil) - expect(subject.registrant_contacts[0].zip).to eq(nil) - expect(subject.registrant_contacts[0].state).to eq(nil) - expect(subject.registrant_contacts[0].country).to eq(nil) - expect(subject.registrant_contacts[0].country_code).to eq(nil) - expect(subject.registrant_contacts[0].phone).to eq(nil) - expect(subject.registrant_contacts[0].fax).to eq(nil) - expect(subject.registrant_contacts[0].email).to eq(nil) + expect(subject.registrant_contacts[0].email).to eq("https://whois.centralnic.com/contact/google.gr.com/registrant") expect(subject.admin_contacts).to be_a(Array) - expect(subject.admin_contacts.size).to eq(0) + expect(subject.admin_contacts.size).to eq(1) + expect(subject.admin_contacts[0]).to be_a(Whois::Parser::Contact) + expect(subject.admin_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_ADMINISTRATIVE) + expect(subject.admin_contacts[0].email).to eq("https://whois.centralnic.com/contact/google.gr.com/admin") expect(subject.technical_contacts).to be_a(Array) expect(subject.technical_contacts.size).to eq(1) expect(subject.technical_contacts[0]).to be_a(Whois::Parser::Contact) expect(subject.technical_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_TECHNICAL) - expect(subject.technical_contacts[0].id).to eq("H1346485") - expect(subject.technical_contacts[0].name).to eq(nil) - expect(subject.technical_contacts[0].organization).to eq(nil) - expect(subject.technical_contacts[0].address).to eq(nil) - expect(subject.technical_contacts[0].city).to eq(nil) - expect(subject.technical_contacts[0].zip).to eq(nil) - expect(subject.technical_contacts[0].state).to eq(nil) - expect(subject.technical_contacts[0].country).to eq(nil) - expect(subject.technical_contacts[0].country_code).to eq(nil) - expect(subject.technical_contacts[0].phone).to eq(nil) - expect(subject.technical_contacts[0].fax).to eq(nil) - expect(subject.technical_contacts[0].email).to eq(nil) + expect(subject.technical_contacts[0].email).to eq("https://whois.centralnic.com/contact/google.gr.com/tech") expect(subject.nameservers).to be_a(Array) expect(subject.nameservers.size).to eq(2) expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[0].name).to eq("f1g1ns1.dnspod.net") + expect(subject.nameservers[0].name).to eq("ns1.67hosting.com") expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[1].name).to eq("f1g1ns2.dnspod.net") + expect(subject.nameservers[1].name).to eq("ns2.67hosting.com") end end diff --git a/spec/whois/parsers/responses/whois.centralnic.com/hu.com/status_registered_spec.rb b/spec/whois/parsers/responses/whois.centralnic.com/hu.com/status_registered_spec.rb deleted file mode 100644 index 04ee4d66..00000000 --- a/spec/whois/parsers/responses/whois.centralnic.com/hu.com/status_registered_spec.rb +++ /dev/null @@ -1,95 +0,0 @@ -# encoding: utf-8 - -# This file is autogenerated. Do not edit it manually. -# If you want change the content of this file, edit -# -# /spec/fixtures/responses/whois.centralnic.com/hu.com/status_registered.expected -# -# and regenerate the tests with the following rake task -# -# $ rake spec:generate -# - -require 'spec_helper' - -describe "whois.centralnic.com", :aggregate_failures do - - subject do - file = fixture("responses", "whois.centralnic.com/hu.com/status_registered.txt") - part = Whois::Record::Part.new(body: File.read(file), host: "whois.centralnic.com") - Whois::Parser.parser_for(part) - end - - it "matches status_registered.expected" do - expect(subject.disclaimer).to eq("This whois service is provided by CentralNic Ltd and only contains information pertaining to Internet domain names we have registered for our customers. By using this service you are agreeing (1) not to use any information presented here for any purpose other than determining ownership of domain names, (2) not to store or reproduce this data in any way, (3) not to use any high-volume, automated, electronic processes to obtain data from this service. Abuse of this service is monitored and actions in contravention of these terms will result in being permanently blacklisted. All data is (c) CentralNic Ltd https://www.centralnic.com/") - expect(subject.domain).to eq("porn.hu.com") - expect(subject.domain_id).to eq("CNIC-DO970405") - expect(subject.status).to eq(["pendingDelete", "pendingDelete"]) - expect(subject.available?).to eq(false) - expect(subject.registered?).to eq(true) - expect(subject.created_on).to be_a(Time) - expect(subject.created_on).to eq(DateTime.parse("2012-11-28 17:46:03 UTC")) - expect(subject.updated_on).to be_a(Time) - expect(subject.updated_on).to eq(DateTime.parse("2014-02-11 00:16:13 UTC")) - expect(subject.expires_on).to be_a(Time) - expect(subject.expires_on).to eq(DateTime.parse("2013-11-28 23:59:59 UTC")) - expect(subject.registrar).to be_a(Whois::Parser::Registrar) - expect(subject.registrar.id).to eq("H65658") - expect(subject.registrar.name).to eq("101Domain, Inc.") - expect(subject.registrar.url).to eq("http://www.101domain.com") - expect(subject.registrant_contacts).to be_a(Array) - expect(subject.registrant_contacts.size).to eq(1) - expect(subject.registrant_contacts[0]).to be_a(Whois::Parser::Contact) - expect(subject.registrant_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_REGISTRANT) - expect(subject.registrant_contacts[0].id).to eq("RWG000000004273D") - expect(subject.registrant_contacts[0].name).to eq("Gintautas Liaskus") - expect(subject.registrant_contacts[0].organization).to eq("G.Liaskaus firma INFOMEGA") - expect(subject.registrant_contacts[0].address).to eq("Kapsu 32-53") - expect(subject.registrant_contacts[0].city).to eq("Vilnius") - expect(subject.registrant_contacts[0].zip).to eq("02167") - expect(subject.registrant_contacts[0].state).to eq(nil) - expect(subject.registrant_contacts[0].country).to eq(nil) - expect(subject.registrant_contacts[0].country_code).to eq("LT") - expect(subject.registrant_contacts[0].phone).to eq("+370.52711457") - expect(subject.registrant_contacts[0].fax).to eq("+370.52784278") - expect(subject.registrant_contacts[0].email).to eq("infotau@infotau.lt") - expect(subject.admin_contacts).to be_a(Array) - expect(subject.admin_contacts.size).to eq(1) - expect(subject.admin_contacts[0]).to be_a(Whois::Parser::Contact) - expect(subject.admin_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_ADMINISTRATIVE) - expect(subject.admin_contacts[0].id).to eq("RWG000000004273D") - expect(subject.admin_contacts[0].name).to eq("Gintautas Liaskus") - expect(subject.admin_contacts[0].organization).to eq("G.Liaskaus firma INFOMEGA") - expect(subject.admin_contacts[0].address).to eq("Kapsu 32-53") - expect(subject.admin_contacts[0].city).to eq("Vilnius") - expect(subject.admin_contacts[0].zip).to eq("02167") - expect(subject.admin_contacts[0].state).to eq(nil) - expect(subject.admin_contacts[0].country).to eq(nil) - expect(subject.admin_contacts[0].country_code).to eq("LT") - expect(subject.admin_contacts[0].phone).to eq("+370.52711457") - expect(subject.admin_contacts[0].fax).to eq("+370.52784278") - expect(subject.admin_contacts[0].email).to eq("infotau@infotau.lt") - expect(subject.technical_contacts).to be_a(Array) - expect(subject.technical_contacts.size).to eq(1) - expect(subject.technical_contacts[0]).to be_a(Whois::Parser::Contact) - expect(subject.technical_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_TECHNICAL) - expect(subject.technical_contacts[0].id).to eq("RWG000000004273D") - expect(subject.technical_contacts[0].name).to eq("Gintautas Liaskus") - expect(subject.technical_contacts[0].organization).to eq("G.Liaskaus firma INFOMEGA") - expect(subject.technical_contacts[0].address).to eq("Kapsu 32-53") - expect(subject.technical_contacts[0].city).to eq("Vilnius") - expect(subject.technical_contacts[0].zip).to eq("02167") - expect(subject.technical_contacts[0].state).to eq(nil) - expect(subject.technical_contacts[0].country).to eq(nil) - expect(subject.technical_contacts[0].country_code).to eq("LT") - expect(subject.technical_contacts[0].phone).to eq("+370.52711457") - expect(subject.technical_contacts[0].fax).to eq("+370.52784278") - expect(subject.technical_contacts[0].email).to eq("infotau@infotau.lt") - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers.size).to eq(2) - expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[0].name).to eq("ns1.sedoparking.com") - expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[1].name).to eq("ns2.sedoparking.com") - end -end diff --git a/spec/whois/parsers/responses/whois.centralnic.com/jp.net/status_available_spec.rb b/spec/whois/parsers/responses/whois.centralnic.com/jp.net/status_available_spec.rb index a3795abe..64ca124f 100644 --- a/spec/whois/parsers/responses/whois.centralnic.com/jp.net/status_available_spec.rb +++ b/spec/whois/parsers/responses/whois.centralnic.com/jp.net/status_available_spec.rb @@ -21,10 +21,10 @@ end it "matches status_available.expected" do - expect(subject.disclaimer).to eq(nil) + expect(subject.disclaimer).to eq("The Whois and RDAP services are provided by CentralNic, and contain information pertaining to Internet domain names registered by our our customers. By using this service you are agreeing (1) not to use any information presented here for any purpose other than determining ownership of domain names, (2) not to store or reproduce this data in any way, (3) not to use any high-volume, automated, electronic processes to obtain data from this service. Abuse of this service is monitored and actions in contravention of these terms will result in being permanently blacklisted. All data is (c) CentralNic Ltd (https://www.centralnic.com) Access to the Whois and RDAP services is rate limited. For more information, visit https://registrar-console.centralnic.com/pub/whois_guidance.") expect(subject.domain).to eq(nil) expect(subject.domain_id).to eq(nil) - expect(subject.status).to eq([]) + expect(subject.status).to eq(:available) expect(subject.available?).to eq(true) expect(subject.registered?).to eq(false) expect(subject.created_on).to eq(nil) diff --git a/spec/whois/parsers/responses/whois.centralnic.com/jp.net/status_registered_spec.rb b/spec/whois/parsers/responses/whois.centralnic.com/jp.net/status_registered_spec.rb index 35d22d6a..cf598453 100644 --- a/spec/whois/parsers/responses/whois.centralnic.com/jp.net/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.centralnic.com/jp.net/status_registered_spec.rb @@ -21,75 +21,42 @@ end it "matches status_registered.expected" do - expect(subject.disclaimer).to eq("This whois service is provided by CentralNic Ltd and only contains information pertaining to Internet domain names we have registered for our customers. By using this service you are agreeing (1) not to use any information presented here for any purpose other than determining ownership of domain names, (2) not to store or reproduce this data in any way, (3) not to use any high-volume, automated, electronic processes to obtain data from this service. Abuse of this service is monitored and actions in contravention of these terms will result in being permanently blacklisted. All data is (c) CentralNic Ltd https://www.centralnic.com/") + expect(subject.disclaimer).to eq("The Whois and RDAP services are provided by CentralNic, and contain information pertaining to Internet domain names registered by our our customers. By using this service you are agreeing (1) not to use any information presented here for any purpose other than determining ownership of domain names, (2) not to store or reproduce this data in any way, (3) not to use any high-volume, automated, electronic processes to obtain data from this service. Abuse of this service is monitored and actions in contravention of these terms will result in being permanently blacklisted. All data is (c) CentralNic Ltd (https://www.centralnic.com) Access to the Whois and RDAP services is rate limited. For more information, visit https://registrar-console.centralnic.com/pub/whois_guidance.") expect(subject.domain).to eq("ntt.jp.net") - expect(subject.domain_id).to eq("CNIC-DO846061") - expect(subject.status).to eq(["ok"]) + expect(subject.domain_id).to eq("D195732259-CNIC") + expect(subject.status).to eq(:registered) expect(subject.available?).to eq(false) expect(subject.registered?).to eq(true) expect(subject.created_on).to be_a(Time) - expect(subject.created_on).to eq(DateTime.parse("2012-03-16 11:47:23 UTC")) + expect(subject.created_on).to eq(DateTime.parse("2020-08-06 08:41:29 UTC")) expect(subject.updated_on).to be_a(Time) - expect(subject.updated_on).to eq(DateTime.parse("2013-01-24 16:57:19 UTC")) + expect(subject.updated_on).to eq(DateTime.parse("2020-09-04 04:22:52 UTC")) expect(subject.expires_on).to be_a(Time) - expect(subject.expires_on).to eq(DateTime.parse("2018-03-16 23:59:59 UTC")) + expect(subject.expires_on).to eq(DateTime.parse("2022-08-06 23:59:59 UTC")) expect(subject.registrar).to be_a(Whois::Parser::Registrar) - expect(subject.registrar.id).to eq("H1605993") - expect(subject.registrar.name).to eq("GMO") - expect(subject.registrar.url).to eq("http://www.onamae.com") + expect(subject.registrar.id).to eq("1387") + expect(subject.registrar.name).to eq("1API GmbH") + expect(subject.registrar.url).to eq("http://www.1api.net") expect(subject.registrant_contacts).to be_a(Array) expect(subject.registrant_contacts.size).to eq(1) expect(subject.registrant_contacts[0]).to be_a(Whois::Parser::Contact) expect(subject.registrant_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_REGISTRANT) - expect(subject.registrant_contacts[0].id).to eq("136151BCEFE") - expect(subject.registrant_contacts[0].name).to eq("zhijian xia") - expect(subject.registrant_contacts[0].organization).to eq("zhijian xia") - expect(subject.registrant_contacts[0].address).to eq("Chuo\n3-23-20") - expect(subject.registrant_contacts[0].city).to eq("Warabi-shi") - expect(subject.registrant_contacts[0].zip).to eq("335-0004") - expect(subject.registrant_contacts[0].state).to eq("Saitama") - expect(subject.registrant_contacts[0].country).to eq(nil) - expect(subject.registrant_contacts[0].country_code).to eq("JP") - expect(subject.registrant_contacts[0].phone).to eq("+81.08037215656") - expect(subject.registrant_contacts[0].fax).to eq(nil) - expect(subject.registrant_contacts[0].email).to eq("xia@ingame.jp") + expect(subject.registrant_contacts[0].email).to eq("https://whois.centralnic.com/contact/ntt.jp.net/registrant") expect(subject.admin_contacts).to be_a(Array) expect(subject.admin_contacts.size).to eq(1) expect(subject.admin_contacts[0]).to be_a(Whois::Parser::Contact) expect(subject.admin_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_ADMINISTRATIVE) - expect(subject.admin_contacts[0].id).to eq("136151BD1A1") - expect(subject.admin_contacts[0].name).to eq("zhijian xia") - expect(subject.admin_contacts[0].organization).to eq("zhijian xia") - expect(subject.admin_contacts[0].address).to eq("Chuo\n3-23-20") - expect(subject.admin_contacts[0].city).to eq("Warabi-shi") - expect(subject.admin_contacts[0].zip).to eq("335-0004") - expect(subject.admin_contacts[0].state).to eq("Saitama") - expect(subject.admin_contacts[0].country).to eq(nil) - expect(subject.admin_contacts[0].country_code).to eq("JP") - expect(subject.admin_contacts[0].phone).to eq("+81.08037215656") - expect(subject.admin_contacts[0].fax).to eq(nil) - expect(subject.admin_contacts[0].email).to eq("xia@ingame.jp") + expect(subject.admin_contacts[0].email).to eq("https://whois.centralnic.com/contact/ntt.jp.net/admin") expect(subject.technical_contacts).to be_a(Array) expect(subject.technical_contacts.size).to eq(1) expect(subject.technical_contacts[0]).to be_a(Whois::Parser::Contact) expect(subject.technical_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_TECHNICAL) - expect(subject.technical_contacts[0].id).to eq("136151BD459") - expect(subject.technical_contacts[0].name).to eq("Technical Contact") - expect(subject.technical_contacts[0].organization).to eq("GMO Internet Inc.") - expect(subject.technical_contacts[0].address).to eq("26-1 Sakuragaoka-cho\nCerulean Tower 11F") - expect(subject.technical_contacts[0].city).to eq("Shibuya-ku") - expect(subject.technical_contacts[0].zip).to eq("150-8512") - expect(subject.technical_contacts[0].state).to eq("Tokyo") - expect(subject.technical_contacts[0].country).to eq(nil) - expect(subject.technical_contacts[0].country_code).to eq("JP") - expect(subject.technical_contacts[0].phone).to eq("+81.0354562555") - expect(subject.technical_contacts[0].fax).to eq("+81.0354562556") - expect(subject.technical_contacts[0].email).to eq("admin@onamae.com") + expect(subject.technical_contacts[0].email).to eq("https://whois.centralnic.com/contact/ntt.jp.net/tech") expect(subject.nameservers).to be_a(Array) expect(subject.nameservers.size).to eq(2) expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[0].name).to eq("dns1.onamae.com") + expect(subject.nameservers[0].name).to eq("f1g1ns1.dnspod.net") expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[1].name).to eq("dns2.onamae.com") + expect(subject.nameservers[1].name).to eq("f1g1ns2.dnspod.net") end end diff --git a/spec/whois/parsers/responses/whois.centralnic.com/jpn.com/status_available_spec.rb b/spec/whois/parsers/responses/whois.centralnic.com/jpn.com/status_available_spec.rb deleted file mode 100644 index 7834b396..00000000 --- a/spec/whois/parsers/responses/whois.centralnic.com/jpn.com/status_available_spec.rb +++ /dev/null @@ -1,43 +0,0 @@ -# encoding: utf-8 - -# This file is autogenerated. Do not edit it manually. -# If you want change the content of this file, edit -# -# /spec/fixtures/responses/whois.centralnic.com/jpn.com/status_available.expected -# -# and regenerate the tests with the following rake task -# -# $ rake spec:generate -# - -require 'spec_helper' - -describe "whois.centralnic.com", :aggregate_failures do - - subject do - file = fixture("responses", "whois.centralnic.com/jpn.com/status_available.txt") - part = Whois::Record::Part.new(body: File.read(file), host: "whois.centralnic.com") - Whois::Parser.parser_for(part) - end - - it "matches status_available.expected" do - expect(subject.disclaimer).to eq(nil) - expect(subject.domain).to eq(nil) - expect(subject.domain_id).to eq(nil) - expect(subject.status).to eq([]) - expect(subject.available?).to eq(true) - expect(subject.registered?).to eq(false) - expect(subject.created_on).to eq(nil) - expect(subject.updated_on).to eq(nil) - expect(subject.expires_on).to eq(nil) - expect(subject.registrar).to eq(nil) - expect(subject.registrant_contacts).to be_a(Array) - expect(subject.registrant_contacts).to eq([]) - expect(subject.admin_contacts).to be_a(Array) - expect(subject.admin_contacts).to eq([]) - expect(subject.technical_contacts).to be_a(Array) - expect(subject.technical_contacts).to eq([]) - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers).to eq([]) - end -end diff --git a/spec/whois/parsers/responses/whois.centralnic.com/jpn.com/status_registered_spec.rb b/spec/whois/parsers/responses/whois.centralnic.com/jpn.com/status_registered_spec.rb deleted file mode 100644 index 4bdbe685..00000000 --- a/spec/whois/parsers/responses/whois.centralnic.com/jpn.com/status_registered_spec.rb +++ /dev/null @@ -1,99 +0,0 @@ -# encoding: utf-8 - -# This file is autogenerated. Do not edit it manually. -# If you want change the content of this file, edit -# -# /spec/fixtures/responses/whois.centralnic.com/jpn.com/status_registered.expected -# -# and regenerate the tests with the following rake task -# -# $ rake spec:generate -# - -require 'spec_helper' - -describe "whois.centralnic.com", :aggregate_failures do - - subject do - file = fixture("responses", "whois.centralnic.com/jpn.com/status_registered.txt") - part = Whois::Record::Part.new(body: File.read(file), host: "whois.centralnic.com") - Whois::Parser.parser_for(part) - end - - it "matches status_registered.expected" do - expect(subject.disclaimer).to eq("This whois service is provided by CentralNic Ltd and only contains information pertaining to Internet domain names we have registered for our customers. By using this service you are agreeing (1) not to use any information presented here for any purpose other than determining ownership of domain names, (2) not to store or reproduce this data in any way, (3) not to use any high-volume, automated, electronic processes to obtain data from this service. Abuse of this service is monitored and actions in contravention of these terms will result in being permanently blacklisted. All data is (c) CentralNic Ltd https://www.centralnic.com/") - expect(subject.domain).to eq("koi.jpn.com") - expect(subject.domain_id).to eq("CNIC-DO492866") - expect(subject.status).to eq(["ok"]) - expect(subject.available?).to eq(false) - expect(subject.registered?).to eq(true) - expect(subject.created_on).to be_a(Time) - expect(subject.created_on).to eq(DateTime.parse("2007-06-29 13:42:35 UTC")) - expect(subject.updated_on).to be_a(Time) - expect(subject.updated_on).to eq(DateTime.parse("2013-07-01 00:18:14 UTC")) - expect(subject.expires_on).to be_a(Time) - expect(subject.expires_on).to eq(DateTime.parse("2015-06-29 23:59:59 UTC")) - expect(subject.registrar).to be_a(Whois::Parser::Registrar) - expect(subject.registrar.id).to eq("I6467") - expect(subject.registrar.name).to eq("Webfusion") - expect(subject.registrar.url).to eq("http://www.123-reg.co.uk/domain-names/") - expect(subject.registrant_contacts).to be_a(Array) - expect(subject.registrant_contacts.size).to eq(1) - expect(subject.registrant_contacts[0]).to be_a(Whois::Parser::Contact) - expect(subject.registrant_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_REGISTRANT) - expect(subject.registrant_contacts[0].id).to eq("MNT78E22765897") - expect(subject.registrant_contacts[0].name).to eq("Identity Protection Service") - expect(subject.registrant_contacts[0].organization).to eq("Identity Protect Limited") - expect(subject.registrant_contacts[0].address).to eq("PO Box 795") - expect(subject.registrant_contacts[0].city).to eq("Godalming") - expect(subject.registrant_contacts[0].zip).to eq("GU7 9GA") - expect(subject.registrant_contacts[0].state).to eq("Surrey") - expect(subject.registrant_contacts[0].country).to eq(nil) - expect(subject.registrant_contacts[0].country_code).to eq("GB") - expect(subject.registrant_contacts[0].phone).to eq("+44.1483307527") - expect(subject.registrant_contacts[0].fax).to eq("+44.1483304031") - expect(subject.registrant_contacts[0].email).to eq("koi.jpn.com@identity-protect.org") - expect(subject.admin_contacts).to be_a(Array) - expect(subject.admin_contacts.size).to eq(1) - expect(subject.admin_contacts[0]).to be_a(Whois::Parser::Contact) - expect(subject.admin_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_ADMINISTRATIVE) - expect(subject.admin_contacts[0].id).to eq("MNT78E22765897") - expect(subject.admin_contacts[0].name).to eq("Identity Protection Service") - expect(subject.admin_contacts[0].organization).to eq("Identity Protect Limited") - expect(subject.admin_contacts[0].address).to eq("PO Box 795") - expect(subject.admin_contacts[0].city).to eq("Godalming") - expect(subject.admin_contacts[0].zip).to eq("GU7 9GA") - expect(subject.admin_contacts[0].state).to eq("Surrey") - expect(subject.admin_contacts[0].country).to eq(nil) - expect(subject.admin_contacts[0].country_code).to eq("GB") - expect(subject.admin_contacts[0].phone).to eq("+44.1483307527") - expect(subject.admin_contacts[0].fax).to eq("+44.1483304031") - expect(subject.admin_contacts[0].email).to eq("koi.jpn.com@identity-protect.org") - expect(subject.technical_contacts).to be_a(Array) - expect(subject.technical_contacts.size).to eq(1) - expect(subject.technical_contacts[0]).to be_a(Whois::Parser::Contact) - expect(subject.technical_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_TECHNICAL) - expect(subject.technical_contacts[0].id).to eq("MNT78E22765897") - expect(subject.technical_contacts[0].name).to eq("Identity Protection Service") - expect(subject.technical_contacts[0].organization).to eq("Identity Protect Limited") - expect(subject.technical_contacts[0].address).to eq("PO Box 795") - expect(subject.technical_contacts[0].city).to eq("Godalming") - expect(subject.technical_contacts[0].zip).to eq("GU7 9GA") - expect(subject.technical_contacts[0].state).to eq("Surrey") - expect(subject.technical_contacts[0].country).to eq(nil) - expect(subject.technical_contacts[0].country_code).to eq("GB") - expect(subject.technical_contacts[0].phone).to eq("+44.1483307527") - expect(subject.technical_contacts[0].fax).to eq("+44.1483304031") - expect(subject.technical_contacts[0].email).to eq("koi.jpn.com@identity-protect.org") - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers.size).to eq(2) - expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[0].name).to eq("ns1.chaoshosting.co.uk") - expect(subject.nameservers[0].ipv4).to eq(nil) - expect(subject.nameservers[0].ipv6).to eq(nil) - expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[1].name).to eq("ns2.chaoshosting.co.uk") - expect(subject.nameservers[1].ipv4).to eq(nil) - expect(subject.nameservers[1].ipv6).to eq(nil) - end -end diff --git a/spec/whois/parsers/responses/whois.centralnic.com/kr.com/status_available_spec.rb b/spec/whois/parsers/responses/whois.centralnic.com/kr.com/status_available_spec.rb deleted file mode 100644 index 3eb0e8a0..00000000 --- a/spec/whois/parsers/responses/whois.centralnic.com/kr.com/status_available_spec.rb +++ /dev/null @@ -1,43 +0,0 @@ -# encoding: utf-8 - -# This file is autogenerated. Do not edit it manually. -# If you want change the content of this file, edit -# -# /spec/fixtures/responses/whois.centralnic.com/kr.com/status_available.expected -# -# and regenerate the tests with the following rake task -# -# $ rake spec:generate -# - -require 'spec_helper' - -describe "whois.centralnic.com", :aggregate_failures do - - subject do - file = fixture("responses", "whois.centralnic.com/kr.com/status_available.txt") - part = Whois::Record::Part.new(body: File.read(file), host: "whois.centralnic.com") - Whois::Parser.parser_for(part) - end - - it "matches status_available.expected" do - expect(subject.disclaimer).to eq(nil) - expect(subject.domain).to eq(nil) - expect(subject.domain_id).to eq(nil) - expect(subject.status).to eq([]) - expect(subject.available?).to eq(true) - expect(subject.registered?).to eq(false) - expect(subject.created_on).to eq(nil) - expect(subject.updated_on).to eq(nil) - expect(subject.expires_on).to eq(nil) - expect(subject.registrar).to eq(nil) - expect(subject.registrant_contacts).to be_a(Array) - expect(subject.registrant_contacts).to eq([]) - expect(subject.admin_contacts).to be_a(Array) - expect(subject.admin_contacts).to eq([]) - expect(subject.technical_contacts).to be_a(Array) - expect(subject.technical_contacts).to eq([]) - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers).to eq([]) - end -end diff --git a/spec/whois/parsers/responses/whois.centralnic.com/kr.com/status_registered_spec.rb b/spec/whois/parsers/responses/whois.centralnic.com/kr.com/status_registered_spec.rb deleted file mode 100644 index 2db4181f..00000000 --- a/spec/whois/parsers/responses/whois.centralnic.com/kr.com/status_registered_spec.rb +++ /dev/null @@ -1,111 +0,0 @@ -# encoding: utf-8 - -# This file is autogenerated. Do not edit it manually. -# If you want change the content of this file, edit -# -# /spec/fixtures/responses/whois.centralnic.com/kr.com/status_registered.expected -# -# and regenerate the tests with the following rake task -# -# $ rake spec:generate -# - -require 'spec_helper' - -describe "whois.centralnic.com", :aggregate_failures do - - subject do - file = fixture("responses", "whois.centralnic.com/kr.com/status_registered.txt") - part = Whois::Record::Part.new(body: File.read(file), host: "whois.centralnic.com") - Whois::Parser.parser_for(part) - end - - it "matches status_registered.expected" do - expect(subject.disclaimer).to eq("This whois service is provided by CentralNic Ltd and only contains information pertaining to Internet domain names we have registered for our customers. By using this service you are agreeing (1) not to use any information presented here for any purpose other than determining ownership of domain names, (2) not to store or reproduce this data in any way, (3) not to use any high-volume, automated, electronic processes to obtain data from this service. Abuse of this service is monitored and actions in contravention of these terms will result in being permanently blacklisted. All data is (c) CentralNic Ltd https://www.centralnic.com/") - expect(subject.domain).to eq("academyart.kr.com") - expect(subject.domain_id).to eq("CNIC-DO569707") - expect(subject.status).to eq(["clientTransferProhibited", "serverTransferProhibited"]) - expect(subject.available?).to eq(false) - expect(subject.registered?).to eq(true) - expect(subject.created_on).to be_a(Time) - expect(subject.created_on).to eq(DateTime.parse("2008-06-11 21:25:43 UTC")) - expect(subject.updated_on).to be_a(Time) - expect(subject.updated_on).to eq(DateTime.parse("2012-01-16 16:25:41 UTC")) - expect(subject.expires_on).to be_a(Time) - expect(subject.expires_on).to eq(DateTime.parse("2014-06-11 23:59:59 UTC")) - expect(subject.registrar).to be_a(Whois::Parser::Registrar) - expect(subject.registrar.id).to eq("H292913") - expect(subject.registrar.name).to eq("Network Solutions LLC") - expect(subject.registrar.url).to eq("http://www.networksolutions.com/") - expect(subject.registrant_contacts).to be_a(Array) - expect(subject.registrant_contacts.size).to eq(1) - expect(subject.registrant_contacts[0]).to be_a(Whois::Parser::Contact) - expect(subject.registrant_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_REGISTRANT) - expect(subject.registrant_contacts[0].id).to eq("41619876") - expect(subject.registrant_contacts[0].name).to eq("Academy of Art College") - expect(subject.registrant_contacts[0].organization).to eq("Academy of Art College") - expect(subject.registrant_contacts[0].address).to eq("79 NEW MONTGOMERY ST") - expect(subject.registrant_contacts[0].city).to eq("SAN FRANCISCO") - expect(subject.registrant_contacts[0].zip).to eq("94105") - expect(subject.registrant_contacts[0].state).to eq("CA") - expect(subject.registrant_contacts[0].country).to eq(nil) - expect(subject.registrant_contacts[0].country_code).to eq("US") - expect(subject.registrant_contacts[0].phone).to eq("+1.415618350") - expect(subject.registrant_contacts[0].fax).to eq(nil) - expect(subject.registrant_contacts[0].email).to eq("clefferts@academyart.edu") - expect(subject.admin_contacts).to be_a(Array) - expect(subject.admin_contacts.size).to eq(1) - expect(subject.admin_contacts[0]).to be_a(Whois::Parser::Contact) - expect(subject.admin_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_ADMINISTRATIVE) - expect(subject.admin_contacts[0].id).to eq("41619876") - expect(subject.admin_contacts[0].name).to eq("Academy of Art College") - expect(subject.admin_contacts[0].organization).to eq("Academy of Art College") - expect(subject.admin_contacts[0].address).to eq("79 NEW MONTGOMERY ST") - expect(subject.admin_contacts[0].city).to eq("SAN FRANCISCO") - expect(subject.admin_contacts[0].zip).to eq("94105") - expect(subject.admin_contacts[0].state).to eq("CA") - expect(subject.admin_contacts[0].country).to eq(nil) - expect(subject.admin_contacts[0].country_code).to eq("US") - expect(subject.admin_contacts[0].phone).to eq("+1.415618350") - expect(subject.admin_contacts[0].fax).to eq(nil) - expect(subject.admin_contacts[0].email).to eq("clefferts@academyart.edu") - expect(subject.technical_contacts).to be_a(Array) - expect(subject.technical_contacts.size).to eq(1) - expect(subject.technical_contacts[0]).to be_a(Whois::Parser::Contact) - expect(subject.technical_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_TECHNICAL) - expect(subject.technical_contacts[0].id).to eq("41619876") - expect(subject.technical_contacts[0].name).to eq("Academy of Art College") - expect(subject.technical_contacts[0].organization).to eq("Academy of Art College") - expect(subject.technical_contacts[0].address).to eq("79 NEW MONTGOMERY ST") - expect(subject.technical_contacts[0].city).to eq("SAN FRANCISCO") - expect(subject.technical_contacts[0].zip).to eq("94105") - expect(subject.technical_contacts[0].state).to eq("CA") - expect(subject.technical_contacts[0].country).to eq(nil) - expect(subject.technical_contacts[0].country_code).to eq("US") - expect(subject.technical_contacts[0].phone).to eq("+1.415618350") - expect(subject.technical_contacts[0].fax).to eq(nil) - expect(subject.technical_contacts[0].email).to eq("clefferts@academyart.edu") - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers.size).to eq(5) - expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[0].name).to eq("ns1.academyart.edu") - expect(subject.nameservers[0].ipv4).to eq(nil) - expect(subject.nameservers[0].ipv6).to eq(nil) - expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[1].name).to eq("dbru.br.ns.els-gms.att.net") - expect(subject.nameservers[1].ipv4).to eq(nil) - expect(subject.nameservers[1].ipv6).to eq(nil) - expect(subject.nameservers[2]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[2].name).to eq("dmtu.mt.ns.els-gms.att.net") - expect(subject.nameservers[2].ipv4).to eq(nil) - expect(subject.nameservers[2].ipv6).to eq(nil) - expect(subject.nameservers[3]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[3].name).to eq("cbru.br.ns.els-gms.att.net") - expect(subject.nameservers[3].ipv4).to eq(nil) - expect(subject.nameservers[3].ipv6).to eq(nil) - expect(subject.nameservers[4]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[4].name).to eq("cmtu.mt.ns.els-gms.att.net") - expect(subject.nameservers[4].ipv4).to eq(nil) - expect(subject.nameservers[4].ipv6).to eq(nil) - end -end diff --git a/spec/whois/parsers/responses/whois.centralnic.com/no.com/status_available_spec.rb b/spec/whois/parsers/responses/whois.centralnic.com/no.com/status_available_spec.rb deleted file mode 100644 index f9db5ab4..00000000 --- a/spec/whois/parsers/responses/whois.centralnic.com/no.com/status_available_spec.rb +++ /dev/null @@ -1,43 +0,0 @@ -# encoding: utf-8 - -# This file is autogenerated. Do not edit it manually. -# If you want change the content of this file, edit -# -# /spec/fixtures/responses/whois.centralnic.com/no.com/status_available.expected -# -# and regenerate the tests with the following rake task -# -# $ rake spec:generate -# - -require 'spec_helper' - -describe "whois.centralnic.com", :aggregate_failures do - - subject do - file = fixture("responses", "whois.centralnic.com/no.com/status_available.txt") - part = Whois::Record::Part.new(body: File.read(file), host: "whois.centralnic.com") - Whois::Parser.parser_for(part) - end - - it "matches status_available.expected" do - expect(subject.disclaimer).to eq(nil) - expect(subject.domain).to eq(nil) - expect(subject.domain_id).to eq(nil) - expect(subject.status).to eq([]) - expect(subject.available?).to eq(true) - expect(subject.registered?).to eq(false) - expect(subject.created_on).to eq(nil) - expect(subject.updated_on).to eq(nil) - expect(subject.expires_on).to eq(nil) - expect(subject.registrar).to eq(nil) - expect(subject.registrant_contacts).to be_a(Array) - expect(subject.registrant_contacts).to eq([]) - expect(subject.admin_contacts).to be_a(Array) - expect(subject.admin_contacts).to eq([]) - expect(subject.technical_contacts).to be_a(Array) - expect(subject.technical_contacts).to eq([]) - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers).to eq([]) - end -end diff --git a/spec/whois/parsers/responses/whois.centralnic.com/qc.com/status_available_spec.rb b/spec/whois/parsers/responses/whois.centralnic.com/qc.com/status_available_spec.rb deleted file mode 100644 index 673a1d96..00000000 --- a/spec/whois/parsers/responses/whois.centralnic.com/qc.com/status_available_spec.rb +++ /dev/null @@ -1,43 +0,0 @@ -# encoding: utf-8 - -# This file is autogenerated. Do not edit it manually. -# If you want change the content of this file, edit -# -# /spec/fixtures/responses/whois.centralnic.com/qc.com/status_available.expected -# -# and regenerate the tests with the following rake task -# -# $ rake spec:generate -# - -require 'spec_helper' - -describe "whois.centralnic.com", :aggregate_failures do - - subject do - file = fixture("responses", "whois.centralnic.com/qc.com/status_available.txt") - part = Whois::Record::Part.new(body: File.read(file), host: "whois.centralnic.com") - Whois::Parser.parser_for(part) - end - - it "matches status_available.expected" do - expect(subject.disclaimer).to eq(nil) - expect(subject.domain).to eq(nil) - expect(subject.domain_id).to eq(nil) - expect(subject.status).to eq([]) - expect(subject.available?).to eq(true) - expect(subject.registered?).to eq(false) - expect(subject.created_on).to eq(nil) - expect(subject.updated_on).to eq(nil) - expect(subject.expires_on).to eq(nil) - expect(subject.registrar).to eq(nil) - expect(subject.registrant_contacts).to be_a(Array) - expect(subject.registrant_contacts).to eq([]) - expect(subject.admin_contacts).to be_a(Array) - expect(subject.admin_contacts).to eq([]) - expect(subject.technical_contacts).to be_a(Array) - expect(subject.technical_contacts).to eq([]) - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers).to eq([]) - end -end diff --git a/spec/whois/parsers/responses/whois.centralnic.com/qc.com/status_registered_spec.rb b/spec/whois/parsers/responses/whois.centralnic.com/qc.com/status_registered_spec.rb deleted file mode 100644 index ce48c8cd..00000000 --- a/spec/whois/parsers/responses/whois.centralnic.com/qc.com/status_registered_spec.rb +++ /dev/null @@ -1,99 +0,0 @@ -# encoding: utf-8 - -# This file is autogenerated. Do not edit it manually. -# If you want change the content of this file, edit -# -# /spec/fixtures/responses/whois.centralnic.com/qc.com/status_registered.expected -# -# and regenerate the tests with the following rake task -# -# $ rake spec:generate -# - -require 'spec_helper' - -describe "whois.centralnic.com", :aggregate_failures do - - subject do - file = fixture("responses", "whois.centralnic.com/qc.com/status_registered.txt") - part = Whois::Record::Part.new(body: File.read(file), host: "whois.centralnic.com") - Whois::Parser.parser_for(part) - end - - it "matches status_registered.expected" do - expect(subject.disclaimer).to eq("This whois service is provided by CentralNic Ltd and only contains information pertaining to Internet domain names we have registered for our customers. By using this service you are agreeing (1) not to use any information presented here for any purpose other than determining ownership of domain names, (2) not to store or reproduce this data in any way, (3) not to use any high-volume, automated, electronic processes to obtain data from this service. Abuse of this service is monitored and actions in contravention of these terms will result in being permanently blacklisted. All data is (c) CentralNic Ltd https://www.centralnic.com/") - expect(subject.domain).to eq("ceo.qc.com") - expect(subject.domain_id).to eq("CNIC-DO327026") - expect(subject.status).to eq(["ok"]) - expect(subject.available?).to eq(false) - expect(subject.registered?).to eq(true) - expect(subject.created_on).to be_a(Time) - expect(subject.created_on).to eq(DateTime.parse("2004-10-08 02:12:49 UTC")) - expect(subject.updated_on).to be_a(Time) - expect(subject.updated_on).to eq(DateTime.parse("2012-11-23 18:03:55 UTC")) - expect(subject.expires_on).to be_a(Time) - expect(subject.expires_on).to eq(DateTime.parse("2014-10-08 23:59:59 UTC")) - expect(subject.registrar).to be_a(Whois::Parser::Registrar) - expect(subject.registrar.id).to eq("7065-EN") - expect(subject.registrar.name).to eq("eNom, Inc.") - expect(subject.registrar.url).to eq("http://www.enom.com/") - expect(subject.registrant_contacts).to be_a(Array) - expect(subject.registrant_contacts.size).to eq(1) - expect(subject.registrant_contacts[0]).to be_a(Whois::Parser::Contact) - expect(subject.registrant_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_REGISTRANT) - expect(subject.registrant_contacts[0].id).to eq("H1062277") - expect(subject.registrant_contacts[0].name).to eq("helene") - expect(subject.registrant_contacts[0].organization).to eq(nil) - expect(subject.registrant_contacts[0].address).to eq("309 Laurendeau, Magog Qc") - expect(subject.registrant_contacts[0].city).to eq(nil) - expect(subject.registrant_contacts[0].zip).to eq("J1X 3W4") - expect(subject.registrant_contacts[0].state).to eq(nil) - expect(subject.registrant_contacts[0].country).to eq(nil) - expect(subject.registrant_contacts[0].country_code).to eq("CA") - expect(subject.registrant_contacts[0].phone).to eq("+1.8198438380") - expect(subject.registrant_contacts[0].fax).to eq(nil) - expect(subject.registrant_contacts[0].email).to eq("docjgs@videotron.ca") - expect(subject.admin_contacts).to be_a(Array) - expect(subject.admin_contacts.size).to eq(1) - expect(subject.admin_contacts[0]).to be_a(Whois::Parser::Contact) - expect(subject.admin_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_ADMINISTRATIVE) - expect(subject.admin_contacts[0].id).to eq("H114589") - expect(subject.admin_contacts[0].name).to eq("helene viens") - expect(subject.admin_contacts[0].organization).to eq(nil) - expect(subject.admin_contacts[0].address).to eq("309 Laurendeau, Magog Qc") - expect(subject.admin_contacts[0].city).to eq(nil) - expect(subject.admin_contacts[0].zip).to eq("J1X 3W4") - expect(subject.admin_contacts[0].state).to eq(nil) - expect(subject.admin_contacts[0].country).to eq(nil) - expect(subject.admin_contacts[0].country_code).to eq("CA") - expect(subject.admin_contacts[0].phone).to eq("+1.8198438380") - expect(subject.admin_contacts[0].fax).to eq(nil) - expect(subject.admin_contacts[0].email).to eq("docjgs@videotron.ca") - expect(subject.technical_contacts).to be_a(Array) - expect(subject.technical_contacts.size).to eq(1) - expect(subject.technical_contacts[0]).to be_a(Whois::Parser::Contact) - expect(subject.technical_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_TECHNICAL) - expect(subject.technical_contacts[0].id).to eq("H114590") - expect(subject.technical_contacts[0].name).to eq("helene viens") - expect(subject.technical_contacts[0].organization).to eq(nil) - expect(subject.technical_contacts[0].address).to eq("309 Laurendeau, Magog Qc") - expect(subject.technical_contacts[0].city).to eq(nil) - expect(subject.technical_contacts[0].zip).to eq("J1X 3W4") - expect(subject.technical_contacts[0].state).to eq(nil) - expect(subject.technical_contacts[0].country).to eq(nil) - expect(subject.technical_contacts[0].country_code).to eq("CA") - expect(subject.technical_contacts[0].phone).to eq("+1.8198438380") - expect(subject.technical_contacts[0].fax).to eq(nil) - expect(subject.technical_contacts[0].email).to eq("docjgs@videotron.ca") - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers.size).to eq(2) - expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[0].name).to eq("ns12.zoneedit.com") - expect(subject.nameservers[0].ipv4).to eq(nil) - expect(subject.nameservers[0].ipv6).to eq(nil) - expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[1].name).to eq("t1.zoneedit.com") - expect(subject.nameservers[1].ipv4).to eq(nil) - expect(subject.nameservers[1].ipv6).to eq(nil) - end -end diff --git a/spec/whois/parsers/responses/whois.centralnic.com/ru.com/status_available_spec.rb b/spec/whois/parsers/responses/whois.centralnic.com/ru.com/status_available_spec.rb index 892ef8dd..43e41de7 100644 --- a/spec/whois/parsers/responses/whois.centralnic.com/ru.com/status_available_spec.rb +++ b/spec/whois/parsers/responses/whois.centralnic.com/ru.com/status_available_spec.rb @@ -21,10 +21,10 @@ end it "matches status_available.expected" do - expect(subject.disclaimer).to eq(nil) + expect(subject.disclaimer).to eq("The Whois and RDAP services are provided by CentralNic, and contain information pertaining to Internet domain names registered by our our customers. By using this service you are agreeing (1) not to use any information presented here for any purpose other than determining ownership of domain names, (2) not to store or reproduce this data in any way, (3) not to use any high-volume, automated, electronic processes to obtain data from this service. Abuse of this service is monitored and actions in contravention of these terms will result in being permanently blacklisted. All data is (c) CentralNic Ltd (https://www.centralnic.com) Access to the Whois and RDAP services is rate limited. For more information, visit https://registrar-console.centralnic.com/pub/whois_guidance.") expect(subject.domain).to eq(nil) expect(subject.domain_id).to eq(nil) - expect(subject.status).to eq([]) + expect(subject.status).to eq(:available) expect(subject.available?).to eq(true) expect(subject.registered?).to eq(false) expect(subject.created_on).to eq(nil) diff --git a/spec/whois/parsers/responses/whois.centralnic.com/ru.com/status_registered_spec.rb b/spec/whois/parsers/responses/whois.centralnic.com/ru.com/status_registered_spec.rb index 835d376f..854f9b9b 100644 --- a/spec/whois/parsers/responses/whois.centralnic.com/ru.com/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.centralnic.com/ru.com/status_registered_spec.rb @@ -21,72 +21,42 @@ end it "matches status_registered.expected" do - expect(subject.disclaimer).to eq("This whois service is provided by CentralNic Ltd and only contains information pertaining to Internet domain names we have registered for our customers. By using this service you are agreeing (1) not to use any information presented here for any purpose other than determining ownership of domain names, (2) not to store or reproduce this data in any way, (3) not to use any high-volume, automated, electronic processes to obtain data from this service. Abuse of this service is monitored and actions in contravention of these terms will result in being permanently blacklisted. All data is (c) CentralNic Ltd https://www.centralnic.com/") + expect(subject.disclaimer).to eq("The Whois and RDAP services are provided by CentralNic, and contain information pertaining to Internet domain names registered by our our customers. By using this service you are agreeing (1) not to use any information presented here for any purpose other than determining ownership of domain names, (2) not to store or reproduce this data in any way, (3) not to use any high-volume, automated, electronic processes to obtain data from this service. Abuse of this service is monitored and actions in contravention of these terms will result in being permanently blacklisted. All data is (c) CentralNic Ltd (https://www.centralnic.com) Access to the Whois and RDAP services is rate limited. For more information, visit https://registrar-console.centralnic.com/pub/whois_guidance.") expect(subject.domain).to eq("srk.ru.com") - expect(subject.domain_id).to eq("CNIC-DO450826") - expect(subject.status).to eq(["ok"]) + expect(subject.domain_id).to eq("D450826-CNIC") + expect(subject.status).to eq(:registered) expect(subject.available?).to eq(false) expect(subject.registered?).to eq(true) expect(subject.created_on).to be_a(Time) expect(subject.created_on).to eq(DateTime.parse("2006-07-31 10:06:04 UTC")) expect(subject.updated_on).to be_a(Time) - expect(subject.updated_on).to eq(DateTime.parse("2012-07-10 08:16:19 UTC")) + expect(subject.updated_on).to eq(DateTime.parse("2021-04-19 15:40:48 UTC")) expect(subject.expires_on).to be_a(Time) - expect(subject.expires_on).to eq(DateTime.parse("2014-07-31 23:59:59 UTC")) - expect(subject.registrar).to eq(nil) + expect(subject.expires_on).to eq(DateTime.parse("2025-07-31 23:59:59 UTC")) + expect(subject.registrar).to be_a(Whois::Parser::Registrar) + expect(subject.registrar.id).to eq("1376") + expect(subject.registrar.name).to eq("Instra Corporation Pty Ltd") + expect(subject.registrar.url).to eq("https://instra.com/") expect(subject.registrant_contacts).to be_a(Array) expect(subject.registrant_contacts.size).to eq(1) expect(subject.registrant_contacts[0]).to be_a(Whois::Parser::Contact) expect(subject.registrant_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_REGISTRANT) - expect(subject.registrant_contacts[0].id).to eq("H1037013") - expect(subject.registrant_contacts[0].name).to eq("Anthony Lloyd, SRK Consulting (UK) Limited") - expect(subject.registrant_contacts[0].organization).to eq(nil) - expect(subject.registrant_contacts[0].address).to eq("5th Floor\nChurchill House\n17 Churchill Way") - expect(subject.registrant_contacts[0].city).to eq("Cardiff") - expect(subject.registrant_contacts[0].zip).to eq("CF10 2HH") - expect(subject.registrant_contacts[0].state).to eq(nil) - expect(subject.registrant_contacts[0].country).to eq(nil) - expect(subject.registrant_contacts[0].country_code).to eq("GB") - expect(subject.registrant_contacts[0].phone).to eq("+44.2920348150") - expect(subject.registrant_contacts[0].fax).to eq(nil) - expect(subject.registrant_contacts[0].email).to eq("alloyd@srk.co.uk") + expect(subject.registrant_contacts[0].email).to eq("https://whois.centralnic.com/contact/srk.ru.com/registrant") expect(subject.admin_contacts).to be_a(Array) expect(subject.admin_contacts.size).to eq(1) expect(subject.admin_contacts[0]).to be_a(Whois::Parser::Contact) expect(subject.admin_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_ADMINISTRATIVE) - expect(subject.admin_contacts[0].id).to eq("H265405") - expect(subject.admin_contacts[0].name).to eq("Anthony Lloyd") - expect(subject.admin_contacts[0].organization).to eq("SRK Consulting (UK) Limited") - expect(subject.admin_contacts[0].address).to eq("5th Floor\nChurchill House\n17 Churchill Way") - expect(subject.admin_contacts[0].city).to eq("Cardiff") - expect(subject.admin_contacts[0].zip).to eq("CF10 2HH") - expect(subject.admin_contacts[0].state).to eq(nil) - expect(subject.admin_contacts[0].country).to eq(nil) - expect(subject.admin_contacts[0].country_code).to eq("GB") - expect(subject.admin_contacts[0].phone).to eq("+44.2920348150") - expect(subject.admin_contacts[0].fax).to eq(nil) - expect(subject.admin_contacts[0].email).to eq("alloyd@srk.co.uk") + expect(subject.admin_contacts[0].email).to eq("https://whois.centralnic.com/contact/srk.ru.com/admin") expect(subject.technical_contacts).to be_a(Array) expect(subject.technical_contacts.size).to eq(1) expect(subject.technical_contacts[0]).to be_a(Whois::Parser::Contact) expect(subject.technical_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_TECHNICAL) - expect(subject.technical_contacts[0].id).to eq("H265405") - expect(subject.technical_contacts[0].name).to eq("Anthony Lloyd") - expect(subject.technical_contacts[0].organization).to eq("SRK Consulting (UK) Limited") - expect(subject.technical_contacts[0].address).to eq("5th Floor\nChurchill House\n17 Churchill Way") - expect(subject.technical_contacts[0].city).to eq("Cardiff") - expect(subject.technical_contacts[0].zip).to eq("CF10 2HH") - expect(subject.technical_contacts[0].state).to eq(nil) - expect(subject.technical_contacts[0].country).to eq(nil) - expect(subject.technical_contacts[0].country_code).to eq("GB") - expect(subject.technical_contacts[0].phone).to eq("+44.2920348150") - expect(subject.technical_contacts[0].fax).to eq(nil) - expect(subject.technical_contacts[0].email).to eq("alloyd@srk.co.uk") + expect(subject.technical_contacts[0].email).to eq("https://whois.centralnic.com/contact/srk.ru.com/tech") expect(subject.nameservers).to be_a(Array) expect(subject.nameservers.size).to eq(2) expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) expect(subject.nameservers[0].name).to eq("ns7.zoneedit.com") expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[1].name).to eq("ns12.zoneedit.com") + expect(subject.nameservers[1].name).to eq("ns11.zoneedit.com") end end diff --git a/spec/whois/parsers/responses/whois.centralnic.com/sa.com/status_available_spec.rb b/spec/whois/parsers/responses/whois.centralnic.com/sa.com/status_available_spec.rb deleted file mode 100644 index fe0f0946..00000000 --- a/spec/whois/parsers/responses/whois.centralnic.com/sa.com/status_available_spec.rb +++ /dev/null @@ -1,43 +0,0 @@ -# encoding: utf-8 - -# This file is autogenerated. Do not edit it manually. -# If you want change the content of this file, edit -# -# /spec/fixtures/responses/whois.centralnic.com/sa.com/status_available.expected -# -# and regenerate the tests with the following rake task -# -# $ rake spec:generate -# - -require 'spec_helper' - -describe "whois.centralnic.com", :aggregate_failures do - - subject do - file = fixture("responses", "whois.centralnic.com/sa.com/status_available.txt") - part = Whois::Record::Part.new(body: File.read(file), host: "whois.centralnic.com") - Whois::Parser.parser_for(part) - end - - it "matches status_available.expected" do - expect(subject.disclaimer).to eq(nil) - expect(subject.domain).to eq(nil) - expect(subject.domain_id).to eq(nil) - expect(subject.status).to eq([]) - expect(subject.available?).to eq(true) - expect(subject.registered?).to eq(false) - expect(subject.created_on).to eq(nil) - expect(subject.updated_on).to eq(nil) - expect(subject.expires_on).to eq(nil) - expect(subject.registrar).to eq(nil) - expect(subject.registrant_contacts).to be_a(Array) - expect(subject.registrant_contacts).to eq([]) - expect(subject.admin_contacts).to be_a(Array) - expect(subject.admin_contacts).to eq([]) - expect(subject.technical_contacts).to be_a(Array) - expect(subject.technical_contacts).to eq([]) - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers).to eq([]) - end -end diff --git a/spec/whois/parsers/responses/whois.centralnic.com/sa.com/status_registered_spec.rb b/spec/whois/parsers/responses/whois.centralnic.com/sa.com/status_registered_spec.rb deleted file mode 100644 index bab739a4..00000000 --- a/spec/whois/parsers/responses/whois.centralnic.com/sa.com/status_registered_spec.rb +++ /dev/null @@ -1,95 +0,0 @@ -# encoding: utf-8 - -# This file is autogenerated. Do not edit it manually. -# If you want change the content of this file, edit -# -# /spec/fixtures/responses/whois.centralnic.com/sa.com/status_registered.expected -# -# and regenerate the tests with the following rake task -# -# $ rake spec:generate -# - -require 'spec_helper' - -describe "whois.centralnic.com", :aggregate_failures do - - subject do - file = fixture("responses", "whois.centralnic.com/sa.com/status_registered.txt") - part = Whois::Record::Part.new(body: File.read(file), host: "whois.centralnic.com") - Whois::Parser.parser_for(part) - end - - it "matches status_registered.expected" do - expect(subject.disclaimer).to eq("This whois service is provided by CentralNic Ltd and only contains information pertaining to Internet domain names we have registered for our customers. By using this service you are agreeing (1) not to use any information presented here for any purpose other than determining ownership of domain names, (2) not to store or reproduce this data in any way, (3) not to use any high-volume, automated, electronic processes to obtain data from this service. Abuse of this service is monitored and actions in contravention of these terms will result in being permanently blacklisted. All data is (c) CentralNic Ltd https://www.centralnic.com/") - expect(subject.domain).to eq("fynbos.sa.com") - expect(subject.domain_id).to eq("CNIC-DO501005") - expect(subject.status).to eq(["ok"]) - expect(subject.available?).to eq(false) - expect(subject.registered?).to eq(true) - expect(subject.created_on).to be_a(Time) - expect(subject.created_on).to eq(DateTime.parse("2007-09-27 18:14:53 UTC")) - expect(subject.updated_on).to be_a(Time) - expect(subject.updated_on).to eq(DateTime.parse("2013-11-02 13:42:11 UTC")) - expect(subject.expires_on).to be_a(Time) - expect(subject.expires_on).to eq(DateTime.parse("2014-09-27 23:59:59 UTC")) - expect(subject.registrar).to be_a(Whois::Parser::Registrar) - expect(subject.registrar.id).to eq("C30342") - expect(subject.registrar.name).to eq("Paragon Internet Group") - expect(subject.registrar.url).to eq("http://www.paragon.net.uk") - expect(subject.registrant_contacts).to be_a(Array) - expect(subject.registrant_contacts.size).to eq(1) - expect(subject.registrant_contacts[0]).to be_a(Whois::Parser::Contact) - expect(subject.registrant_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_REGISTRANT) - expect(subject.registrant_contacts[0].id).to eq("H323273") - expect(subject.registrant_contacts[0].name).to eq("Maarten Groos") - expect(subject.registrant_contacts[0].organization).to eq(nil) - expect(subject.registrant_contacts[0].address).to eq("farm 215 fynbos reserve\nPO Box 1314") - expect(subject.registrant_contacts[0].city).to eq("Gansbaai") - expect(subject.registrant_contacts[0].zip).to eq("7220") - expect(subject.registrant_contacts[0].state).to eq("Western Cape") - expect(subject.registrant_contacts[0].country).to eq(nil) - expect(subject.registrant_contacts[0].country_code).to eq("ZA") - expect(subject.registrant_contacts[0].phone).to eq("+27.283880920") - expect(subject.registrant_contacts[0].fax).to eq(nil) - expect(subject.registrant_contacts[0].email).to eq("maarten@farm215.co.za") - expect(subject.admin_contacts).to be_a(Array) - expect(subject.admin_contacts.size).to eq(1) - expect(subject.admin_contacts[0]).to be_a(Whois::Parser::Contact) - expect(subject.admin_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_ADMINISTRATIVE) - expect(subject.admin_contacts[0].id).to eq("H323273") - expect(subject.admin_contacts[0].name).to eq("Maarten Groos") - expect(subject.admin_contacts[0].organization).to eq(nil) - expect(subject.admin_contacts[0].address).to eq("farm 215 fynbos reserve\nPO Box 1314") - expect(subject.admin_contacts[0].city).to eq("Gansbaai") - expect(subject.admin_contacts[0].zip).to eq("7220") - expect(subject.admin_contacts[0].state).to eq("Western Cape") - expect(subject.admin_contacts[0].country).to eq(nil) - expect(subject.admin_contacts[0].country_code).to eq("ZA") - expect(subject.admin_contacts[0].phone).to eq("+27.283880920") - expect(subject.admin_contacts[0].fax).to eq(nil) - expect(subject.admin_contacts[0].email).to eq("maarten@farm215.co.za") - expect(subject.technical_contacts).to be_a(Array) - expect(subject.technical_contacts.size).to eq(1) - expect(subject.technical_contacts[0]).to be_a(Whois::Parser::Contact) - expect(subject.technical_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_TECHNICAL) - expect(subject.technical_contacts[0].id).to eq("C30342") - expect(subject.technical_contacts[0].name).to eq("Seb de Lemos") - expect(subject.technical_contacts[0].organization).to eq("Paragon Internet Group") - expect(subject.technical_contacts[0].address).to eq("St Andrew's House\nSt Mary's Walk") - expect(subject.technical_contacts[0].city).to eq("Maidenhead") - expect(subject.technical_contacts[0].zip).to eq("SL6 1QZ") - expect(subject.technical_contacts[0].state).to eq("Berkshire") - expect(subject.technical_contacts[0].country).to eq(nil) - expect(subject.technical_contacts[0].country_code).to eq("GB") - expect(subject.technical_contacts[0].phone).to eq("+44.2031377651") - expect(subject.technical_contacts[0].fax).to eq(nil) - expect(subject.technical_contacts[0].email).to eq("domains@paragon.net.uk") - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers.size).to eq(2) - expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[0].name).to eq("ns1191.websitewelcome.com") - expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[1].name).to eq("ns1192.websitewelcome.com") - end -end diff --git a/spec/whois/parsers/responses/whois.centralnic.com/se.com/status_available_spec.rb b/spec/whois/parsers/responses/whois.centralnic.com/se.com/status_available_spec.rb deleted file mode 100644 index b82194c3..00000000 --- a/spec/whois/parsers/responses/whois.centralnic.com/se.com/status_available_spec.rb +++ /dev/null @@ -1,43 +0,0 @@ -# encoding: utf-8 - -# This file is autogenerated. Do not edit it manually. -# If you want change the content of this file, edit -# -# /spec/fixtures/responses/whois.centralnic.com/se.com/status_available.expected -# -# and regenerate the tests with the following rake task -# -# $ rake spec:generate -# - -require 'spec_helper' - -describe "whois.centralnic.com", :aggregate_failures do - - subject do - file = fixture("responses", "whois.centralnic.com/se.com/status_available.txt") - part = Whois::Record::Part.new(body: File.read(file), host: "whois.centralnic.com") - Whois::Parser.parser_for(part) - end - - it "matches status_available.expected" do - expect(subject.disclaimer).to eq(nil) - expect(subject.domain).to eq(nil) - expect(subject.domain_id).to eq(nil) - expect(subject.status).to eq([]) - expect(subject.available?).to eq(true) - expect(subject.registered?).to eq(false) - expect(subject.created_on).to eq(nil) - expect(subject.updated_on).to eq(nil) - expect(subject.expires_on).to eq(nil) - expect(subject.registrar).to eq(nil) - expect(subject.registrant_contacts).to be_a(Array) - expect(subject.registrant_contacts).to eq([]) - expect(subject.admin_contacts).to be_a(Array) - expect(subject.admin_contacts).to eq([]) - expect(subject.technical_contacts).to be_a(Array) - expect(subject.technical_contacts).to eq([]) - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers).to eq([]) - end -end diff --git a/spec/whois/parsers/responses/whois.centralnic.com/se.com/status_registered_spec.rb b/spec/whois/parsers/responses/whois.centralnic.com/se.com/status_registered_spec.rb deleted file mode 100644 index 29f6abeb..00000000 --- a/spec/whois/parsers/responses/whois.centralnic.com/se.com/status_registered_spec.rb +++ /dev/null @@ -1,103 +0,0 @@ -# encoding: utf-8 - -# This file is autogenerated. Do not edit it manually. -# If you want change the content of this file, edit -# -# /spec/fixtures/responses/whois.centralnic.com/se.com/status_registered.expected -# -# and regenerate the tests with the following rake task -# -# $ rake spec:generate -# - -require 'spec_helper' - -describe "whois.centralnic.com", :aggregate_failures do - - subject do - file = fixture("responses", "whois.centralnic.com/se.com/status_registered.txt") - part = Whois::Record::Part.new(body: File.read(file), host: "whois.centralnic.com") - Whois::Parser.parser_for(part) - end - - it "matches status_registered.expected" do - expect(subject.disclaimer).to eq("This whois service is provided by CentralNic Ltd and only contains information pertaining to Internet domain names we have registered for our customers. By using this service you are agreeing (1) not to use any information presented here for any purpose other than determining ownership of domain names, (2) not to store or reproduce this data in any way, (3) not to use any high-volume, automated, electronic processes to obtain data from this service. Abuse of this service is monitored and actions in contravention of these terms will result in being permanently blacklisted. All data is (c) CentralNic Ltd https://www.centralnic.com/") - expect(subject.domain).to eq("hotel.se.com") - expect(subject.domain_id).to eq("CNIC-DO561053") - expect(subject.status).to eq(["ok"]) - expect(subject.available?).to eq(false) - expect(subject.registered?).to eq(true) - expect(subject.created_on).to be_a(Time) - expect(subject.created_on).to eq(DateTime.parse("2008-05-10 05:17:32 UTC")) - expect(subject.updated_on).to be_a(Time) - expect(subject.updated_on).to eq(DateTime.parse("2013-06-03 10:33:46 UTC")) - expect(subject.expires_on).to be_a(Time) - expect(subject.expires_on).to eq(DateTime.parse("2014-05-10 23:59:59 UTC")) - expect(subject.registrar).to be_a(Whois::Parser::Registrar) - expect(subject.registrar.id).to eq("7145-IX") - expect(subject.registrar.name).to eq("InternetX GmbH") - expect(subject.registrar.url).to eq("http://www.internetx.de/") - expect(subject.registrant_contacts).to be_a(Array) - expect(subject.registrant_contacts.size).to eq(1) - expect(subject.registrant_contacts[0]).to be_a(Whois::Parser::Contact) - expect(subject.registrant_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_REGISTRANT) - expect(subject.registrant_contacts[0].id).to eq("INX-10599082com") - expect(subject.registrant_contacts[0].name).to eq("Hotel Reservation Service Robert Ragge GmbH") - expect(subject.registrant_contacts[0].organization).to eq("Hotel Reservation Service Robert Ragge GmbH") - expect(subject.registrant_contacts[0].address).to eq("Blaubach 32") - expect(subject.registrant_contacts[0].city).to eq("Koeln") - expect(subject.registrant_contacts[0].zip).to eq("50676") - expect(subject.registrant_contacts[0].state).to eq("NRW") - expect(subject.registrant_contacts[0].country).to eq(nil) - expect(subject.registrant_contacts[0].country_code).to eq("DE") - expect(subject.registrant_contacts[0].phone).to eq("+49.2212077222") - expect(subject.registrant_contacts[0].fax).to eq("+49.2212077394") - expect(subject.registrant_contacts[0].email).to eq("domains@hrs.de") - expect(subject.admin_contacts).to be_a(Array) - expect(subject.admin_contacts.size).to eq(1) - expect(subject.admin_contacts[0]).to be_a(Whois::Parser::Contact) - expect(subject.admin_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_ADMINISTRATIVE) - expect(subject.admin_contacts[0].id).to eq("INX-201727com") - expect(subject.admin_contacts[0].name).to eq("Robert Ragge") - expect(subject.admin_contacts[0].organization).to eq("Hotel Reservation Service Robert Ragge GmbH") - expect(subject.admin_contacts[0].address).to eq("Blaubach 32") - expect(subject.admin_contacts[0].city).to eq("Koeln") - expect(subject.admin_contacts[0].zip).to eq("50676") - expect(subject.admin_contacts[0].state).to eq("DE") - expect(subject.admin_contacts[0].country).to eq(nil) - expect(subject.admin_contacts[0].country_code).to eq("DE") - expect(subject.admin_contacts[0].phone).to eq("+49.2212077222") - expect(subject.admin_contacts[0].fax).to eq("+49.2212077394") - expect(subject.admin_contacts[0].email).to eq("domains@hrs.de") - expect(subject.technical_contacts).to be_a(Array) - expect(subject.technical_contacts.size).to eq(1) - expect(subject.technical_contacts[0]).to be_a(Whois::Parser::Contact) - expect(subject.technical_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_TECHNICAL) - expect(subject.technical_contacts[0].id).to eq("INX-201728com") - expect(subject.technical_contacts[0].name).to eq("Uwe Watzek") - expect(subject.technical_contacts[0].organization).to eq("Wind Internethaus GmbH") - expect(subject.technical_contacts[0].address).to eq("Am Krebsgraben 15\nHaus 2") - expect(subject.technical_contacts[0].city).to eq("Villingen-Schwenningen") - expect(subject.technical_contacts[0].zip).to eq("78048") - expect(subject.technical_contacts[0].state).to eq("Baden-Wuerttemberg") - expect(subject.technical_contacts[0].country).to eq(nil) - expect(subject.technical_contacts[0].country_code).to eq("DE") - expect(subject.technical_contacts[0].phone).to eq("+49.77214070740") - expect(subject.technical_contacts[0].fax).to eq("+49.77214070741") - expect(subject.technical_contacts[0].email).to eq("info@windinternethaus.de") - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers.size).to eq(3) - expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[0].name).to eq("ns1.hrs.de") - expect(subject.nameservers[0].ipv4).to eq(nil) - expect(subject.nameservers[0].ipv6).to eq(nil) - expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[1].name).to eq("ns2.hrs.de") - expect(subject.nameservers[1].ipv4).to eq(nil) - expect(subject.nameservers[1].ipv6).to eq(nil) - expect(subject.nameservers[2]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[2].name).to eq("ns2.surfbrett.de") - expect(subject.nameservers[2].ipv4).to eq(nil) - expect(subject.nameservers[2].ipv6).to eq(nil) - end -end diff --git a/spec/whois/parsers/responses/whois.centralnic.com/se.net/status_available_spec.rb b/spec/whois/parsers/responses/whois.centralnic.com/se.net/status_available_spec.rb deleted file mode 100644 index d988a005..00000000 --- a/spec/whois/parsers/responses/whois.centralnic.com/se.net/status_available_spec.rb +++ /dev/null @@ -1,43 +0,0 @@ -# encoding: utf-8 - -# This file is autogenerated. Do not edit it manually. -# If you want change the content of this file, edit -# -# /spec/fixtures/responses/whois.centralnic.com/se.net/status_available.expected -# -# and regenerate the tests with the following rake task -# -# $ rake spec:generate -# - -require 'spec_helper' - -describe "whois.centralnic.com", :aggregate_failures do - - subject do - file = fixture("responses", "whois.centralnic.com/se.net/status_available.txt") - part = Whois::Record::Part.new(body: File.read(file), host: "whois.centralnic.com") - Whois::Parser.parser_for(part) - end - - it "matches status_available.expected" do - expect(subject.disclaimer).to eq(nil) - expect(subject.domain).to eq(nil) - expect(subject.domain_id).to eq(nil) - expect(subject.status).to eq([]) - expect(subject.available?).to eq(true) - expect(subject.registered?).to eq(false) - expect(subject.created_on).to eq(nil) - expect(subject.updated_on).to eq(nil) - expect(subject.expires_on).to eq(nil) - expect(subject.registrar).to eq(nil) - expect(subject.registrant_contacts).to be_a(Array) - expect(subject.registrant_contacts).to eq([]) - expect(subject.admin_contacts).to be_a(Array) - expect(subject.admin_contacts).to eq([]) - expect(subject.technical_contacts).to be_a(Array) - expect(subject.technical_contacts).to eq([]) - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers).to eq([]) - end -end diff --git a/spec/whois/parsers/responses/whois.centralnic.com/se.net/status_registered_spec.rb b/spec/whois/parsers/responses/whois.centralnic.com/se.net/status_registered_spec.rb deleted file mode 100644 index 0868dbd0..00000000 --- a/spec/whois/parsers/responses/whois.centralnic.com/se.net/status_registered_spec.rb +++ /dev/null @@ -1,105 +0,0 @@ -# encoding: utf-8 - -# This file is autogenerated. Do not edit it manually. -# If you want change the content of this file, edit -# -# /spec/fixtures/responses/whois.centralnic.com/se.net/status_registered.expected -# -# and regenerate the tests with the following rake task -# -# $ rake spec:generate -# - -require 'spec_helper' - -describe "whois.centralnic.com", :aggregate_failures do - - subject do - file = fixture("responses", "whois.centralnic.com/se.net/status_registered.txt") - part = Whois::Record::Part.new(body: File.read(file), host: "whois.centralnic.com") - Whois::Parser.parser_for(part) - end - - it "matches status_registered.expected" do - expect(subject.disclaimer).to eq("This whois service is provided by CentralNic Ltd and only contains information pertaining to Internet domain names we have registered for our customers. By using this service you are agreeing (1) not to use any information presented here for any purpose other than determining ownership of domain names, (2) not to store or reproduce this data in any way, (3) not to use any high-volume, automated, electronic processes to obtain data from this service. Abuse of this service is monitored and actions in contravention of these terms will result in being permanently blacklisted. All data is (c) CentralNic Ltd https://www.centralnic.com/") - expect(subject.domain).to eq("hotel.se.net") - expect(subject.domain_id).to eq("CNIC-DO1617446") - expect(subject.status).to eq(["ok"]) - expect(subject.available?).to eq(false) - expect(subject.registered?).to eq(true) - expect(subject.created_on).to be_a(Time) - expect(subject.created_on).to eq(DateTime.parse("2013-11-13 10:35:03 UTC")) - expect(subject.updated_on).to be_a(Time) - expect(subject.updated_on).to eq(DateTime.parse("2013-11-28 11:49:39 UTC")) - expect(subject.expires_on).to be_a(Time) - expect(subject.expires_on).to eq(DateTime.parse("2014-11-13 23:59:59 UTC")) - expect(subject.registrar).to be_a(Whois::Parser::Registrar) - expect(subject.registrar.id).to eq("H2307235") - expect(subject.registrar.name).to eq("Soluciones Corporativas IP, S.L.U.") - expect(subject.registrar.url).to eq("www.scip.es") - expect(subject.registrant_contacts).to be_a(Array) - expect(subject.registrant_contacts.size).to eq(1) - expect(subject.registrant_contacts[0]).to be_a(Whois::Parser::Contact) - expect(subject.registrant_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_REGISTRANT) - expect(subject.registrant_contacts[0].id).to eq("scipr000323588") - expect(subject.registrant_contacts[0].name).to eq("Christoph Donath") - expect(subject.registrant_contacts[0].organization).to eq("Christoph Donath") - expect(subject.registrant_contacts[0].address).to eq("C. Tijarafe 24, 2c") - expect(subject.registrant_contacts[0].city).to eq("Cruce de Arinaga") - expect(subject.registrant_contacts[0].zip).to eq("35118") - expect(subject.registrant_contacts[0].state).to eq("Palmas (Las)") - expect(subject.registrant_contacts[0].country).to eq(nil) - expect(subject.registrant_contacts[0].country_code).to eq("ES") - expect(subject.registrant_contacts[0].phone).to eq("+34.667889082") - expect(subject.registrant_contacts[0].fax).to eq(nil) - expect(subject.registrant_contacts[0].email).to eq("info@christophdonath.com") - expect(subject.registrant_contacts[0].created_on).to eq(nil) - expect(subject.registrant_contacts[0].updated_on).to eq(nil) - expect(subject.admin_contacts).to be_a(Array) - expect(subject.admin_contacts.size).to eq(1) - expect(subject.admin_contacts[0]).to be_a(Whois::Parser::Contact) - expect(subject.admin_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_ADMINISTRATIVE) - expect(subject.admin_contacts[0].id).to eq("scipa000323588") - expect(subject.admin_contacts[0].name).to eq("Christoph Donath") - expect(subject.admin_contacts[0].organization).to eq("Christoph Donath") - expect(subject.admin_contacts[0].address).to eq("C. Tijarafe 24, 2c") - expect(subject.admin_contacts[0].city).to eq("Cruce de Arinaga") - expect(subject.admin_contacts[0].zip).to eq("35118") - expect(subject.admin_contacts[0].state).to eq("Palmas (Las)") - expect(subject.admin_contacts[0].country).to eq(nil) - expect(subject.admin_contacts[0].country_code).to eq("ES") - expect(subject.admin_contacts[0].phone).to eq("+34.667889082") - expect(subject.admin_contacts[0].fax).to eq(nil) - expect(subject.admin_contacts[0].email).to eq("info@christophdonath.com") - expect(subject.admin_contacts[0].created_on).to eq(nil) - expect(subject.admin_contacts[0].updated_on).to eq(nil) - expect(subject.technical_contacts).to be_a(Array) - expect(subject.technical_contacts.size).to eq(1) - expect(subject.technical_contacts[0]).to be_a(Whois::Parser::Contact) - expect(subject.technical_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_TECHNICAL) - expect(subject.technical_contacts[0].id).to eq("scipt000323588") - expect(subject.technical_contacts[0].name).to eq("Christoph Donath") - expect(subject.technical_contacts[0].organization).to eq("Christoph Donath") - expect(subject.technical_contacts[0].address).to eq("C. Tijarafe 24, 2c") - expect(subject.technical_contacts[0].city).to eq("Cruce de Arinaga") - expect(subject.technical_contacts[0].zip).to eq("35118") - expect(subject.technical_contacts[0].state).to eq("Palmas (Las)") - expect(subject.technical_contacts[0].country).to eq(nil) - expect(subject.technical_contacts[0].country_code).to eq("ES") - expect(subject.technical_contacts[0].phone).to eq("+34.667889082") - expect(subject.technical_contacts[0].fax).to eq(nil) - expect(subject.technical_contacts[0].email).to eq("info@christophdonath.com") - expect(subject.technical_contacts[0].created_on).to eq(nil) - expect(subject.technical_contacts[0].updated_on).to eq(nil) - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers.size).to eq(2) - expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[0].name).to eq("ns8261.hostgator.com") - expect(subject.nameservers[0].ipv4).to eq(nil) - expect(subject.nameservers[0].ipv6).to eq(nil) - expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[1].name).to eq("ns8262.hostgator.com") - expect(subject.nameservers[1].ipv4).to eq(nil) - expect(subject.nameservers[1].ipv6).to eq(nil) - end -end diff --git a/spec/whois/parsers/responses/whois.centralnic.com/uk.com/status_available_spec.rb b/spec/whois/parsers/responses/whois.centralnic.com/uk.com/status_available_spec.rb index ca31ec32..453f103a 100644 --- a/spec/whois/parsers/responses/whois.centralnic.com/uk.com/status_available_spec.rb +++ b/spec/whois/parsers/responses/whois.centralnic.com/uk.com/status_available_spec.rb @@ -21,10 +21,10 @@ end it "matches status_available.expected" do - expect(subject.disclaimer).to eq(nil) + expect(subject.disclaimer).to eq("The Whois and RDAP services are provided by CentralNic, and contain information pertaining to Internet domain names registered by our our customers. By using this service you are agreeing (1) not to use any information presented here for any purpose other than determining ownership of domain names, (2) not to store or reproduce this data in any way, (3) not to use any high-volume, automated, electronic processes to obtain data from this service. Abuse of this service is monitored and actions in contravention of these terms will result in being permanently blacklisted. All data is (c) CentralNic Ltd (https://www.centralnic.com) Access to the Whois and RDAP services is rate limited. For more information, visit https://registrar-console.centralnic.com/pub/whois_guidance.") expect(subject.domain).to eq(nil) expect(subject.domain_id).to eq(nil) - expect(subject.status).to eq([]) + expect(subject.status).to eq(:available) expect(subject.available?).to eq(true) expect(subject.registered?).to eq(false) expect(subject.created_on).to eq(nil) diff --git a/spec/whois/parsers/responses/whois.centralnic.com/uk.com/status_registered_spec.rb b/spec/whois/parsers/responses/whois.centralnic.com/uk.com/status_registered_spec.rb index a88e53e7..ac862095 100644 --- a/spec/whois/parsers/responses/whois.centralnic.com/uk.com/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.centralnic.com/uk.com/status_registered_spec.rb @@ -21,79 +21,42 @@ end it "matches status_registered.expected" do - expect(subject.disclaimer).to eq("This whois service is provided by CentralNic Ltd and only contains information pertaining to Internet domain names we have registered for our customers. By using this service you are agreeing (1) not to use any information presented here for any purpose other than determining ownership of domain names, (2) not to store or reproduce this data in any way, (3) not to use any high-volume, automated, electronic processes to obtain data from this service. Abuse of this service is monitored and actions in contravention of these terms will result in being permanently blacklisted. All data is (c) CentralNic Ltd https://www.centralnic.com/") + expect(subject.disclaimer).to eq("The Whois and RDAP services are provided by CentralNic, and contain information pertaining to Internet domain names registered by our our customers. By using this service you are agreeing (1) not to use any information presented here for any purpose other than determining ownership of domain names, (2) not to store or reproduce this data in any way, (3) not to use any high-volume, automated, electronic processes to obtain data from this service. Abuse of this service is monitored and actions in contravention of these terms will result in being permanently blacklisted. All data is (c) CentralNic Ltd (https://www.centralnic.com) Access to the Whois and RDAP services is rate limited. For more information, visit https://registrar-console.centralnic.com/pub/whois_guidance.") expect(subject.domain).to eq("history.uk.com") - expect(subject.domain_id).to eq("CNIC-DO86293") - expect(subject.status).to eq(["ok"]) + expect(subject.domain_id).to eq("D64550744-CNIC") + expect(subject.status).to eq(:registered) expect(subject.available?).to eq(false) expect(subject.registered?).to eq(true) expect(subject.created_on).to be_a(Time) - expect(subject.created_on).to eq(DateTime.parse("2001-08-31 11:50:57 UTC")) + expect(subject.created_on).to eq(DateTime.parse("2018-03-27 13:46:06 UTC")) expect(subject.updated_on).to be_a(Time) - expect(subject.updated_on).to eq(DateTime.parse("2013-09-03 10:36:47 UTC")) + expect(subject.updated_on).to eq(DateTime.parse("2021-06-29 01:17:20 UTC")) expect(subject.expires_on).to be_a(Time) - expect(subject.expires_on).to eq(DateTime.parse("2015-08-31 23:59:59 UTC")) + expect(subject.expires_on).to eq(DateTime.parse("2022-03-27 23:59:59 UTC")) expect(subject.registrar).to be_a(Whois::Parser::Registrar) - expect(subject.registrar.id).to eq("H78362") - expect(subject.registrar.name).to eq("E-VELOCITY LTD") - expect(subject.registrar.url).to eq("http://www.e-velocity.co.uk/") + expect(subject.registrar.id).to eq("1861") + expect(subject.registrar.name).to eq("Porkbun, LLC") + expect(subject.registrar.url).to eq("https://porkbun.com/") expect(subject.registrant_contacts).to be_a(Array) expect(subject.registrant_contacts.size).to eq(1) expect(subject.registrant_contacts[0]).to be_a(Whois::Parser::Contact) expect(subject.registrant_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_REGISTRANT) - expect(subject.registrant_contacts[0].id).to eq("H1045821") - expect(subject.registrant_contacts[0].name).to eq("Mr. Ray Hatley") - expect(subject.registrant_contacts[0].organization).to eq(nil) - expect(subject.registrant_contacts[0].address).to eq("Tallow House\n65-66 Lower Galdeford") - expect(subject.registrant_contacts[0].city).to eq("Ludlow") - expect(subject.registrant_contacts[0].zip).to eq("SY8 1RU") - expect(subject.registrant_contacts[0].state).to eq("Shropshire") - expect(subject.registrant_contacts[0].country).to eq(nil) - expect(subject.registrant_contacts[0].country_code).to eq("GB") - expect(subject.registrant_contacts[0].phone).to eq("+44.1584873633") - expect(subject.registrant_contacts[0].fax).to eq(nil) - expect(subject.registrant_contacts[0].email).to eq("ray@hatley.co.uk") + expect(subject.registrant_contacts[0].email).to eq("https://whois.centralnic.com/contact/history.uk.com/registrant") expect(subject.admin_contacts).to be_a(Array) expect(subject.admin_contacts.size).to eq(1) expect(subject.admin_contacts[0]).to be_a(Whois::Parser::Contact) expect(subject.admin_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_ADMINISTRATIVE) - expect(subject.admin_contacts[0].id).to eq("H305798") - expect(subject.admin_contacts[0].name).to eq("Mr. Ray Hatley") - expect(subject.admin_contacts[0].organization).to eq(nil) - expect(subject.admin_contacts[0].address).to eq("Tallow House\n65-66 Lower Galdeford") - expect(subject.admin_contacts[0].city).to eq("Ludlow") - expect(subject.admin_contacts[0].zip).to eq("SY8 1RU") - expect(subject.admin_contacts[0].state).to eq("Shropshire") - expect(subject.admin_contacts[0].country).to eq(nil) - expect(subject.admin_contacts[0].country_code).to eq("GB") - expect(subject.admin_contacts[0].phone).to eq("+44.1584873633") - expect(subject.admin_contacts[0].fax).to eq(nil) - expect(subject.admin_contacts[0].email).to eq("ray@hatley.co.uk") + expect(subject.admin_contacts[0].email).to eq("https://whois.centralnic.com/contact/history.uk.com/admin") expect(subject.technical_contacts).to be_a(Array) expect(subject.technical_contacts.size).to eq(1) expect(subject.technical_contacts[0]).to be_a(Whois::Parser::Contact) expect(subject.technical_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_TECHNICAL) - expect(subject.technical_contacts[0].id).to eq("H78362") - expect(subject.technical_contacts[0].name).to eq("Mr Simon Williams") - expect(subject.technical_contacts[0].organization).to eq("E-VELOCITY LTD") - expect(subject.technical_contacts[0].address).to eq("P.O Box 3295\nBrighton") - expect(subject.technical_contacts[0].city).to eq(nil) - expect(subject.technical_contacts[0].zip).to eq("BN50 9EY") - expect(subject.technical_contacts[0].state).to eq(nil) - expect(subject.technical_contacts[0].country).to eq(nil) - expect(subject.technical_contacts[0].country_code).to eq("GB") - expect(subject.technical_contacts[0].phone).to eq("+44.1273684969") - expect(subject.technical_contacts[0].fax).to eq(nil) - expect(subject.technical_contacts[0].email).to eq("simon@e-velocity.co.uk") + expect(subject.technical_contacts[0].email).to eq("https://whois.centralnic.com/contact/history.uk.com/tech") expect(subject.nameservers).to be_a(Array) expect(subject.nameservers.size).to eq(2) expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[0].name).to eq("ns37.eukdns.com") - expect(subject.nameservers[0].ipv4).to eq(nil) - expect(subject.nameservers[0].ipv6).to eq(nil) + expect(subject.nameservers[0].name).to eq("ns15.stlbg.net") expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[1].name).to eq("ns38.eukdns.com") - expect(subject.nameservers[1].ipv4).to eq(nil) - expect(subject.nameservers[1].ipv6).to eq(nil) + expect(subject.nameservers[1].name).to eq("ns16.stlbg.net") end end diff --git a/spec/whois/parsers/responses/whois.centralnic.com/uk.net/status_available_spec.rb b/spec/whois/parsers/responses/whois.centralnic.com/uk.net/status_available_spec.rb index bd1708a4..bbad8b31 100644 --- a/spec/whois/parsers/responses/whois.centralnic.com/uk.net/status_available_spec.rb +++ b/spec/whois/parsers/responses/whois.centralnic.com/uk.net/status_available_spec.rb @@ -21,10 +21,10 @@ end it "matches status_available.expected" do - expect(subject.disclaimer).to eq(nil) + expect(subject.disclaimer).to eq("The Whois and RDAP services are provided by CentralNic, and contain information pertaining to Internet domain names registered by our our customers. By using this service you are agreeing (1) not to use any information presented here for any purpose other than determining ownership of domain names, (2) not to store or reproduce this data in any way, (3) not to use any high-volume, automated, electronic processes to obtain data from this service. Abuse of this service is monitored and actions in contravention of these terms will result in being permanently blacklisted. All data is (c) CentralNic Ltd (https://www.centralnic.com) Access to the Whois and RDAP services is rate limited. For more information, visit https://registrar-console.centralnic.com/pub/whois_guidance.") expect(subject.domain).to eq(nil) expect(subject.domain_id).to eq(nil) - expect(subject.status).to eq([]) + expect(subject.status).to eq(:available) expect(subject.available?).to eq(true) expect(subject.registered?).to eq(false) expect(subject.created_on).to eq(nil) diff --git a/spec/whois/parsers/responses/whois.centralnic.com/uk.net/status_registered_spec.rb b/spec/whois/parsers/responses/whois.centralnic.com/uk.net/status_registered_spec.rb index 71df9536..86651ce1 100644 --- a/spec/whois/parsers/responses/whois.centralnic.com/uk.net/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.centralnic.com/uk.net/status_registered_spec.rb @@ -21,79 +21,42 @@ end it "matches status_registered.expected" do - expect(subject.disclaimer).to eq("This whois service is provided by CentralNic Ltd and only contains information pertaining to Internet domain names we have registered for our customers. By using this service you are agreeing (1) not to use any information presented here for any purpose other than determining ownership of domain names, (2) not to store or reproduce this data in any way, (3) not to use any high-volume, automated, electronic processes to obtain data from this service. Abuse of this service is monitored and actions in contravention of these terms will result in being permanently blacklisted. All data is (c) CentralNic Ltd https://www.centralnic.com/") + expect(subject.disclaimer).to eq("The Whois and RDAP services are provided by CentralNic, and contain information pertaining to Internet domain names registered by our our customers. By using this service you are agreeing (1) not to use any information presented here for any purpose other than determining ownership of domain names, (2) not to store or reproduce this data in any way, (3) not to use any high-volume, automated, electronic processes to obtain data from this service. Abuse of this service is monitored and actions in contravention of these terms will result in being permanently blacklisted. All data is (c) CentralNic Ltd (https://www.centralnic.com) Access to the Whois and RDAP services is rate limited. For more information, visit https://registrar-console.centralnic.com/pub/whois_guidance.") expect(subject.domain).to eq("paramount.uk.net") - expect(subject.domain_id).to eq("CNIC-DO393884") - expect(subject.status).to eq(["ok"]) + expect(subject.domain_id).to eq("D123061216-CNIC") + expect(subject.status).to eq(:registered) expect(subject.available?).to eq(false) expect(subject.registered?).to eq(true) expect(subject.created_on).to be_a(Time) - expect(subject.created_on).to eq(DateTime.parse("2006-02-28 12:17:01 UTC")) + expect(subject.created_on).to eq(DateTime.parse("2019-09-03 15:47:37 UTC")) expect(subject.updated_on).to be_a(Time) - expect(subject.updated_on).to eq(DateTime.parse("2013-04-03 12:59:45 UTC")) + expect(subject.updated_on).to eq(DateTime.parse("2021-08-12 04:46:26 UTC")) expect(subject.expires_on).to be_a(Time) - expect(subject.expires_on).to eq(DateTime.parse("2014-02-28 23:59:59 UTC")) + expect(subject.expires_on).to eq(DateTime.parse("2022-09-03 23:59:59 UTC")) expect(subject.registrar).to be_a(Whois::Parser::Registrar) - expect(subject.registrar.id).to eq("I6467") - expect(subject.registrar.name).to eq("Webfusion") - expect(subject.registrar.url).to eq("http://www.123-reg.co.uk/domain-names/") + expect(subject.registrar.id).to eq("1564") + expect(subject.registrar.name).to eq("TLD Registrar Solutions Ltd") + expect(subject.registrar.url).to eq("http://www.tldregistrarsolutions.com") expect(subject.registrant_contacts).to be_a(Array) expect(subject.registrant_contacts.size).to eq(1) expect(subject.registrant_contacts[0]).to be_a(Whois::Parser::Contact) expect(subject.registrant_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_REGISTRANT) - expect(subject.registrant_contacts[0].id).to eq("MNT60424953041") - expect(subject.registrant_contacts[0].name).to eq("Identity Protection Service") - expect(subject.registrant_contacts[0].organization).to eq("Identity Protect Limited") - expect(subject.registrant_contacts[0].address).to eq("PO Box 795") - expect(subject.registrant_contacts[0].city).to eq("Godalming") - expect(subject.registrant_contacts[0].zip).to eq("GU7 9GA") - expect(subject.registrant_contacts[0].state).to eq("Surrey") - expect(subject.registrant_contacts[0].country).to eq(nil) - expect(subject.registrant_contacts[0].country_code).to eq("GB") - expect(subject.registrant_contacts[0].phone).to eq("+44.1483307527") - expect(subject.registrant_contacts[0].fax).to eq("+44.1483304031") - expect(subject.registrant_contacts[0].email).to eq("paramount.uk.net@identity-protect.org") + expect(subject.registrant_contacts[0].email).to eq("https://whois.centralnic.com/contact/paramount.uk.net/registrant") expect(subject.admin_contacts).to be_a(Array) expect(subject.admin_contacts.size).to eq(1) expect(subject.admin_contacts[0]).to be_a(Whois::Parser::Contact) expect(subject.admin_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_ADMINISTRATIVE) - expect(subject.admin_contacts[0].id).to eq("MNT60424953041") - expect(subject.admin_contacts[0].name).to eq("Identity Protection Service") - expect(subject.admin_contacts[0].organization).to eq("Identity Protect Limited") - expect(subject.admin_contacts[0].address).to eq("PO Box 795") - expect(subject.admin_contacts[0].city).to eq("Godalming") - expect(subject.admin_contacts[0].zip).to eq("GU7 9GA") - expect(subject.admin_contacts[0].state).to eq("Surrey") - expect(subject.admin_contacts[0].country).to eq(nil) - expect(subject.admin_contacts[0].country_code).to eq("GB") - expect(subject.admin_contacts[0].phone).to eq("+44.1483307527") - expect(subject.admin_contacts[0].fax).to eq("+44.1483304031") - expect(subject.admin_contacts[0].email).to eq("paramount.uk.net@identity-protect.org") + expect(subject.admin_contacts[0].email).to eq("https://whois.centralnic.com/contact/paramount.uk.net/admin") expect(subject.technical_contacts).to be_a(Array) expect(subject.technical_contacts.size).to eq(1) expect(subject.technical_contacts[0]).to be_a(Whois::Parser::Contact) expect(subject.technical_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_TECHNICAL) - expect(subject.technical_contacts[0].id).to eq("MNT60424953041") - expect(subject.technical_contacts[0].name).to eq("Identity Protection Service") - expect(subject.technical_contacts[0].organization).to eq("Identity Protect Limited") - expect(subject.technical_contacts[0].address).to eq("PO Box 795") - expect(subject.technical_contacts[0].city).to eq("Godalming") - expect(subject.technical_contacts[0].zip).to eq("GU7 9GA") - expect(subject.technical_contacts[0].state).to eq("Surrey") - expect(subject.technical_contacts[0].country).to eq(nil) - expect(subject.technical_contacts[0].country_code).to eq("GB") - expect(subject.technical_contacts[0].phone).to eq("+44.1483307527") - expect(subject.technical_contacts[0].fax).to eq("+44.1483304031") - expect(subject.technical_contacts[0].email).to eq("paramount.uk.net@identity-protect.org") + expect(subject.technical_contacts[0].email).to eq("https://whois.centralnic.com/contact/paramount.uk.net/tech") expect(subject.nameservers).to be_a(Array) expect(subject.nameservers.size).to eq(2) expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[0].name).to eq("ns1.myhostcp.com") - expect(subject.nameservers[0].ipv4).to eq(nil) - expect(subject.nameservers[0].ipv6).to eq(nil) + expect(subject.nameservers[0].name).to eq("ns1.gsgp1001.siteground.asia") expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[1].name).to eq("ns2.myhostcp.com") - expect(subject.nameservers[1].ipv4).to eq(nil) - expect(subject.nameservers[1].ipv6).to eq(nil) + expect(subject.nameservers[1].name).to eq("ns2.gsgp1001.siteground.asia") end end diff --git a/spec/whois/parsers/responses/whois.centralnic.com/us.com/status_available_spec.rb b/spec/whois/parsers/responses/whois.centralnic.com/us.com/status_available_spec.rb index 8a98957c..988c7478 100644 --- a/spec/whois/parsers/responses/whois.centralnic.com/us.com/status_available_spec.rb +++ b/spec/whois/parsers/responses/whois.centralnic.com/us.com/status_available_spec.rb @@ -21,10 +21,10 @@ end it "matches status_available.expected" do - expect(subject.disclaimer).to eq(nil) + expect(subject.disclaimer).to eq("The Whois and RDAP services are provided by CentralNic, and contain information pertaining to Internet domain names registered by our our customers. By using this service you are agreeing (1) not to use any information presented here for any purpose other than determining ownership of domain names, (2) not to store or reproduce this data in any way, (3) not to use any high-volume, automated, electronic processes to obtain data from this service. Abuse of this service is monitored and actions in contravention of these terms will result in being permanently blacklisted. All data is (c) CentralNic Ltd (https://www.centralnic.com) Access to the Whois and RDAP services is rate limited. For more information, visit https://registrar-console.centralnic.com/pub/whois_guidance.") expect(subject.domain).to eq(nil) expect(subject.domain_id).to eq(nil) - expect(subject.status).to eq([]) + expect(subject.status).to eq(:available) expect(subject.available?).to eq(true) expect(subject.registered?).to eq(false) expect(subject.created_on).to eq(nil) diff --git a/spec/whois/parsers/responses/whois.centralnic.com/us.com/status_registered_spec.rb b/spec/whois/parsers/responses/whois.centralnic.com/us.com/status_registered_spec.rb index 1570eb4c..5ce74021 100644 --- a/spec/whois/parsers/responses/whois.centralnic.com/us.com/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.centralnic.com/us.com/status_registered_spec.rb @@ -21,84 +21,42 @@ end it "matches status_registered.expected" do - expect(subject.disclaimer).to eq("This whois service is provided by CentralNic Ltd and only contains information pertaining to Internet domain names we have registered for our customers. By using this service you are agreeing (1) not to use any information presented here for any purpose other than determining ownership of domain names, (2) not to store or reproduce this data in any way, (3) not to use any high-volume, automated, electronic processes to obtain data from this service. Abuse of this service is monitored and actions in contravention of these terms will result in being permanently blacklisted. All data is (c) CentralNic Ltd https://www.centralnic.com/") + expect(subject.disclaimer).to eq("The Whois and RDAP services are provided by CentralNic, and contain information pertaining to Internet domain names registered by our our customers. By using this service you are agreeing (1) not to use any information presented here for any purpose other than determining ownership of domain names, (2) not to store or reproduce this data in any way, (3) not to use any high-volume, automated, electronic processes to obtain data from this service. Abuse of this service is monitored and actions in contravention of these terms will result in being permanently blacklisted. All data is (c) CentralNic Ltd (https://www.centralnic.com) Access to the Whois and RDAP services is rate limited. For more information, visit https://registrar-console.centralnic.com/pub/whois_guidance.") expect(subject.domain).to eq("college.us.com") - expect(subject.domain_id).to eq("CNIC-DO275307") - expect(subject.status).to eq(["ok"]) + expect(subject.domain_id).to eq("D189945299-CNIC") + expect(subject.status).to eq(:registered) expect(subject.available?).to eq(false) expect(subject.registered?).to eq(true) expect(subject.created_on).to be_a(Time) - expect(subject.created_on).to eq(DateTime.parse("2003-10-20 10:03:28 UTC")) + expect(subject.created_on).to eq(DateTime.parse("2020-06-17 23:31:11 UTC")) expect(subject.updated_on).to be_a(Time) - expect(subject.updated_on).to eq(DateTime.parse("2012-01-16 16:27:26 UTC")) + expect(subject.updated_on).to eq(DateTime.parse("2021-07-27 13:34:05 UTC")) expect(subject.expires_on).to be_a(Time) - expect(subject.expires_on).to eq(DateTime.parse("2014-10-20 23:59:59 UTC")) - expect(subject.registrar).to eq(nil) + expect(subject.expires_on).to eq(DateTime.parse("2022-06-17 23:59:59 UTC")) + expect(subject.registrar).to be_a(Whois::Parser::Registrar) + expect(subject.registrar.id).to eq("1564") + expect(subject.registrar.name).to eq("TLD Registrar Solutions Ltd") + expect(subject.registrar.url).to eq("http://www.tldregistrarsolutions.com") expect(subject.registrant_contacts).to be_a(Array) expect(subject.registrant_contacts.size).to eq(1) expect(subject.registrant_contacts[0]).to be_a(Whois::Parser::Contact) expect(subject.registrant_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_REGISTRANT) - expect(subject.registrant_contacts[0].id).to eq("H1044037") - expect(subject.registrant_contacts[0].name).to eq("Vantage Media Corporation") - expect(subject.registrant_contacts[0].organization).to eq(nil) - expect(subject.registrant_contacts[0].address).to eq("2101 Rosecrans Ave.\nSuite 2000") - expect(subject.registrant_contacts[0].city).to eq(nil) - expect(subject.registrant_contacts[0].zip).to eq("90245") - expect(subject.registrant_contacts[0].state).to eq(nil) - expect(subject.registrant_contacts[0].country).to eq(nil) - expect(subject.registrant_contacts[0].country_code).to eq("US") - expect(subject.registrant_contacts[0].phone).to eq("+1.3102196200") - expect(subject.registrant_contacts[0].fax).to eq("+1.8665897214") - expect(subject.registrant_contacts[0].email).to eq("domainadmin@vantagemedia.com") + expect(subject.registrant_contacts[0].email).to eq("https://whois.centralnic.com/contact/college.us.com/registrant") expect(subject.admin_contacts).to be_a(Array) expect(subject.admin_contacts.size).to eq(1) expect(subject.admin_contacts[0]).to be_a(Whois::Parser::Contact) expect(subject.admin_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_ADMINISTRATIVE) - expect(subject.admin_contacts[0].id).to eq("H143205") - expect(subject.admin_contacts[0].name).to eq("Domain Administrator") - expect(subject.admin_contacts[0].organization).to eq("Vantage Media LLC") - expect(subject.admin_contacts[0].address).to eq("2101 Rosecrans Ave.\nSuite 2000") - expect(subject.admin_contacts[0].city).to eq(nil) - expect(subject.admin_contacts[0].zip).to eq("90245") - expect(subject.admin_contacts[0].state).to eq(nil) - expect(subject.admin_contacts[0].country).to eq(nil) - expect(subject.admin_contacts[0].country_code).to eq("US") - expect(subject.admin_contacts[0].phone).to eq("+1.3102196200") - expect(subject.admin_contacts[0].fax).to eq("+1.8665897214") - expect(subject.admin_contacts[0].email).to eq("domainadmin@vantagemedia.com") + expect(subject.admin_contacts[0].email).to eq("https://whois.centralnic.com/contact/college.us.com/admin") expect(subject.technical_contacts).to be_a(Array) expect(subject.technical_contacts.size).to eq(1) expect(subject.technical_contacts[0]).to be_a(Whois::Parser::Contact) expect(subject.technical_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_TECHNICAL) - expect(subject.technical_contacts[0].id).to eq("H143205") - expect(subject.technical_contacts[0].name).to eq("Domain Administrator") - expect(subject.technical_contacts[0].organization).to eq("Vantage Media LLC") - expect(subject.technical_contacts[0].address).to eq("2101 Rosecrans Ave.\nSuite 2000") - expect(subject.technical_contacts[0].city).to eq(nil) - expect(subject.technical_contacts[0].zip).to eq("90245") - expect(subject.technical_contacts[0].state).to eq(nil) - expect(subject.technical_contacts[0].country).to eq(nil) - expect(subject.technical_contacts[0].country_code).to eq("US") - expect(subject.technical_contacts[0].phone).to eq("+1.3102196200") - expect(subject.technical_contacts[0].fax).to eq("+1.8665897214") - expect(subject.technical_contacts[0].email).to eq("domainadmin@vantagemedia.com") + expect(subject.technical_contacts[0].email).to eq("https://whois.centralnic.com/contact/college.us.com/tech") expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers.size).to eq(4) + expect(subject.nameservers.size).to eq(2) expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[0].name).to eq("ns1.p17.dynect.net") - expect(subject.nameservers[0].ipv4).to eq(nil) - expect(subject.nameservers[0].ipv6).to eq(nil) + expect(subject.nameservers[0].name).to eq("elinore.ns.cloudflare.com") expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[1].name).to eq("ns2.p17.dynect.net") - expect(subject.nameservers[1].ipv4).to eq(nil) - expect(subject.nameservers[1].ipv6).to eq(nil) - expect(subject.nameservers[2]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[2].name).to eq("ns3.p17.dynect.net") - expect(subject.nameservers[2].ipv4).to eq(nil) - expect(subject.nameservers[2].ipv6).to eq(nil) - expect(subject.nameservers[3]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[3].name).to eq("ns4.p17.dynect.net") - expect(subject.nameservers[3].ipv4).to eq(nil) - expect(subject.nameservers[3].ipv6).to eq(nil) + expect(subject.nameservers[1].name).to eq("frank.ns.cloudflare.com") end end diff --git a/spec/whois/parsers/responses/whois.centralnic.com/us.org/status_available_spec.rb b/spec/whois/parsers/responses/whois.centralnic.com/us.org/status_available_spec.rb deleted file mode 100644 index df1bd549..00000000 --- a/spec/whois/parsers/responses/whois.centralnic.com/us.org/status_available_spec.rb +++ /dev/null @@ -1,43 +0,0 @@ -# encoding: utf-8 - -# This file is autogenerated. Do not edit it manually. -# If you want change the content of this file, edit -# -# /spec/fixtures/responses/whois.centralnic.com/us.org/status_available.expected -# -# and regenerate the tests with the following rake task -# -# $ rake spec:generate -# - -require 'spec_helper' - -describe "whois.centralnic.com", :aggregate_failures do - - subject do - file = fixture("responses", "whois.centralnic.com/us.org/status_available.txt") - part = Whois::Record::Part.new(body: File.read(file), host: "whois.centralnic.com") - Whois::Parser.parser_for(part) - end - - it "matches status_available.expected" do - expect(subject.disclaimer).to eq(nil) - expect(subject.domain).to eq(nil) - expect(subject.domain_id).to eq(nil) - expect(subject.status).to eq([]) - expect(subject.available?).to eq(true) - expect(subject.registered?).to eq(false) - expect(subject.created_on).to eq(nil) - expect(subject.updated_on).to eq(nil) - expect(subject.expires_on).to eq(nil) - expect(subject.registrar).to eq(nil) - expect(subject.registrant_contacts).to be_a(Array) - expect(subject.registrant_contacts).to eq([]) - expect(subject.admin_contacts).to be_a(Array) - expect(subject.admin_contacts).to eq([]) - expect(subject.technical_contacts).to be_a(Array) - expect(subject.technical_contacts).to eq([]) - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers).to eq([]) - end -end diff --git a/spec/whois/parsers/responses/whois.centralnic.com/uy.com/status_available_spec.rb b/spec/whois/parsers/responses/whois.centralnic.com/uy.com/status_available_spec.rb deleted file mode 100644 index ea52b064..00000000 --- a/spec/whois/parsers/responses/whois.centralnic.com/uy.com/status_available_spec.rb +++ /dev/null @@ -1,43 +0,0 @@ -# encoding: utf-8 - -# This file is autogenerated. Do not edit it manually. -# If you want change the content of this file, edit -# -# /spec/fixtures/responses/whois.centralnic.com/uy.com/status_available.expected -# -# and regenerate the tests with the following rake task -# -# $ rake spec:generate -# - -require 'spec_helper' - -describe "whois.centralnic.com", :aggregate_failures do - - subject do - file = fixture("responses", "whois.centralnic.com/uy.com/status_available.txt") - part = Whois::Record::Part.new(body: File.read(file), host: "whois.centralnic.com") - Whois::Parser.parser_for(part) - end - - it "matches status_available.expected" do - expect(subject.disclaimer).to eq(nil) - expect(subject.domain).to eq(nil) - expect(subject.domain_id).to eq(nil) - expect(subject.status).to eq([]) - expect(subject.available?).to eq(true) - expect(subject.registered?).to eq(false) - expect(subject.created_on).to eq(nil) - expect(subject.updated_on).to eq(nil) - expect(subject.expires_on).to eq(nil) - expect(subject.registrar).to eq(nil) - expect(subject.registrant_contacts).to be_a(Array) - expect(subject.registrant_contacts).to eq([]) - expect(subject.admin_contacts).to be_a(Array) - expect(subject.admin_contacts).to eq([]) - expect(subject.technical_contacts).to be_a(Array) - expect(subject.technical_contacts).to eq([]) - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers).to eq([]) - end -end diff --git a/spec/whois/parsers/responses/whois.centralnic.com/uy.com/status_registered_spec.rb b/spec/whois/parsers/responses/whois.centralnic.com/uy.com/status_registered_spec.rb deleted file mode 100644 index da82f12a..00000000 --- a/spec/whois/parsers/responses/whois.centralnic.com/uy.com/status_registered_spec.rb +++ /dev/null @@ -1,95 +0,0 @@ -# encoding: utf-8 - -# This file is autogenerated. Do not edit it manually. -# If you want change the content of this file, edit -# -# /spec/fixtures/responses/whois.centralnic.com/uy.com/status_registered.expected -# -# and regenerate the tests with the following rake task -# -# $ rake spec:generate -# - -require 'spec_helper' - -describe "whois.centralnic.com", :aggregate_failures do - - subject do - file = fixture("responses", "whois.centralnic.com/uy.com/status_registered.txt") - part = Whois::Record::Part.new(body: File.read(file), host: "whois.centralnic.com") - Whois::Parser.parser_for(part) - end - - it "matches status_registered.expected" do - expect(subject.disclaimer).to eq("This whois service is provided by CentralNic Ltd and only contains information pertaining to Internet domain names we have registered for our customers. By using this service you are agreeing (1) not to use any information presented here for any purpose other than determining ownership of domain names, (2) not to store or reproduce this data in any way, (3) not to use any high-volume, automated, electronic processes to obtain data from this service. Abuse of this service is monitored and actions in contravention of these terms will result in being permanently blacklisted. All data is (c) CentralNic Ltd https://www.centralnic.com/") - expect(subject.domain).to eq("bestb.uy.com") - expect(subject.domain_id).to eq("CNIC-DO493832") - expect(subject.status).to eq(["ok"]) - expect(subject.available?).to eq(false) - expect(subject.registered?).to eq(true) - expect(subject.created_on).to be_a(Time) - expect(subject.created_on).to eq(DateTime.parse("2007-07-12 13:49:25 UTC")) - expect(subject.updated_on).to be_a(Time) - expect(subject.updated_on).to eq(DateTime.parse("2013-07-10 00:27:20 UTC")) - expect(subject.expires_on).to be_a(Time) - expect(subject.expires_on).to eq(DateTime.parse("2015-07-12 23:59:59 UTC")) - expect(subject.registrar).to be_a(Whois::Parser::Registrar) - expect(subject.registrar.id).to eq("I6467") - expect(subject.registrar.name).to eq("Webfusion") - expect(subject.registrar.url).to eq("http://www.123-reg.co.uk/domain-names/") - expect(subject.registrant_contacts).to be_a(Array) - expect(subject.registrant_contacts.size).to eq(1) - expect(subject.registrant_contacts[0]).to be_a(Whois::Parser::Contact) - expect(subject.registrant_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_REGISTRANT) - expect(subject.registrant_contacts[0].id).to eq("MNT32524959440") - expect(subject.registrant_contacts[0].name).to eq("Identity Protection Service") - expect(subject.registrant_contacts[0].organization).to eq("Identity Protect Limited") - expect(subject.registrant_contacts[0].address).to eq("PO Box 795") - expect(subject.registrant_contacts[0].city).to eq("Godalming") - expect(subject.registrant_contacts[0].zip).to eq("GU7 9GA") - expect(subject.registrant_contacts[0].state).to eq("Surrey") - expect(subject.registrant_contacts[0].country).to eq(nil) - expect(subject.registrant_contacts[0].country_code).to eq("GB") - expect(subject.registrant_contacts[0].phone).to eq("+44.1483307527") - expect(subject.registrant_contacts[0].fax).to eq("+44.1483304031") - expect(subject.registrant_contacts[0].email).to eq("bestb.uy.com@identity-protect.org") - expect(subject.admin_contacts).to be_a(Array) - expect(subject.admin_contacts.size).to eq(1) - expect(subject.admin_contacts[0]).to be_a(Whois::Parser::Contact) - expect(subject.admin_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_ADMINISTRATIVE) - expect(subject.admin_contacts[0].id).to eq("MNT32524959440") - expect(subject.admin_contacts[0].name).to eq("Identity Protection Service") - expect(subject.admin_contacts[0].organization).to eq("Identity Protect Limited") - expect(subject.admin_contacts[0].address).to eq("PO Box 795") - expect(subject.admin_contacts[0].city).to eq("Godalming") - expect(subject.admin_contacts[0].zip).to eq("GU7 9GA") - expect(subject.admin_contacts[0].state).to eq("Surrey") - expect(subject.admin_contacts[0].country).to eq(nil) - expect(subject.admin_contacts[0].country_code).to eq("GB") - expect(subject.admin_contacts[0].phone).to eq("+44.1483307527") - expect(subject.admin_contacts[0].fax).to eq("+44.1483304031") - expect(subject.admin_contacts[0].email).to eq("bestb.uy.com@identity-protect.org") - expect(subject.technical_contacts).to be_a(Array) - expect(subject.technical_contacts.size).to eq(1) - expect(subject.technical_contacts[0]).to be_a(Whois::Parser::Contact) - expect(subject.technical_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_TECHNICAL) - expect(subject.technical_contacts[0].id).to eq("MNT32524959440") - expect(subject.technical_contacts[0].name).to eq("Identity Protection Service") - expect(subject.technical_contacts[0].organization).to eq("Identity Protect Limited") - expect(subject.technical_contacts[0].address).to eq("PO Box 795") - expect(subject.technical_contacts[0].city).to eq("Godalming") - expect(subject.technical_contacts[0].zip).to eq("GU7 9GA") - expect(subject.technical_contacts[0].state).to eq("Surrey") - expect(subject.technical_contacts[0].country).to eq(nil) - expect(subject.technical_contacts[0].country_code).to eq("GB") - expect(subject.technical_contacts[0].phone).to eq("+44.1483307527") - expect(subject.technical_contacts[0].fax).to eq("+44.1483304031") - expect(subject.technical_contacts[0].email).to eq("bestb.uy.com@identity-protect.org") - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers.size).to eq(2) - expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[0].name).to eq("ns2.123-reg.co.uk") - expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[1].name).to eq("ns.123-reg.co.uk") - end -end diff --git a/spec/whois/parsers/responses/whois.centralnic.com/za.com/status_available_spec.rb b/spec/whois/parsers/responses/whois.centralnic.com/za.com/status_available_spec.rb index 61495049..d0c60831 100644 --- a/spec/whois/parsers/responses/whois.centralnic.com/za.com/status_available_spec.rb +++ b/spec/whois/parsers/responses/whois.centralnic.com/za.com/status_available_spec.rb @@ -21,10 +21,10 @@ end it "matches status_available.expected" do - expect(subject.disclaimer).to eq(nil) + expect(subject.disclaimer).to eq("The Whois and RDAP services are provided by CentralNic, and contain information pertaining to Internet domain names registered by our our customers. By using this service you are agreeing (1) not to use any information presented here for any purpose other than determining ownership of domain names, (2) not to store or reproduce this data in any way, (3) not to use any high-volume, automated, electronic processes to obtain data from this service. Abuse of this service is monitored and actions in contravention of these terms will result in being permanently blacklisted. All data is (c) CentralNic Ltd (https://www.centralnic.com) Access to the Whois and RDAP services is rate limited. For more information, visit https://registrar-console.centralnic.com/pub/whois_guidance.") expect(subject.domain).to eq(nil) expect(subject.domain_id).to eq(nil) - expect(subject.status).to eq([]) + expect(subject.status).to eq(:available) expect(subject.available?).to eq(true) expect(subject.registered?).to eq(false) expect(subject.created_on).to eq(nil) diff --git a/spec/whois/parsers/responses/whois.centralnic.com/za.com/status_registered_spec.rb b/spec/whois/parsers/responses/whois.centralnic.com/za.com/status_registered_spec.rb index 681268b3..96b52424 100644 --- a/spec/whois/parsers/responses/whois.centralnic.com/za.com/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.centralnic.com/za.com/status_registered_spec.rb @@ -21,70 +21,37 @@ end it "matches status_registered.expected" do - expect(subject.disclaimer).to eq("This whois service is provided by CentralNic Ltd and only contains information pertaining to Internet domain names we have registered for our customers. By using this service you are agreeing (1) not to use any information presented here for any purpose other than determining ownership of domain names, (2) not to store or reproduce this data in any way, (3) not to use any high-volume, automated, electronic processes to obtain data from this service. Abuse of this service is monitored and actions in contravention of these terms will result in being permanently blacklisted. All data is (c) CentralNic Ltd https://www.centralnic.com/") + expect(subject.disclaimer).to eq("The Whois and RDAP services are provided by CentralNic, and contain information pertaining to Internet domain names registered by our our customers. By using this service you are agreeing (1) not to use any information presented here for any purpose other than determining ownership of domain names, (2) not to store or reproduce this data in any way, (3) not to use any high-volume, automated, electronic processes to obtain data from this service. Abuse of this service is monitored and actions in contravention of these terms will result in being permanently blacklisted. All data is (c) CentralNic Ltd (https://www.centralnic.com) Access to the Whois and RDAP services is rate limited. For more information, visit https://registrar-console.centralnic.com/pub/whois_guidance.") expect(subject.domain).to eq("siyenza.za.com") - expect(subject.domain_id).to eq("CNIC-DO333077") - expect(subject.status).to eq(["ok"]) + expect(subject.domain_id).to eq("D333077-CNIC") + expect(subject.status).to eq(:registered) expect(subject.available?).to eq(false) expect(subject.registered?).to eq(true) expect(subject.created_on).to be_a(Time) expect(subject.created_on).to eq(DateTime.parse("2004-11-17 11:47:29 UTC")) expect(subject.updated_on).to be_a(Time) - expect(subject.updated_on).to eq(DateTime.parse("2013-12-03 12:33:13 UTC")) + expect(subject.updated_on).to eq(DateTime.parse("2019-01-30 08:43:57 UTC")) expect(subject.expires_on).to be_a(Time) - expect(subject.expires_on).to eq(DateTime.parse("2014-11-17 23:59:59 UTC")) + expect(subject.expires_on).to eq(DateTime.parse("2022-11-17 23:59:59 UTC")) expect(subject.registrar).to be_a(Whois::Parser::Registrar) - expect(subject.registrar.id).to eq("C12112") + expect(subject.registrar.id).to eq("") expect(subject.registrar.name).to eq("Megaweb Internet Services") expect(subject.registrar.url).to eq("http://www.megaweb.co.za/") expect(subject.registrant_contacts).to be_a(Array) expect(subject.registrant_contacts.size).to eq(1) expect(subject.registrant_contacts[0]).to be_a(Whois::Parser::Contact) expect(subject.registrant_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_REGISTRANT) - expect(subject.registrant_contacts[0].id).to eq("H1063006") - expect(subject.registrant_contacts[0].name).to eq("MegaWeb Internet Services cc") - expect(subject.registrant_contacts[0].organization).to eq(nil) - expect(subject.registrant_contacts[0].address).to eq("PO Box 3738\nCramerview") - expect(subject.registrant_contacts[0].city).to eq(nil) - expect(subject.registrant_contacts[0].zip).to eq("2060") - expect(subject.registrant_contacts[0].state).to eq(nil) - expect(subject.registrant_contacts[0].country).to eq(nil) - expect(subject.registrant_contacts[0].country_code).to eq("ZA") - expect(subject.registrant_contacts[0].phone).to eq("+27.0114851984") - expect(subject.registrant_contacts[0].fax).to eq("+27.0114855999") - expect(subject.registrant_contacts[0].email).to eq("dns-admin@megaweb.co.za") + expect(subject.registrant_contacts[0].email).to eq("https://whois.centralnic.com/contact/siyenza.za.com/registrant") expect(subject.admin_contacts).to be_a(Array) expect(subject.admin_contacts.size).to eq(1) expect(subject.admin_contacts[0]).to be_a(Whois::Parser::Contact) expect(subject.admin_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_ADMINISTRATIVE) - expect(subject.admin_contacts[0].id).to eq("H119106") - expect(subject.admin_contacts[0].name).to eq("Liz Hart") - expect(subject.admin_contacts[0].organization).to eq("Siyenza Management") - expect(subject.admin_contacts[0].address).to eq("PO Box 3738\nCramerview") - expect(subject.admin_contacts[0].city).to eq(nil) - expect(subject.admin_contacts[0].zip).to eq("2060") - expect(subject.admin_contacts[0].state).to eq(nil) - expect(subject.admin_contacts[0].country).to eq(nil) - expect(subject.admin_contacts[0].country_code).to eq("ZA") - expect(subject.admin_contacts[0].phone).to eq("+27.0114851984") - expect(subject.admin_contacts[0].fax).to eq("+27.0114855999") - expect(subject.admin_contacts[0].email).to eq("dns-admin@megaweb.co.za") + expect(subject.admin_contacts[0].email).to eq("https://whois.centralnic.com/contact/siyenza.za.com/admin") expect(subject.technical_contacts).to be_a(Array) expect(subject.technical_contacts.size).to eq(1) expect(subject.technical_contacts[0]).to be_a(Whois::Parser::Contact) expect(subject.technical_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_TECHNICAL) - expect(subject.technical_contacts[0].id).to eq("C12112") - expect(subject.technical_contacts[0].name).to eq("Laida Peters") - expect(subject.technical_contacts[0].organization).to eq("Megaweb Internet Services") - expect(subject.technical_contacts[0].address).to eq(nil) - expect(subject.technical_contacts[0].city).to eq("Gauteng") - expect(subject.technical_contacts[0].zip).to eq("2192") - expect(subject.technical_contacts[0].state).to eq(nil) - expect(subject.technical_contacts[0].country).to eq(nil) - expect(subject.technical_contacts[0].country_code).to eq("ZA") - expect(subject.technical_contacts[0].phone).to eq("+27.027114851984") - expect(subject.technical_contacts[0].fax).to eq("+27.027114851986") - expect(subject.technical_contacts[0].email).to eq("dns-admin@megaweb.co.za") + expect(subject.technical_contacts[0].email).to eq("https://whois.centralnic.com/contact/siyenza.za.com/tech") expect(subject.nameservers).to be_a(Array) expect(subject.nameservers.size).to eq(2) expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) diff --git a/spec/whois/parsers/responses/whois.enom.com/status_registered_spec.rb b/spec/whois/parsers/responses/whois.enom.com/status_registered_spec.rb index 052477b9..591fa9d5 100644 --- a/spec/whois/parsers/responses/whois.enom.com/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.enom.com/status_registered_spec.rb @@ -47,9 +47,9 @@ expect(subject.registrant_contacts[0].state).to eq("WA") expect(subject.registrant_contacts[0].country).to eq(nil) expect(subject.registrant_contacts[0].country_code).to eq("US") - expect(subject.registrant_contacts[0].phone).to eq("") - expect(subject.registrant_contacts[0].fax).to eq("") - expect(subject.registrant_contacts[0].email).to eq("") + expect(subject.registrant_contacts[0].phone).to eq(nil) + expect(subject.registrant_contacts[0].fax).to eq(nil) + expect(subject.registrant_contacts[0].email).to eq(nil) expect(subject.registrant_contacts[0].created_on).to eq(nil) expect(subject.registrant_contacts[0].updated_on).to eq(nil) expect(subject.admin_contacts).to be_a(Array) diff --git a/spec/whois/parsers/responses/whois.nic.college/college/status_available_spec.rb b/spec/whois/parsers/responses/whois.nic.college/college/status_available_spec.rb index 6f6ec1e4..b5e4ec96 100644 --- a/spec/whois/parsers/responses/whois.nic.college/college/status_available_spec.rb +++ b/spec/whois/parsers/responses/whois.nic.college/college/status_available_spec.rb @@ -21,10 +21,10 @@ end it "matches status_available.expected" do - expect(subject.disclaimer).to eq(nil) + expect(subject.disclaimer).to eq("The Whois and RDAP services are provided by CentralNic, and contain information pertaining to Internet domain names registered by our our customers. By using this service you are agreeing (1) not to use any information presented here for any purpose other than determining ownership of domain names, (2) not to store or reproduce this data in any way, (3) not to use any high-volume, automated, electronic processes to obtain data from this service. Abuse of this service is monitored and actions in contravention of these terms will result in being permanently blacklisted. All data is (c) CentralNic Ltd (https://www.centralnic.com) Access to the Whois and RDAP services is rate limited. For more information, visit https://registrar-console.centralnic.com/pub/whois_guidance.") expect(subject.domain).to eq(nil) expect(subject.domain_id).to eq(nil) - expect(subject.status).to eq([]) + expect(subject.status).to eq(:available) expect(subject.available?).to eq(true) expect(subject.registered?).to eq(false) expect(subject.created_on).to eq(nil) diff --git a/spec/whois/parsers/responses/whois.nic.college/college/status_registered_spec.rb b/spec/whois/parsers/responses/whois.nic.college/college/status_registered_spec.rb index 62f235da..8001b41f 100644 --- a/spec/whois/parsers/responses/whois.nic.college/college/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.nic.college/college/status_registered_spec.rb @@ -21,95 +21,57 @@ end it "matches status_registered.expected" do - expect(subject.disclaimer).to eq("Access to the whois service is rate limited. For more information, please see https://registrar-console.centralnic.com/pub/whois_guidance.") + expect(subject.disclaimer).to eq("The Whois and RDAP services are provided by CentralNic, and contain information pertaining to Internet domain names registered by our our customers. By using this service you are agreeing (1) not to use any information presented here for any purpose other than determining ownership of domain names, (2) not to store or reproduce this data in any way, (3) not to use any high-volume, automated, electronic processes to obtain data from this service. Abuse of this service is monitored and actions in contravention of these terms will result in being permanently blacklisted. All data is (c) CentralNic Ltd (https://www.centralnic.com) Access to the Whois and RDAP services is rate limited. For more information, visit https://registrar-console.centralnic.com/pub/whois_guidance.") expect(subject.domain).to eq("nic.college") expect(subject.domain_id).to eq("D1465621-CNIC") - expect(subject.status).to eq(["serverTransferProhibited", "serverUpdateProhibited", "serverDeleteProhibited", "serverRenewProhibited"]) + expect(subject.status).to eq(:registered) expect(subject.available?).to eq(false) expect(subject.registered?).to eq(true) expect(subject.created_on).to be_a(Time) - expect(subject.created_on).to eq(DateTime.parse("2013-09-11 00:00:00 UTC")) + expect(subject.created_on).to eq(DateTime.parse("2013-09-11 11:58:15 UTC")) expect(subject.updated_on).to be_a(Time) - expect(subject.updated_on).to eq(DateTime.parse("2014-09-12 00:15:47 UTC")) + expect(subject.updated_on).to eq(DateTime.parse("2021-09-05 00:10:44 UTC")) expect(subject.expires_on).to be_a(Time) - expect(subject.expires_on).to eq(DateTime.parse("2015-09-11 23:59:59 UTC")) + expect(subject.expires_on).to eq(DateTime.parse("2022-09-11 23:59:59 UTC")) expect(subject.registrar).to be_a(Whois::Parser::Registrar) expect(subject.registrar.id).to eq("9999") expect(subject.registrar.name).to eq("CentralNic Ltd") - expect(subject.registrar.url).to eq(nil) + expect(subject.registrar.url).to eq("https://www.centralnic.com/") expect(subject.registrant_contacts).to be_a(Array) expect(subject.registrant_contacts.size).to eq(1) expect(subject.registrant_contacts[0]).to be_a(Whois::Parser::Contact) expect(subject.registrant_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_REGISTRANT) - expect(subject.registrant_contacts[0].id).to eq("H5178905") - expect(subject.registrant_contacts[0].name).to eq("Domain Administrator") + expect(subject.registrant_contacts[0].id).to eq(nil) + expect(subject.registrant_contacts[0].name).to eq(nil) expect(subject.registrant_contacts[0].organization).to eq("XYZ.COM LLC") - expect(subject.registrant_contacts[0].address).to eq("2121 E Tropicana Ave Suite #2") - expect(subject.registrant_contacts[0].city).to eq("Las Vegas") - expect(subject.registrant_contacts[0].zip).to eq("89119") + expect(subject.registrant_contacts[0].address).to eq(nil) + expect(subject.registrant_contacts[0].city).to eq(nil) + expect(subject.registrant_contacts[0].zip).to eq(nil) expect(subject.registrant_contacts[0].state).to eq("NV") expect(subject.registrant_contacts[0].country).to eq(nil) expect(subject.registrant_contacts[0].country_code).to eq("US") - expect(subject.registrant_contacts[0].phone).to eq("+1.8009998422") - expect(subject.registrant_contacts[0].fax).to eq("+1.7023578299") - expect(subject.registrant_contacts[0].email).to eq("icann@xyz.com") + expect(subject.registrant_contacts[0].phone).to eq(nil) + expect(subject.registrant_contacts[0].fax).to eq(nil) + expect(subject.registrant_contacts[0].email).to eq("Please query the RDDS service of the Registrar of Record identified in this output for information on how to contact the Registrant, Admin, or Tech contact of the queried domain name.") expect(subject.admin_contacts).to be_a(Array) expect(subject.admin_contacts.size).to eq(1) expect(subject.admin_contacts[0]).to be_a(Whois::Parser::Contact) expect(subject.admin_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_ADMINISTRATIVE) - expect(subject.admin_contacts[0].id).to eq("H5178905") - expect(subject.admin_contacts[0].name).to eq("Domain Administrator") - expect(subject.admin_contacts[0].organization).to eq("XYZ.COM LLC") - expect(subject.admin_contacts[0].address).to eq("2121 E Tropicana Ave Suite #2") - expect(subject.admin_contacts[0].city).to eq("Las Vegas") - expect(subject.admin_contacts[0].zip).to eq("89119") - expect(subject.admin_contacts[0].state).to eq("NV") - expect(subject.admin_contacts[0].country).to eq(nil) - expect(subject.admin_contacts[0].country_code).to eq("US") - expect(subject.admin_contacts[0].phone).to eq("+1.8009998422") - expect(subject.admin_contacts[0].fax).to eq("+1.7023578299") - expect(subject.admin_contacts[0].email).to eq("icann@xyz.com") + expect(subject.admin_contacts[0].email).to eq("Please query the RDDS service of the Registrar of Record identified in this output for information on how to contact the Registrant, Admin, or Tech contact of the queried domain name.") expect(subject.technical_contacts).to be_a(Array) expect(subject.technical_contacts.size).to eq(1) expect(subject.technical_contacts[0]).to be_a(Whois::Parser::Contact) expect(subject.technical_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_TECHNICAL) - expect(subject.technical_contacts[0].id).to eq("H5178905") - expect(subject.technical_contacts[0].name).to eq("Domain Administrator") - expect(subject.technical_contacts[0].organization).to eq("XYZ.COM LLC") - expect(subject.technical_contacts[0].address).to eq("2121 E Tropicana Ave Suite #2") - expect(subject.technical_contacts[0].city).to eq("Las Vegas") - expect(subject.technical_contacts[0].zip).to eq("89119") - expect(subject.technical_contacts[0].state).to eq("NV") - expect(subject.technical_contacts[0].country).to eq(nil) - expect(subject.technical_contacts[0].country_code).to eq("US") - expect(subject.technical_contacts[0].phone).to eq("+1.8009998422") - expect(subject.technical_contacts[0].fax).to eq("+1.7023578299") - expect(subject.technical_contacts[0].email).to eq("icann@xyz.com") + expect(subject.technical_contacts[0].email).to eq("Please query the RDDS service of the Registrar of Record identified in this output for information on how to contact the Registrant, Admin, or Tech contact of the queried domain name.") expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers.size).to eq(6) + expect(subject.nameservers.size).to eq(4) expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[0].name).to eq("ns0.centralnic-dns.com") - expect(subject.nameservers[0].ipv4).to eq(nil) - expect(subject.nameservers[0].ipv6).to eq(nil) + expect(subject.nameservers[0].name).to eq("a.nic.college") expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[1].name).to eq("ns1.centralnic-dns.com") - expect(subject.nameservers[1].ipv4).to eq(nil) - expect(subject.nameservers[1].ipv6).to eq(nil) + expect(subject.nameservers[1].name).to eq("b.nic.college") expect(subject.nameservers[2]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[2].name).to eq("ns2.centralnic-dns.com") - expect(subject.nameservers[2].ipv4).to eq(nil) - expect(subject.nameservers[2].ipv6).to eq(nil) + expect(subject.nameservers[2].name).to eq("c.nic.college") expect(subject.nameservers[3]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[3].name).to eq("ns3.centralnic-dns.com") - expect(subject.nameservers[3].ipv4).to eq(nil) - expect(subject.nameservers[3].ipv6).to eq(nil) - expect(subject.nameservers[4]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[4].name).to eq("ns4.centralnic-dns.com") - expect(subject.nameservers[4].ipv4).to eq(nil) - expect(subject.nameservers[4].ipv6).to eq(nil) - expect(subject.nameservers[5]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[5].name).to eq("ns5.centralnic-dns.com") - expect(subject.nameservers[5].ipv4).to eq(nil) - expect(subject.nameservers[5].ipv6).to eq(nil) + expect(subject.nameservers[3].name).to eq("d.nic.college") end end diff --git a/spec/whois/parsers/responses/whois.nic.design/design/status_available_spec.rb b/spec/whois/parsers/responses/whois.nic.design/design/status_available_spec.rb index 38878975..80aa55c8 100644 --- a/spec/whois/parsers/responses/whois.nic.design/design/status_available_spec.rb +++ b/spec/whois/parsers/responses/whois.nic.design/design/status_available_spec.rb @@ -21,10 +21,10 @@ end it "matches status_available.expected" do - expect(subject.disclaimer).to eq(nil) + expect(subject.disclaimer).to eq("The Whois and RDAP services are provided by CentralNic, and contain information pertaining to Internet domain names registered by our our customers. By using this service you are agreeing (1) not to use any information presented here for any purpose other than determining ownership of domain names, (2) not to store or reproduce this data in any way, (3) not to use any high-volume, automated, electronic processes to obtain data from this service. Abuse of this service is monitored and actions in contravention of these terms will result in being permanently blacklisted. All data is (c) CentralNic Ltd (https://www.centralnic.com) Access to the Whois and RDAP services is rate limited. For more information, visit https://registrar-console.centralnic.com/pub/whois_guidance.") expect(subject.domain).to eq(nil) expect(subject.domain_id).to eq(nil) - expect(subject.status).to eq([]) + expect(subject.status).to eq(:available) expect(subject.available?).to eq(true) expect(subject.registered?).to eq(false) expect(subject.created_on).to eq(nil) diff --git a/spec/whois/parsers/responses/whois.nic.design/design/status_registered_spec.rb b/spec/whois/parsers/responses/whois.nic.design/design/status_registered_spec.rb index cf647907..0de06c09 100644 --- a/spec/whois/parsers/responses/whois.nic.design/design/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.nic.design/design/status_registered_spec.rb @@ -21,87 +21,57 @@ end it "matches status_registered.expected" do - expect(subject.disclaimer).to eq("Access to the whois service is rate limited. For more information, please see https://registrar-console.centralnic.com/pub/whois_guidance.") + expect(subject.disclaimer).to eq("The Whois and RDAP services are provided by CentralNic, and contain information pertaining to Internet domain names registered by our our customers. By using this service you are agreeing (1) not to use any information presented here for any purpose other than determining ownership of domain names, (2) not to store or reproduce this data in any way, (3) not to use any high-volume, automated, electronic processes to obtain data from this service. Abuse of this service is monitored and actions in contravention of these terms will result in being permanently blacklisted. All data is (c) CentralNic Ltd (https://www.centralnic.com) Access to the Whois and RDAP services is rate limited. For more information, visit https://registrar-console.centralnic.com/pub/whois_guidance.") expect(subject.domain).to eq("toplevel.design") - expect(subject.domain_id).to eq("D7069819-CNIC") - expect(subject.status).to eq(["ok"]) + expect(subject.domain_id).to eq("D44478444-CNIC") + expect(subject.status).to eq(:registered) expect(subject.available?).to eq(false) expect(subject.registered?).to eq(true) expect(subject.created_on).to be_a(Time) - expect(subject.created_on).to eq(DateTime.parse("2015-02-27 16:08:32 UTC")) + expect(subject.created_on).to eq(DateTime.parse("2017-02-16 20:11:45 UTC")) expect(subject.updated_on).to be_a(Time) - expect(subject.updated_on).to eq(DateTime.parse("2015-04-21 17:48:34 UTC")) + expect(subject.updated_on).to eq(DateTime.parse("2021-08-30 22:42:53 UTC")) expect(subject.expires_on).to be_a(Time) - expect(subject.expires_on).to eq(DateTime.parse("2016-02-27 23:59:59 UTC")) + expect(subject.expires_on).to eq(DateTime.parse("2022-02-16 23:59:59 UTC")) expect(subject.registrar).to be_a(Whois::Parser::Registrar) - expect(subject.registrar.id).to eq("9999") - expect(subject.registrar.name).to eq("Top Level Design, LLC") - expect(subject.registrar.url).to eq(nil) + expect(subject.registrar.id).to eq("1861") + expect(subject.registrar.name).to eq("Porkbun, LLC") + expect(subject.registrar.url).to eq("https://porkbun.com/") expect(subject.registrant_contacts).to be_a(Array) expect(subject.registrant_contacts.size).to eq(1) expect(subject.registrant_contacts[0]).to be_a(Whois::Parser::Contact) expect(subject.registrant_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_REGISTRANT) - expect(subject.registrant_contacts[0].id).to eq("H4596017") - expect(subject.registrant_contacts[0].name).to eq("Domain Administrator") - expect(subject.registrant_contacts[0].organization).to eq("Top Level Design, LLC") - expect(subject.registrant_contacts[0].address).to eq("742 Ocean Club Place") - expect(subject.registrant_contacts[0].city).to eq("Fernandina Beach") - expect(subject.registrant_contacts[0].zip).to eq("32034") - expect(subject.registrant_contacts[0].state).to eq("Florida") + expect(subject.registrant_contacts[0].id).to eq(nil) + expect(subject.registrant_contacts[0].name).to eq(nil) + expect(subject.registrant_contacts[0].organization).to eq("Top Level Design LLC") + expect(subject.registrant_contacts[0].address).to eq(nil) + expect(subject.registrant_contacts[0].city).to eq(nil) + expect(subject.registrant_contacts[0].zip).to eq(nil) + expect(subject.registrant_contacts[0].state).to eq("Oregon") expect(subject.registrant_contacts[0].country).to eq(nil) expect(subject.registrant_contacts[0].country_code).to eq("US") - expect(subject.registrant_contacts[0].phone).to eq("+1.5038888808") - expect(subject.registrant_contacts[0].fax).to eq("+1.6788841468") - expect(subject.registrant_contacts[0].email).to eq("ray@tldesign.co") + expect(subject.registrant_contacts[0].phone).to eq(nil) + expect(subject.registrant_contacts[0].fax).to eq(nil) + expect(subject.registrant_contacts[0].email).to eq("Please query the RDDS service of the Registrar of Record identified in this output for information on how to contact the Registrant, Admin, or Tech contact of the queried domain name.") expect(subject.admin_contacts).to be_a(Array) expect(subject.admin_contacts.size).to eq(1) expect(subject.admin_contacts[0]).to be_a(Whois::Parser::Contact) expect(subject.admin_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_ADMINISTRATIVE) - expect(subject.admin_contacts[0].id).to eq("H4596017") - expect(subject.admin_contacts[0].name).to eq("Domain Administrator") - expect(subject.admin_contacts[0].organization).to eq("Top Level Design, LLC") - expect(subject.admin_contacts[0].address).to eq("742 Ocean Club Place") - expect(subject.admin_contacts[0].city).to eq("Fernandina Beach") - expect(subject.admin_contacts[0].zip).to eq("32034") - expect(subject.admin_contacts[0].state).to eq("Florida") - expect(subject.admin_contacts[0].country).to eq(nil) - expect(subject.admin_contacts[0].country_code).to eq("US") - expect(subject.admin_contacts[0].phone).to eq("+1.5038888808") - expect(subject.admin_contacts[0].fax).to eq("+1.6788841468") - expect(subject.admin_contacts[0].email).to eq("ray@tldesign.co") + expect(subject.admin_contacts[0].email).to eq("Please query the RDDS service of the Registrar of Record identified in this output for information on how to contact the Registrant, Admin, or Tech contact of the queried domain name.") expect(subject.technical_contacts).to be_a(Array) expect(subject.technical_contacts.size).to eq(1) expect(subject.technical_contacts[0]).to be_a(Whois::Parser::Contact) expect(subject.technical_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_TECHNICAL) - expect(subject.technical_contacts[0].id).to eq("H4596017") - expect(subject.technical_contacts[0].name).to eq("Domain Administrator") - expect(subject.technical_contacts[0].organization).to eq("Top Level Design, LLC") - expect(subject.technical_contacts[0].address).to eq("742 Ocean Club Place") - expect(subject.technical_contacts[0].city).to eq("Fernandina Beach") - expect(subject.technical_contacts[0].zip).to eq("32034") - expect(subject.technical_contacts[0].state).to eq("Florida") - expect(subject.technical_contacts[0].country).to eq(nil) - expect(subject.technical_contacts[0].country_code).to eq("US") - expect(subject.technical_contacts[0].phone).to eq("+1.5038888808") - expect(subject.technical_contacts[0].fax).to eq("+1.6788841468") - expect(subject.technical_contacts[0].email).to eq("ray@tldesign.co") + expect(subject.technical_contacts[0].email).to eq("Please query the RDDS service of the Registrar of Record identified in this output for information on how to contact the Registrant, Admin, or Tech contact of the queried domain name.") expect(subject.nameservers).to be_a(Array) expect(subject.nameservers.size).to eq(4) expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) expect(subject.nameservers[0].name).to eq("ns-170.awsdns-21.com") - expect(subject.nameservers[0].ipv4).to eq(nil) - expect(subject.nameservers[0].ipv6).to eq(nil) expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) expect(subject.nameservers[1].name).to eq("ns-904.awsdns-49.net") - expect(subject.nameservers[1].ipv4).to eq(nil) - expect(subject.nameservers[1].ipv6).to eq(nil) expect(subject.nameservers[2]).to be_a(Whois::Parser::Nameserver) expect(subject.nameservers[2].name).to eq("ns-1067.awsdns-05.org") - expect(subject.nameservers[2].ipv4).to eq(nil) - expect(subject.nameservers[2].ipv6).to eq(nil) expect(subject.nameservers[3]).to be_a(Whois::Parser::Nameserver) expect(subject.nameservers[3].name).to eq("ns-1873.awsdns-42.co.uk") - expect(subject.nameservers[3].ipv4).to eq(nil) - expect(subject.nameservers[3].ipv6).to eq(nil) end end diff --git a/spec/whois/parsers/responses/whois.nic.la/la/property_status_multiple_spec.rb b/spec/whois/parsers/responses/whois.nic.la/la/property_status_multiple_spec.rb deleted file mode 100644 index 2fc7a40e..00000000 --- a/spec/whois/parsers/responses/whois.nic.la/la/property_status_multiple_spec.rb +++ /dev/null @@ -1,26 +0,0 @@ -# encoding: utf-8 - -# This file is autogenerated. Do not edit it manually. -# If you want change the content of this file, edit -# -# /spec/fixtures/responses/whois.nic.la/la/property_status_multiple.expected -# -# and regenerate the tests with the following rake task -# -# $ rake spec:generate -# - -require 'spec_helper' - -describe "whois.nic.la", :aggregate_failures do - - subject do - file = fixture("responses", "whois.nic.la/la/property_status_multiple.txt") - part = Whois::Record::Part.new(body: File.read(file), host: "whois.nic.la") - Whois::Parser.parser_for(part) - end - - it "matches property_status_multiple.expected" do - expect(subject.status).to eq(["TRANSFER PROHIBITED", "RENEW PERIOD"]) - end -end diff --git a/spec/whois/parsers/responses/whois.nic.la/la/property_status_single_spec.rb b/spec/whois/parsers/responses/whois.nic.la/la/property_status_single_spec.rb deleted file mode 100644 index 7a1bad26..00000000 --- a/spec/whois/parsers/responses/whois.nic.la/la/property_status_single_spec.rb +++ /dev/null @@ -1,26 +0,0 @@ -# encoding: utf-8 - -# This file is autogenerated. Do not edit it manually. -# If you want change the content of this file, edit -# -# /spec/fixtures/responses/whois.nic.la/la/property_status_single.expected -# -# and regenerate the tests with the following rake task -# -# $ rake spec:generate -# - -require 'spec_helper' - -describe "whois.nic.la", :aggregate_failures do - - subject do - file = fixture("responses", "whois.nic.la/la/property_status_single.txt") - part = Whois::Record::Part.new(body: File.read(file), host: "whois.nic.la") - Whois::Parser.parser_for(part) - end - - it "matches property_status_single.expected" do - expect(subject.status).to eq(["OK"]) - end -end diff --git a/spec/whois/parsers/responses/whois.nic.la/la/status_available_spec.rb b/spec/whois/parsers/responses/whois.nic.la/la/status_available_spec.rb index 9ffd3e72..35b497d2 100644 --- a/spec/whois/parsers/responses/whois.nic.la/la/status_available_spec.rb +++ b/spec/whois/parsers/responses/whois.nic.la/la/status_available_spec.rb @@ -21,10 +21,10 @@ end it "matches status_available.expected" do - expect(subject.disclaimer).to eq(nil) + expect(subject.disclaimer).to eq("This whois service is provided by LANIC and only contains information pertaining to Internet domain names registered by our our customers. By using this service you are agreeing (1) not to use any information presented here for any purpose other than determining ownership of domain names, (2) not to store or reproduce this data in any way, (3) not to use any high-volume, automated, electronic processes to obtain data from this service. Abuse of this service is monitored and actions in contravention of these terms will result in being permanently blacklisted. All data is (c) LANIC http://www.lanic.gov.la/ Access to the whois service is rate limited. For more information, please see https://registrar-console.lanic.la/pub/whois_guidance.") expect(subject.domain).to eq(nil) expect(subject.domain_id).to eq(nil) - expect(subject.status).to eq([]) + expect(subject.status).to eq(:available) expect(subject.available?).to eq(true) expect(subject.registered?).to eq(false) expect(subject.created_on).to eq(nil) diff --git a/spec/whois/parsers/responses/whois.nic.la/la/status_registered_spec.rb b/spec/whois/parsers/responses/whois.nic.la/la/status_registered_spec.rb index cd44236c..1446776f 100644 --- a/spec/whois/parsers/responses/whois.nic.la/la/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.nic.la/la/status_registered_spec.rb @@ -21,70 +21,37 @@ end it "matches status_registered.expected" do - expect(subject.disclaimer).to eq("This whois service is provided by CentralNic Ltd and only contains information pertaining to Internet domain names we have registered for our customers. By using this service you are agreeing (1) not to use any information presented here for any purpose other than determining ownership of domain names, (2) not to store or reproduce this data in any way, (3) not to use any high-volume, automated, electronic processes to obtain data from this service. Abuse of this service is monitored and actions in contravention of these terms will result in being permanently blacklisted. All data is (c) CentralNic Ltd https://www.centralnic.com/") + expect(subject.disclaimer).to eq("This whois service is provided by LANIC and only contains information pertaining to Internet domain names registered by our our customers. By using this service you are agreeing (1) not to use any information presented here for any purpose other than determining ownership of domain names, (2) not to store or reproduce this data in any way, (3) not to use any high-volume, automated, electronic processes to obtain data from this service. Abuse of this service is monitored and actions in contravention of these terms will result in being permanently blacklisted. All data is (c) LANIC http://www.lanic.gov.la/ Access to the whois service is rate limited. For more information, please see https://registrar-console.lanic.la/pub/whois_guidance.") expect(subject.domain).to eq("google.la") - expect(subject.domain_id).to eq("CNIC-DO471480") - expect(subject.status).to eq(["clientTransferProhibited", "serverTransferProhibited"]) + expect(subject.domain_id).to eq("D471480-LANIC") + expect(subject.status).to eq(:registered) expect(subject.available?).to eq(false) expect(subject.registered?).to eq(true) expect(subject.created_on).to be_a(Time) expect(subject.created_on).to eq(DateTime.parse("2002-07-18 01:00:00 UTC")) expect(subject.updated_on).to be_a(Time) - expect(subject.updated_on).to eq(DateTime.parse("2013-08-01 15:09:21 UTC")) + expect(subject.updated_on).to eq(DateTime.parse("2021-07-04 21:39:38 UTC")) expect(subject.expires_on).to be_a(Time) - expect(subject.expires_on).to eq(DateTime.parse("2014-07-18 23:59:59 UTC")) + expect(subject.expires_on).to eq(DateTime.parse("2022-07-18 23:59:59 UTC")) expect(subject.registrar).to be_a(Whois::Parser::Registrar) - expect(subject.registrar.id).to eq("H2948863") + expect(subject.registrar.id).to eq("") expect(subject.registrar.name).to eq("TLD Registrar Solutions Ltd") - expect(subject.registrar.url).to eq("www.tldregistrarsolutions.com") + expect(subject.registrar.url).to eq("") expect(subject.registrant_contacts).to be_a(Array) expect(subject.registrant_contacts.size).to eq(1) expect(subject.registrant_contacts[0]).to be_a(Whois::Parser::Contact) expect(subject.registrant_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_REGISTRANT) - expect(subject.registrant_contacts[0].id).to eq("ndn-96955") - expect(subject.registrant_contacts[0].name).to eq("Google Inc") - expect(subject.registrant_contacts[0].organization).to eq("Google Inc") - expect(subject.registrant_contacts[0].address).to eq("1600 Amphitheatre Parkway") - expect(subject.registrant_contacts[0].city).to eq("Mountain View") - expect(subject.registrant_contacts[0].zip).to eq("94043") - expect(subject.registrant_contacts[0].state).to eq("Ca") - expect(subject.registrant_contacts[0].country).to eq(nil) - expect(subject.registrant_contacts[0].country_code).to eq("US") - expect(subject.registrant_contacts[0].phone).to eq("+1.6502530000") - expect(subject.registrant_contacts[0].fax).to eq("+1.65067188571") - expect(subject.registrant_contacts[0].email).to eq("dns-admin@google.com") + expect(subject.registrant_contacts[0].email).to eq("https://whois.nic.la/contact/google.la/registrant") expect(subject.admin_contacts).to be_a(Array) expect(subject.admin_contacts.size).to eq(1) expect(subject.admin_contacts[0]).to be_a(Whois::Parser::Contact) expect(subject.admin_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_ADMINISTRATIVE) - expect(subject.admin_contacts[0].id).to eq("ndn-96955") - expect(subject.admin_contacts[0].name).to eq("Google Inc") - expect(subject.admin_contacts[0].organization).to eq("Google Inc") - expect(subject.admin_contacts[0].address).to eq("1600 Amphitheatre Parkway") - expect(subject.admin_contacts[0].city).to eq("Mountain View") - expect(subject.admin_contacts[0].zip).to eq("94043") - expect(subject.admin_contacts[0].state).to eq("Ca") - expect(subject.admin_contacts[0].country).to eq(nil) - expect(subject.admin_contacts[0].country_code).to eq("US") - expect(subject.admin_contacts[0].phone).to eq("+1.6502530000") - expect(subject.admin_contacts[0].fax).to eq("+1.65067188571") - expect(subject.admin_contacts[0].email).to eq("dns-admin@google.com") + expect(subject.admin_contacts[0].email).to eq("https://whois.nic.la/contact/google.la/admin") expect(subject.technical_contacts).to be_a(Array) expect(subject.technical_contacts.size).to eq(1) expect(subject.technical_contacts[0]).to be_a(Whois::Parser::Contact) expect(subject.technical_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_TECHNICAL) - expect(subject.technical_contacts[0].id).to eq("ndn-96955") - expect(subject.technical_contacts[0].name).to eq("Google Inc") - expect(subject.technical_contacts[0].organization).to eq("Google Inc") - expect(subject.technical_contacts[0].address).to eq("1600 Amphitheatre Parkway") - expect(subject.technical_contacts[0].city).to eq("Mountain View") - expect(subject.technical_contacts[0].zip).to eq("94043") - expect(subject.technical_contacts[0].state).to eq("Ca") - expect(subject.technical_contacts[0].country).to eq(nil) - expect(subject.technical_contacts[0].country_code).to eq("US") - expect(subject.technical_contacts[0].phone).to eq("+1.6502530000") - expect(subject.technical_contacts[0].fax).to eq("+1.65067188571") - expect(subject.technical_contacts[0].email).to eq("dns-admin@google.com") + expect(subject.technical_contacts[0].email).to eq("https://whois.nic.la/contact/google.la/tech") expect(subject.nameservers).to be_a(Array) expect(subject.nameservers.size).to eq(4) expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) diff --git a/spec/whois/parsers/responses/whois.centralnic.com/ar.com/status_available_spec.rb b/spec/whois/parsers/responses/whois.nic.online/online/status_available_spec.rb similarity index 50% rename from spec/whois/parsers/responses/whois.centralnic.com/ar.com/status_available_spec.rb rename to spec/whois/parsers/responses/whois.nic.online/online/status_available_spec.rb index 4985ccd8..a45c6ff4 100644 --- a/spec/whois/parsers/responses/whois.centralnic.com/ar.com/status_available_spec.rb +++ b/spec/whois/parsers/responses/whois.nic.online/online/status_available_spec.rb @@ -3,7 +3,7 @@ # This file is autogenerated. Do not edit it manually. # If you want change the content of this file, edit # -# /spec/fixtures/responses/whois.centralnic.com/ar.com/status_available.expected +# /spec/fixtures/responses/whois.nic.online/online/status_available.expected # # and regenerate the tests with the following rake task # @@ -12,19 +12,19 @@ require 'spec_helper' -describe "whois.centralnic.com", :aggregate_failures do +describe "whois.nic.online", :aggregate_failures do subject do - file = fixture("responses", "whois.centralnic.com/ar.com/status_available.txt") - part = Whois::Record::Part.new(body: File.read(file), host: "whois.centralnic.com") + file = fixture("responses", "whois.nic.online/online/status_available.txt") + part = Whois::Record::Part.new(body: File.read(file), host: "whois.nic.online") Whois::Parser.parser_for(part) end it "matches status_available.expected" do - expect(subject.disclaimer).to eq(nil) + expect(subject.disclaimer).to eq("The Whois and RDAP services are provided by CentralNic, and contain information pertaining to Internet domain names registered by our our customers. By using this service you are agreeing (1) not to use any information presented here for any purpose other than determining ownership of domain names, (2) not to store or reproduce this data in any way, (3) not to use any high-volume, automated, electronic processes to obtain data from this service. Abuse of this service is monitored and actions in contravention of these terms will result in being permanently blacklisted. All data is (c) CentralNic Ltd (https://www.centralnic.com) Access to the Whois and RDAP services is rate limited. For more information, visit https://registrar-console.centralnic.com/pub/whois_guidance.") expect(subject.domain).to eq(nil) expect(subject.domain_id).to eq(nil) - expect(subject.status).to eq([]) + expect(subject.status).to eq(:available) expect(subject.available?).to eq(true) expect(subject.registered?).to eq(false) expect(subject.created_on).to eq(nil) diff --git a/spec/whois/parsers/responses/whois.nic.online/online/status_registered_spec.rb b/spec/whois/parsers/responses/whois.nic.online/online/status_registered_spec.rb new file mode 100644 index 00000000..1c9c6689 --- /dev/null +++ b/spec/whois/parsers/responses/whois.nic.online/online/status_registered_spec.rb @@ -0,0 +1,99 @@ +# encoding: utf-8 + +# This file is autogenerated. Do not edit it manually. +# If you want change the content of this file, edit +# +# /spec/fixtures/responses/whois.nic.online/online/status_registered.expected +# +# and regenerate the tests with the following rake task +# +# $ rake spec:generate +# + +require 'spec_helper' + +describe "whois.nic.online", :aggregate_failures do + + subject do + file = fixture("responses", "whois.nic.online/online/status_registered.txt") + part = Whois::Record::Part.new(body: File.read(file), host: "whois.nic.online") + Whois::Parser.parser_for(part) + end + + it "matches status_registered.expected" do + expect(subject.disclaimer).to eq("The Whois and RDAP services are provided by CentralNic, and contain information pertaining to Internet domain names registered by our our customers. By using this service you are agreeing (1) not to use any information presented here for any purpose other than determining ownership of domain names, (2) not to store or reproduce this data in any way, (3) not to use any high-volume, automated, electronic processes to obtain data from this service. Abuse of this service is monitored and actions in contravention of these terms will result in being permanently blacklisted. All data is (c) CentralNic Ltd (https://www.centralnic.com) Access to the Whois and RDAP services is rate limited. For more information, visit https://registrar-console.centralnic.com/pub/whois_guidance.") + expect(subject.domain).to eq("google.online") + expect(subject.domain_id).to eq("D9566483-CNIC") + expect(subject.status).to eq(:registered) + expect(subject.available?).to eq(false) + expect(subject.registered?).to eq(true) + expect(subject.created_on).to be_a(Time) + expect(subject.created_on).to eq(DateTime.parse("2015-08-19 11:27:00 UTC")) + expect(subject.updated_on).to be_a(Time) + expect(subject.updated_on).to eq(DateTime.parse("2021-08-25 01:16:45 UTC")) + expect(subject.expires_on).to be_a(Time) + expect(subject.expires_on).to eq(DateTime.parse("2022-08-19 23:59:59 UTC")) + expect(subject.registrar).to be_a(Whois::Parser::Registrar) + expect(subject.registrar.id).to eq("292") + expect(subject.registrar.name).to eq("MarkMonitor, Inc (TLDs)") + expect(subject.registrar.url).to eq("") + expect(subject.registrant_contacts).to be_a(Array) + expect(subject.registrant_contacts.size).to eq(1) + expect(subject.registrant_contacts[0]).to be_a(Whois::Parser::Contact) + expect(subject.registrant_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_REGISTRANT) + expect(subject.registrant_contacts[0].id).to eq(nil) + expect(subject.registrant_contacts[0].name).to eq(nil) + expect(subject.registrant_contacts[0].organization).to eq("Google LLC") + expect(subject.registrant_contacts[0].address).to eq(nil) + expect(subject.registrant_contacts[0].city).to eq(nil) + expect(subject.registrant_contacts[0].zip).to eq(nil) + expect(subject.registrant_contacts[0].state).to eq("CA") + expect(subject.registrant_contacts[0].country).to eq(nil) + expect(subject.registrant_contacts[0].country_code).to eq("US") + expect(subject.registrant_contacts[0].phone).to eq(nil) + expect(subject.registrant_contacts[0].fax).to eq(nil) + expect(subject.registrant_contacts[0].email).to eq("Please query the RDDS service of the Registrar of Record identified in this output for information on how to contact the Registrant, Admin, or Tech contact of the queried domain name.") + expect(subject.admin_contacts).to be_a(Array) + expect(subject.admin_contacts.size).to eq(1) + expect(subject.admin_contacts[0]).to be_a(Whois::Parser::Contact) + expect(subject.admin_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_ADMINISTRATIVE) + expect(subject.admin_contacts[0].id).to eq(nil) + expect(subject.admin_contacts[0].name).to eq(nil) + expect(subject.admin_contacts[0].organization).to eq(nil) + expect(subject.admin_contacts[0].address).to eq(nil) + expect(subject.admin_contacts[0].city).to eq(nil) + expect(subject.admin_contacts[0].zip).to eq(nil) + expect(subject.admin_contacts[0].state).to eq(nil) + expect(subject.admin_contacts[0].country).to eq(nil) + expect(subject.admin_contacts[0].country_code).to eq(nil) + expect(subject.admin_contacts[0].phone).to eq(nil) + expect(subject.admin_contacts[0].fax).to eq(nil) + expect(subject.admin_contacts[0].email).to eq("Please query the RDDS service of the Registrar of Record identified in this output for information on how to contact the Registrant, Admin, or Tech contact of the queried domain name.") + expect(subject.technical_contacts).to be_a(Array) + expect(subject.technical_contacts.size).to eq(1) + expect(subject.technical_contacts[0]).to be_a(Whois::Parser::Contact) + expect(subject.technical_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_TECHNICAL) + expect(subject.technical_contacts[0].id).to eq(nil) + expect(subject.technical_contacts[0].name).to eq(nil) + expect(subject.technical_contacts[0].organization).to eq(nil) + expect(subject.technical_contacts[0].address).to eq(nil) + expect(subject.technical_contacts[0].city).to eq(nil) + expect(subject.technical_contacts[0].zip).to eq(nil) + expect(subject.technical_contacts[0].state).to eq(nil) + expect(subject.technical_contacts[0].country).to eq(nil) + expect(subject.technical_contacts[0].country_code).to eq(nil) + expect(subject.technical_contacts[0].phone).to eq(nil) + expect(subject.technical_contacts[0].fax).to eq(nil) + expect(subject.technical_contacts[0].email).to eq("Please query the RDDS service of the Registrar of Record identified in this output for information on how to contact the Registrant, Admin, or Tech contact of the queried domain name.") + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers.size).to eq(4) + expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[0].name).to eq("ns3.googledomains.com") + expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[1].name).to eq("ns1.googledomains.com") + expect(subject.nameservers[2]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[2].name).to eq("ns2.googledomains.com") + expect(subject.nameservers[3]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[3].name).to eq("ns4.googledomains.com") + end +end diff --git a/spec/whois/parsers/responses/whois.nic.pw/pw/status_available_spec.rb b/spec/whois/parsers/responses/whois.nic.pw/pw/status_available_spec.rb index e909d4ef..06eeea8f 100644 --- a/spec/whois/parsers/responses/whois.nic.pw/pw/status_available_spec.rb +++ b/spec/whois/parsers/responses/whois.nic.pw/pw/status_available_spec.rb @@ -21,10 +21,10 @@ end it "matches status_available.expected" do - expect(subject.disclaimer).to eq(nil) + expect(subject.disclaimer).to eq("The Whois and RDAP services are provided by CentralNic, and contain information pertaining to Internet domain names registered by our our customers. By using this service you are agreeing (1) not to use any information presented here for any purpose other than determining ownership of domain names, (2) not to store or reproduce this data in any way, (3) not to use any high-volume, automated, electronic processes to obtain data from this service. Abuse of this service is monitored and actions in contravention of these terms will result in being permanently blacklisted. All data is (c) CentralNic Ltd (https://www.centralnic.com) Access to the Whois and RDAP services is rate limited. For more information, visit https://registrar-console.centralnic.com/pub/whois_guidance.") expect(subject.domain).to eq(nil) expect(subject.domain_id).to eq(nil) - expect(subject.status).to eq([]) + expect(subject.status).to eq(:available) expect(subject.available?).to eq(true) expect(subject.registered?).to eq(false) expect(subject.created_on).to eq(nil) diff --git a/spec/whois/parsers/responses/whois.nic.pw/pw/status_registered_spec.rb b/spec/whois/parsers/responses/whois.nic.pw/pw/status_registered_spec.rb index c2a6ba22..4c6b3dad 100644 --- a/spec/whois/parsers/responses/whois.nic.pw/pw/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.nic.pw/pw/status_registered_spec.rb @@ -21,99 +21,38 @@ end it "matches status_registered.expected" do - expect(subject.disclaimer).to eq("This whois service is provided by CentralNic Ltd and only contains information pertaining to Internet domain names we have registered for our customers. By using this service you are agreeing (1) not to use any information presented here for any purpose other than determining ownership of domain names, (2) not to store or reproduce this data in any way, (3) not to use any high-volume, automated, electronic processes to obtain data from this service. Abuse of this service is monitored and actions in contravention of these terms will result in being permanently blacklisted. All data is (c) CentralNic Ltd https://www.centralnic.com/") + expect(subject.disclaimer).to eq("The Whois and RDAP services are provided by CentralNic, and contain information pertaining to Internet domain names registered by our our customers. By using this service you are agreeing (1) not to use any information presented here for any purpose other than determining ownership of domain names, (2) not to store or reproduce this data in any way, (3) not to use any high-volume, automated, electronic processes to obtain data from this service. Abuse of this service is monitored and actions in contravention of these terms will result in being permanently blacklisted. All data is (c) CentralNic Ltd (https://www.centralnic.com) Access to the Whois and RDAP services is rate limited. For more information, visit https://registrar-console.centralnic.com/pub/whois_guidance.") expect(subject.domain).to eq("google.pw") - expect(subject.domain_id).to eq("CNIC-DO949924") - expect(subject.status).to eq(["clientTransferProhibited", "clientUpdateProhibited", "clientDeleteProhibited", "serverTransferProhibited"]) + expect(subject.domain_id).to eq("D949924-CNIC") + expect(subject.status).to eq(:registered) expect(subject.available?).to eq(false) expect(subject.registered?).to eq(true) expect(subject.created_on).to be_a(Time) expect(subject.created_on).to eq(DateTime.parse("2012-10-12 10:19:46 UTC")) expect(subject.updated_on).to be_a(Time) - expect(subject.updated_on).to eq(DateTime.parse("2014-01-18 00:13:36 UTC")) + expect(subject.updated_on).to eq(DateTime.parse("2021-02-04 15:18:38 UTC")) expect(subject.expires_on).to be_a(Time) - expect(subject.expires_on).to eq(DateTime.parse("2017-02-10 23:59:59 UTC")) + expect(subject.expires_on).to eq(DateTime.parse("2022-02-10 23:59:59 UTC")) expect(subject.registrar).to be_a(Whois::Parser::Registrar) - expect(subject.registrar.id).to eq("7061-EM") + expect(subject.registrar.id).to eq("292") expect(subject.registrar.name).to eq("MarkMonitor, Inc.") - expect(subject.registrar.url).to eq("http://www.markmonitor.com/") + expect(subject.registrar.url).to eq("") expect(subject.registrant_contacts).to be_a(Array) expect(subject.registrant_contacts.size).to eq(1) expect(subject.registrant_contacts[0]).to be_a(Whois::Parser::Contact) expect(subject.registrant_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_REGISTRANT) - expect(subject.registrant_contacts[0].id).to eq("H2396041") - expect(subject.registrant_contacts[0].name).to eq("DNS Admin - Google Inc") - expect(subject.registrant_contacts[0].organization).to eq("Google Inc") - expect(subject.registrant_contacts[0].address).to eq("1600 Amphitheatre Parkway") - expect(subject.registrant_contacts[0].city).to eq("Mountain View") - expect(subject.registrant_contacts[0].zip).to eq("94043") - expect(subject.registrant_contacts[0].state).to eq("CA") - expect(subject.registrant_contacts[0].country).to eq(nil) - expect(subject.registrant_contacts[0].country_code).to eq("US") - expect(subject.registrant_contacts[0].phone).to eq("+1.6502530000") - expect(subject.registrant_contacts[0].fax).to eq("+1.6502530001") - expect(subject.registrant_contacts[0].email).to eq("dns-admin@google.com") + expect(subject.registrant_contacts[0].email).to eq("https://whois.nic.pw/contact/google.pw/registrant") expect(subject.admin_contacts).to be_a(Array) expect(subject.admin_contacts.size).to eq(1) expect(subject.admin_contacts[0]).to be_a(Whois::Parser::Contact) expect(subject.admin_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_ADMINISTRATIVE) - expect(subject.admin_contacts[0].id).to eq("H2396041") - expect(subject.admin_contacts[0].name).to eq("DNS Admin - Google Inc") - expect(subject.admin_contacts[0].organization).to eq("Google Inc") - expect(subject.admin_contacts[0].address).to eq("1600 Amphitheatre Parkway") - expect(subject.admin_contacts[0].city).to eq("Mountain View") - expect(subject.admin_contacts[0].zip).to eq("94043") - expect(subject.admin_contacts[0].state).to eq("CA") - expect(subject.admin_contacts[0].country).to eq(nil) - expect(subject.admin_contacts[0].country_code).to eq("US") - expect(subject.admin_contacts[0].phone).to eq("+1.6502530000") - expect(subject.admin_contacts[0].fax).to eq("+1.6502530001") - expect(subject.admin_contacts[0].email).to eq("dns-admin@google.com") + expect(subject.admin_contacts[0].email).to eq("https://whois.nic.pw/contact/google.pw/admin") expect(subject.technical_contacts).to be_a(Array) expect(subject.technical_contacts.size).to eq(1) expect(subject.technical_contacts[0]).to be_a(Whois::Parser::Contact) expect(subject.technical_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_TECHNICAL) - expect(subject.technical_contacts[0].id).to eq("H2396041") - expect(subject.technical_contacts[0].name).to eq("DNS Admin - Google Inc") - expect(subject.technical_contacts[0].organization).to eq("Google Inc") - expect(subject.technical_contacts[0].address).to eq("1600 Amphitheatre Parkway") - expect(subject.technical_contacts[0].city).to eq("Mountain View") - expect(subject.technical_contacts[0].zip).to eq("94043") - expect(subject.technical_contacts[0].state).to eq("CA") - expect(subject.technical_contacts[0].country).to eq(nil) - expect(subject.technical_contacts[0].country_code).to eq("US") - expect(subject.technical_contacts[0].phone).to eq("+1.6502530000") - expect(subject.technical_contacts[0].fax).to eq("+1.6502530001") - expect(subject.technical_contacts[0].email).to eq("dns-admin@google.com") + expect(subject.technical_contacts[0].email).to eq("https://whois.nic.pw/contact/google.pw/tech") expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers.size).to eq(7) - expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[0].name).to eq("ns1.markmonitor.com") - expect(subject.nameservers[0].ipv4).to eq(nil) - expect(subject.nameservers[0].ipv6).to eq(nil) - expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[1].name).to eq("ns2.markmonitor.com") - expect(subject.nameservers[1].ipv4).to eq(nil) - expect(subject.nameservers[1].ipv6).to eq(nil) - expect(subject.nameservers[2]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[2].name).to eq("ns3.markmonitor.com") - expect(subject.nameservers[2].ipv4).to eq(nil) - expect(subject.nameservers[2].ipv6).to eq(nil) - expect(subject.nameservers[3]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[3].name).to eq("ns4.markmonitor.com") - expect(subject.nameservers[3].ipv4).to eq(nil) - expect(subject.nameservers[3].ipv6).to eq(nil) - expect(subject.nameservers[4]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[4].name).to eq("ns5.markmonitor.com") - expect(subject.nameservers[4].ipv4).to eq(nil) - expect(subject.nameservers[4].ipv6).to eq(nil) - expect(subject.nameservers[5]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[5].name).to eq("ns6.markmonitor.com") - expect(subject.nameservers[5].ipv4).to eq(nil) - expect(subject.nameservers[5].ipv6).to eq(nil) - expect(subject.nameservers[6]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[6].name).to eq("ns7.markmonitor.com") - expect(subject.nameservers[6].ipv4).to eq(nil) - expect(subject.nameservers[6].ipv6).to eq(nil) + expect(subject.nameservers.size).to eq(0) end end diff --git a/spec/whois/parsers/responses/whois.nic.space/space/status_available_spec.rb b/spec/whois/parsers/responses/whois.nic.space/space/status_available_spec.rb index d1f369d3..9b31c8e7 100644 --- a/spec/whois/parsers/responses/whois.nic.space/space/status_available_spec.rb +++ b/spec/whois/parsers/responses/whois.nic.space/space/status_available_spec.rb @@ -21,10 +21,10 @@ end it "matches status_available.expected" do - expect(subject.disclaimer).to eq(nil) + expect(subject.disclaimer).to eq("The Whois and RDAP services are provided by CentralNic, and contain information pertaining to Internet domain names registered by our our customers. By using this service you are agreeing (1) not to use any information presented here for any purpose other than determining ownership of domain names, (2) not to store or reproduce this data in any way, (3) not to use any high-volume, automated, electronic processes to obtain data from this service. Abuse of this service is monitored and actions in contravention of these terms will result in being permanently blacklisted. All data is (c) CentralNic Ltd (https://www.centralnic.com) Access to the Whois and RDAP services is rate limited. For more information, visit https://registrar-console.centralnic.com/pub/whois_guidance.") expect(subject.domain).to eq(nil) expect(subject.domain_id).to eq(nil) - expect(subject.status).to eq([]) + expect(subject.status).to eq(:available) expect(subject.available?).to eq(true) expect(subject.registered?).to eq(false) expect(subject.created_on).to eq(nil) diff --git a/spec/whois/parsers/responses/whois.nic.space/space/status_registered_spec.rb b/spec/whois/parsers/responses/whois.nic.space/space/status_registered_spec.rb index 28f97da6..f10656ac 100644 --- a/spec/whois/parsers/responses/whois.nic.space/space/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.nic.space/space/status_registered_spec.rb @@ -21,89 +21,76 @@ end it "matches status_registered.expected" do - expect(subject.disclaimer).to eq("Access to the whois service is rate limited. For more information, please see https://registrar-console.centralnic.com/pub/whois_guidance.") + expect(subject.disclaimer).to eq("The Whois and RDAP services are provided by CentralNic, and contain information pertaining to Internet domain names registered by our our customers. By using this service you are agreeing (1) not to use any information presented here for any purpose other than determining ownership of domain names, (2) not to store or reproduce this data in any way, (3) not to use any high-volume, automated, electronic processes to obtain data from this service. Abuse of this service is monitored and actions in contravention of these terms will result in being permanently blacklisted. All data is (c) CentralNic Ltd (https://www.centralnic.com) Access to the Whois and RDAP services is rate limited. For more information, visit https://registrar-console.centralnic.com/pub/whois_guidance.") expect(subject.domain).to eq("nic.space") expect(subject.domain_id).to eq("D2361836-CNIC") - expect(subject.status).to eq(["ok https://icann.org/epp#ok"]) + expect(subject.status).to eq(:registered) expect(subject.available?).to eq(false) expect(subject.registered?).to eq(true) expect(subject.created_on).to be_a(Time) - expect(subject.created_on).to eq(DateTime.parse("2014-04-10T09:14:07.0Z")) + expect(subject.created_on).to eq(DateTime.parse("2014-04-10 09:14:07 UTC")) expect(subject.updated_on).to be_a(Time) - expect(subject.updated_on).to eq(DateTime.parse("2015-04-04T00:14:21.0Z")) + expect(subject.updated_on).to eq(DateTime.parse("2021-06-01 11:38:04 UTC")) expect(subject.expires_on).to be_a(Time) - expect(subject.expires_on).to eq(DateTime.parse("2016-04-10T23:59:59.0Z")) + expect(subject.expires_on).to eq(DateTime.parse("2022-04-10 23:59:59 UTC")) expect(subject.registrar).to be_a(Whois::Parser::Registrar) expect(subject.registrar.id).to eq("9999") expect(subject.registrar.name).to eq("CentralNic Ltd") - expect(subject.registrar.url).to eq(nil) + expect(subject.registrar.url).to eq("https://www.centralnic.com/") expect(subject.registrant_contacts).to be_a(Array) expect(subject.registrant_contacts.size).to eq(1) expect(subject.registrant_contacts[0]).to be_a(Whois::Parser::Contact) expect(subject.registrant_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_REGISTRANT) - expect(subject.registrant_contacts[0].id).to eq("C11480") + expect(subject.registrant_contacts[0].id).to eq(nil) expect(subject.registrant_contacts[0].name).to eq("Domain Administrator") expect(subject.registrant_contacts[0].organization).to eq("CentralNic Ltd") expect(subject.registrant_contacts[0].address).to eq("35-39 Moorgate") expect(subject.registrant_contacts[0].city).to eq("London") expect(subject.registrant_contacts[0].zip).to eq("EC2R 6AR") expect(subject.registrant_contacts[0].state).to eq("") - expect(subject.registrant_contacts[0].country).to eq(nil) expect(subject.registrant_contacts[0].country_code).to eq("GB") expect(subject.registrant_contacts[0].phone).to eq("+44.2033880600") expect(subject.registrant_contacts[0].fax).to eq("+44.2033880601") expect(subject.registrant_contacts[0].email).to eq("domains@centralnic.com") - expect(subject.registrant_contacts[0].created_on).to eq(nil) - expect(subject.registrant_contacts[0].updated_on).to eq(nil) expect(subject.admin_contacts).to be_a(Array) expect(subject.admin_contacts.size).to eq(1) expect(subject.admin_contacts[0]).to be_a(Whois::Parser::Contact) expect(subject.admin_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_ADMINISTRATIVE) - expect(subject.admin_contacts[0].id).to eq("C11480") + expect(subject.admin_contacts[0].id).to eq(nil) expect(subject.admin_contacts[0].name).to eq("Domain Administrator") expect(subject.admin_contacts[0].organization).to eq("CentralNic Ltd") expect(subject.admin_contacts[0].address).to eq("35-39 Moorgate") expect(subject.admin_contacts[0].city).to eq("London") expect(subject.admin_contacts[0].zip).to eq("EC2R 6AR") expect(subject.admin_contacts[0].state).to eq("") - expect(subject.admin_contacts[0].country).to eq(nil) expect(subject.admin_contacts[0].country_code).to eq("GB") expect(subject.admin_contacts[0].phone).to eq("+44.2033880600") expect(subject.admin_contacts[0].fax).to eq("+44.2033880601") expect(subject.admin_contacts[0].email).to eq("domains@centralnic.com") - expect(subject.admin_contacts[0].created_on).to eq(nil) - expect(subject.admin_contacts[0].updated_on).to eq(nil) expect(subject.technical_contacts).to be_a(Array) expect(subject.technical_contacts.size).to eq(1) expect(subject.technical_contacts[0]).to be_a(Whois::Parser::Contact) expect(subject.technical_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_TECHNICAL) - expect(subject.technical_contacts[0].id).to eq("C11480") + expect(subject.technical_contacts[0].id).to eq(nil) expect(subject.technical_contacts[0].name).to eq("Domain Administrator") expect(subject.technical_contacts[0].organization).to eq("CentralNic Ltd") expect(subject.technical_contacts[0].address).to eq("35-39 Moorgate") expect(subject.technical_contacts[0].city).to eq("London") expect(subject.technical_contacts[0].zip).to eq("EC2R 6AR") expect(subject.technical_contacts[0].state).to eq("") - expect(subject.technical_contacts[0].country).to eq(nil) expect(subject.technical_contacts[0].country_code).to eq("GB") expect(subject.technical_contacts[0].phone).to eq("+44.2033880600") expect(subject.technical_contacts[0].fax).to eq("+44.2033880601") expect(subject.technical_contacts[0].email).to eq("domains@centralnic.com") - expect(subject.technical_contacts[0].created_on).to eq(nil) - expect(subject.technical_contacts[0].updated_on).to eq(nil) expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers.size).to eq(6) + expect(subject.nameservers.size).to eq(4) expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[0].name).to eq("ns0.centralnic-dns.com") + expect(subject.nameservers[0].name).to eq("a.nic.space") expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[1].name).to eq("ns1.centralnic-dns.com") + expect(subject.nameservers[1].name).to eq("b.nic.space") expect(subject.nameservers[2]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[2].name).to eq("ns2.centralnic-dns.com") + expect(subject.nameservers[2].name).to eq("e.nic.space") expect(subject.nameservers[3]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[3].name).to eq("ns3.centralnic-dns.com") - expect(subject.nameservers[4]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[4].name).to eq("ns4.centralnic-dns.com") - expect(subject.nameservers[5]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[5].name).to eq("ns5.centralnic-dns.com") + expect(subject.nameservers[3].name).to eq("f.nic.space") end end diff --git a/spec/whois/parsers/responses/whois.nic.tech/tech/status_available_spec.rb b/spec/whois/parsers/responses/whois.nic.tech/tech/status_available_spec.rb index 005f0eb7..d4ffc31f 100644 --- a/spec/whois/parsers/responses/whois.nic.tech/tech/status_available_spec.rb +++ b/spec/whois/parsers/responses/whois.nic.tech/tech/status_available_spec.rb @@ -21,10 +21,10 @@ end it "matches status_available.expected" do - expect(subject.disclaimer).to eq(nil) + expect(subject.disclaimer).to eq("The Whois and RDAP services are provided by CentralNic, and contain information pertaining to Internet domain names registered by our our customers. By using this service you are agreeing (1) not to use any information presented here for any purpose other than determining ownership of domain names, (2) not to store or reproduce this data in any way, (3) not to use any high-volume, automated, electronic processes to obtain data from this service. Abuse of this service is monitored and actions in contravention of these terms will result in being permanently blacklisted. All data is (c) CentralNic Ltd (https://www.centralnic.com) Access to the Whois and RDAP services is rate limited. For more information, visit https://registrar-console.centralnic.com/pub/whois_guidance.") expect(subject.domain).to eq(nil) expect(subject.domain_id).to eq(nil) - expect(subject.status).to eq([]) + expect(subject.status).to eq(:available) expect(subject.available?).to eq(true) expect(subject.registered?).to eq(false) expect(subject.created_on).to eq(nil) diff --git a/spec/whois/parsers/responses/whois.nic.tech/tech/status_registered_spec.rb b/spec/whois/parsers/responses/whois.nic.tech/tech/status_registered_spec.rb index 3f677aca..d6538afd 100644 --- a/spec/whois/parsers/responses/whois.nic.tech/tech/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.nic.tech/tech/status_registered_spec.rb @@ -21,70 +21,48 @@ end it "matches status_registered.expected" do - expect(subject.disclaimer).to eq("Access to the whois service is rate limited. For more information, please see https://registrar-console.centralnic.com/pub/whois_guidance.") + expect(subject.disclaimer).to eq("The Whois and RDAP services are provided by CentralNic, and contain information pertaining to Internet domain names registered by our our customers. By using this service you are agreeing (1) not to use any information presented here for any purpose other than determining ownership of domain names, (2) not to store or reproduce this data in any way, (3) not to use any high-volume, automated, electronic processes to obtain data from this service. Abuse of this service is monitored and actions in contravention of these terms will result in being permanently blacklisted. All data is (c) CentralNic Ltd (https://www.centralnic.com) Access to the Whois and RDAP services is rate limited. For more information, visit https://registrar-console.centralnic.com/pub/whois_guidance.") expect(subject.domain).to eq("google.tech") expect(subject.domain_id).to eq("D9157622-CNIC") - expect(subject.status).to eq(["serverTransferProhibited https://icann.org/epp#serverTransferProhibited", "clientTransferProhibited https://icann.org/epp#clientTransferProhibited", "clientUpdateProhibited https://icann.org/epp#clientUpdateProhibited", "clientDeleteProhibited https://icann.org/epp#clientDeleteProhibited"]) + expect(subject.status).to eq(:registered) expect(subject.available?).to eq(false) expect(subject.registered?).to eq(true) expect(subject.created_on).to be_a(Time) - expect(subject.created_on).to eq(DateTime.parse("2015-07-29 00:00:00 UTC")) + expect(subject.created_on).to eq(DateTime.parse("2015-07-29 14:20:05 UTC")) expect(subject.updated_on).to be_a(Time) - expect(subject.updated_on).to eq(DateTime.parse("2015-08-04 09:00:43 UTC")) + expect(subject.updated_on).to eq(DateTime.parse("2021-08-25 01:16:43 UTC")) expect(subject.expires_on).to be_a(Time) - expect(subject.expires_on).to eq(DateTime.parse("2017-07-29 23:59:59 UTC")) + expect(subject.expires_on).to eq(DateTime.parse("2022-07-29 23:59:59 UTC")) expect(subject.registrar).to be_a(Whois::Parser::Registrar) expect(subject.registrar.id).to eq("292") expect(subject.registrar.name).to eq("MarkMonitor, Inc (TLDs)") - expect(subject.registrar.url).to eq(nil) + expect(subject.registrar.url).to eq("") expect(subject.registrant_contacts).to be_a(Array) expect(subject.registrant_contacts.size).to eq(1) expect(subject.registrant_contacts[0]).to be_a(Whois::Parser::Contact) expect(subject.registrant_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_REGISTRANT) - expect(subject.registrant_contacts[0].id).to eq("mmr-87489") - expect(subject.registrant_contacts[0].name).to eq("DNS Admin") - expect(subject.registrant_contacts[0].organization).to eq("Google Inc.") - expect(subject.registrant_contacts[0].address).to eq("1600 Amphitheatre Parkway") - expect(subject.registrant_contacts[0].city).to eq("Mountain View") - expect(subject.registrant_contacts[0].zip).to eq("94043") + expect(subject.registrant_contacts[0].id).to eq(nil) + expect(subject.registrant_contacts[0].name).to eq(nil) + expect(subject.registrant_contacts[0].organization).to eq("Google LLC") + expect(subject.registrant_contacts[0].address).to eq(nil) + expect(subject.registrant_contacts[0].city).to eq(nil) + expect(subject.registrant_contacts[0].zip).to eq(nil) expect(subject.registrant_contacts[0].state).to eq("CA") expect(subject.registrant_contacts[0].country).to eq(nil) expect(subject.registrant_contacts[0].country_code).to eq("US") - expect(subject.registrant_contacts[0].phone).to eq("+1.6502530000") - expect(subject.registrant_contacts[0].fax).to eq("+1.6502530001") - expect(subject.registrant_contacts[0].email).to eq("dns-admin@google.com") + expect(subject.registrant_contacts[0].phone).to eq(nil) + expect(subject.registrant_contacts[0].fax).to eq(nil) + expect(subject.registrant_contacts[0].email).to eq("Please query the RDDS service of the Registrar of Record identified in this output for information on how to contact the Registrant, Admin, or Tech contact of the queried domain name.") expect(subject.admin_contacts).to be_a(Array) expect(subject.admin_contacts.size).to eq(1) expect(subject.admin_contacts[0]).to be_a(Whois::Parser::Contact) expect(subject.admin_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_ADMINISTRATIVE) - expect(subject.admin_contacts[0].id).to eq("mmr-87489") - expect(subject.admin_contacts[0].name).to eq("DNS Admin") - expect(subject.admin_contacts[0].organization).to eq("Google Inc.") - expect(subject.admin_contacts[0].address).to eq("1600 Amphitheatre Parkway") - expect(subject.admin_contacts[0].city).to eq("Mountain View") - expect(subject.admin_contacts[0].zip).to eq("94043") - expect(subject.admin_contacts[0].state).to eq("CA") - expect(subject.admin_contacts[0].country).to eq(nil) - expect(subject.admin_contacts[0].country_code).to eq("US") - expect(subject.admin_contacts[0].phone).to eq("+1.6502530000") - expect(subject.admin_contacts[0].fax).to eq("+1.6502530001") - expect(subject.admin_contacts[0].email).to eq("dns-admin@google.com") + expect(subject.admin_contacts[0].email).to eq("Please query the RDDS service of the Registrar of Record identified in this output for information on how to contact the Registrant, Admin, or Tech contact of the queried domain name.") expect(subject.technical_contacts).to be_a(Array) expect(subject.technical_contacts.size).to eq(1) expect(subject.technical_contacts[0]).to be_a(Whois::Parser::Contact) expect(subject.technical_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_TECHNICAL) - expect(subject.technical_contacts[0].id).to eq("mmr-87489") - expect(subject.technical_contacts[0].name).to eq("DNS Admin") - expect(subject.technical_contacts[0].organization).to eq("Google Inc.") - expect(subject.technical_contacts[0].address).to eq("1600 Amphitheatre Parkway") - expect(subject.technical_contacts[0].city).to eq("Mountain View") - expect(subject.technical_contacts[0].zip).to eq("94043") - expect(subject.technical_contacts[0].state).to eq("CA") - expect(subject.technical_contacts[0].country).to eq(nil) - expect(subject.technical_contacts[0].country_code).to eq("US") - expect(subject.technical_contacts[0].phone).to eq("+1.6502530000") - expect(subject.technical_contacts[0].fax).to eq("+1.6502530001") - expect(subject.technical_contacts[0].email).to eq("dns-admin@google.com") + expect(subject.technical_contacts[0].email).to eq("Please query the RDDS service of the Registrar of Record identified in this output for information on how to contact the Registrant, Admin, or Tech contact of the queried domain name.") expect(subject.nameservers).to be_a(Array) expect(subject.nameservers.size).to eq(4) expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) diff --git a/spec/whois/parsers/responses/whois.nic.xyz/xyz/status_available_spec.rb b/spec/whois/parsers/responses/whois.nic.xyz/xyz/status_available_spec.rb index c1d1d0b6..cf475a73 100644 --- a/spec/whois/parsers/responses/whois.nic.xyz/xyz/status_available_spec.rb +++ b/spec/whois/parsers/responses/whois.nic.xyz/xyz/status_available_spec.rb @@ -21,10 +21,10 @@ end it "matches status_available.expected" do - expect(subject.disclaimer).to eq(nil) + expect(subject.disclaimer).to eq("The Whois and RDAP services are provided by CentralNic, and contain information pertaining to Internet domain names registered by our our customers. By using this service you are agreeing (1) not to use any information presented here for any purpose other than determining ownership of domain names, (2) not to store or reproduce this data in any way, (3) not to use any high-volume, automated, electronic processes to obtain data from this service. Abuse of this service is monitored and actions in contravention of these terms will result in being permanently blacklisted. All data is (c) CentralNic Ltd (https://www.centralnic.com) Access to the Whois and RDAP services is rate limited. For more information, visit https://registrar-console.centralnic.com/pub/whois_guidance.") expect(subject.domain).to eq(nil) expect(subject.domain_id).to eq(nil) - expect(subject.status).to eq([]) + expect(subject.status).to eq(:available) expect(subject.available?).to eq(true) expect(subject.registered?).to eq(false) expect(subject.created_on).to eq(nil) diff --git a/spec/whois/parsers/responses/whois.nic.xyz/xyz/status_registered_spec.rb b/spec/whois/parsers/responses/whois.nic.xyz/xyz/status_registered_spec.rb index 41bfefd3..171fdacf 100644 --- a/spec/whois/parsers/responses/whois.nic.xyz/xyz/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.nic.xyz/xyz/status_registered_spec.rb @@ -21,96 +21,57 @@ end it "matches status_registered.expected" do - expect(subject.disclaimer).to eq("Access to the whois service is rate limited. For more information, please see https://registrar-console.centralnic.com/pub/whois_guidance.") + expect(subject.disclaimer).to eq("The Whois and RDAP services are provided by CentralNic, and contain information pertaining to Internet domain names registered by our our customers. By using this service you are agreeing (1) not to use any information presented here for any purpose other than determining ownership of domain names, (2) not to store or reproduce this data in any way, (3) not to use any high-volume, automated, electronic processes to obtain data from this service. Abuse of this service is monitored and actions in contravention of these terms will result in being permanently blacklisted. All data is (c) CentralNic Ltd (https://www.centralnic.com) Access to the Whois and RDAP services is rate limited. For more information, visit https://registrar-console.centralnic.com/pub/whois_guidance.") expect(subject.domain).to eq("abc.xyz") expect(subject.domain_id).to eq("D2192285-CNIC") - expect(subject.status).to eq(["clientTransferProhibited https://icann.org/epp#clientTransferProhibited", "clientUpdateProhibited https://icann.org/epp#clientUpdateProhibited", "clientDeleteProhibited https://icann.org/epp#clientDeleteProhibited"]) + expect(subject.status).to eq(:registered) expect(subject.available?).to eq(false) expect(subject.registered?).to eq(true) expect(subject.created_on).to be_a(Time) expect(subject.created_on).to eq(DateTime.parse("2014-03-20 12:59:17 UTC")) expect(subject.updated_on).to be_a(Time) - expect(subject.updated_on).to eq(DateTime.parse("2015-08-18 15:09:36 UTC")) + expect(subject.updated_on).to eq(DateTime.parse("2018-04-23 22:02:32 UTC")) expect(subject.expires_on).to be_a(Time) expect(subject.expires_on).to eq(DateTime.parse("2025-03-20 23:59:59 UTC")) expect(subject.registrar).to be_a(Whois::Parser::Registrar) expect(subject.registrar.id).to eq("292") expect(subject.registrar.name).to eq("MarkMonitor, Inc (TLDs)") - expect(subject.registrar.url).to eq(nil) + expect(subject.registrar.url).to eq("") expect(subject.registrant_contacts).to be_a(Array) expect(subject.registrant_contacts.size).to eq(1) expect(subject.registrant_contacts[0]).to be_a(Whois::Parser::Contact) expect(subject.registrant_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_REGISTRANT) - expect(subject.registrant_contacts[0].id).to eq("mmr-87489") - expect(subject.registrant_contacts[0].name).to eq("DNS Admin") - expect(subject.registrant_contacts[0].organization).to eq("Google Inc.") - expect(subject.registrant_contacts[0].address).to eq("1600 Amphitheatre Parkway") - expect(subject.registrant_contacts[0].city).to eq("Mountain View") - expect(subject.registrant_contacts[0].zip).to eq("94043") + expect(subject.registrant_contacts[0].id).to eq(nil) + expect(subject.registrant_contacts[0].name).to eq(nil) + expect(subject.registrant_contacts[0].organization).to eq("Google LLC") + expect(subject.registrant_contacts[0].address).to eq(nil) + expect(subject.registrant_contacts[0].city).to eq(nil) + expect(subject.registrant_contacts[0].zip).to eq(nil) expect(subject.registrant_contacts[0].state).to eq("CA") expect(subject.registrant_contacts[0].country).to eq(nil) expect(subject.registrant_contacts[0].country_code).to eq("US") - expect(subject.registrant_contacts[0].phone).to eq("+1.6502530000") - expect(subject.registrant_contacts[0].fax).to eq("+1.6502530001") - expect(subject.registrant_contacts[0].email).to eq("dns-admin@google.com") - expect(subject.registrant_contacts[0].url).to eq(nil) - expect(subject.registrant_contacts[0].created_on).to eq(nil) - expect(subject.registrant_contacts[0].updated_on).to eq(nil) + expect(subject.registrant_contacts[0].phone).to eq(nil) + expect(subject.registrant_contacts[0].fax).to eq(nil) + expect(subject.registrant_contacts[0].email).to eq("Please query the RDDS service of the Registrar of Record identified in this output for information on how to contact the Registrant, Admin, or Tech contact of the queried domain name.") expect(subject.admin_contacts).to be_a(Array) expect(subject.admin_contacts.size).to eq(1) expect(subject.admin_contacts[0]).to be_a(Whois::Parser::Contact) expect(subject.admin_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_ADMINISTRATIVE) - expect(subject.admin_contacts[0].id).to eq("mmr-87489") - expect(subject.admin_contacts[0].name).to eq("DNS Admin") - expect(subject.admin_contacts[0].organization).to eq("Google Inc.") - expect(subject.admin_contacts[0].address).to eq("1600 Amphitheatre Parkway") - expect(subject.admin_contacts[0].city).to eq("Mountain View") - expect(subject.admin_contacts[0].zip).to eq("94043") - expect(subject.admin_contacts[0].state).to eq("CA") - expect(subject.admin_contacts[0].country).to eq(nil) - expect(subject.admin_contacts[0].country_code).to eq("US") - expect(subject.admin_contacts[0].phone).to eq("+1.6502530000") - expect(subject.admin_contacts[0].fax).to eq("+1.6502530001") - expect(subject.admin_contacts[0].email).to eq("dns-admin@google.com") - expect(subject.admin_contacts[0].url).to eq(nil) - expect(subject.admin_contacts[0].created_on).to eq(nil) - expect(subject.admin_contacts[0].updated_on).to eq(nil) + expect(subject.admin_contacts[0].email).to eq("Please query the RDDS service of the Registrar of Record identified in this output for information on how to contact the Registrant, Admin, or Tech contact of the queried domain name.") expect(subject.technical_contacts).to be_a(Array) expect(subject.technical_contacts.size).to eq(1) expect(subject.technical_contacts[0]).to be_a(Whois::Parser::Contact) expect(subject.technical_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_TECHNICAL) - expect(subject.technical_contacts[0].id).to eq("mmr-87489") - expect(subject.technical_contacts[0].name).to eq("DNS Admin") - expect(subject.technical_contacts[0].organization).to eq("Google Inc.") - expect(subject.technical_contacts[0].address).to eq("1600 Amphitheatre Parkway") - expect(subject.technical_contacts[0].city).to eq("Mountain View") - expect(subject.technical_contacts[0].zip).to eq("94043") - expect(subject.technical_contacts[0].state).to eq("CA") - expect(subject.technical_contacts[0].country).to eq(nil) - expect(subject.technical_contacts[0].country_code).to eq("US") - expect(subject.technical_contacts[0].phone).to eq("+1.6502530000") - expect(subject.technical_contacts[0].fax).to eq("+1.6502530001") - expect(subject.technical_contacts[0].email).to eq("dns-admin@google.com") - expect(subject.technical_contacts[0].url).to eq(nil) - expect(subject.technical_contacts[0].created_on).to eq(nil) - expect(subject.technical_contacts[0].updated_on).to eq(nil) + expect(subject.technical_contacts[0].email).to eq("Please query the RDDS service of the Registrar of Record identified in this output for information on how to contact the Registrant, Admin, or Tech contact of the queried domain name.") expect(subject.nameservers).to be_a(Array) expect(subject.nameservers.size).to eq(4) expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) expect(subject.nameservers[0].name).to eq("ns2.google.com") - expect(subject.nameservers[0].ipv4).to eq(nil) - expect(subject.nameservers[0].ipv6).to eq(nil) expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) expect(subject.nameservers[1].name).to eq("ns4.google.com") - expect(subject.nameservers[1].ipv4).to eq(nil) - expect(subject.nameservers[1].ipv6).to eq(nil) expect(subject.nameservers[2]).to be_a(Whois::Parser::Nameserver) expect(subject.nameservers[2].name).to eq("ns3.google.com") - expect(subject.nameservers[2].ipv4).to eq(nil) - expect(subject.nameservers[2].ipv6).to eq(nil) expect(subject.nameservers[3]).to be_a(Whois::Parser::Nameserver) expect(subject.nameservers[3].name).to eq("ns1.google.com") - expect(subject.nameservers[3].ipv4).to eq(nil) - expect(subject.nameservers[3].ipv6).to eq(nil) end end diff --git a/spec/whois/parsers/responses/whois.pairnic.com/status_registered_spec.rb b/spec/whois/parsers/responses/whois.pairnic.com/status_registered_spec.rb index ccca01c9..df0d4fb4 100644 --- a/spec/whois/parsers/responses/whois.pairnic.com/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.pairnic.com/status_registered_spec.rb @@ -48,9 +48,9 @@ expect(subject.registrant_contacts[0].zip).to eq("15203") expect(subject.registrant_contacts[0].state).to eq("PA") expect(subject.registrant_contacts[0].country_code).to eq("US") - expect(subject.registrant_contacts[0].phone).to eq("") - expect(subject.registrant_contacts[0].fax).to eq("") - expect(subject.registrant_contacts[0].email).to eq("") + expect(subject.registrant_contacts[0].phone).to eq(nil) + expect(subject.registrant_contacts[0].fax).to eq(nil) + expect(subject.registrant_contacts[0].email).to eq(nil) expect(subject.admin_contacts).to be_a(Array) expect(subject.admin_contacts.size).to eq(1) expect(subject.admin_contacts[0]).to be_a(Whois::Parser::Contact) diff --git a/spec/whois/parsers/responses/whois.pandi.or.id/id/status_available_spec.rb b/spec/whois/parsers/responses/whois.pandi.or.id/id/status_available_spec.rb deleted file mode 100644 index 11b2aab2..00000000 --- a/spec/whois/parsers/responses/whois.pandi.or.id/id/status_available_spec.rb +++ /dev/null @@ -1,43 +0,0 @@ -# encoding: utf-8 - -# This file is autogenerated. Do not edit it manually. -# If you want change the content of this file, edit -# -# /spec/fixtures/responses/whois.pandi.or.id/id/status_available.expected -# -# and regenerate the tests with the following rake task -# -# $ rake spec:generate -# - -require 'spec_helper' - -describe "whois.pandi.or.id", :aggregate_failures do - - subject do - file = fixture("responses", "whois.pandi.or.id/id/status_available.txt") - part = Whois::Record::Part.new(body: File.read(file), host: "whois.pandi.or.id") - Whois::Parser.parser_for(part) - end - - it "matches status_available.expected" do - expect(subject.disclaimer).to eq(nil) - expect(subject.domain).to eq(nil) - expect(subject.domain_id).to eq(nil) - expect(subject.status).to eq([]) - expect(subject.available?).to eq(true) - expect(subject.registered?).to eq(false) - expect(subject.created_on).to eq(nil) - expect(subject.updated_on).to eq(nil) - expect(subject.expires_on).to eq(nil) - expect(subject.registrar).to eq(nil) - expect(subject.registrant_contacts).to be_a(Array) - expect(subject.registrant_contacts).to eq([]) - expect(subject.admin_contacts).to be_a(Array) - expect(subject.admin_contacts).to eq([]) - expect(subject.technical_contacts).to be_a(Array) - expect(subject.technical_contacts).to eq([]) - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers).to eq([]) - end -end diff --git a/spec/whois/parsers/responses/whois.pandi.or.id/id/status_registered_spec.rb b/spec/whois/parsers/responses/whois.pandi.or.id/id/status_registered_spec.rb deleted file mode 100644 index d20daca0..00000000 --- a/spec/whois/parsers/responses/whois.pandi.or.id/id/status_registered_spec.rb +++ /dev/null @@ -1,107 +0,0 @@ -# encoding: utf-8 - -# This file is autogenerated. Do not edit it manually. -# If you want change the content of this file, edit -# -# /spec/fixtures/responses/whois.pandi.or.id/id/status_registered.expected -# -# and regenerate the tests with the following rake task -# -# $ rake spec:generate -# - -require 'spec_helper' - -describe "whois.pandi.or.id", :aggregate_failures do - - subject do - file = fixture("responses", "whois.pandi.or.id/id/status_registered.txt") - part = Whois::Record::Part.new(body: File.read(file), host: "whois.pandi.or.id") - Whois::Parser.parser_for(part) - end - - it "matches status_registered.expected" do - expect(subject.disclaimer).to eq(nil) - expect(subject.domain).to eq("google.co.id") - expect(subject.domain_id).to eq("PANDI-DO246796") - expect(subject.status).to eq(["clientTransferProhibited", "serverTransferProhibited"]) - expect(subject.available?).to eq(false) - expect(subject.registered?).to eq(true) - expect(subject.created_on).to be_a(Time) - expect(subject.created_on).to eq(DateTime.parse("2004-12-18 13:33:21 UTC")) - expect(subject.updated_on).to be_a(Time) - expect(subject.updated_on).to eq(DateTime.parse("2013-09-20 23:24:51 UTC")) - expect(subject.expires_on).to be_a(Time) - expect(subject.expires_on).to eq(DateTime.parse("2014-09-01 23:59:59 UTC")) - expect(subject.registrar).to be_a(Whois::Parser::Registrar) - expect(subject.registrar.id).to eq("digitalreg") - expect(subject.registrar.name).to eq("Digital Registra") - expect(subject.registrar.url).to eq(nil) - expect(subject.registrant_contacts).to be_a(Array) - expect(subject.registrant_contacts.size).to eq(1) - expect(subject.registrant_contacts[0]).to be_a(Whois::Parser::Contact) - expect(subject.registrant_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_REGISTRANT) - expect(subject.registrant_contacts[0].id).to eq("0123459P2ZC") - expect(subject.registrant_contacts[0].name).to eq("Domain Administrator") - expect(subject.registrant_contacts[0].organization).to eq("PT Google Indonesia") - expect(subject.registrant_contacts[0].address).to eq("Menara BCA Grand Indonesia\nRegus Grand Indonesia") - expect(subject.registrant_contacts[0].city).to eq("Jakarta") - expect(subject.registrant_contacts[0].zip).to eq("10310") - expect(subject.registrant_contacts[0].state).to eq("Jakarta") - expect(subject.registrant_contacts[0].country).to eq(nil) - expect(subject.registrant_contacts[0].country_code).to eq("ID") - expect(subject.registrant_contacts[0].phone).to eq("+62.2123584400") - expect(subject.registrant_contacts[0].fax).to eq("+62.2123584400") - expect(subject.registrant_contacts[0].email).to eq("dns-admin@google.com") - expect(subject.admin_contacts).to be_a(Array) - expect(subject.admin_contacts.size).to eq(1) - expect(subject.admin_contacts[0]).to be_a(Whois::Parser::Contact) - expect(subject.admin_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_ADMINISTRATIVE) - expect(subject.admin_contacts[0].id).to eq("0123459P2ZC") - expect(subject.admin_contacts[0].name).to eq("Domain Administrator") - expect(subject.admin_contacts[0].organization).to eq("PT Google Indonesia") - expect(subject.admin_contacts[0].address).to eq("Menara BCA Grand Indonesia\nRegus Grand Indonesia") - expect(subject.admin_contacts[0].city).to eq("Jakarta") - expect(subject.admin_contacts[0].zip).to eq("10310") - expect(subject.admin_contacts[0].state).to eq("Jakarta") - expect(subject.admin_contacts[0].country).to eq(nil) - expect(subject.admin_contacts[0].country_code).to eq("ID") - expect(subject.admin_contacts[0].phone).to eq("+62.2123584400") - expect(subject.admin_contacts[0].fax).to eq("+62.2123584400") - expect(subject.admin_contacts[0].email).to eq("dns-admin@google.com") - expect(subject.technical_contacts).to be_a(Array) - expect(subject.technical_contacts.size).to eq(1) - expect(subject.technical_contacts[0]).to be_a(Whois::Parser::Contact) - expect(subject.technical_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_TECHNICAL) - expect(subject.technical_contacts[0].id).to eq("01234616RFG") - expect(subject.technical_contacts[0].name).to eq("DNS Admin") - expect(subject.technical_contacts[0].organization).to eq("Google Inc.") - expect(subject.technical_contacts[0].address).to eq("1600 Amphitheatre Parkway") - expect(subject.technical_contacts[0].city).to eq("Mountain View") - expect(subject.technical_contacts[0].zip).to eq("94043") - expect(subject.technical_contacts[0].state).to eq("CA") - expect(subject.technical_contacts[0].country).to eq(nil) - expect(subject.technical_contacts[0].country_code).to eq("US") - expect(subject.technical_contacts[0].phone).to eq("+1.65030000") - expect(subject.technical_contacts[0].fax).to eq("+1.65030001") - expect(subject.technical_contacts[0].email).to eq("dns-admin@google.com") - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers.size).to eq(4) - expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[0].name).to eq("ns1.google.com") - expect(subject.nameservers[0].ipv4).to eq(nil) - expect(subject.nameservers[0].ipv6).to eq(nil) - expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[1].name).to eq("ns2.google.com") - expect(subject.nameservers[1].ipv4).to eq(nil) - expect(subject.nameservers[1].ipv6).to eq(nil) - expect(subject.nameservers[2]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[2].name).to eq("ns3.google.com") - expect(subject.nameservers[2].ipv4).to eq(nil) - expect(subject.nameservers[2].ipv6).to eq(nil) - expect(subject.nameservers[3]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[3].name).to eq("ns4.google.com") - expect(subject.nameservers[3].ipv4).to eq(nil) - expect(subject.nameservers[3].ipv6).to eq(nil) - end -end diff --git a/spec/whois/parsers/responses/whois.schlund.info/status_registered_spec.rb b/spec/whois/parsers/responses/whois.schlund.info/status_registered_spec.rb index f6c1f8a4..02c3f609 100644 --- a/spec/whois/parsers/responses/whois.schlund.info/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.schlund.info/status_registered_spec.rb @@ -46,7 +46,7 @@ expect(subject.registrant_contacts[0].address).to eq("Elgendorfer Str. 57") expect(subject.registrant_contacts[0].city).to eq("Montabaur") expect(subject.registrant_contacts[0].zip).to eq("56410") - expect(subject.registrant_contacts[0].state).to eq("") + expect(subject.registrant_contacts[0].state).to eq(nil) expect(subject.registrant_contacts[0].country_code).to eq("DE") expect(subject.registrant_contacts[0].phone).to eq("+49.2602960") expect(subject.registrant_contacts[0].fax).to eq("+49.72191374215") @@ -61,7 +61,7 @@ expect(subject.admin_contacts[0].address).to eq("Elgendorfer Str. 57") expect(subject.admin_contacts[0].city).to eq("Montabaur") expect(subject.admin_contacts[0].zip).to eq("56410") - expect(subject.admin_contacts[0].state).to eq("") + expect(subject.admin_contacts[0].state).to eq(nil) expect(subject.admin_contacts[0].country_code).to eq("DE") expect(subject.admin_contacts[0].phone).to eq("+49.2602960") expect(subject.admin_contacts[0].fax).to eq("+49.72191374215") @@ -76,7 +76,7 @@ expect(subject.technical_contacts[0].address).to eq("Brauerstr. 48") expect(subject.technical_contacts[0].city).to eq("Karlsruhe") expect(subject.technical_contacts[0].zip).to eq("76135") - expect(subject.technical_contacts[0].state).to eq("") + expect(subject.technical_contacts[0].state).to eq(nil) expect(subject.technical_contacts[0].country_code).to eq("DE") expect(subject.technical_contacts[0].phone).to eq("+49.7219600") expect(subject.technical_contacts[0].fax).to eq("+49.72191374248") From 399fd2aebbf442682694c1f7ca66c8350c838967 Mon Sep 17 00:00:00 2001 From: Adrien Rey-Jarthon Date: Thu, 16 Dec 2021 16:05:19 +0100 Subject: [PATCH 18/29] Fixed .SO parser not loading correctly under jRuby + Add support for ActiveSupport 7 + reduce ActiveSupport usage for Array.wap --- CHANGELOG.md | 2 ++ lib/whois/parser.rb | 7 ++----- lib/whois/parsers/base.rb | 13 +++++++------ lib/whois/parsers/base_afilias.rb | 4 ++-- lib/whois/parsers/base_cocca2.rb | 4 ++-- lib/whois/parsers/base_icann_compliant.rb | 4 ++-- lib/whois/parsers/base_iisse.rb | 2 +- lib/whois/parsers/base_shared1.rb | 2 +- lib/whois/parsers/base_shared2.rb | 4 ++-- lib/whois/parsers/base_verisign.rb | 2 +- lib/whois/parsers/base_whoisd.rb | 5 ++--- lib/whois/parsers/whois.aero.rb | 2 +- lib/whois/parsers/whois.ati.tn.rb | 2 +- lib/whois/parsers/whois.auda.org.au.rb | 4 ++-- lib/whois/parsers/whois.cat.rb | 2 +- lib/whois/parsers/whois.cctld.by.rb | 2 +- lib/whois/parsers/whois.cnnic.cn.rb | 4 ++-- lib/whois/parsers/whois.domainregistry.ie.rb | 4 ++-- lib/whois/parsers/whois.fi.rb | 2 +- lib/whois/parsers/whois.gg.rb | 2 +- lib/whois/parsers/whois.nic.asia.rb | 2 +- lib/whois/parsers/whois.nic.fo.rb | 2 +- lib/whois/parsers/whois.nic.gs.rb | 2 +- lib/whois/parsers/whois.nic.it.rb | 2 +- lib/whois/parsers/whois.nic.mg.rb | 2 +- lib/whois/parsers/whois.nic.net.ng.rb | 2 +- lib/whois/parsers/whois.nic.net.sb.rb | 2 +- lib/whois/parsers/whois.pnina.ps.rb | 2 +- lib/whois/parsers/whois.rnids.rs.rb | 2 +- lib/whois/parsers/whois.smallregistry.net.rb | 2 +- lib/whois/parsers/whois.sx.rb | 2 +- lib/whois/parsers/whois.tcinet.ru.rb | 3 +-- lib/whois/parsers/whois.tld.ee.rb | 10 +++++----- lib/whois/parsers/whois.tld.sy.rb | 2 +- lib/whois/parsers/whois.yoursrs.com.rb | 4 ++-- lib/whois/scanners/base.rb | 4 ++-- lib/whois/scanners/whois.fi.rb | 2 +- 37 files changed, 59 insertions(+), 61 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index ddaffa67..52746e13 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,8 @@ This project uses [Semantic Versioning 2.0.0](http://semver.org/). #### master +- FIX: Fixed .SO parser not loading correctly under jRuby +- NEW: Add support for ActiveSupport 7 + reduce ActiveSupport usage for Array.wap - NEW: Added support for all (or fixing existing) CentralNic TLDs (136 at the time: .ADAC, .AE.ORG, .ALLFINANZ, .ART, .AUTO, .AUTOS, .BABY, .BAR, .BEAUTY, .BEST, .BH, .BLOG, .BMW, .BOATS, .BOND, .BOX, .BR.COM, .BUILD, .CAM, .CAR, .CARS, .CASE, .CEO, .CFD, .CN.COM, .CO.COM, .CO.NL, .CO.NO, .CO.RO, .COLLEGE, .COM.DE, .COM.SE, .COOP, .CYOU, .DE.COM, .DEALER, .DELOITTE, .DESI, .DESIGN, .DHL, .DVAG, .ETISALAT, .EU.COM, .FANS, .FEEDBACK, .FM, .FO, .FORUM, .FRESENIUS, .FRL, .FUN, .GAY, .GB.NET, .GD, .GENT, .GR.COM, .HAIR, .HOMES, .HOST, .HU.NET, .ICU, .IN.NET, .INC, .INK, .JP.NET, .JPN.COM, .KFH, .KPN, .KRED, .LIDL, .LONDON, .LOVE, .LPL, .LPLFINANCIAL, .LUXURY, .MAKEUP, .MEX.COM, .MINI, .MONSTER, .MOTORCYCLES, .MUSIC, .ONLINE, .OOO, .PID, .POHL, .PRESS, .PROTECTION, .PW, .QPON, .QUEST, .RADIO.AM, .REIT, .RENT, .REST, .RU.COM, .SA.COM, .SAARLAND, .SBS, .SCHWARZ, .SE.NET, .SECURITY, .SFR, .SHOP.RO, .SITE, .SKIN, .SMART, .SPACE, .STC, .STCGROUP, .STORAGE, .STORE, .TECH, .THEATRE, .TICKETS, .TUI, .UK.COM, .UK.NET, .UNO, .US.COM, .US.ORG, .VG, .VIVA, .WEBSITE, .WIKI, .WME, .موقع, .اتصالات, .البحرين, .بيتك, .VERMÖGENSBERATER, .VERMÖGENSBERATUNG, .XYZ, .YACHTS, .ZA.BZ, .ZA.COM, .ZUERICH) - FIX: Updated parser for .IN tld which changed name - FIX: Updated parser for .MX tld (and derivates: .COM.MX, .ORG.MX, etc.) which changed name diff --git a/lib/whois/parser.rb b/lib/whois/parser.rb index d14c8eca..fe1a3d6a 100644 --- a/lib/whois/parser.rb +++ b/lib/whois/parser.rb @@ -8,11 +8,8 @@ require 'whois' -require 'active_support/core_ext/array/extract_options' -require 'active_support/core_ext/array/wrap' +require 'active_support' require 'active_support/core_ext/class/attribute' -require 'active_support/core_ext/kernel/singleton_class' -require 'active_support/core_ext/object/blank' require 'active_support/core_ext/time/calculations' require_relative 'parser/version' @@ -178,7 +175,7 @@ def self.host_to_parser(host) # def self.autoload(name) class_name = host_to_parser(name) - require_relative "parsers/#{name}" unless Parsers.const_defined?(class_name) + require_relative "parsers/#{name}.rb" unless Parsers.const_defined?(class_name) Parsers.const_get(class_name) end diff --git a/lib/whois/parsers/base.rb b/lib/whois/parsers/base.rb index 870751b4..fc88da88 100644 --- a/lib/whois/parsers/base.rb +++ b/lib/whois/parsers/base.rb @@ -13,7 +13,6 @@ require_relative '../parser/nameserver' require_relative '../scanners/scannable' - module Whois class Parsers @@ -375,11 +374,13 @@ def cached_properties_fetch(key) private - def typecast(value, type) - if Array == type - Array.wrap(value) + def wrap(object) + if object.nil? + [] + elsif object.respond_to?(:to_ary) + object.to_ary || [object] else - value + [object] end end @@ -398,7 +399,7 @@ def handle_property(property, *args) case property.to_s when /_contacts$/, "nameservers" - typecast(value, Array) + wrap(value) else value end diff --git a/lib/whois/parsers/base_afilias.rb b/lib/whois/parsers/base_afilias.rb index a3008f81..e6ca4dd3 100644 --- a/lib/whois/parsers/base_afilias.rb +++ b/lib/whois/parsers/base_afilias.rb @@ -23,7 +23,7 @@ class BaseAfilias < BaseIcannCompliant property_supported :status do - Array.wrap(node("Domain Status")) + Array(node("Domain Status")) end property_supported :registrant_contacts do @@ -40,7 +40,7 @@ class BaseAfilias < BaseIcannCompliant property_supported :nameservers do - Array.wrap(node("Name Server")).reject(&:empty?).map do |name| + Array(node("Name Server")).reject(&:empty?).map do |name| Parser::Nameserver.new(:name => name.downcase) end end diff --git a/lib/whois/parsers/base_cocca2.rb b/lib/whois/parsers/base_cocca2.rb index bf57f2b1..fccf9d77 100644 --- a/lib/whois/parsers/base_cocca2.rb +++ b/lib/whois/parsers/base_cocca2.rb @@ -35,7 +35,7 @@ class BaseCocca2 < Base # TODO: /pending delete/ => :redemption # TODO: /pending purge/ => :redemption property_supported :status do - list = Array.wrap(node("Domain Status")).map(&:downcase) + list = Array(node("Domain Status")).map(&:downcase) case when list.include?("no object found") :available @@ -80,7 +80,7 @@ class BaseCocca2 < Base property_supported :nameservers do - Array.wrap(node("Name Server")).map do |name| + Array(node("Name Server")).map do |name| Parser::Nameserver.new(name: name) end end diff --git a/lib/whois/parsers/base_icann_compliant.rb b/lib/whois/parsers/base_icann_compliant.rb index e4611e91..8f5549de 100644 --- a/lib/whois/parsers/base_icann_compliant.rb +++ b/lib/whois/parsers/base_icann_compliant.rb @@ -95,7 +95,7 @@ class BaseIcannCompliant < Base property_supported :nameservers do - Array.wrap(node("Name Server") || node("Name Servers")).reject(&:empty?).map do |name| + Array(node("Name Server") || node("Name Servers")).reject(&:empty?).map do |name| Parser::Nameserver.new(name: name.downcase) end end @@ -150,7 +150,7 @@ def value_for_phone_property(element, property) def value_for_property(element, property) node("#{element} #{property}") do |values| - Array.wrap(values).reject(&:empty?).join(', ') + Array(values).reject(&:empty?).join(', ') end end diff --git a/lib/whois/parsers/base_iisse.rb b/lib/whois/parsers/base_iisse.rb index 2a0d6474..b83d2b18 100644 --- a/lib/whois/parsers/base_iisse.rb +++ b/lib/whois/parsers/base_iisse.rb @@ -88,7 +88,7 @@ class BaseIisse < Base # property_supported :nameservers do node("nserver") do |values| - Array.wrap(values).map do |line| + Array(values).map do |line| name, ipv4 = line.split(/\s+/) Parser::Nameserver.new(name: name, ipv4: ipv4) end diff --git a/lib/whois/parsers/base_shared1.rb b/lib/whois/parsers/base_shared1.rb index d6a2068b..d1a3c56e 100644 --- a/lib/whois/parsers/base_shared1.rb +++ b/lib/whois/parsers/base_shared1.rb @@ -37,7 +37,7 @@ class BaseShared1 < Base if respond_to?(:reserved?) && reserved? :reserved else - Array.wrap(node("Status")) + Array(node("Status")) end end diff --git a/lib/whois/parsers/base_shared2.rb b/lib/whois/parsers/base_shared2.rb index 90583cef..0afd66c6 100644 --- a/lib/whois/parsers/base_shared2.rb +++ b/lib/whois/parsers/base_shared2.rb @@ -39,7 +39,7 @@ class BaseShared2 < Base property_supported :status do - node("Domain Status") { |value| Array.wrap(value) } + node("Domain Status") { |value| Array(value) } end property_supported :available? do @@ -88,7 +88,7 @@ class BaseShared2 < Base property_supported :nameservers do - Array.wrap(node("Name Server")).map do |name| + Array(node("Name Server")).map do |name| Parser::Nameserver.new(:name => name.downcase) end end diff --git a/lib/whois/parsers/base_verisign.rb b/lib/whois/parsers/base_verisign.rb index d85f3d0e..212e8a82 100644 --- a/lib/whois/parsers/base_verisign.rb +++ b/lib/whois/parsers/base_verisign.rb @@ -77,7 +77,7 @@ class BaseVerisign < Base property_supported :nameservers do - Array.wrap(node("Name Server")).reject { |value| value =~ /no nameserver/i }.map do |name| + Array(node("Name Server")).reject { |value| value =~ /no nameserver/i }.map do |name| Parser::Nameserver.new(name: name.downcase) end end diff --git a/lib/whois/parsers/base_whoisd.rb b/lib/whois/parsers/base_whoisd.rb index 9cb4f0ef..b597fef3 100644 --- a/lib/whois/parsers/base_whoisd.rb +++ b/lib/whois/parsers/base_whoisd.rb @@ -38,8 +38,7 @@ class BaseWhoisd < Base property_supported :status do node('status') do |value| - values = Array.wrap(value) - status = values.each do |s| + status = Array(value).each do |s| v = self.class.status_mapping[s.downcase] break v if v end @@ -100,7 +99,7 @@ class BaseWhoisd < Base property_supported :nameservers do lines = node_nsset['nserver'] rescue nil - Array.wrap(lines).map do |line| + Array(lines).map do |line| if line =~ /(.+) \((.+)\)/ name = $1 ipv4, ipv6 = $2.split(', ') diff --git a/lib/whois/parsers/whois.aero.rb b/lib/whois/parsers/whois.aero.rb index d0b4a63e..e9df8ed1 100644 --- a/lib/whois/parsers/whois.aero.rb +++ b/lib/whois/parsers/whois.aero.rb @@ -28,7 +28,7 @@ class WhoisAero < BaseAfilias if reserved? :reserved else - Array.wrap(node("Domain Status")) + Array(node("Domain Status")) end end diff --git a/lib/whois/parsers/whois.ati.tn.rb b/lib/whois/parsers/whois.ati.tn.rb index 4504ee54..b1ca0c93 100644 --- a/lib/whois/parsers/whois.ati.tn.rb +++ b/lib/whois/parsers/whois.ati.tn.rb @@ -83,7 +83,7 @@ class WhoisAtiTn < Base property_supported :nameservers do - Array.wrap(node("NameServers")).map do |line| + Array(node("NameServers")).map do |line| name, ipv4 = line.match(/(.+)\. \[(.+)\]/)[1, 2] Parser::Nameserver.new(:name => name, :ipv4 => ipv4) end diff --git a/lib/whois/parsers/whois.auda.org.au.rb b/lib/whois/parsers/whois.auda.org.au.rb index e0201fcc..fd9cf23e 100644 --- a/lib/whois/parsers/whois.auda.org.au.rb +++ b/lib/whois/parsers/whois.auda.org.au.rb @@ -46,7 +46,7 @@ class WhoisAudaOrgAu < Base # @see http://www.auda.org.au/policies/auda-2006-07/ # property_supported :status do - Array.wrap(node("Status")) + Array(node("Status")) end property_supported :available? do @@ -84,7 +84,7 @@ class WhoisAudaOrgAu < Base end property_supported :nameservers do - Array.wrap(node("Name Server")).map do |name| + Array(node("Name Server")).map do |name| Parser::Nameserver.new(name: name) end end diff --git a/lib/whois/parsers/whois.cat.rb b/lib/whois/parsers/whois.cat.rb index 350bab5c..be09dd69 100644 --- a/lib/whois/parsers/whois.cat.rb +++ b/lib/whois/parsers/whois.cat.rb @@ -26,7 +26,7 @@ class WhoisCat < Base property_supported :status do if content_for_scanner =~ /Status:\s+(.+?)\n/ - Array.wrap($1.split(", ")) + Array($1.split(", ")) end end diff --git a/lib/whois/parsers/whois.cctld.by.rb b/lib/whois/parsers/whois.cctld.by.rb index a346137e..dcb46c5a 100644 --- a/lib/whois/parsers/whois.cctld.by.rb +++ b/lib/whois/parsers/whois.cctld.by.rb @@ -83,7 +83,7 @@ class WhoisCctldBy < Base property_supported :nameservers do - Array.wrap(node("Name Server")).map do |name| + Array(node("Name Server")).map do |name| Parser::Nameserver.new(:name => name.downcase) end end diff --git a/lib/whois/parsers/whois.cnnic.cn.rb b/lib/whois/parsers/whois.cnnic.cn.rb index ce13eda7..39ae5f23 100644 --- a/lib/whois/parsers/whois.cnnic.cn.rb +++ b/lib/whois/parsers/whois.cnnic.cn.rb @@ -34,7 +34,7 @@ class WhoisCnnicCn < Base property_supported :status do - Array.wrap node("Domain Status") + Array node("Domain Status") end property_supported :available? do @@ -78,7 +78,7 @@ class WhoisCnnicCn < Base property_supported :nameservers do - Array.wrap(node("Name Server")).map do |name| + Array(node("Name Server")).map do |name| Parser::Nameserver.new(name: name.downcase) end end diff --git a/lib/whois/parsers/whois.domainregistry.ie.rb b/lib/whois/parsers/whois.domainregistry.ie.rb index 18d1ee6e..84dfde0e 100644 --- a/lib/whois/parsers/whois.domainregistry.ie.rb +++ b/lib/whois/parsers/whois.domainregistry.ie.rb @@ -95,7 +95,7 @@ class WhoisDomainregistryIe < Base property_supported :nameservers do - Array.wrap(node("nserver")).map do |line| + Array(node("nserver")).map do |line| name, ipv4 = line.split(/\s+/) Parser::Nameserver.new(:name => name, :ipv4 => ipv4) end @@ -105,7 +105,7 @@ class WhoisDomainregistryIe < Base private def build_contact(element, type) - Array.wrap(node(element)).map do |id| + Array(node(element)).map do |id| next unless (contact = node("field:#{id}")) Parser::Contact.new( :type => type, diff --git a/lib/whois/parsers/whois.fi.rb b/lib/whois/parsers/whois.fi.rb index 07d6b326..4042da59 100644 --- a/lib/whois/parsers/whois.fi.rb +++ b/lib/whois/parsers/whois.fi.rb @@ -119,7 +119,7 @@ class WhoisFi < Base property_supported :nameservers do node('Nameservers') do |hash| - Array.wrap(hash['nserver']).map do |line| + Array(hash['nserver']).map do |line| Parser::Nameserver.new(name: line.split(" ").first) end end diff --git a/lib/whois/parsers/whois.gg.rb b/lib/whois/parsers/whois.gg.rb index b3833100..ead73035 100644 --- a/lib/whois/parsers/whois.gg.rb +++ b/lib/whois/parsers/whois.gg.rb @@ -21,7 +21,7 @@ class Parsers class WhoisGg < BaseCocca2 property_supported :status do - list = Array.wrap(node("Domain Status")).map(&:downcase) + list = Array(node("Domain Status")).map(&:downcase) list.include?("available") ? :available : super() end diff --git a/lib/whois/parsers/whois.nic.asia.rb b/lib/whois/parsers/whois.nic.asia.rb index 97026479..6089247b 100644 --- a/lib/whois/parsers/whois.nic.asia.rb +++ b/lib/whois/parsers/whois.nic.asia.rb @@ -28,7 +28,7 @@ class WhoisNicAsia < BaseAfilias if reserved? :reserved else - Array.wrap(node("Domain Status")) + Array(node("Domain Status")) end end diff --git a/lib/whois/parsers/whois.nic.fo.rb b/lib/whois/parsers/whois.nic.fo.rb index a28c9398..20a45eb1 100644 --- a/lib/whois/parsers/whois.nic.fo.rb +++ b/lib/whois/parsers/whois.nic.fo.rb @@ -32,7 +32,7 @@ class WhoisNicFo < BaseWhoisd # whois.nic.fo is using an old whoisd version. property_supported :nameservers do - Array.wrap(node('nserver')).map do |line| + Array(node('nserver')).map do |line| Parser::Nameserver.new(:name => line.strip) end end diff --git a/lib/whois/parsers/whois.nic.gs.rb b/lib/whois/parsers/whois.nic.gs.rb index 37cec199..e341e043 100644 --- a/lib/whois/parsers/whois.nic.gs.rb +++ b/lib/whois/parsers/whois.nic.gs.rb @@ -21,7 +21,7 @@ class Parsers class WhoisNicGs < BaseCocca2 property_supported :status do - list = Array.wrap(node("Domain Status")).map(&:downcase) + list = Array(node("Domain Status")).map(&:downcase) list.include?("available") ? :available : super() end diff --git a/lib/whois/parsers/whois.nic.it.rb b/lib/whois/parsers/whois.nic.it.rb index a4e68e54..e81b9d8f 100644 --- a/lib/whois/parsers/whois.nic.it.rb +++ b/lib/whois/parsers/whois.nic.it.rb @@ -116,7 +116,7 @@ def unavailable? property_supported :nameservers do - Array.wrap(node("Nameservers")).map do |name| + Array(node("Nameservers")).map do |name| Parser::Nameserver.new(:name => name) end end diff --git a/lib/whois/parsers/whois.nic.mg.rb b/lib/whois/parsers/whois.nic.mg.rb index 15c243b6..07d7a472 100644 --- a/lib/whois/parsers/whois.nic.mg.rb +++ b/lib/whois/parsers/whois.nic.mg.rb @@ -21,7 +21,7 @@ class Parsers class WhoisNicMg < BaseCocca2 property_supported :status do - list = Array.wrap(node("Domain Status")).map(&:downcase) + list = Array(node("Domain Status")).map(&:downcase) list.include?("available") ? :available : super() end diff --git a/lib/whois/parsers/whois.nic.net.ng.rb b/lib/whois/parsers/whois.nic.net.ng.rb index d379ed74..429f5025 100644 --- a/lib/whois/parsers/whois.nic.net.ng.rb +++ b/lib/whois/parsers/whois.nic.net.ng.rb @@ -17,7 +17,7 @@ class Parsers class WhoisNicNetNg < BaseCocca2 property_supported :status do - list = Array.wrap(node("Domain Status")).map(&:downcase) + list = Array(node("Domain Status")).map(&:downcase) list.include?("available") ? :available : super() end diff --git a/lib/whois/parsers/whois.nic.net.sb.rb b/lib/whois/parsers/whois.nic.net.sb.rb index 107a2293..14fd170d 100644 --- a/lib/whois/parsers/whois.nic.net.sb.rb +++ b/lib/whois/parsers/whois.nic.net.sb.rb @@ -21,7 +21,7 @@ class Parsers class WhoisNicNetSb < BaseCocca2 property_supported :status do - list = Array.wrap(node("Domain Status")).map(&:downcase) + list = Array(node("Domain Status")).map(&:downcase) list.include?("available") ? :available : super() end diff --git a/lib/whois/parsers/whois.pnina.ps.rb b/lib/whois/parsers/whois.pnina.ps.rb index 5243a587..b445450a 100644 --- a/lib/whois/parsers/whois.pnina.ps.rb +++ b/lib/whois/parsers/whois.pnina.ps.rb @@ -21,7 +21,7 @@ class Parsers class WhoisPninaPs < BaseCocca2 property_supported :status do - list = Array.wrap(node("Domain Status")).map(&:downcase) + list = Array(node("Domain Status")).map(&:downcase) list.include?("available") ? :available : super() end diff --git a/lib/whois/parsers/whois.rnids.rs.rb b/lib/whois/parsers/whois.rnids.rs.rb index db286ef4..b5cc8487 100644 --- a/lib/whois/parsers/whois.rnids.rs.rb +++ b/lib/whois/parsers/whois.rnids.rs.rb @@ -98,7 +98,7 @@ class WhoisRnidsRs < Base property_supported :nameservers do - Array.wrap(node("DNS")).map do |line| + Array(node("DNS")).map do |line| name, ipv4 = line.split(/ - ?/).map(&:strip) name.chomp!(".") Parser::Nameserver.new(:name => name, :ipv4 => ipv4) diff --git a/lib/whois/parsers/whois.smallregistry.net.rb b/lib/whois/parsers/whois.smallregistry.net.rb index 1dd8edef..f4416395 100644 --- a/lib/whois/parsers/whois.smallregistry.net.rb +++ b/lib/whois/parsers/whois.smallregistry.net.rb @@ -99,7 +99,7 @@ class WhoisSmallregistryNet < Base property_supported :nameservers do - Array.wrap(node("name_servers")).map do |hash| + Array(node("name_servers")).map do |hash| Parser::Nameserver.new(:name => hash) end end diff --git a/lib/whois/parsers/whois.sx.rb b/lib/whois/parsers/whois.sx.rb index 4fa2b099..af340a44 100644 --- a/lib/whois/parsers/whois.sx.rb +++ b/lib/whois/parsers/whois.sx.rb @@ -95,7 +95,7 @@ class WhoisSx < Base property_supported :nameservers do - Array.wrap(node("Name Server")).map do |name| + Array(node("Name Server")).map do |name| Parser::Nameserver.new(:name => name) end end diff --git a/lib/whois/parsers/whois.tcinet.ru.rb b/lib/whois/parsers/whois.tcinet.ru.rb index 63e4b236..32dbb707 100644 --- a/lib/whois/parsers/whois.tcinet.ru.rb +++ b/lib/whois/parsers/whois.tcinet.ru.rb @@ -75,7 +75,7 @@ class WhoisTcinetRu < Base property_supported :admin_contacts do url = content_for_scanner[/admin-contact:\s+(.+)\n/, 1] email = content_for_scanner[/e-mail:\s+(.+)\n/, 1] - contact = if url or email + if url or email Parser::Contact.new( :type => Parser::Contact::TYPE_ADMINISTRATIVE, :url => url, @@ -86,7 +86,6 @@ class WhoisTcinetRu < Base :fax => content_for_scanner[/fax-no:\s+(.+)\n/, 1] ) end - Array.wrap(contact) end property_not_supported :registrant_contacts diff --git a/lib/whois/parsers/whois.tld.ee.rb b/lib/whois/parsers/whois.tld.ee.rb index 4694d549..27beb50f 100644 --- a/lib/whois/parsers/whois.tld.ee.rb +++ b/lib/whois/parsers/whois.tld.ee.rb @@ -104,7 +104,7 @@ class WhoisTldEe < Base property_supported :nameservers do node('Name servers') do |hash| - Array.wrap(hash['nserver']).map do |name| + Array(hash['nserver']).map do |name| Parser::Nameserver.new(name: name.downcase) end end @@ -115,14 +115,14 @@ class WhoisTldEe < Base def build_contact(element, type) node(element) do |hash| - el_size = Array.wrap(hash['name']).size + el_size = Array(hash['name']).size (0...el_size).map do |i| Parser::Contact.new( type: type, - name: Array.wrap(hash['name'])[i], - email: Array.wrap(hash['email'])[i], - updated_on: parse_time(Array.wrap(hash['changed'])[i]) + name: Array(hash['name'])[i], + email: Array(hash['email'])[i], + updated_on: parse_time(Array(hash['changed'])[i]) ) end end diff --git a/lib/whois/parsers/whois.tld.sy.rb b/lib/whois/parsers/whois.tld.sy.rb index 64614428..0e80b33c 100644 --- a/lib/whois/parsers/whois.tld.sy.rb +++ b/lib/whois/parsers/whois.tld.sy.rb @@ -21,7 +21,7 @@ class Parsers class WhoisTldSy < BaseCocca2 property_supported :status do - list = Array.wrap(node("Domain Status")).map(&:downcase) + list = Array(node("Domain Status")).map(&:downcase) list.include?("available") ? :available : super() end diff --git a/lib/whois/parsers/whois.yoursrs.com.rb b/lib/whois/parsers/whois.yoursrs.com.rb index dd0c4f5c..7e92c265 100644 --- a/lib/whois/parsers/whois.yoursrs.com.rb +++ b/lib/whois/parsers/whois.yoursrs.com.rb @@ -33,7 +33,7 @@ class WhoisYoursrsCom < Base property_supported :status do - Array.wrap(node("Status")) + Array(node("Status")) end property_supported :available? do @@ -85,7 +85,7 @@ class WhoisYoursrsCom < Base property_supported :nameservers do - Array.wrap(node("Name Server")).reject(&:empty?).map do |name| + Array(node("Name Server")).reject(&:empty?).map do |name| Parser::Nameserver.new(name: name.downcase) end end diff --git a/lib/whois/scanners/base.rb b/lib/whois/scanners/base.rb index d0566c98..2a74516b 100644 --- a/lib/whois/scanners/base.rb +++ b/lib/whois/scanners/base.rb @@ -54,7 +54,7 @@ def parse(content) if target[key].nil? target[key] = value else - target[key] = Array.wrap(target[key]) + target[key] = Array(target[key]) target[key] << value end end @@ -86,7 +86,7 @@ def _scan_keyvalues(pattern) if results[key].nil? results[key] = value else - results[key] = Array.wrap(results[key]) + results[key] = Array(results[key]) results[key] << value end end diff --git a/lib/whois/scanners/whois.fi.rb b/lib/whois/scanners/whois.fi.rb index a1fa4566..a6cdec89 100644 --- a/lib/whois/scanners/whois.fi.rb +++ b/lib/whois/scanners/whois.fi.rb @@ -48,7 +48,7 @@ class WhoisFi < Base if target[key].nil? target[key] = value else - target[key] = Array.wrap(target[key]) + target[key] = Array(target[key]) target[key] << value end end From 5136f03f6f943d703ce88d581d4cdd6bcd2cda49 Mon Sep 17 00:00:00 2001 From: Adrien Rey-Jarthon Date: Thu, 16 Dec 2021 16:05:39 +0100 Subject: [PATCH 19/29] Adding ruby 3 to the test suite + updating jruby and remove it from the allowed failures --- .gitignore | 1 + .travis.yml | 5 ++--- CHANGELOG.md | 1 + 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/.gitignore b/.gitignore index ed8bdb2a..a84ab18b 100644 --- a/.gitignore +++ b/.gitignore @@ -2,6 +2,7 @@ /.bundle/ /Gemfile.lock /pkg/ +.ruby-version # YARD /.yardoc diff --git a/.travis.yml b/.travis.yml index 65e70372..23003d37 100644 --- a/.travis.yml +++ b/.travis.yml @@ -6,7 +6,8 @@ rvm: - "2.5" - "2.6" - "2.7" - - "jruby-9.1.5.0" + - "3.0" + - "jruby-9.3.2.0" - "ruby-head" env: @@ -18,8 +19,6 @@ cache: matrix: allow_failures: - rvm: ruby-head - - rvm: jruby-head - - rvm: jruby-9.1.5.0 before_install: - gem install bundler diff --git a/CHANGELOG.md b/CHANGELOG.md index 52746e13..5efe9784 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,7 @@ This project uses [Semantic Versioning 2.0.0](http://semver.org/). #### master +- CHANGED: Adding ruby 3 to the test suite + updating jruby and remove it from the allowed failures - FIX: Fixed .SO parser not loading correctly under jRuby - NEW: Add support for ActiveSupport 7 + reduce ActiveSupport usage for Array.wap - NEW: Added support for all (or fixing existing) CentralNic TLDs (136 at the time: .ADAC, .AE.ORG, .ALLFINANZ, .ART, .AUTO, .AUTOS, .BABY, .BAR, .BEAUTY, .BEST, .BH, .BLOG, .BMW, .BOATS, .BOND, .BOX, .BR.COM, .BUILD, .CAM, .CAR, .CARS, .CASE, .CEO, .CFD, .CN.COM, .CO.COM, .CO.NL, .CO.NO, .CO.RO, .COLLEGE, .COM.DE, .COM.SE, .COOP, .CYOU, .DE.COM, .DEALER, .DELOITTE, .DESI, .DESIGN, .DHL, .DVAG, .ETISALAT, .EU.COM, .FANS, .FEEDBACK, .FM, .FO, .FORUM, .FRESENIUS, .FRL, .FUN, .GAY, .GB.NET, .GD, .GENT, .GR.COM, .HAIR, .HOMES, .HOST, .HU.NET, .ICU, .IN.NET, .INC, .INK, .JP.NET, .JPN.COM, .KFH, .KPN, .KRED, .LIDL, .LONDON, .LOVE, .LPL, .LPLFINANCIAL, .LUXURY, .MAKEUP, .MEX.COM, .MINI, .MONSTER, .MOTORCYCLES, .MUSIC, .ONLINE, .OOO, .PID, .POHL, .PRESS, .PROTECTION, .PW, .QPON, .QUEST, .RADIO.AM, .REIT, .RENT, .REST, .RU.COM, .SA.COM, .SAARLAND, .SBS, .SCHWARZ, .SE.NET, .SECURITY, .SFR, .SHOP.RO, .SITE, .SKIN, .SMART, .SPACE, .STC, .STCGROUP, .STORAGE, .STORE, .TECH, .THEATRE, .TICKETS, .TUI, .UK.COM, .UK.NET, .UNO, .US.COM, .US.ORG, .VG, .VIVA, .WEBSITE, .WIKI, .WME, .موقع, .اتصالات, .البحرين, .بيتك, .VERMÖGENSBERATER, .VERMÖGENSBERATUNG, .XYZ, .YACHTS, .ZA.BZ, .ZA.COM, .ZUERICH) From 98a45600ecd7ab2a672b493bc13e7359ae509a78 Mon Sep 17 00:00:00 2001 From: Youness EL GHAZI Date: Tue, 25 Jan 2022 02:59:20 +0100 Subject: [PATCH 20/29] Add deleted status to nic_fr --- lib/whois/parsers/base_nic_fr.rb | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/whois/parsers/base_nic_fr.rb b/lib/whois/parsers/base_nic_fr.rb index 4b0d8c25..c121290a 100644 --- a/lib/whois/parsers/base_nic_fr.rb +++ b/lib/whois/parsers/base_nic_fr.rb @@ -25,6 +25,7 @@ class BaseNicFr < Base when "registered" then :registered when "redemption" then :redemption when "blocked" then :inactive + when "deleted" then :deleted # The 'frozen' status seems to be a status # where a registered domain is placed to prevent changes # and/or when changes can't be made. From b9ade2f647fb8561d5dfdb27ae4431105422a085 Mon Sep 17 00:00:00 2001 From: Adrien Rey-Jarthon Date: Sat, 26 Nov 2022 10:51:18 +0100 Subject: [PATCH 21/29] Updated parser for .PT tld --- CHANGELOG.md | 1 + lib/whois/parsers/whois.dns.pt.rb | 22 ++++----- .../pt/property_nameservers.expected | 11 ----- .../whois.dns.pt/pt/property_nameservers.txt | 25 ---------- .../pt/property_status_techpro.expected | 8 ---- .../pt/property_status_techpro.txt | 21 --------- .../whois.dns.pt/pt/status_available.txt | 2 +- .../whois.dns.pt/pt/status_inactive.expected | 25 ---------- .../whois.dns.pt/pt/status_inactive.txt | 21 --------- .../pt/status_registered.expected | 8 ++-- .../whois.dns.pt/pt/status_registered.txt | 47 +++++++++---------- .../whois.dns.pt/pt/status_reserved.expected | 6 +-- .../whois.dns.pt/pt/status_reserved.txt | 42 +++++++---------- .../pt/property_nameservers_spec.rb | 33 ------------- .../pt/property_status_techpro_spec.rb | 26 ---------- .../whois.dns.pt/pt/status_inactive_spec.rb | 33 ------------- .../whois.dns.pt/pt/status_registered_spec.rb | 8 ++-- .../whois.dns.pt/pt/status_reserved_spec.rb | 5 +- 18 files changed, 65 insertions(+), 279 deletions(-) delete mode 100644 spec/fixtures/responses/whois.dns.pt/pt/property_nameservers.expected delete mode 100644 spec/fixtures/responses/whois.dns.pt/pt/property_nameservers.txt delete mode 100644 spec/fixtures/responses/whois.dns.pt/pt/property_status_techpro.expected delete mode 100644 spec/fixtures/responses/whois.dns.pt/pt/property_status_techpro.txt delete mode 100644 spec/fixtures/responses/whois.dns.pt/pt/status_inactive.expected delete mode 100644 spec/fixtures/responses/whois.dns.pt/pt/status_inactive.txt delete mode 100644 spec/whois/parsers/responses/whois.dns.pt/pt/property_nameservers_spec.rb delete mode 100644 spec/whois/parsers/responses/whois.dns.pt/pt/property_status_techpro_spec.rb delete mode 100644 spec/whois/parsers/responses/whois.dns.pt/pt/status_inactive_spec.rb diff --git a/CHANGELOG.md b/CHANGELOG.md index 69074099..bce3c0c8 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,7 @@ This project uses [Semantic Versioning 2.0.0](http://semver.org/). #### Release 2.0.0 +- FIX: Updated parser for .PT tld - CHANGED: Adding ruby 3 to the test suite + updating jruby and remove it from the allowed failures - FIX: Fixed .SO parser not loading correctly under jRuby - NEW: Add support for ActiveSupport 7 + reduce ActiveSupport usage for Array.wap diff --git a/lib/whois/parsers/whois.dns.pt.rb b/lib/whois/parsers/whois.dns.pt.rb index bca5bd0d..bb139cbc 100644 --- a/lib/whois/parsers/whois.dns.pt.rb +++ b/lib/whois/parsers/whois.dns.pt.rb @@ -25,14 +25,12 @@ class Parsers class WhoisDnsPt < Base property_supported :status do - if content_for_scanner =~ %r{^Estado / Status:\s+(.+)\n} + if content_for_scanner =~ %r{^Domain Status:\s+(.+)\n} case ::Regexp.last_match(1).downcase - when "active" + when "registered" :registered when "reserved" :reserved - when "tech-pro" - :inactive else Whois::Parser.bug!(ParserError, "Unknown status `#{::Regexp.last_match(1)}'.") end @@ -42,32 +40,30 @@ class WhoisDnsPt < Base end property_supported :available? do - !!(content_for_scanner =~ /^.* no match$/) + !!(content_for_scanner =~ /^.* No Match$/) end property_supported :registered? do !available? end - property_supported :created_on do - if content_for_scanner =~ / Creation Date .+?:\s+(.+)\n/ - Time.utc(*::Regexp.last_match(1).split("/").reverse) + if content_for_scanner =~ /Creation Date:\s+(.+)\n/ + parse_time(*::Regexp.last_match(1)) end end property_not_supported :updated_on property_supported :expires_on do - if content_for_scanner =~ / Expiration Date .+?:\s+(.+)\n/ - Time.utc(*::Regexp.last_match(1).split("/").reverse) + if content_for_scanner =~ /Expiration Date:\s+(.+)\n/ + parse_time(*::Regexp.last_match(1)) end end - property_supported :nameservers do - content_for_scanner.scan(/Nameserver:\s+(?:.*)\s+NS\s+(.+?)\.\n/).flatten.map do |name| - Parser::Nameserver.new(:name => name) + content_for_scanner.scan(/Name Server:\s+([^\s]+)/).flatten.map do |name| + Parser::Nameserver.new(name: name) end end diff --git a/spec/fixtures/responses/whois.dns.pt/pt/property_nameservers.expected b/spec/fixtures/responses/whois.dns.pt/pt/property_nameservers.expected deleted file mode 100644 index 8cef83e4..00000000 --- a/spec/fixtures/responses/whois.dns.pt/pt/property_nameservers.expected +++ /dev/null @@ -1,11 +0,0 @@ -#nameservers - %s %CLASS{array} - %s %SIZE{4} - %s[0] %CLASS{nameserver} - %s[0].name == "ns4.google.com" - %s[1] %CLASS{nameserver} - %s[1].name == "ns2.google.com" - %s[2] %CLASS{nameserver} - %s[2].name == "ns1.google.com" - %s[3] %CLASS{nameserver} - %s[3].name == "ns3.google.com" diff --git a/spec/fixtures/responses/whois.dns.pt/pt/property_nameservers.txt b/spec/fixtures/responses/whois.dns.pt/pt/property_nameservers.txt deleted file mode 100644 index 69be6012..00000000 --- a/spec/fixtures/responses/whois.dns.pt/pt/property_nameservers.txt +++ /dev/null @@ -1,25 +0,0 @@ -Nome de domínio / Domain Name: google.pt -Data de registo / Creation Date (dd/mm/yyyy): 09/01/2003 -Data de expiração / Expiration Date (dd/mm/yyyy): 29/02/2012 -Estado / Status: ACTIVE - -Titular / Registrant - Google, Inc. - 1600 Amphitheatre Parkway - Mountain View, CA - 94043 null - Email: dns-admin@google.com - -Entidade Gestora / Billing Contact - Markmonitor - CCOPS - Email: ccops@markmonitor.com - -Responsável Técnico / Tech Contact - Markmonitor - CCOPS - Email: ccops@markmonitor.com - -Nameserver Information - Nameserver: google.pt NS ns4.google.com. - Nameserver: google.pt NS ns2.google.com. - Nameserver: google.pt NS ns1.google.com. - Nameserver: google.pt NS ns3.google.com. diff --git a/spec/fixtures/responses/whois.dns.pt/pt/property_status_techpro.expected b/spec/fixtures/responses/whois.dns.pt/pt/property_status_techpro.expected deleted file mode 100644 index 8592c316..00000000 --- a/spec/fixtures/responses/whois.dns.pt/pt/property_status_techpro.expected +++ /dev/null @@ -1,8 +0,0 @@ -#status - %s == :inactive - -#available? - %s == false - -#registered? - %s == true diff --git a/spec/fixtures/responses/whois.dns.pt/pt/property_status_techpro.txt b/spec/fixtures/responses/whois.dns.pt/pt/property_status_techpro.txt deleted file mode 100644 index 70fa020f..00000000 --- a/spec/fixtures/responses/whois.dns.pt/pt/property_status_techpro.txt +++ /dev/null @@ -1,21 +0,0 @@ -Nome de domínio / Domain Name: wiki.pt -Data de registo / Creation Date (dd/mm/yyyy): 09/02/2009 -Data de expiração / Expiration Date (dd/mm/yyyy): 01/03/2014 -Estado / Status: TECH-PRO - -Titular / Registrant - Portugalmail - Comunicações S.A. - Rua Ricardo Severo, Nº 3 - 5º Dto. - Porto - 4050-515 Porto - Email: registrars@ping.pt - -Entidade Gestora / Billing Contact - Portugalmail - Comunicações S.A. - Email: registrars@ping.pt - -Responsável Técnico / Tech Contact - Portugalmail - Comunicações S.A. - Email: registrars@ping.pt - -Nameserver Information diff --git a/spec/fixtures/responses/whois.dns.pt/pt/status_available.txt b/spec/fixtures/responses/whois.dns.pt/pt/status_available.txt index c18ae524..441ea1a5 100644 --- a/spec/fixtures/responses/whois.dns.pt/pt/status_available.txt +++ b/spec/fixtures/responses/whois.dns.pt/pt/status_available.txt @@ -1 +1 @@ -u34jedzcq.pt no match \ No newline at end of file +u34jedzcq.pt - No Match diff --git a/spec/fixtures/responses/whois.dns.pt/pt/status_inactive.expected b/spec/fixtures/responses/whois.dns.pt/pt/status_inactive.expected deleted file mode 100644 index 2f2febdc..00000000 --- a/spec/fixtures/responses/whois.dns.pt/pt/status_inactive.expected +++ /dev/null @@ -1,25 +0,0 @@ -#status - %s == :inactive - -#available? - %s == false - -#registered? - %s == true - - -#created_on - %s %CLASS{time} - %s %TIME{2009-02-09 00:00:00 UTC} - -#updated_on - %s %ERROR{AttributeNotSupported} - -#expires_on - %s %CLASS{time} - %s %TIME{2014-03-01 00:00:00 UTC} - - -#nameservers - %s %CLASS{array} - %s %SIZE{0} diff --git a/spec/fixtures/responses/whois.dns.pt/pt/status_inactive.txt b/spec/fixtures/responses/whois.dns.pt/pt/status_inactive.txt deleted file mode 100644 index 70fa020f..00000000 --- a/spec/fixtures/responses/whois.dns.pt/pt/status_inactive.txt +++ /dev/null @@ -1,21 +0,0 @@ -Nome de domínio / Domain Name: wiki.pt -Data de registo / Creation Date (dd/mm/yyyy): 09/02/2009 -Data de expiração / Expiration Date (dd/mm/yyyy): 01/03/2014 -Estado / Status: TECH-PRO - -Titular / Registrant - Portugalmail - Comunicações S.A. - Rua Ricardo Severo, Nº 3 - 5º Dto. - Porto - 4050-515 Porto - Email: registrars@ping.pt - -Entidade Gestora / Billing Contact - Portugalmail - Comunicações S.A. - Email: registrars@ping.pt - -Responsável Técnico / Tech Contact - Portugalmail - Comunicações S.A. - Email: registrars@ping.pt - -Nameserver Information diff --git a/spec/fixtures/responses/whois.dns.pt/pt/status_registered.expected b/spec/fixtures/responses/whois.dns.pt/pt/status_registered.expected index b934b98b..03f1ed5f 100644 --- a/spec/fixtures/responses/whois.dns.pt/pt/status_registered.expected +++ b/spec/fixtures/responses/whois.dns.pt/pt/status_registered.expected @@ -17,17 +17,17 @@ #expires_on %s %CLASS{time} - %s %TIME{2015-02-28 00:00:00 UTC} + %s %TIME{2023-02-28 23:59:00 UTC} #nameservers %s %CLASS{array} %s %SIZE{4} %s[0] %CLASS{nameserver} - %s[0].name == "ns4.google.com" + %s[0].name == "ns3.google.com" %s[1] %CLASS{nameserver} - %s[1].name == "ns2.google.com" + %s[1].name == "ns4.google.com" %s[2] %CLASS{nameserver} %s[2].name == "ns1.google.com" %s[3] %CLASS{nameserver} - %s[3].name == "ns3.google.com" + %s[3].name == "ns2.google.com" diff --git a/spec/fixtures/responses/whois.dns.pt/pt/status_registered.txt b/spec/fixtures/responses/whois.dns.pt/pt/status_registered.txt index 5fa8f0cd..21d231ab 100644 --- a/spec/fixtures/responses/whois.dns.pt/pt/status_registered.txt +++ b/spec/fixtures/responses/whois.dns.pt/pt/status_registered.txt @@ -1,25 +1,22 @@ -Nome de domínio / Domain Name: google.pt -Data de registo / Creation Date (dd/mm/yyyy): 09/01/2003 -Data de expiração / Expiration Date (dd/mm/yyyy): 28/02/2015 -Estado / Status: ACTIVE - -Titular / Registrant - Google, Inc. - 1600 Amphitheatre Parkway - Mountain View, CA - 94043 null - Email: dns-admin@google.com - -Entidade Gestora / Billing Contact - Markmonitor - CCOPS - Email: ccops@markmonitor.com - -Responsável Técnico / Tech Contact - Markmonitor - CCOPS - Email: ccops@markmonitor.com - -Nameserver Information - Nameserver: google.pt NS ns4.google.com. - Nameserver: google.pt NS ns2.google.com. - Nameserver: google.pt NS ns1.google.com. - Nameserver: google.pt NS ns3.google.com. +Domain: google.pt +Domain Status: Registered +Creation Date: 09/01/2003 00:00:00 +Expiration Date: 28/02/2023 23:59:00 +Owner Name: +Owner Address: +Owner Locality: +Owner ZipCode: +Owner Locality ZipCode: +Owner Country Code: +Owner Email: +Admin Name: MarkMonitor Inc. +Admin Address: 2150 S Bonito Way Suite 150 +Admin Locality: Meridian +Admin ZipCode: 83642 +Admin Locality ZipCode: ID +Admin Country Code: US +Admin Email: ccops@markmonitor.com +Name Server: ns3.google.com | IPv4: and IPv6: +Name Server: ns4.google.com | IPv4: and IPv6: +Name Server: ns1.google.com | IPv4: and IPv6: +Name Server: ns2.google.com | IPv4: and IPv6: diff --git a/spec/fixtures/responses/whois.dns.pt/pt/status_reserved.expected b/spec/fixtures/responses/whois.dns.pt/pt/status_reserved.expected index 08230654..380892b2 100644 --- a/spec/fixtures/responses/whois.dns.pt/pt/status_reserved.expected +++ b/spec/fixtures/responses/whois.dns.pt/pt/status_reserved.expected @@ -10,14 +10,14 @@ #created_on %s %CLASS{time} - %s %TIME{2009-02-09 00:00:00 UTC} + %s %TIME{2015-05-07 23:40:09 UTC} #updated_on %s %ERROR{AttributeNotSupported} #expires_on - %s == nil - + %s %CLASS{time} + %s %TIME{2026-05-06 23:59:09 UTC} #nameservers %s %CLASS{array} diff --git a/spec/fixtures/responses/whois.dns.pt/pt/status_reserved.txt b/spec/fixtures/responses/whois.dns.pt/pt/status_reserved.txt index d57b65e8..561d97c9 100644 --- a/spec/fixtures/responses/whois.dns.pt/pt/status_reserved.txt +++ b/spec/fixtures/responses/whois.dns.pt/pt/status_reserved.txt @@ -1,24 +1,18 @@ -Nome de domínio / Domain Name: wiki.pt -Data de registo / Creation Date (dd/mm/yyyy): 09/02/2009 -Estado / Status: RESERVED - -Titular / Registrant - Portugalmail - Comunicações S.A. - Rua Ricardo Severo, Nº 3 - 5º Dto. - - 4050-515 Porto - PT - Email: registos@portugalmail.pt - -Entidade Gestora / Billing Contact - Portugalmail - Comunicações S.A. - Email: registos@portugalmail.pt - -Responsável Técnico / Tech Contact - Portugalmail - Comunicações S.A. - Email: registos@portugalmail.pt - -Nameserver Information - - - +Domain: wiki.pt +Domain Status: Reserved +Creation Date: 07/05/2015 23:40:09 +Expiration Date: 06/05/2026 23:59:09 +Owner Name: +Owner Address: +Owner Locality: +Owner ZipCode: +Owner Locality ZipCode: +Owner Country Code: +Owner Email: +Admin Name: SOOMA.COM - WEB SERVICES, LDA +Admin Address: Rua Dom João I 99 +Admin Locality: Porto +Admin ZipCode: 4450-164 +Admin Locality ZipCode: Matosinhos +Admin Country Code: PT +Admin Email: gestao.dominios@sooma.com,daf@sooma.com diff --git a/spec/whois/parsers/responses/whois.dns.pt/pt/property_nameservers_spec.rb b/spec/whois/parsers/responses/whois.dns.pt/pt/property_nameservers_spec.rb deleted file mode 100644 index 955b40d7..00000000 --- a/spec/whois/parsers/responses/whois.dns.pt/pt/property_nameservers_spec.rb +++ /dev/null @@ -1,33 +0,0 @@ -# This file is autogenerated. Do not edit it manually. -# If you want change the content of this file, edit -# -# /spec/fixtures/responses/whois.dns.pt/pt/property_nameservers.expected -# -# and regenerate the tests with the following rake task -# -# $ rake spec:generate -# - -require 'spec_helper' - -describe "whois.dns.pt", :aggregate_failures do - - subject do - file = fixture("responses", "whois.dns.pt/pt/property_nameservers.txt") - part = Whois::Record::Part.new(body: File.read(file), host: "whois.dns.pt") - Whois::Parser.parser_for(part) - end - - it "matches property_nameservers.expected" do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers.size).to eq(4) - expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[0].name).to eq("ns4.google.com") - expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[1].name).to eq("ns2.google.com") - expect(subject.nameservers[2]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[2].name).to eq("ns1.google.com") - expect(subject.nameservers[3]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[3].name).to eq("ns3.google.com") - end -end diff --git a/spec/whois/parsers/responses/whois.dns.pt/pt/property_status_techpro_spec.rb b/spec/whois/parsers/responses/whois.dns.pt/pt/property_status_techpro_spec.rb deleted file mode 100644 index 1eef17ea..00000000 --- a/spec/whois/parsers/responses/whois.dns.pt/pt/property_status_techpro_spec.rb +++ /dev/null @@ -1,26 +0,0 @@ -# This file is autogenerated. Do not edit it manually. -# If you want change the content of this file, edit -# -# /spec/fixtures/responses/whois.dns.pt/pt/property_status_techpro.expected -# -# and regenerate the tests with the following rake task -# -# $ rake spec:generate -# - -require 'spec_helper' - -describe "whois.dns.pt", :aggregate_failures do - - subject do - file = fixture("responses", "whois.dns.pt/pt/property_status_techpro.txt") - part = Whois::Record::Part.new(body: File.read(file), host: "whois.dns.pt") - Whois::Parser.parser_for(part) - end - - it "matches property_status_techpro.expected" do - expect(subject.status).to eq(:inactive) - expect(subject.available?).to eq(false) - expect(subject.registered?).to eq(true) - end -end diff --git a/spec/whois/parsers/responses/whois.dns.pt/pt/status_inactive_spec.rb b/spec/whois/parsers/responses/whois.dns.pt/pt/status_inactive_spec.rb deleted file mode 100644 index 305f06bd..00000000 --- a/spec/whois/parsers/responses/whois.dns.pt/pt/status_inactive_spec.rb +++ /dev/null @@ -1,33 +0,0 @@ -# This file is autogenerated. Do not edit it manually. -# If you want change the content of this file, edit -# -# /spec/fixtures/responses/whois.dns.pt/pt/status_inactive.expected -# -# and regenerate the tests with the following rake task -# -# $ rake spec:generate -# - -require 'spec_helper' - -describe "whois.dns.pt", :aggregate_failures do - - subject do - file = fixture("responses", "whois.dns.pt/pt/status_inactive.txt") - part = Whois::Record::Part.new(body: File.read(file), host: "whois.dns.pt") - Whois::Parser.parser_for(part) - end - - it "matches status_inactive.expected" do - expect(subject.status).to eq(:inactive) - expect(subject.available?).to eq(false) - expect(subject.registered?).to eq(true) - expect(subject.created_on).to be_a(Time) - expect(subject.created_on).to eq(DateTime.parse("2009-02-09 00:00:00 UTC")) - expect { subject.updated_on }.to raise_error(Whois::AttributeNotSupported) - expect(subject.expires_on).to be_a(Time) - expect(subject.expires_on).to eq(DateTime.parse("2014-03-01 00:00:00 UTC")) - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers.size).to eq(0) - end -end diff --git a/spec/whois/parsers/responses/whois.dns.pt/pt/status_registered_spec.rb b/spec/whois/parsers/responses/whois.dns.pt/pt/status_registered_spec.rb index 70317af8..e6a2f996 100644 --- a/spec/whois/parsers/responses/whois.dns.pt/pt/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.dns.pt/pt/status_registered_spec.rb @@ -26,16 +26,16 @@ expect(subject.created_on).to eq(DateTime.parse("2003-01-09 00:00:00 UTC")) expect { subject.updated_on }.to raise_error(Whois::AttributeNotSupported) expect(subject.expires_on).to be_a(Time) - expect(subject.expires_on).to eq(DateTime.parse("2015-02-28 00:00:00 UTC")) + expect(subject.expires_on).to eq(DateTime.parse("2023-02-28 23:59:00 UTC")) expect(subject.nameservers).to be_a(Array) expect(subject.nameservers.size).to eq(4) expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[0].name).to eq("ns4.google.com") + expect(subject.nameservers[0].name).to eq("ns3.google.com") expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[1].name).to eq("ns2.google.com") + expect(subject.nameservers[1].name).to eq("ns4.google.com") expect(subject.nameservers[2]).to be_a(Whois::Parser::Nameserver) expect(subject.nameservers[2].name).to eq("ns1.google.com") expect(subject.nameservers[3]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[3].name).to eq("ns3.google.com") + expect(subject.nameservers[3].name).to eq("ns2.google.com") end end diff --git a/spec/whois/parsers/responses/whois.dns.pt/pt/status_reserved_spec.rb b/spec/whois/parsers/responses/whois.dns.pt/pt/status_reserved_spec.rb index 96479daf..d7327ef3 100644 --- a/spec/whois/parsers/responses/whois.dns.pt/pt/status_reserved_spec.rb +++ b/spec/whois/parsers/responses/whois.dns.pt/pt/status_reserved_spec.rb @@ -23,9 +23,10 @@ expect(subject.available?).to eq(false) expect(subject.registered?).to eq(true) expect(subject.created_on).to be_a(Time) - expect(subject.created_on).to eq(DateTime.parse("2009-02-09 00:00:00 UTC")) + expect(subject.created_on).to eq(DateTime.parse("2015-05-07 23:40:09 UTC")) expect { subject.updated_on }.to raise_error(Whois::AttributeNotSupported) - expect(subject.expires_on).to eq(nil) + expect(subject.expires_on).to be_a(Time) + expect(subject.expires_on).to eq(DateTime.parse("2026-05-06 23:59:09 UTC")) expect(subject.nameservers).to be_a(Array) expect(subject.nameservers).to eq([]) end From 0880e37c6fbe5adbffa827602e8ee3b98b8f4724 Mon Sep 17 00:00:00 2001 From: Adrien Rey-Jarthon Date: Mon, 16 Jan 2023 19:14:59 +0100 Subject: [PATCH 22/29] FIX: Updated parser for .CL tld --- CHANGELOG.md | 1 + lib/whois/parsers/whois.nic.cl.rb | 47 +++++++++-------- .../whois.nic.cl/cl/status_available.expected | 8 --- .../whois.nic.cl/cl/status_available.txt | 9 +++- .../cl/status_registered.expected | 35 +++++++++---- .../whois.nic.cl/cl/status_registered.txt | 51 +++++++++---------- .../whois.nic.cl/cl/status_available_spec.rb | 2 - .../whois.nic.cl/cl/status_registered_spec.rb | 28 ++++++---- 8 files changed, 101 insertions(+), 80 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index bce3c0c8..369474b3 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,7 @@ This project uses [Semantic Versioning 2.0.0](http://semver.org/). #### Release 2.0.0 +- FIX: Updated parser for .CL tld - FIX: Updated parser for .PT tld - CHANGED: Adding ruby 3 to the test suite + updating jruby and remove it from the allowed failures - FIX: Fixed .SO parser not loading correctly under jRuby diff --git a/lib/whois/parsers/whois.nic.cl.rb b/lib/whois/parsers/whois.nic.cl.rb index 28134bd9..334dbe2e 100644 --- a/lib/whois/parsers/whois.nic.cl.rb +++ b/lib/whois/parsers/whois.nic.cl.rb @@ -18,14 +18,12 @@ class Parsers # # Parser for the whois.nic.cl server. # - # NOTE: This parser is just a stub and provides only a few basic methods - # to check for domain availability and get domain status. - # Please consider to contribute implementing missing methods. - # See WhoisNicIt parser for an explanation of all available methods - # and examples. - # class WhoisNicCl < Base + property_supported :domain do + content_for_scanner.slice(/Domain name:\s+(.+?)$/, 1) + end + property_supported :status do if available? :available @@ -35,33 +33,40 @@ class WhoisNicCl < Base end property_supported :available? do - !!(content_for_scanner =~ /^(.+?): no existe$/) + !!(content_for_scanner =~ /^(.+?): no entries found.$/) end property_supported :registered? do !available? end + property_supported :registrant_contacts do + Parser::Contact.new(type: Parser::Contact::TYPE_REGISTRANT, + name: content_for_scanner[/Registrant name:\s+(.+?)$/, 1], + organization: content_for_scanner[/Registrant organisation:\s+(.+?)$/, 1]) + end - property_not_supported :created_on + property_supported :registrar do + Parser::Registrar.new(name: content_for_scanner[/Registrar name:\s+(.+?)$/, 1], + url: content_for_scanner[/Registrar URL:\s+(.+?)$/, 1]) + end - # TODO: custom date format with foreign month names - # property_supported :updated_on do - # if content_for_scanner =~ /changed:\s+(.*)\n/ - # parse_time($1.split(" ", 2).last) - # end - # end + property_supported :created_on do + if content_for_scanner =~ /Creation date:\s+(.*)\n/ + parse_time($1) + end + end - property_not_supported :expires_on + property_supported :expires_on do + if content_for_scanner =~ /Expiration date:\s+(.*)\n/ + parse_time($1) + end + end property_supported :nameservers do - if content_for_scanner =~ /Servidores de nombre \(Domain servers\):\n((.+\n)+)\n/ - ::Regexp.last_match(1).split("\n").map do |line| - line.strip! - line =~ /(.+) \((.+)\)/ - Parser::Nameserver.new(:name => ::Regexp.last_match(1), :ipv4 => ::Regexp.last_match(2)) - end + content_for_scanner.scan(/Name server:\s+(.+)\n/).flatten.map do |name| + Parser::Nameserver.new(name: name.downcase) end end diff --git a/spec/fixtures/responses/whois.nic.cl/cl/status_available.expected b/spec/fixtures/responses/whois.nic.cl/cl/status_available.expected index 6d42b24f..30255cc4 100644 --- a/spec/fixtures/responses/whois.nic.cl/cl/status_available.expected +++ b/spec/fixtures/responses/whois.nic.cl/cl/status_available.expected @@ -7,14 +7,6 @@ #registered? %s == false - -#created_on - %s %ERROR{AttributeNotSupported} - -#expires_on - %s %ERROR{AttributeNotSupported} - - #nameservers %s %CLASS{array} %s == [] diff --git a/spec/fixtures/responses/whois.nic.cl/cl/status_available.txt b/spec/fixtures/responses/whois.nic.cl/cl/status_available.txt index 304dfe66..7298f249 100644 --- a/spec/fixtures/responses/whois.nic.cl/cl/status_available.txt +++ b/spec/fixtures/responses/whois.nic.cl/cl/status_available.txt @@ -1 +1,8 @@ -u34jedzcq.cl: no existe +%% +%% This is the NIC Chile Whois server (whois.nic.cl). +%% +%% Rights restricted by copyright. +%% See https://www.nic.cl/normativa/politica-publicacion-de-datos-cl.pdf +%% + +u34jedzcq.cl: no entries found. diff --git a/spec/fixtures/responses/whois.nic.cl/cl/status_registered.expected b/spec/fixtures/responses/whois.nic.cl/cl/status_registered.expected index bd6ea56c..adabe18d 100644 --- a/spec/fixtures/responses/whois.nic.cl/cl/status_registered.expected +++ b/spec/fixtures/responses/whois.nic.cl/cl/status_registered.expected @@ -1,3 +1,7 @@ +#domain + %s == "google.cl" + + #status %s == :registered @@ -8,24 +12,35 @@ %s == true +#registrar + %s %CLASS{registrar} + %s.name == "MarkMonitor Inc." + %s.url == "https://markmonitor.com/" + +#registrant_contacts + %s %CLASS{array} + %s %SIZE{1} + %s[0] %CLASS{contact} + %s[0].type == Whois::Parser::Contact::TYPE_REGISTRANT + %s[0].name == "Google LLC" + %s[0].organization == "Google LLC" + #created_on - %s %ERROR{AttributeNotSupported} + %s %CLASS{time} + %s %TIME{2002-10-22 20:48:23 GMT} #expires_on - %s %ERROR{AttributeNotSupported} + %s %CLASS{time} + %s %TIME{2023-11-20 17:48:02 GMT} #nameservers %s %CLASS{array} %s %SIZE{4} %s[0] %CLASS{nameserver} - %s[0].name == "ns3.google.com" - %s[0].ipv4 == "216.239.36.10" + %s[0].name == "ns1.google.com" %s[1] %CLASS{nameserver} - %s[1].name == "ns4.google.com" - %s[1].ipv4 == "216.239.38.10" + %s[1].name == "ns2.google.com" %s[2] %CLASS{nameserver} - %s[2].name == "ns1.google.com" - %s[2].ipv4 == "216.239.32.10" + %s[2].name == "ns3.google.com" %s[3] %CLASS{nameserver} - %s[3].name == "ns2.google.com" - %s[3].ipv4 == "216.239.34.10" + %s[3].name == "ns4.google.com" diff --git a/spec/fixtures/responses/whois.nic.cl/cl/status_registered.txt b/spec/fixtures/responses/whois.nic.cl/cl/status_registered.txt index 22dccf33..0b276168 100644 --- a/spec/fixtures/responses/whois.nic.cl/cl/status_registered.txt +++ b/spec/fixtures/responses/whois.nic.cl/cl/status_registered.txt @@ -1,28 +1,23 @@ -google.cl: - -ACE: google.cl (RFC-3490, RFC-3491, RFC-3492) - -Google Inc. Representada por NameAction Chile S.A. (ASESORIAS NAMEACTION CHILE LIMITADA) - -Contacto Administrativo (Administrative Contact): - Nombre : Markmonitor Tech - Organización: Markmonitor - -Contacto Técnico (Technical Contact): - Nombre : Markmonitor Tech - Organización: MarkMonitor - -Servidores de nombre (Domain servers): - ns3.google.com (216.239.36.10) - ns4.google.com (216.239.38.10) - ns1.google.com (216.239.32.10) - ns2.google.com (216.239.34.10) - -Última modificación al formulario - (Database last updated on): 23 de agosto de 2012 (10:10:08 GMT) - -Más información (More information): - http://www.nic.cl/registry/Whois.do?d=google.cl - -Este mensajes está impreso en ISO-8859-1 -(This message is printed in ISO-8859-1) +%% +%% This is the NIC Chile Whois server (whois.nic.cl). +%% +%% Rights restricted by copyright. +%% See https://www.nic.cl/normativa/politica-publicacion-de-datos-cl.pdf +%% + +Domain name: google.cl +Registrant name: Google LLC +Registrant organisation: Google LLC +Registrar name: MarkMonitor Inc. +Registrar URL: https://markmonitor.com/ +Creation date: 2002-10-22 17:48:23 CLST +Expiration date: 2023-11-20 14:48:02 CLST +Name server: ns1.google.com +Name server: ns2.google.com +Name server: ns3.google.com +Name server: ns4.google.com + +%% +%% For communication with domain contacts please use website. +%% See https://www.nic.cl/registry/Whois.do?d=google.cl +%% \ No newline at end of file diff --git a/spec/whois/parsers/responses/whois.nic.cl/cl/status_available_spec.rb b/spec/whois/parsers/responses/whois.nic.cl/cl/status_available_spec.rb index 8f2d0fcc..9df5f31b 100644 --- a/spec/whois/parsers/responses/whois.nic.cl/cl/status_available_spec.rb +++ b/spec/whois/parsers/responses/whois.nic.cl/cl/status_available_spec.rb @@ -22,8 +22,6 @@ expect(subject.status).to eq(:available) expect(subject.available?).to eq(true) expect(subject.registered?).to eq(false) - expect { subject.created_on }.to raise_error(Whois::AttributeNotSupported) - expect { subject.expires_on }.to raise_error(Whois::AttributeNotSupported) expect(subject.nameservers).to be_a(Array) expect(subject.nameservers).to eq([]) end diff --git a/spec/whois/parsers/responses/whois.nic.cl/cl/status_registered_spec.rb b/spec/whois/parsers/responses/whois.nic.cl/cl/status_registered_spec.rb index 9f71bc5c..b9ee90b4 100644 --- a/spec/whois/parsers/responses/whois.nic.cl/cl/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.nic.cl/cl/status_registered_spec.rb @@ -19,24 +19,32 @@ end it "matches status_registered.expected" do + expect(subject.domain).to eq("google.cl") expect(subject.status).to eq(:registered) expect(subject.available?).to eq(false) expect(subject.registered?).to eq(true) - expect { subject.created_on }.to raise_error(Whois::AttributeNotSupported) - expect { subject.expires_on }.to raise_error(Whois::AttributeNotSupported) + expect(subject.registrar).to be_a(Whois::Parser::Registrar) + expect(subject.registrar.name).to eq("MarkMonitor Inc.") + expect(subject.registrar.url).to eq("https://markmonitor.com/") + expect(subject.registrant_contacts).to be_a(Array) + expect(subject.registrant_contacts.size).to eq(1) + expect(subject.registrant_contacts[0]).to be_a(Whois::Parser::Contact) + expect(subject.registrant_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_REGISTRANT) + expect(subject.registrant_contacts[0].name).to eq("Google LLC") + expect(subject.registrant_contacts[0].organization).to eq("Google LLC") + expect(subject.created_on).to be_a(Time) + expect(subject.created_on).to eq(DateTime.parse("2002-10-22 20:48:23 GMT")) + expect(subject.expires_on).to be_a(Time) + expect(subject.expires_on).to eq(DateTime.parse("2023-11-20 17:48:02 GMT")) expect(subject.nameservers).to be_a(Array) expect(subject.nameservers.size).to eq(4) expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[0].name).to eq("ns3.google.com") - expect(subject.nameservers[0].ipv4).to eq("216.239.36.10") + expect(subject.nameservers[0].name).to eq("ns1.google.com") expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[1].name).to eq("ns4.google.com") - expect(subject.nameservers[1].ipv4).to eq("216.239.38.10") + expect(subject.nameservers[1].name).to eq("ns2.google.com") expect(subject.nameservers[2]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[2].name).to eq("ns1.google.com") - expect(subject.nameservers[2].ipv4).to eq("216.239.32.10") + expect(subject.nameservers[2].name).to eq("ns3.google.com") expect(subject.nameservers[3]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[3].name).to eq("ns2.google.com") - expect(subject.nameservers[3].ipv4).to eq("216.239.34.10") + expect(subject.nameservers[3].name).to eq("ns4.google.com") end end From 04e93b49b10472e536505885ed3ace15c3b5f64c Mon Sep 17 00:00:00 2001 From: Adrien Rey-Jarthon Date: Mon, 16 Jan 2023 20:40:52 +0100 Subject: [PATCH 23/29] FIX: Updated parser for .SO tld --- CHANGELOG.md | 1 + lib/whois/parsers/whois.nic.so.rb | 54 ++------------- .../whois.nic.so/so/status_available.expected | 5 +- .../whois.nic.so/so/status_available.txt | 9 ++- .../so/status_registered.expected | 68 ++++++++++++++++-- .../whois.nic.so/so/status_registered.txt | 69 ++++++++++++++----- .../whois.nic.so/so/status_available_spec.rb | 3 +- .../whois.nic.so/so/status_registered_spec.rb | 56 +++++++++++++-- utils/mkwhois.rb | 2 +- 9 files changed, 191 insertions(+), 76 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 369474b3..026a6d50 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,7 @@ This project uses [Semantic Versioning 2.0.0](http://semver.org/). #### Release 2.0.0 +- FIX: Updated parser for .SO tld - FIX: Updated parser for .CL tld - FIX: Updated parser for .PT tld - CHANGED: Adding ruby 3 to the test suite + updating jruby and remove it from the allowed failures diff --git a/lib/whois/parsers/whois.nic.so.rb b/lib/whois/parsers/whois.nic.so.rb index efa1af97..1ac08a66 100644 --- a/lib/whois/parsers/whois.nic.so.rb +++ b/lib/whois/parsers/whois.nic.so.rb @@ -6,64 +6,22 @@ # Copyright (c) 2009-2022 Simone Carletti #++ - -require_relative 'base' - +require_relative 'base_icann_compliant' module Whois class Parsers - # # = whois.nic.so parser # # Parser for the whois.nic.so server. # - # NOTE: This parser is just a stub and provides only a few basic methods - # to check for domain availability and get domain status. - # Please consider to contribute implementing missing methods. - # See WhoisNicIt parser for an explanation of all available methods - # and examples. # - class WhoisNicSo < Base - - property_supported :status do - content_for_scanner.scan(/Status:\s+(.+?)\n/).flatten - end - - property_supported :available? do - !!(content_for_scanner =~ /^Not found: (.+?)$/) - end - - property_supported :registered? do - !available? - end - - - property_supported :created_on do - if content_for_scanner =~ /Creation Date:\s+(.+)\n/ - parse_time(::Regexp.last_match(1)) - end - end - - property_supported :updated_on do - if content_for_scanner =~ /Last Updated On:\s+(.+)\n/ - parse_time(::Regexp.last_match(1)) - end - end - - property_supported :expires_on do - if content_for_scanner =~ /Expiration Date:\s+(.+)\n/ - parse_time(::Regexp.last_match(1)) - end - end - - - property_supported :nameservers do - content_for_scanner.scan(/Name Server:\s+(.+)\n/).flatten.map do |name| - Parser::Nameserver.new(:name => name) - end - end + class WhoisNicSo < BaseIcannCompliant + include Scanners::Scannable + self.scanner = Scanners::BaseIcannCompliant, { + pattern_available: /^Domain Status: No Object Found$/ + } end end diff --git a/spec/fixtures/responses/whois.nic.so/so/status_available.expected b/spec/fixtures/responses/whois.nic.so/so/status_available.expected index 03cb4d2b..1b4217a2 100644 --- a/spec/fixtures/responses/whois.nic.so/so/status_available.expected +++ b/spec/fixtures/responses/whois.nic.so/so/status_available.expected @@ -1,5 +1,8 @@ +#domain + %s == "u34jedzcq.so" + #status - %s == [] + %s == :available #available? %s == true diff --git a/spec/fixtures/responses/whois.nic.so/so/status_available.txt b/spec/fixtures/responses/whois.nic.so/so/status_available.txt index d3c062ff..a27b4bb0 100644 --- a/spec/fixtures/responses/whois.nic.so/so/status_available.txt +++ b/spec/fixtures/responses/whois.nic.so/so/status_available.txt @@ -1 +1,8 @@ -Not found: u34jedzcq.so +Domain Name: u34jedzcq.so +Domain Status: No Object Found +>>> Last update of WHOIS database: 2023-01-16T18:45:24.287Z <<< + + +TERMS OF USE: You are not authorized to access or query our WHOIS database through the use of electronic processes that are high-volume and automated. This WHOIS database is provided by as a service to the internet community. + +The data is for information purposes only. We do not guarantee its accuracy. By submitting a WHOIS query, you agree to abide by the following terms of use: You agree that you may use this Data only for lawful purposes and that under no circumstances will you use this Data to: (1) allow, enable, or otherwise support the transmission of mass unsolicited, commercial advertising or solicitations via e-mail, telephone, or facsimile; or (2) enable high volume, automated, electronic processes. The compilation, repackaging, dissemination or other use of this Data is expressly prohibited. \ No newline at end of file diff --git a/spec/fixtures/responses/whois.nic.so/so/status_registered.expected b/spec/fixtures/responses/whois.nic.so/so/status_registered.expected index 1a157bf4..677500e5 100644 --- a/spec/fixtures/responses/whois.nic.so/so/status_registered.expected +++ b/spec/fixtures/responses/whois.nic.so/so/status_registered.expected @@ -1,5 +1,12 @@ +#domain + %s == "google.so" + +#domain_id + %s == "34544-sonic" + + #status - %s == ["serverDeleteProhibited", "serverTransferProhibited"] + %s == :registered #available? %s == false @@ -10,16 +17,69 @@ #created_on %s %CLASS{time} - %s %TIME{2011-01-24 02:22:24 UTC} + %s %TIME{2011-01-24 00:00:00 UTC} #updated_on %s %CLASS{time} - %s %TIME{2011-01-25 04:20:26 UTC} + %s %TIME{2022-12-23 09:26:14 UTC} #expires_on %s %CLASS{time} - %s %TIME{2014-01-24 02:22:24 UTC} + %s %TIME{2024-01-24 00:00:00 UTC} + +#registrar + %s %CLASS{registrar} + %s.name == "Mark Monitor" + +#registrant_contacts + %s %CLASS{array} + %s %SIZE{1} + %s[0] %CLASS{contact} + %s[0].type == Whois::Parser::Contact::TYPE_REGISTRANT + %s[0].id == "CAKlg-SfRgX" + %s[0].name == "Domain Administrator" + %s[0].organization == "Google LLC" + %s[0].address == "1600 Amphitheatre Parkway" + %s[0].city == "Mountain View" + %s[0].zip == "94043" + %s[0].state == "CA" + %s[0].country == nil + %s[0].country_code == "US" + %s[0].phone == "+1.6502530000" + %s[0].fax == "+1.6502530001" + %s[0].email == "dns-admin@google.com" + +#admin_contacts + %s %CLASS{array} + %s %SIZE{1} + %s[0] %CLASS{contact} + %s[0].type == Whois::Parser::Contact::TYPE_ADMINISTRATIVE + %s[0].id == "ns66c-kLSXy" + %s[0].name == "Domain Administrator" + %s[0].organization == "Google LLC" + %s[0].address == "1600 Amphitheatre Parkway" + %s[0].city == "Mountain View" + %s[0].zip == "94043" + %s[0].state == "CA" + %s[0].country == nil + %s[0].country_code == "US" + %s[0].phone == "+1.6502530000" + %s[0].fax == "+1.6502530001" + %s[0].email == "dns-admin@google.com" +#technical_contacts + %s[0].id == "J8ANM-4ZMch" + %s[0].name == "Domain Administrator" + %s[0].organization == "Google LLC" + %s[0].address == "1600 Amphitheatre Parkway" + %s[0].city == "Mountain View" + %s[0].zip == "94043" + %s[0].state == "CA" + %s[0].country == nil + %s[0].country_code == "US" + %s[0].phone == "+1.6502530000" + %s[0].fax == "+1.6502530001" + %s[0].email == "dns-admin@google.com" #nameservers %s %CLASS{array} diff --git a/spec/fixtures/responses/whois.nic.so/so/status_registered.txt b/spec/fixtures/responses/whois.nic.so/so/status_registered.txt index a39cf6f2..6ee78cc5 100644 --- a/spec/fixtures/responses/whois.nic.so/so/status_registered.txt +++ b/spec/fixtures/responses/whois.nic.so/so/status_registered.txt @@ -1,22 +1,59 @@ -Whois Results for "google.so". - Domain Name: google.so -Creation Date: 2011-01-24T02:22:24.0Z -Last Updated On: 2011-01-25T04:20:26.0Z -Expiration Date: 2014-01-24T02:22:24.0Z -Sponsoring Registrar: MarkMonitor Inc. -Status: serverDeleteProhibited -Status: serverTransferProhibited -Registrant ID: mm-google -Admin Contact ID: mm-google -Billing Contact ID: so-mm-billing -Tech Contact ID: mm-google +Registry Domain ID: 34544-sonic +Registry WHOIS Server: whois.nic.so +Registrar URL: +Updated Date: 2022-12-23T09:26:14.78Z +Creation Date: 2011-01-24T00:00:00.0Z +Registry Expiry Date: 2024-01-24T00:00:00.0Z +Registrar Registration Expiration Date: 2024-01-24T00:00:00.0Z +Registrar: Mark Monitor +Registrar Abuse Contact Email: ccops@markmonitor.com +Registrar Abuse Contact Phone: +1.2083895740 +Domain Status: clientTransferProhibited https://icann.org/epp#clientTransferProhibited +Domain Status: clientUpdateProhibited https://icann.org/epp#clientUpdateProhibited +Domain Status: clientDeleteProhibited https://icann.org/epp#clientDeleteProhibited +Registry Registrant ID: CAKlg-SfRgX +Registrant Name: Domain Administrator +Registrant Organization: Google LLC +Registrant Street: 1600 Amphitheatre Parkway +Registrant City: Mountain View +Registrant State/Province: CA +Registrant Postal Code: 94043 +Registrant Country: US +Registrant Phone: +1.6502530000 +Registrant Fax: +1.6502530001 +Registrant Email: dns-admin@google.com +Registry Admin ID: ns66c-kLSXy +Admin Name: Domain Administrator +Admin Organization: Google LLC +Admin Street: 1600 Amphitheatre Parkway +Admin City: Mountain View +Admin State/Province: CA +Admin Postal Code: 94043 +Admin Country: US +Admin Phone: +1.6502530000 +Admin Fax: +1.6502530001 +Admin Email: dns-admin@google.com +Registry Tech ID: J8ANM-4ZMch +Tech Name: Domain Administrator +Tech Organization: Google LLC +Tech Street: 1600 Amphitheatre Parkway +Tech City: Mountain View +Tech State/Province: CA +Tech Postal Code: 94043 +Tech Country: US +Tech Phone: +1.6502530000 +Tech Fax: +1.6502530001 +Tech Email: dns-admin@google.com Name Server: ns1.google.com Name Server: ns2.google.com Name Server: ns3.google.com Name Server: ns4.google.com +DNSSEC: unsigned +>>> Last update of WHOIS database: 2023-01-16T18:45:24.287Z <<< + +For more information on Whois status codes, please visit https://icann.org/epp + +TERMS OF USE: You are not authorized to access or query our WHOIS database through the use of electronic processes that are high-volume and automated. This WHOIS database is provided by as a service to the internet community. -Access to WHOIS information is provided to assist persons in determining -the contents of a domain name registration record in the registry database. -The data in this record is provided for informational purposes only without -any accuracy guarantee. +The data is for information purposes only. We do not guarantee its accuracy. By submitting a WHOIS query, you agree to abide by the following terms of use: You agree that you may use this Data only for lawful purposes and that under no circumstances will you use this Data to: (1) allow, enable, or otherwise support the transmission of mass unsolicited, commercial advertising or solicitations via e-mail, telephone, or facsimile; or (2) enable high volume, automated, electronic processes. The compilation, repackaging, dissemination or other use of this Data is expressly prohibited. diff --git a/spec/whois/parsers/responses/whois.nic.so/so/status_available_spec.rb b/spec/whois/parsers/responses/whois.nic.so/so/status_available_spec.rb index 7a5ecef3..da969214 100644 --- a/spec/whois/parsers/responses/whois.nic.so/so/status_available_spec.rb +++ b/spec/whois/parsers/responses/whois.nic.so/so/status_available_spec.rb @@ -19,7 +19,8 @@ end it "matches status_available.expected" do - expect(subject.status).to eq([]) + expect(subject.domain).to eq("u34jedzcq.so") + expect(subject.status).to eq(:available) expect(subject.available?).to eq(true) expect(subject.registered?).to eq(false) expect(subject.created_on).to eq(nil) diff --git a/spec/whois/parsers/responses/whois.nic.so/so/status_registered_spec.rb b/spec/whois/parsers/responses/whois.nic.so/so/status_registered_spec.rb index 7a0e2191..2585c97d 100644 --- a/spec/whois/parsers/responses/whois.nic.so/so/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.nic.so/so/status_registered_spec.rb @@ -19,15 +19,63 @@ end it "matches status_registered.expected" do - expect(subject.status).to eq(["serverDeleteProhibited", "serverTransferProhibited"]) + expect(subject.domain).to eq("google.so") + expect(subject.domain_id).to eq("34544-sonic") + expect(subject.status).to eq(:registered) expect(subject.available?).to eq(false) expect(subject.registered?).to eq(true) expect(subject.created_on).to be_a(Time) - expect(subject.created_on).to eq(DateTime.parse("2011-01-24 02:22:24 UTC")) + expect(subject.created_on).to eq(DateTime.parse("2011-01-24 00:00:00 UTC")) expect(subject.updated_on).to be_a(Time) - expect(subject.updated_on).to eq(DateTime.parse("2011-01-25 04:20:26 UTC")) + expect(subject.updated_on).to eq(DateTime.parse("2022-12-23 09:26:14 UTC")) expect(subject.expires_on).to be_a(Time) - expect(subject.expires_on).to eq(DateTime.parse("2014-01-24 02:22:24 UTC")) + expect(subject.expires_on).to eq(DateTime.parse("2024-01-24 00:00:00 UTC")) + expect(subject.registrar).to be_a(Whois::Parser::Registrar) + expect(subject.registrar.name).to eq("Mark Monitor") + expect(subject.registrant_contacts).to be_a(Array) + expect(subject.registrant_contacts.size).to eq(1) + expect(subject.registrant_contacts[0]).to be_a(Whois::Parser::Contact) + expect(subject.registrant_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_REGISTRANT) + expect(subject.registrant_contacts[0].id).to eq("CAKlg-SfRgX") + expect(subject.registrant_contacts[0].name).to eq("Domain Administrator") + expect(subject.registrant_contacts[0].organization).to eq("Google LLC") + expect(subject.registrant_contacts[0].address).to eq("1600 Amphitheatre Parkway") + expect(subject.registrant_contacts[0].city).to eq("Mountain View") + expect(subject.registrant_contacts[0].zip).to eq("94043") + expect(subject.registrant_contacts[0].state).to eq("CA") + expect(subject.registrant_contacts[0].country).to eq(nil) + expect(subject.registrant_contacts[0].country_code).to eq("US") + expect(subject.registrant_contacts[0].phone).to eq("+1.6502530000") + expect(subject.registrant_contacts[0].fax).to eq("+1.6502530001") + expect(subject.registrant_contacts[0].email).to eq("dns-admin@google.com") + expect(subject.admin_contacts).to be_a(Array) + expect(subject.admin_contacts.size).to eq(1) + expect(subject.admin_contacts[0]).to be_a(Whois::Parser::Contact) + expect(subject.admin_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_ADMINISTRATIVE) + expect(subject.admin_contacts[0].id).to eq("ns66c-kLSXy") + expect(subject.admin_contacts[0].name).to eq("Domain Administrator") + expect(subject.admin_contacts[0].organization).to eq("Google LLC") + expect(subject.admin_contacts[0].address).to eq("1600 Amphitheatre Parkway") + expect(subject.admin_contacts[0].city).to eq("Mountain View") + expect(subject.admin_contacts[0].zip).to eq("94043") + expect(subject.admin_contacts[0].state).to eq("CA") + expect(subject.admin_contacts[0].country).to eq(nil) + expect(subject.admin_contacts[0].country_code).to eq("US") + expect(subject.admin_contacts[0].phone).to eq("+1.6502530000") + expect(subject.admin_contacts[0].fax).to eq("+1.6502530001") + expect(subject.admin_contacts[0].email).to eq("dns-admin@google.com") + expect(subject.technical_contacts[0].id).to eq("J8ANM-4ZMch") + expect(subject.technical_contacts[0].name).to eq("Domain Administrator") + expect(subject.technical_contacts[0].organization).to eq("Google LLC") + expect(subject.technical_contacts[0].address).to eq("1600 Amphitheatre Parkway") + expect(subject.technical_contacts[0].city).to eq("Mountain View") + expect(subject.technical_contacts[0].zip).to eq("94043") + expect(subject.technical_contacts[0].state).to eq("CA") + expect(subject.technical_contacts[0].country).to eq(nil) + expect(subject.technical_contacts[0].country_code).to eq("US") + expect(subject.technical_contacts[0].phone).to eq("+1.6502530000") + expect(subject.technical_contacts[0].fax).to eq("+1.6502530001") + expect(subject.technical_contacts[0].email).to eq("dns-admin@google.com") expect(subject.nameservers).to be_a(Array) expect(subject.nameservers.size).to eq(4) expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) diff --git a/utils/mkwhois.rb b/utils/mkwhois.rb index 7ef228ef..2c09fb91 100755 --- a/utils/mkwhois.rb +++ b/utils/mkwhois.rb @@ -1,4 +1,4 @@ -#!/usr/bin/env ruby -w +#!/usr/bin/env ruby # Usage: # From 99b510c4ccb0c64dd0c5995c1632af8080f3668c Mon Sep 17 00:00:00 2001 From: Adrien Rey-Jarthon Date: Tue, 14 Mar 2023 16:42:57 +0100 Subject: [PATCH 24/29] Fixed support for all Donuts Inc. TLDs as they rebranded to Identity Digital Inc. --- CHANGELOG.md | 1 + lib/whois/parser.rb | 2 +- .../whois.nic.bike/bike/status_available.txt | 5 ++- .../bike/status_registered.expected | 26 ++++++------ .../whois.nic.bike/bike/status_registered.txt | 41 +++++++++---------- .../systems/status_available.txt | 4 +- .../systems/status_available_premium.txt | 7 ++-- .../systems/status_registered.expected | 2 +- .../systems/status_registered.txt | 9 ++-- .../systems/status_reserved.txt | 6 ++- .../travel/status_available.txt | 5 ++- .../travel/status_registered.expected | 6 +-- .../travel/status_registered.txt | 14 +++---- .../world/status_available.txt | 4 +- .../world/status_registered.expected | 4 +- .../world/status_registered.txt | 9 ++-- spec/whois/parser_spec.rb | 2 +- .../bike/status_registered_spec.rb | 26 ++++++------ .../systems/status_registered_spec.rb | 2 +- .../travel/status_registered_spec.rb | 6 +-- .../world/status_registered_spec.rb | 4 +- 21 files changed, 97 insertions(+), 88 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 026a6d50..a2d785df 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,7 @@ This project uses [Semantic Versioning 2.0.0](http://semver.org/). #### Release 2.0.0 +- FIX: Fixed support for all Donuts Inc. TLDs as they rebranded to Identity Digital Inc. - FIX: Updated parser for .SO tld - FIX: Updated parser for .CL tld - FIX: Updated parser for .PT tld diff --git a/lib/whois/parser.rb b/lib/whois/parser.rb index 2f5539a1..8d88c6e2 100644 --- a/lib/whois/parser.rb +++ b/lib/whois/parser.rb @@ -138,7 +138,7 @@ def self.parser_klass(part) rescue LoadError # Some WHOIS services like Donuts Inc covers hundred of TLDs (https://donuts.domains/what-we-do/top-level-domain-portfolio/) # But using one host per TLD, so in this case it's easier to match on the disclaimer directly to cover all hosts - if part.body&.include?("Terms of Use: Donuts Inc.") + if part.body&.include?("Terms of Use: Identity Digital Inc.") autoload("donuts_inc") elsif part.body&.include?("The Whois and RDAP services are provided by CentralNic") autoload("central_nic") diff --git a/spec/fixtures/responses/whois.nic.bike/bike/status_available.txt b/spec/fixtures/responses/whois.nic.bike/bike/status_available.txt index f017fcc4..7296b291 100644 --- a/spec/fixtures/responses/whois.nic.bike/bike/status_available.txt +++ b/spec/fixtures/responses/whois.nic.bike/bike/status_available.txt @@ -1,4 +1,5 @@ Domain not found. +>>> Last update of WHOIS database: 2023-03-14T15:25:05Z <<< -Terms of Use: Donuts Inc. provides this Whois service for information purposes, and to assist persons in obtaining information about or related to a domain name registration record. Donuts does not guarantee its accuracy. Users accessing the Donuts Whois service agree to use the data only for lawful purposes, and under no circumstances may this data be used 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 registrar's own existing customers and b) enable high volume, automated, electronic processes that send queries or data to the systems of Donuts or any ICANN-accredited registrar, except as reasonably necessary to register domain names or modify existing registrations. When using the Donuts Whois service, please consider the following: The Whois service is not a replacement for standard EPP commands to the SRS service. Whois is not considered authoritative for registered domain objects. The Whois service may be scheduled for downtime during production or OT&E maintenance periods. Queries to the Whois services are throttled. If too many queries are received from a single IP address within a specified time, the service will begin to reject further queries for a period of time to prevent disruption of Whois service access. Abuse of the Whois system through data mining is mitigated by detecting and limiting bulk query access from single sources. Where applicable, the presence of a [Non-Public Data] tag indicates that such data is not made publicly available due to applicable data privacy laws or requirements. Should you wish to contact the registrant, please refer to the Whois records available through the registrar URL listed above. Access to non-public data may be provided, upon request, where it can be reasonably confirmed that the requester holds a specific legitimate interest and a proper legal basis for accessing the withheld data -. Access to this data can be requested by submitting a request via the form found at https://donuts.domains/about/policies/whois-layered-access/ Donuts Inc. reserves the right to modify these terms at any time. By submitting this query, you agree to abide by this policy. +Terms of Use: Identity Digital Inc. provides this Whois service for information purposes, and to assist persons in obtaining information about or related to a domain name registration record. Identity Digital does not guarantee its accuracy. Users accessing the Identity Digital Whois service agree to use the data only for lawful purposes, and under no circumstances may this data be used 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 registrar's own existing customers and b) enable high volume, automated, electronic processes that send queries or data to the systems of Identity Digital or any ICANN-accredited registrar, except as reasonably necessary to register domain names or modify existing registrations. When using the Identity Digital Whois service, please consider the following: The Whois service is not a replacement for standard EPP commands to the SRS service. Whois is not considered authoritative for registered domain objects. The Whois service may be scheduled for downtime during production or OT&E maintenance periods. Queries to the Whois services are throttled. If too many queries are received from a single IP address within a specified time, the service will begin to reject further queries for a period of time to prevent disruption of Whois service access. Abuse of the Whois system through data mining is mitigated by detecting and limiting bulk query access from single sources. Where applicable, the presence of a [Non-Public Data] tag indicates that such data is not made publicly available due to applicable data privacy laws or requirements. Should you wish to contact the registrant, please refer to the Whois records available through the registrar URL listed above. Access to non-public data may be provided, upon request, where it can be reasonably confirmed that the requester holds a specific legitimate interest and a +proper legal basis for accessing the withheld data. Access to this data can be requested by submitting a request via the form found at https://www.identity.digital/about/policies/whois-layered-access/ Identity Digital Inc. reserves the right to modify these terms at any time. By submitting this query, you agree to abide by this policy. \ No newline at end of file diff --git a/spec/fixtures/responses/whois.nic.bike/bike/status_registered.expected b/spec/fixtures/responses/whois.nic.bike/bike/status_registered.expected index 41bf01c5..981aa57f 100644 --- a/spec/fixtures/responses/whois.nic.bike/bike/status_registered.expected +++ b/spec/fixtures/responses/whois.nic.bike/bike/status_registered.expected @@ -1,8 +1,8 @@ #domain - %s == "whereismy.bike" + %s == "bike.bike" #domain_id - %s == "e25432d5c94440c4a8ca0e5ecbc13904-DONUTS" + %s == "a864ce4015614eeda646a4121b91c784-DONUTS" #status @@ -17,22 +17,22 @@ #created_on %s %CLASS{time} - %s %TIME{2016-02-26 16:49:10 UTC} + %s %TIME{2015-07-19 17:01:03 UTC} #updated_on %s %CLASS{time} - %s %TIME{2021-04-12 16:49:14 UTC} + %s %TIME{2022-09-02 17:01:11 UTC} #expires_on %s %CLASS{time} - %s %TIME{2022-02-26 16:49:10 UTC} + %s %TIME{2023-07-19 17:01:03 UTC} #registrar %s %CLASS{registrar} - %s.id == "146" - %s.name == "GoDaddy.com, LLC" - %s.url == "http://www.godaddy.com/domains/search.aspx?ci=8990" + %s.id == "1011" + %s.name == "101domain GRS Limited" + %s.url == "http://101domain.com" #registrant_contacts @@ -42,12 +42,12 @@ %s[0].type == Whois::Parser::Contact::TYPE_REGISTRANT %s[0].id == "REDACTED FOR PRIVACY" %s[0].name == "REDACTED FOR PRIVACY" - %s[0].organization == "" + %s[0].organization == "Digital Privacy Corporation" %s[0].address == "REDACTED FOR PRIVACY" %s[0].city == "REDACTED FOR PRIVACY" %s[0].zip == "REDACTED FOR PRIVACY" - %s[0].state == "Croatia" - %s[0].country_code == "HR" + %s[0].state == "CA" + %s[0].country_code == "US" %s[0].phone == "REDACTED FOR PRIVACY ext: REDACTED FOR PRIVACY" %s[0].fax == "REDACTED FOR PRIVACY ext: REDACTED FOR PRIVACY" %s[0].email == "Please query the RDDS service of the Registrar of Record identified in this output for information on how to contact the Registrant, Admin, or Tech contact of the queried domain name." @@ -91,6 +91,6 @@ %s %CLASS{array} %s %SIZE{2} %s[0] %CLASS{nameserver} - %s[0].name == "ns67.domaincontrol.com" + %s[0].name == "ns1.gagarin2501.hospedagemdesites.ws" %s[1] %CLASS{nameserver} - %s[1].name == "ns68.domaincontrol.com" + %s[1].name == "ns2.gagarin2501.hospedagemdesites.ws" diff --git a/spec/fixtures/responses/whois.nic.bike/bike/status_registered.txt b/spec/fixtures/responses/whois.nic.bike/bike/status_registered.txt index d8ea350d..d1a67087 100644 --- a/spec/fixtures/responses/whois.nic.bike/bike/status_registered.txt +++ b/spec/fixtures/responses/whois.nic.bike/bike/status_registered.txt @@ -1,26 +1,23 @@ -Domain Name: whereismy.bike -Registry Domain ID: e25432d5c94440c4a8ca0e5ecbc13904-DONUTS -Registrar WHOIS Server: whois.godaddy.com/ -Registrar URL: http://www.godaddy.com/domains/search.aspx?ci=8990 -Updated Date: 2021-04-12T16:49:14Z -Creation Date: 2016-02-26T16:49:10Z -Registry Expiry Date: 2022-02-26T16:49:10Z -Registrar: GoDaddy.com, LLC -Registrar IANA ID: 146 -Registrar Abuse Contact Email: abuse@godaddy.com -Registrar Abuse Contact Phone: +1.4806242505 -Domain Status: clientDeleteProhibited https://icann.org/epp#clientDeleteProhibited -Domain Status: clientRenewProhibited https://icann.org/epp#clientRenewProhibited +Domain Name: bike.bike +Registry Domain ID: a864ce4015614eeda646a4121b91c784-DONUTS +Registrar WHOIS Server: whois.101domain.com +Registrar URL: http://101domain.com +Updated Date: 2022-09-02T17:01:11Z +Creation Date: 2015-07-19T17:01:03Z +Registry Expiry Date: 2023-07-19T17:01:03Z +Registrar: 101domain GRS Limited +Registrar IANA ID: 1011 +Registrar Abuse Contact Email: abuse@101domain.com +Registrar Abuse Contact Phone: +1.7604448674 Domain Status: clientTransferProhibited https://icann.org/epp#clientTransferProhibited -Domain Status: clientUpdateProhibited https://icann.org/epp#clientUpdateProhibited Registry Registrant ID: REDACTED FOR PRIVACY Registrant Name: REDACTED FOR PRIVACY -Registrant Organization: +Registrant Organization: Digital Privacy Corporation Registrant Street: REDACTED FOR PRIVACY Registrant City: REDACTED FOR PRIVACY -Registrant State/Province: Croatia +Registrant State/Province: CA Registrant Postal Code: REDACTED FOR PRIVACY -Registrant Country: HR +Registrant Country: US Registrant Phone: REDACTED FOR PRIVACY Registrant Phone Ext: REDACTED FOR PRIVACY Registrant Fax: REDACTED FOR PRIVACY @@ -52,13 +49,13 @@ Tech Phone Ext: REDACTED FOR PRIVACY Tech Fax: REDACTED FOR PRIVACY Tech Fax Ext: REDACTED FOR PRIVACY Tech Email: Please query the RDDS service of the Registrar of Record identified in this output for information on how to contact the Registrant, Admin, or Tech contact of the queried domain name. -Name Server: ns67.domaincontrol.com -Name Server: ns68.domaincontrol.com +Name Server: ns1.gagarin2501.hospedagemdesites.ws +Name Server: ns2.gagarin2501.hospedagemdesites.ws DNSSEC: unsigned URL of the ICANN Whois Inaccuracy Complaint Form: https://www.icann.org/wicf/ ->>> Last update of WHOIS database: 2021-12-06T16:26:41Z <<< +>>> Last update of WHOIS database: 2023-03-14T15:30:01Z <<< For more information on Whois status codes, please visit https://icann.org/epp -Terms of Use: Donuts Inc. provides this Whois service for information purposes, and to assist persons in obtaining information about or related to a domain name registration record. Donuts does not guarantee its accuracy. Users accessing the Donuts Whois service agree to use the data only for lawful purposes, and under no circumstances may this data be used 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 registrar's own existing customers and b) enable high volume, automated, electronic processes that send queries or data to the systems of Donuts or any ICANN-accredited registrar, except as reasonably necessary to register domain names or modify existing registrations. When using the Donuts Whois service, please consider the following: The Whois service is not a replacement for standard EPP commands to the SRS service. Whois is not considered authoritative for registered domain objects. The Whois service may be scheduled for downtime during production or OT&E maintenance periods. Queries to the Whois services are throttled. If too many queries are received from a single IP address within a specified time, the service will begin to reject further queries for a period of time to prevent disruption of Whois service access. Abuse of the Whois system through data mining is mitigated by detecting and limiting bulk query access from single sources. Where applicable, the presence of a [Non-Public Data] tag indicates that such data is not made publicly available due to applicable data privacy laws or requirements. Should you wish to contact the registrant, please refer to the Whois records available through the registrar URL listed above. Access to non-public data may be provided, upon request, where it can be reasonably confirmed that the requester holds a specific legitimate interest and a proper legal basis for accessing the withheld data -. Access to this data can be requested by submitting a request via the form found at https://donuts.domains/about/policies/whois-layered-access/ Donuts Inc. reserves the right to modify these terms at any time. By submitting this query, you agree to abide by this policy. +Terms of Use: Identity Digital Inc. provides this Whois service for information purposes, and to assist persons in obtaining information about or related to a domain name registration record. Identity Digital does not guarantee its accuracy. Users accessing the Identity Digital Whois service agree to use the data only for lawful purposes, and under no circumstances may this data be used 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 registrar's own existing customers and b) enable high volume, automated, electronic processes that send queries or data to the systems of Identity Digital or any ICANN-accredited registrar, except as reasonably necessary to register domain names or modify existing registrations. When using the Identity Digital Whois service, please consider the following: The Whois service is not a replacement for standard EPP commands to the SRS service. Whois is not considered authoritative for registered domain objects. The Whois service may be scheduled for downtime during production or OT&E maintenance periods. Queries to the Whois services are throttled. If too many queries are received from a single IP address within a specified time, the service will begin to reject further queries for a period of time to prevent disruption of Whois service access. Abuse of the Whois system through data mining is mitigated by detecting and limiting bulk query access from single sources. Where applicable, the presence of a [Non-Public Data] tag indicates that such data is not made publicly available due to applicable data privacy laws or requirements. Should you wish to contact the registrant, please refer to the Whois records available through the registrar URL listed above. Access to non-public data may be provided, upon request, where it can be reasonably confirmed that the requester holds a specific legitimate interest and a +proper legal basis for accessing the withheld data. Access to this data can be requested by submitting a request via the form found at https://www.identity.digital/about/policies/whois-layered-access/ Identity Digital Inc. reserves the right to modify these terms at any time. By submitting this query, you agree to abide by this policy. diff --git a/spec/fixtures/responses/whois.nic.systems/systems/status_available.txt b/spec/fixtures/responses/whois.nic.systems/systems/status_available.txt index 12727db3..7296b291 100644 --- a/spec/fixtures/responses/whois.nic.systems/systems/status_available.txt +++ b/spec/fixtures/responses/whois.nic.systems/systems/status_available.txt @@ -1,3 +1,5 @@ Domain not found. +>>> Last update of WHOIS database: 2023-03-14T15:25:05Z <<< -Terms of Use: Donuts Inc. provides this Whois service for information purposes, and to assist persons in obtaining information about or related to a domain name registration record. Donuts does not guarantee its accuracy. Users accessing the Donuts Whois service agree to use the data only for lawful purposes, and under no circumstances may this data be used 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 registrar's own existing customers and b) enable high volume, automated, electronic processes that send queries or data to the systems of Donuts or any ICANN-accredited registrar, except as reasonably necessary to register domain names or modify existing registrations. When using the Donuts Whois service, please consider the following: The Whois service is not a replacement for standard EPP commands to the SRS service. Whois is not considered authoritative for registered domain objects. The Whois service may be scheduled for downtime during production or OT&E maintenance periods. Queries to the Whois services are throttled. If too many queries are received from a single IP address within a specified time, the service will begin to reject further queries for a period of time to prevent disruption of Whois service access. Abuse of the Whois system through data mining is mitigated by detecting and limiting bulk query access from single sources. Where applicable, the presence of a [Non-Public Data] tag indicates that such data is not made publicly available due to applicable data privacy laws or requirements. Should you wish to contact the registrant, please refer to the Whois records available through the registrar URL listed above. Access to non-public data may be provided, upon request, where it can be reasonably confirmed that the requester holds a specific legitimate interest and a proper legal basis for accessing the withheld data. Access to this data can be requested by submitting a request via the form found at https://donuts.domains/about/policies/whois-layered-access/ Donuts Inc. reserves the right to modify these terms at any time. By submitting this query, you agree to abide by this policy. +Terms of Use: Identity Digital Inc. provides this Whois service for information purposes, and to assist persons in obtaining information about or related to a domain name registration record. Identity Digital does not guarantee its accuracy. Users accessing the Identity Digital Whois service agree to use the data only for lawful purposes, and under no circumstances may this data be used 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 registrar's own existing customers and b) enable high volume, automated, electronic processes that send queries or data to the systems of Identity Digital or any ICANN-accredited registrar, except as reasonably necessary to register domain names or modify existing registrations. When using the Identity Digital Whois service, please consider the following: The Whois service is not a replacement for standard EPP commands to the SRS service. Whois is not considered authoritative for registered domain objects. The Whois service may be scheduled for downtime during production or OT&E maintenance periods. Queries to the Whois services are throttled. If too many queries are received from a single IP address within a specified time, the service will begin to reject further queries for a period of time to prevent disruption of Whois service access. Abuse of the Whois system through data mining is mitigated by detecting and limiting bulk query access from single sources. Where applicable, the presence of a [Non-Public Data] tag indicates that such data is not made publicly available due to applicable data privacy laws or requirements. Should you wish to contact the registrant, please refer to the Whois records available through the registrar URL listed above. Access to non-public data may be provided, upon request, where it can be reasonably confirmed that the requester holds a specific legitimate interest and a +proper legal basis for accessing the withheld data. Access to this data can be requested by submitting a request via the form found at https://www.identity.digital/about/policies/whois-layered-access/ Identity Digital Inc. reserves the right to modify these terms at any time. By submitting this query, you agree to abide by this policy. \ No newline at end of file diff --git a/spec/fixtures/responses/whois.nic.systems/systems/status_available_premium.txt b/spec/fixtures/responses/whois.nic.systems/systems/status_available_premium.txt index 875b4662..c04eec43 100644 --- a/spec/fixtures/responses/whois.nic.systems/systems/status_available_premium.txt +++ b/spec/fixtures/responses/whois.nic.systems/systems/status_available_premium.txt @@ -1,5 +1,6 @@ Domain not found. -This premium domain is available for purchase. If you would like to make an offer, please contact platinums@donuts.email. ->>> Last update of WHOIS database: 2021-12-06T14:45:13Z <<< +This premium domain is available for purchase. If you would like to make an offer, please contact platinums@identity.digital. +>>> Last update of WHOIS database: 2023-03-14T15:37:28Z <<< -Terms of Use: Donuts Inc. provides this Whois service for information purposes, and to assist persons in obtaining information about or related to a domain name registration record. Donuts does not guarantee its accuracy. Users accessing the Donuts Whois service agree to use the data only for lawful purposes, and under no circumstances may this data be used 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 registrar's own existing customers and b) enable high volume, automated, electronic processes that send queries or data to the systems of Donuts or any ICANN-accredited registrar, except as reasonably necessary to register domain names or modify existing registrations. When using the Donuts Whois service, please consider the following: The Whois service is not a replacement for standard EPP commands to the SRS service. Whois is not considered authoritative for registered domain objects. The Whois service may be scheduled for downtime during production or OT&E maintenance periods. Queries to the Whois services are throttled. If too many queries are received from a single IP address within a specified time, the service will begin to reject further queries for a period of time to prevent disruption of Whois service access. Abuse of the Whois system through data mining is mitigated by detecting and limiting bulk query access from single sources. Where applicable, the presence of a [Non-Public Data] tag indicates that such data is not made publicly available due to applicable data privacy laws or requirements. Should you wish to contact the registrant, please refer to the Whois records available through the registrar URL listed above. Access to non-public data may be provided, upon request, where it can be reasonably confirmed that the requester holds a specific legitimate interest and a proper legal basis for accessing the withheld data. Access to this data can be requested by submitting a request via the form found at https://donuts.domains/about/policies/whois-layered-access/ Donuts Inc. reserves the right to modify these terms at any time. By submitting this query, you agree to abide by this policy. +Terms of Use: Identity Digital Inc. provides this Whois service for information purposes, and to assist persons in obtaining information about or related to a domain name registration record. Identity Digital does not guarantee its accuracy. Users accessing the Identity Digital Whois service agree to use the data only for lawful purposes, and under no circumstances may this data be used 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 registrar's own existing customers and b) enable high volume, automated, electronic processes that send queries or data to the systems of Identity Digital or any ICANN-accredited registrar, except as reasonably necessary to register domain names or modify existing registrations. When using the Identity Digital Whois service, please consider the following: The Whois service is not a replacement for standard EPP commands to the SRS service. Whois is not considered authoritative for registered domain objects. The Whois service may be scheduled for downtime during production or OT&E maintenance periods. Queries to the Whois services are throttled. If too many queries are received from a single IP address within a specified time, the service will begin to reject further queries for a period of time to prevent disruption of Whois service access. Abuse of the Whois system through data mining is mitigated by detecting and limiting bulk query access from single sources. Where applicable, the presence of a [Non-Public Data] tag indicates that such data is not made publicly available due to applicable data privacy laws or requirements. Should you wish to contact the registrant, please refer to the Whois records available through the registrar URL listed above. Access to non-public data may be provided, upon request, where it can be reasonably confirmed that the requester holds a specific legitimate interest and a +proper legal basis for accessing the withheld data. Access to this data can be requested by submitting a request via the form found at https://www.identity.digital/about/policies/whois-layered-access/ Identity Digital Inc. reserves the right to modify these terms at any time. By submitting this query, you agree to abide by this policy. \ No newline at end of file diff --git a/spec/fixtures/responses/whois.nic.systems/systems/status_registered.expected b/spec/fixtures/responses/whois.nic.systems/systems/status_registered.expected index 03023ff0..d7aa0874 100644 --- a/spec/fixtures/responses/whois.nic.systems/systems/status_registered.expected +++ b/spec/fixtures/responses/whois.nic.systems/systems/status_registered.expected @@ -32,7 +32,7 @@ %s %CLASS{registrar} %s.id == "9998" %s.name == "Donuts Internal (9998)" - %s.url == "http://www.donuts.co" + %s.url == "https://identity.digital" #registrant_contacts %s %CLASS{array} diff --git a/spec/fixtures/responses/whois.nic.systems/systems/status_registered.txt b/spec/fixtures/responses/whois.nic.systems/systems/status_registered.txt index 2df735a1..5905bf3e 100644 --- a/spec/fixtures/responses/whois.nic.systems/systems/status_registered.txt +++ b/spec/fixtures/responses/whois.nic.systems/systems/status_registered.txt @@ -1,7 +1,7 @@ Domain Name: donuts.systems Registry Domain ID: c73f4743486e4a1d8cb725fe0b0d26d7-DONUTS -Registrar WHOIS Server: http://www.donuts.co -Registrar URL: http://www.donuts.co +Registrar WHOIS Server: whois.identitydigital.services +Registrar URL: https://identity.digital Updated Date: 2018-02-07T18:00:53Z Creation Date: 2014-02-28T17:19:53Z Registry Expiry Date: 2024-02-28T17:19:53Z @@ -55,8 +55,9 @@ Name Server: ns-811.awsdns-37.net Name Server: ns-1597.awsdns-07.co.uk DNSSEC: unsigned URL of the ICANN Whois Inaccuracy Complaint Form: https://www.icann.org/wicf/ ->>> Last update of WHOIS database: 2021-12-06T14:44:44Z <<< +>>> Last update of WHOIS database: 2023-03-14T15:32:19Z <<< For more information on Whois status codes, please visit https://icann.org/epp -Terms of Use: Donuts Inc. provides this Whois service for information purposes, and to assist persons in obtaining information about or related to a domain name registration record. Donuts does not guarantee its accuracy. Users accessing the Donuts Whois service agree to use the data only for lawful purposes, and under no circumstances may this data be used 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 registrar's own existing customers and b) enable high volume, automated, electronic processes that send queries or data to the systems of Donuts or any ICANN-accredited registrar, except as reasonably necessary to register domain names or modify existing registrations. When using the Donuts Whois service, please consider the following: The Whois service is not a replacement for standard EPP commands to the SRS service. Whois is not considered authoritative for registered domain objects. The Whois service may be scheduled for downtime during production or OT&E maintenance periods. Queries to the Whois services are throttled. If too many queries are received from a single IP address within a specified time, the service will begin to reject further queries for a period of time to prevent disruption of Whois service access. Abuse of the Whois system through data mining is mitigated by detecting and limiting bulk query access from single sources. Where applicable, the presence of a [Non-Public Data] tag indicates that such data is not made publicly available due to applicable data privacy laws or requirements. Should you wish to contact the registrant, please refer to the Whois records available through the registrar URL listed above. Access to non-public data may be provided, upon request, where it can be reasonably confirmed that the requester holds a specific legitimate interest and a proper legal basis for accessing the withheld data. Access to this data can be requested by submitting a request via the form found at https://donuts.domains/about/policies/whois-layered-access/ Donuts Inc. reserves the right to modify these terms at any time. By submitting this query, you agree to abide by this policy. +Terms of Use: Identity Digital Inc. provides this Whois service for information purposes, and to assist persons in obtaining information about or related to a domain name registration record. Identity Digital does not guarantee its accuracy. Users accessing the Identity Digital Whois service agree to use the data only for lawful purposes, and under no circumstances may this data be used 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 registrar's own existing customers and b) enable high volume, automated, electronic processes that send queries or data to the systems of Identity Digital or any ICANN-accredited registrar, except as reasonably necessary to register domain names or modify existing registrations. When using the Identity Digital Whois service, please consider the following: The Whois service is not a replacement for standard EPP commands to the SRS service. Whois is not considered authoritative for registered domain objects. The Whois service may be scheduled for downtime during production or OT&E maintenance periods. Queries to the Whois services are throttled. If too many queries are received from a single IP address within a specified time, the service will begin to reject further queries for a period of time to prevent disruption of Whois service access. Abuse of the Whois system through data mining is mitigated by detecting and limiting bulk query access from single sources. Where applicable, the presence of a [Non-Public Data] tag indicates that such data is not made publicly available due to applicable data privacy laws or requirements. Should you wish to contact the registrant, please refer to the Whois records available through the registrar URL listed above. Access to non-public data may be provided, upon request, where it can be reasonably confirmed that the requester holds a specific legitimate interest and a +proper legal basis for accessing the withheld data. Access to this data can be requested by submitting a request via the form found at https://www.identity.digital/about/policies/whois-layered-access/ Identity Digital Inc. reserves the right to modify these terms at any time. By submitting this query, you agree to abide by this policy. diff --git a/spec/fixtures/responses/whois.nic.systems/systems/status_reserved.txt b/spec/fixtures/responses/whois.nic.systems/systems/status_reserved.txt index 18cacacb..09ca1d9a 100644 --- a/spec/fixtures/responses/whois.nic.systems/systems/status_reserved.txt +++ b/spec/fixtures/responses/whois.nic.systems/systems/status_reserved.txt @@ -1,3 +1,5 @@ -The registration of this domain is restricted, as it is protected by the Donuts DPML Brand Protection policy. Additional information can be found at https://donuts.domains/what-we-do/brand-protection. +The registration of this domain is restricted, as it is protected by the Identity Digital DPML Brand Protection policy. Additional information can be found at https://www.identity.digital/what-we-do/brand-protection. +>>> Last update of WHOIS database: 2023-03-14T15:27:37Z <<< -Terms of Use: Donuts Inc. provides this Whois service for information purposes, and to assist persons in obtaining information about or related to a domain name registration record. Donuts does not guarantee its accuracy. Users accessing the Donuts Whois service agree to use the data only for lawful purposes, and under no circumstances may this data be used 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 registrar's own existing customers and b) enable high volume, automated, electronic processes that send queries or data to the systems of Donuts or any ICANN-accredited registrar, except as reasonably necessary to register domain names or modify existing registrations. When using the Donuts Whois service, please consider the following: The Whois service is not a replacement for standard EPP commands to the SRS service. Whois is not considered authoritative for registered domain objects. The Whois service may be scheduled for downtime during production or OT&E maintenance periods. Queries to the Whois services are throttled. If too many queries are received from a single IP address within a specified time, the service will begin to reject further queries for a period of time to prevent disruption of Whois service access. Abuse of the Whois system through data mining is mitigated by detecting and limiting bulk query access from single sources. Where applicable, the presence of a [Non-Public Data] tag indicates that such data is not made publicly available due to applicable data privacy laws or requirements. Should you wish to contact the registrant, please refer to the Whois records available through the registrar URL listed above. Access to non-public data may be provided, upon request, where it can be reasonably confirmed that the requester holds a specific legitimate interest and a proper legal basis for accessing the withheld data. Access to this data can be requested by submitting a request via the form found at https://donuts.domains/about/policies/whois-layered-access/ Donuts Inc. reserves the right to modify these terms at any time. By submitting this query, you agree to abide by this policy. +Terms of Use: Identity Digital Inc. provides this Whois service for information purposes, and to assist persons in obtaining information about or related to a domain name registration record. Identity Digital does not guarantee its accuracy. Users accessing the Identity Digital Whois service agree to use the data only for lawful purposes, and under no circumstances may this data be used 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 registrar's own existing customers and b) enable high volume, automated, electronic processes that send queries or data to the systems of Identity Digital or any ICANN-accredited registrar, except as reasonably necessary to register domain names or modify existing registrations. When using the Identity Digital Whois service, please consider the following: The Whois service is not a replacement for standard EPP commands to the SRS service. Whois is not considered authoritative for registered domain objects. The Whois service may be scheduled for downtime during production or OT&E maintenance periods. Queries to the Whois services are throttled. If too many queries are received from a single IP address within a specified time, the service will begin to reject further queries for a period of time to prevent disruption of Whois service access. Abuse of the Whois system through data mining is mitigated by detecting and limiting bulk query access from single sources. Where applicable, the presence of a [Non-Public Data] tag indicates that such data is not made publicly available due to applicable data privacy laws or requirements. Should you wish to contact the registrant, please refer to the Whois records available through the registrar URL listed above. Access to non-public data may be provided, upon request, where it can be reasonably confirmed that the requester holds a specific legitimate interest and a +proper legal basis for accessing the withheld data. Access to this data can be requested by submitting a request via the form found at https://www.identity.digital/about/policies/whois-layered-access/ Identity Digital Inc. reserves the right to modify these terms at any time. By submitting this query, you agree to abide by this policy. diff --git a/spec/fixtures/responses/whois.nic.travel/travel/status_available.txt b/spec/fixtures/responses/whois.nic.travel/travel/status_available.txt index b04ddd66..f64ea3ea 100644 --- a/spec/fixtures/responses/whois.nic.travel/travel/status_available.txt +++ b/spec/fixtures/responses/whois.nic.travel/travel/status_available.txt @@ -1,4 +1,5 @@ Domain not found. +>>> Last update of WHOIS database: 2023-03-14T15:28:30Z <<< -Terms of Use: Donuts Inc. provides this Whois service for information purposes, and to assist persons in obtaining information about or related to a domain name registration record. Donuts does not guarantee its accuracy. Users accessing the Donuts Whois service agree to use the data only for lawful purposes, and under no circumstances may this data be used 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 registrar's own existing customers and b) enable high volume, automated, electronic processes that send queries or data to the systems of Donuts or any ICANN-accredited registrar, except as reasonably necessary to register domain names or modify existing registrations. When using the Donuts Whois service, please consider the following: The Whois service is not a replacement for standard EPP commands to the SRS service. Whois is not considered authoritative for registered domain objects. The Whois service may be scheduled for downtime during production or OT&E maintenance periods. Queries to the Whois services are throttled. If too many queries are received from a single IP address within a specified time, the service will begin to reject further queries for a period of time to prevent disruption of Whois service access. Abuse of the Whois system through data mining is mitigated by detecting and limiting bulk query access from single sources. Where applicable, the presence of a [Non-Public Data] tag indicates that such data is not made publicly available due to applicable data privacy laws or requirements. Should you wish to contact the registrant, please refer to the Whois records available through the registrar URL listed above. Access to non-public data may be provided, upon request, where it can be reasonably confirmed that the requester holds a specific legitimate interest and a proper legal basis for accessing the withheld data -. Access to this data can be requested by submitting a request via the form found at https://donuts.domains/about/policies/whois-layered-access/ Donuts Inc. reserves the right to modify these terms at any time. By submitting this query, you agree to abide by this policy. +Terms of Use: Identity Digital Inc. provides this Whois service for information purposes, and to assist persons in obtaining information about or related to a domain name registration record. Identity Digital does not guarantee its accuracy. Users accessing the Identity Digital Whois service agree to use the data only for lawful purposes, and under no circumstances may this data be used 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 registrar's own existing customers and b) enable high volume, automated, electronic processes that send queries or data to the systems of Identity Digital or any ICANN-accredited registrar, except as reasonably necessary to register domain names or modify existing registrations. When using the Identity Digital Whois service, please consider the following: The Whois service is not a replacement for standard EPP commands to the SRS service. Whois is not considered authoritative for registered domain objects. The Whois service may be scheduled for downtime during production or OT&E maintenance periods. Queries to the Whois services are throttled. If too many queries are received from a single IP address within a specified time, the service will begin to reject further queries for a period of time to prevent disruption of Whois service access. Abuse of the Whois system through data mining is mitigated by detecting and limiting bulk query access from single sources. Where applicable, the presence of a [Non-Public Data] tag indicates that such data is not made publicly available due to applicable data privacy laws or requirements. Should you wish to contact the registrant, please refer to the Whois records available through the registrar URL listed above. Access to non-public data may be provided, upon request, where it can be reasonably confirmed that the requester holds a specific legitimate interest and a +proper legal basis for accessing the withheld data. Access to this data can be requested by submitting a request via the form found at https://www.identity.digital/about/policies/whois-layered-access/ Identity Digital Inc. reserves the right to modify these terms at any time. By submitting this query, you agree to abide by this policy. diff --git a/spec/fixtures/responses/whois.nic.travel/travel/status_registered.expected b/spec/fixtures/responses/whois.nic.travel/travel/status_registered.expected index b78ea076..b05c1b1a 100644 --- a/spec/fixtures/responses/whois.nic.travel/travel/status_registered.expected +++ b/spec/fixtures/responses/whois.nic.travel/travel/status_registered.expected @@ -21,18 +21,18 @@ #updated_on %s %CLASS{time} - %s %TIME{2018-05-25 19:29:32 GMT} + %s %TIME{2022-11-18 00:00:14 GMT} #expires_on %s %CLASS{time} - %s %TIME{2022-10-03 23:59:59 GMT} + %s %TIME{2023-10-03 23:59:59 GMT} #registrar %s %CLASS{registrar} %s.id == "9998" %s.name == "Donuts Internal (9998)" - %s.url == "http://www.donuts.co" + %s.url == "https://identity.digital" #registrant_contacts %s %CLASS{array} diff --git a/spec/fixtures/responses/whois.nic.travel/travel/status_registered.txt b/spec/fixtures/responses/whois.nic.travel/travel/status_registered.txt index 8afebd69..974ec79f 100644 --- a/spec/fixtures/responses/whois.nic.travel/travel/status_registered.txt +++ b/spec/fixtures/responses/whois.nic.travel/travel/status_registered.txt @@ -1,10 +1,10 @@ Domain Name: travel.travel Registry Domain ID: ff0390f7114c4ad99ac46ae56c00300f-DONUTS -Registrar WHOIS Server: http://www.donuts.co -Registrar URL: http://www.donuts.co -Updated Date: 2018-05-25T19:29:32Z +Registrar WHOIS Server: whois.identitydigital.services +Registrar URL: https://identity.digital +Updated Date: 2022-11-18T00:00:14Z Creation Date: 2005-10-04T21:44:27Z -Registry Expiry Date: 2022-10-03T23:59:59Z +Registry Expiry Date: 2023-10-03T23:59:59Z Registrar: Donuts Internal (9998) Registrar IANA ID: 9998 Registrar Abuse Contact Email: @@ -55,9 +55,9 @@ Name Server: ns-935.awsdns-52.net Name Server: ns-1480.awsdns-57.org DNSSEC: unsigned URL of the ICANN Whois Inaccuracy Complaint Form: https://www.icann.org/wicf/ ->>> Last update of WHOIS database: 2021-12-06T22:42:44Z <<< +>>> Last update of WHOIS database: 2023-03-14T15:28:47Z <<< For more information on Whois status codes, please visit https://icann.org/epp -Terms of Use: Donuts Inc. provides this Whois service for information purposes, and to assist persons in obtaining information about or related to a domain name registration record. Donuts does not guarantee its accuracy. Users accessing the Donuts Whois service agree to use the data only for lawful purposes, and under no circumstances may this data be used 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 registrar's own existing customers and b) enable high volume, automated, electronic processes that send queries or data to the systems of Donuts or any ICANN-accredited registrar, except as reasonably necessary to register domain names or modify existing registrations. When using the Donuts Whois service, please consider the following: The Whois service is not a replacement for standard EPP commands to the SRS service. Whois is not considered authoritative for registered domain objects. The Whois service may be scheduled for downtime during production or OT&E maintenance periods. Queries to the Whois services are throttled. If too many queries are received from a single IP address within a specified time, the service will begin to reject further queries for a period of time to prevent disruption of Whois service access. Abuse of the Whois system through data mining is mitigated by detecting and limiting bulk query access from single sources. Where applicable, the presence of a [Non-Public Data] tag indicates that such data is not made publicly available due to applicable data privacy laws or requirements. Should you wish to contact the registrant, please refer to the Whois records available through the registrar URL listed above. Access to non-public data may be provided, upon request, where it can be reasonably confirmed that the requester holds a specific legitimate interest and a proper legal basis for accessing the withheld data -. Access to this data can be requested by submitting a request via the form found at https://donuts.domains/about/policies/whois-layered-access/ Donuts Inc. reserves the right to modify these terms at any time. By submitting this query, you agree to abide by this policy. +Terms of Use: Identity Digital Inc. provides this Whois service for information purposes, and to assist persons in obtaining information about or related to a domain name registration record. Identity Digital does not guarantee its accuracy. Users accessing the Identity Digital Whois service agree to use the data only for lawful purposes, and under no circumstances may this data be used 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 registrar's own existing customers and b) enable high volume, automated, electronic processes that send queries or data to the systems of Identity Digital or any ICANN-accredited registrar, except as reasonably necessary to register domain names or modify existing registrations. When using the Identity Digital Whois service, please consider the following: The Whois service is not a replacement for standard EPP commands to the SRS service. Whois is not considered authoritative for registered domain objects. The Whois service may be scheduled for downtime during production or OT&E maintenance periods. Queries to the Whois services are throttled. If too many queries are received from a single IP address within a specified time, the service will begin to reject further queries for a period of time to prevent disruption of Whois service access. Abuse of the Whois system through data mining is mitigated by detecting and limiting bulk query access from single sources. Where applicable, the presence of a [Non-Public Data] tag indicates that such data is not made publicly available due to applicable data privacy laws or requirements. Should you wish to contact the registrant, please refer to the Whois records available through the registrar URL listed above. Access to non-public data may be provided, upon request, where it can be reasonably confirmed that the requester holds a specific legitimate interest and a +proper legal basis for accessing the withheld data. Access to this data can be requested by submitting a request via the form found at https://www.identity.digital/about/policies/whois-layered-access/ Identity Digital Inc. reserves the right to modify these terms at any time. By submitting this query, you agree to abide by this policy. diff --git a/spec/fixtures/responses/whois.nic.world/world/status_available.txt b/spec/fixtures/responses/whois.nic.world/world/status_available.txt index 12727db3..cad3a491 100644 --- a/spec/fixtures/responses/whois.nic.world/world/status_available.txt +++ b/spec/fixtures/responses/whois.nic.world/world/status_available.txt @@ -1,3 +1,5 @@ Domain not found. +>>> Last update of WHOIS database: 2023-03-14T15:29:14Z <<< -Terms of Use: Donuts Inc. provides this Whois service for information purposes, and to assist persons in obtaining information about or related to a domain name registration record. Donuts does not guarantee its accuracy. Users accessing the Donuts Whois service agree to use the data only for lawful purposes, and under no circumstances may this data be used 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 registrar's own existing customers and b) enable high volume, automated, electronic processes that send queries or data to the systems of Donuts or any ICANN-accredited registrar, except as reasonably necessary to register domain names or modify existing registrations. When using the Donuts Whois service, please consider the following: The Whois service is not a replacement for standard EPP commands to the SRS service. Whois is not considered authoritative for registered domain objects. The Whois service may be scheduled for downtime during production or OT&E maintenance periods. Queries to the Whois services are throttled. If too many queries are received from a single IP address within a specified time, the service will begin to reject further queries for a period of time to prevent disruption of Whois service access. Abuse of the Whois system through data mining is mitigated by detecting and limiting bulk query access from single sources. Where applicable, the presence of a [Non-Public Data] tag indicates that such data is not made publicly available due to applicable data privacy laws or requirements. Should you wish to contact the registrant, please refer to the Whois records available through the registrar URL listed above. Access to non-public data may be provided, upon request, where it can be reasonably confirmed that the requester holds a specific legitimate interest and a proper legal basis for accessing the withheld data. Access to this data can be requested by submitting a request via the form found at https://donuts.domains/about/policies/whois-layered-access/ Donuts Inc. reserves the right to modify these terms at any time. By submitting this query, you agree to abide by this policy. +Terms of Use: Identity Digital Inc. provides this Whois service for information purposes, and to assist persons in obtaining information about or related to a domain name registration record. Identity Digital does not guarantee its accuracy. Users accessing the Identity Digital Whois service agree to use the data only for lawful purposes, and under no circumstances may this data be used 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 registrar's own existing customers and b) enable high volume, automated, electronic processes that send queries or data to the systems of Identity Digital or any ICANN-accredited registrar, except as reasonably necessary to register domain names or modify existing registrations. When using the Identity Digital Whois service, please consider the following: The Whois service is not a replacement for standard EPP commands to the SRS service. Whois is not considered authoritative for registered domain objects. The Whois service may be scheduled for downtime during production or OT&E maintenance periods. Queries to the Whois services are throttled. If too many queries are received from a single IP address within a specified time, the service will begin to reject further queries for a period of time to prevent disruption of Whois service access. Abuse of the Whois system through data mining is mitigated by detecting and limiting bulk query access from single sources. Where applicable, the presence of a [Non-Public Data] tag indicates that such data is not made publicly available due to applicable data privacy laws or requirements. Should you wish to contact the registrant, please refer to the Whois records available through the registrar URL listed above. Access to non-public data may be provided, upon request, where it can be reasonably confirmed that the requester holds a specific legitimate interest and a +proper legal basis for accessing the withheld data. Access to this data can be requested by submitting a request via the form found at https://www.identity.digital/about/policies/whois-layered-access/ Identity Digital Inc. reserves the right to modify these terms at any time. By submitting this query, you agree to abide by this policy. diff --git a/spec/fixtures/responses/whois.nic.world/world/status_registered.expected b/spec/fixtures/responses/whois.nic.world/world/status_registered.expected index bd139933..84acae52 100644 --- a/spec/fixtures/responses/whois.nic.world/world/status_registered.expected +++ b/spec/fixtures/responses/whois.nic.world/world/status_registered.expected @@ -21,11 +21,11 @@ #updated_on %s %CLASS{time} - %s %TIME{2021-10-06 14:58:38 GMT} + %s %TIME{2022-10-06 14:00:13 GMT} #expires_on %s %CLASS{time} - %s %TIME{2022-10-03 11:12:14 GMT} + %s %TIME{2023-10-03 11:12:14 GMT} #registrar diff --git a/spec/fixtures/responses/whois.nic.world/world/status_registered.txt b/spec/fixtures/responses/whois.nic.world/world/status_registered.txt index 13a74a8a..e40ca172 100644 --- a/spec/fixtures/responses/whois.nic.world/world/status_registered.txt +++ b/spec/fixtures/responses/whois.nic.world/world/status_registered.txt @@ -2,9 +2,9 @@ Domain Name: solex.world Registry Domain ID: 0bd73f47b47f436cac3ee5b20df18ef5-DONUTS Registrar WHOIS Server: whois.ovh.com Registrar URL: http://www.ovh.com -Updated Date: 2021-10-06T14:58:38Z +Updated Date: 2022-10-06T14:00:13Z Creation Date: 2017-10-03T11:12:14Z -Registry Expiry Date: 2022-10-03T11:12:14Z +Registry Expiry Date: 2023-10-03T11:12:14Z Registrar: OVH SAS Registrar IANA ID: 433 Registrar Abuse Contact Email: abuse@ovh.net @@ -54,8 +54,9 @@ Name Server: dns104.ovh.net Name Server: ns104.ovh.net DNSSEC: unsigned URL of the ICANN Whois Inaccuracy Complaint Form: https://www.icann.org/wicf/ ->>> Last update of WHOIS database: 2021-11-23T14:30:35Z <<< +>>> Last update of WHOIS database: 2023-03-14T15:29:28Z <<< For more information on Whois status codes, please visit https://icann.org/epp -Terms of Use: Donuts Inc. provides this Whois service for information purposes, and to assist persons in obtaining information about or related to a domain name registration record. Donuts does not guarantee its accuracy. Users accessing the Donuts Whois service agree to use the data only for lawful purposes, and under no circumstances may this data be used 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 registrar's own existing customers and b) enable high volume, automated, electronic processes that send queries or data to the systems of Donuts or any ICANN-accredited registrar, except as reasonably necessary to register domain names or modify existing registrations. When using the Donuts Whois service, please consider the following: The Whois service is not a replacement for standard EPP commands to the SRS service. Whois is not considered authoritative for registered domain objects. The Whois service may be scheduled for downtime during production or OT&E maintenance periods. Queries to the Whois services are throttled. If too many queries are received from a single IP address within a specified time, the service will begin to reject further queries for a period of time to prevent disruption of Whois service access. Abuse of the Whois system through data mining is mitigated by detecting and limiting bulk query access from single sources. Where applicable, the presence of a [Non-Public Data] tag indicates that such data is not made publicly available due to applicable data privacy laws or requirements. Should you wish to contact the registrant, please refer to the Whois records available through the registrar URL listed above. Access to non-public data may be provided, upon request, where it can be reasonably confirmed that the requester holds a specific legitimate interest and a proper legal basis for accessing the withheld data. Access to this data can be requested by submitting a request via the form found at https://donuts.domains/about/policies/whois-layered-access/ Donuts Inc. reserves the right to modify these terms at any time. By submitting this query, you agree to abide by this policy. +Terms of Use: Identity Digital Inc. provides this Whois service for information purposes, and to assist persons in obtaining information about or related to a domain name registration record. Identity Digital does not guarantee its accuracy. Users accessing the Identity Digital Whois service agree to use the data only for lawful purposes, and under no circumstances may this data be used 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 registrar's own existing customers and b) enable high volume, automated, electronic processes that send queries or data to the systems of Identity Digital or any ICANN-accredited registrar, except as reasonably necessary to register domain names or modify existing registrations. When using the Identity Digital Whois service, please consider the following: The Whois service is not a replacement for standard EPP commands to the SRS service. Whois is not considered authoritative for registered domain objects. The Whois service may be scheduled for downtime during production or OT&E maintenance periods. Queries to the Whois services are throttled. If too many queries are received from a single IP address within a specified time, the service will begin to reject further queries for a period of time to prevent disruption of Whois service access. Abuse of the Whois system through data mining is mitigated by detecting and limiting bulk query access from single sources. Where applicable, the presence of a [Non-Public Data] tag indicates that such data is not made publicly available due to applicable data privacy laws or requirements. Should you wish to contact the registrant, please refer to the Whois records available through the registrar URL listed above. Access to non-public data may be provided, upon request, where it can be reasonably confirmed that the requester holds a specific legitimate interest and a +proper legal basis for accessing the withheld data. Access to this data can be requested by submitting a request via the form found at https://www.identity.digital/about/policies/whois-layered-access/ Identity Digital Inc. reserves the right to modify these terms at any time. By submitting this query, you agree to abide by this policy. diff --git a/spec/whois/parser_spec.rb b/spec/whois/parser_spec.rb index 34103294..fbe0ced2 100644 --- a/spec/whois/parser_spec.rb +++ b/spec/whois/parser_spec.rb @@ -33,7 +33,7 @@ class PreloadedParserTest end it "returns the DonutsInc parser if the parser doesn't exist and the body contains Donuts disclaimer" do - expect(described_class.parser_klass(Whois::Record::Part.new(host: "whois.nic.domains", body: "Terms of Use: Donuts Inc."))).to eq(Whois::Parsers::DonutsInc) + expect(described_class.parser_klass(Whois::Record::Part.new(host: "whois.nic.domains", body: "Terms of Use: Identity Digital Inc."))).to eq(Whois::Parsers::DonutsInc) end it "returns the blank parser if the parser doesn't exist" do diff --git a/spec/whois/parsers/responses/whois.nic.bike/bike/status_registered_spec.rb b/spec/whois/parsers/responses/whois.nic.bike/bike/status_registered_spec.rb index baf7312c..354ab5b2 100644 --- a/spec/whois/parsers/responses/whois.nic.bike/bike/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.nic.bike/bike/status_registered_spec.rb @@ -19,33 +19,33 @@ end it "matches status_registered.expected" do - expect(subject.domain).to eq("whereismy.bike") - expect(subject.domain_id).to eq("e25432d5c94440c4a8ca0e5ecbc13904-DONUTS") + expect(subject.domain).to eq("bike.bike") + expect(subject.domain_id).to eq("a864ce4015614eeda646a4121b91c784-DONUTS") expect(subject.status).to eq(:registered) expect(subject.available?).to eq(false) expect(subject.registered?).to eq(true) expect(subject.created_on).to be_a(Time) - expect(subject.created_on).to eq(DateTime.parse("2016-02-26 16:49:10 UTC")) + expect(subject.created_on).to eq(DateTime.parse("2015-07-19 17:01:03 UTC")) expect(subject.updated_on).to be_a(Time) - expect(subject.updated_on).to eq(DateTime.parse("2021-04-12 16:49:14 UTC")) + expect(subject.updated_on).to eq(DateTime.parse("2022-09-02 17:01:11 UTC")) expect(subject.expires_on).to be_a(Time) - expect(subject.expires_on).to eq(DateTime.parse("2022-02-26 16:49:10 UTC")) + expect(subject.expires_on).to eq(DateTime.parse("2023-07-19 17:01:03 UTC")) expect(subject.registrar).to be_a(Whois::Parser::Registrar) - expect(subject.registrar.id).to eq("146") - expect(subject.registrar.name).to eq("GoDaddy.com, LLC") - expect(subject.registrar.url).to eq("http://www.godaddy.com/domains/search.aspx?ci=8990") + expect(subject.registrar.id).to eq("1011") + expect(subject.registrar.name).to eq("101domain GRS Limited") + expect(subject.registrar.url).to eq("http://101domain.com") expect(subject.registrant_contacts).to be_a(Array) expect(subject.registrant_contacts.size).to eq(1) expect(subject.registrant_contacts[0]).to be_a(Whois::Parser::Contact) expect(subject.registrant_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_REGISTRANT) expect(subject.registrant_contacts[0].id).to eq("REDACTED FOR PRIVACY") expect(subject.registrant_contacts[0].name).to eq("REDACTED FOR PRIVACY") - expect(subject.registrant_contacts[0].organization).to eq("") + expect(subject.registrant_contacts[0].organization).to eq("Digital Privacy Corporation") expect(subject.registrant_contacts[0].address).to eq("REDACTED FOR PRIVACY") expect(subject.registrant_contacts[0].city).to eq("REDACTED FOR PRIVACY") expect(subject.registrant_contacts[0].zip).to eq("REDACTED FOR PRIVACY") - expect(subject.registrant_contacts[0].state).to eq("Croatia") - expect(subject.registrant_contacts[0].country_code).to eq("HR") + expect(subject.registrant_contacts[0].state).to eq("CA") + expect(subject.registrant_contacts[0].country_code).to eq("US") expect(subject.registrant_contacts[0].phone).to eq("REDACTED FOR PRIVACY ext: REDACTED FOR PRIVACY") expect(subject.registrant_contacts[0].fax).to eq("REDACTED FOR PRIVACY ext: REDACTED FOR PRIVACY") expect(subject.registrant_contacts[0].email).to eq("Please query the RDDS service of the Registrar of Record identified in this output for information on how to contact the Registrant, Admin, or Tech contact of the queried domain name.") @@ -82,8 +82,8 @@ expect(subject.nameservers).to be_a(Array) expect(subject.nameservers.size).to eq(2) expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[0].name).to eq("ns67.domaincontrol.com") + expect(subject.nameservers[0].name).to eq("ns1.gagarin2501.hospedagemdesites.ws") expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[1].name).to eq("ns68.domaincontrol.com") + expect(subject.nameservers[1].name).to eq("ns2.gagarin2501.hospedagemdesites.ws") end end diff --git a/spec/whois/parsers/responses/whois.nic.systems/systems/status_registered_spec.rb b/spec/whois/parsers/responses/whois.nic.systems/systems/status_registered_spec.rb index 3d9167aa..31917e50 100644 --- a/spec/whois/parsers/responses/whois.nic.systems/systems/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.nic.systems/systems/status_registered_spec.rb @@ -33,7 +33,7 @@ expect(subject.registrar).to be_a(Whois::Parser::Registrar) expect(subject.registrar.id).to eq("9998") expect(subject.registrar.name).to eq("Donuts Internal (9998)") - expect(subject.registrar.url).to eq("http://www.donuts.co") + expect(subject.registrar.url).to eq("https://identity.digital") expect(subject.registrant_contacts).to be_a(Array) expect(subject.registrant_contacts.size).to eq(1) expect(subject.registrant_contacts[0]).to be_a(Whois::Parser::Contact) diff --git a/spec/whois/parsers/responses/whois.nic.travel/travel/status_registered_spec.rb b/spec/whois/parsers/responses/whois.nic.travel/travel/status_registered_spec.rb index ef9fcd0c..b3ba26a9 100644 --- a/spec/whois/parsers/responses/whois.nic.travel/travel/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.nic.travel/travel/status_registered_spec.rb @@ -27,13 +27,13 @@ expect(subject.created_on).to be_a(Time) expect(subject.created_on).to eq(DateTime.parse("2005-10-04 21:44:27 GMT")) expect(subject.updated_on).to be_a(Time) - expect(subject.updated_on).to eq(DateTime.parse("2018-05-25 19:29:32 GMT")) + expect(subject.updated_on).to eq(DateTime.parse("2022-11-18 00:00:14 GMT")) expect(subject.expires_on).to be_a(Time) - expect(subject.expires_on).to eq(DateTime.parse("2022-10-03 23:59:59 GMT")) + expect(subject.expires_on).to eq(DateTime.parse("2023-10-03 23:59:59 GMT")) expect(subject.registrar).to be_a(Whois::Parser::Registrar) expect(subject.registrar.id).to eq("9998") expect(subject.registrar.name).to eq("Donuts Internal (9998)") - expect(subject.registrar.url).to eq("http://www.donuts.co") + expect(subject.registrar.url).to eq("https://identity.digital") expect(subject.registrant_contacts).to be_a(Array) expect(subject.registrant_contacts.size).to eq(1) expect(subject.registrant_contacts[0]).to be_a(Whois::Parser::Contact) diff --git a/spec/whois/parsers/responses/whois.nic.world/world/status_registered_spec.rb b/spec/whois/parsers/responses/whois.nic.world/world/status_registered_spec.rb index 3250ac64..9c5625e3 100644 --- a/spec/whois/parsers/responses/whois.nic.world/world/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.nic.world/world/status_registered_spec.rb @@ -27,9 +27,9 @@ expect(subject.created_on).to be_a(Time) expect(subject.created_on).to eq(DateTime.parse("2017-10-03 11:12:14 GMT")) expect(subject.updated_on).to be_a(Time) - expect(subject.updated_on).to eq(DateTime.parse("2021-10-06 14:58:38 GMT")) + expect(subject.updated_on).to eq(DateTime.parse("2022-10-06 14:00:13 GMT")) expect(subject.expires_on).to be_a(Time) - expect(subject.expires_on).to eq(DateTime.parse("2022-10-03 11:12:14 GMT")) + expect(subject.expires_on).to eq(DateTime.parse("2023-10-03 11:12:14 GMT")) expect(subject.registrar).to be_a(Whois::Parser::Registrar) expect(subject.registrar.id).to eq("433") expect(subject.registrar.name).to eq("OVH SAS") From fc909d1dc858535026748277cf74ef1f2c12ffa2 Mon Sep 17 00:00:00 2001 From: Adrien Rey-Jarthon Date: Mon, 24 Jun 2024 16:19:33 +0200 Subject: [PATCH 25/29] FIX: Updated parser for .RO tld --- CHANGELOG.md | 1 + lib/whois/parsers/whois.rotld.ro.rb | 56 +++++++------------ .../property_status_updateprohibited.expected | 8 --- .../ro/property_status_updateprohibited.txt | 28 ---------- .../ro/status_available.expected | 5 +- .../whois.rotld.ro/ro/status_available.txt | 32 +++++++---- .../ro/status_registered.expected | 19 +++---- .../whois.rotld.ro/ro/status_registered.txt | 37 ++++++++---- .../property_status_updateprohibited_spec.rb | 26 --------- .../ro/status_available_spec.rb | 4 +- .../ro/status_registered_spec.rb | 18 +++--- 11 files changed, 90 insertions(+), 144 deletions(-) delete mode 100644 spec/fixtures/responses/whois.rotld.ro/ro/property_status_updateprohibited.expected delete mode 100644 spec/fixtures/responses/whois.rotld.ro/ro/property_status_updateprohibited.txt delete mode 100644 spec/whois/parsers/responses/whois.rotld.ro/ro/property_status_updateprohibited_spec.rb diff --git a/CHANGELOG.md b/CHANGELOG.md index a2d785df..9063ae21 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,7 @@ This project uses [Semantic Versioning 2.0.0](http://semver.org/). #### Release 2.0.0 +- FIX: Updated parser for .RO tld - FIX: Fixed support for all Donuts Inc. TLDs as they rebranded to Identity Digital Inc. - FIX: Updated parser for .SO tld - FIX: Updated parser for .CL tld diff --git a/lib/whois/parsers/whois.rotld.ro.rb b/lib/whois/parsers/whois.rotld.ro.rb index dd67724e..0c00c7ed 100644 --- a/lib/whois/parsers/whois.rotld.ro.rb +++ b/lib/whois/parsers/whois.rotld.ro.rb @@ -6,56 +6,40 @@ # Copyright (c) 2009-2022 Simone Carletti #++ - -require_relative 'base' - +require_relative 'base_icann_compliant' module Whois class Parsers # Parser for the whois.rotld.ro server. - # - # @note This parser is just a stub and provides only a few basic methods - # to check for domain availability and get domain status. - # Please consider to contribute implementing missing methods. - # - # @see Whois::Parsers::Example - # The Example parser for the list of all available methods. - # - class WhoisRotldRo < Base - - property_supported :status do - if content_for_scanner =~ /Domain Status:\s(.+?)\n/ - case ::Regexp.last_match(1).downcase - when "ok", "updateprohibited" - :registered - else - Whois::Parser.bug!(ParserError, "Unknown status `#{::Regexp.last_match(1)}'.") - end - else - :available - end - end + class WhoisRotldRo < BaseIcannCompliant - property_supported :available? do - !!(content_for_scanner =~ /^% No entries found/) - end + self.scanner = Scanners::BaseIcannCompliant, { + pattern_available: /^% No entries found/ + } - property_supported :registered? do - !available? + property_supported :created_on do + parse_time(node("Registered On")) end - - property_not_supported :created_on - property_not_supported :updated_on - property_not_supported :expires_on + property_supported :expires_on do + parse_time(node("Expires On")) + end + property_supported :registrar do + return unless node("Registrar") + + Parser::Registrar.new({ + name: node("Registrar"), + url: node("Referral URL"), + }) + end property_supported :nameservers do - content_for_scanner.scan(/Nameserver:\s+(.+)\n/).flatten.map do |name| - Parser::Nameserver.new(name: name) + Array(node("Nameserver")).reject(&:empty?).map do |name| + Parser::Nameserver.new(name: name.downcase) end end diff --git a/spec/fixtures/responses/whois.rotld.ro/ro/property_status_updateprohibited.expected b/spec/fixtures/responses/whois.rotld.ro/ro/property_status_updateprohibited.expected deleted file mode 100644 index 3f198701..00000000 --- a/spec/fixtures/responses/whois.rotld.ro/ro/property_status_updateprohibited.expected +++ /dev/null @@ -1,8 +0,0 @@ -#status - %s == :registered - -#available? - %s == false - -#registered? - %s == true diff --git a/spec/fixtures/responses/whois.rotld.ro/ro/property_status_updateprohibited.txt b/spec/fixtures/responses/whois.rotld.ro/ro/property_status_updateprohibited.txt deleted file mode 100644 index 02416369..00000000 --- a/spec/fixtures/responses/whois.rotld.ro/ro/property_status_updateprohibited.txt +++ /dev/null @@ -1,28 +0,0 @@ - -% Whois Server Version 3.0 - whois.rotld.ro:43 - -% Rights restricted by copyright. -% Specifically, this data MAY ONLY be used for Internet operational -% purposes. It may not be used for targeted advertising or any -% other purpose. - -% Este INTERZISA folosirea datelor de pe acest server in oricare -% alt scop decat operarea retelei. In special este INTERZISA -% folosirea lor in scopuri publicitare. - -% Top Level Domain : ro -% Maintainance : www.rotld.ro - - Domain Name: google.ro - Registered On: 2000-07-17 - Registrar: MarkMonitor Inc. - Referral URL: - - Nameserver: ns4.google.com - Nameserver: ns1.google.com - Nameserver: ns3.google.com - Nameserver: ns2.google.com - - Domain Status: UpdateProhibited - - diff --git a/spec/fixtures/responses/whois.rotld.ro/ro/status_available.expected b/spec/fixtures/responses/whois.rotld.ro/ro/status_available.expected index 982cebd7..d8970605 100644 --- a/spec/fixtures/responses/whois.rotld.ro/ro/status_available.expected +++ b/spec/fixtures/responses/whois.rotld.ro/ro/status_available.expected @@ -9,14 +9,13 @@ #created_on - %s %ERROR{AttributeNotSupported} + %s == nil #updated_on %s %ERROR{AttributeNotSupported} #expires_on - %s %ERROR{AttributeNotSupported} - + %s == nil #nameservers %s %CLASS{array} diff --git a/spec/fixtures/responses/whois.rotld.ro/ro/status_available.txt b/spec/fixtures/responses/whois.rotld.ro/ro/status_available.txt index fdcfbd44..2b5a0176 100644 --- a/spec/fixtures/responses/whois.rotld.ro/ro/status_available.txt +++ b/spec/fixtures/responses/whois.rotld.ro/ro/status_available.txt @@ -1,17 +1,29 @@ -% Whois Server Version 3.0 - whois.rotld.ro:43 +% The WHOIS service offered by ROTLD and the access to the records in the ROTLD WHOIS database +% are provided for information purposes and to be used within the scope of technical or administrative +% necessities of Internet operation or to remedy legal problems. The use for other purposes, +% in particular for advertising and domain hunting, is not permitted. -% Rights restricted by copyright. -% Specifically, this data MAY ONLY be used for Internet operational -% purposes. It may not be used for targeted advertising or any -% other purpose. +% Without prejudice to the above, it is explicitly forbidden to extract, copy and/or use or re-utilise +% in any form and by any means (electronically or not) the whole or a quantitatively or qualitatively +% substantial part of the contents of the WHOIS database without prior and explicit permission by ROTLD, +% nor in any attempt hereof, to apply automated, electronic processes to ROTLD (or its systems). -% Este INTERZISA folosirea datelor de pe acest server in oricare -% alt scop decat operarea retelei. In special este INTERZISA -% folosirea lor in scopuri publicitare. +% ROTLD cannot, under any circumstances, be held liable in case the stored information would prove +% to be wrong, incomplete or not accurate in any sense. + +% You agree that any reproduction and/or transmission of data for commercial purposes will always +% be considered as the extraction of a substantial part of the content of the WHOIS database. + +% By submitting the query you agree to abide by this policy and accept that ROTLD can take measures +% to limit the use of its WHOIS services in order to protect the privacy of its registrants or the +% integrity of the database. + +% The ROTLD WHOIS service on port 43 never discloses any information concerning the registrant. + +% Registrant information can be obtained through use of the web-based whois service available from +% the ROTLD website www.rotld.ro -% Top Level Domain : ro -% Maintainance : www.rotld.ro % No entries found for the selected source(s). diff --git a/spec/fixtures/responses/whois.rotld.ro/ro/status_registered.expected b/spec/fixtures/responses/whois.rotld.ro/ro/status_registered.expected index a287bbdc..5273bc47 100644 --- a/spec/fixtures/responses/whois.rotld.ro/ro/status_registered.expected +++ b/spec/fixtures/responses/whois.rotld.ro/ro/status_registered.expected @@ -9,31 +9,30 @@ #created_on - %s %ERROR{AttributeNotSupported} + %s %CLASS{time} + %s %TIME{2000-07-17 00:00:00} #updated_on %s %ERROR{AttributeNotSupported} #expires_on - %s %ERROR{AttributeNotSupported} + %s %CLASS{time} + %s %TIME{2024-09-15 00:00:00} +#registrar + %s %CLASS{registrar} + %s.id == nil + %s.name == "MarkMonitor Inc." + %s.url == "www.markmonitor.com" #nameservers %s %CLASS{array} %s %SIZE{4} %s[0] %CLASS{nameserver} %s[0].name == "ns1.google.com" - %s[0].ipv4 == nil - %s[0].ipv6 == nil %s[1] %CLASS{nameserver} %s[1].name == "ns2.google.com" - %s[1].ipv4 == nil - %s[1].ipv6 == nil %s[2] %CLASS{nameserver} %s[2].name == "ns3.google.com" - %s[2].ipv4 == nil - %s[2].ipv6 == nil %s[3] %CLASS{nameserver} %s[3].name == "ns4.google.com" - %s[3].ipv4 == nil - %s[3].ipv6 == nil diff --git a/spec/fixtures/responses/whois.rotld.ro/ro/status_registered.txt b/spec/fixtures/responses/whois.rotld.ro/ro/status_registered.txt index fb084973..1e433302 100644 --- a/spec/fixtures/responses/whois.rotld.ro/ro/status_registered.txt +++ b/spec/fixtures/responses/whois.rotld.ro/ro/status_registered.txt @@ -1,22 +1,37 @@ -% Whois Server Version 3.0 - whois.rotld.ro:43 +% The WHOIS service offered by ROTLD and the access to the records in the ROTLD WHOIS database +% are provided for information purposes and to be used within the scope of technical or administrative +% necessities of Internet operation or to remedy legal problems. The use for other purposes, +% in particular for advertising and domain hunting, is not permitted. -% Rights restricted by copyright. -% Specifically, this data MAY ONLY be used for Internet operational -% purposes. It may not be used for targeted advertising or any -% other purpose. +% Without prejudice to the above, it is explicitly forbidden to extract, copy and/or use or re-utilise +% in any form and by any means (electronically or not) the whole or a quantitatively or qualitatively +% substantial part of the contents of the WHOIS database without prior and explicit permission by ROTLD, +% nor in any attempt hereof, to apply automated, electronic processes to ROTLD (or its systems). -% Este INTERZISA folosirea datelor de pe acest server in oricare -% alt scop decat operarea retelei. In special este INTERZISA -% folosirea lor in scopuri publicitare. +% ROTLD cannot, under any circumstances, be held liable in case the stored information would prove +% to be wrong, incomplete or not accurate in any sense. + +% You agree that any reproduction and/or transmission of data for commercial purposes will always +% be considered as the extraction of a substantial part of the content of the WHOIS database. + +% By submitting the query you agree to abide by this policy and accept that ROTLD can take measures +% to limit the use of its WHOIS services in order to protect the privacy of its registrants or the +% integrity of the database. + +% The ROTLD WHOIS service on port 43 never discloses any information concerning the registrant. + +% Registrant information can be obtained through use of the web-based whois service available from +% the ROTLD website www.rotld.ro -% Top Level Domain : ro -% Maintainance : www.rotld.ro Domain Name: google.ro Registered On: 2000-07-17 + Expires On: 2024-09-15 Registrar: MarkMonitor Inc. - Referral URL: http://www.markmonitor.com + Referral URL: www.markmonitor.com + + DNSSEC: Inactive Nameserver: ns1.google.com Nameserver: ns2.google.com diff --git a/spec/whois/parsers/responses/whois.rotld.ro/ro/property_status_updateprohibited_spec.rb b/spec/whois/parsers/responses/whois.rotld.ro/ro/property_status_updateprohibited_spec.rb deleted file mode 100644 index 7699c0c1..00000000 --- a/spec/whois/parsers/responses/whois.rotld.ro/ro/property_status_updateprohibited_spec.rb +++ /dev/null @@ -1,26 +0,0 @@ -# This file is autogenerated. Do not edit it manually. -# If you want change the content of this file, edit -# -# /spec/fixtures/responses/whois.rotld.ro/ro/property_status_updateprohibited.expected -# -# and regenerate the tests with the following rake task -# -# $ rake spec:generate -# - -require 'spec_helper' - -describe "whois.rotld.ro", :aggregate_failures do - - subject do - file = fixture("responses", "whois.rotld.ro/ro/property_status_updateprohibited.txt") - part = Whois::Record::Part.new(body: File.read(file), host: "whois.rotld.ro") - Whois::Parser.parser_for(part) - end - - it "matches property_status_updateprohibited.expected" do - expect(subject.status).to eq(:registered) - expect(subject.available?).to eq(false) - expect(subject.registered?).to eq(true) - end -end diff --git a/spec/whois/parsers/responses/whois.rotld.ro/ro/status_available_spec.rb b/spec/whois/parsers/responses/whois.rotld.ro/ro/status_available_spec.rb index 03aa5151..723b489e 100644 --- a/spec/whois/parsers/responses/whois.rotld.ro/ro/status_available_spec.rb +++ b/spec/whois/parsers/responses/whois.rotld.ro/ro/status_available_spec.rb @@ -22,9 +22,9 @@ expect(subject.status).to eq(:available) expect(subject.available?).to eq(true) expect(subject.registered?).to eq(false) - expect { subject.created_on }.to raise_error(Whois::AttributeNotSupported) + expect(subject.created_on).to eq(nil) expect { subject.updated_on }.to raise_error(Whois::AttributeNotSupported) - expect { subject.expires_on }.to raise_error(Whois::AttributeNotSupported) + expect(subject.expires_on).to eq(nil) expect(subject.nameservers).to be_a(Array) expect(subject.nameservers).to eq([]) end diff --git a/spec/whois/parsers/responses/whois.rotld.ro/ro/status_registered_spec.rb b/spec/whois/parsers/responses/whois.rotld.ro/ro/status_registered_spec.rb index 8f911524..0d720a7c 100644 --- a/spec/whois/parsers/responses/whois.rotld.ro/ro/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.rotld.ro/ro/status_registered_spec.rb @@ -22,26 +22,24 @@ expect(subject.status).to eq(:registered) expect(subject.available?).to eq(false) expect(subject.registered?).to eq(true) - expect { subject.created_on }.to raise_error(Whois::AttributeNotSupported) + expect(subject.created_on).to be_a(Time) + expect(subject.created_on).to eq(DateTime.parse("2000-07-17 00:00:00")) expect { subject.updated_on }.to raise_error(Whois::AttributeNotSupported) - expect { subject.expires_on }.to raise_error(Whois::AttributeNotSupported) + expect(subject.expires_on).to be_a(Time) + expect(subject.expires_on).to eq(DateTime.parse("2024-09-15 00:00:00")) + expect(subject.registrar).to be_a(Whois::Parser::Registrar) + expect(subject.registrar.id).to eq(nil) + expect(subject.registrar.name).to eq("MarkMonitor Inc.") + expect(subject.registrar.url).to eq("www.markmonitor.com") expect(subject.nameservers).to be_a(Array) expect(subject.nameservers.size).to eq(4) expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) expect(subject.nameservers[0].name).to eq("ns1.google.com") - expect(subject.nameservers[0].ipv4).to eq(nil) - expect(subject.nameservers[0].ipv6).to eq(nil) expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) expect(subject.nameservers[1].name).to eq("ns2.google.com") - expect(subject.nameservers[1].ipv4).to eq(nil) - expect(subject.nameservers[1].ipv6).to eq(nil) expect(subject.nameservers[2]).to be_a(Whois::Parser::Nameserver) expect(subject.nameservers[2].name).to eq("ns3.google.com") - expect(subject.nameservers[2].ipv4).to eq(nil) - expect(subject.nameservers[2].ipv6).to eq(nil) expect(subject.nameservers[3]).to be_a(Whois::Parser::Nameserver) expect(subject.nameservers[3].name).to eq("ns4.google.com") - expect(subject.nameservers[3].ipv4).to eq(nil) - expect(subject.nameservers[3].ipv6).to eq(nil) end end From 27e61b4b2d2f3fcb03524667fe451ef089ddce2c Mon Sep 17 00:00:00 2001 From: Adrien Rey-Jarthon Date: Thu, 16 Jan 2025 14:38:14 +0100 Subject: [PATCH 26/29] fix active_support #presence require + update test matrix --- .github/dependabot.yml | 8 -------- .github/workflows/tests.yml | 12 +++++------- lib/whois/parser.rb | 1 + 3 files changed, 6 insertions(+), 15 deletions(-) delete mode 100644 .github/dependabot.yml diff --git a/.github/dependabot.yml b/.github/dependabot.yml deleted file mode 100644 index 1ca2ee67..00000000 --- a/.github/dependabot.yml +++ /dev/null @@ -1,8 +0,0 @@ -version: 2 -updates: - - package-ecosystem: bundler - directory: / - schedule: - interval: daily - time: '04:00' - open-pull-requests-limit: 10 diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index a0f334ab..c2b0c357 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -8,20 +8,18 @@ on: jobs: build: strategy: + fail-fast: false matrix: - ruby-version: - - "2.6" - - "2.7" - - "3.0" - - "3.1" + ruby: ['2.7', '3.0', '3.1', '3.2', '3.3', '3.4', head, jruby, jruby-head, truffleruby, truffleruby-head] platform: [ubuntu-latest] runs-on: ${{ matrix.platform }} steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v4 - name: Set up Ruby uses: ruby/setup-ruby@v1 with: - ruby-version: ${{ matrix.ruby-version }} + ruby-version: ${{ matrix.ruby }} + bundler-cache: true - name: Install dependencies run: bundle install - name: Run tests diff --git a/lib/whois/parser.rb b/lib/whois/parser.rb index 8d88c6e2..1744d120 100644 --- a/lib/whois/parser.rb +++ b/lib/whois/parser.rb @@ -9,6 +9,7 @@ require 'whois' require 'active_support' +require 'active_support/core_ext/object/blank' require 'active_support/core_ext/class/attribute' require 'active_support/core_ext/time/calculations' From 66c5b0303272138ea7b38f426dabc3a8b391ba3f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Halil=20=C3=96zg=C3=BCr?= <226712+halilim@users.noreply.github.com> Date: Fri, 3 Jan 2025 07:31:49 +0300 Subject: [PATCH 27/29] Add ostruct to gemspec for Ruby 3.5 ```plain .../lib/whois/parser/super_struct.rb:1: warning: ostruct was loaded from the standard library, but will no longer be part of the default gems starting from Ruby 3.5.0. You can add ostruct to your Gemfile or gemspec to silence this warning. ``` --- whois-parser.gemspec | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/whois-parser.gemspec b/whois-parser.gemspec index ce5914a8..e9fafa66 100644 --- a/whois-parser.gemspec +++ b/whois-parser.gemspec @@ -21,8 +21,9 @@ Gem::Specification.new do |s| s.add_dependency "whois", ">= 4.1.0" s.add_dependency "activesupport", ">= 4" + s.add_dependency "ostruct" s.add_development_dependency "rake" s.add_development_dependency "rspec" s.add_development_dependency "yard" -end \ No newline at end of file +end From bd7687f1c77b6faf36b4827acd1ed4affe261c49 Mon Sep 17 00:00:00 2001 From: Ashlie <113629792+ashlie-10fw@users.noreply.github.com> Date: Thu, 16 Jan 2025 08:20:30 -0600 Subject: [PATCH 28/29] whois.nic.consulting parser --- lib/whois/parsers/whois.nic.consulting.rb | 73 +++++++++++++++++++ .../consulting/status_available.expected | 21 ++++++ .../consulting/status_available.txt | 4 + .../consulting/status_registered.expected | 30 ++++++++ .../consulting/status_registered.txt | 61 ++++++++++++++++ .../consulting/status_available_spec.rb | 31 ++++++++ .../consulting/status_registered_spec.rb | 38 ++++++++++ 7 files changed, 258 insertions(+) create mode 100644 lib/whois/parsers/whois.nic.consulting.rb create mode 100644 spec/fixtures/responses/whois.nic.consulting/consulting/status_available.expected create mode 100644 spec/fixtures/responses/whois.nic.consulting/consulting/status_available.txt create mode 100644 spec/fixtures/responses/whois.nic.consulting/consulting/status_registered.expected create mode 100644 spec/fixtures/responses/whois.nic.consulting/consulting/status_registered.txt create mode 100644 spec/whois/parsers/responses/whois.nic.consulting/consulting/status_available_spec.rb create mode 100644 spec/whois/parsers/responses/whois.nic.consulting/consulting/status_registered_spec.rb diff --git a/lib/whois/parsers/whois.nic.consulting.rb b/lib/whois/parsers/whois.nic.consulting.rb new file mode 100644 index 00000000..64c6de82 --- /dev/null +++ b/lib/whois/parsers/whois.nic.consulting.rb @@ -0,0 +1,73 @@ +#-- +# Ruby Whois +# +# An intelligent pure Ruby WHOIS client and parser. +# +# Copyright (c) 2009-2022 Simone Carletti +#++ + + +require_relative 'base' + + +module Whois + class Parsers + + # + # = whois.nic.consulting parser + # + # Parser for the whois.nic.consulting server. + # + # NOTE: This parser is just a stub and provides only a few basic methods + # to check for domain availability and get domain status. + # Please consider to contribute implementing missing methods. + # See WhoisNicIt parser for an explanation of all available methods + # and examples. + # + class WhoisNicConsulting < Base + + property_supported :status do + content_for_scanner.scan(/Status:\s+(.+?)\n/).flatten + end + + property_supported :available? do + !!(content_for_scanner =~ /Domain not found/) + end + + property_supported :registered? do + !available? + end + + property_supported :created_on do + if content_for_scanner =~ /Creation Date:\s+(.*)\n/ + parse_time(::Regexp.last_match(1)) + end + end + + property_supported :updated_on do + if content_for_scanner =~ /Updated Date:\s+(.*)\n/ + parse_time(::Regexp.last_match(1)) + end + end + + property_supported :expires_on do + if content_for_scanner =~ /Registry Expiry Date:\s+(.*)\n/ + parse_time(::Regexp.last_match(1)) + end + end + + property_supported :registrar do + Parser::Registrar.new(name: content_for_scanner[/Registrar:\s+(.+?)$/, 1], + url: content_for_scanner[/Registrar URL:\s+(.+?)$/, 1]) + end + + property_supported :nameservers do + content_for_scanner.scan(/Name Server:\s+(.+)\n/).flatten.map do |name| + Parser::Nameserver.new(:name => name) + end + end + + end + + end +end diff --git a/spec/fixtures/responses/whois.nic.consulting/consulting/status_available.expected b/spec/fixtures/responses/whois.nic.consulting/consulting/status_available.expected new file mode 100644 index 00000000..4960f4aa --- /dev/null +++ b/spec/fixtures/responses/whois.nic.consulting/consulting/status_available.expected @@ -0,0 +1,21 @@ +#status + %s == [] + +#available? + %s == true + +#registered? + %s == false + +#created_on + %s == nil + +#updated_on + %s == nil + +#expires_on + %s == nil + +#nameservers + %s %CLASS{array} + %s == [] diff --git a/spec/fixtures/responses/whois.nic.consulting/consulting/status_available.txt b/spec/fixtures/responses/whois.nic.consulting/consulting/status_available.txt new file mode 100644 index 00000000..fbf900bf --- /dev/null +++ b/spec/fixtures/responses/whois.nic.consulting/consulting/status_available.txt @@ -0,0 +1,4 @@ +Domain not found. +>>> Last update of WHOIS database: 2024-07-31T18:17:15Z <<< +Terms of Use: Access to WHOIS information is provided to assist persons in determining the contents of a domain name registration record in the registry database. The data in this record is provided by Identity Digital or the Registry Operator for informational purposes only, and accuracy is not guaranteed. 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 Identity Digital except as reasonably necessary to register domain names or modify existing registrations. When using the Whois service, please consider the following: The Whois service is not a replacement for standard EPP commands to the SRS service. Whois is not considered authoritative for registered domain objects. The Whois service may be scheduled for downtime during production or OT&E maintenance periods. Queries to the Whois services are throttled. If too many queries are received from a single IP address within a specified time, the service will begin to reject further queries for a period of time to prevent disruption of Whois service access. Abuse of the Whois system through data mining is mitigated by detecting and limiting bulk query access from single sources. Where applicable, the presence of a [Non-Public Data] tag indicates that such data is not made publicly available due to applicable data privacy laws or requirements. Should you wish to contact the registrant, please refer to the Whois records available through the registrar URL listed above. Access to non-public data may be provided, upon request, where it can be reasonably confirmed that the requester holds a specific legitimate interest and a proper legal basis for accessing the withheld data. Access to this data provided by Identity Digital can be requested by submitting a request via the form found at https://www.identity.digital/about/policies/whois-layered-access/. The Registrar of Record identified in this output may have an RDDS service that can be queried for additional information on how to contact the Registrant, Admin, or Tech contact of the queried domain name. Identity Digital Inc. and Registry Operator reserve the right to modify these terms at any time. By submitting this query, you agree to abide by this policy. + diff --git a/spec/fixtures/responses/whois.nic.consulting/consulting/status_registered.expected b/spec/fixtures/responses/whois.nic.consulting/consulting/status_registered.expected new file mode 100644 index 00000000..79b02082 --- /dev/null +++ b/spec/fixtures/responses/whois.nic.consulting/consulting/status_registered.expected @@ -0,0 +1,30 @@ +#status + %s == ["clientDeleteProhibited https://icann.org/epp#clientDeleteProhibited", "clientRenewProhibited https://icann.org/epp#clientRenewProhibited","clientTransferProhibited https://icann.org/epp#clientTransferProhibited", "clientUpdateProhibited https://icann.org/epp#clientUpdateProhibited"] + +#available? + %s == false + +#registered? + %s == true + + +#created_on + %s %CLASS{time} + %s %TIME{2023-02-15T01:47:04Z} + +#updated_on + %s %CLASS{time} + %s %TIME{2024-07-14T03:59:16Z} + +#expires_on + %s %CLASS{time} + %s %TIME{2025-02-15T01:47:04Z} + + +#nameservers + %s %CLASS{array} + %s %SIZE{2} + %s[0] %CLASS{nameserver} + %s[0].name == "ns25.domaincontrol.com" + %s[1] %CLASS{nameserver} + %s[1].name == "ns26.domaincontrol.com" diff --git a/spec/fixtures/responses/whois.nic.consulting/consulting/status_registered.txt b/spec/fixtures/responses/whois.nic.consulting/consulting/status_registered.txt new file mode 100644 index 00000000..b093bfc7 --- /dev/null +++ b/spec/fixtures/responses/whois.nic.consulting/consulting/status_registered.txt @@ -0,0 +1,61 @@ +Domain Name: topmba.consulting +Registry Domain ID: 6fc3d86850f343b7b15e3151b9baf2db-DONUTS +Registrar WHOIS Server: whois.godaddy.com/ +Registrar URL: http://www.godaddy.com/domains/search.aspx?ci=8990 +Updated Date: 2024-07-14T03:59:16Z +Creation Date: 2023-02-15T01:47:04Z +Registry Expiry Date: 2025-02-15T01:47:04Z +Registrar: GoDaddy.com, LLC +Registrar IANA ID: 146 +Registrar Abuse Contact Email: abuse@godaddy.com +Registrar Abuse Contact Phone: +1.4806242505 +Domain Status: clientDeleteProhibited https://icann.org/epp#clientDeleteProhibited +Domain Status: clientRenewProhibited https://icann.org/epp#clientRenewProhibited +Domain Status: clientTransferProhibited https://icann.org/epp#clientTransferProhibited +Domain Status: clientUpdateProhibited https://icann.org/epp#clientUpdateProhibited +Registry Registrant ID: REDACTED FOR PRIVACY +Registrant Name: REDACTED FOR PRIVACY +Registrant Organization: Domains By Proxy, LLC +Registrant Street: REDACTED FOR PRIVACY +Registrant City: REDACTED FOR PRIVACY +Registrant State/Province: Arizona +Registrant Postal Code: REDACTED FOR PRIVACY +Registrant Country: US +Registrant Phone: REDACTED FOR PRIVACY +Registrant Phone Ext: REDACTED FOR PRIVACY +Registrant Fax: REDACTED FOR PRIVACY +Registrant Fax Ext: REDACTED FOR PRIVACY +Registrant Email: Please query the RDDS service of the Registrar of Record identified in this output for information on how to contact the Registrant, Admin, or Tech contact of the queried domain name. +Registry Admin ID: REDACTED FOR PRIVACY +Admin Name: REDACTED FOR PRIVACY +Admin Organization: REDACTED FOR PRIVACY +Admin Street: REDACTED FOR PRIVACY +Admin City: REDACTED FOR PRIVACY +Admin State/Province: REDACTED FOR PRIVACY +Admin Postal Code: REDACTED FOR PRIVACY +Admin Country: REDACTED FOR PRIVACY +Admin Phone: REDACTED FOR PRIVACY +Admin Phone Ext: REDACTED FOR PRIVACY +Admin Fax: REDACTED FOR PRIVACY +Admin Fax Ext: REDACTED FOR PRIVACY +Admin Email: Please query the RDDS service of the Registrar of Record identified in this output for information on how to contact the Registrant, Admin, or Tech contact of the queried domain name. +Registry Tech ID: REDACTED FOR PRIVACY +Tech Name: REDACTED FOR PRIVACY +Tech Organization: REDACTED FOR PRIVACY +Tech Street: REDACTED FOR PRIVACY +Tech City: REDACTED FOR PRIVACY +Tech State/Province: REDACTED FOR PRIVACY +Tech Postal Code: REDACTED FOR PRIVACY +Tech Country: REDACTED FOR PRIVACY +Tech Phone: REDACTED FOR PRIVACY +Tech Phone Ext: REDACTED FOR PRIVACY +Tech Fax: REDACTED FOR PRIVACY +Tech Fax Ext: REDACTED FOR PRIVACY +Tech Email: Please query the RDDS service of the Registrar of Record identified in this output for information on how to contact the Registrant, Admin, or Tech contact of the queried domain name. +Name Server: ns25.domaincontrol.com +Name Server: ns26.domaincontrol.com +DNSSEC: signedDelegation +URL of the ICANN Whois Inaccuracy Complaint Form: https://www.icann.org/wicf/ +>>> Last update of WHOIS database: 2024-07-31T15:13:11Z <<< +For more information on Whois status codes, please visit https://icann.org/epp +Terms of Use: Access to WHOIS information is provided to assist persons in determining the contents of a domain name registration record in the registry database. The data in this record is provided by Identity Digital or the Registry Operator for informational purposes only, and accuracy is not guaranteed. 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 Identity Digital except as reasonably necessary to register domain names or modify existing registrations. When using the Whois service, please consider the following: The Whois service is not a replacement for standard EPP commands to the SRS service. Whois is not considered authoritative for registered domain objects. The Whois service may be scheduled for downtime during production or OT&E maintenance periods. Queries to the Whois services are throttled. If too many queries are received from a single IP address within a specified time, the service will begin to reject further queries for a period of time to prevent disruption of Whois service access. Abuse of the Whois system through data mining is mitigated by detecting and limiting bulk query access from single sources. Where applicable, the presence of a [Non-Public Data] tag indicates that such data is not made publicly available due to applicable data privacy laws or requirements. Should you wish to contact the registrant, please refer to the Whois records available through the registrar URL listed above. Access to non-public data may be provided, upon request, where it can be reasonably confirmed that the requester holds a specific legitimate interest and a proper legal basis for accessing the withheld data. Access to this data provided by Identity Digital can be requested by submitting a request via the form found at https://www.identity.digital/about/policies/whois-layered-access/. The Registrar of Record identified in this output may have an RDDS service that can be queried for additional information on how to contact the Registrant, Admin, or Tech contact of the queried domain name. Identity Digital Inc. and Registry Operator reserve the right to modify these terms at any time. By submitting this query, you agree to abide by this policy. diff --git a/spec/whois/parsers/responses/whois.nic.consulting/consulting/status_available_spec.rb b/spec/whois/parsers/responses/whois.nic.consulting/consulting/status_available_spec.rb new file mode 100644 index 00000000..78028263 --- /dev/null +++ b/spec/whois/parsers/responses/whois.nic.consulting/consulting/status_available_spec.rb @@ -0,0 +1,31 @@ +# This file is autogenerated. Do not edit it manually. +# If you want change the content of this file, edit +# +# /spec/fixtures/responses/whois.nic.consulting/consulting/status_available.expected +# +# and regenerate the tests with the following rake task +# +# $ rake spec:generate +# + +require 'spec_helper' + +describe "whois.nic.consulting", :aggregate_failures do + + subject do + file = fixture("responses", "whois.nic.consulting/consulting/status_available.txt") + part = Whois::Record::Part.new(body: File.read(file), host: "whois.nic.consulting") + Whois::Parser.parser_for(part) + end + + it "matches status_available.expected" do + expect(subject.status).to eq([]) + expect(subject.available?).to eq(true) + expect(subject.registered?).to eq(false) + expect(subject.created_on).to eq(nil) + expect(subject.updated_on).to eq(nil) + expect(subject.expires_on).to eq(nil) + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers).to eq([]) + end +end diff --git a/spec/whois/parsers/responses/whois.nic.consulting/consulting/status_registered_spec.rb b/spec/whois/parsers/responses/whois.nic.consulting/consulting/status_registered_spec.rb new file mode 100644 index 00000000..87913a2b --- /dev/null +++ b/spec/whois/parsers/responses/whois.nic.consulting/consulting/status_registered_spec.rb @@ -0,0 +1,38 @@ +# This file is autogenerated. Do not edit it manually. +# If you want change the content of this file, edit +# +# /spec/fixtures/responses/whois.nic.consulting/consulting/status_registered.expected +# +# and regenerate the tests with the following rake task +# +# $ rake spec:generate +# + +require 'spec_helper' + +describe "whois.nic.consulting", :aggregate_failures do + + subject do + file = fixture("responses", "whois.nic.consulting/consulting/status_registered.txt") + part = Whois::Record::Part.new(body: File.read(file), host: "whois.nic.consulting") + Whois::Parser.parser_for(part) + end + + it "matches status_registered.expected" do + expect(subject.status).to eq(["clientDeleteProhibited https://icann.org/epp#clientDeleteProhibited", "clientRenewProhibited https://icann.org/epp#clientRenewProhibited","clientTransferProhibited https://icann.org/epp#clientTransferProhibited", "clientUpdateProhibited https://icann.org/epp#clientUpdateProhibited"]) + expect(subject.available?).to eq(false) + expect(subject.registered?).to eq(true) + expect(subject.created_on).to be_a(Time) + expect(subject.created_on).to eq(DateTime.parse("2023-02-15T01:47:04Z")) + expect(subject.updated_on).to be_a(Time) + expect(subject.updated_on).to eq(DateTime.parse("2024-07-14T03:59:16Z")) + expect(subject.expires_on).to be_a(Time) + expect(subject.expires_on).to eq(DateTime.parse("2025-02-15T01:47:04Z")) + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers.size).to eq(2) + expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[0].name).to eq("ns25.domaincontrol.com") + expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[1].name).to eq("ns26.domaincontrol.com") + end +end From b7f20129fc673b9a09015879997783ed02e30795 Mon Sep 17 00:00:00 2001 From: Jonathan Siegel <248302+usiegj00@users.noreply.github.com> Date: Fri, 18 Apr 2025 14:51:01 +0900 Subject: [PATCH 29/29] Add registrar property support for Japanese (.jp) domains Update test format to match project standards --- lib/whois/parsers/whois.jprs.jp.rb | 24 +++++++++++++++ .../jp/property_registrar.expected | 6 ++++ .../whois.jprs.jp/jp/property_registrar.txt | 29 +++++++++++++++++++ .../jp/property_registrar_spec.rb | 24 +++++++++++++++ 4 files changed, 83 insertions(+) create mode 100644 spec/fixtures/responses/whois.jprs.jp/jp/property_registrar.expected create mode 100644 spec/fixtures/responses/whois.jprs.jp/jp/property_registrar.txt create mode 100644 spec/whois/parsers/responses/whois.jprs.jp/jp/property_registrar_spec.rb diff --git a/lib/whois/parsers/whois.jprs.jp.rb b/lib/whois/parsers/whois.jprs.jp.rb index 5c02bd5d..c3f31aa7 100644 --- a/lib/whois/parsers/whois.jprs.jp.rb +++ b/lib/whois/parsers/whois.jprs.jp.rb @@ -81,6 +81,30 @@ class WhoisJprsJp < Base end end + property_supported :registrar do + name = nil + organization = nil + url = nil + + if content_for_scanner =~ /\[Registrant\][ \t]+(.*)\n/ + name = ::Regexp.last_match(1) + end + + if content_for_scanner =~ /\[Name\][ \t]+(.*)\n/ + organization = ::Regexp.last_match(1) + end + + if content_for_scanner =~ /\[Web Page\][ \t]+(.*)\n/ && !::Regexp.last_match(1).strip.empty? + url = ::Regexp.last_match(1).strip + end + + Parser::Registrar.new( + id: nil, + name: name, + organization: organization, + url: url + ) + end property_supported :nameservers do content_for_scanner.scan(/\[Name Server\][\s\t]+([^\s\n]+?)\n/).flatten.map do |name| diff --git a/spec/fixtures/responses/whois.jprs.jp/jp/property_registrar.expected b/spec/fixtures/responses/whois.jprs.jp/jp/property_registrar.expected new file mode 100644 index 00000000..48be5fa7 --- /dev/null +++ b/spec/fixtures/responses/whois.jprs.jp/jp/property_registrar.expected @@ -0,0 +1,6 @@ +#registrar + %s %CLASS{registrar} + %s.id == nil + %s.name == "Netowl,Inc." + %s.organization == "Netowl, Inc." + %s.url == nil \ No newline at end of file diff --git a/spec/fixtures/responses/whois.jprs.jp/jp/property_registrar.txt b/spec/fixtures/responses/whois.jprs.jp/jp/property_registrar.txt new file mode 100644 index 00000000..e143c3db --- /dev/null +++ b/spec/fixtures/responses/whois.jprs.jp/jp/property_registrar.txt @@ -0,0 +1,29 @@ +[ JPRS database provides information on network administration. Its use is ] +[ restricted to network administration purposes. For further information, ] +[ use 'whois -h whois.jprs.jp help'. To suppress Japanese output, add'/e' ] +[ at the end of command, e.g. 'whois -h whois.jprs.jp xxx/e'. ] +Domain Information: [ドメイン情報] +[Domain Name] MAILMATE.JP + +[登録者名] ネットオウル株式会社 +[Registrant] Netowl,Inc. + +[Name Server] nitin.ns.cloudflare.com +[Name Server] rosa.ns.cloudflare.com +[Signing Key] + +[登録年月日] 2019/06/17 +[有効期限] 2025/06/30 +[状態] Active +[最終更新] 2024/07/01 01:05:03 (JST) + +Contact Information: [公開連絡窓口] +[名前] ネットオウル株式会社 +[Name] Netowl, Inc. +[Email] whois@netowl.jp +[Web Page] +[郵便番号] +[住所] +[Postal Address] +[電話番号] 075-256-8553 +[FAX番号] \ No newline at end of file diff --git a/spec/whois/parsers/responses/whois.jprs.jp/jp/property_registrar_spec.rb b/spec/whois/parsers/responses/whois.jprs.jp/jp/property_registrar_spec.rb new file mode 100644 index 00000000..f5ab50d5 --- /dev/null +++ b/spec/whois/parsers/responses/whois.jprs.jp/jp/property_registrar_spec.rb @@ -0,0 +1,24 @@ +# encoding: utf-8 + +require 'spec_helper' +require 'whois/parsers/whois.jprs.jp.rb' + +describe Whois::Parsers::WhoisJprsJp, "property_registrar.expected" do + + subject do + file = fixture("responses", "whois.jprs.jp/jp/property_registrar.txt") + part = Whois::Record::Part.new(body: File.read(file)) + described_class.new(part) + end + + describe "#registrar" do + it do + expect(subject.registrar).to be_a(Whois::Parser::Registrar) + expect(subject.registrar.id).to eq(nil) + expect(subject.registrar.name).to eq("Netowl,Inc.") + expect(subject.registrar.organization).to eq("Netowl, Inc.") + expect(subject.registrar.url).to eq(nil) + end + end + +end \ No newline at end of file