Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
whois.nic.fr parser must support `BLOCKED' status (closes GH-127)
- Loading branch information
Showing
5 changed files
with
134 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
8 changes: 8 additions & 0 deletions
8
spec/fixtures/responses/whois.nic.fr/fr/property_status_blocked.expected
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
#status | ||
should: %s == :inactive | ||
|
||
#available? | ||
should: %s == false | ||
|
||
#registered? | ||
should: %s == true |
84 changes: 84 additions & 0 deletions
84
spec/fixtures/responses/whois.nic.fr/fr/property_status_blocked.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 | ||
|
39 changes: 39 additions & 0 deletions
39
spec/whois/record/parser/responses/whois.nic.fr/fr/property_status_blocked_spec.rb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 |