Permalink
Browse files

Temporary remove whois.tucows.com parser.

  • Loading branch information...
1 parent 1d394f3 commit ba74a56c9df2d2bf5711adc347e5c2496b03bee2 @weppos committed Sep 13, 2012
Showing with 0 additions and 1,163 deletions.
  1. +0 −2 CHANGELOG.md
  2. +0 −133 lib/whois/record/parser/whois.tucows.com.rb
  3. +0 −15 spec/fixtures/responses/whois.tucows.com/property_contacts_1.expected
  4. +0 −82 spec/fixtures/responses/whois.tucows.com/property_contacts_1.txt
  5. +0 −15 spec/fixtures/responses/whois.tucows.com/property_contacts_2.expected
  6. +0 −81 spec/fixtures/responses/whois.tucows.com/property_contacts_2.txt
  7. +0 −15 spec/fixtures/responses/whois.tucows.com/property_contacts_3.expected
  8. +0 −86 spec/fixtures/responses/whois.tucows.com/property_contacts_3.txt
  9. +0 −31 spec/fixtures/responses/whois.tucows.com/property_contacts_4.expected
  10. +0 −83 spec/fixtures/responses/whois.tucows.com/property_contacts_4.txt
  11. +0 −15 spec/fixtures/responses/whois.tucows.com/property_contacts_5.expected
  12. +0 −80 spec/fixtures/responses/whois.tucows.com/property_contacts_5.txt
  13. +0 −85 spec/fixtures/responses/whois.tucows.com/status_registered.expected
  14. +0 −83 spec/fixtures/responses/whois.tucows.com/status_registered.txt
  15. +0 −42 spec/whois/record/parser/responses/whois.tucows.com/property_contacts_1_spec.rb
  16. +0 −42 spec/whois/record/parser/responses/whois.tucows.com/property_contacts_2_spec.rb
  17. +0 −42 spec/whois/record/parser/responses/whois.tucows.com/property_contacts_3_spec.rb
  18. +0 −60 spec/whois/record/parser/responses/whois.tucows.com/property_contacts_4_spec.rb
  19. +0 −42 spec/whois/record/parser/responses/whois.tucows.com/property_contacts_5_spec.rb
  20. +0 −129 spec/whois/record/parser/responses/whois.tucows.com/status_registered_spec.rb
