Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

whois.rnids.rs parser should support statuses Locked, Expired, and In…

… Transfer
  • Loading branch information...
commit 703280c4168b0a299dced634aed3650915593f7d 1 parent ca22aeb
Simone Carletti authored
2  CHANGELOG.md
View
@@ -20,6 +20,8 @@
* FIXED: whois.neworksolutions.com parser crashes when the contact name is blank.
+* FIXED: whois.rnids.rs parser should support statuses Locked, Expired, and In Transfer.
+
* CHANGE: Deprecated options[:web] for :web adapter in favor of options[:url].
* CHANGE: Removed Pir adaper, the registry is a thick whois server.
8 lib/whois/record/parser/whois.rnids.rs.rb
View
@@ -43,8 +43,14 @@ class WhoisRnidsRs < Base
case node("Domain status", &:downcase)
when nil
:available
- when "active"
+ when 'active'
:registered
+ when 'locked'
+ :registered
+ when 'in transfer'
+ :registered
+ when 'expired'
+ :expired
else
Whois.bug!(ParserError, "Unknown status `#{node("Domain status")}'.")
end
8 spec/fixtures/responses/whois.rnids.rs/property_status_expired.expected
View
@@ -0,0 +1,8 @@
+#status
+ should: %s == :expired
+
+#available?
+ should: %s == false
+
+#registered?
+ should: %s == true
37 spec/fixtures/responses/whois.rnids.rs/property_status_expired.txt
View
@@ -0,0 +1,37 @@
+%
+%This is the RNIDS Whois server.
+%
+% Date Format : DD.MM.YYYY
+% Whois Server Version: 1.0.0
+%
+% Rights restricted by copyright.
+% See http://www.rnids.rs/whois_en
+%
+%
+%
+% Ovo je odgovor od RNIDS Whois servera.
+%
+% Format datuma : DD.MM.YYYY
+% Verzija Whois Servera : 1.0.0
+%
+% Sva prava zadržana. Za više informacija.
+% pogledajte http://www.rnids.rs/whois_sr
+
+Domain name: saj.rs.
+Domain status: Expired
+Registration date: 17.06.2010 14:40:59
+Modification date: 18.06.2012 02:00:02
+Expiration date: 17.06.2012 14:40:59
+Registrar: BGSVETIONIK.S.A.
+
+
+Owner: Ana Rakovic
+
+
+DNS: ns9.sajthosting.com. - 85.10.206.52
+DNS: ns10.sajthosting.com. - 85.10.206.57
+
+
+Administrative contact: Ana Rakovic
+
+Technical contact: Davor Veselinovic
8 spec/fixtures/responses/whois.rnids.rs/property_status_in_transfer.expected
View
@@ -0,0 +1,8 @@
+#status
+ should: %s == :registered
+
+#available?
+ should: %s == false
+
+#registered?
+ should: %s == true
37 spec/fixtures/responses/whois.rnids.rs/property_status_in_transfer.txt
View
@@ -0,0 +1,37 @@
+%
+%This is the RNIDS Whois server.
+%
+% Date Format : DD.MM.YYYY
+% Whois Server Version: 1.0.0
+%
+% Rights restricted by copyright.
+% See http://www.rnids.rs/whois_en
+%
+%
+%
+% Ovo je odgovor od RNIDS Whois servera.
+%
+% Format datuma : DD.MM.YYYY
+% Verzija Whois Servera : 1.0.0
+%
+% Sva prava zadržana. Za više informacija.
+% pogledajte http://www.rnids.rs/whois_sr
+
+Domain name: saj.rs.
+Domain status: In Transfer
+Registration date: 17.06.2010 14:40:59
+Modification date: 06.07.2012 16:24:55
+Expiration date: 17.06.2013 14:40:59
+Registrar: NINET Company d.o.o.
+
+
+Owner: Ana Rakovic
+
+
+DNS: ns1.bgsvetionik.com. -
+DNS: ns2.bgsvetionik.com. -
+
+
+Administrative contact: Ana Rakovic
+
+Technical contact: Strahinja Stanković
8 spec/fixtures/responses/whois.rnids.rs/property_status_locked.expected
View
@@ -0,0 +1,8 @@
+#status
+ should: %s == :registered
+
+#available?
+ should: %s == false
+
+#registered?
+ should: %s == true
40 spec/fixtures/responses/whois.rnids.rs/property_status_locked.txt
View
@@ -0,0 +1,40 @@
+%
+%This is the RNIDS Whois server.
+%
+% Date Format : DD.MM.YYYY
+% Whois Server Version: 1.0.0
+%
+% Rights restricted by copyright.
+% See http://www.rnids.rs/whois_en
+%
+%
+%
+% Ovo je odgovor od RNIDS Whois servera.
+%
+% Format datuma : DD.MM.YYYY
+% Verzija Whois Servera : 1.0.0
+%
+% Sva prava zadržana. Za više informacija.
+% pogledajte http://www.rnids.rs/whois_sr
+
+Domain name: kondor.rs.
+Domain status: Locked
+Registration date: 30.09.2009 16:19:08
+Modification date: 18.11.2011 16:03:46
+Expiration date: 30.09.2012 16:19:08
+Registrar: BGSVETIONIK.S.A.
+
+
+Owner: Slavisa Janjusevic
+
+
+DNS: dns1.orion.rs. - 77.105.36.77
+DNS: dns2.orion.rs. - 77.105.37.77
+DNS: dns3.orion.rs. - 67.18.147.77
+DNS: dns4.orion.rs. - 114.111.129.149
+
+
+Administrative contact: Slavisa Janjusevic, Kondor DOO
+Address: Kralja Petra I / 12, Smederevo, Serbia
+
+Technical contact: Davor Veselinovic
39 spec/whois/record/parser/responses/whois.rnids.rs/property_status_expired_spec.rb
View
@@ -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.rnids.rs/property_status_expired.expected
+#
+# and regenerate the tests with the following rake task
+#
+# $ rake spec:generate
+#
+
+require 'spec_helper'
+require 'whois/record/parser/whois.rnids.rs.rb'
+
+describe Whois::Record::Parser::WhoisRnidsRs, "property_status_expired.expected" do
+
+ before(:each) do
+ file = fixture("responses", "whois.rnids.rs/property_status_expired.txt")
+ part = Whois::Record::Part.new(:body => File.read(file))
+ @parser = klass.new(part)
+ end
+
+ describe "#status" do
+ it do
+ @parser.status.should == :expired
+ 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
39 spec/whois/record/parser/responses/whois.rnids.rs/property_status_in_transfer_spec.rb
View
@@ -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.rnids.rs/property_status_in_transfer.expected
+#
+# and regenerate the tests with the following rake task
+#
+# $ rake spec:generate
+#
+
+require 'spec_helper'
+require 'whois/record/parser/whois.rnids.rs.rb'
+
+describe Whois::Record::Parser::WhoisRnidsRs, "property_status_in_transfer.expected" do
+
+ before(:each) do
+ file = fixture("responses", "whois.rnids.rs/property_status_in_transfer.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
39 spec/whois/record/parser/responses/whois.rnids.rs/property_status_locked_spec.rb
View
@@ -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.rnids.rs/property_status_locked.expected
+#
+# and regenerate the tests with the following rake task
+#
+# $ rake spec:generate
+#
+
+require 'spec_helper'
+require 'whois/record/parser/whois.rnids.rs.rb'
+
+describe Whois::Record::Parser::WhoisRnidsRs, "property_status_locked.expected" do
+
+ before(:each) do
+ file = fixture("responses", "whois.rnids.rs/property_status_locked.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
Please sign in to comment.
Something went wrong with that request. Please try again.