Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Parse whois.educause.edu contacts.

  • Loading branch information...
commit 9b9b78752128d2430f3038be884ab399be32fb48 1 parent 8051510
@weppos authored
Showing with 1,606 additions and 136 deletions.
  1. +101 −19 lib/whois/record/parser/whois.educause.edu.rb
  2. +63 −0 spec/fixtures/responses/whois.educause.edu/fixture1.txt
  3. +66 −0 spec/fixtures/responses/whois.educause.edu/fixture2.txt
  4. +67 −0 spec/fixtures/responses/whois.educause.edu/fixture3.txt
  5. +68 −0 spec/fixtures/responses/whois.educause.edu/fixture4.txt
  6. +66 −0 spec/fixtures/responses/whois.educause.edu/fixture5.txt
  7. +66 −0 spec/fixtures/responses/whois.educause.edu/fixture6.txt
  8. +27 −0 spec/fixtures/responses/whois.educause.edu/property_contact_registrant.expected
  9. +63 −0 spec/fixtures/responses/whois.educause.edu/property_contact_registrant.txt
  10. +28 −0 spec/fixtures/responses/whois.educause.edu/property_contact_registrant_with_additional_organization.expected
  11. +66 −0 spec/fixtures/responses/whois.educause.edu/property_contact_registrant_with_additional_organization.txt
  12. +26 −0 spec/fixtures/responses/whois.educause.edu/property_contact_registrant_without_address.expected
  13. 0  ...ucause.edu/{property_registrant_without_address.txt → property_contact_registrant_without_address.txt}
  14. +27 −0 spec/fixtures/responses/whois.educause.edu/property_contact_registrant_without_zip.expected
  15. 0  ...whois.educause.edu/{property_registrant_without_zip.txt → property_contact_registrant_without_zip.txt}
  16. +31 −0 spec/fixtures/responses/whois.educause.edu/property_contacts.expected
  17. +63 −0 spec/fixtures/responses/whois.educause.edu/property_contacts.txt
  18. +31 −0 spec/fixtures/responses/whois.educause.edu/property_contacts_case1.expected
  19. +66 −0 spec/fixtures/responses/whois.educause.edu/property_contacts_case1.txt
  20. +32 −0 spec/fixtures/responses/whois.educause.edu/property_contacts_case2.expected
  21. +67 −0 spec/fixtures/responses/whois.educause.edu/property_contacts_case2.txt
  22. +32 −0 spec/fixtures/responses/whois.educause.edu/property_contacts_case3.expected
  23. +66 −0 spec/fixtures/responses/whois.educause.edu/property_contacts_case3.txt
  24. +0 −11 spec/fixtures/responses/whois.educause.edu/property_registrant_without_address.expected
  25. +0 −12 spec/fixtures/responses/whois.educause.edu/property_registrant_without_zip.expected
  26. +13 −0 spec/fixtures/responses/whois.educause.edu/status_available.expected
  27. +49 −8 spec/fixtures/responses/whois.educause.edu/status_registered.expected
  28. +44 −0 spec/whois/record/parser/responses/whois.educause.edu/property_contact_registrant_spec.rb
  29. +44 −0 ...record/parser/responses/whois.educause.edu/property_contact_registrant_with_additional_organization_spec.rb
  30. +44 −0 spec/whois/record/parser/responses/whois.educause.edu/property_contact_registrant_without_address_spec.rb
  31. +44 −0 spec/whois/record/parser/responses/whois.educause.edu/property_contact_registrant_without_zip_spec.rb
  32. +43 −0 spec/whois/record/parser/responses/whois.educause.edu/property_contacts_case1_spec.rb
  33. +43 −0 spec/whois/record/parser/responses/whois.educause.edu/property_contacts_case2_spec.rb
  34. +43 −0 spec/whois/record/parser/responses/whois.educause.edu/property_contacts_case3_spec.rb
  35. +43 −0 spec/whois/record/parser/responses/whois.educause.edu/property_contacts_spec.rb
  36. +0 −38 spec/whois/record/parser/responses/whois.educause.edu/property_registrant_without_address_spec.rb
  37. +0 −39 spec/whois/record/parser/responses/whois.educause.edu/property_registrant_without_zip_spec.rb
  38. +18 −0 spec/whois/record/parser/responses/whois.educause.edu/status_available_spec.rb
  39. +53 −8 spec/whois/record/parser/responses/whois.educause.edu/status_registered_spec.rb
  40. +3 −1 tasks/spec.rake
