lib/whois/record/parser/whois.fi.rb in whois-3.5.4 vs lib/whois/record/parser/whois.fi.rb in whois-3.5.5
- old
+ new
@@ -37,11 +37,13 @@
property_not_supported :domain_id
property_supported :status do
- if registered?
+ if reserved?
+ :reserved
+ elsif registered?
case node("status", &:downcase)
when "granted"
:registered
when "grace period"
:registered
@@ -74,15 +76,15 @@
node("expires") { |value| Time.parse(value) }
end
property_not_supported :registrar
-
+
property_supported :registrant_contacts do
node("descr") do |array|
address = node("address")
-
+
Record::Contact.new(
type: Record::Contact::TYPE_REGISTRANT,
id: array[1],
name: address[0],
organization: array[0],
@@ -101,9 +103,14 @@
property_supported :nameservers do
Array.wrap(node("nserver")).map do |line|
Record::Nameserver.new(name: line.split(" ").first)
end
+ end
+
+ # NEWPROPERTY
+ def reserved?
+ !!content_for_scanner.match(/Domain not available/)
end
end
end