Permalink
Browse files

:referral_whois and :referral_url no longer exist as properties.

  • Loading branch information...
1 parent 3481033 commit 4b2fc171bf065a131902bd8e306b20f74c2b1e2b @weppos committed Nov 4, 2012
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,
@@ -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
@@ -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.
@@ -31,15 +31,6 @@ class WhoisNicCc < Base
property_not_supported :domain_id
- property_supported :referral_whois do
- node("Whois Server")
- end
-
- property_supported :referral_url do
- node("Referral URL")
- end
-
-
property_supported :status do
node("Status")
end
@@ -80,6 +71,15 @@ class WhoisNicCc < Base
end
+ def referral_whois
+ node("Whois Server")
+ end
+
+ def referral_url
+ node("Referral URL")
+ end
+
+
# Initializes a new {Scanners::Verisign} instance
# passing the {#content_for_scanner}
# and calls +parse+ on it.
@@ -31,16 +31,6 @@ class WhoisNicTv < Base
property_not_supported :domain_id
-
- property_supported :referral_whois do
- node("Whois Server")
- end
-
- property_supported :referral_url do
- node("Referral URL")
- end
-
-
property_supported :status do
node("Status")
end
@@ -81,6 +71,15 @@ class WhoisNicTv < Base
end
+ def referral_whois
+ node("Whois Server")
+ end
+
+ def referral_url
+ node("Referral URL")
+ end
+
+
# Initializes a new {Scanners::Verisign} instance
# passing the {#content_for_scanner}
# and calls +parse+ on it.

0 comments on commit 4b2fc17

Please sign in to comment.