Skip to content

Commit

Permalink
whois.nic.cz parser must support `Update prohibited' statuses.
Browse files Browse the repository at this point in the history
  • Loading branch information
weppos committed Jun 29, 2011
1 parent 8218ebb commit 181e545
Show file tree
Hide file tree
Showing 5 changed files with 139 additions and 5 deletions.
8 changes: 5 additions & 3 deletions CHANGELOG.rdoc
Expand Up @@ -10,11 +10,13 @@

* FIXED: whois.meregistry.net parser raises `no time information in ""' when updated_at property is blank.

* FIXED: whois.nic.it parser must support NO-PROVIDER status.
* FIXED: whois.nic.it parser must support `NO-PROVIDER' status.

* FIXED: whois.nic.it parser must support pendingDelete / pendingDelete status.
* FIXED: whois.nic.it parser must support `'pendingDelete / pendingDelete status.

* FIXED: whois.nic.asia parser must support CLIENT statuses.
* FIXED: whois.nic.asia parser must support `CLIENT' statuses.

* FIXED: whois.nic.cz parser must support `Update prohibited' statuses.


== Release 2.0.4
Expand Down
6 changes: 4 additions & 2 deletions lib/whois/record/parser/whois.nic.cz.rb
Expand Up @@ -30,9 +30,11 @@ class WhoisNicCz < Base
property_supported :status do
if content_for_scanner =~ /status:\s+(.+)\n/
case $1.downcase
when "paid and in zone" then :registered
when "paid and in zone", "update prohibited"
:registered
# NEWSTATUS
when "expired" then :expired
when "expired"
:expired
else
Whois.bug!(ParserError, "Unknown status `#{$1}'.")
end
Expand Down
@@ -0,0 +1,8 @@
#status
should: %s == :registered

#available?
should: %s == false

#registered?
should: %s == true
@@ -0,0 +1,83 @@
% (c) 2006-2011 CZ.NIC, z.s.p.o.
%
% Intended use of supplied data and information
%
% Data contained in the domain name register, as well as information
% supplied through public information services of CZ.NIC association,
% are appointed only for purposes connected with Internet network
% administration and operation, or for the purpose of legal or other
% similar proceedings, in process as regards a matter connected
% particularly with holding and using a concrete domain name.
%
% Full text available at:
% http://www.nic.cz/page/306/intended-use-of-supplied-data-and-information/
%
% See also a search service at http://www.nic.cz/whois/
%
%
% Whoisd Server Version: 3.4.0
% Timestamp: Wed Jun 29 09:48:24 2011

domain: forpsi.cz
registrant: SB:INTERNET-CZ
nsset: FORPSI
registrar: REG-INTERNET-CZ
status: Update prohibited
status: Sponsoring registrar change prohibited
registered: 25.10.2004 15:05:00
changed: 19.05.2011 08:36:38
expire: 25.10.2018

contact: SB:INTERNET-CZ
org: INTERNET CZ, a.s.
name: Stefano Cecconi
address: Ktiš 2
address: Ktiš
address: 384 03
address: CZ
phone: +420.383835353
fax-no: +420.383835354
e-mail: domain@forpsi.com
registrar: REG-INTERNET-CZ
created: 18.11.2001 19:46:00
changed: 06.06.2011 13:56:51

nsset: FORPSI
nserver: ns.forpsi.net
nserver: ns.forpsi.cz (81.2.209.185)
nserver: ns.forpsi.it
tech-c: FORPSI
registrar: REG-INTERNET-CZ
created: 01.10.2007 10:19:47
changed: 30.09.2010 10:21:36

contact: FORPSI
org: INTERNET CZ, a.s.
name: Stefano Cecconi
address: Ktiš 2
address: Ktiš
address: 38403
address: CZ
fax-no: +420.383835354
registrar: REG-INTERNET-CZ
created: 04.08.2008 14:42:08
changed: 06.06.2011 13:55:12

nsset: FORPSI.CZ
nserver: ns.forpsi.net
nserver: ns.forpsi.us
tech-c: CID:IGN-C181273-TSC
registrar: REG-IGNUM
created: 24.08.2008 16:07:09

contact: CID:IGN-C181273-TSC
name: Dana Stádníková
address: Gončarenkova 40
address: Praha 4
address: 14700
address: CZ
registrar: REG-IGNUM
created: 21.02.2008 21:10:03
changed: 24.08.2008 16:38:14


@@ -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.nic.cz/property_status_update_prohibited.expected
#
# and regenerate the tests with the following rake task
#
# $ rake genspec:parsers
#

require 'spec_helper'
require 'whois/record/parser/whois.nic.cz.rb'

describe Whois::Record::Parser::WhoisNicCz, "property_status_update_prohibited.expected" do

before(:each) do
file = fixture("responses", "whois.nic.cz/property_status_update_prohibited.txt")
part = Whois::Record::Part.new(:body => File.read(file))
@parser = klass.new(part)
end

describe "#status" do
it do
@parser.status.should == :registered
end
end
describe "#available?" do
it do
@parser.available?.should == false
end
end
describe "#registered?" do
it do
@parser.registered?.should == true
end
end
end

0 comments on commit 181e545

Please sign in to comment.