Permalink
Browse files

Fix Icann compliant specs

  • Loading branch information...
1 parent da38d1d commit e5eda878097834bd754a4685a00d48bd20cfd879 @weppos committed Feb 25, 2014
@@ -111,7 +111,7 @@ def build_contact(element, type)
node("#{element} Name") do
Record::Contact.new(
type: type,
- id: node("Registry #{element} ID"),
+ id: node("Registry #{element} ID").presence,
name: value_for_property(element, 'Name'),
organization: value_for_property(element, 'Organization'),
address: value_for_property(element, 'Street'),
@@ -32,7 +32,6 @@ def build_contact(element, type)
end
contact
end
-
end
end
@@ -40,7 +40,7 @@
%s %SIZE{1}
%s[0] %CLASS{contact}
%s[0].type == Whois::Record::Contact::TYPE_REGISTRANT
- %s[0].id == ""
+ %s[0].id == nil
%s[0].name == "Stephan RAMOIN"
%s[0].organization == "Gandi SAS"
%s[0].address == "63-65 Boulevard Massena"
@@ -59,7 +59,7 @@
%s %SIZE{1}
%s[0] %CLASS{contact}
%s[0].type == Whois::Record::Contact::TYPE_ADMINISTRATIVE
- %s[0].id == ""
+ %s[0].id == nil
%s[0].name == "Noc GANDI"
%s[0].organization == "GANDI SAS"
%s[0].address == "63-65 Boulevard MASSENA"
@@ -78,7 +78,7 @@
%s %SIZE{1}
%s[0] %CLASS{contact}
%s[0].type == Whois::Record::Contact::TYPE_TECHNICAL
- %s[0].id == ""
+ %s[0].id == nil
%s[0].name == "Noc GANDI"
%s[0].organization == "GANDI SAS"
%s[0].address == "63-65 Boulevard MASSENA"
@@ -40,49 +40,61 @@
%s %CLASS{array}
%s %SIZE{1}
%s[0] %CLASS{contact}
- %s[0].type == Whois::Record::Contact::TYPE_REGISTRANT
- %s[0].name == "XIF Communications"
- %s[0].organization == "XIF Communications"
- %s[0].address == "1200 New Hampshire Avenue NW"
- %s[0].city == "Washington"
- %s[0].zip == "20036"
- %s[0].state == "DC"
- %s[0].country_code == "US"
- %s[0].phone == "202-463-7200"
- %s[0].fax == "999-999-9999"
- %s[0].email == "noc@xif.com"
+ %s[0].type == Whois::Record::Contact::TYPE_REGISTRANT
+ %s[0].id == nil
+ %s[0].name == "XIF Communications"
+ %s[0].organization == "XIF Communications"
+ %s[0].address == "1200 New Hampshire Avenue NW"
+ %s[0].city == "Washington"
+ %s[0].zip == "20036"
+ %s[0].state == "DC"
+ %s[0].country == nil
+ %s[0].country_code == "US"
+ %s[0].phone == "202-463-7200"
+ %s[0].fax == "999-999-9999"
+ %s[0].email == "noc@xif.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::Record::Contact::TYPE_ADMINISTRATIVE
- %s[0].name == "Communications, XIF ContactMiddleName"
- %s[0].organization == "XIF Communications"
- %s[0].address == "1200 New Hampshire Avenue NW"
- %s[0].city == "Washington"
- %s[0].zip == "20036"
- %s[0].state == "DC"
- %s[0].country_code == "US"
- %s[0].phone == "202-463-7200"
- %s[0].fax == "202-318-4003"
- %s[0].email == "noc@xif.com"
+ %s[0].type == Whois::Record::Contact::TYPE_ADMINISTRATIVE
+ %s[0].id == nil
+ %s[0].name == "Communications, XIF ContactMiddleName"
+ %s[0].organization == "XIF Communications"
+ %s[0].address == "1200 New Hampshire Avenue NW"
+ %s[0].city == "Washington"
+ %s[0].zip == "20036"
+ %s[0].state == "DC"
+ %s[0].country == nil
+ %s[0].country_code == "US"
+ %s[0].phone == "202-463-7200"
+ %s[0].fax == "202-318-4003"
+ %s[0].email == "noc@xif.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::Record::Contact::TYPE_TECHNICAL
- %s[0].name == "Communications, XIF ContactMiddleName"
- %s[0].organization == "XIF Communications"
- %s[0].address == "1200 New Hampshire Avenue NW"
- %s[0].city == "Washington"
- %s[0].zip == "20036"
- %s[0].state == "DC"
- %s[0].country_code == "US"
- %s[0].phone == "202-463-7200"
- %s[0].fax == "202-318-4003"
- %s[0].email == "noc@xif.com"
+ %s[0].type == Whois::Record::Contact::TYPE_TECHNICAL
+ %s[0].id == nil
+ %s[0].name == "Communications, XIF ContactMiddleName"
+ %s[0].organization == "XIF Communications"
+ %s[0].address == "1200 New Hampshire Avenue NW"
+ %s[0].city == "Washington"
+ %s[0].zip == "20036"
+ %s[0].state == "DC"
+ %s[0].country == nil
+ %s[0].country_code == "US"
+ %s[0].phone == "202-463-7200"
+ %s[0].fax == "202-318-4003"
+ %s[0].email == "noc@xif.com"
+ %s[0].created_on == nil
+ %s[0].updated_on == nil
#nameservers
@@ -40,52 +40,61 @@
%s %CLASS{array}
%s %SIZE{1}
%s[0] %CLASS{contact}
- %s[0].type == Whois::Record::Contact::TYPE_REGISTRANT
- %s[0].id == ""
- %s[0].name == "Host Master"
- %s[0].organization == "united-domains AG"
- %s[0].address == "Gautinger Str. 10"
- %s[0].city == "Starnberg"
- %s[0].zip == "82319"
- %s[0].state == "Bayern"
- %s[0].country_code == "DE"
- %s[0].phone == "+49.8151368670"
- %s[0].fax == "+49.81513686777"
- %s[0].email == "hostmaster@united-domains.de"
+ %s[0].type == Whois::Record::Contact::TYPE_REGISTRANT
+ %s[0].id == nil
+ %s[0].name == "Host Master"
+ %s[0].organization == "united-domains AG"
+ %s[0].address == "Gautinger Str. 10"
+ %s[0].city == "Starnberg"
+ %s[0].zip == "82319"
+ %s[0].state == "Bayern"
+ %s[0].country == nil
+ %s[0].country_code == "DE"
+ %s[0].phone == "+49.8151368670"
+ %s[0].fax == "+49.81513686777"
+ %s[0].email == "hostmaster@united-domains.de"
+ %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::Record::Contact::TYPE_ADMINISTRATIVE
- %s[0].id == ""
- %s[0].name == "Hostmaster Hostmaster"
- %s[0].organization == "united-domains AG"
- %s[0].address == "Gautinger Strasse 10"
- %s[0].city == "Starnberg"
- %s[0].zip == "82319"
- %s[0].state == "DE"
- %s[0].country_code == "DE"
- %s[0].phone == "+49.8151368670"
- %s[0].fax == "+49.81513686777"
- %s[0].email == "hostmaster@united-domains.de"
+ %s[0].type == Whois::Record::Contact::TYPE_ADMINISTRATIVE
+ %s[0].id == nil
+ %s[0].name == "Hostmaster Hostmaster"
+ %s[0].organization == "united-domains AG"
+ %s[0].address == "Gautinger Strasse 10"
+ %s[0].city == "Starnberg"
+ %s[0].zip == "82319"
+ %s[0].state == "DE"
+ %s[0].country == nil
+ %s[0].country_code == "DE"
+ %s[0].phone == "+49.8151368670"
+ %s[0].fax == "+49.81513686777"
+ %s[0].email == "hostmaster@united-domains.de"
+ %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::Record::Contact::TYPE_TECHNICAL
- %s[0].id == ""
- %s[0].name == "Host Master"
- %s[0].organization == "united-domains AG"
- %s[0].address == "Gautinger Str. 10"
- %s[0].city == "Starnberg"
- %s[0].zip == "82319"
- %s[0].state == "Bayern"
- %s[0].country_code == "DE"
- %s[0].phone == "+49.8151368670"
- %s[0].fax == "+49.81513686777"
- %s[0].email == "hostmaster@united-domains.de"
+ %s[0].type == Whois::Record::Contact::TYPE_TECHNICAL
+ %s[0].id == nil
+ %s[0].name == "Host Master"
+ %s[0].organization == "united-domains AG"
+ %s[0].address == "Gautinger Str. 10"
+ %s[0].city == "Starnberg"
+ %s[0].zip == "82319"
+ %s[0].state == "Bayern"
+ %s[0].country == nil
+ %s[0].country_code == "DE"
+ %s[0].phone == "+49.8151368670"
+ %s[0].fax == "+49.81513686777"
+ %s[0].email == "hostmaster@united-domains.de"
+ %s[0].created_on == nil
+ %s[0].updated_on == nil
#nameservers
@@ -79,7 +79,7 @@
expect(subject.registrant_contacts).to have(1).items
expect(subject.registrant_contacts[0]).to be_a(Whois::Record::Contact)
expect(subject.registrant_contacts[0].type).to eq(Whois::Record::Contact::TYPE_REGISTRANT)
- expect(subject.registrant_contacts[0].id).to eq("")
+ expect(subject.registrant_contacts[0].id).to eq(nil)
expect(subject.registrant_contacts[0].name).to eq("Stephan RAMOIN")
expect(subject.registrant_contacts[0].organization).to eq("Gandi SAS")
expect(subject.registrant_contacts[0].address).to eq("63-65 Boulevard Massena")
@@ -100,7 +100,7 @@
expect(subject.admin_contacts).to have(1).items
expect(subject.admin_contacts[0]).to be_a(Whois::Record::Contact)
expect(subject.admin_contacts[0].type).to eq(Whois::Record::Contact::TYPE_ADMINISTRATIVE)
- expect(subject.admin_contacts[0].id).to eq("")
+ expect(subject.admin_contacts[0].id).to eq(nil)
expect(subject.admin_contacts[0].name).to eq("Noc GANDI")
expect(subject.admin_contacts[0].organization).to eq("GANDI SAS")
expect(subject.admin_contacts[0].address).to eq("63-65 Boulevard MASSENA")
@@ -121,7 +121,7 @@
expect(subject.technical_contacts).to have(1).items
expect(subject.technical_contacts[0]).to be_a(Whois::Record::Contact)
expect(subject.technical_contacts[0].type).to eq(Whois::Record::Contact::TYPE_TECHNICAL)
- expect(subject.technical_contacts[0].id).to eq("")
+ expect(subject.technical_contacts[0].id).to eq(nil)
expect(subject.technical_contacts[0].name).to eq("Noc GANDI")
expect(subject.technical_contacts[0].organization).to eq("GANDI SAS")
expect(subject.technical_contacts[0].address).to eq("63-65 Boulevard MASSENA")
@@ -79,16 +79,20 @@
expect(subject.registrant_contacts).to have(1).items
expect(subject.registrant_contacts[0]).to be_a(Whois::Record::Contact)
expect(subject.registrant_contacts[0].type).to eq(Whois::Record::Contact::TYPE_REGISTRANT)
+ expect(subject.registrant_contacts[0].id).to eq(nil)
expect(subject.registrant_contacts[0].name).to eq("XIF Communications")
expect(subject.registrant_contacts[0].organization).to eq("XIF Communications")
expect(subject.registrant_contacts[0].address).to eq("1200 New Hampshire Avenue NW")
expect(subject.registrant_contacts[0].city).to eq("Washington")
expect(subject.registrant_contacts[0].zip).to eq("20036")
expect(subject.registrant_contacts[0].state).to eq("DC")
+ expect(subject.registrant_contacts[0].country).to eq(nil)
expect(subject.registrant_contacts[0].country_code).to eq("US")
expect(subject.registrant_contacts[0].phone).to eq("202-463-7200")
expect(subject.registrant_contacts[0].fax).to eq("999-999-9999")
expect(subject.registrant_contacts[0].email).to eq("noc@xif.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
@@ -97,16 +101,20 @@
expect(subject.admin_contacts).to have(1).items
expect(subject.admin_contacts[0]).to be_a(Whois::Record::Contact)
expect(subject.admin_contacts[0].type).to eq(Whois::Record::Contact::TYPE_ADMINISTRATIVE)
+ expect(subject.admin_contacts[0].id).to eq(nil)
expect(subject.admin_contacts[0].name).to eq("Communications, XIF ContactMiddleName")
expect(subject.admin_contacts[0].organization).to eq("XIF Communications")
expect(subject.admin_contacts[0].address).to eq("1200 New Hampshire Avenue NW")
expect(subject.admin_contacts[0].city).to eq("Washington")
expect(subject.admin_contacts[0].zip).to eq("20036")
expect(subject.admin_contacts[0].state).to eq("DC")
+ expect(subject.admin_contacts[0].country).to eq(nil)
expect(subject.admin_contacts[0].country_code).to eq("US")
expect(subject.admin_contacts[0].phone).to eq("202-463-7200")
expect(subject.admin_contacts[0].fax).to eq("202-318-4003")
expect(subject.admin_contacts[0].email).to eq("noc@xif.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
@@ -115,16 +123,20 @@
expect(subject.technical_contacts).to have(1).items
expect(subject.technical_contacts[0]).to be_a(Whois::Record::Contact)
expect(subject.technical_contacts[0].type).to eq(Whois::Record::Contact::TYPE_TECHNICAL)
+ expect(subject.technical_contacts[0].id).to eq(nil)
expect(subject.technical_contacts[0].name).to eq("Communications, XIF ContactMiddleName")
expect(subject.technical_contacts[0].organization).to eq("XIF Communications")
expect(subject.technical_contacts[0].address).to eq("1200 New Hampshire Avenue NW")
expect(subject.technical_contacts[0].city).to eq("Washington")
expect(subject.technical_contacts[0].zip).to eq("20036")
expect(subject.technical_contacts[0].state).to eq("DC")
+ expect(subject.technical_contacts[0].country).to eq(nil)
expect(subject.technical_contacts[0].country_code).to eq("US")
expect(subject.technical_contacts[0].phone).to eq("202-463-7200")
expect(subject.technical_contacts[0].fax).to eq("202-318-4003")
expect(subject.technical_contacts[0].email).to eq("noc@xif.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
@@ -79,17 +79,20 @@
expect(subject.registrant_contacts).to have(1).items
expect(subject.registrant_contacts[0]).to be_a(Whois::Record::Contact)
expect(subject.registrant_contacts[0].type).to eq(Whois::Record::Contact::TYPE_REGISTRANT)
- expect(subject.registrant_contacts[0].id).to eq("")
+ expect(subject.registrant_contacts[0].id).to eq(nil)
expect(subject.registrant_contacts[0].name).to eq("Host Master")
expect(subject.registrant_contacts[0].organization).to eq("united-domains AG")
expect(subject.registrant_contacts[0].address).to eq("Gautinger Str. 10")
expect(subject.registrant_contacts[0].city).to eq("Starnberg")
expect(subject.registrant_contacts[0].zip).to eq("82319")
expect(subject.registrant_contacts[0].state).to eq("Bayern")
+ expect(subject.registrant_contacts[0].country).to eq(nil)
expect(subject.registrant_contacts[0].country_code).to eq("DE")
expect(subject.registrant_contacts[0].phone).to eq("+49.8151368670")
expect(subject.registrant_contacts[0].fax).to eq("+49.81513686777")
expect(subject.registrant_contacts[0].email).to eq("hostmaster@united-domains.de")
+ 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
@@ -98,17 +101,20 @@
expect(subject.admin_contacts).to have(1).items
expect(subject.admin_contacts[0]).to be_a(Whois::Record::Contact)
expect(subject.admin_contacts[0].type).to eq(Whois::Record::Contact::TYPE_ADMINISTRATIVE)
- expect(subject.admin_contacts[0].id).to eq("")
+ expect(subject.admin_contacts[0].id).to eq(nil)
expect(subject.admin_contacts[0].name).to eq("Hostmaster Hostmaster")
expect(subject.admin_contacts[0].organization).to eq("united-domains AG")
expect(subject.admin_contacts[0].address).to eq("Gautinger Strasse 10")
expect(subject.admin_contacts[0].city).to eq("Starnberg")
expect(subject.admin_contacts[0].zip).to eq("82319")
expect(subject.admin_contacts[0].state).to eq("DE")
+ expect(subject.admin_contacts[0].country).to eq(nil)
expect(subject.admin_contacts[0].country_code).to eq("DE")
expect(subject.admin_contacts[0].phone).to eq("+49.8151368670")
expect(subject.admin_contacts[0].fax).to eq("+49.81513686777")
expect(subject.admin_contacts[0].email).to eq("hostmaster@united-domains.de")
+ 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
@@ -117,17 +123,20 @@
expect(subject.technical_contacts).to have(1).items
expect(subject.technical_contacts[0]).to be_a(Whois::Record::Contact)
expect(subject.technical_contacts[0].type).to eq(Whois::Record::Contact::TYPE_TECHNICAL)
- expect(subject.technical_contacts[0].id).to eq("")
+ expect(subject.technical_contacts[0].id).to eq(nil)
expect(subject.technical_contacts[0].name).to eq("Host Master")
expect(subject.technical_contacts[0].organization).to eq("united-domains AG")
expect(subject.technical_contacts[0].address).to eq("Gautinger Str. 10")
expect(subject.technical_contacts[0].city).to eq("Starnberg")
expect(subject.technical_contacts[0].zip).to eq("82319")
expect(subject.technical_contacts[0].state).to eq("Bayern")
+ expect(subject.technical_contacts[0].country).to eq(nil)
expect(subject.technical_contacts[0].country_code).to eq("DE")
expect(subject.technical_contacts[0].phone).to eq("+49.8151368670")
expect(subject.technical_contacts[0].fax).to eq("+49.81513686777")
expect(subject.technical_contacts[0].email).to eq("hostmaster@united-domains.de")
+ 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

0 comments on commit e5eda87

Please sign in to comment.