From 9df1a1af0589044ff094c84423d9ff870605a7e0 Mon Sep 17 00:00:00 2001 From: Cork Date: Fri, 27 Apr 2018 12:59:26 +0200 Subject: [PATCH 1/4] Add support for whois.ilait.com --- lib/whois/parsers/whois.ilait.com.rb | 98 ++++++++++++ .../whois.ilait.com/status_available.expected | 42 +++++ .../whois.ilait.com/status_available.txt | 1 + .../status_registered.expected | 98 ++++++++++++ .../whois.ilait.com/status_registered.txt | 127 +++++++++++++++ .../whois.ilait.com/status_available_spec.rb | 93 +++++++++++ .../whois.ilait.com/status_registered_spec.rb | 144 ++++++++++++++++++ 7 files changed, 603 insertions(+) create mode 100644 lib/whois/parsers/whois.ilait.com.rb create mode 100644 spec/fixtures/responses/whois.ilait.com/status_available.expected create mode 100644 spec/fixtures/responses/whois.ilait.com/status_available.txt create mode 100644 spec/fixtures/responses/whois.ilait.com/status_registered.expected create mode 100644 spec/fixtures/responses/whois.ilait.com/status_registered.txt create mode 100644 spec/whois/parsers/responses/whois.ilait.com/status_available_spec.rb create mode 100644 spec/whois/parsers/responses/whois.ilait.com/status_registered_spec.rb diff --git a/lib/whois/parsers/whois.ilait.com.rb b/lib/whois/parsers/whois.ilait.com.rb new file mode 100644 index 00000000..6eca8045 --- /dev/null +++ b/lib/whois/parsers/whois.ilait.com.rb @@ -0,0 +1,98 @@ +#-- +# Ruby Whois +# +# An intelligent pure Ruby WHOIS client and parser. +# +# Copyright (c) 2009-2018 Simone Carletti +#++ + + +require_relative 'base_icann_compliant' + + +module Whois + class Parsers + + class WhoisIlaitCom < BaseIcannCompliant + self.scanner = Scanners::BaseIcannCompliant, { + pattern_available: /^Domain not found\.\n/ + } + + property_supported :available? do + !!(content_for_scanner =~ /NOT FOUND/) + end + + property_supported :domain do + node("Domain Name") + end + + property_supported :domain_id do + node("Registry Domain ID") + end + + property_supported :created_on do + node("Creation Date") { |value| parse_time(value) } + end + + property_supported :updated_on do + node("Updated Date") { |value| parse_time(value) } + end + + property_supported :expires_on do + node("Registrar Registration Expiration Date") { |value| parse_time(value) } + end + + property_supported :registrar do + return unless node("Registrar") + Parser::Registrar.new( + id: node("Registrar IANA ID"), + name: node("Registrar"), + organization: node("Registrar"), + url: node("Registrar URL") + ) + end + + property_supported :registrant_contacts do + build_contact("Registrant", Parser::Contact::TYPE_REGISTRANT) + end + + property_supported :admin_contacts do + build_contact("Admin", Parser::Contact::TYPE_ADMINISTRATIVE) + end + + property_supported :technical_contacts do + build_contact("Tech", Parser::Contact::TYPE_TECHNICAL) + end + + # Checks whether this response contains a message + # that can be reconducted to a "WHOIS Server Unavailable" status. + # + # @return [Boolean] + def response_unavailable? + !!node("response:unavailable") + end + + private + + def build_contact(element, type) + node("#{element} Name") do + Parser::Contact.new( + type: type, + id: node("#{element} ID").presence, + name: value_for_property(element, 'Name'), + organization: value_for_property(element, 'Organization'), + address: value_for_property(element, 'Street'), + city: value_for_property(element, 'City'), + zip: value_for_property(element, 'Postal Code'), + state: value_for_property(element, 'State/Province'), + country_code: value_for_property(element, 'Country'), + phone: value_for_phone_property(element, 'Phone'), + fax: value_for_phone_property(element, 'Fax'), + email: value_for_property(element, 'Email') + ) + end + end + + end + end +end diff --git a/spec/fixtures/responses/whois.ilait.com/status_available.expected b/spec/fixtures/responses/whois.ilait.com/status_available.expected new file mode 100644 index 00000000..f0e6a67f --- /dev/null +++ b/spec/fixtures/responses/whois.ilait.com/status_available.expected @@ -0,0 +1,42 @@ +#domain + %s == nil + +#domain_id + %s == nil + +#status + %s == :available + +#available? + %s == true + +#registered? + %s == false + +#created_on + %s == nil + +#updated_on + %s == nil + +#expires_on + %s == nil + +#registrar + %s == nil + +#registrant_contacts + %s %CLASS{array} + %s == [] + +#admin_contacts + %s %CLASS{array} + %s == [] + +#technical_contacts + %s %CLASS{array} + %s == [] + +#nameservers + %s %CLASS{array} + %s == [] diff --git a/spec/fixtures/responses/whois.ilait.com/status_available.txt b/spec/fixtures/responses/whois.ilait.com/status_available.txt new file mode 100644 index 00000000..679aadb9 --- /dev/null +++ b/spec/fixtures/responses/whois.ilait.com/status_available.txt @@ -0,0 +1 @@ +NOT FOUND diff --git a/spec/fixtures/responses/whois.ilait.com/status_registered.expected b/spec/fixtures/responses/whois.ilait.com/status_registered.expected new file mode 100644 index 00000000..e1b0e3a2 --- /dev/null +++ b/spec/fixtures/responses/whois.ilait.com/status_registered.expected @@ -0,0 +1,98 @@ +#domain + %s == "ilait.com" + +#domain_id + %s == "564826693_DOMAIN_COM-VRSN" + + +#status + %s == :registered + +#available? + %s == false + +#registered? + %s == true + + +#created_on + %s %CLASS{time} + %s %TIME{2006-08-22 15:43:04 UTC} + +#updated_on + %s %CLASS{time} + %s %TIME{2014-09-17 14:09:03 UTC} + +#expires_on + %s %CLASS{time} + %s %TIME{2019-08-22 15:43:04 UTC} + + +#registrar + %s %CLASS{registrar} + %s.id == "1493" + %s.name == "ilait AB" + %s.organization == "ilait AB" + %s.url == "http://www.ilait.se" + + +#registrant_contacts + %s %CLASS{array} + %s %SIZE{1} + %s[0] %CLASS{contact} + %s[0].type == Whois::Parser::Contact::TYPE_REGISTRANT + %s[0].name == "ilait Registry" + %s[0].organization == "ilait AB" + %s[0].address == "Truckgatan 13" + %s[0].city == "Kungälv" + %s[0].zip == "44240" + %s[0].state == "" + %s[0].country_code == "SE" + %s[0].phone == "+46.313522300" + %s[0].fax == "+46.313522301" + %s[0].email == "registry@ilait.se" + +#admin_contacts + %s %CLASS{array} + %s %SIZE{1} + %s[0] %CLASS{contact} + %s[0].type == Whois::Parser::Contact::TYPE_ADMINISTRATIVE + %s[0].name == "ilait Registry" + %s[0].organization == "ilait AB" + %s[0].address == "Truckgatan 13" + %s[0].city == "Kungälv" + %s[0].zip == "44240" + %s[0].state == "" + %s[0].country_code == "SE" + %s[0].phone == "+46.313522300" + %s[0].fax == "+46.313522301" + %s[0].email == "registry@ilait.se" + +#technical_contacts + %s %CLASS{array} + %s %SIZE{1} + %s[0] %CLASS{contact} + %s[0].type == Whois::Parser::Contact::TYPE_TECHNICAL + %s[0].name == "ilait Registry" + %s[0].organization == "ilait AB" + %s[0].address == "Truckgatan 13" + %s[0].city == "Kungälv" + %s[0].zip == "44240" + %s[0].state == "" + %s[0].country_code == "SE" + %s[0].phone == "+46.313522300" + %s[0].fax == "+46.313522301" + %s[0].email == "registry@ilait.se" + + +#nameservers + %s %CLASS{array} + %s %SIZE{4} + %s[0] %CLASS{nameserver} + %s[0].name == "ns1.ilait.se" + %s[1] %CLASS{nameserver} + %s[1].name == "ns2.ilait.se" + %s[2] %CLASS{nameserver} + %s[2].name == "ns3.ilait.se" + %s[3] %CLASS{nameserver} + %s[3].name == "ns4.ilait.se" diff --git a/spec/fixtures/responses/whois.ilait.com/status_registered.txt b/spec/fixtures/responses/whois.ilait.com/status_registered.txt new file mode 100644 index 00000000..a3a81f88 --- /dev/null +++ b/spec/fixtures/responses/whois.ilait.com/status_registered.txt @@ -0,0 +1,127 @@ + Domain Name: ILAIT.COM + Registry Domain ID: 564826693_DOMAIN_COM-VRSN + Registrar WHOIS Server: whois.ilait.com + Registrar URL: http://www.ilait.se + Updated Date: 2012-09-05T06:43:44Z + Creation Date: 2006-08-22T15:43:04Z + Registry Expiry Date: 2019-08-22T15:43:04Z + Registrar: ilait AB + Registrar IANA ID: 1493 + Registrar Abuse Contact Email: abuse@ilait.com + Registrar Abuse Contact Phone: +46.313522300 + Domain Status: ok https://icann.org/epp#ok + Name Server: NS1.ILAIT.SE + Name Server: NS2.ILAIT.SE + Name Server: NS3.ILAIT.SE + Name Server: NS4.ILAIT.SE + DNSSEC: unsigned + URL of the ICANN Whois Inaccuracy Complaint Form: https://www.icann.org/wicf/ +>>> Last update of whois database: 2018-04-27T09:37:35Z <<< + +For more information on Whois status codes, please visit https://icann.org/epp + +NOTICE: The expiration date displayed in this record is the date the +registrar's sponsorship of the domain name registration in the registry is +currently set to expire. This date does not necessarily reflect the expiration +date of the domain name registrant's agreement with the sponsoring +registrar. Users may consult the sponsoring registrar's Whois database to +view the registrar's reported date of expiration for this registration. + +TERMS OF USE: You are not authorized to access or query our Whois +database through the use of electronic processes that are high-volume and +automated except as reasonably necessary to register domain names or +modify existing registrations; the Data in VeriSign Global Registry +Services' ("VeriSign") Whois database is provided by VeriSign for +information purposes only, and to assist persons in obtaining information +about or related to a domain name registration record. VeriSign does not +guarantee its accuracy. By submitting a Whois query, you agree to abide +by the following terms of use: You agree that you may use this Data only +for lawful purposes and that under no circumstances will you use this Data +to: (1) allow, enable, or otherwise support the transmission of mass +unsolicited, commercial advertising or solicitations via e-mail, telephone, +or facsimile; or (2) enable high volume, automated, electronic processes +that apply to VeriSign (or its computer systems). The compilation, +repackaging, dissemination or other use of this Data is expressly +prohibited without the prior written consent of VeriSign. You agree not to +use electronic processes that are automated and high-volume to access or +query the Whois database except as reasonably necessary to register +domain names or modify existing registrations. VeriSign reserves the right +to restrict your access to the Whois database in its sole discretion to ensure +operational stability. VeriSign may restrict or terminate your access to the +Whois database for failure to abide by these terms of use. VeriSign +reserves the right to modify these terms at any time. + +The Registry database contains ONLY .COM, .NET, .EDU domains and +Registrars. +Domain Name: ilait.com +Registry Domain ID: 564826693_DOMAIN_COM-VRSN +Registrar WHOIS Server: whois.ilait.com +Registrar URL: http://www.ilait.se +Updated Date: 2014-09-17T14:09:03Z +Creation Date: 2006-08-22T15:43:04Z +Registrar Registration Expiration Date: 2019-08-22T15:43:04Z +Registrar: ilait AB +Registrar IANA ID: 1493 +Registrar Abuse Contact Email: abuse@ilait.se +Registrar Abuse Contact Phone: +46.313522300 +Reseller: +Domain Status: ok https://icann.org/epp#ok +Registry Registrant ID: +Registrant Name: ilait Registry +Registrant Organization: ilait AB +Registrant Street: Truckgatan 13 +Registrant City: Kungälv +Registrant State/Province: +Registrant Postal Code: 44240 +Registrant Country: SE +Registrant Phone: +46.313522300 +Registrant Phone Ext: +Registrant Fax: +46.313522301 +Registrant Fax Ext: +Registrant Email: registry@ilait.se +Registry Admin ID: +Admin Name: ilait Registry +Admin Organization: ilait AB +Admin Street: Truckgatan 13 +Admin City: Kungälv +Admin State/Province: +Admin Postal Code: 44240 +Admin Country: SE +Admin Phone: +46.313522300 +Admin Phone Ext: +Admin Fax: +46.313522301 +Admin Fax Ext: +Admin Email: registry@ilait.se +Registry Tech ID: +Tech Name: ilait Registry +Tech Organization: ilait AB +Tech Street: Truckgatan 13 +Tech City: Kungälv +Tech State/Province: +Tech Postal Code: 44240 +Tech Country: SE +Tech Phone: +46.313522300 +Tech Phone Ext: +Tech Fax: +46.313522301 +Tech Fax Ext: +Tech Email: registry@ilait.se +Name Server: ns1.ilait.se +Name Server: ns2.ilait.se +Name Server: ns3.ilait.se +Name Server: ns4.ilait.se +DNSSEC: unsigned +URL of the ICANN WHOIS Data Problem Reporting System: http://wdprs.internic.net/ +>>> Last update of WHOIS database: 2018-04-27T09:37:54Z <<< + +For more information on Whois status codes, please visit https://icann.org/epp + +NOTE: By submitting a WHOIS query, you agree to abide by the following +NOTE: terms of use: You agree that you may use this data only for lawful +NOTE: purposes and that under no circumstances will you use this data to: +NOTE: (1) allow, enable, or otherwise support the transmission of mass +NOTE: unsolicited, commercial advertising or solicitations via direct mail, +NOTE: e-mail, telephone, or facsimile; or (2) enable high volume, automated, +NOTE: electronic processes that apply to Ilait (or its computer systems). +NOTE: The compilation, repackaging, dissemination or other use of this data +NOTE: is expressly prohibited without the prior written consent of Ilait. +NOTE: All information is provided "as is" without accuracy guarantees. diff --git a/spec/whois/parsers/responses/whois.ilait.com/status_available_spec.rb b/spec/whois/parsers/responses/whois.ilait.com/status_available_spec.rb new file mode 100644 index 00000000..e60a79d7 --- /dev/null +++ b/spec/whois/parsers/responses/whois.ilait.com/status_available_spec.rb @@ -0,0 +1,93 @@ +# encoding: utf-8 + +# This file is autogenerated. Do not edit it manually. +# If you want change the content of this file, edit +# +# /spec/fixtures/responses/whois.ilait.com/status_available.expected +# +# and regenerate the tests with the following rake task +# +# $ rake spec:generate +# + +require 'spec_helper' +require 'whois/parsers/whois.ilait.com.rb' + +describe Whois::Parsers::WhoisIlaitCom, "status_available.expected" do + + subject do + file = fixture("responses", "whois.ilait.com/status_available.txt") + part = Whois::Record::Part.new(body: File.read(file)) + described_class.new(part) + end + + describe "#domain" do + it do + expect(subject.domain).to eq(nil) + end + end + describe "#domain_id" do + it do + expect(subject.domain_id).to eq(nil) + end + end + describe "#status" do + it do + expect(subject.status).to eq(:available) + end + end + describe "#available?" do + it do + expect(subject.available?).to eq(true) + end + end + describe "#registered?" do + it do + expect(subject.registered?).to eq(false) + end + end + describe "#created_on" do + it do + expect(subject.created_on).to eq(nil) + end + end + describe "#updated_on" do + it do + expect(subject.updated_on).to eq(nil) + end + end + describe "#expires_on" do + it do + expect(subject.expires_on).to eq(nil) + end + end + describe "#registrar" do + it do + expect(subject.registrar).to eq(nil) + end + end + describe "#registrant_contacts" do + it do + expect(subject.registrant_contacts).to be_a(Array) + expect(subject.registrant_contacts).to eq([]) + end + end + describe "#admin_contacts" do + it do + expect(subject.admin_contacts).to be_a(Array) + expect(subject.admin_contacts).to eq([]) + end + end + describe "#technical_contacts" do + it do + expect(subject.technical_contacts).to be_a(Array) + expect(subject.technical_contacts).to eq([]) + end + end + describe "#nameservers" do + it do + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers).to eq([]) + end + end +end diff --git a/spec/whois/parsers/responses/whois.ilait.com/status_registered_spec.rb b/spec/whois/parsers/responses/whois.ilait.com/status_registered_spec.rb new file mode 100644 index 00000000..9497ad77 --- /dev/null +++ b/spec/whois/parsers/responses/whois.ilait.com/status_registered_spec.rb @@ -0,0 +1,144 @@ +# 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.ilait.com/status_registered.expected +# +# and regenerate the tests with the following rake task +# +# $ rake spec:generate +# + +require 'spec_helper' +require 'whois/parsers/whois.ilait.com.rb' + +describe Whois::Parsers::WhoisIlaitCom, "status_registered.expected" do + + subject do + file = fixture("responses", "whois.ilait.com/status_registered.txt") + part = Whois::Record::Part.new(body: File.read(file)) + described_class.new(part) + end + + describe "#domain" do + it do + expect(subject.domain).to eq("ilait.com") + end + end + describe "#domain_id" do + it do + expect(subject.domain_id).to eq("564826693_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("2006-08-22 15:43:04 UTC")) + end + end + describe "#updated_on" do + it do + expect(subject.updated_on).to be_a(Time) + expect(subject.updated_on).to eq(Time.parse("2014-09-17 14:09:03 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-08-22 15:43:04 UTC")) + end + end + describe "#registrar" do + it do + expect(subject.registrar).to be_a(Whois::Parser::Registrar) + expect(subject.registrar.id).to eq("1493") + expect(subject.registrar.name).to eq("ilait AB") + expect(subject.registrar.organization).to eq("ilait AB") + expect(subject.registrar.url).to eq("http://www.ilait.se") + 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("ilait Registry") + expect(subject.registrant_contacts[0].organization).to eq("ilait AB") + expect(subject.registrant_contacts[0].address).to eq("Truckgatan 13") + expect(subject.registrant_contacts[0].city).to eq("Kungälv") + expect(subject.registrant_contacts[0].zip).to eq("44240") + expect(subject.registrant_contacts[0].state).to eq("") + expect(subject.registrant_contacts[0].country_code).to eq("SE") + expect(subject.registrant_contacts[0].phone).to eq("+46.313522300") + expect(subject.registrant_contacts[0].fax).to eq("+46.313522301") + expect(subject.registrant_contacts[0].email).to eq("registry@ilait.se") + 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("ilait Registry") + expect(subject.admin_contacts[0].organization).to eq("ilait AB") + expect(subject.admin_contacts[0].address).to eq("Truckgatan 13") + expect(subject.admin_contacts[0].city).to eq("Kungälv") + expect(subject.admin_contacts[0].zip).to eq("44240") + expect(subject.admin_contacts[0].state).to eq("") + expect(subject.admin_contacts[0].country_code).to eq("SE") + expect(subject.admin_contacts[0].phone).to eq("+46.313522300") + expect(subject.admin_contacts[0].fax).to eq("+46.313522301") + expect(subject.admin_contacts[0].email).to eq("registry@ilait.se") + 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("ilait Registry") + expect(subject.technical_contacts[0].organization).to eq("ilait AB") + expect(subject.technical_contacts[0].address).to eq("Truckgatan 13") + expect(subject.technical_contacts[0].city).to eq("Kungälv") + expect(subject.technical_contacts[0].zip).to eq("44240") + expect(subject.technical_contacts[0].state).to eq("") + expect(subject.technical_contacts[0].country_code).to eq("SE") + expect(subject.technical_contacts[0].phone).to eq("+46.313522300") + expect(subject.technical_contacts[0].fax).to eq("+46.313522301") + expect(subject.technical_contacts[0].email).to eq("registry@ilait.se") + end + end + describe "#nameservers" do + it do + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers.size).to eq(4) + expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[0].name).to eq("ns1.ilait.se") + expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[1].name).to eq("ns2.ilait.se") + expect(subject.nameservers[2]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[2].name).to eq("ns3.ilait.se") + expect(subject.nameservers[3]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[3].name).to eq("ns4.ilait.se") + end + end +end From 4eeea45b6f3e2b4e95da7fab710a49e26e41c867 Mon Sep 17 00:00:00 2001 From: Cork Date: Thu, 3 May 2018 11:38:01 +0200 Subject: [PATCH 2/4] Remove duplicate property_supported --- lib/whois/parsers/whois.ilait.com.rb | 24 ------------------------ 1 file changed, 24 deletions(-) diff --git a/lib/whois/parsers/whois.ilait.com.rb b/lib/whois/parsers/whois.ilait.com.rb index 6eca8045..82210840 100644 --- a/lib/whois/parsers/whois.ilait.com.rb +++ b/lib/whois/parsers/whois.ilait.com.rb @@ -22,26 +22,10 @@ class WhoisIlaitCom < BaseIcannCompliant !!(content_for_scanner =~ /NOT FOUND/) end - property_supported :domain do - node("Domain Name") - end - - property_supported :domain_id do - node("Registry Domain ID") - end - property_supported :created_on do node("Creation Date") { |value| parse_time(value) } end - property_supported :updated_on do - node("Updated Date") { |value| parse_time(value) } - end - - property_supported :expires_on do - node("Registrar Registration Expiration Date") { |value| parse_time(value) } - end - property_supported :registrar do return unless node("Registrar") Parser::Registrar.new( @@ -64,14 +48,6 @@ class WhoisIlaitCom < BaseIcannCompliant build_contact("Tech", Parser::Contact::TYPE_TECHNICAL) end - # Checks whether this response contains a message - # that can be reconducted to a "WHOIS Server Unavailable" status. - # - # @return [Boolean] - def response_unavailable? - !!node("response:unavailable") - end - private def build_contact(element, type) From 341b3ee7a2131ab0fdf501a1d732d3764211f1ad Mon Sep 17 00:00:00 2001 From: Cork Date: Fri, 4 May 2018 08:18:01 +0200 Subject: [PATCH 3/4] Align to response fixes --- lib/whois/parsers/whois.ilait.com.rb | 20 +------------------ .../whois.ilait.com/status_registered.txt | 12 +++++------ 2 files changed, 7 insertions(+), 25 deletions(-) diff --git a/lib/whois/parsers/whois.ilait.com.rb b/lib/whois/parsers/whois.ilait.com.rb index 82210840..7495a16b 100644 --- a/lib/whois/parsers/whois.ilait.com.rb +++ b/lib/whois/parsers/whois.ilait.com.rb @@ -15,27 +15,9 @@ class Parsers class WhoisIlaitCom < BaseIcannCompliant self.scanner = Scanners::BaseIcannCompliant, { - pattern_available: /^Domain not found\.\n/ + pattern_available: /^NOT FOUND\n/ } - property_supported :available? do - !!(content_for_scanner =~ /NOT FOUND/) - end - - property_supported :created_on do - node("Creation Date") { |value| parse_time(value) } - end - - property_supported :registrar do - return unless node("Registrar") - Parser::Registrar.new( - id: node("Registrar IANA ID"), - name: node("Registrar"), - organization: node("Registrar"), - url: node("Registrar URL") - ) - end - property_supported :registrant_contacts do build_contact("Registrant", Parser::Contact::TYPE_REGISTRANT) end diff --git a/spec/fixtures/responses/whois.ilait.com/status_registered.txt b/spec/fixtures/responses/whois.ilait.com/status_registered.txt index a3a81f88..db920647 100644 --- a/spec/fixtures/responses/whois.ilait.com/status_registered.txt +++ b/spec/fixtures/responses/whois.ilait.com/status_registered.txt @@ -56,14 +56,14 @@ Registrars. Domain Name: ilait.com Registry Domain ID: 564826693_DOMAIN_COM-VRSN Registrar WHOIS Server: whois.ilait.com -Registrar URL: http://www.ilait.se +Registrar URL: http://www.ilait.se Updated Date: 2014-09-17T14:09:03Z -Creation Date: 2006-08-22T15:43:04Z +Creation Date: 2006-08-22T15:43:04Z Registrar Registration Expiration Date: 2019-08-22T15:43:04Z Registrar: ilait AB -Registrar IANA ID: 1493 +Registrar IANA ID: 1493 Registrar Abuse Contact Email: abuse@ilait.se -Registrar Abuse Contact Phone: +46.313522300 +Registrar Abuse Contact Phone: +46.313522300 Reseller: Domain Status: ok https://icann.org/epp#ok Registry Registrant ID: @@ -121,7 +121,7 @@ NOTE: purposes and that under no circumstances will you use this data to: NOTE: (1) allow, enable, or otherwise support the transmission of mass NOTE: unsolicited, commercial advertising or solicitations via direct mail, NOTE: e-mail, telephone, or facsimile; or (2) enable high volume, automated, -NOTE: electronic processes that apply to Ilait (or its computer systems). +NOTE: electronic processes that apply to ilait (or its computer systems). NOTE: The compilation, repackaging, dissemination or other use of this data -NOTE: is expressly prohibited without the prior written consent of Ilait. +NOTE: is expressly prohibited without the prior written consent of ilait. NOTE: All information is provided "as is" without accuracy guarantees. From 4cc0f6b8ff84ce4a2eb685d8d857ed59e81c33f7 Mon Sep 17 00:00:00 2001 From: Cork Date: Fri, 4 May 2018 10:38:42 +0200 Subject: [PATCH 4/4] Fix indentation --- lib/whois/parsers/whois.ilait.com.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/whois/parsers/whois.ilait.com.rb b/lib/whois/parsers/whois.ilait.com.rb index 7495a16b..c489bd5a 100644 --- a/lib/whois/parsers/whois.ilait.com.rb +++ b/lib/whois/parsers/whois.ilait.com.rb @@ -15,7 +15,7 @@ class Parsers class WhoisIlaitCom < BaseIcannCompliant self.scanner = Scanners::BaseIcannCompliant, { - pattern_available: /^NOT FOUND\n/ + pattern_available: /^NOT FOUND\n/ } property_supported :registrant_contacts do