Permalink
Browse files

Update CHANGELOG for GH-181

  • Loading branch information...
1 parent dcb657f commit ef29278a7d5c91cb8b71e4babbd0801c5068de27 @weppos committed Aug 24, 2012
View
@@ -6,6 +6,8 @@
* NEW: Added full whois.tucows.com parser.
+* FIXED: Fixed whois.register.com parser for enom formats (GH-181). [Thanks @JustinCampbell]
+
* CHANGED: Changed .NAME to a formatted adapter to fetch additional properties.
@@ -0,0 +1,93 @@
+#status
+ should: %s raise_error(Whois::PropertyNotSupported)
+
+#available?
+ should: %s == false
+
+#registered?
+ should: %s == true
+
+
+#created_on
+ should: %s CLASS(time)
+ should: %s == Time.parse("1994-11-01")
+
+#updated_on
+ should: %s raise_error(Whois::PropertyNotSupported)
+
+#expires_on
+ should: %s CLASS(time)
+ should: %s == Time.parse("2019-08-04")
+
+
+#registrar
+ should: %s CLASS(registrar)
+ should: %s.id == nil
+ should: %s.name == "Register.com"
+ should: %s.url == "http://www.register.com/"
+
+
+#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].name == "Domain Registrar"
+ should: %s[0].organization == "Register.Com, Inc."
+ should: %s[0].address == "575 8th Avenue"
+ should: %s[0].city == "New York"
+ should: %s[0].zip == "10018"
+ should: %s[0].state == "NY"
+ should: %s[0].country_code == "US"
+ should: %s[0].phone == "+1.9027492701"
+ should: %s[0].fax == nil
+ should: %s[0].email == "domainregistrar@register.com"
+
+#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].name == "Domain Registrar"
+ should: %s[0].organization == "Register.Com, Inc."
+ should: %s[0].address == "575 8th Avenue"
+ should: %s[0].city == "New York"
+ should: %s[0].zip == "10018"
+ should: %s[0].state == "NY"
+ should: %s[0].country_code == "US"
+ should: %s[0].phone == "+1.9027492701"
+ should: %s[0].fax == nil
+ should: %s[0].email == "domainregistrar@register.com"
+
+#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].name == "Domain Registrar"
+ should: %s[0].organization == "Register.Com, Inc."
+ should: %s[0].address == "575 8th Avenue"
+ should: %s[0].city == "New York"
+ should: %s[0].zip == "10018"
+ should: %s[0].state == "NY"
+ should: %s[0].country_code == "US"
+ should: %s[0].phone == "+1.9027492701"
+ should: %s[0].fax == nil
+ should: %s[0].email == "domainregistrar@register.com"
+
+
+#nameservers
+ should: %s CLASS(array)
+ should: %s SIZE(6)
+ should: %s[0] CLASS(nameserver)
+ should: %s[0].name == "ns2.register.com"
+ should: %s[1] CLASS(nameserver)
+ should: %s[1].name == "ns3.register.com"
+ should: %s[2] CLASS(nameserver)
+ should: %s[2].name == "ns4.register.com"
+ should: %s[3] CLASS(nameserver)
+ should: %s[3].name == "ns5.register.com"
+ should: %s[4] CLASS(nameserver)
+ should: %s[4].name == "ns6.register.com"
+ should: %s[5] CLASS(nameserver)
+ should: %s[5].name == "ns1.register.com"
@@ -0,0 +1,73 @@
+
+The data in Register.com's WHOIS database is provided to you by
+Register.com for information purposes only, that is, to assist you in
+obtaining information about or related to a domain name registration
+record. Register.com makes this information available "as is," and
+does not guarantee its accuracy. By submitting a WHOIS query, you
+agree that you will use this data only for lawful purposes and that,
+under no circumstances will you use this data to: (1) allow, enable,
+or otherwise support the transmission of mass unsolicited, commercial
+advertising or solicitations via direct mail, electronic mail, or by
+telephone; or (2) enable high volume, automated, electronic processes
+that apply to Register.com (or its systems). The compilation,
+repackaging, dissemination or other use of this data is expressly
+prohibited without the prior written consent of Register.com.
+Register.com reserves the right to modify these terms at any time.
+By submitting this query, you agree to abide by these terms.
+
+
+ Registrant:
+ Register.Com, Inc.
+ Domain Registrar
+ 575 8th Avenue
+ New York, NY 10018
+ US
+ Phone: +1.9027492701
+ Email: domainregistrar@register.com
+
+
+
+ Registrar Name....: Register.com
+ Registrar Whois...: whois.register.com
+ Registrar Homepage: www.register.com
+
+ Domain Name: register.com
+ Created on..............: 1994-11-01
+ Expires on..............: 2019-08-04
+
+ Administrative Contact:
+ Register.Com, Inc.
+ Domain Registrar
+ 575 8th Avenue
+ New York, NY 10018
+ US
+ Phone: +1.9027492701
+ Email: domainregistrar@register.com
+
+
+ Technical Contact:
+ Register.Com, Inc.
+ Domain Registrar
+ 575 8th Avenue
+ New York, NY 10018
+ US
+ Phone: +1.9027492701
+ Email: domainregistrar@register.com
+
+
+ DNS Servers:
+ ns2.register.com
+ ns3.register.com
+ ns4.register.com
+ ns5.register.com
+ ns6.register.com
+ ns1.register.com
+
+
+
+Visit AboutUs.org for more information about register.com
+
+<A HREF="http://www.aboutus.org/register.com">AboutUs: register.com</A>
+
+Register your domain name at http://www.register.com
+
@@ -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.register.com/status_registered_2.expected
+# /spec/fixtures/responses/whois.register.com/property_contacts_enom.expected
#
# and regenerate the tests with the following rake task
#
@@ -13,10 +13,10 @@
require 'spec_helper'
require 'whois/record/parser/whois.register.com.rb'
-describe Whois::Record::Parser::WhoisRegisterCom, "status_registered_2.expected" do
+describe Whois::Record::Parser::WhoisRegisterCom, "property_contacts_enom.expected" do
before(:each) do
- file = fixture("responses", "whois.register.com/status_registered_2.txt")
+ file = fixture("responses", "whois.register.com/property_contacts_enom.txt")
part = Whois::Record::Part.new(:body => File.read(file))
@parser = klass.new(part)
end
@@ -0,0 +1,136 @@
+# 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.register.com/property_contacts_register.expected
+#
+# and regenerate the tests with the following rake task
+#
+# $ rake spec:generate
+#
+
+require 'spec_helper'
+require 'whois/record/parser/whois.register.com.rb'
+
+describe Whois::Record::Parser::WhoisRegisterCom, "property_contacts_register.expected" do
+
+ before(:each) do
+ file = fixture("responses", "whois.register.com/property_contacts_register.txt")
+ part = Whois::Record::Part.new(:body => File.read(file))
+ @parser = klass.new(part)
+ end
+
+ describe "#status" do
+ it do
+ lambda { @parser.status }.should raise_error(Whois::PropertyNotSupported)
+ 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("1994-11-01")
+ 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
+ @parser.expires_on.should be_a(Time)
+ @parser.expires_on.should == Time.parse("2019-08-04")
+ end
+ end
+ describe "#registrar" do
+ it do
+ @parser.registrar.should be_a(Whois::Record::Registrar)
+ @parser.registrar.id.should == nil
+ @parser.registrar.name.should == "Register.com"
+ @parser.registrar.url.should == "http://www.register.com/"
+ 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].name.should == "Domain Registrar"
+ @parser.registrant_contacts[0].organization.should == "Register.Com, Inc."
+ @parser.registrant_contacts[0].address.should == "575 8th Avenue"
+ @parser.registrant_contacts[0].city.should == "New York"
+ @parser.registrant_contacts[0].zip.should == "10018"
+ @parser.registrant_contacts[0].state.should == "NY"
+ @parser.registrant_contacts[0].country_code.should == "US"
+ @parser.registrant_contacts[0].phone.should == "+1.9027492701"
+ @parser.registrant_contacts[0].fax.should == nil
+ @parser.registrant_contacts[0].email.should == "domainregistrar@register.com"
+ 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].name.should == "Domain Registrar"
+ @parser.admin_contacts[0].organization.should == "Register.Com, Inc."
+ @parser.admin_contacts[0].address.should == "575 8th Avenue"
+ @parser.admin_contacts[0].city.should == "New York"
+ @parser.admin_contacts[0].zip.should == "10018"
+ @parser.admin_contacts[0].state.should == "NY"
+ @parser.admin_contacts[0].country_code.should == "US"
+ @parser.admin_contacts[0].phone.should == "+1.9027492701"
+ @parser.admin_contacts[0].fax.should == nil
+ @parser.admin_contacts[0].email.should == "domainregistrar@register.com"
+ 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].name.should == "Domain Registrar"
+ @parser.technical_contacts[0].organization.should == "Register.Com, Inc."
+ @parser.technical_contacts[0].address.should == "575 8th Avenue"
+ @parser.technical_contacts[0].city.should == "New York"
+ @parser.technical_contacts[0].zip.should == "10018"
+ @parser.technical_contacts[0].state.should == "NY"
+ @parser.technical_contacts[0].country_code.should == "US"
+ @parser.technical_contacts[0].phone.should == "+1.9027492701"
+ @parser.technical_contacts[0].fax.should == nil
+ @parser.technical_contacts[0].email.should == "domainregistrar@register.com"
+ end
+ end
+ describe "#nameservers" do
+ it do
+ @parser.nameservers.should be_a(Array)
+ @parser.nameservers.should have(6).items
+ @parser.nameservers[0].should be_a(Whois::Record::Nameserver)
+ @parser.nameservers[0].name.should == "ns2.register.com"
+ @parser.nameservers[1].should be_a(Whois::Record::Nameserver)
+ @parser.nameservers[1].name.should == "ns3.register.com"
+ @parser.nameservers[2].should be_a(Whois::Record::Nameserver)
+ @parser.nameservers[2].name.should == "ns4.register.com"
+ @parser.nameservers[3].should be_a(Whois::Record::Nameserver)
+ @parser.nameservers[3].name.should == "ns5.register.com"
+ @parser.nameservers[4].should be_a(Whois::Record::Nameserver)
+ @parser.nameservers[4].name.should == "ns6.register.com"
+ @parser.nameservers[5].should be_a(Whois::Record::Nameserver)
+ @parser.nameservers[5].name.should == "ns1.register.com"
+ end
+ end
+end

0 comments on commit ef29278

Please sign in to comment.