View
@@ -12,8 +12,6 @@
* NEW: Added full whois.register.com parser.
-* NEW: Added full whois.tucows.com parser.
-
* NEW: whois.networksolutions.com parser now recognizes throttled responses (GH-182). [Thanks @JustinCampbell]
* NEW: Added full whois.cmc.iq parser (GH-171).
@@ -1,133 +0,0 @@
-#--
-# Ruby Whois
-#
-# An intelligent pure Ruby WHOIS client and parser.
-#
-# Copyright (c) 2009-2012 Simone Carletti <weppos@weppos.net>
-#++
-
-
-require 'whois/record/parser/base'
-
-
-module Whois
- class Record
- class Parser
-
- # Parser for the whois.tucows.com server.
- #
- # @see Whois::Record::Parser::Example
- # The Example parser for the list of all available methods.
- class WhoisTucowsCom < Base
-
- property_not_supported :status
-
- # The server is contacted only in case of a registered domain.
- property_supported :available? do
- false
- end
-
- property_supported :registered? do
- !available?
- end
-
-
- property_supported :created_on do
- if content_for_scanner =~ /Record created on (.+)\.\n/
- Time.parse($1)
- end
- end
-
- property_supported :updated_on do
- if content_for_scanner =~ /Record last updated on (.+)\.\n/
- Time.parse($1)
- end
- end
-
- property_supported :expires_on do
- if content_for_scanner =~ /Record expires on (.+)\.\n/
- Time.parse($1)
- end
- end
-
-
- property_supported :registrar do
- Record::Registrar.new(
- :name => 'Tucows',
- :organization => 'Tucows',
- :url => 'http://www.tucows.com/'
- )
- end
-
- property_supported :registrant_contacts do
- build_contact('Registrant:', Record::Contact::TYPE_REGISTRANT)
- end
-
- property_supported :admin_contacts do
- build_contact('Administrative Contact', Record::Contact::TYPE_ADMIN)
- end
-
- property_supported :technical_contacts do
- build_contact('Technical Contact', Record::Contact::TYPE_TECHNICAL)
- end
-
-
- property_supported :nameservers do
- if content_for_scanner =~ /Domain servers in listed order:\n((.+\n)+)\n/
- $1.split("\n").map do |line|
- Record::Nameserver.new(:name => line.strip.downcase)
- end
- end
- end
-
-
- private
-
- def build_contact(element, type)
- indent = type == Record::Contact::TYPE_REGISTRANT ? 1 : 4
- match = content_for_scanner.slice(/#{element}.*\n((#{' ' * indent}.+\n)+)/, 1)
- return unless match
-
- # 0 Almahdi, Ahmad alatol@yahoo.com
- # 1 1-183 Carroll Street
- # 2 Dunedin, 9001
- # 3 NZ
- # 4 +1.6434701257
-
- lines = $1.split("\n")
- items = lines.dup
-
- name, email = if items[0].index('@')
- items.delete_at(0).scan(/(.+) (.*)/).first.map(&:strip)
- else
- items.delete_at(0).strip
- end
-
- phone, fax = if items[-1] =~ /^\s+.{3,}/
- items.delete_at(-1).match(/\s+(.+?)\s*(?:Fax: (.+))?$/).to_a[1,2]
- end
-
- country = items.delete_at(-1).strip
-
- city, state, zip = items.delete_at(-1).scan(/(.+?), ([^\s]*?) (.+)/).first.map(&:strip)
-
- address = items.map(&:strip).join("\n")
-
- Record::Contact.new(
- :type => type,
- :name => name,
- :organization => nil,
- :address => address,
- :city => city,
- :state => state,
- :zip => zip,
- :country_code => country,
- :email => email,
- :phone => phone,
- :fax => fax
- )
- end
- end
- end
- end
-end
@@ -1,15 +0,0 @@
-#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 == "Contact Privacy Inc. Customer 0129153591,"
- should: %s[0].organization == nil
- should: %s[0].address == "96 Mowat Ave"
- should: %s[0].city == "Toronto"
- should: %s[0].zip == "M6K 3M1"
- should: %s[0].state == "ON"
- should: %s[0].country_code == "CA"
- should: %s[0].phone == "+1.4165385457"
- should: %s[0].fax == nil
- should: %s[0].email == "hairlosstalk.com@contactprivacy.com"
@@ -1,82 +0,0 @@
-Registrant:
- Contact Privacy Inc. Customer 0129153591
- 96 Mowat Ave
- Toronto, ON M6K 3M1
- CA
-
- Domain name: HAIRLOSSTALK.COM
-
-
- Administrative Contact:
- Contact Privacy Inc. Customer 0129153591, hairlosstalk.com@contactprivacy.com
- 96 Mowat Ave
- Toronto, ON M6K 3M1
- CA
- +1.4165385457
- Technical Contact:
- Contact Privacy Inc. Customer 0129153591, hairlosstalk.com@contactprivacy.com
- 96 Mowat Ave
- Toronto, ON M6K 3M1
- CA
- +1.4165385457
-
-
- Registration Service Provider:
- Hover, help@hover.com
- 416.538.5498
- http://help.hover.com
-
-
-
- Registrar of Record: TUCOWS, INC.
- Record last updated on 15-Jul-2012.
- Record expires on 01-Oct-2021.
- Record created on 01-Oct-1999.
-
- Registrar Domain Name Help Center:
- http://tucowsdomains.com
-
- Domain servers in listed order:
- NS.RACKSPACE.COM
- NS2.RACKSPACE.COM
-
-
- Domain status: clientTransferProhibited
- clientUpdateProhibited
-
-
-This domain's privacy is protected by contactprivacy.com. To reach the domain contacts, please go to http://www.contactprivacy.com and follow the instructions.
-
-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.
-
-
@@ -1,15 +0,0 @@
-#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"
@@ -1,81 +0,0 @@
-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.
-
-
@@ -1,15 +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 == "Daniel Austin"
- should: %s[0].organization == nil
- should: %s[0].address == "3 Gunnery Terrace\nMilverton"
- should: %s[0].city == "Leamington Spa"
- should: %s[0].zip == "CV32 5PE"
- should: %s[0].state == "Warwickshire"
- should: %s[0].country_code == "UK"
- should: %s[0].phone == nil
- should: %s[0].fax == nil
- should: %s[0].email == nil
Oops, something went wrong.

2 comments on commit ba74a56

@justincampbell
Contributor

@weppos Why was this removed?

@weppos
Owner
weppos commented on ba74a56 Sep 19, 2012

Tucows has one of the worst response I ever had to deal with. The contact section is highly unreliable (you can notice it by checking the number of contact_N fixtures) so I decided to remove it from the public library and test it privately. I will probably reintroduce it once it will be stable enough for production.

Please sign in to comment.