From 27f540708c3f8a88ecdd56488ab0008d692da418 Mon Sep 17 00:00:00 2001 From: Nicole Ng Date: Thu, 20 Jun 2019 13:56:18 -0700 Subject: [PATCH 1/3] 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 9767a93096e41e1f1beb180b20e6ba49af1ebe2f Mon Sep 17 00:00:00 2001 From: Nicole Ng Date: Thu, 20 Jun 2019 14:00:56 -0700 Subject: [PATCH 2/3] 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 2e0e49aab1888f814f3f80e2a6abee609dd6a611 Mon Sep 17 00:00:00 2001 From: Nicole Ng Date: Fri, 21 Jun 2019 10:14:40 -0700 Subject: [PATCH 3/3] 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