lib/whois/answer/parser/whois.nic.travel.rb in whois-1.3.10 vs lib/whois/answer/parser/whois.nic.travel.rb in whois-1.3.11

- old
+ new

@@ -33,18 +33,26 @@ # and examples. # class WhoisNicTravel < Base property_supported :status do - @status ||= content_for_scanner.scan(/Domain Status:\s+(.*?)\n/).flatten + @status ||= if content_for_scanner =~ /Domain Status:\s+(.+?)\n/ + case $1.downcase + when "ok" then :registered + else + Whois.bug!(ParserError, "Unknown status `#{$1}'.") + end + else + :available + end end property_supported :available? do - @available ||= !!(content_for_scanner =~ /Not found:/) + @available ||= !!(content_for_scanner =~ /Not found:/) end property_supported :registered? do - !available? + @registered ||= !available? end property_supported :created_on do @created_on ||= if content_for_scanner =~ /Domain Registration Date:\s+(.*)\n/