Skip to content
Browse files

Remove support for schema-1 from whois.cira.ca parser.

  • Loading branch information...
1 parent e58b1a8 commit 487dbe9e18dc1e1a9b6db6cd035d298d65b449bf @weppos committed
Showing with 55 additions and 338 deletions.
  1. +22 −30 lib/whois/record/parser/whois.cira.ca.rb
  2. 0 spec/fixtures/responses/whois.cira.ca/{schema-2 → }/property_status_autorenew_grace.expected
  3. 0 spec/fixtures/responses/whois.cira.ca/{schema-2 → }/property_status_autorenew_grace.txt
  4. 0 spec/fixtures/responses/whois.cira.ca/{schema-2 → }/property_status_available.expected
  5. 0 spec/fixtures/responses/whois.cira.ca/{schema-2 → }/property_status_available.txt
  6. 0 spec/fixtures/responses/whois.cira.ca/{schema-2 → }/property_status_redemption.expected
  7. 0 spec/fixtures/responses/whois.cira.ca/{schema-2 → }/property_status_redemption.txt
  8. 0 spec/fixtures/responses/whois.cira.ca/{schema-2 → }/property_status_registered.expected
  9. 0 spec/fixtures/responses/whois.cira.ca/{schema-2 → }/property_status_registered.txt
  10. 0 spec/fixtures/responses/whois.cira.ca/{schema-2 → }/property_status_tobereleased.expected
  11. 0 spec/fixtures/responses/whois.cira.ca/{schema-2 → }/property_status_tobereleased.txt
  12. 0 spec/fixtures/responses/whois.cira.ca/{schema-2 → }/property_status_unavailable.txt
  13. +0 −27 spec/fixtures/responses/whois.cira.ca/schema-1/status_available.expected
  14. +0 −9 spec/fixtures/responses/whois.cira.ca/schema-1/status_available.txt
  15. +0 −46 spec/fixtures/responses/whois.cira.ca/schema-1/status_registered.expected
  16. +0 −47 spec/fixtures/responses/whois.cira.ca/schema-1/status_registered.txt
  17. 0 spec/fixtures/responses/whois.cira.ca/{schema-2 → }/status_available.expected
  18. 0 spec/fixtures/responses/whois.cira.ca/{schema-2 → }/status_available.txt
  19. 0 spec/fixtures/responses/whois.cira.ca/{schema-2 → }/status_invalid.expected
  20. 0 spec/fixtures/responses/whois.cira.ca/{schema-2 → }/status_invalid.txt
  21. +3 −2 spec/fixtures/responses/whois.cira.ca/{schema-2 → }/status_registered.expected
  22. +11 −10 spec/fixtures/responses/whois.cira.ca/{schema-2 → }/status_registered.txt
  23. +2 −2 ...whois/record/parser/responses/whois.cira.ca/{schema-2 → }/property_status_autorenew_grace_spec.rb
  24. +2 −2 spec/whois/record/parser/responses/whois.cira.ca/{schema-2 → }/property_status_available_spec.rb
  25. +2 −2 spec/whois/record/parser/responses/whois.cira.ca/{schema-2 → }/property_status_redemption_spec.rb
  26. +2 −2 spec/whois/record/parser/responses/whois.cira.ca/{schema-2 → }/property_status_registered_spec.rb
  27. +2 −2 spec/whois/record/parser/responses/whois.cira.ca/{schema-2 → }/property_status_tobereleased_spec.rb
  28. +0 −65 spec/whois/record/parser/responses/whois.cira.ca/schema-1/status_available_spec.rb
  29. +0 −84 spec/whois/record/parser/responses/whois.cira.ca/schema-1/status_registered_spec.rb
  30. +2 −2 spec/whois/record/parser/responses/whois.cira.ca/{schema-2 → }/status_available_spec.rb
  31. +2 −2 spec/whois/record/parser/responses/whois.cira.ca/{schema-2 → }/status_invalid_spec.rb
  32. +5 −4 spec/whois/record/parser/responses/whois.cira.ca/{schema-2 → }/status_registered_spec.rb
