forked from weppos/whois
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix issue with whois.tucows.com when the response contains a fax
- Loading branch information
Showing
4 changed files
with
143 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
15 changes: 15 additions & 0 deletions
15
spec/fixtures/responses/whois.tucows.com/property_contacts_2.expected
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
#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 == "Administrator, Domain" | ||
should: %s[0].organization == nil | ||
should: %s[0].address == "95 Hayden Avenue" | ||
should: %s[0].city == "Lexington" | ||
should: %s[0].zip == "02421" | ||
should: %s[0].state == "MA" | ||
should: %s[0].country_code == "US" | ||
should: %s[0].phone == "+1.7816526199" | ||
should: %s[0].fax == "+1.7816526096" | ||
should: %s[0].email == "csadmin@vistaprint.com" |
81 changes: 81 additions & 0 deletions
81
spec/fixtures/responses/whois.tucows.com/property_contacts_2.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,81 @@ | ||
Registrant: | ||
VistaPrint Technologies Ltd | ||
Canon's Court | ||
22 Victoria Street | ||
Hamilton, HM12 | ||
BM | ||
|
||
Domain name: LEDVERLICHTINGSOEST.COM | ||
|
||
|
||
Administrative Contact: | ||
Administrator, Domain csadmin@vistaprint.com | ||
95 Hayden Avenue | ||
Lexington, MA 02421 | ||
US | ||
+1.7816526199 Fax: +1.7816526096 | ||
|
||
Technical Contact: | ||
Administrator, Domain csadmin@vistaprint.com | ||
95 Hayden Ave. | ||
Lexington, MA 02421 | ||
US | ||
+1.7816526199 Fax: +1.7816526096 | ||
|
||
|
||
|
||
Registration Service Provider: | ||
Vistaprint, csadmin@vistaprint.com | ||
866-811-1674 | ||
|
||
|
||
|
||
Registrar of Record: TUCOWS, INC. | ||
Record last updated on 05-Jun-2012. | ||
Record expires on 19-Jun-2013. | ||
Record created on 19-Jun-2008. | ||
|
||
Registrar Domain Name Help Center: | ||
http://tucowsdomains.com | ||
|
||
Domain servers in listed order: | ||
NS4.VPWEB.COM | ||
NS3.VPWEB.COM | ||
|
||
|
||
Domain status: clientTransferProhibited | ||
clientUpdateProhibited | ||
|
||
The Data in the Tucows Registrar WHOIS database is provided to you by Tucows | ||
for information purposes only, and may be used to assist you in obtaining | ||
information about or related to a domain name's registration record. | ||
|
||
Tucows 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: | ||
a) allow, enable, or otherwise support the transmission by e-mail, | ||
telephone, or facsimile of mass, unsolicited, commercial advertising or | ||
solicitations to entities other than the data recipient's own existing | ||
customers; or (b) enable high volume, automated, electronic processes that | ||
send queries or data to the systems of any Registry Operator or | ||
ICANN-Accredited registrar, except as reasonably necessary to register | ||
domain names or modify existing registrations. | ||
|
||
The compilation, repackaging, dissemination or other use of this Data is | ||
expressly prohibited without the prior written consent of Tucows. | ||
|
||
Tucows reserves the right to terminate your access to the Tucows WHOIS | ||
database in its sole discretion, including without limitation, for excessive | ||
querying of the WHOIS database or for failure to otherwise abide by this | ||
policy. | ||
|
||
Tucows reserves the right to modify these terms at any time. | ||
|
||
By submitting this query, you agree to abide by these terms. | ||
|
||
NOTE: THE WHOIS DATABASE IS A CONTACT DATABASE ONLY. LACK OF A DOMAIN | ||
RECORD DOES NOT SIGNIFY DOMAIN AVAILABILITY. | ||
|
||
|
42 changes: 42 additions & 0 deletions
42
spec/whois/record/parser/responses/whois.tucows.com/property_contacts_2_spec.rb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
# 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.tucows.com/property_contacts_2.expected | ||
# | ||
# and regenerate the tests with the following rake task | ||
# | ||
# $ rake spec:generate | ||
# | ||
|
||
require 'spec_helper' | ||
require 'whois/record/parser/whois.tucows.com.rb' | ||
|
||
describe Whois::Record::Parser::WhoisTucowsCom, "property_contacts_2.expected" do | ||
|
||
before(:each) do | ||
file = fixture("responses", "whois.tucows.com/property_contacts_2.txt") | ||
part = Whois::Record::Part.new(:body => File.read(file)) | ||
@parser = klass.new(part) | ||
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 == "Administrator, Domain" | ||
@parser.admin_contacts[0].organization.should == nil | ||
@parser.admin_contacts[0].address.should == "95 Hayden Avenue" | ||
@parser.admin_contacts[0].city.should == "Lexington" | ||
@parser.admin_contacts[0].zip.should == "02421" | ||
@parser.admin_contacts[0].state.should == "MA" | ||
@parser.admin_contacts[0].country_code.should == "US" | ||
@parser.admin_contacts[0].phone.should == "+1.7816526199" | ||
@parser.admin_contacts[0].fax.should == "+1.7816526096" | ||
@parser.admin_contacts[0].email.should == "csadmin@vistaprint.com" | ||
end | ||
end | ||
end |