Skip to content

Commit

Permalink
whois.nic.fr parser must support `BLOCKED' status (closes GH-127)
Browse files Browse the repository at this point in the history
  • Loading branch information
weppos committed Nov 4, 2011
1 parent ad523e4 commit 4c89b71
Show file tree
Hide file tree
Showing 5 changed files with 134 additions and 0 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Expand Up @@ -23,6 +23,8 @@

* FIXED: whois.nic.ms parser must support `Delegated' status (GH-126).

* FIXED: whois.nic.fr parser must support `BLOCKED' status (GH-127).


## Release 2.1.1

Expand Down
1 change: 1 addition & 0 deletions lib/whois/record/parser/whois.nic.fr.rb
Expand Up @@ -33,6 +33,7 @@ class WhoisNicFr < Base
when "active" then :registered
when "registered" then :registered
when "redemption" then :redemption
when "blocked" then :inactive
# NEWSTATUS (reserved)
when "frozen" then :frozen
else
Expand Down
@@ -0,0 +1,8 @@
#status
should: %s == :inactive

#available?
should: %s == false

#registered?
should: %s == true
@@ -0,0 +1,84 @@
%%
%% This is the AFNIC Whois server.
%%
%% complete date format : DD/MM/YYYY
%% short date format : DD/MM
%% version : FRNIC-2.5
%%
%% Rights restricted by copyright.
%% See http://www.afnic.fr/afnic/web/mentions-legales-whois_en
%%
%% Use '-h' option to obtain more information about this service.
%%
%% [87.13.187.22 REQUEST] >> amazingsales.fr
%%
%% RL Net [##########] - RL IP [#########.]
%%

domain: amazingsales.fr
status: BLOCKED
hold: NO
holder-c: A19281-FRNIC
admin-c: OVH5-FRNIC
tech-c: OVH5-FRNIC
zone-c: NFC1-FRNIC
nsl-id: NSL22715-FRNIC
registrar: OVH
anniversary: 09/02
created: 09/02/2010
last-update: 16/03/2010
source: FRNIC

ns-list: NSL22715-FRNIC
nserver: ns1.interdata.lt
nserver: ns2.interdata.lt
source: FRNIC

registrar: OVH
type: Isp Option 1
address: 2 Rue Kellermann
address: BP 80157
address: ROUBAIX CEDEX 1
country: FR
phone: +33 8 99 70 17 61
fax-no: +33 3 20 83 99 28
e-mail: support@ovh.com
website: http://www.ovh.fr
anonymous: NO
registered: 21/10/1999
source: FRNIC

nic-hdl: A19281-FRNIC
type: ORGANIZATION
contact: UAB AMAZINGSALES.COM
address: Linkmenu g. 15
address: LT09300 Vilnius
country: LT
phone: +370 61282044
e-mail: robertas@amazingsales.com
changed: 23/07/2010 nic@nic.fr
anonymous: NO
obsoleted: NO
idstatus: ok
source: FRNIC

nic-hdl: OVH5-FRNIC
type: ROLE
contact: OVH NET
address: OVH
address: 140, quai du Sartel
address: 59100 Roubaix
country: FR
phone: +33 8 99 70 17 61
e-mail: tech@ovh.net
trouble: Information: http://www.ovh.fr
trouble: Questions: mailto:tech@ovh.net
trouble: Spam: mailto:abuse@ovh.net
admin-c: OK217-FRNIC
tech-c: OK217-FRNIC
notify: tech@ovh.net
changed: 11/10/2006 tech@ovh.net
anonymous: NO
obsoleted: NO
source: FRNIC

@@ -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.fr/fr/property_status_blocked.expected
#
# and regenerate the tests with the following rake task
#
# $ rake spec:generate
#

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

describe Whois::Record::Parser::WhoisNicFr, "property_status_blocked.expected" do

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

describe "#status" do
it do
@parser.status.should == :inactive
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 4c89b71

Please sign in to comment.