From 82b7b9016bb333049fab880c44213ba4e284f858 Mon Sep 17 00:00:00 2001 From: Howard Lu Date: Thu, 4 Apr 2019 13:48:47 -0700 Subject: [PATCH 1/4] 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. --- 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 +++-- 30 files changed, 667 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/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 309f3ecd1ac029dc4af17071fe56feb1322a98b4 Mon Sep 17 00:00:00 2001 From: Nicole Ng Date: Thu, 20 Jun 2019 13:56:18 -0700 Subject: [PATCH 2/4] Fixed the WHOIS parser for corporatedomains dates using '/' Updated the WHOIS parser for corporatedomains which were incorrectly parsing "Registrar Registration Expiration Date", because the date had "MM/DD/YYYY" format rather than "DD/MM/YYYY". The change updates the format if the value has slash-separated date before passing it into `parse_time`. This change cannot be used for all dates, since some dates use a dash-separated format (i.e. YYYY-MM-DDTHH:MM:SSZ). This problem also applies to the creation date as well when parsing the value for "Creation Date". --- .../parsers/whois.corporatedomains.com.rb | 35 ++++++++++++++++++- 1 file changed, 34 insertions(+), 1 deletion(-) diff --git a/lib/whois/parsers/whois.corporatedomains.com.rb b/lib/whois/parsers/whois.corporatedomains.com.rb index 882f8ad2..f46fdb78 100644 --- a/lib/whois/parsers/whois.corporatedomains.com.rb +++ b/lib/whois/parsers/whois.corporatedomains.com.rb @@ -13,7 +13,7 @@ module Whois class Parsers - # Parser for the whois.markmonitor.com server. + # Parser for the whois.corporatedomains.com server. # # @see Whois::Parsers::Example # The Example parser for the list of all available methods. @@ -22,6 +22,39 @@ class WhoisCorporatedomainsCom < BaseIcannCompliant self.scanner = Scanners::BaseIcannCompliant, { pattern_available: /^No match for/ } + + property_supported :created_on do + node("Creation Date") do |value| + # Update the format so the value is parsed properly + value = reformat_slash_date_format(value) if value.include?("/") + + parse_time(value) + end + end + + property_supported :expires_on do + node("Registrar Registration Expiration Date") do |value| + # Update the format so the value is parsed properly + value = reformat_slash_date_format(value) if value.include?("/") + + parse_time(value) + end + end + + private + + # There are 2 different date formats which are used for creation and expiration dates: + # - hyphen-separated date format YYYY-MM-DDTHH:MM:SSZ + # - slash-separated date format MM/DD/YYYY HH:MM:SS + # + # The latter format causes problems because `parse_time` parsed as (DD/MM/YYYY HH:MM:SS) + def reformat_slash_date_format(value) + date, time = value.split + month, day, year = date.split("/") + reformatted_date = [year, month, day].join("-") + + "#{reformatted_date}T#{time}Z" + end end end From 9707a67f43421ce45017cd28cd90c840bf402932 Mon Sep 17 00:00:00 2001 From: Nicole Ng Date: Thu, 20 Jun 2019 14:00:56 -0700 Subject: [PATCH 3/4] Updated the specs to include testing for hyphen-separated dates Moved the existing `status_available` files into the `com` folder where the new `status_registered` files will be generated. Generated new `status_registered` files for the different cases when the creation and expiration dates are hyphen-separated vs slash-separated. Also re-used the existing `.expected` file from the old `status_registered` file to test for the new values. --- .../{ => com}/status_available.expected | 0 .../{ => com}/status_available.txt | 0 ...egistered_with_hyphen_date_format.expected | 105 ++++++++++++ ...tus_registered_with_hyphen_date_format.txt | 70 ++++++++ ...registered_with_slash_date_format.expected | 105 ++++++++++++ ...tus_registered_with_slash_date_format.txt} | 88 +++++----- .../status_registered.expected | 113 ------------- .../{ => com}/status_available_spec.rb | 4 +- ...egistered_with_hyphen_date_format_spec.rb} | 88 +++++----- ..._registered_with_slash_date_format_spec.rb | 150 ++++++++++++++++++ 10 files changed, 517 insertions(+), 206 deletions(-) rename spec/fixtures/responses/whois.corporatedomains.com/{ => com}/status_available.expected (100%) rename spec/fixtures/responses/whois.corporatedomains.com/{ => com}/status_available.txt (100%) create mode 100644 spec/fixtures/responses/whois.corporatedomains.com/com/status_registered_with_hyphen_date_format.expected create mode 100644 spec/fixtures/responses/whois.corporatedomains.com/com/status_registered_with_hyphen_date_format.txt create mode 100644 spec/fixtures/responses/whois.corporatedomains.com/com/status_registered_with_slash_date_format.expected rename spec/fixtures/responses/whois.corporatedomains.com/{status_registered.txt => com/status_registered_with_slash_date_format.txt} (52%) delete mode 100644 spec/fixtures/responses/whois.corporatedomains.com/status_registered.expected rename spec/whois/parsers/responses/whois.corporatedomains.com/{ => com}/status_available_spec.rb (91%) rename spec/whois/parsers/responses/whois.corporatedomains.com/{status_registered_spec.rb => com/status_registered_with_hyphen_date_format_spec.rb} (55%) create mode 100644 spec/whois/parsers/responses/whois.corporatedomains.com/com/status_registered_with_slash_date_format_spec.rb diff --git a/spec/fixtures/responses/whois.corporatedomains.com/status_available.expected b/spec/fixtures/responses/whois.corporatedomains.com/com/status_available.expected similarity index 100% rename from spec/fixtures/responses/whois.corporatedomains.com/status_available.expected rename to spec/fixtures/responses/whois.corporatedomains.com/com/status_available.expected diff --git a/spec/fixtures/responses/whois.corporatedomains.com/status_available.txt b/spec/fixtures/responses/whois.corporatedomains.com/com/status_available.txt similarity index 100% rename from spec/fixtures/responses/whois.corporatedomains.com/status_available.txt rename to spec/fixtures/responses/whois.corporatedomains.com/com/status_available.txt diff --git a/spec/fixtures/responses/whois.corporatedomains.com/com/status_registered_with_hyphen_date_format.expected b/spec/fixtures/responses/whois.corporatedomains.com/com/status_registered_with_hyphen_date_format.expected new file mode 100644 index 00000000..9918c894 --- /dev/null +++ b/spec/fixtures/responses/whois.corporatedomains.com/com/status_registered_with_hyphen_date_format.expected @@ -0,0 +1,105 @@ +#domain + %s == "corporatedomains.com" + +#domain_id + %s == "2546326_DOMAIN_COM-VRSN" + + +#status + %s == :registered + +#available? + %s == false + +#registered? + %s == true + + +#created_on + %s %CLASS{time} + %s %TIME{1997-10-16 04:00:00 +0000} + + +#updated_on + %s %CLASS{time} + %s %TIME{2018-10-11 05:49:21 +0000} + +#expires_on + %s %CLASS{time} + %s %TIME{2019-10-15 04:00:00 +0000} + + +#registrar + %s %CLASS{registrar} + %s.id == "299" + %s.name == "CSC CORPORATE DOMAINS, INC." + %s.organization == "CSC CORPORATE DOMAINS, INC." + %s.url == "www.cscprotectsbrands.com" + + +#registrant_contacts + %s %CLASS{array} + %s %SIZE{1} + %s[0] %CLASS{contact} + %s[0].type == Whois::Parser::Contact::TYPE_REGISTRANT + %s[0].name == "Domain Administrator" + %s[0].organization == "CSC Corporate Domains, Inc." + %s[0].address == "251 Little Falls Drive" + %s[0].city == "Wilmington" + %s[0].zip == "19808" + %s[0].state == "DE" + %s[0].country_code == "US" + %s[0].phone == "+1.3026365400" + %s[0].fax == "+1.3026365454" + %s[0].email == "admin@internationaladmin.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].name == "Domain Administrator" + %s[0].organization == "CSC Corporate Domains, Inc." + %s[0].address == "251 Little Falls Drive" + %s[0].city == "Wilmington" + %s[0].zip == "19808" + %s[0].state == "DE" + %s[0].country_code == "US" + %s[0].phone == "+1.3026365400" + %s[0].fax == "+1.3026365454" + %s[0].email == "admin@internationaladmin.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].name == "DNS Administrator" + %s[0].organization == "CSC Corporate Domains, Inc." + %s[0].address == "251 Little Falls Drive" + %s[0].city == "Wilmington" + %s[0].zip == "19808" + %s[0].state == "DE" + %s[0].country_code == "US" + %s[0].phone == "+1.3026365400" + %s[0].fax == "+1.3026365454" + %s[0].email == "dns-admin@cscglobal.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 == "pdns1.cscdns.net" + %s[0].ipv4 == nil + %s[0].ipv6 == nil + %s[1] %CLASS{nameserver} + %s[1].name == "pdns2.cscdns.net" + %s[1].ipv4 == nil + %s[1].ipv6 == nil \ No newline at end of file diff --git a/spec/fixtures/responses/whois.corporatedomains.com/com/status_registered_with_hyphen_date_format.txt b/spec/fixtures/responses/whois.corporatedomains.com/com/status_registered_with_hyphen_date_format.txt new file mode 100644 index 00000000..8e2e7912 --- /dev/null +++ b/spec/fixtures/responses/whois.corporatedomains.com/com/status_registered_with_hyphen_date_format.txt @@ -0,0 +1,70 @@ + +Domain Name: corporatedomains.com +Registry Domain ID: 2546326_DOMAIN_COM-VRSN +Registrar WHOIS Server: whois.corporatedomains.com +Registrar URL: www.cscprotectsbrands.com +Updated Date: 2018-10-11T05:49:21Z +Creation Date: 1997-10-16T04:00:00Z +Registrar Registration Expiration Date: 2019-10-15T04:00:00Z +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 http://www.icann.org/epp#clientTransferProhibited +Domain Status: serverDeleteProhibited http://www.icann.org/epp#serverDeleteProhibited +Domain Status: serverTransferProhibited http://www.icann.org/epp#serverTransferProhibited +Domain Status: serverUpdateProhibited http://www.icann.org/epp#serverUpdateProhibited +Registry Registrant ID: +Registrant Name: Domain Administrator +Registrant Organization: CSC Corporate Domains, Inc. +Registrant Street: 251 Little Falls Drive +Registrant City: Wilmington +Registrant State/Province: DE +Registrant Postal Code: 19808 +Registrant Country: US +Registrant Phone: +1.3026365400 +Registrant Phone Ext: +Registrant Fax: +1.3026365454 +Registrant Fax Ext: +Registrant Email: admin@internationaladmin.com +Registry Admin ID: +Admin Name: Domain Administrator +Admin Organization: CSC Corporate Domains, Inc. +Admin Street: 251 Little Falls Drive +Admin City: Wilmington +Admin State/Province: DE +Admin Postal Code: 19808 +Admin Country: US +Admin Phone: +1.3026365400 +Admin Phone Ext: +Admin Fax: +1.3026365454 +Admin Fax Ext: +Admin Email: admin@internationaladmin.com +Registry Tech ID: +Tech Name: DNS Administrator +Tech Organization: CSC Corporate Domains, Inc. +Tech Street: 251 Little Falls Drive +Tech City: Wilmington +Tech State/Province: DE +Tech Postal Code: 19808 +Tech Country: US +Tech Phone: +1.3026365400 +Tech Phone Ext: +Tech Fax: +1.3026365454 +Tech Fax Ext: +Tech Email: dns-admin@cscglobal.com +Name Server: pdns1.cscdns.net +Name Server: pdns2.cscdns.net +DNSSEC: unsigned +URL of the ICANN WHOIS Data Problem Reporting System: http://wdprs.internic.net/ +>>> Last update of WHOIS database: 2018-10-11T05:49:21Z <<< + +For more information on Whois status codes, please visit https://icann.org/epp + +Corporation Service Company(c) (CSC) The Trusted Partner of More than 50% of the 100 Best Global Brands. + +Contact us to learn more about our enterprise solutions for Global Domain Name Registration and Management, Trademark Research and Watching, Brand, Logo and Auction Monitoring, as well SSL Certificate Services and DNS Hosting. + +NOTICE: You are not authorized to access or query our WHOIS database through the use of high-volume, automated, electronic processes or for the purpose or purposes of using the data in any manner that violates these terms of use. The Data in the CSC WHOIS database is provided by CSC for information purposes only, and to assist persons in obtaining information about or related to a domain name registration record. CSC 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 direct mail, e-mail, telephone, or facsimile; or (2) enable high volume, automated, electronic processes that apply to CSC (or its computer systems). CSC reserves the right to terminate your access to the WHOIS database in its sole discretion for any violations by you of these terms of use. CSC reserves the right to modify these terms at any time. + +Register your domain name at http://www.cscglobal.com diff --git a/spec/fixtures/responses/whois.corporatedomains.com/com/status_registered_with_slash_date_format.expected b/spec/fixtures/responses/whois.corporatedomains.com/com/status_registered_with_slash_date_format.expected new file mode 100644 index 00000000..9918c894 --- /dev/null +++ b/spec/fixtures/responses/whois.corporatedomains.com/com/status_registered_with_slash_date_format.expected @@ -0,0 +1,105 @@ +#domain + %s == "corporatedomains.com" + +#domain_id + %s == "2546326_DOMAIN_COM-VRSN" + + +#status + %s == :registered + +#available? + %s == false + +#registered? + %s == true + + +#created_on + %s %CLASS{time} + %s %TIME{1997-10-16 04:00:00 +0000} + + +#updated_on + %s %CLASS{time} + %s %TIME{2018-10-11 05:49:21 +0000} + +#expires_on + %s %CLASS{time} + %s %TIME{2019-10-15 04:00:00 +0000} + + +#registrar + %s %CLASS{registrar} + %s.id == "299" + %s.name == "CSC CORPORATE DOMAINS, INC." + %s.organization == "CSC CORPORATE DOMAINS, INC." + %s.url == "www.cscprotectsbrands.com" + + +#registrant_contacts + %s %CLASS{array} + %s %SIZE{1} + %s[0] %CLASS{contact} + %s[0].type == Whois::Parser::Contact::TYPE_REGISTRANT + %s[0].name == "Domain Administrator" + %s[0].organization == "CSC Corporate Domains, Inc." + %s[0].address == "251 Little Falls Drive" + %s[0].city == "Wilmington" + %s[0].zip == "19808" + %s[0].state == "DE" + %s[0].country_code == "US" + %s[0].phone == "+1.3026365400" + %s[0].fax == "+1.3026365454" + %s[0].email == "admin@internationaladmin.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].name == "Domain Administrator" + %s[0].organization == "CSC Corporate Domains, Inc." + %s[0].address == "251 Little Falls Drive" + %s[0].city == "Wilmington" + %s[0].zip == "19808" + %s[0].state == "DE" + %s[0].country_code == "US" + %s[0].phone == "+1.3026365400" + %s[0].fax == "+1.3026365454" + %s[0].email == "admin@internationaladmin.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].name == "DNS Administrator" + %s[0].organization == "CSC Corporate Domains, Inc." + %s[0].address == "251 Little Falls Drive" + %s[0].city == "Wilmington" + %s[0].zip == "19808" + %s[0].state == "DE" + %s[0].country_code == "US" + %s[0].phone == "+1.3026365400" + %s[0].fax == "+1.3026365454" + %s[0].email == "dns-admin@cscglobal.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 == "pdns1.cscdns.net" + %s[0].ipv4 == nil + %s[0].ipv6 == nil + %s[1] %CLASS{nameserver} + %s[1].name == "pdns2.cscdns.net" + %s[1].ipv4 == nil + %s[1].ipv6 == nil \ No newline at end of file diff --git a/spec/fixtures/responses/whois.corporatedomains.com/status_registered.txt b/spec/fixtures/responses/whois.corporatedomains.com/com/status_registered_with_slash_date_format.txt similarity index 52% rename from spec/fixtures/responses/whois.corporatedomains.com/status_registered.txt rename to spec/fixtures/responses/whois.corporatedomains.com/com/status_registered_with_slash_date_format.txt index 54810e58..1d9025ef 100644 --- a/spec/fixtures/responses/whois.corporatedomains.com/status_registered.txt +++ b/spec/fixtures/responses/whois.corporatedomains.com/com/status_registered_with_slash_date_format.txt @@ -1,63 +1,65 @@ -Domain Name: google.com -Registry Domain ID: + +Domain Name: corporatedomains.com +Registry Domain ID: 2546326_DOMAIN_COM-VRSN Registrar WHOIS Server: whois.corporatedomains.com Registrar URL: www.cscprotectsbrands.com -Updated Date: 2012-05-16 09:28:56 -0400 -Creation Date: 1992-11-24 00:00:00 -0500 -Registrar Registration Expiration Date: 2013-11-23 00:00:00 -0500 -Registrar: CORPORATE DOMAINS, INC. +Updated Date: 2018-10-11T05:49:21Z +Creation Date: 10/16/1997 04:00:00 +Registrar Registration Expiration Date: 10/15/2019 04:00:00 +Registrar: CSC CORPORATE DOMAINS, INC. Registrar IANA ID: 299 -Registrar Abuse Contact Email: admin@internationaladmin.com +Registrar Abuse Contact Email: domainabuse@cscglobal.com Registrar Abuse Contact Phone: +1.8887802723 -Domain Status: clientUpdateProhibited -Domain Status: clientTransferProhibited -Domain Status: clientDeleteProhibited +Domain Status: clientTransferProhibited http://www.icann.org/epp#clientTransferProhibited +Domain Status: serverDeleteProhibited http://www.icann.org/epp#serverDeleteProhibited +Domain Status: serverTransferProhibited http://www.icann.org/epp#serverTransferProhibited +Domain Status: serverUpdateProhibited http://www.icann.org/epp#serverUpdateProhibited Registry Registrant ID: -Registrant Name: Dns Admin -Registrant Organization: Google Inc. -Registrant Street: Please contact contact-admin@google.com, 1600 Amphitheatre Parkway -Registrant City: Mountain View -Registrant State/Province: CA -Registrant Postal Code: 94043 +Registrant Name: Domain Administrator +Registrant Organization: CSC Corporate Domains, Inc. +Registrant Street: 251 Little Falls Drive +Registrant City: Wilmington +Registrant State/Province: DE +Registrant Postal Code: 19808 Registrant Country: US -Registrant Phone: +1.6502530000 +Registrant Phone: +1.3026365400 Registrant Phone Ext: -Registrant Fax: +1.6506188571 +Registrant Fax: +1.3026365454 Registrant Fax Ext: -Registrant Email: dns-admin@google.com +Registrant Email: admin@internationaladmin.com Registry Admin ID: -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 Name: Domain Administrator +Admin Organization: CSC Corporate Domains, Inc. +Admin Street: 251 Little Falls Drive +Admin City: Wilmington +Admin State/Province: DE +Admin Postal Code: 19808 Admin Country: US -Admin Phone: +1.6506234000 +Admin Phone: +1.3026365400 Admin Phone Ext: -Admin Fax: +1.6506188571 +Admin Fax: +1.3026365454 Admin Fax Ext: -Admin Email: dns-admin@google.com +Admin Email: admin@internationaladmin.com Registry Tech ID: -Tech Name: DNS Admin -Tech Organization: Google Inc. -Tech Street: 2400 E. Bayshore Pkwy -Tech City: Mountain View -Tech State/Province: CA -Tech Postal Code: 94043 +Tech Name: DNS Administrator +Tech Organization: CSC Corporate Domains, Inc. +Tech Street: 251 Little Falls Drive +Tech City: Wilmington +Tech State/Province: DE +Tech Postal Code: 19808 Tech Country: US -Tech Phone: +1.6503300100 +Tech Phone: +1.3026365400 Tech Phone Ext: -Tech Fax: +1.6506181499 +Tech Fax: +1.3026365454 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 +Tech Email: dns-admin@cscglobal.com +Name Server: pdns1.cscdns.net +Name Server: pdns2.cscdns.net +DNSSEC: unsigned URL of the ICANN WHOIS Data Problem Reporting System: http://wdprs.internic.net/ ->>> Last update of WHOIS database: 2012-05-16 09:28:56 -0400 <<< +>>> Last update of WHOIS database: 2018-10-11T05:49:21Z <<< +For more information on Whois status codes, please visit https://icann.org/epp Corporation Service Company(c) (CSC) The Trusted Partner of More than 50% of the 100 Best Global Brands. @@ -65,4 +67,4 @@ Contact us to learn more about our enterprise solutions for Global Domain Name R NOTICE: You are not authorized to access or query our WHOIS database through the use of high-volume, automated, electronic processes or for the purpose or purposes of using the data in any manner that violates these terms of use. The Data in the CSC WHOIS database is provided by CSC for information purposes only, and to assist persons in obtaining information about or related to a domain name registration record. CSC 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 direct mail, e-mail, telephone, or facsimile; or (2) enable high volume, automated, electronic processes that apply to CSC (or its computer systems). CSC reserves the right to terminate your access to the WHOIS database in its sole discretion for any violations by you of these terms of use. CSC reserves the right to modify these terms at any time. -Register your domain name at http://www.cscglobal.com \ No newline at end of file +Register your domain name at http://www.cscglobal.com diff --git a/spec/fixtures/responses/whois.corporatedomains.com/status_registered.expected b/spec/fixtures/responses/whois.corporatedomains.com/status_registered.expected deleted file mode 100644 index 9983b7e7..00000000 --- a/spec/fixtures/responses/whois.corporatedomains.com/status_registered.expected +++ /dev/null @@ -1,113 +0,0 @@ -#domain - %s == "google.com" - -#domain_id - %s == "" - - -#status - %s == :registered - -#available? - %s == false - -#registered? - %s == true - - -#created_on - %s %CLASS{time} - %s %TIME{1992-11-24 00:00:00 -0500} - - -#updated_on - %s %CLASS{time} - %s %TIME{2012-05-16 09:28:56 -0400} - -#expires_on - %s %CLASS{time} - %s %TIME{2013-11-23 00:00:00 -0500} - - -#registrar - %s %CLASS{registrar} - %s.id == "299" - %s.name == "CORPORATE DOMAINS, INC." - %s.organization == "CORPORATE DOMAINS, INC." - %s.url == "www.cscprotectsbrands.com" - - -#registrant_contacts - %s %CLASS{array} - %s %SIZE{1} - %s[0] %CLASS{contact} - %s[0].type == Whois::Parser::Contact::TYPE_REGISTRANT - %s[0].name == "Dns Admin" - %s[0].organization == "Google Inc." - %s[0].address == "Please contact contact-admin@google.com, 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].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].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[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].name == "DNS Admin" - %s[0].organization == "Google Inc." - %s[0].address == "2400 E. Bayshore Pkwy" - %s[0].city == "Mountain View" - %s[0].zip == "94043" - %s[0].state == "CA" - %s[0].country_code == "US" - %s[0].phone == "+1.6503300100" - %s[0].fax == "+1.6506181499" - %s[0].email == "dns-admin@google.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 == "ns2.google.com" - %s[0].ipv4 == nil - %s[0].ipv6 == nil - %s[1] %CLASS{nameserver} - %s[1].name == "ns1.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 \ No newline at end of file diff --git a/spec/whois/parsers/responses/whois.corporatedomains.com/status_available_spec.rb b/spec/whois/parsers/responses/whois.corporatedomains.com/com/status_available_spec.rb similarity index 91% rename from spec/whois/parsers/responses/whois.corporatedomains.com/status_available_spec.rb rename to spec/whois/parsers/responses/whois.corporatedomains.com/com/status_available_spec.rb index 9c23d000..5d0bb6b6 100644 --- a/spec/whois/parsers/responses/whois.corporatedomains.com/status_available_spec.rb +++ b/spec/whois/parsers/responses/whois.corporatedomains.com/com/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.corporatedomains.com/status_available.expected +# /spec/fixtures/responses/whois.corporatedomains.com/com/status_available.expected # # and regenerate the tests with the following rake task # @@ -16,7 +16,7 @@ describe Whois::Parsers::WhoisCorporatedomainsCom, "status_available.expected" do subject do - file = fixture("responses", "whois.corporatedomains.com/status_available.txt") + file = fixture("responses", "whois.corporatedomains.com/com/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.corporatedomains.com/status_registered_spec.rb b/spec/whois/parsers/responses/whois.corporatedomains.com/com/status_registered_with_hyphen_date_format_spec.rb similarity index 55% rename from spec/whois/parsers/responses/whois.corporatedomains.com/status_registered_spec.rb rename to spec/whois/parsers/responses/whois.corporatedomains.com/com/status_registered_with_hyphen_date_format_spec.rb index 19594b66..2eaca6ef 100644 --- a/spec/whois/parsers/responses/whois.corporatedomains.com/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.corporatedomains.com/com/status_registered_with_hyphen_date_format_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.corporatedomains.com/status_registered.expected +# /spec/fixtures/responses/whois.corporatedomains.com/com/status_registered_with_hyphen_date_format.expected # # and regenerate the tests with the following rake task # @@ -13,22 +13,22 @@ require 'spec_helper' require 'whois/parsers/whois.corporatedomains.com.rb' -describe Whois::Parsers::WhoisCorporatedomainsCom, "status_registered.expected" do +describe Whois::Parsers::WhoisCorporatedomainsCom, "status_registered_with_hyphen_date_format.expected" do subject do - file = fixture("responses", "whois.corporatedomains.com/status_registered.txt") + file = fixture("responses", "whois.corporatedomains.com/com/status_registered_with_hyphen_date_format.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.com") + expect(subject.domain).to eq("corporatedomains.com") end end describe "#domain_id" do it do - expect(subject.domain_id).to eq("") + expect(subject.domain_id).to eq("2546326_DOMAIN_COM-VRSN") end end describe "#status" do @@ -49,27 +49,27 @@ 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(Time.parse("1997-10-16 04:00:00 +0000")) 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(Time.parse("2018-10-11 05:49:21 +0000")) 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(Time.parse("2019-10-15 04:00:00 +0000")) 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.organization).to eq("CORPORATE DOMAINS, INC.") + expect(subject.registrar.name).to eq("CSC CORPORATE DOMAINS, INC.") + expect(subject.registrar.organization).to eq("CSC CORPORATE DOMAINS, INC.") expect(subject.registrar.url).to eq("www.cscprotectsbrands.com") end end @@ -79,16 +79,16 @@ expect(subject.registrant_contacts.size).to eq(1) expect(subject.registrant_contacts[0]).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].name).to eq("Domain Administrator") + expect(subject.registrant_contacts[0].organization).to eq("CSC Corporate Domains, Inc.") + expect(subject.registrant_contacts[0].address).to eq("251 Little Falls Drive") + expect(subject.registrant_contacts[0].city).to eq("Wilmington") + expect(subject.registrant_contacts[0].zip).to eq("19808") + expect(subject.registrant_contacts[0].state).to eq("DE") 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("+1.3026365400") + expect(subject.registrant_contacts[0].fax).to eq("+1.3026365454") + expect(subject.registrant_contacts[0].email).to eq("admin@internationaladmin.com") expect(subject.registrant_contacts[0].created_on).to eq(nil) expect(subject.registrant_contacts[0].updated_on).to eq(nil) end @@ -99,16 +99,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].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].name).to eq("Domain Administrator") + expect(subject.admin_contacts[0].organization).to eq("CSC Corporate Domains, Inc.") + expect(subject.admin_contacts[0].address).to eq("251 Little Falls Drive") + expect(subject.admin_contacts[0].city).to eq("Wilmington") + expect(subject.admin_contacts[0].zip).to eq("19808") + expect(subject.admin_contacts[0].state).to eq("DE") 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].phone).to eq("+1.3026365400") + expect(subject.admin_contacts[0].fax).to eq("+1.3026365454") + expect(subject.admin_contacts[0].email).to eq("admin@internationaladmin.com") expect(subject.admin_contacts[0].created_on).to eq(nil) expect(subject.admin_contacts[0].updated_on).to eq(nil) end @@ -119,16 +119,16 @@ expect(subject.technical_contacts.size).to eq(1) expect(subject.technical_contacts[0]).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].name).to eq("DNS Administrator") + expect(subject.technical_contacts[0].organization).to eq("CSC Corporate Domains, Inc.") + expect(subject.technical_contacts[0].address).to eq("251 Little Falls Drive") + expect(subject.technical_contacts[0].city).to eq("Wilmington") + expect(subject.technical_contacts[0].zip).to eq("19808") + expect(subject.technical_contacts[0].state).to eq("DE") 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].phone).to eq("+1.3026365400") + expect(subject.technical_contacts[0].fax).to eq("+1.3026365454") + expect(subject.technical_contacts[0].email).to eq("dns-admin@cscglobal.com") expect(subject.technical_contacts[0].created_on).to eq(nil) expect(subject.technical_contacts[0].updated_on).to eq(nil) end @@ -136,23 +136,15 @@ 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("ns2.google.com") + expect(subject.nameservers[0].name).to eq("pdns1.cscdns.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("ns1.google.com") + expect(subject.nameservers[1].name).to eq("pdns2.cscdns.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.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 end diff --git a/spec/whois/parsers/responses/whois.corporatedomains.com/com/status_registered_with_slash_date_format_spec.rb b/spec/whois/parsers/responses/whois.corporatedomains.com/com/status_registered_with_slash_date_format_spec.rb new file mode 100644 index 00000000..3ea8e1ac --- /dev/null +++ b/spec/whois/parsers/responses/whois.corporatedomains.com/com/status_registered_with_slash_date_format_spec.rb @@ -0,0 +1,150 @@ +# 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.corporatedomains.com/com/status_registered_with_slash_date_format.expected +# +# and regenerate the tests with the following rake task +# +# $ rake spec:generate +# + +require 'spec_helper' +require 'whois/parsers/whois.corporatedomains.com.rb' + +describe Whois::Parsers::WhoisCorporatedomainsCom, "status_registered_with_slash_date_format.expected" do + + subject do + file = fixture("responses", "whois.corporatedomains.com/com/status_registered_with_slash_date_format.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("corporatedomains.com") + end + end + describe "#domain_id" do + it do + expect(subject.domain_id).to eq("2546326_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(Time.parse("1997-10-16 04:00:00 +0000")) + 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-11 05:49:21 +0000")) + 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-15 04:00:00 +0000")) + 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.") + expect(subject.registrar.organization).to eq("CSC 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("Domain Administrator") + expect(subject.registrant_contacts[0].organization).to eq("CSC Corporate Domains, Inc.") + expect(subject.registrant_contacts[0].address).to eq("251 Little Falls Drive") + expect(subject.registrant_contacts[0].city).to eq("Wilmington") + expect(subject.registrant_contacts[0].zip).to eq("19808") + expect(subject.registrant_contacts[0].state).to eq("DE") + expect(subject.registrant_contacts[0].country_code).to eq("US") + expect(subject.registrant_contacts[0].phone).to eq("+1.3026365400") + expect(subject.registrant_contacts[0].fax).to eq("+1.3026365454") + expect(subject.registrant_contacts[0].email).to eq("admin@internationaladmin.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("Domain Administrator") + expect(subject.admin_contacts[0].organization).to eq("CSC Corporate Domains, Inc.") + expect(subject.admin_contacts[0].address).to eq("251 Little Falls Drive") + expect(subject.admin_contacts[0].city).to eq("Wilmington") + expect(subject.admin_contacts[0].zip).to eq("19808") + expect(subject.admin_contacts[0].state).to eq("DE") + expect(subject.admin_contacts[0].country_code).to eq("US") + expect(subject.admin_contacts[0].phone).to eq("+1.3026365400") + expect(subject.admin_contacts[0].fax).to eq("+1.3026365454") + expect(subject.admin_contacts[0].email).to eq("admin@internationaladmin.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 Administrator") + expect(subject.technical_contacts[0].organization).to eq("CSC Corporate Domains, Inc.") + expect(subject.technical_contacts[0].address).to eq("251 Little Falls Drive") + expect(subject.technical_contacts[0].city).to eq("Wilmington") + expect(subject.technical_contacts[0].zip).to eq("19808") + expect(subject.technical_contacts[0].state).to eq("DE") + expect(subject.technical_contacts[0].country_code).to eq("US") + expect(subject.technical_contacts[0].phone).to eq("+1.3026365400") + expect(subject.technical_contacts[0].fax).to eq("+1.3026365454") + expect(subject.technical_contacts[0].email).to eq("dns-admin@cscglobal.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("pdns1.cscdns.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("pdns2.cscdns.net") + expect(subject.nameservers[1].ipv4).to eq(nil) + expect(subject.nameservers[1].ipv6).to eq(nil) + end + end +end From 2084f3e72dde372365e6c6cdf7d01d85d2429066 Mon Sep 17 00:00:00 2001 From: Nicole Ng Date: Fri, 21 Jun 2019 10:14:40 -0700 Subject: [PATCH 4/4] Call `Time.utc` to parse time for corporatedomains with slash-format Return the result from `Time.utc` to parse dates using slash-format in corporatedomains, since this would avoid using joins and string interpolation before being passed into `parse_time`. Renamed the method as the return value now returns a Time object rather than a string. --- .../parsers/whois.corporatedomains.com.rb | 26 ++++++++++--------- ...registered_with_slash_date_format.expected | 4 +-- ..._registered_with_slash_date_format_spec.rb | 4 +-- 3 files changed, 18 insertions(+), 16 deletions(-) diff --git a/lib/whois/parsers/whois.corporatedomains.com.rb b/lib/whois/parsers/whois.corporatedomains.com.rb index f46fdb78..04b6711b 100644 --- a/lib/whois/parsers/whois.corporatedomains.com.rb +++ b/lib/whois/parsers/whois.corporatedomains.com.rb @@ -25,19 +25,21 @@ class WhoisCorporatedomainsCom < BaseIcannCompliant property_supported :created_on do node("Creation Date") do |value| - # Update the format so the value is parsed properly - value = reformat_slash_date_format(value) if value.include?("/") - - parse_time(value) + if value.include?("/") + parse_time_with_slash_format(value) + else + parse_time(value) + end end end property_supported :expires_on do node("Registrar Registration Expiration Date") do |value| - # Update the format so the value is parsed properly - value = reformat_slash_date_format(value) if value.include?("/") - - parse_time(value) + if value.include?("/") + parse_time_with_slash_format(value) + else + parse_time(value) + end end end @@ -47,13 +49,13 @@ class WhoisCorporatedomainsCom < BaseIcannCompliant # - hyphen-separated date format YYYY-MM-DDTHH:MM:SSZ # - slash-separated date format MM/DD/YYYY HH:MM:SS # - # The latter format causes problems because `parse_time` parsed as (DD/MM/YYYY HH:MM:SS) - def reformat_slash_date_format(value) + # The latter format causes problems because `parse_time` parsed as (DD/MM/YYYY HH:MM:SS), so it needs + # to be parsed differently. + def parse_time_with_slash_format(value) date, time = value.split month, day, year = date.split("/") - reformatted_date = [year, month, day].join("-") - "#{reformatted_date}T#{time}Z" + Time.utc(year, month, day, time) end end diff --git a/spec/fixtures/responses/whois.corporatedomains.com/com/status_registered_with_slash_date_format.expected b/spec/fixtures/responses/whois.corporatedomains.com/com/status_registered_with_slash_date_format.expected index 9918c894..d2982d41 100644 --- a/spec/fixtures/responses/whois.corporatedomains.com/com/status_registered_with_slash_date_format.expected +++ b/spec/fixtures/responses/whois.corporatedomains.com/com/status_registered_with_slash_date_format.expected @@ -22,11 +22,11 @@ #updated_on %s %CLASS{time} - %s %TIME{2018-10-11 05:49:21 +0000} + %s %TIME{2018-10-11 05:49:21 UTC} #expires_on %s %CLASS{time} - %s %TIME{2019-10-15 04:00:00 +0000} + %s %TIME{2019-10-15 04:00:00 UTC} #registrar diff --git a/spec/whois/parsers/responses/whois.corporatedomains.com/com/status_registered_with_slash_date_format_spec.rb b/spec/whois/parsers/responses/whois.corporatedomains.com/com/status_registered_with_slash_date_format_spec.rb index 3ea8e1ac..5e913496 100644 --- a/spec/whois/parsers/responses/whois.corporatedomains.com/com/status_registered_with_slash_date_format_spec.rb +++ b/spec/whois/parsers/responses/whois.corporatedomains.com/com/status_registered_with_slash_date_format_spec.rb @@ -55,13 +55,13 @@ describe "#updated_on" do it do expect(subject.updated_on).to be_a(Time) - expect(subject.updated_on).to eq(Time.parse("2018-10-11 05:49:21 +0000")) + expect(subject.updated_on).to eq(Time.parse("2018-10-11 05:49: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("2019-10-15 04:00:00 +0000")) + expect(subject.expires_on).to eq(Time.parse("2019-10-15 04:00:00 UTC")) end end describe "#registrar" do