Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Merged
merged 1 commit into from Nov 6, 2013
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 2 additions & 0 deletions lib/whois/record/parser/whois.dk-hostmaster.dk.rb
Expand Up @@ -35,6 +35,8 @@ class WhoisDkHostmasterDk < Base
:registered
when "deactivated"
:expired
when "reserved"
:reserved
else
Whois.bug!(ParserError, "Unknown status `#{$1}'.")
end
Expand Down
@@ -0,0 +1,8 @@
#status
%s == :reserved

#available?
%s == false

#registered?
%s == true
@@ -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.

@@ -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