Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Changed whois.publicinterestregistry.com to whois.pir.org (closes GH-176

)
  • Loading branch information...
commit 5ca9efe9a93336658996dff8bca7c0dac0f25357 1 parent a4b90cc
@weppos authored
Showing with 65 additions and 39 deletions.
  1. +3 −1 CHANGELOG.md
  2. +1 −1  lib/whois/definitions/tlds.rb
  3. +43 −0 lib/whois/record/parser/whois.pir.org.rb
  4. +5 −25 lib/whois/record/parser/whois.publicinterestregistry.net.rb
  5. 0  spec/fixtures/responses/{whois.publicinterestregistry.net → whois.pir.org}/response_throttled.expected
  6. 0  spec/fixtures/responses/{whois.publicinterestregistry.net → whois.pir.org}/response_throttled.txt
  7. 0  spec/fixtures/responses/{whois.publicinterestregistry.net → whois.pir.org}/status_available.expected
  8. 0  spec/fixtures/responses/{whois.publicinterestregistry.net → whois.pir.org}/status_available.txt
  9. 0  spec/fixtures/responses/{whois.publicinterestregistry.net → whois.pir.org}/status_registered.expected
  10. 0  spec/fixtures/responses/{whois.publicinterestregistry.net → whois.pir.org}/status_registered.txt
  11. +1 −0  spec/fixtures/responses/whois.publicinterestregistry.net
  12. +4 −4 .../record/parser/responses/{whois.publicinterestregistry.net → whois.pir.org}/response_throttled_spec.rb
  13. +4 −4 ...is/record/parser/responses/{whois.publicinterestregistry.net → whois.pir.org}/status_available_spec.rb
  14. +4 −4 ...s/record/parser/responses/{whois.publicinterestregistry.net → whois.pir.org}/status_registered_spec.rb
