lib/whois/record/parser/whois.arnes.si.rb in whois-3.5.3 vs lib/whois/record/parser/whois.arnes.si.rb in whois-3.5.4

- old
+ new

@@ -12,29 +12,30 @@ module Whois class Record class Parser + # Parser for the whois.arnesi.si server. # - # = whois.arnes.si parser + # @note This parser is just a stub and provides only a few basic methods + # to check for domain availability and get domain status. + # Please consider to contribute implementing missing methods. # - # Parser for the whois.arnes.si server. + # @see Whois::Record::Parser::Example + # The Example parser for the list of all available methods. # - # NOTE: This parser is just a stub and provides only a few basic methods - # to check for domain availability and get domain status. - # Please consider to contribute implementing missing methods. - # See WhoisNicIt parser for an explanation of all available methods - # and examples. - # class WhoisArnesSi < Base property_supported :status do if content_for_scanner =~ /status:\s+(.+)\n/ - case $1.downcase - when "ok" then :registered - else - Whois.bug!(ParserError, "Unknown status `#{$1}'.") + statuses = $1.strip.downcase.split(",") + if statuses.include?("ok") + :registered + elsif statuses.include?("serverupdateprohibited") + :registered + else + Whois.bug!(ParserError, "Unknown status `#{$1}'.") end else :available end end @@ -63,10 +64,10 @@ end property_supported :nameservers do content_for_scanner.scan(/nameserver:\s+(.+)\n/).flatten.map do |name| - Record::Nameserver.new(:name => name) + Record::Nameserver.new(name: name.strip) end end end