Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

Add support for 'Reserved' status for whois.dk-hostmaster.dk #281

Merged
merged 1 commit into from

2 participants

@Pagten

No description provided.

@weppos weppos was assigned
@weppos weppos merged commit d4d0ae7 into weppos:master

1 check passed

Details default The Travis CI build passed
@weppos
Owner

Excellent, thank you!

@weppos weppos referenced this pull request from a commit
@weppos CHANGELOG for GH-281 bdb30db
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
This page is out of date. Refresh to see the latest.
View
2  lib/whois/record/parser/whois.dk-hostmaster.dk.rb
@@ -35,6 +35,8 @@ class WhoisDkHostmasterDk < Base
:registered
when "deactivated"
:expired
+ when "reserved"
+ :reserved
else
Whois.bug!(ParserError, "Unknown status `#{$1}'.")
end
View
8 spec/fixtures/responses/whois.dk-hostmaster.dk/property_status_reserved.expected
@@ -0,0 +1,8 @@
+#status
+ %s == :reserved
+
+#available?
+ %s == false
+
+#registered?
+ %s == true
View
29 spec/fixtures/responses/whois.dk-hostmaster.dk/property_status_reserved.txt
@@ -0,0 +1,29 @@
+# Hello xxx.xxx.xxx.xxx. Your session has been logged.
+#
+# Copyright (c) 2002 - 2013 by DK Hostmaster A/S
+#
+# The data in the DK Whois database is provided by DK Hostmaster A/S
+# for information purposes only, and to assist persons in obtaining
+# information about or related to a domain name registration record.
+# We do not guarantee its accuracy. We will reserve the right to remove
+# access for entities abusing the data, without notice.
+#
+# Any use of this material to target advertising or similar activities
+# are explicitly forbidden and will be prosecuted. DK Hostmaster A/S
+# requests to be notified of any such activities or suspicions thereof.
+
+Domain: googlle.dk
+DNS: googlle.dk
+Registered: 2013-10-24
+Expires: 2014-10-31
+Registration period: 1 year
+VID: no
+Status: Reserved
+
+Nameservers
+Hostname: ns1.parkingcrew.net
+Hostname: ns2.parkingcrew.net
+
+# Use option --show-handles to get handle information.
+# Whois HELP for more help.
+
View
39 spec/whois/record/parser/responses/whois.dk-hostmaster.dk/property_status_reserved_spec.rb
@@ -0,0 +1,39 @@
+# encoding: utf-8
+
+# This file is autogenerated. Do not edit it manually.
+# If you want change the content of this file, edit
+#
+# /spec/fixtures/responses/whois.dk-hostmaster.dk/property_status_reserved.expected
+#
+# and regenerate the tests with the following rake task
+#
+# $ rake spec:generate
+#
+
+require 'spec_helper'
+require 'whois/record/parser/whois.dk-hostmaster.dk.rb'
+
+describe Whois::Record::Parser::WhoisDkHostmasterDk, "property_status_reserved.expected" do
+
+ subject do
+ file = fixture("responses", "whois.dk-hostmaster.dk/property_status_reserved.txt")
+ part = Whois::Record::Part.new(body: File.read(file))
+ described_class.new(part)
+ end
+
+ describe "#status" do
+ it do
+ expect(subject.status).to eq(:reserved)
+ end
+ end
+ describe "#available?" do
+ it do
+ expect(subject.available?).to eq(false)
+ end
+ end
+ describe "#registered?" do
+ it do
+ expect(subject.registered?).to eq(true)
+ end
+ end
+end
Something went wrong with that request. Please try again.