View
4 CHANGELOG.md
@@ -4,7 +4,7 @@
* SERVER: Added .CW TLD server.
-* SERVER: Updated .GR TLD server.
+* SERVER: Updated .GR, .ORG (GH-176) TLD server.
* SERVER: Added .XN--MGBA3A4F16A (ایران., Iran) IDN TLD server.
@@ -14,6 +14,8 @@
* CHANGE: Removed Pir adaper, the registry is a thick whois server.
+* CHANGE: Changed whois.publicinterestregistry.com to whois.pir.org (GH-176).
+
## Release 2.6.3
View
2  lib/whois/definitions/tlds.rb
@@ -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"
+Whois::Server.define :tld, ".org", "whois.pir.org"
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
43 lib/whois/record/parser/whois.pir.org.rb
@@ -0,0 +1,43 @@
+#--
+# Ruby Whois
+#
+# An intelligent pure Ruby WHOIS client and parser.
+#
+# Copyright (c) 2009-2012 Simone Carletti <weppos@weppos.net>
+#++
+
+
+require 'whois/record/parser/base_afilias'
+
+
+module Whois
+ class Record
+ class Parser
+
+ # Parser for the whois.pir.org server.
+ class WhoisPirOrg < BaseAfilias
+
+ # Checks whether the response has been throttled.
+ #
+ # @return [Boolean]
+ #
+ # @example
+ # WHOIS LIMIT EXCEEDED - SEE WWW.PIR.ORG/WHOIS FOR DETAILS
+ #
+ def response_throttled?
+ !!node("response:throttled")
+ end
+
+ private
+
+ def decompose_registrar(value)
+ if value =~ /(.+?) \((.+?)\)/
+ [$2, $1]
+ end
+ end
+
+ end
+
+ end
+ end
+end
View
30 lib/whois/record/parser/whois.publicinterestregistry.net.rb
@@ -7,37 +7,17 @@
#++
-require 'whois/record/parser/base_afilias'
+require 'whois/record/parser/whois.pir.org.rb'
module Whois
class Record
class Parser
- # Parser for the whois.publicinternetregistry.net server.
- class WhoisPublicinterestregistryNet < BaseAfilias
-
- # Checks whether the response has been throttled.
- #
- # @return [Boolean]
- #
- # @example
- # WHOIS LIMIT EXCEEDED - SEE WWW.PIR.ORG/WHOIS FOR DETAILS
- #
- def response_throttled?
- !!node("response:throttled")
- end
-
- private
-
- def decompose_registrar(value)
- if value =~ /(.+?) \((.+?)\)/
- [$2, $1]
- end
- end
-
- end
+ # Parser for the <tt>whois.publicinterestregistry.net</tt> server.
+ # Aliases the <tt>whois.pir.org</tt> parser.
+ WhoisPublicinterestregistryNet = WhoisPirOrg
end
end
-end
+end
View
0  ...cinterestregistry.net/response_throttled.expected → ...sponses/whois.pir.org/response_throttled.expected
File renamed without changes
View
0  ...publicinterestregistry.net/response_throttled.txt → ...es/responses/whois.pir.org/response_throttled.txt
File renamed without changes
View
0  ...licinterestregistry.net/status_available.expected → ...responses/whois.pir.org/status_available.expected
File renamed without changes
View
0  ...s.publicinterestregistry.net/status_available.txt → ...ures/responses/whois.pir.org/status_available.txt
File renamed without changes
View
0  ...icinterestregistry.net/status_registered.expected → ...esponses/whois.pir.org/status_registered.expected
File renamed without changes
View
0  ....publicinterestregistry.net/status_registered.txt → ...res/responses/whois.pir.org/status_registered.txt
File renamed without changes
View
1  spec/fixtures/responses/whois.publicinterestregistry.net
View
8 ...icinterestregistry.net/response_throttled_spec.rb → ...esponses/whois.pir.org/response_throttled_spec.rb
@@ -3,7 +3,7 @@
# This file is autogenerated. Do not edit it manually.
# If you want change the content of this file, edit
#
-# /spec/fixtures/responses/whois.publicinterestregistry.net/response_throttled.expected
+# /spec/fixtures/responses/whois.pir.org/response_throttled.expected
#
# and regenerate the tests with the following rake task
#
@@ -11,12 +11,12 @@
#
require 'spec_helper'
-require 'whois/record/parser/whois.publicinterestregistry.net.rb'
+require 'whois/record/parser/whois.pir.org.rb'
-describe Whois::Record::Parser::WhoisPublicinterestregistryNet, "response_throttled.expected" do
+describe Whois::Record::Parser::WhoisPirOrg, "response_throttled.expected" do
before(:each) do
- file = fixture("responses", "whois.publicinterestregistry.net/response_throttled.txt")
+ file = fixture("responses", "whois.pir.org/response_throttled.txt")
part = Whois::Record::Part.new(:body => File.read(file))
@parser = klass.new(part)
end
View
8 ...blicinterestregistry.net/status_available_spec.rb → .../responses/whois.pir.org/status_available_spec.rb
@@ -3,7 +3,7 @@
# This file is autogenerated. Do not edit it manually.
# If you want change the content of this file, edit
#
-# /spec/fixtures/responses/whois.publicinterestregistry.net/status_available.expected
+# /spec/fixtures/responses/whois.pir.org/status_available.expected
#
# and regenerate the tests with the following rake task
#
@@ -11,12 +11,12 @@
#
require 'spec_helper'
-require 'whois/record/parser/whois.publicinterestregistry.net.rb'
+require 'whois/record/parser/whois.pir.org.rb'
-describe Whois::Record::Parser::WhoisPublicinterestregistryNet, "status_available.expected" do
+describe Whois::Record::Parser::WhoisPirOrg, "status_available.expected" do
before(:each) do
- file = fixture("responses", "whois.publicinterestregistry.net/status_available.txt")
+ file = fixture("responses", "whois.pir.org/status_available.txt")
part = Whois::Record::Part.new(:body => File.read(file))
@parser = klass.new(part)
end
View
8 ...licinterestregistry.net/status_registered_spec.rb → ...responses/whois.pir.org/status_registered_spec.rb
@@ -3,7 +3,7 @@
# This file is autogenerated. Do not edit it manually.
# If you want change the content of this file, edit
#
-# /spec/fixtures/responses/whois.publicinterestregistry.net/status_registered.expected
+# /spec/fixtures/responses/whois.pir.org/status_registered.expected
#
# and regenerate the tests with the following rake task
#
@@ -11,12 +11,12 @@
#
require 'spec_helper'
-require 'whois/record/parser/whois.publicinterestregistry.net.rb'
+require 'whois/record/parser/whois.pir.org.rb'
-describe Whois::Record::Parser::WhoisPublicinterestregistryNet, "status_registered.expected" do
+describe Whois::Record::Parser::WhoisPirOrg, "status_registered.expected" do
before(:each) do
- file = fixture("responses", "whois.publicinterestregistry.net/status_registered.txt")
+ file = fixture("responses", "whois.pir.org/status_registered.txt")
part = Whois::Record::Part.new(:body => File.read(file))
@parser = klass.new(part)
end
Please sign in to comment.
Something went wrong with that request. Please try again.