Permalink
Browse files

Remove #referral_whois and #referral_url properties

  • Loading branch information...
2 parents 3483d2e + 4b2fc17 commit ba34efdd456be36d3f23fbb6db0a904e701896d5 @weppos committed Nov 4, 2012
Showing 339 changed files with 202 additions and 3,192 deletions.
View
@@ -41,6 +41,8 @@
- CHANGED: Whois::Server#query renamed to Whois::Server#lookup
+- CHANGED: :referral_whois and :referral_url no longer exist as properties.
+
- FIXED: whois.domainregistry.ie should support status `Active - LOCKED`.
- FIXED: whois.nic.uk fails to parse registrars without URL (GH-188).
@@ -56,6 +58,13 @@
- Whois::Server#query has been renamed to Whois::Server#lookup
+- :referral_whois and :referral_url no longer exist as properties.
+ The parsers where the propertie was supported still supports the property
+ by providing a corresponding method.
+
+ However, you cannot call the method on the response anymore.
+ Instead, you have to invoke the method directly on the parser instance.
+
## Release 2.7.0
@@ -24,13 +24,13 @@ class Parser
METHODS = [
:contacts,
:changed?, :unchanged?,
- # :response_incomplete?, :response_throttled?, :response_unavailable?
+ # :response_incomplete?, :response_throttled?, :response_unavailable?,
+ # :referral_whois, :referral_url,
]
PROPERTIES = [
:disclaimer,
:domain, :domain_id,
- :referral_whois, :referral_url,
:status, :available?, :registered?,
:created_on, :updated_on, :expires_on,
:registrar,
@@ -36,11 +36,6 @@ class BaseAfilias < Base
end
- property_not_supported :referral_whois
-
- property_not_supported :referral_url
-
-
property_supported :status do
Array.wrap(node("Status"))
end
@@ -33,11 +33,6 @@ class BaseShared1 < Base
property_not_supported :domain_id
- property_not_supported :referral_whois
-
- property_not_supported :referral_url
-
-
property_supported :status do
Array.wrap(node("Status"))
end
@@ -38,11 +38,6 @@ class BaseShared2 < Base
end
- property_not_supported :referral_whois
-
- property_not_supported :referral_url
-
-
property_supported :status do
node("Domain Status")
end
@@ -51,15 +51,6 @@ class Example < Base
end
- property_supported :referral_whois do
- nil
- end
-
- property_supported :referral_url do
- nil
- end
-
-
# Gets the record status or statuses.
#
# Returns a String/Array with the record status if available,
@@ -31,17 +31,6 @@ class JobswhoisVerisignGrsCom < Base
property_not_supported :domain_id
- property_supported :referral_whois do
- node("Whois Server")
- end
-
- property_supported :referral_url do
- node("Referral URL") do |raw|
- last_useful_item(raw)
- end
- end
-
-
property_supported :status do
node("Status")
end
@@ -86,6 +75,17 @@ class JobswhoisVerisignGrsCom < Base
end
+ def referral_whois
+ node("Whois Server")
+ end
+
+ def referral_url
+ node("Referral URL") do |lines|
+ last_useful_item(lines)
+ end
+ end
+
+
# Initializes a new {Scanners::Verisign} instance
# passing the {#content_for_scanner}
# and calls +parse+ on it.
@@ -96,13 +96,13 @@ def parse
end
- protected
+ private
- # In case of "SPAM Response", the response contains more than one item
- # for the same value and the value becomes an Array.
- def last_useful_item(values)
- values.is_a?(Array) ? values.last : values
- end
+ # In case of "SPAM Response", the response contains more than one item
+ # for the same value and the value becomes an Array.
+ def last_useful_item(values)
+ values.is_a?(Array) ? values.last : values
+ end
end
@@ -36,11 +36,6 @@ class WhoisAtiTn < Base
property_not_supported :domain_id
- property_not_supported :referral_whois
-
- property_not_supported :referral_url
-
-
property_supported :status do
if available?
:available
@@ -34,11 +34,6 @@ class WhoisAudnsNetAu < Base
property_not_supported :domain_id
- property_not_supported :referral_whois
-
- property_not_supported :referral_url
-
-
# == Values for Status
#
# @see http://www.auda.org.au/policies/auda-2002-28/
@@ -33,11 +33,6 @@ class WhoisCctldBy < Base
property_not_supported :domain_id
- property_not_supported :referral_whois
-
- property_not_supported :referral_url
-
-
property_supported :status do
if available?
:available
@@ -34,11 +34,6 @@ class WhoisCentralnicCom < Base
end
- property_not_supported :referral_whois
-
- property_not_supported :referral_url
-
-
property_supported :status do
Array.wrap(node("Status"))
end
@@ -36,11 +36,6 @@ class WhoisCiraCa < Base
property_not_supported :domain_id
- property_not_supported :referral_whois
-
- property_not_supported :referral_url
-
-
property_supported :status do
if content_for_scanner =~ /Domain status:\s+(.+?)\n/
case node("Domain status", &:downcase)
@@ -32,11 +32,6 @@ class WhoisCnnicCn < Base
end
- property_not_supported :referral_whois
-
- property_not_supported :referral_url
-
-
property_supported :status do
Array.wrap node("Domain Status")
end
@@ -33,11 +33,6 @@ class WhoisCoPl < Base
property_not_supported :domain_id
- property_not_supported :referral_whois
-
- property_not_supported :referral_url
-
-
property_supported :status do
if available?
:available
@@ -29,11 +29,6 @@ class WhoisCozaNetZa < Base
property_not_supported :domain_id
- property_not_supported :referral_whois
-
- property_not_supported :referral_url
-
-
property_supported :status do
if available?
:available
@@ -31,18 +31,6 @@ class WhoisCrsnicNet < Base
property_not_supported :domain_id
-
- property_supported :referral_whois do
- node("Whois Server")
- end
-
- property_supported :referral_url do
- node("Referral URL") do |raw|
- last_useful_item(raw)
- end
- end
-
-
property_supported :status do
node("Status")
end
@@ -95,6 +83,17 @@ def response_unavailable?
!!node("response:unavailable")
end
+ def referral_whois
+ node("Whois Server")
+ end
+
+ def referral_url
+ node("Referral URL") do |lines|
+ last_useful_item(lines)
+ end
+ end
+
+
# Initializes a new {Scanners::Verisign} instance
# passing the {#content_for_scanner}
# and calls +parse+ on it.
@@ -105,7 +104,7 @@ def parse
end
- private
+ private
# In case of "SPAM Response", the response contains more than one item
# for the same value and the value becomes an Array.
@@ -34,11 +34,6 @@ class WhoisDnsHr < Base
property_not_supported :domain_id
- property_not_supported :referral_whois
-
- property_not_supported :referral_url
-
-
property_supported :status do
if available?
:available
@@ -35,11 +35,6 @@ class WhoisDomainregistryIe < Base
property_not_supported :domain_id
- property_not_supported :referral_whois
-
- property_not_supported :referral_url
-
-
property_supported :status do
case node("status", &:downcase)
when /^active/
@@ -42,11 +42,6 @@ class WhoisEducauseEdu < Base
property_not_supported :domain_id
- property_not_supported :referral_whois
-
- property_not_supported :referral_url
-
-
property_supported :status do
if available?
:available
@@ -33,11 +33,6 @@ class WhoisMonicMo < Base
property_not_supported :domain_id
- property_not_supported :referral_whois
-
- property_not_supported :referral_url
-
-
property_supported :status do
if available?
:available
@@ -34,11 +34,6 @@ class WhoisNc < Base
property_not_supported :domain_id
- property_not_supported :referral_whois
-
- property_not_supported :referral_url
-
-
property_supported :status do
if available?
:available
@@ -1,24 +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/whois.ua.rb'
-
-
-module Whois
- class Record
- class Parser
-
- # Parser for the whois.net.ua server.
- #
- # It aliases the whois.ua parser.
- WhoisNetUa = WhoisUa
-
- end
- end
-end
@@ -33,11 +33,6 @@ class WhoisNicAc < Base
property_not_supported :domain_id
- property_not_supported :referral_whois
-
- property_not_supported :referral_url
-
-
property_supported :status do
if available?
:available
Oops, something went wrong.

0 comments on commit ba34efd

Please sign in to comment.