Browse files

Merge branch 'whois.ati.tn'

  • Loading branch information...
2 parents 3716db1 + 00019a6 commit 6bb777ab35965983ff156e8e1fa41c72414a293b @weppos committed May 22, 2012
View
4 CHANGELOG.md
@@ -5,10 +5,14 @@
* SERVER: Added .OM TLD server.
+* SERVER: Added .TN TLD server.
+
* NEW: whois.srs.net.nz parser now recognizes throttled responses.
* NEW: Added full whois.registry.om parser.
+* NEW: Added full whois.ati.tn parser.
+
* NEW: Implement registrar property for CoCCA (GH-165). [Thanks @sherwind]
* CHANGED: whois.nic.uk changed response format.
View
2 lib/whois/definitions/tlds.rb
@@ -284,7 +284,7 @@
Whois::Server.define :tld, ".tk", "whois.dot.tk"
Whois::Server.define :tld, ".tl", "whois.nic.tl"
Whois::Server.define :tld, ".tm", "whois.nic.tm"
-Whois::Server.define :tld, ".tn", nil, { :web => "http://whois.ati.tn/", :adapter => Whois::Server::Adapters::Web }
+Whois::Server.define :tld, ".tn", "whois.ati.tn"
Whois::Server.define :tld, ".to", "whois.tonic.to"
Whois::Server.define :tld, ".tp", nil, { :adapter => Whois::Server::Adapters::None }
Whois::Server.define :tld, ".tr", "whois.nic.tr"
View
133 lib/whois/record/parser/whois.ati.tn.rb
@@ -0,0 +1,133 @@
+#--
+# Ruby Whois
+#
+# An intelligent pure Ruby WHOIS client and parser.
+#
+# Copyright (c) 2009-2012 Simone Carletti <weppos@weppos.net>
+#++
+
+
+require 'whois/record/parser/base'
+require 'whois/record/scanners/whois.ati.tn.rb'
+
+
+module Whois
+ class Record
+ class Parser
+
+ # Parser for the whois.ati.tn server.
+ #
+ # @see Whois::Record::Parser::Example
+ # The Example parser for the list of all available methods.
+ #
+ # @since RELEASE
+ class WhoisAtiTn < Base
+ include Scanners::Ast
+
+ property_supported :disclaimer do
+ node("field:disclaimer")
+ end
+
+
+ property_supported :domain do
+ node("Domain")
+ end
+
+ property_not_supported :domain_id
+
+
+ property_not_supported :referral_whois
+
+ property_not_supported :referral_url
+
+
+ property_supported :status do
+ if available?
+ :available
+ else
+ :registered
+ end
+ end
+
+ property_supported :available? do
+ !!node("status:available")
+ end
+
+ property_supported :registered? do
+ !available?
+ end
+
+
+ property_supported :created_on do
+ node("Acivated") { |value| Time.parse(value) }
+ end
+
+ property_not_supported :updated_on
+
+ property_not_supported :expires_on
+
+
+ property_supported :registrar do
+ node("Registrar") do |str|
+ Record::Registrar.new(
+ :id => nil,
+ :name => node("Registrar")
+ )
+ end
+ end
+
+
+ property_supported :registrant_contacts do
+ build_contact("Owner", Whois::Record::Contact::TYPE_REGISTRANT)
+ end
+
+ property_supported :admin_contacts do
+ build_contact("Admin.", Whois::Record::Contact::TYPE_ADMIN)
+ end
+
+ property_supported :technical_contacts do
+ build_contact("Tech.", Whois::Record::Contact::TYPE_TECHNICAL)
+ end
+
+
+ property_supported :nameservers do
+ Array.wrap(node("NameServers")).map do |line|
+ name, ipv4 = line.match(/(.+)\. \[(.+)\]/)[1, 2]
+ Nameserver.new(:name => name, :ipv4 => ipv4)
+ end
+ end
+
+
+ # Initializes a new {Scanners::WhoisAtiTn} instance
+ # passing the {#content_for_scanner}
+ # and calls +parse+ on it.
+ #
+ # @return [Hash]
+ def parse
+ Scanners::WhoisAtiTn.new(content_for_scanner).parse
+ end
+
+
+ private
+
+ def build_contact(element, type)
+ node("#{element} Name") do
+ Record::Contact.new(
+ :type => type,
+ :id => nil,
+ :name => node("#{element} Name"),
+ :address => node("#{element} Address"),
+ :phone => node("#{element} Tel"),
+ :fax => node("#{element} Fax"),
+ :email => node("#{element} Email"),
+ :created_on => node("#{element} Created") { |value| Time.parse(value) },
+ :updated_on => node("#{element} Updated") { |value| Time.parse(value) }
+ )
+ end
+ end
+
+ end
+
+ end
+ end
+end
View
46 lib/whois/record/scanners/whois.ati.tn.rb
@@ -0,0 +1,46 @@
+#--
+# Ruby Whois
+#
+# An intelligent pure Ruby WHOIS client and parser.
+#
+# Copyright (c) 2009-2012 Simone Carletti <weppos@weppos.net>
+#++
+
+
+require 'whois/record/scanners/base'
+
+
+module Whois
+ class Record
+ module Scanners
+
+ # Scanner for the whois.ati.tn record.
+ #
+ # @since RELEASE
+ class WhoisAtiTn < Base
+
+ self.tokenizers += [
+ :skip_empty_line,
+ :scan_available,
+ :scan_disclaimer,
+ :scan_keyvalue,
+ ]
+
+
+ tokenizer :scan_available do
+ if @input.skip(/^Domain (.+) not found/)
+ @ast["status:available"] = true
+ end
+ end
+
+ tokenizer :scan_disclaimer do
+ if @input.match?(/^All rights reserved/)
+ @ast["field:disclaimer"] = _scan_lines_to_array(/(.+)\n/).join("\n")
+ end
+ end
+
+ end
+
+ end
+ end
+end
View
1 lib/whois/record/scanners/whois.cira.ca.rb
@@ -29,7 +29,6 @@ class WhoisCiraCa < Base
]
-
tokenizer :scan_disclaimer do
if @input.match?(/^% Use of CIRA/)
@ast["field:disclaimer"] = _scan_lines_to_array(/^%(.*)\n/).join("\n")
View
57 spec/fixtures/responses/whois.ati.tn/status_available.expected
@@ -0,0 +1,57 @@
+#disclaimer
+ should: %s == "All rights reserved.\nCopyright \"Tunisian Internet Agency - http://whois.tn\""
+
+
+#domain
+ should: %s == nil
+
+#domain_id
+ should: %s raise_error(Whois::PropertyNotSupported)
+
+
+#referral_url
+ should: %s raise_error(Whois::PropertyNotSupported)
+
+#referral_whois
+ should: %s raise_error(Whois::PropertyNotSupported)
+
+
+#status
+ should: %s == :available
+
+#available?
+ should: %s == true
+
+#registered?
+ should: %s == false
+
+
+#created_on
+ should: %s == nil
+
+#updated_on
+ should: %s raise_error(Whois::PropertyNotSupported)
+
+#expires_on
+ should: %s raise_error(Whois::PropertyNotSupported)
+
+
+#registrar
+ should: %s == nil
+
+#registrant_contacts
+ should: %s CLASS(array)
+ should: %s == []
+
+#admin_contacts
+ should: %s CLASS(array)
+ should: %s == []
+
+#technical_contacts
+ should: %s CLASS(array)
+ should: %s == []
+
+
+#nameservers
+ should: %s CLASS(array)
+ should: %s == []
View
4 spec/fixtures/responses/whois.ati.tn/status_available.txt
@@ -0,0 +1,4 @@
+All rights reserved.
+Copyright "Tunisian Internet Agency - http://whois.tn"
+
+Domain u34jedzcq.tn not found
View
122 spec/fixtures/responses/whois.ati.tn/status_registered.expected
@@ -0,0 +1,122 @@
+#disclaimer
+ should: %s == "All rights reserved.\nCopyright \"Tunisian Internet Agency - http://whois.tn\""
+
+
+#domain
+ should: %s == "google.tn"
+
+#domain_id
+ should: %s raise_error(Whois::PropertyNotSupported)
+
+
+#referral_url
+ should: %s raise_error(Whois::PropertyNotSupported)
+
+#referral_whois
+ should: %s raise_error(Whois::PropertyNotSupported)
+
+
+#status
+ should: %s == :registered
+
+#available?
+ should: %s == false
+
+#registered?
+ should: %s == true
+
+
+#created_on
+ should: %s CLASS(time)
+ should: %s == Time.parse("2009-05-14 00:00:00")
+
+#updated_on
+ should: %s raise_error(Whois::PropertyNotSupported)
+
+#expires_on
+ should: %s raise_error(Whois::PropertyNotSupported)
+
+
+#registrar
+ should: %s CLASS(registrar)
+ should: %s.id == nil
+ should: %s.name == "3S Global Net"
+ should: %s.organization == nil
+ should: %s.url == nil
+
+#registrant_contacts
+ should: %s CLASS(array)
+ should: %s SIZE(1)
+ should: %s[0] CLASS(contact)
+ should: %s[0].type == Whois::Record::Contact::TYPE_REGISTRANT
+ should: %s[0].id == nil
+ should: %s[0].name == "GOOGLE Inc"
+ should: %s[0].organization == nil
+ should: %s[0].address == "PO BOX 2050 Moutain view CA 94042 USA"
+ should: %s[0].city == nil
+ should: %s[0].zip == nil
+ should: %s[0].state == nil
+ should: %s[0].country == nil
+ should: %s[0].country_code == nil
+ should: %s[0].phone == "+1 925 685 9600"
+ should: %s[0].fax == "+1 925 685 9620"
+ should: %s[0].email == "dns-admin@google.com"
+ should: %s[0].created_on == Time.parse("2009-05-14 00:00:00")
+ should: %s[0].updated_on == Time.parse("2010-07-18 00:00:00")
+
+#admin_contacts
+ should: %s CLASS(array)
+ should: %s SIZE(1)
+ should: %s[0] CLASS(contact)
+ should: %s[0].type == Whois::Record::Contact::TYPE_ADMIN
+ should: %s[0].id == nil
+ should: %s[0].name == "GOOGLE Inc"
+ should: %s[0].organization == nil
+ should: %s[0].address == "PO BOX 2050 Moutain view CA 94042 USA"
+ should: %s[0].city == nil
+ should: %s[0].zip == nil
+ should: %s[0].state == nil
+ should: %s[0].country == nil
+ should: %s[0].country_code == nil
+ should: %s[0].phone == "+1 925 685 9600"
+ should: %s[0].fax == "+1 925 685 9620"
+ should: %s[0].email == "dns-admin@google.com"
+ should: %s[0].created_on == Time.parse("2009-05-14 00:00:00")
+ should: %s[0].updated_on == Time.parse("2010-07-18 00:00:00")
+
+#technical_contacts
+ should: %s CLASS(array)
+ should: %s SIZE(1)
+ should: %s[0] CLASS(contact)
+ should: %s[0].type == Whois::Record::Contact::TYPE_TECHNICAL
+ should: %s[0].id == nil
+ should: %s[0].name == "GOOGLE Inc"
+ should: %s[0].organization == nil
+ should: %s[0].address == "PO BOX 2050 Moutain view CA 94042 USA"
+ should: %s[0].city == nil
+ should: %s[0].zip == nil
+ should: %s[0].state == nil
+ should: %s[0].country == nil
+ should: %s[0].country_code == nil
+ should: %s[0].phone == "+1 925 685 9600"
+ should: %s[0].fax == "+1 925 685 9620"
+ should: %s[0].email == "dns-admin@google.com"
+ should: %s[0].created_on == Time.parse("2009-05-14 00:00:00")
+ should: %s[0].updated_on == Time.parse("2010-07-18 00:00:00")
+
+
+#nameservers
+ should: %s CLASS(array)
+ should: %s SIZE(4)
+ should: %s[0] CLASS(nameserver)
+ should: %s[0].name == "ns1.google.com"
+ should: %s[0].ipv4 == "216.239.32.10"
+ should: %s[1] CLASS(nameserver)
+ should: %s[1].name == "ns2.google.com"
+ should: %s[1].ipv4 == "216.239.34.10"
+ should: %s[2] CLASS(nameserver)
+ should: %s[2].name == "ns3.google.com"
+ should: %s[2].ipv4 == "216.239.36.10"
+ should: %s[3] CLASS(nameserver)
+ should: %s[3].name == "ns4.google.com"
+ should: %s[3].ipv4 == "216.239.38.10"
View
36 spec/fixtures/responses/whois.ati.tn/status_registered.txt
@@ -0,0 +1,36 @@
+All rights reserved.
+Copyright "Tunisian Internet Agency - http://whois.tn"
+
+Domain : google.tn
+Acivated : 2009-05-14 00:00:00
+Registrar : 3S Global Net
+
+NameServers : ns1.google.com. [216.239.32.10]
+NameServers : ns2.google.com. [216.239.34.10]
+NameServers : ns3.google.com. [216.239.36.10]
+NameServers : ns4.google.com. [216.239.38.10]
+
+Owner Name : GOOGLE Inc
+Owner Address : PO BOX 2050 Moutain view CA 94042 USA
+Owner Tel : +1 925 685 9600
+Owner Fax : +1 925 685 9620
+Owner Email : dns-admin@google.com
+Owner Created : 2009-05-14 00:00:00
+Owner Updated : 2010-07-18 00:00:00
+
+Admin. Name : GOOGLE Inc
+Admin. Address : PO BOX 2050 Moutain view CA 94042 USA
+Admin. Tel : +1 925 685 9600
+Admin. Fax : +1 925 685 9620
+Admin. Email : dns-admin@google.com
+Admin. Created : 2009-05-14 00:00:00
+Admin. Updated : 2010-07-18 00:00:00
+
+Tech. Name : GOOGLE Inc
+Tech. Address : PO BOX 2050 Moutain view CA 94042 USA
+Tech. Tel : +1 925 685 9600
+Tech. Fax : +1 925 685 9620
+Tech. Email : dns-admin@google.com
+Tech. Created : 2009-05-14 00:00:00
+Tech. Updated : 2010-07-18 00:00:00
+
View
2 spec/tlds
@@ -279,7 +279,7 @@ tk;whois.dot.tk;thinkcode.tk;u34jedzcq.tk
tl;whois.nic.tl;thinkcode.tl;u34jedzcq.tl
tld;registry;available;unavailable
tm;whois.nic.tm;google.tm;u34jedzcq.tm
-tn;;;
+tn;whois.ati.tn;google.tn;u34jedzcq.tn
to;whois.tonic.to;go.to;u34jedzcq.to
tp;;;
tr;whois.nic.tr;google.com.tr;u34jedzcq.com.tr
View
108 spec/whois/record/parser/responses/whois.ati.tn/status_available_spec.rb
@@ -0,0 +1,108 @@
+# 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.ati.tn/status_available.expected
+#
+# and regenerate the tests with the following rake task
+#
+# $ rake spec:generate
+#
+
+require 'spec_helper'
+require 'whois/record/parser/whois.ati.tn.rb'
+
+describe Whois::Record::Parser::WhoisAtiTn, "status_available.expected" do
+
+ before(:each) do
+ file = fixture("responses", "whois.ati.tn/status_available.txt")
+ part = Whois::Record::Part.new(:body => File.read(file))
+ @parser = klass.new(part)
+ end
+
+ describe "#disclaimer" do
+ it do
+ @parser.disclaimer.should == "All rights reserved.\nCopyright \"Tunisian Internet Agency - http://whois.tn\""
+ end
+ end
+ describe "#domain" do
+ it do
+ @parser.domain.should == nil
+ end
+ end
+ describe "#domain_id" do
+ it do
+ lambda { @parser.domain_id }.should raise_error(Whois::PropertyNotSupported)
+ end
+ end
+ describe "#referral_url" do
+ it do
+ lambda { @parser.referral_url }.should raise_error(Whois::PropertyNotSupported)
+ end
+ end
+ describe "#referral_whois" do
+ it do
+ lambda { @parser.referral_whois }.should raise_error(Whois::PropertyNotSupported)
+ end
+ end
+ describe "#status" do
+ it do
+ @parser.status.should == :available
+ end
+ end
+ describe "#available?" do
+ it do
+ @parser.available?.should == true
+ end
+ end
+ describe "#registered?" do
+ it do
+ @parser.registered?.should == false
+ end
+ end
+ describe "#created_on" do
+ it do
+ @parser.created_on.should == nil
+ end
+ end
+ describe "#updated_on" do
+ it do
+ lambda { @parser.updated_on }.should raise_error(Whois::PropertyNotSupported)
+ end
+ end
+ describe "#expires_on" do
+ it do
+ lambda { @parser.expires_on }.should raise_error(Whois::PropertyNotSupported)
+ end
+ end
+ describe "#registrar" do
+ it do
+ @parser.registrar.should == nil
+ end
+ end
+ describe "#registrant_contacts" do
+ it do
+ @parser.registrant_contacts.should be_a(Array)
+ @parser.registrant_contacts.should == []
+ end
+ end
+ describe "#admin_contacts" do
+ it do
+ @parser.admin_contacts.should be_a(Array)
+ @parser.admin_contacts.should == []
+ end
+ end
+ describe "#technical_contacts" do
+ it do
+ @parser.technical_contacts.should be_a(Array)
+ @parser.technical_contacts.should == []
+ end
+ end
+ describe "#nameservers" do
+ it do
+ @parser.nameservers.should be_a(Array)
+ @parser.nameservers.should == []
+ end
+ end
+end
View
173 spec/whois/record/parser/responses/whois.ati.tn/status_registered_spec.rb
@@ -0,0 +1,173 @@
+# 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.ati.tn/status_registered.expected
+#
+# and regenerate the tests with the following rake task
+#
+# $ rake spec:generate
+#
+
+require 'spec_helper'
+require 'whois/record/parser/whois.ati.tn.rb'
+
+describe Whois::Record::Parser::WhoisAtiTn, "status_registered.expected" do
+
+ before(:each) do
+ file = fixture("responses", "whois.ati.tn/status_registered.txt")
+ part = Whois::Record::Part.new(:body => File.read(file))
+ @parser = klass.new(part)
+ end
+
+ describe "#disclaimer" do
+ it do
+ @parser.disclaimer.should == "All rights reserved.\nCopyright \"Tunisian Internet Agency - http://whois.tn\""
+ end
+ end
+ describe "#domain" do
+ it do
+ @parser.domain.should == "google.tn"
+ end
+ end
+ describe "#domain_id" do
+ it do
+ lambda { @parser.domain_id }.should raise_error(Whois::PropertyNotSupported)
+ end
+ end
+ describe "#referral_url" do
+ it do
+ lambda { @parser.referral_url }.should raise_error(Whois::PropertyNotSupported)
+ end
+ end
+ describe "#referral_whois" do
+ it do
+ lambda { @parser.referral_whois }.should raise_error(Whois::PropertyNotSupported)
+ end
+ end
+ describe "#status" do
+ it do
+ @parser.status.should == :registered
+ end
+ end
+ describe "#available?" do
+ it do
+ @parser.available?.should == false
+ end
+ end
+ describe "#registered?" do
+ it do
+ @parser.registered?.should == true
+ end
+ end
+ describe "#created_on" do
+ it do
+ @parser.created_on.should be_a(Time)
+ @parser.created_on.should == Time.parse("2009-05-14 00:00:00")
+ end
+ end
+ describe "#updated_on" do
+ it do
+ lambda { @parser.updated_on }.should raise_error(Whois::PropertyNotSupported)
+ end
+ end
+ describe "#expires_on" do
+ it do
+ lambda { @parser.expires_on }.should raise_error(Whois::PropertyNotSupported)
+ end
+ end
+ describe "#registrar" do
+ it do
+ @parser.registrar.should be_a(Whois::Record::Registrar)
+ @parser.registrar.id.should == nil
+ @parser.registrar.name.should == "3S Global Net"
+ @parser.registrar.organization.should == nil
+ @parser.registrar.url.should == nil
+ end
+ end
+ describe "#registrant_contacts" do
+ it do
+ @parser.registrant_contacts.should be_a(Array)
+ @parser.registrant_contacts.should have(1).items
+ @parser.registrant_contacts[0].should be_a(Whois::Record::Contact)
+ @parser.registrant_contacts[0].type.should == Whois::Record::Contact::TYPE_REGISTRANT
+ @parser.registrant_contacts[0].id.should == nil
+ @parser.registrant_contacts[0].name.should == "GOOGLE Inc"
+ @parser.registrant_contacts[0].organization.should == nil
+ @parser.registrant_contacts[0].address.should == "PO BOX 2050 Moutain view CA 94042 USA"
+ @parser.registrant_contacts[0].city.should == nil
+ @parser.registrant_contacts[0].zip.should == nil
+ @parser.registrant_contacts[0].state.should == nil
+ @parser.registrant_contacts[0].country.should == nil
+ @parser.registrant_contacts[0].country_code.should == nil
+ @parser.registrant_contacts[0].phone.should == "+1 925 685 9600"
+ @parser.registrant_contacts[0].fax.should == "+1 925 685 9620"
+ @parser.registrant_contacts[0].email.should == "dns-admin@google.com"
+ @parser.registrant_contacts[0].created_on.should == Time.parse("2009-05-14 00:00:00")
+ @parser.registrant_contacts[0].updated_on.should == Time.parse("2010-07-18 00:00:00")
+ end
+ end
+ describe "#admin_contacts" do
+ it do
+ @parser.admin_contacts.should be_a(Array)
+ @parser.admin_contacts.should have(1).items
+ @parser.admin_contacts[0].should be_a(Whois::Record::Contact)
+ @parser.admin_contacts[0].type.should == Whois::Record::Contact::TYPE_ADMIN
+ @parser.admin_contacts[0].id.should == nil
+ @parser.admin_contacts[0].name.should == "GOOGLE Inc"
+ @parser.admin_contacts[0].organization.should == nil
+ @parser.admin_contacts[0].address.should == "PO BOX 2050 Moutain view CA 94042 USA"
+ @parser.admin_contacts[0].city.should == nil
+ @parser.admin_contacts[0].zip.should == nil
+ @parser.admin_contacts[0].state.should == nil
+ @parser.admin_contacts[0].country.should == nil
+ @parser.admin_contacts[0].country_code.should == nil
+ @parser.admin_contacts[0].phone.should == "+1 925 685 9600"
+ @parser.admin_contacts[0].fax.should == "+1 925 685 9620"
+ @parser.admin_contacts[0].email.should == "dns-admin@google.com"
+ @parser.admin_contacts[0].created_on.should == Time.parse("2009-05-14 00:00:00")
+ @parser.admin_contacts[0].updated_on.should == Time.parse("2010-07-18 00:00:00")
+ end
+ end
+ describe "#technical_contacts" do
+ it do
+ @parser.technical_contacts.should be_a(Array)
+ @parser.technical_contacts.should have(1).items
+ @parser.technical_contacts[0].should be_a(Whois::Record::Contact)
+ @parser.technical_contacts[0].type.should == Whois::Record::Contact::TYPE_TECHNICAL
+ @parser.technical_contacts[0].id.should == nil
+ @parser.technical_contacts[0].name.should == "GOOGLE Inc"
+ @parser.technical_contacts[0].organization.should == nil
+ @parser.technical_contacts[0].address.should == "PO BOX 2050 Moutain view CA 94042 USA"
+ @parser.technical_contacts[0].city.should == nil
+ @parser.technical_contacts[0].zip.should == nil
+ @parser.technical_contacts[0].state.should == nil
+ @parser.technical_contacts[0].country.should == nil
+ @parser.technical_contacts[0].country_code.should == nil
+ @parser.technical_contacts[0].phone.should == "+1 925 685 9600"
+ @parser.technical_contacts[0].fax.should == "+1 925 685 9620"
+ @parser.technical_contacts[0].email.should == "dns-admin@google.com"
+ @parser.technical_contacts[0].created_on.should == Time.parse("2009-05-14 00:00:00")
+ @parser.technical_contacts[0].updated_on.should == Time.parse("2010-07-18 00:00:00")
+ end
+ end
+ describe "#nameservers" do
+ it do
+ @parser.nameservers.should be_a(Array)
+ @parser.nameservers.should have(4).items
+ @parser.nameservers[0].should be_a(Whois::Record::Nameserver)
+ @parser.nameservers[0].name.should == "ns1.google.com"
+ @parser.nameservers[0].ipv4.should == "216.239.32.10"
+ @parser.nameservers[1].should be_a(Whois::Record::Nameserver)
+ @parser.nameservers[1].name.should == "ns2.google.com"
+ @parser.nameservers[1].ipv4.should == "216.239.34.10"
+ @parser.nameservers[2].should be_a(Whois::Record::Nameserver)
+ @parser.nameservers[2].name.should == "ns3.google.com"
+ @parser.nameservers[2].ipv4.should == "216.239.36.10"
+ @parser.nameservers[3].should be_a(Whois::Record::Nameserver)
+ @parser.nameservers[3].name.should == "ns4.google.com"
+ @parser.nameservers[3].ipv4.should == "216.239.38.10"
+ end
+ end
+end

0 comments on commit 6bb777a

Please sign in to comment.