View
120 lib/whois/record/parser/whois.educause.edu.rb
@@ -86,29 +86,18 @@ class WhoisEducauseEdu < Base
property_not_supported :registrar
property_supported :registrant_contacts do
- if content_for_scanner =~ /Registrant:\n((.+\n)+)\n/
- lines = $1.split("\n").map(&:strip)
+ build_contact_registrant("Registrant", Whois::Record::Contact::TYPE_REGISTRANT)
+ end
- case lines[-2]
- when /([^\n,]+),\s([A-Z]{2})(?:\s(\d{5}))/
- city, state, zip = $1, $2, $3
- else
- city = lines[-2]
- end
+ property_supported :admin_contacts do
+ build_contact("Administrative Contact", Whois::Record::Contact::TYPE_ADMIN)
+ end
- Record::Contact.new(
- :type => Whois::Record::Contact::TYPE_REGISTRANT,
- :name => nil,
- :organization => lines[0],
- :address => lines[1..-3].join("\n"),
- :city => city,
- :state => state,
- :zip => zip,
- :country => lines[-1]
- )
- end
+ property_supported :technical_contacts do
+ build_contact("Technical Contact", Whois::Record::Contact::TYPE_TECHNICAL)
end
+
property_supported :nameservers do
if content_for_scanner =~ /Name Servers: \n((.+\n)+)\n/
$1.split("\n").map do |line|
@@ -118,6 +107,99 @@ class WhoisEducauseEdu < Base
end
end
+
+ private
+
+ # [NAME] | EMPTY
+ # [ROLE]?
+ # [ORGANIZATION]
+ # [ADDRESS]*
+ # [CITY, ST ZIP]
+ # [COUNTRY]
+ # [PHONE]
+ # [EMAIL]
+ def build_contact(element, type)
+ if content_for_scanner =~ /#{element}:\n+((.+\n)+)\n/
+ lines = $1.split("\n").map(&:strip)
+ items = lines.dup
+
+ # Extract variables
+
+ # items.shift if items[0].strip == ''
+
+ v13 = items.delete_at(-1)
+
+ v11 = items.delete_at(-1)
+
+ v9 = items.delete_at(-1)
+
+ v4 = []
+ until items[0] =~ /^\d+/
+ v4 << items.shift
+ end
+ v4 = v4.join("\n")
+
+ v6 = items.delete_at(-1)
+ if v6 =~ /([^\n,]+),\s([A-Z]{2})(?:\s(\d{5}(?:-\d{4})?))/
+ v6, v7, v8 = $1, $2, $3
+ end
+
+ v5 = items.empty? ? nil : items.join("\n")
+
+ # Create Contact
+
+ Record::Contact.new(
+ :type => type,
+ :name => v4,
+ :organization => nil,
+ :address => v5,
+ :city => v6,
+ :state => v7,
+ :zip => v8,
+ :country => v9,
+ :phone => v11,
+ :email => v13
+ )
+ end
+ end
+
+ # [ORGANIZATION]
+ # [ADDRESS]*
+ # [CITY, ST ZIP] | [CITY]
+ # [COUNTRY]
+ def build_contact_registrant(element, type)
+ if content_for_scanner =~ /#{element}:\n((.+\n)+)\n/
+ lines = $1.split("\n").map(&:strip)
+ items = lines.dup
+
+ # Extract variables
+
+ v9 = items.delete_at(-1)
+
+ v4 = items.delete_at(0)
+
+ v6 = items.delete_at(-1)
+ if v6 =~ /([^\n,]+),\s([A-Z]{2})(?:\s(\d{5}))/
+ v6, v7, v8 = $1, $2, $3
+ end
+
+ v5 = items.empty? ? nil : items.join("\n")
+
+ # Create Contact
+
+ Record::Contact.new(
+ :type => type,
+ :name => nil,
+ :organization => v4,
+ :address => v5,
+ :city => v6,
+ :state => v7,
+ :zip => v8,
+ :country => v9
+ )
+ end
+ end
+
end
end
View
63 spec/fixtures/responses/whois.educause.edu/fixture1.txt
@@ -0,0 +1,63 @@
+
+This Registry database contains ONLY .EDU domains.
+The data in the EDUCAUSE Whois database is provided
+by EDUCAUSE for information purposes in order to
+assist in the process of obtaining information about
+or related to .edu domain registration records.
+
+The EDUCAUSE Whois database is authoritative for the
+.EDU domain.
+
+A Web interface for the .EDU EDUCAUSE Whois Server is
+available at: http://whois.educause.net
+
+By submitting a Whois query, you agree that this information
+will not be used to allow, enable, or otherwise support
+the transmission of unsolicited commercial advertising or
+solicitations via e-mail. The use of electronic processes to
+harvest information from this server is generally prohibited
+except as reasonably necessary to register or modify .edu
+domain names.
+
+You may use "%" as a wildcard in your search. For further
+information regarding the use of this WHOIS server, please
+type: help
+
+--------------------------
+
+Domain Name: NIC.EDU
+
+Registrant:
+ North Idaho College
+ 1000 W. Garden Avenue
+ Coeur d'Alene, ID 83814
+ UNITED STATES
+
+Administrative Contact:
+ NetAdmin
+ North Idaho College
+ 1000 W. Garden Avenue
+ Coeur d Alene, ID 83814
+ UNITED STATES
+ (208) 769-7860
+ netsys@nic.edu
+
+Technical Contact:
+ Dennis L Noordam
+ Windows System Administrator
+ North Idaho College
+ 1000 W. Garden Avenue
+ Coeur d Alene, ID 83814
+ UNITED STATES
+ (208) 769-7860
+ dlnoordam@nic.edu
+
+Name Servers:
+ NICNS1.NIC.EDU 198.187.233.211
+ NICNS2.NIC.EDU 198.187.233.212
+
+Domain record activated: 20-Dec-1996
+Domain record last updated: 29-Jun-2010
+Domain expires: 31-Jul-2012
+
+
View
66 spec/fixtures/responses/whois.educause.edu/fixture2.txt
@@ -0,0 +1,66 @@
+
+This Registry database contains ONLY .EDU domains.
+The data in the EDUCAUSE Whois database is provided
+by EDUCAUSE for information purposes in order to
+assist in the process of obtaining information about
+or related to .edu domain registration records.
+
+The EDUCAUSE Whois database is authoritative for the
+.EDU domain.
+
+A Web interface for the .EDU EDUCAUSE Whois Server is
+available at: http://whois.educause.net
+
+By submitting a Whois query, you agree that this information
+will not be used to allow, enable, or otherwise support
+the transmission of unsolicited commercial advertising or
+solicitations via e-mail. The use of electronic processes to
+harvest information from this server is generally prohibited
+except as reasonably necessary to register or modify .edu
+domain names.
+
+You may use "%" as a wildcard in your search. For further
+information regarding the use of this WHOIS server, please
+type: help
+
+--------------------------
+
+Domain Name: HARVARD.EDU
+
+Registrant:
+ Harvard University
+ HUIT Network Services
+ 60 Oxford Street
+ Cambridge, MA 02138
+ UNITED STATES
+
+Administrative Contact:
+ Jacques N Laflamme
+ Director, Network Services
+ Harvard University
+ 60 Oxford Street
+ Cambridge, MA 02138
+ UNITED STATES
+ (617) 384-6663
+ jacques_laflamme@harvard.edu
+
+Technical Contact:
+ Network Operations
+ Harvard University
+ HUIT Network Services
+ 60 Oxford Street
+ Cambridge, MA 02138
+ UNITED STATES
+ (617) 495-7777
+ netmanager@harvard.edu
+
+Name Servers:
+ EXTERNALDNS-C1.HARVARD.EDU 128.103.200.35
+ EXTERNALDNS-C2.HARVARD.EDU 128.103.200.51
+ EXTERNALDNS-C3.BR.HARVARD.EDU 128.119.3.185
+
+Domain record activated: 27-Jun-1985
+Domain record last updated: 19-Mar-2012
+Domain expires: 31-Jul-2012
+
+
View
67 spec/fixtures/responses/whois.educause.edu/fixture3.txt
@@ -0,0 +1,67 @@
+
+This Registry database contains ONLY .EDU domains.
+The data in the EDUCAUSE Whois database is provided
+by EDUCAUSE for information purposes in order to
+assist in the process of obtaining information about
+or related to .edu domain registration records.
+
+The EDUCAUSE Whois database is authoritative for the
+.EDU domain.
+
+A Web interface for the .EDU EDUCAUSE Whois Server is
+available at: http://whois.educause.net
+
+By submitting a Whois query, you agree that this information
+will not be used to allow, enable, or otherwise support
+the transmission of unsolicited commercial advertising or
+solicitations via e-mail. The use of electronic processes to
+harvest information from this server is generally prohibited
+except as reasonably necessary to register or modify .edu
+domain names.
+
+You may use "%" as a wildcard in your search. For further
+information regarding the use of this WHOIS server, please
+type: help
+
+--------------------------
+
+Domain Name: STANFORD.EDU
+
+Registrant:
+ Stanford University
+ The Board of Trustees of the Leland Stanford Junior University
+ 241 Panama Street, Pine Hall, Room 115
+ Stanford, CA 94305-4122
+ UNITED STATES
+
+Administrative Contact:
+
+ Domain Admin
+ Stanford University
+ 241 Panama Street Pine Hall, Room 115
+ Stanford, CA 94305-4122
+ UNITED STATES
+ (650) 723-4328
+ sunet-admin@stanford.edu
+
+Technical Contact:
+
+ Domain Admin
+ Stanford University
+ 241 Panama Street Pine Hall, Room 115
+ Stanford, CA 94305-4122
+ UNITED STATES
+ (650) 723-4328
+ sunet-admin@stanford.edu
+
+Name Servers:
+ ARGUS.STANFORD.EDU 171.64.7.115, 2607:f6d0:0:9113::ab40:773
+ AVALLONE.STANFORD.EDU 171.64.7.88, 2607:f6d0:0:9116::ab40:758
+ ATALANTE.STANFORD.EDU 171.64.7.61, 2607:f6d0:0:d32::ab40:73d
+ AERATHEA.STANFORD.EDU 152.3.104.250
+
+Domain record activated: 04-Oct-1985
+Domain record last updated: 07-May-2009
+Domain expires: 31-Jul-2013
+
+
View
68 spec/fixtures/responses/whois.educause.edu/fixture4.txt
@@ -0,0 +1,68 @@
+
+This Registry database contains ONLY .EDU domains.
+The data in the EDUCAUSE Whois database is provided
+by EDUCAUSE for information purposes in order to
+assist in the process of obtaining information about
+or related to .edu domain registration records.
+
+The EDUCAUSE Whois database is authoritative for the
+.EDU domain.
+
+A Web interface for the .EDU EDUCAUSE Whois Server is
+available at: http://whois.educause.net
+
+By submitting a Whois query, you agree that this information
+will not be used to allow, enable, or otherwise support
+the transmission of unsolicited commercial advertising or
+solicitations via e-mail. The use of electronic processes to
+harvest information from this server is generally prohibited
+except as reasonably necessary to register or modify .edu
+domain names.
+
+You may use "%" as a wildcard in your search. For further
+information regarding the use of this WHOIS server, please
+type: help
+
+--------------------------
+
+Domain Name: NYU.EDU
+
+Registrant:
+ New York University
+ ITS Communications Operations Services
+ 7 East 12th Street, 5th Floor
+ New York, NY 10003
+ UNITED STATES
+
+Administrative Contact:
+
+ NYU Network Operations Admin Role Account
+ New York University, ITS C&CS
+ 7 East 12th Street
+ 5th Floor
+ New York, NY 10003
+ UNITED STATES
+ (212) 998-3431
+ domreg.admin@nyu.edu
+
+Technical Contact:
+
+ Network Operations Center Role Account
+ New York University, ITS COS
+ 7 East 12th Street
+ Room 501
+ New York, NY 10003
+ UNITED STATES
+ (212) 998-3444
+ noc@nyu.edu
+
+Name Servers:
+ NS1.NYU.EDU 128.122.253.83
+ NS2.NYU.EDU 128.122.253.42
+ NYU-NS.BERKELEY.EDU
+
+Domain record activated: 08-Oct-1986
+Domain record last updated: 12-Oct-2007
+Domain expires: 31-Jul-2012
+
+
View
66 spec/fixtures/responses/whois.educause.edu/fixture5.txt
@@ -0,0 +1,66 @@
+
+This Registry database contains ONLY .EDU domains.
+The data in the EDUCAUSE Whois database is provided
+by EDUCAUSE for information purposes in order to
+assist in the process of obtaining information about
+or related to .edu domain registration records.
+
+The EDUCAUSE Whois database is authoritative for the
+.EDU domain.
+
+A Web interface for the .EDU EDUCAUSE Whois Server is
+available at: http://whois.educause.net
+
+By submitting a Whois query, you agree that this information
+will not be used to allow, enable, or otherwise support
+the transmission of unsolicited commercial advertising or
+solicitations via e-mail. The use of electronic processes to
+harvest information from this server is generally prohibited
+except as reasonably necessary to register or modify .edu
+domain names.
+
+You may use "%" as a wildcard in your search. For further
+information regarding the use of this WHOIS server, please
+type: help
+
+--------------------------
+
+Domain Name: UIUC.EDU
+
+Registrant:
+ University of Illinois at Urbana Champaign
+ CITES 1120 Digital Computer Laboratory
+ 1304 West Springfield Avenue
+ Urbana, IL 61801-2910
+ UNITED STATES
+
+Administrative Contact:
+ Tracy L. Smith
+ University of Illinois at Urbana-Champaign
+ CITES 2105 Digital Computer Laboratory
+ 1304 West Springfield Avenue
+ Urbana, IL 61801-4399
+ UNITED STATES
+ (217) 244-2032
+ edu-admin@listserv.illinois.edu
+
+Technical Contact:
+ Charles Kline
+ University of Illinois at Urbana Champaign
+ CITES 1120 Digital Computer Laboratory
+ 1304 West Springfield Avenue
+ Urbana, IL 61801
+ UNITED STATES
+ (217) 333-3339
+ edu-tech@listserv.illinois.edu
+
+Name Servers:
+ DNS1.ILLINOIS.EDU
+ DNS2.ILLINOIS.EDU
+ DNS1.IU.EDU
+
+Domain record activated: 18-Jul-1985
+Domain record last updated: 22-Mar-2011
+Domain expires: 31-Jul-2012
+
+
View
66 spec/fixtures/responses/whois.educause.edu/fixture6.txt
@@ -0,0 +1,66 @@
+
+This Registry database contains ONLY .EDU domains.
+The data in the EDUCAUSE Whois database is provided
+by EDUCAUSE for information purposes in order to
+assist in the process of obtaining information about
+or related to .edu domain registration records.
+
+The EDUCAUSE Whois database is authoritative for the
+.EDU domain.
+
+A Web interface for the .EDU EDUCAUSE Whois Server is
+available at: http://whois.educause.net
+
+By submitting a Whois query, you agree that this information
+will not be used to allow, enable, or otherwise support
+the transmission of unsolicited commercial advertising or
+solicitations via e-mail. The use of electronic processes to
+harvest information from this server is generally prohibited
+except as reasonably necessary to register or modify .edu
+domain names.
+
+You may use "%" as a wildcard in your search. For further
+information regarding the use of this WHOIS server, please
+type: help
+
+--------------------------
+
+Domain Name: BROWN.EDU
+
+Registrant:
+ Brown University
+ Computing & Information
+ Services Box 1885
+ Providence, RI 02912-1885
+ UNITED STATES
+
+Administrative Contact:
+ Kenise Harris
+ CIS Manager
+ Brown University
+ 115 Waterman St., Box 1885
+ Providence, RI 02912-1885
+ UNITED STATES
+ (401) 863-7223
+ kenise_harris@brown.edu
+
+Technical Contact:
+
+ NOC
+ Brown University
+ 115 Waterman St., Box 1885
+ Providence, RI 02912-1885
+ UNITED STATES
+ (401) 863-7247
+ noc@brown.edu
+
+Name Servers:
+ BRU-NS1.BROWN.EDU 128.148.248.11
+ BRU-NS2.BROWN.EDU 128.148.248.12
+ NS1.UCSB.EDU
+
+Domain record activated: 27-Aug-1986
+Domain record last updated: 05-Jan-2011
+Domain expires: 31-Jul-2012
+
+
View
27 spec/fixtures/responses/whois.educause.edu/property_contact_registrant.expected
@@ -0,0 +1,27 @@
+// Description:
+// The standard registrant contact property.
+
+// The standard registrant contact follows this schema:
+//
+// [ORGANIZATION]
+// [ADDRESS]
+// [CITY, ST ZIP]
+// [COUNTRY]
+
+#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 == nil
+ should: %s[0].organization == "North Idaho College"
+ should: %s[0].address == "1000 W. Garden Avenue"
+ should: %s[0].city == "Coeur d'Alene"
+ should: %s[0].zip == "83814"
+ should: %s[0].state == "ID"
+ should: %s[0].country == "UNITED STATES"
+ should: %s[0].country_code == nil
+ should: %s[0].phone == nil
+ should: %s[0].fax == nil
+ should: %s[0].email == nil
View
63 spec/fixtures/responses/whois.educause.edu/property_contact_registrant.txt
@@ -0,0 +1,63 @@
+
+This Registry database contains ONLY .EDU domains.
+The data in the EDUCAUSE Whois database is provided
+by EDUCAUSE for information purposes in order to
+assist in the process of obtaining information about
+or related to .edu domain registration records.
+
+The EDUCAUSE Whois database is authoritative for the
+.EDU domain.
+
+A Web interface for the .EDU EDUCAUSE Whois Server is
+available at: http://whois.educause.net
+
+By submitting a Whois query, you agree that this information
+will not be used to allow, enable, or otherwise support
+the transmission of unsolicited commercial advertising or
+solicitations via e-mail. The use of electronic processes to
+harvest information from this server is generally prohibited
+except as reasonably necessary to register or modify .edu
+domain names.
+
+You may use "%" as a wildcard in your search. For further
+information regarding the use of this WHOIS server, please
+type: help
+
+--------------------------
+
+Domain Name: NIC.EDU
+
+Registrant:
+ North Idaho College
+ 1000 W. Garden Avenue
+ Coeur d'Alene, ID 83814
+ UNITED STATES
+
+Administrative Contact:
+ NetAdmin
+ North Idaho College
+ 1000 W. Garden Avenue
+ Coeur d Alene, ID 83814
+ UNITED STATES
+ (208) 769-7860
+ netsys@nic.edu
+
+Technical Contact:
+ Dennis L Noordam
+ Windows System Administrator
+ North Idaho College
+ 1000 W. Garden Avenue
+ Coeur d Alene, ID 83814
+ UNITED STATES
+ (208) 769-7860
+ dlnoordam@nic.edu
+
+Name Servers:
+ NICNS1.NIC.EDU 198.187.233.211
+ NICNS2.NIC.EDU 198.187.233.212
+
+Domain record activated: 20-Dec-1996
+Domain record last updated: 29-Jun-2010
+Domain expires: 31-Jul-2012
+
+
View
28 .../fixtures/responses/whois.educause.edu/property_contact_registrant_with_additional_organization.expected
@@ -0,0 +1,28 @@
+// Description:
+// The registrant contact property contains additional tokens in the organization.
+// For the sake of simplicity, these tokens are attached to the address.
+
+// This case follows this schema:
+//
+// [ORGANIZATION]
+// [ADDRESS]*
+// [CITY, ST ZIP]
+// [COUNTRY]
+
+#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 == nil
+ should: %s[0].organization == "Harvard University"
+ should: %s[0].address == "HUIT Network Services\n60 Oxford Street"
+ should: %s[0].city == "Cambridge"
+ should: %s[0].zip == "02138"
+ should: %s[0].state == "MA"
+ should: %s[0].country == "UNITED STATES"
+ should: %s[0].country_code == nil
+ should: %s[0].phone == nil
+ should: %s[0].fax == nil
+ should: %s[0].email == nil
View
66 spec/fixtures/responses/whois.educause.edu/property_contact_registrant_with_additional_organization.txt
@@ -0,0 +1,66 @@
+
+This Registry database contains ONLY .EDU domains.
+The data in the EDUCAUSE Whois database is provided
+by EDUCAUSE for information purposes in order to
+assist in the process of obtaining information about
+or related to .edu domain registration records.
+
+The EDUCAUSE Whois database is authoritative for the
+.EDU domain.
+
+A Web interface for the .EDU EDUCAUSE Whois Server is
+available at: http://whois.educause.net
+
+By submitting a Whois query, you agree that this information
+will not be used to allow, enable, or otherwise support
+the transmission of unsolicited commercial advertising or
+solicitations via e-mail. The use of electronic processes to
+harvest information from this server is generally prohibited
+except as reasonably necessary to register or modify .edu
+domain names.
+
+You may use "%" as a wildcard in your search. For further
+information regarding the use of this WHOIS server, please
+type: help
+
+--------------------------
+
+Domain Name: HARVARD.EDU
+
+Registrant:
+ Harvard University
+ HUIT Network Services
+ 60 Oxford Street
+ Cambridge, MA 02138
+ UNITED STATES
+
+Administrative Contact:
+ Jacques N Laflamme
+ Director, Network Services
+ Harvard University
+ 60 Oxford Street
+ Cambridge, MA 02138
+ UNITED STATES
+ (617) 384-6663
+ jacques_laflamme@harvard.edu
+
+Technical Contact:
+ Network Operations
+ Harvard University
+ HUIT Network Services
+ 60 Oxford Street
+ Cambridge, MA 02138
+ UNITED STATES
+ (617) 495-7777
+ netmanager@harvard.edu
+
+Name Servers:
+ EXTERNALDNS-C1.HARVARD.EDU 128.103.200.35
+ EXTERNALDNS-C2.HARVARD.EDU 128.103.200.51
+ EXTERNALDNS-C3.BR.HARVARD.EDU 128.119.3.185
+
+Domain record activated: 27-Jun-1985
+Domain record last updated: 19-Mar-2012
+Domain expires: 31-Jul-2012
+
+
View
26 spec/fixtures/responses/whois.educause.edu/property_contact_registrant_without_address.expected
@@ -0,0 +1,26 @@
+// Description:
+// The registrant contact property is missing the address.
+
+// This case follows this schema:
+//
+// [ORGANIZATION]
+// [CITY, ST ZIP]
+// [COUNTRY]
+
+#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 == nil
+ should: %s[0].organization == "Massachusetts Institute of Technology"
+ should: %s[0].address == nil
+ should: %s[0].city == "Cambridge"
+ should: %s[0].zip == "02139"
+ should: %s[0].state == "MA"
+ should: %s[0].country == "UNITED STATES"
+ should: %s[0].country_code == nil
+ should: %s[0].phone == nil
+ should: %s[0].fax == nil
+ should: %s[0].email == nil
View
0  ...cause.edu/property_registrant_without_address.txt → ...u/property_contact_registrant_without_address.txt
File renamed without changes
View
27 spec/fixtures/responses/whois.educause.edu/property_contact_registrant_without_zip.expected
@@ -0,0 +1,27 @@
+// Description:
+// The registrant contact property is missing the ZIP.
+
+// This case follows this schema:
+//
+// [ORGANIZATION]
+// [ADDRESS]*
+// [CITY]
+// [COUNTRY]
+
+#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 == nil
+ should: %s[0].organization == "The American University of the Caribbean School of Medicine"
+ should: %s[0].address == "c/o Campbell Corporate Services, Ltd.\nScotiabank Building, P. O. Box 268"
+ should: %s[0].city == "Grand Cayman"
+ should: %s[0].zip == nil
+ should: %s[0].state == nil
+ should: %s[0].country == "CAYMAN ISLANDS"
+ should: %s[0].country_code == nil
+ should: %s[0].phone == nil
+ should: %s[0].fax == nil
+ should: %s[0].email == nil
View
0  ....educause.edu/property_registrant_without_zip.txt → ...e.edu/property_contact_registrant_without_zip.txt
File renamed without changes
View
31 spec/fixtures/responses/whois.educause.edu/property_contacts.expected
@@ -0,0 +1,31 @@
+// Description:
+// The standard contact property.
+
+// The standard contact follows this schema:
+//
+// [NAME]
+// [ROLE]
+// [ORGANIZATION]
+// [ADDRESS]
+// [CITY, ST ZIP]
+// [COUNTRY]
+// [PHONE]
+// [EMAIL]
+
+#technical_contacts
+ should: %s CLASS(array)
+ should: %s SIZE(1)
+ should: %s[0] CLASS(contact)
+ // should: %s[0].type == ANYTHING
+ should: %s[0].id == nil
+ should: %s[0].name == "Dennis L Noordam\nWindows System Administrator\nNorth Idaho College"
+ should: %s[0].organization == nil
+ should: %s[0].address == "1000 W. Garden Avenue"
+ should: %s[0].city == "Coeur d Alene"
+ should: %s[0].zip == "83814"
+ should: %s[0].state == "ID"
+ should: %s[0].country == "UNITED STATES"
+ should: %s[0].country_code == nil
+ should: %s[0].phone == "(208) 769-7860"
+ should: %s[0].fax == nil
+ should: %s[0].email == "dlnoordam@nic.edu"
View
63 spec/fixtures/responses/whois.educause.edu/property_contacts.txt
@@ -0,0 +1,63 @@
+
+This Registry database contains ONLY .EDU domains.
+The data in the EDUCAUSE Whois database is provided
+by EDUCAUSE for information purposes in order to
+assist in the process of obtaining information about
+or related to .edu domain registration records.
+
+The EDUCAUSE Whois database is authoritative for the
+.EDU domain.
+
+A Web interface for the .EDU EDUCAUSE Whois Server is
+available at: http://whois.educause.net
+
+By submitting a Whois query, you agree that this information
+will not be used to allow, enable, or otherwise support
+the transmission of unsolicited commercial advertising or
+solicitations via e-mail. The use of electronic processes to
+harvest information from this server is generally prohibited
+except as reasonably necessary to register or modify .edu
+domain names.
+
+You may use "%" as a wildcard in your search. For further
+information regarding the use of this WHOIS server, please
+type: help
+
+--------------------------
+
+Domain Name: NIC.EDU
+
+Registrant:
+ North Idaho College
+ 1000 W. Garden Avenue
+ Coeur d'Alene, ID 83814
+ UNITED STATES
+
+Administrative Contact:
+ NetAdmin
+ North Idaho College
+ 1000 W. Garden Avenue
+ Coeur d Alene, ID 83814
+ UNITED STATES
+ (208) 769-7860
+ netsys@nic.edu
+
+Technical Contact:
+ Dennis L Noordam
+ Windows System Administrator
+ North Idaho College
+ 1000 W. Garden Avenue
+ Coeur d Alene, ID 83814
+ UNITED STATES
+ (208) 769-7860
+ dlnoordam@nic.edu
+
+Name Servers:
+ NICNS1.NIC.EDU 198.187.233.211
+ NICNS2.NIC.EDU 198.187.233.212
+
+Domain record activated: 20-Dec-1996
+Domain record last updated: 29-Jun-2010
+Domain expires: 31-Jul-2012
+
+
View
31 spec/fixtures/responses/whois.educause.edu/property_contacts_case1.expected
@@ -0,0 +1,31 @@
+// Description:
+// The contact property does not contain the job position, but it contains a multiple street.
+// The final token count is the same of a standard contact (8 tokens).
+
+// This case follows this schema:
+//
+// [NAME]
+// [ORGANIZATION]
+// [ADDRESS]*
+// [CITY, ST ZIP]
+// [COUNTRY]
+// [PHONE]
+// [EMAIL]
+
+#technical_contacts
+ should: %s CLASS(array)
+ should: %s SIZE(1)
+ should: %s[0] CLASS(contact)
+ // should: %s[0].type == ANYTHING
+ should: %s[0].id == nil
+ should: %s[0].name == "Information Technology\nEDUCAUSE"
+ should: %s[0].organization == nil
+ should: %s[0].address == "4772 Walnut Street\nSte 206"
+ should: %s[0].city == "Boulder"
+ should: %s[0].zip == "80301"
+ should: %s[0].state == "CO"
+ should: %s[0].country == "UNITED STATES"
+ should: %s[0].country_code == nil
+ should: %s[0].phone == "(303) 449-4430"
+ should: %s[0].fax == nil
+ should: %s[0].email == "netadmin@educause.edu"
View
66 spec/fixtures/responses/whois.educause.edu/property_contacts_case1.txt
@@ -0,0 +1,66 @@
+
+This Registry database contains ONLY .EDU domains.
+The data in the EDUCAUSE Whois database is provided
+by EDUCAUSE for information purposes in order to
+assist in the process of obtaining information about
+or related to .edu domain registration records.
+
+The EDUCAUSE Whois database is authoritative for the
+.EDU domain.
+
+A Web interface for the .EDU EDUCAUSE Whois Server is
+available at: http://whois.educause.net
+
+By submitting a Whois query, you agree that this information
+will not be used to allow, enable, or otherwise support
+the transmission of unsolicited commercial advertising or
+solicitations via e-mail. The use of electronic processes to
+harvest information from this server is generally prohibited
+except as reasonably necessary to register or modify .edu
+domain names.
+
+You may use "%" as a wildcard in your search. For further
+information regarding the use of this WHOIS server, please
+type: help
+
+--------------------------
+
+Domain Name: EDUCAUSE.EDU
+
+Registrant:
+ EDUCAUSE
+ 4772 Walnut Street
+ Suite 206
+ Boulder, CO 80301
+ UNITED STATES
+
+Administrative Contact:
+ Information Technology
+ EDUCAUSE
+ 4772 Walnut Street
+ Ste 206
+ Boulder, CO 80301
+ UNITED STATES
+ (303) 449-4430
+ netadmin@educause.edu
+
+Technical Contact:
+ Information Technology
+ EDUCAUSE
+ 4772 Walnut Street
+ Ste 206
+ Boulder, CO 80301
+ UNITED STATES
+ (303) 449-4430
+ netadmin@educause.edu
+
+Name Servers:
+ NS3.EDUCAUSE.EDU 198.59.61.50
+ NS4.EDUCAUSE.EDU 192.52.179.69
+ NS5.EDUCAUSE.EDU 198.59.61.50
+
+Domain record activated: 11-Mar-1998
+Domain record last updated: 02-Oct-2009
+Domain expires: 31-Jul-2010
+
+
View
32 spec/fixtures/responses/whois.educause.edu/property_contacts_case2.expected
@@ -0,0 +1,32 @@
+// Description:
+// The contact property contains an empty organization name.
+// The final token count is the same of a standard contact (8 tokens).
+
+// This case follows this schema:
+//
+// [NAME]
+// [ROLE]
+// [ORGANIZATION]
+// [ADDRESS]
+// [CITY, ST ZIP]
+// [COUNTRY]
+// [PHONE]
+// [EMAIL]
+
+#technical_contacts
+ should: %s CLASS(array)
+ should: %s SIZE(1)
+ should: %s[0] CLASS(contact)
+ // should: %s[0].type == ANYTHING
+ should: %s[0].id == nil
+ should: %s[0].name == "Domain Admin\nStanford University"
+ should: %s[0].organization == nil
+ should: %s[0].address == "241 Panama Street Pine Hall, Room 115"
+ should: %s[0].city == "Stanford"
+ should: %s[0].zip == "94305-4122"
+ should: %s[0].state == "CA"
+ should: %s[0].country == "UNITED STATES"
+ should: %s[0].country_code == nil
+ should: %s[0].phone == "(650) 723-4328"
+ should: %s[0].fax == nil
+ should: %s[0].email == "sunet-admin@stanford.edu"
View
67 spec/fixtures/responses/whois.educause.edu/property_contacts_case2.txt
@@ -0,0 +1,67 @@
+
+This Registry database contains ONLY .EDU domains.
+The data in the EDUCAUSE Whois database is provided
+by EDUCAUSE for information purposes in order to
+assist in the process of obtaining information about
+or related to .edu domain registration records.
+
+The EDUCAUSE Whois database is authoritative for the
+.EDU domain.
+
+A Web interface for the .EDU EDUCAUSE Whois Server is
+available at: http://whois.educause.net
+
+By submitting a Whois query, you agree that this information
+will not be used to allow, enable, or otherwise support
+the transmission of unsolicited commercial advertising or
+solicitations via e-mail. The use of electronic processes to
+harvest information from this server is generally prohibited
+except as reasonably necessary to register or modify .edu
+domain names.
+
+You may use "%" as a wildcard in your search. For further
+information regarding the use of this WHOIS server, please
+type: help
+
+--------------------------
+
+Domain Name: STANFORD.EDU
+
+Registrant:
+ Stanford University
+ The Board of Trustees of the Leland Stanford Junior University
+ 241 Panama Street, Pine Hall, Room 115
+ Stanford, CA 94305-4122
+ UNITED STATES
+
+Administrative Contact:
+
+ Domain Admin
+ Stanford University
+ 241 Panama Street Pine Hall, Room 115
+ Stanford, CA 94305-4122
+ UNITED STATES
+ (650) 723-4328
+ sunet-admin@stanford.edu
+
+Technical Contact:
+
+ Domain Admin
+ Stanford University
+ 241 Panama Street Pine Hall, Room 115
+ Stanford, CA 94305-4122
+ UNITED STATES
+ (650) 723-4328
+ sunet-admin@stanford.edu
+
+Name Servers:
+ ARGUS.STANFORD.EDU 171.64.7.115, 2607:f6d0:0:9113::ab40:773
+ AVALLONE.STANFORD.EDU 171.64.7.88, 2607:f6d0:0:9116::ab40:758
+ ATALANTE.STANFORD.EDU 171.64.7.61, 2607:f6d0:0:d32::ab40:73d
+ AERATHEA.STANFORD.EDU 152.3.104.250
+
+Domain record activated: 04-Oct-1985
+Domain record last updated: 07-May-2009
+Domain expires: 31-Jul-2013
+
+
View
32 spec/fixtures/responses/whois.educause.edu/property_contacts_case3.expected
@@ -0,0 +1,32 @@
+// Description:
+// The contact property contains a ZIP code of .
+// The final token count is the same of a standard contact (8 tokens).
+
+// This case follows this schema:
+//
+// [NAME]
+// [ROLE]
+// [ORGANIZATION]
+// [ADDRESS]
+// [CITY, ST ZIP]
+// [COUNTRY]
+// [PHONE]
+// [EMAIL]
+
+#admin_contacts
+ should: %s CLASS(array)
+ should: %s SIZE(1)
+ should: %s[0] CLASS(contact)
+ // should: %s[0].type == ANYTHING
+ should: %s[0].id == nil
+ should: %s[0].name == "Tracy L. Smith\nUniversity of Illinois at Urbana-Champaign\nCITES 2105 Digital Computer Laboratory"
+ should: %s[0].organization == nil
+ should: %s[0].address == "1304 West Springfield Avenue"
+ should: %s[0].city == "Urbana"
+ should: %s[0].zip == "61801-4399"
+ should: %s[0].state == "IL"
+ should: %s[0].country == "UNITED STATES"
+ should: %s[0].country_code == nil
+ should: %s[0].phone == "(217) 244-2032"
+ should: %s[0].fax == nil
+ should: %s[0].email == "edu-admin@listserv.illinois.edu"
View
66 spec/fixtures/responses/whois.educause.edu/property_contacts_case3.txt
@@ -0,0 +1,66 @@
+
+This Registry database contains ONLY .EDU domains.
+The data in the EDUCAUSE Whois database is provided
+by EDUCAUSE for information purposes in order to
+assist in the process of obtaining information about
+or related to .edu domain registration records.
+
+The EDUCAUSE Whois database is authoritative for the
+.EDU domain.
+
+A Web interface for the .EDU EDUCAUSE Whois Server is
+available at: http://whois.educause.net
+
+By submitting a Whois query, you agree that this information
+will not be used to allow, enable, or otherwise support
+the transmission of unsolicited commercial advertising or
+solicitations via e-mail. The use of electronic processes to
+harvest information from this server is generally prohibited
+except as reasonably necessary to register or modify .edu
+domain names.
+
+You may use "%" as a wildcard in your search. For further
+information regarding the use of this WHOIS server, please
+type: help
+
+--------------------------
+
+Domain Name: UIUC.EDU
+
+Registrant:
+ University of Illinois at Urbana Champaign
+ CITES 1120 Digital Computer Laboratory
+ 1304 West Springfield Avenue
+ Urbana, IL 61801-2910
+ UNITED STATES
+
+Administrative Contact:
+ Tracy L. Smith
+ University of Illinois at Urbana-Champaign
+ CITES 2105 Digital Computer Laboratory
+ 1304 West Springfield Avenue
+ Urbana, IL 61801-4399
+ UNITED STATES
+ (217) 244-2032
+ edu-admin@listserv.illinois.edu
+
+Technical Contact:
+ Charles Kline
+ University of Illinois at Urbana Champaign
+ CITES 1120 Digital Computer Laboratory
+ 1304 West Springfield Avenue
+ Urbana, IL 61801
+ UNITED STATES
+ (217) 333-3339
+ edu-tech@listserv.illinois.edu
+
+Name Servers:
+ DNS1.ILLINOIS.EDU
+ DNS2.ILLINOIS.EDU
+ DNS1.IU.EDU
+
+Domain record activated: 18-Jul-1985
+Domain record last updated: 22-Mar-2011
+Domain expires: 31-Jul-2012
+
+
View
11 spec/fixtures/responses/whois.educause.edu/property_registrant_without_address.expected
@@ -1,11 +0,0 @@
-#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 == nil
- should: %s[0].organization == "Massachusetts Institute of Technology"
- should: %s[0].city == "Cambridge"
- should: %s[0].zip == "02139"
- should: %s[0].state == "MA"
- should: %s[0].country == "UNITED STATES"
View
12 spec/fixtures/responses/whois.educause.edu/property_registrant_without_zip.expected
@@ -1,12 +0,0 @@
-#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 == nil
- should: %s[0].organization == "The American University of the Caribbean School of Medicine"
- should: %s[0].address == "c/o Campbell Corporate Services, Ltd.\nScotiabank Building, P. O. Box 268"
- should: %s[0].city == "Grand Cayman"
- should: %s[0].zip == nil
- should: %s[0].state == nil
- should: %s[0].country == "CAYMAN ISLANDS"
View
13 spec/fixtures/responses/whois.educause.edu/status_available.expected
@@ -39,6 +39,19 @@
#registrar
should: %s raise_error(Whois::PropertyNotSupported)
+#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
57 spec/fixtures/responses/whois.educause.edu/status_registered.expected
@@ -46,14 +46,55 @@
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 == nil
- should: %s[0].organization == "EDUCAUSE"
- should: %s[0].address == "4772 Walnut Street\nSuite 206"
- should: %s[0].city == "Boulder"
- should: %s[0].zip == "80301"
- should: %s[0].state == "CO"
- should: %s[0].country == "UNITED STATES"
+ should: %s[0].type == Whois::Record::Contact::TYPE_REGISTRANT
+ should: %s[0].id == nil
+ should: %s[0].name == nil
+ should: %s[0].organization == "EDUCAUSE"
+ should: %s[0].address == "4772 Walnut Street\nSuite 206"
+ should: %s[0].city == "Boulder"
+ should: %s[0].zip == "80301"
+ should: %s[0].state == "CO"
+ should: %s[0].country == "UNITED STATES"
+ should: %s[0].country_code == nil
+ should: %s[0].phone == nil
+ should: %s[0].fax == nil
+ should: %s[0].email == nil
+
+#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 == "Information Technology\nEDUCAUSE"
+ should: %s[0].organization == nil
+ should: %s[0].address == "4772 Walnut Street\nSte 206"
+ should: %s[0].city == "Boulder"
+ should: %s[0].zip == "80301"
+ should: %s[0].state == "CO"
+ should: %s[0].country == "UNITED STATES"
+ should: %s[0].country_code == nil
+ should: %s[0].phone == "(303) 449-4430"
+ should: %s[0].fax == nil
+ should: %s[0].email == "netadmin@educause.edu"
+
+#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 == "Information Technology\nEDUCAUSE"
+ should: %s[0].organization == nil
+ should: %s[0].address == "4772 Walnut Street\nSte 206"
+ should: %s[0].city == "Boulder"
+ should: %s[0].zip == "80301"
+ should: %s[0].state == "CO"
+ should: %s[0].country == "UNITED STATES"
+ should: %s[0].country_code == nil
+ should: %s[0].phone == "(303) 449-4430"
+ should: %s[0].fax == nil
+ should: %s[0].email == "netadmin@educause.edu"
#nameservers
View
44 spec/whois/record/parser/responses/whois.educause.edu/property_contact_registrant_spec.rb
@@ -0,0 +1,44 @@
+# 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.educause.edu/property_contact_registrant.expected
+#
+# and regenerate the tests with the following rake task
+#
+# $ rake spec:generate
+#
+
+require 'spec_helper'
+require 'whois/record/parser/whois.educause.edu.rb'
+
+describe Whois::Record::Parser::WhoisEducauseEdu, "property_contact_registrant.expected" do
+
+ before(:each) do
+ file = fixture("responses", "whois.educause.edu/property_contact_registrant.txt")
+ part = Whois::Record::Part.new(:body => File.read(file))
+ @parser = klass.new(part)
+ 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 == nil
+ @parser.registrant_contacts[0].organization.should == "North Idaho College"
+ @parser.registrant_contacts[0].address.should == "1000 W. Garden Avenue"
+ @parser.registrant_contacts[0].city.should == "Coeur d'Alene"
+ @parser.registrant_contacts[0].zip.should == "83814"
+ @parser.registrant_contacts[0].state.should == "ID"
+ @parser.registrant_contacts[0].country.should == "UNITED STATES"
+ @parser.registrant_contacts[0].country_code.should == nil
+ @parser.registrant_contacts[0].phone.should == nil
+ @parser.registrant_contacts[0].fax.should == nil
+ @parser.registrant_contacts[0].email.should == nil
+ end
+ end
+end
View
44 ...ord/parser/responses/whois.educause.edu/property_contact_registrant_with_additional_organization_spec.rb
@@ -0,0 +1,44 @@
+# 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.educause.edu/property_contact_registrant_with_additional_organization.expected
+#
+# and regenerate the tests with the following rake task
+#
+# $ rake spec:generate
+#
+
+require 'spec_helper'
+require 'whois/record/parser/whois.educause.edu.rb'
+
+describe Whois::Record::Parser::WhoisEducauseEdu, "property_contact_registrant_with_additional_organization.expected" do
+
+ before(:each) do
+ file = fixture("responses", "whois.educause.edu/property_contact_registrant_with_additional_organization.txt")
+ part = Whois::Record::Part.new(:body => File.read(file))
+ @parser = klass.new(part)
+ 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 == nil
+ @parser.registrant_contacts[0].organization.should == "Harvard University"
+ @parser.registrant_contacts[0].address.should == "HUIT Network Services\n60 Oxford Street"
+ @parser.registrant_contacts[0].city.should == "Cambridge"
+ @parser.registrant_contacts[0].zip.should == "02138"
+ @parser.registrant_contacts[0].state.should == "MA"
+ @parser.registrant_contacts[0].country.should == "UNITED STATES"
+ @parser.registrant_contacts[0].country_code.should == nil
+ @parser.registrant_contacts[0].phone.should == nil
+ @parser.registrant_contacts[0].fax.should == nil
+ @parser.registrant_contacts[0].email.should == nil
+ end
+ end
+end
View
44 spec/whois/record/parser/responses/whois.educause.edu/property_contact_registrant_without_address_spec.rb
@@ -0,0 +1,44 @@
+# 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.educause.edu/property_contact_registrant_without_address.expected
+#
+# and regenerate the tests with the following rake task
+#
+# $ rake spec:generate
+#
+
+require 'spec_helper'
+require 'whois/record/parser/whois.educause.edu.rb'
+
+describe Whois::Record::Parser::WhoisEducauseEdu, "property_contact_registrant_without_address.expected" do
+
+ before(:each) do
+ file = fixture("responses", "whois.educause.edu/property_contact_registrant_without_address.txt")
+ part = Whois::Record::Part.new(:body => File.read(file))
+ @parser = klass.new(part)
+ 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 == nil
+ @parser.registrant_contacts[0].organization.should == "Massachusetts Institute of Technology"
+ @parser.registrant_contacts[0].address.should == nil
+ @parser.registrant_contacts[0].city.should == "Cambridge"
+ @parser.registrant_contacts[0].zip.should == "02139"
+ @parser.registrant_contacts[0].state.should == "MA"
+ @parser.registrant_contacts[0].country.should == "UNITED STATES"
+ @parser.registrant_contacts[0].country_code.should == nil
+ @parser.registrant_contacts[0].phone.should == nil
+ @parser.registrant_contacts[0].fax.should == nil
+ @parser.registrant_contacts[0].email.should == nil
+ end
+ end
+end
View
44 spec/whois/record/parser/responses/whois.educause.edu/property_contact_registrant_without_zip_spec.rb
@@ -0,0 +1,44 @@
+# 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.educause.edu/property_contact_registrant_without_zip.expected
+#
+# and regenerate the tests with the following rake task
+#
+# $ rake spec:generate
+#
+
+require 'spec_helper'
+require 'whois/record/parser/whois.educause.edu.rb'
+
+describe Whois::Record::Parser::WhoisEducauseEdu, "property_contact_registrant_without_zip.expected" do
+
+ before(:each) do
+ file = fixture("responses", "whois.educause.edu/property_contact_registrant_without_zip.txt")
+ part = Whois::Record::Part.new(:body => File.read(file))
+ @parser = klass.new(part)
+ 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 == nil
+ @parser.registrant_contacts[0].organization.should == "The American University of the Caribbean School of Medicine"
+ @parser.registrant_contacts[0].address.should == "c/o Campbell Corporate Services, Ltd.\nScotiabank Building, P. O. Box 268"
+ @parser.registrant_contacts[0].city.should == "Grand Cayman"
+ @parser.registrant_contacts[0].zip.should == nil
+ @parser.registrant_contacts[0].state.should == nil
+ @parser.registrant_contacts[0].country.should == "CAYMAN ISLANDS"
+ @parser.registrant_contacts[0].country_code.should == nil
+ @parser.registrant_contacts[0].phone.should == nil
+ @parser.registrant_contacts[0].fax.should == nil
+ @parser.registrant_contacts[0].email.should == nil
+ end
+ end
+end
View
43 spec/whois/record/parser/responses/whois.educause.edu/property_contacts_case1_spec.rb
@@ -0,0 +1,43 @@
+# 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.educause.edu/property_contacts_case1.expected
+#
+# and regenerate the tests with the following rake task
+#
+# $ rake spec:generate
+#
+
+require 'spec_helper'
+require 'whois/record/parser/whois.educause.edu.rb'
+
+describe Whois::Record::Parser::WhoisEducauseEdu, "property_contacts_case1.expected" do
+
+ before(:each) do
+ file = fixture("responses", "whois.educause.edu/property_contacts_case1.txt")
+ part = Whois::Record::Part.new(:body => File.read(file))
+ @parser = klass.new(part)
+ 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].id.should == nil
+ @parser.technical_contacts[0].name.should == "Information Technology\nEDUCAUSE"
+ @parser.technical_contacts[0].organization.should == nil
+ @parser.technical_contacts[0].address.should == "4772 Walnut Street\nSte 206"
+ @parser.technical_contacts[0].city.should == "Boulder"
+ @parser.technical_contacts[0].zip.should == "80301"
+ @parser.technical_contacts[0].state.should == "CO"
+ @parser.technical_contacts[0].country.should == "UNITED STATES"
+ @parser.technical_contacts[0].country_code.should == nil
+ @parser.technical_contacts[0].phone.should == "(303) 449-4430"
+ @parser.technical_contacts[0].fax.should == nil
+ @parser.technical_contacts[0].email.should == "netadmin@educause.edu"
+ end
+ end
+end
View
43 spec/whois/record/parser/responses/whois.educause.edu/property_contacts_case2_spec.rb
@@ -0,0 +1,43 @@
+# 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.educause.edu/property_contacts_case2.expected
+#
+# and regenerate the tests with the following rake task
+#
+# $ rake spec:generate
+#
+
+require 'spec_helper'
+require 'whois/record/parser/whois.educause.edu.rb'
+
+describe Whois::Record::Parser::WhoisEducauseEdu, "property_contacts_case2.expected" do
+
+ before(:each) do
+ file = fixture("responses", "whois.educause.edu/property_contacts_case2.txt")
+ part = Whois::Record::Part.new(:body => File.read(file))
+ @parser = klass.new(part)
+ 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].id.should == nil
+ @parser.technical_contacts[0].name.should == "Domain Admin\nStanford University"
+ @parser.technical_contacts[0].organization.should == nil
+ @parser.technical_contacts[0].address.should == "241 Panama Street Pine Hall, Room 115"
+ @parser.technical_contacts[0].city.should == "Stanford"
+ @parser.technical_contacts[0].zip.should == "94305-4122"
+ @parser.technical_contacts[0].state.should == "CA"
+ @parser.technical_contacts[0].country.should == "UNITED STATES"
+ @parser.technical_contacts[0].country_code.should == nil
+ @parser.technical_contacts[0].phone.should == "(650) 723-4328"
+ @parser.technical_contacts[0].fax.should == nil
+ @parser.technical_contacts[0].email.should == "sunet-admin@stanford.edu"
+ end
+ end
+end
View
43 spec/whois/record/parser/responses/whois.educause.edu/property_contacts_case3_spec.rb
@@ -0,0 +1,43 @@
+# 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.educause.edu/property_contacts_case3.expected
+#
+# and regenerate the tests with the following rake task
+#
+# $ rake spec:generate
+#
+
+require 'spec_helper'
+require 'whois/record/parser/whois.educause.edu.rb'
+
+describe Whois::Record::Parser::WhoisEducauseEdu, "property_contacts_case3.expected" do
+
+ before(:each) do
+ file = fixture("responses", "whois.educause.edu/property_contacts_case3.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].id.should == nil
+ @parser.admin_contacts[0].name.should == "Tracy L. Smith\nUniversity of Illinois at Urbana-Champaign\nCITES 2105 Digital Computer Laboratory"
+ @parser.admin_contacts[0].organization.should == nil
+ @parser.admin_contacts[0].address.should == "1304 West Springfield Avenue"
+ @parser.admin_contacts[0].city.should == "Urbana"
+ @parser.admin_contacts[0].zip.should == "61801-4399"
+ @parser.admin_contacts[0].state.should == "IL"
+ @parser.admin_contacts[0].country.should == "UNITED STATES"
+ @parser.admin_contacts[0].country_code.should == nil
+ @parser.admin_contacts[0].phone.should == "(217) 244-2032"
+ @parser.admin_contacts[0].fax.should == nil
+ @parser.admin_contacts[0].email.should == "edu-admin@listserv.illinois.edu"
+ end
+ end
+end
View
43 spec/whois/record/parser/responses/whois.educause.edu/property_contacts_spec.rb
@@ -0,0 +1,43 @@
+# 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.educause.edu/property_contacts.expected
+#
+# and regenerate the tests with the following rake task
+#
+# $ rake spec:generate
+#
+
+require 'spec_helper'
+require 'whois/record/parser/whois.educause.edu.rb'
+
+describe Whois::Record::Parser::WhoisEducauseEdu, "property_contacts.expected" do
+
+ before(:each) do
+ file = fixture("responses", "whois.educause.edu/property_contacts.txt")
+ part = Whois::Record::Part.new(:body => File.read(file))
+ @parser = klass.new(part)
+ 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].id.should == nil
+ @parser.technical_contacts[0].name.should == "Dennis L Noordam\nWindows System Administrator\nNorth Idaho College"
+ @parser.technical_contacts[0].organization.should == nil
+ @parser.technical_contacts[0].address.should == "1000 W. Garden Avenue"
+ @parser.technical_contacts[0].city.should == "Coeur d Alene"
+ @parser.technical_contacts[0].zip.should == "83814"
+ @parser.technical_contacts[0].state.should == "ID"
+ @parser.technical_contacts[0].country.should == "UNITED STATES"
+ @parser.technical_contacts[0].country_code.should == nil
+ @parser.technical_contacts[0].phone.should == "(208) 769-7860"
+ @parser.technical_contacts[0].fax.should == nil
+ @parser.technical_contacts[0].email.should == "dlnoordam@nic.edu"
+ end
+ end
+end
View
38 spec/whois/record/parser/responses/whois.educause.edu/property_registrant_without_address_spec.rb
@@ -1,38 +0,0 @@
-# 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.educause.edu/property_registrant_without_address.expected
-#
-# and regenerate the tests with the following rake task
-#
-# $ rake spec:generate
-#
-
-require 'spec_helper'
-require 'whois/record/parser/whois.educause.edu.rb'
-
-describe Whois::Record::Parser::WhoisEducauseEdu, "property_registrant_without_address.expected" do
-
- before(:each) do
- file = fixture("responses", "whois.educause.edu/property_registrant_without_address.txt")
- part = Whois::Record::Part.new(:body => File.read(file))
- @parser = klass.new(part)
- 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 == nil
- @parser.registrant_contacts[0].organization.should == "Massachusetts Institute of Technology"
- @parser.registrant_contacts[0].city.should == "Cambridge"
- @parser.registrant_contacts[0].zip.should == "02139"
- @parser.registrant_contacts[0].state.should == "MA"
- @parser.registrant_contacts[0].country.should == "UNITED STATES"
- end
- end
-end
View
39 spec/whois/record/parser/responses/whois.educause.edu/property_registrant_without_zip_spec.rb
@@ -1,39 +0,0 @@
-# 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.educause.edu/property_registrant_without_zip.expected
-#
-# and regenerate the tests with the following rake task
-#
-# $ rake spec:generate
-#
-
-require 'spec_helper'
-require 'whois/record/parser/whois.educause.edu.rb'
-
-describe Whois::Record::Parser::WhoisEducauseEdu, "property_registrant_without_zip.expected" do
-
- before(:each) do
- file = fixture("responses", "whois.educause.edu/property_registrant_without_zip.txt")
- part = Whois::Record::Part.new(:body => File.read(file))
- @parser = klass.new(part)
- 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 == nil
- @parser.registrant_contacts[0].organization.should == "The American University of the Caribbean School of Medicine"
- @parser.registrant_contacts[0].address.should == "c/o Campbell Corporate Services, Ltd.\nScotiabank Building, P. O. Box 268"
- @parser.registrant_contacts[0].city.should == "Grand Cayman"
- @parser.registrant_contacts[0].zip.should == nil
- @parser.registrant_contacts[0].state.should == nil
- @parser.registrant_contacts[0].country.should == "CAYMAN ISLANDS"
- end
- end
-end
View
18 spec/whois/record/parser/responses/whois.educause.edu/status_available_spec.rb
@@ -81,6 +81,24 @@
lambda { @parser.registrar }.should raise_error(Whois::PropertyNotSupported)
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)
View
61 spec/whois/record/parser/responses/whois.educause.edu/status_registered_spec.rb
@@ -89,14 +89,59 @@
@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 == nil
- @parser.registrant_contacts[0].organization.should == "EDUCAUSE"
- @parser.registrant_contacts[0].address.should == "4772 Walnut Street\nSuite 206"
- @parser.registrant_contacts[0].city.should == "Boulder"
- @parser.registrant_contacts[0].zip.should == "80301"
- @parser.registrant_contacts[0].state.should == "CO"
- @parser.registrant_contacts[0].country.should == "UNITED STATES"
+ @parser.registrant_contacts[0].type.should == Whois::Record::Contact::TYPE_REGISTRANT
+ @parser.registrant_contacts[0].id.should == nil
+ @parser.registrant_contacts[0].name.should == nil
+ @parser.registrant_contacts[0].organization.should == "EDUCAUSE"
+ @parser.registrant_contacts[0].address.should == "4772 Walnut Street\nSuite 206"
+ @parser.registrant_contacts[0].city.should == "Boulder"
+ @parser.registrant_contacts[0].zip.should == "80301"
+ @parser.registrant_contacts[0].state.should == "CO"
+ @parser.registrant_contacts[0].country.should == "UNITED STATES"
+ @parser.registrant_contacts[0].country_code.should == nil
+ @parser.registrant_contacts[0].phone.should == nil
+ @parser.registrant_contacts[0].fax.should == nil
+ @parser.registrant_contacts[0].email.should == nil
+ 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 == "Information Technology\nEDUCAUSE"
+ @parser.admin_contacts[0].organization.should == nil
+ @parser.admin_contacts[0].address.should == "4772 Walnut Street\nSte 206"
+ @parser.admin_contacts[0].city.should == "Boulder"
+ @parser.admin_contacts[0].zip.should == "80301"
+ @parser.admin_contacts[0].state.should == "CO"
+ @parser.admin_contacts[0].country.should == "UNITED STATES"
+ @parser.admin_contacts[0].country_code.should == nil
+ @parser.admin_contacts[0].phone.should == "(303) 449-4430"
+ @parser.admin_contacts[0].fax.should == nil
+ @parser.admin_contacts[0].email.should == "netadmin@educause.edu"
+ 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 == "Information Technology\nEDUCAUSE"
+ @parser.technical_contacts[0].organization.should == nil
+ @parser.technical_contacts[0].address.should == "4772 Walnut Street\nSte 206"
+ @parser.technical_contacts[0].city.should == "Boulder"
+ @parser.technical_contacts[0].zip.should == "80301"
+ @parser.technical_contacts[0].state.should == "CO"
+ @parser.technical_contacts[0].country.should == "UNITED STATES"
+ @parser.technical_contacts[0].country_code.should == nil
+ @parser.technical_contacts[0].phone.should == "(303) 449-4430"
+ @parser.technical_contacts[0].fax.should == nil
+ @parser.technical_contacts[0].email.should == "netadmin@educause.edu"
end
end
describe "#nameservers" do
View
4 tasks/spec.rake
@@ -91,7 +91,9 @@ end
line.chomp!
case line
when ""
- # skip blank lines
+ # skip empty line
+ when /^\s*\/\//
+ # skip comment line
when /^#([^\s]+)/
tests[match = $1] = []
when /^\s+(.+?): (.+?) (.+)/
Please sign in to comment.
Something went wrong with that request. Please try again.