Permalink
Browse files

whois.sk-nic.sk parser must support `DOM_EXP', `DOM_LNOT', `DOM_WARN'…

… statuses.
  • Loading branch information...
1 parent 1418003 commit d07711e884f623ee06b1b066df2e263abd847874 @weppos committed Aug 5, 2011
View
2 CHANGELOG.rdoc
@@ -32,6 +32,8 @@
* FIXED: whois.cira.ca parser must support `unavailable' status (#102).
+* FIXED: whois.sk-nic.sk parser must support `DOM_EXP', `DOM_LNOT', `DOM_WARN' statuses.
+
== Release 2.0.4
View
3 lib/whois/record/parser/whois.nic.it.rb
@@ -48,7 +48,8 @@ class WhoisNicIt < Base
when "grace-period", "pendingupdate", "pendingtransfer", "no-provider"
:registered
when "pendingdelete / redemptionperiod", /redemption\-/,
- "pendingdelete / pendingdelete" # will be deleted in 5 days
+ # The domain will be deleted in 5 days
+ "pendingdelete / pendingdelete"
:redemption
when "unassignable"
:reserved
View
20 lib/whois/record/parser/whois.sk-nic.sk.rb
@@ -28,12 +28,26 @@ class Parser
class WhoisSkNicSk < Base
# @see https://www.sk-nic.sk/documents/stavy_domen.html
+ # @see http://www.inwx.de/en/sk-domain.html
property_supported :status do
if content_for_scanner =~ /^Domain-status\s+(.+)\n/
case $1.downcase
- when "dom_ok" then :registered
- when "dom_held" then :registered
- when "dom_dakt" then :registered
+ # The domain is registered and paid.
+ when "dom_ok",
+ # Replacement 14-day period for domain payment.
+ "dom_dakt",
+ # 28 days before the expiration of one year's notice is sent to the first call for an extension of domains.
+ # The domain is still fully functional (14 days).
+ "dom_warn",
+ # 14 days before the expiration of one year's notice is sent to the second call to the extension of domains.
+ # The domain is still fully functional (14 days).
+ "dom_lnot",
+ # The domain is expired and has not been renewed (14 days).
+ "dom_exp"
+ :registered
+ # The domain losts its registrar (28 days).
+ when "dom_held"
+ :redemption
else
Whois.bug!(ParserError, "Unknown status `#{$1}'.")
end
View
8 spec/fixtures/responses/whois.sk-nic.sk/property_status_dom_exp.expected
@@ -0,0 +1,8 @@
+#status
+ should: %s == :registered
+
+#available?
+ should: %s == false
+
+#registered?
+ should: %s == true
View
27 spec/fixtures/responses/whois.sk-nic.sk/property_status_dom_exp.txt
@@ -0,0 +1,27 @@
+%
+% whois.sk-nic.sk - whois server for TLD .sk
+%
+
+
+Domain-name kuphry.sk
+Admin-id BCPE-0006
+Admin-name Bc. Peter Drienovsky
+Admin-legal-form zivnost
+Admin-org.-ID 40332721
+Admin-address Hviezdoslavova 22, Zlate Moravce 95301
+Admin-telephone +421 905 2398 07
+Admin-email peter@drienovsky.sk
+Tech-id BCPE-0006
+Tech-name Bc. Peter Drienovsky
+Tech-org.-ID 40332721
+Tech-address Hviezdoslavova 22, Zlate Moravce 95301
+Tech-telephone +421 905 2398 07
+Tech-email peter@drienovsky.sk
+dns_name ns1.servage.net
+dns_name ns2.servage.net
+dns_name ns3.servage.net
+dns_name ns4.servage.net
+Last-update 2011-08-02
+Valid-date 2011-08-16
+Domain-status DOM_EXP
+
View
2 spec/fixtures/responses/whois.sk-nic.sk/property_status_dom_held.expected
@@ -1,5 +1,5 @@
#status
- should: %s == :registered
+ should: %s == :redemption
#available?
should: %s == false
View
8 spec/fixtures/responses/whois.sk-nic.sk/property_status_dom_lnot.expected
@@ -0,0 +1,8 @@
+#status
+ should: %s == :registered
+
+#available?
+ should: %s == false
+
+#registered?
+ should: %s == true
View
26 spec/fixtures/responses/whois.sk-nic.sk/property_status_dom_lnot.txt
@@ -0,0 +1,26 @@
+%
+% whois.sk-nic.sk - whois server for TLD .sk
+%
+
+
+Domain-name dobramasaz.sk
+Admin-id SECO-0007
+Admin-name SECORAMA
+Admin-legal-form s.r.o
+Admin-org.-ID 45509859
+Admin-address Kresankova 7/B, Bratislava 84105
+Admin-telephone 0000000000, 0000000000
+Admin-email hmalik@secorama.sk
+Tech-id FORP-0003
+Tech-name Forplay, spol. s r.o.
+Tech-org.-ID 35868295
+Tech-address Laurinska 11, Bratislava - Stare mesto 811 01
+Tech-telephone 0905 403 404
+Tech-email info@forplay.sk
+dns_name ns1.brianlurie.com
+dns_name ns2.brianlurie.com
+dns_name ns3.brianlurie.com
+Last-update 2011-08-02
+Valid-date 2011-08-16
+Domain-status DOM_LNOT
+
View
8 spec/fixtures/responses/whois.sk-nic.sk/property_status_dom_warn.expected
@@ -0,0 +1,8 @@
+#status
+ should: %s == :registered
+
+#available?
+ should: %s == false
+
+#registered?
+ should: %s == true
View
24 spec/fixtures/responses/whois.sk-nic.sk/property_status_dom_warn.txt
@@ -0,0 +1,24 @@
+%
+% whois.sk-nic.sk - whois server for TLD .sk
+%
+
+
+Domain-name e-biznis.sk
+Admin-id EVEC-0001
+Admin-name eVector s.r.o.
+Admin-legal-form s.r.o
+Admin-org.-ID 36552011
+Admin-address Coboriho 2, Nitra 94901
+Admin-telephone 421-37-6578941
+Admin-email info@evector.sk
+Tech-id BEES-0002
+Tech-name BeeSoft s.r.o.
+Tech-org.-ID 36723657
+Tech-address Lamacska cesta 20, Bratislava 84103
+Tech-telephone 421264530707, 421905322795
+dns_name ns1.beesoft.sk
+dns_name ns2.beesoft.sk
+Last-update 2011-07-30
+Valid-date 2011-08-27
+Domain-status DOM_WARN
+
View
39 spec/whois/record/parser/responses/whois.sk-nic.sk/property_status_dom_exp_spec.rb
@@ -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.sk-nic.sk/property_status_dom_exp.expected
+#
+# and regenerate the tests with the following rake task
+#
+# $ rake genspec:parsers
+#
+
+require 'spec_helper'
+require 'whois/record/parser/whois.sk-nic.sk.rb'
+
+describe Whois::Record::Parser::WhoisSkNicSk, "property_status_dom_exp.expected" do
+
+ before(:each) do
+ file = fixture("responses", "whois.sk-nic.sk/property_status_dom_exp.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
View
2 spec/whois/record/parser/responses/whois.sk-nic.sk/property_status_dom_held_spec.rb
@@ -23,7 +23,7 @@
describe "#status" do
it do
- @parser.status.should == :registered
+ @parser.status.should == :redemption
end
end
describe "#available?" do
View
39 spec/whois/record/parser/responses/whois.sk-nic.sk/property_status_dom_lnot_spec.rb
@@ -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.sk-nic.sk/property_status_dom_lnot.expected
+#
+# and regenerate the tests with the following rake task
+#
+# $ rake genspec:parsers
+#
+
+require 'spec_helper'
+require 'whois/record/parser/whois.sk-nic.sk.rb'
+
+describe Whois::Record::Parser::WhoisSkNicSk, "property_status_dom_lnot.expected" do
+
+ before(:each) do
+ file = fixture("responses", "whois.sk-nic.sk/property_status_dom_lnot.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
View
39 spec/whois/record/parser/responses/whois.sk-nic.sk/property_status_dom_warn_spec.rb
@@ -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.sk-nic.sk/property_status_dom_warn.expected
+#
+# and regenerate the tests with the following rake task
+#
+# $ rake genspec:parsers
+#
+
+require 'spec_helper'
+require 'whois/record/parser/whois.sk-nic.sk.rb'
+
+describe Whois::Record::Parser::WhoisSkNicSk, "property_status_dom_warn.expected" do
+
+ before(:each) do
+ file = fixture("responses", "whois.sk-nic.sk/property_status_dom_warn.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
View
4 whois.gemspec
2 additions, 2 deletions not shown because the diff is too large. Please use a local Git client to view these changes.

0 comments on commit d07711e

Please sign in to comment.