Permalink
Browse files

Removed Pir adaper, the registry is a thick whois server.

  • Loading branch information...
1 parent 0f6c108 commit a4b90cc8316ff12213818aee8ca459b445c96d16 @weppos committed Jul 3, 2012
View
@@ -12,6 +12,8 @@
* CHANGE: Deprecated options[:web] for :web adapter in favor of options[:url].
+* CHANGE: Removed Pir adaper, the registry is a thick whois server.
+
## Release 2.6.3
@@ -28,7 +28,7 @@
Whois::Server.define :tld, ".net", "whois.crsnic.net", { :adapter => :verisign }
Whois::Server.define :tld, ".eu.org", "whois.eu.org"
Whois::Server.define :tld, ".za.org", "whois.za.org"
-Whois::Server.define :tld, ".org", "whois.publicinterestregistry.net", { :adapter => :pir }
+Whois::Server.define :tld, ".org", "whois.publicinterestregistry.net"
Whois::Server.define :tld, ".edu", "whois.educause.edu"
Whois::Server.define :tld, ".gov", "whois.nic.gov"
Whois::Server.define :tld, ".int", "whois.iana.org"
View
@@ -29,7 +29,6 @@ module Adapters
autoload :Formatted, "whois/server/adapters/formatted"
autoload :None, "whois/server/adapters/none"
autoload :NotImplemented, "whois/server/adapters/not_implemented"
- autoload :Pir, "whois/server/adapters/pir"
autoload :Standard, "whois/server/adapters/standard"
autoload :Verisign, "whois/server/adapters/verisign"
autoload :Web, "whois/server/adapters/web"
@@ -1,57 +0,0 @@
-#--
-# Ruby Whois
-#
-# An intelligent pure Ruby WHOIS client and parser.
-#
-# Copyright (c) 2009-2012 Simone Carletti <weppos@weppos.net>
-#++
-
-
-module Whois
- class Server
- module Adapters
-
- #
- # = Public Internet Registry (PIR) Adapter
- #
- # Provides ability to query PIR WHOIS interfaces.
- #
- # The following WHOIS servers are currently known
- # to require the Pir adapter:
- #
- # - whois.publicinterestregistry.net
- #
- class Pir < Base
-
- # Executes a WHOIS query to the PIR WHOIS interface,
- # resolving any intermediate referral,
- # and appends the response to the client buffer.
- #
- # @param [String] string
- # @return [void]
- #
- def request(string)
- response = query_the_socket("FULL #{string}", host)
- buffer_append response, host
-
- if endpoint = extract_referral(response)
- response = query_the_socket(string, endpoint)
- buffer_append response, endpoint
- end
- end
-
-
- private
-
- def extract_referral(response)
- if response =~ /Registrant Name:SEE SPONSORING REGISTRAR/ &&
- response =~ /Registrant Street1:Whois Server:(\S+)/
- $1
- end
- end
-
- end
-
- end
- end
-end
@@ -1,84 +0,0 @@
-NOTICE: Access to .ORG WHOIS information is provided to assist persons in
-determining the contents of a domain name registration record in the Public Interest Registry
-registry database. The data in this record is provided by Public Interest Registry
-for informational purposes only, and Public Interest Registry does not guarantee its
-accuracy. This service is intended only for query-based access. 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
-Registry Operator or any ICANN-Accredited Registrar, except as reasonably
-necessary to register domain names or modify existing registrations. All
-rights reserved. Public Interest Registry reserves the right to modify these terms at any
-time. By submitting this query, you agree to abide by this policy.
-
-Domain ID:D593840-LROR
-Domain Name:Z.ORG
-Created On:01-Dec-1993 05:00:00 UTC
-Last Updated On:09-Dec-2002 13:14:08 UTC
-Expiration Date:08-Dec-2003 17:05:15 UTC
-Sponsoring Registrar:Internet Assigned Numbers Authority (IANA) (R193-LROR)
-Status:INACTIVE
-Status:DELETE PROHIBITED
-Status:RENEW PROHIBITED
-Status:TRANSFER PROHIBITED
-Status:UPDATE PROHIBITED
-Registrant ID:193-C
-Registrant Name:SEE SPONSORING REGISTRAR
-Registrant Street1:Whois Server:whois.iana.org
-Registrant Street2:Referral URL:res-dom.iana.org
-Registrant Street3:
-Registrant City:N/A
-Registrant State/Province:
-Registrant Postal Code:N/A
-Registrant Country:CA
-Registrant Phone:
-Registrant Phone Ext.:
-Registrant FAX:
-Registrant FAX Ext.:
-Registrant Email:not@available.org
-Admin ID:193-C
-Admin Name:SEE SPONSORING REGISTRAR
-Admin Street1:Whois Server:whois.iana.org
-Admin Street2:Referral URL:res-dom.iana.org
-Admin Street3:
-Admin City:N/A
-Admin State/Province:
-Admin Postal Code:N/A
-Admin Country:CA
-Admin Phone:
-Admin Phone Ext.:
-Admin FAX:
-Admin FAX Ext.:
-Admin Email:not@available.org
-Tech ID:193-C
-Tech Name:SEE SPONSORING REGISTRAR
-Tech Street1:Whois Server:whois.iana.org
-Tech Street2:Referral URL:res-dom.iana.org
-Tech Street3:
-Tech City:N/A
-Tech State/Province:
-Tech Postal Code:N/A
-Tech Country:CA
-Tech Phone:
-Tech Phone Ext.:
-Tech FAX:
-Tech FAX Ext.:
-Tech Email:not@available.org
-Name Server:
-Name Server:
-Name Server:
-Name Server:
-Name Server:
-Name Server:
-Name Server:
-Name Server:
-Name Server:
-Name Server:
-Name Server:
-Name Server:
-Name Server:
-
-
@@ -1,41 +0,0 @@
-require "spec_helper"
-
-describe Whois::Server::Adapters::Pir do
-
- before(:each) do
- @definition = [:tld, ".test", "whois.publicinterestregistry.net", {}]
- @server = klass.new(*@definition)
- end
-
-
- describe "#query" do
- context "without referral" do
- it "returns the WHOIS record" do
- response = "No match for DOMAIN.TEST."
- expected = response
- @server.expects(:ask_the_socket).with("FULL domain.test", "whois.publicinterestregistry.net", 43).returns(response)
-
- record = @server.query("domain.test")
- record.to_s.should == expected
- record.parts.should have(1).part
- record.parts.should == [Whois::Record::Part.new(:body => response, :host => "whois.publicinterestregistry.net")]
- end
- end
-
- context "with referral" do
- it "follows all referrals" do
- referral = File.read(fixture("referrals/pir.org.txt"))
- response = "Match for DOMAIN.TEST."
- expected = referral + "\n" + response
- @server.expects(:ask_the_socket).with("FULL domain.test", "whois.publicinterestregistry.net", 43).returns(referral)
- @server.expects(:ask_the_socket).with("domain.test", "whois.iana.org", 43).returns(response)
-
- record = @server.query("domain.test")
- record.to_s.should == expected
- record.parts.should have(2).parts
- record.parts.should == [Whois::Record::Part.new(:body => referral, :host => "whois.publicinterestregistry.net"), Whois::Record::Part.new(:body => response, :host => "whois.iana.org")]
- end
- end
- end
-
-end

0 comments on commit a4b90cc

Please sign in to comment.