View
52 lib/whois/record/parser/whois.cira.ca.rb
@@ -28,20 +28,22 @@ class Parser
class WhoisCiraCa < Base
property_supported :status do
- if content_for_scanner =~ /Domain status:\s+(.*?)\n/
+ if content_for_scanner =~ /Domain status:\s+(.+?)\n/
case $1.downcase
- # schema-2
- when "registered" then :registered
- when "redemption" then :registered
- when "auto-renew grace" then :registered
- when "to be released" then :registered
- when "available" then :available
- when "unavailable" then :invalid
- # schema-1
- when "exist" then :registered
- when "avail" then :available
- else
- Whois.bug!(ParserError, "Unknown status `#{$1}'.")
+ when "registered"
+ :registered
+ when "redemption"
+ :registered
+ when "auto-renew grace"
+ :registered
+ when "to be released"
+ :registered
+ when "available"
+ :available
+ when "unavailable"
+ :invalid
+ else
+ Whois.bug!(ParserError, "Unknown status `#{$1}'.")
end
else
Whois.bug!(ParserError, "Unable to parse status.")
@@ -58,38 +60,29 @@ class WhoisCiraCa < Base
property_supported :created_on do
- # schema-2
- if content_for_scanner =~ /Creation date:\s+(.*?)\n/
- Time.parse($1)
- # schema-1
- elsif content_for_scanner =~ /Approval date:\s+(.*?)\n/
+ if content_for_scanner =~ /Creation date:\s+(.+?)\n/
Time.parse($1)
end
end
- # TODO: Not supported in schema-2?
property_supported :updated_on do
- if content_for_scanner =~ /Updated date:\s+(.*?)\n/
+ if content_for_scanner =~ /Updated date:\s+(.+?)\n/
Time.parse($1)
end
end
property_supported :expires_on do
- # schema-2
- if content_for_scanner =~ /Expiry date:\s+(.*?)\n/
- Time.parse($1)
- # schema-1
- elsif content_for_scanner =~ /Renewal date:\s+(.*?)\n/
+ if content_for_scanner =~ /Expiry date:\s+(.+?)\n/
Time.parse($1)
end
end
property_supported :registrar do
- if content_for_scanner =~ /^Registrar:\n(.*\n?)^\n/m
+ if content_for_scanner =~ /^Registrar:\n(.+\n?)^\n/m
match = $1
- id = match =~ /Number:\s+(.*)$/ ? $1.strip : nil
- name = match =~ /Name:\s+(.*)$/ ? $1.strip : nil
+ id = match =~ /Number:\s+(.+)$/ ? $1.strip : nil
+ name = match =~ /Name:\s+(.+)$/ ? $1.strip : nil
Whois::Record::Registrar.new(:id => id, :name => name, :organization => name)
end
end
@@ -107,7 +100,7 @@ class WhoisCiraCa < Base
if content_for_scanner =~ /Name servers:\n((?:\s+([^\s]+)\s+([^\s]+)\n)+)/
$1.split("\n").map do |line|
name, ipv4 = line.strip.split(/\s+/)
- Record::Nameserver.new(name, ipv4)
+ Record::Nameserver.new(:name => name, :ipv4 => ipv4)
end
end
end
@@ -142,7 +135,6 @@ def invalid?
end
end
-
end
end
View
0 .../property_status_autorenew_grace.expected → .../property_status_autorenew_grace.expected
File renamed without changes.
View
0 ...ema-2/property_status_autorenew_grace.txt → ...ra.ca/property_status_autorenew_grace.txt
File renamed without changes.
View
0 ...hema-2/property_status_available.expected → ...ira.ca/property_status_available.expected
File renamed without changes.
View
0 ...ca/schema-2/property_status_available.txt → ...ois.cira.ca/property_status_available.txt
File renamed without changes.
View
0 ...ema-2/property_status_redemption.expected → ...ra.ca/property_status_redemption.expected
File renamed without changes.
View
0 ...a/schema-2/property_status_redemption.txt → ...is.cira.ca/property_status_redemption.txt
File renamed without changes.
View
0 ...ema-2/property_status_registered.expected → ...ra.ca/property_status_registered.expected
File renamed without changes.
View
0 ...a/schema-2/property_status_registered.txt → ...is.cira.ca/property_status_registered.txt
File renamed without changes.
View
0 ...a-2/property_status_tobereleased.expected → ....ca/property_status_tobereleased.expected
File renamed without changes.
View
0 ...schema-2/property_status_tobereleased.txt → ....cira.ca/property_status_tobereleased.txt
File renamed without changes.
View
0 .../schema-2/property_status_unavailable.txt → ...s.cira.ca/property_status_unavailable.txt
File renamed without changes.
View
27 spec/fixtures/responses/whois.cira.ca/schema-1/status_available.expected
@@ -1,27 +0,0 @@
-#status
- should: %s == :available
-
-#available?
- should: %s == true
-
-#registered?
- should: %s == false
-
-
-#created_on
- should: %s == nil
-
-#updated_on
- should: %s == nil
-
-#expires_on
- should: %s == nil
-
-
-#registrar
- should: %s == nil
-
-
-#nameservers
- should: %s CLASS(array)
- should: %s == []
View
9 spec/fixtures/responses/whois.cira.ca/schema-1/status_available.txt
@@ -1,9 +0,0 @@
-Domain name: u34jedzcq.ca
-Domain status: AVAIL
-
-% WHOIS look-up made at 2009-12-23 13:52:55 (GMT)
-%
-% Use of CIRA's WHOIS service is governed by the Terms of Use in its Legal
-% Notice, available at http://www.cira.ca/legal-notice/?lang=en
-%
-% (c) 2007 Canadian Internet Registration Authority, (http://www.cira.ca/)
View
46 spec/fixtures/responses/whois.cira.ca/schema-1/status_registered.expected
@@ -1,46 +0,0 @@
-#status
- should: %s == :registered
-
-#available?
- should: %s == false
-
-#registered?
- should: %s == true
-
-
-#created_on
- should: %s CLASS(time)
- should: %s == Time.parse("2000-10-03 00:00:00")
-
-#updated_on
- should: %s CLASS(time)
- should: %s == Time.parse("2009-05-27 00:00:00")
-
-#expires_on
- should: %s CLASS(time)
- should: %s == Time.parse("2011-04-28 00:00:00")
-
-
-#registrar
- should: %s CLASS(registrar)
- should: %s.id == "70"
- should: %s.name == "Webnames.ca Inc."
- should: %s.organization == "Webnames.ca Inc."
- should: %s.url == nil
-
-
-#nameservers
- should: %s CLASS(array)
- should: %s SIZE(4)
- should: %s[0] CLASS(nameserver)
- should: %s[0].name == "ns1.google.com"
- should: %s[0].ipv4 == "216.239.32.10"
- should: %s[1] CLASS(nameserver)
- should: %s[1].name == "ns2.google.com"
- should: %s[1].ipv4 == "216.239.34.10"
- should: %s[2] CLASS(nameserver)
- should: %s[2].name == "ns3.google.com"
- should: %s[2].ipv4 == "216.239.36.10"
- should: %s[3] CLASS(nameserver)
- should: %s[3].name == "ns4.google.com"
- should: %s[3].ipv4 == "216.239.38.10"
View
47 spec/fixtures/responses/whois.cira.ca/schema-1/status_registered.txt
@@ -1,47 +0,0 @@
-Domain name: google.ca
-Domain status: EXIST
-Domain number: 273289
-Approval date: 2000/10/03
-Renewal date: 2011/04/28
-Updated date: 2009/05/27
-
-Registrar:
- Name: Webnames.ca Inc.
- Number: 70
-
-Registrant:
- Name: Google Inc.
- Number: 853723
-
-Administrative contact:
- Name: Rose Hagan
- Job Title:
- Postal address: Google Inc.
- 130 King St. W., Suite 1800
- Toronto ON M5X 1E3 Canada
- Phone: 1 416 8653361
- Fax: 1 416 9456616
- Email: dns-admin@google.com
-
-Technical contact:
- Name: Rose Hagan
- Job Title:
- Postal address: Google Inc.
- 1600 Amphitheatre Parkway
- Mountain View CA 94043 United States
- Phone: 1 650 2530000
- Fax: 1 650 6188571
- Email: dns-admin@google.com
-
-Name servers:
- ns1.google.com 216.239.32.10
- ns2.google.com 216.239.34.10
- ns3.google.com 216.239.36.10
- ns4.google.com 216.239.38.10
-
-% WHOIS look-up made at 2009-12-23 13:52:54 (GMT)
-%
-% Use of CIRA's WHOIS service is governed by the Terms of Use in its Legal
-% Notice, available at http://www.cira.ca/legal-notice/?lang=en
-%
-% (c) 2007 Canadian Internet Registration Authority, (http://www.cira.ca/)
View
0 ...ira.ca/schema-2/status_available.expected → ...s/whois.cira.ca/status_available.expected
File renamed without changes.
View
0 ...ois.cira.ca/schema-2/status_available.txt → ...ponses/whois.cira.ca/status_available.txt
File renamed without changes.
View
0 ....cira.ca/schema-2/status_invalid.expected → ...ses/whois.cira.ca/status_invalid.expected
File renamed without changes.
View
0 ...whois.cira.ca/schema-2/status_invalid.txt → ...esponses/whois.cira.ca/status_invalid.txt
File renamed without changes.
View
5 ...ra.ca/schema-2/status_registered.expected → .../whois.cira.ca/status_registered.expected
@@ -13,11 +13,12 @@
should: %s == Time.parse("2000-10-03 00:00:00")
#updated_on
- should: %s == nil
+ should: %s CLASS(time)
+ should: %s == Time.parse("2012-03-27 00:00:00")
#expires_on
should: %s CLASS(time)
- should: %s == Time.parse("2011-04-28 00:00:00")
+ should: %s == Time.parse("2013-04-28 00:00:00")
#registrar
View
21 ...is.cira.ca/schema-2/status_registered.txt → ...onses/whois.cira.ca/status_registered.txt
@@ -1,7 +1,8 @@
Domain name: google.ca
Domain status: registered
Creation date: 2000/10/03
-Expiry date: 2011/04/28
+Expiry date: 2013/04/28
+Updated date: 2012/03/27
Registrar:
Name: Webnames.ca Inc.
@@ -11,19 +12,19 @@ Registrant:
Name: Google Inc.
Administrative contact:
- Name: Rose Hagan
- Postal address: 130 King St. W., Suite 1800
- Toronto ON M5X 1E3 Canada
- Phone: 1 416 8653361
- Fax: 1 416 9456616
+ Name: Christina Chiou
+ Postal address: 130 King St. W., Suite 1800,
+ Toronto ON M5X1E3 Canada
+ Phone: +1.4168653361x
+ Fax: +1.4169456616
Email: dns-admin@google.com
Technical contact:
Name: Matt Serlin
- Postal address: Domain Provisioning,10400 Overland Rd. PMB 155
+ Postal address: Domain Provisioning,10400 Overland Rd. PMB 155
Boise ID 83709 United States
- Phone: 1.2083895740
- Fax: 1.2083895771
+ Phone: +1.2083895740x
+ Fax: +1.2083895771
Email: ccops@markmonitor.com
Name servers:
@@ -32,7 +33,7 @@ Name servers:
ns3.google.com
ns4.google.com
-% WHOIS look-up made at 2010-10-13 18:32:42 (GMT)
+% WHOIS look-up made at 2012-03-28 14:44:21 (GMT)
%
% Use of CIRA's WHOIS service is governed by the Terms of Use in its Legal
% Notice, available at http://www.cira.ca/legal-notice/?lang=en
View
4 ...2/property_status_autorenew_grace_spec.rb → ...a/property_status_autorenew_grace_spec.rb
@@ -3,7 +3,7 @@
# This file is autogenerated. Do not edit it manually.
# If you want change the content of this file, edit
#
-# /spec/fixtures/responses/whois.cira.ca/schema-2/property_status_autorenew_grace.expected
+# /spec/fixtures/responses/whois.cira.ca/property_status_autorenew_grace.expected
#
# and regenerate the tests with the following rake task
#
@@ -16,7 +16,7 @@
describe Whois::Record::Parser::WhoisCiraCa, "property_status_autorenew_grace.expected" do
before(:each) do
- file = fixture("responses", "whois.cira.ca/schema-2/property_status_autorenew_grace.txt")
+ file = fixture("responses", "whois.cira.ca/property_status_autorenew_grace.txt")
part = Whois::Record::Part.new(:body => File.read(file))
@parser = klass.new(part)
end
View
4 ...chema-2/property_status_available_spec.rb → ...cira.ca/property_status_available_spec.rb
@@ -3,7 +3,7 @@
# This file is autogenerated. Do not edit it manually.
# If you want change the content of this file, edit
#
-# /spec/fixtures/responses/whois.cira.ca/schema-2/property_status_available.expected
+# /spec/fixtures/responses/whois.cira.ca/property_status_available.expected
#
# and regenerate the tests with the following rake task
#
@@ -16,7 +16,7 @@
describe Whois::Record::Parser::WhoisCiraCa, "property_status_available.expected" do
before(:each) do
- file = fixture("responses", "whois.cira.ca/schema-2/property_status_available.txt")
+ file = fixture("responses", "whois.cira.ca/property_status_available.txt")
part = Whois::Record::Part.new(:body => File.read(file))
@parser = klass.new(part)
end
View
4 ...hema-2/property_status_redemption_spec.rb → ...ira.ca/property_status_redemption_spec.rb
@@ -3,7 +3,7 @@
# This file is autogenerated. Do not edit it manually.
# If you want change the content of this file, edit
#
-# /spec/fixtures/responses/whois.cira.ca/schema-2/property_status_redemption.expected
+# /spec/fixtures/responses/whois.cira.ca/property_status_redemption.expected
#
# and regenerate the tests with the following rake task
#
@@ -16,7 +16,7 @@
describe Whois::Record::Parser::WhoisCiraCa, "property_status_redemption.expected" do
before(:each) do
- file = fixture("responses", "whois.cira.ca/schema-2/property_status_redemption.txt")
+ file = fixture("responses", "whois.cira.ca/property_status_redemption.txt")
part = Whois::Record::Part.new(:body => File.read(file))
@parser = klass.new(part)
end
View
4 ...hema-2/property_status_registered_spec.rb → ...ira.ca/property_status_registered_spec.rb
@@ -3,7 +3,7 @@
# This file is autogenerated. Do not edit it manually.
# If you want change the content of this file, edit
#
-# /spec/fixtures/responses/whois.cira.ca/schema-2/property_status_registered.expected
+# /spec/fixtures/responses/whois.cira.ca/property_status_registered.expected
#
# and regenerate the tests with the following rake task
#
@@ -16,7 +16,7 @@
describe Whois::Record::Parser::WhoisCiraCa, "property_status_registered.expected" do
before(:each) do
- file = fixture("responses", "whois.cira.ca/schema-2/property_status_registered.txt")
+ file = fixture("responses", "whois.cira.ca/property_status_registered.txt")
part = Whois::Record::Part.new(:body => File.read(file))
@parser = klass.new(part)
end
View
4 ...ma-2/property_status_tobereleased_spec.rb → ...a.ca/property_status_tobereleased_spec.rb
@@ -3,7 +3,7 @@
# This file is autogenerated. Do not edit it manually.
# If you want change the content of this file, edit
#
-# /spec/fixtures/responses/whois.cira.ca/schema-2/property_status_tobereleased.expected
+# /spec/fixtures/responses/whois.cira.ca/property_status_tobereleased.expected
#
# and regenerate the tests with the following rake task
#
@@ -16,7 +16,7 @@
describe Whois::Record::Parser::WhoisCiraCa, "property_status_tobereleased.expected" do
before(:each) do
- file = fixture("responses", "whois.cira.ca/schema-2/property_status_tobereleased.txt")
+ file = fixture("responses", "whois.cira.ca/property_status_tobereleased.txt")
part = Whois::Record::Part.new(:body => File.read(file))
@parser = klass.new(part)
end
View
65 spec/whois/record/parser/responses/whois.cira.ca/schema-1/status_available_spec.rb
@@ -1,65 +0,0 @@
-# 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.cira.ca/schema-1/status_available.expected
-#
-# and regenerate the tests with the following rake task
-#
-# $ rake spec:generate
-#
-
-require 'spec_helper'
-require 'whois/record/parser/whois.cira.ca.rb'
-
-describe Whois::Record::Parser::WhoisCiraCa, "status_available.expected" do
-
- before(:each) do
- file = fixture("responses", "whois.cira.ca/schema-1/status_available.txt")
- part = Whois::Record::Part.new(:body => File.read(file))
- @parser = klass.new(part)
- end
-
- describe "#status" do
- it do
- @parser.status.should == :available
- end
- end
- describe "#available?" do
- it do
- @parser.available?.should == true
- end
- end
- describe "#registered?" do
- it do
- @parser.registered?.should == false
- end
- end
- describe "#created_on" do
- it do
- @parser.created_on.should == nil
- end
- end
- describe "#updated_on" do
- it do
- @parser.updated_on.should == nil
- end
- end
- describe "#expires_on" do
- it do
- @parser.expires_on.should == nil
- end
- end
- describe "#registrar" do
- it do
- @parser.registrar.should == nil
- end
- end
- describe "#nameservers" do
- it do
- @parser.nameservers.should be_a(Array)
- @parser.nameservers.should == []
- end
- end
-end
View
84 spec/whois/record/parser/responses/whois.cira.ca/schema-1/status_registered_spec.rb
@@ -1,84 +0,0 @@
-# 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.cira.ca/schema-1/status_registered.expected
-#
-# and regenerate the tests with the following rake task
-#
-# $ rake spec:generate
-#
-
-require 'spec_helper'
-require 'whois/record/parser/whois.cira.ca.rb'
-
-describe Whois::Record::Parser::WhoisCiraCa, "status_registered.expected" do
-
- before(:each) do
- file = fixture("responses", "whois.cira.ca/schema-1/status_registered.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
- describe "#created_on" do
- it do
- @parser.created_on.should be_a(Time)
- @parser.created_on.should == Time.parse("2000-10-03 00:00:00")
- end
- end
- describe "#updated_on" do
- it do
- @parser.updated_on.should be_a(Time)
- @parser.updated_on.should == Time.parse("2009-05-27 00:00:00")
- end
- end
- describe "#expires_on" do
- it do
- @parser.expires_on.should be_a(Time)
- @parser.expires_on.should == Time.parse("2011-04-28 00:00:00")
- end
- end
- describe "#registrar" do
- it do
- @parser.registrar.should be_a(Whois::Record::Registrar)
- @parser.registrar.id.should == "70"
- @parser.registrar.name.should == "Webnames.ca Inc."
- @parser.registrar.organization.should == "Webnames.ca Inc."
- @parser.registrar.url.should == nil
- end
- end
- describe "#nameservers" do
- it do
- @parser.nameservers.should be_a(Array)
- @parser.nameservers.should have(4).items
- @parser.nameservers[0].should be_a(Whois::Record::Nameserver)
- @parser.nameservers[0].name.should == "ns1.google.com"
- @parser.nameservers[0].ipv4.should == "216.239.32.10"
- @parser.nameservers[1].should be_a(Whois::Record::Nameserver)
- @parser.nameservers[1].name.should == "ns2.google.com"
- @parser.nameservers[1].ipv4.should == "216.239.34.10"
- @parser.nameservers[2].should be_a(Whois::Record::Nameserver)
- @parser.nameservers[2].name.should == "ns3.google.com"
- @parser.nameservers[2].ipv4.should == "216.239.36.10"
- @parser.nameservers[3].should be_a(Whois::Record::Nameserver)
- @parser.nameservers[3].name.should == "ns4.google.com"
- @parser.nameservers[3].ipv4.should == "216.239.38.10"
- end
- end
-end
View
4 ...cira.ca/schema-2/status_available_spec.rb → ...es/whois.cira.ca/status_available_spec.rb
@@ -3,7 +3,7 @@
# This file is autogenerated. Do not edit it manually.
# If you want change the content of this file, edit
#
-# /spec/fixtures/responses/whois.cira.ca/schema-2/status_available.expected
+# /spec/fixtures/responses/whois.cira.ca/status_available.expected
#
# and regenerate the tests with the following rake task
#
@@ -16,7 +16,7 @@
describe Whois::Record::Parser::WhoisCiraCa, "status_available.expected" do
before(:each) do
- file = fixture("responses", "whois.cira.ca/schema-2/status_available.txt")
+ file = fixture("responses", "whois.cira.ca/status_available.txt")
part = Whois::Record::Part.new(:body => File.read(file))
@parser = klass.new(part)
end
View
4 ...s.cira.ca/schema-2/status_invalid_spec.rb → ...nses/whois.cira.ca/status_invalid_spec.rb
@@ -3,7 +3,7 @@
# This file is autogenerated. Do not edit it manually.
# If you want change the content of this file, edit
#
-# /spec/fixtures/responses/whois.cira.ca/schema-2/status_invalid.expected
+# /spec/fixtures/responses/whois.cira.ca/status_invalid.expected
#
# and regenerate the tests with the following rake task
#
@@ -16,7 +16,7 @@
describe Whois::Record::Parser::WhoisCiraCa, "status_invalid.expected" do
before(:each) do
- file = fixture("responses", "whois.cira.ca/schema-2/status_invalid.txt")
+ file = fixture("responses", "whois.cira.ca/status_invalid.txt")
part = Whois::Record::Part.new(:body => File.read(file))
@parser = klass.new(part)
end
View
9 ...ira.ca/schema-2/status_registered_spec.rb → ...s/whois.cira.ca/status_registered_spec.rb
@@ -3,7 +3,7 @@
# This file is autogenerated. Do not edit it manually.
# If you want change the content of this file, edit
#
-# /spec/fixtures/responses/whois.cira.ca/schema-2/status_registered.expected
+# /spec/fixtures/responses/whois.cira.ca/status_registered.expected
#
# and regenerate the tests with the following rake task
#
@@ -16,7 +16,7 @@
describe Whois::Record::Parser::WhoisCiraCa, "status_registered.expected" do
before(:each) do
- file = fixture("responses", "whois.cira.ca/schema-2/status_registered.txt")
+ file = fixture("responses", "whois.cira.ca/status_registered.txt")
part = Whois::Record::Part.new(:body => File.read(file))
@parser = klass.new(part)
end
@@ -44,13 +44,14 @@
end
describe "#updated_on" do
it do
- @parser.updated_on.should == nil
+ @parser.updated_on.should be_a(Time)
+ @parser.updated_on.should == Time.parse("2012-03-27 00:00:00")
end
end
describe "#expires_on" do
it do
@parser.expires_on.should be_a(Time)
- @parser.expires_on.should == Time.parse("2011-04-28 00:00:00")
+ @parser.expires_on.should == Time.parse("2013-04-28 00:00:00")
end
end
describe "#registrar" do

0 comments on commit 487dbe9

Please sign in to comment.
Something went wrong with that request. Please try again.