whois 2.4.0 → 2.5.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (134) hide show
  1. data/.rspec +0 -1
  2. data/Rakefile +25 -1
  3. data/lib/whois/definitions/tlds.rb +1 -1
  4. data/lib/whois/record/parser/base.rb +1 -1
  5. data/lib/whois/record/parser/base_afilias.rb +2 -2
  6. data/lib/whois/record/parser/jobswhois.verisign-grs.com.rb +1 -1
  7. data/lib/whois/record/parser/whois.audns.net.au.rb +81 -16
  8. data/lib/whois/record/parser/whois.biz.rb +1 -1
  9. data/lib/whois/record/parser/whois.cctld.by.rb +107 -0
  10. data/lib/whois/record/parser/whois.centralnic.com.rb +1 -1
  11. data/lib/whois/record/parser/whois.cira.ca.rb +103 -51
  12. data/lib/whois/record/parser/whois.cnnic.cn.rb +1 -1
  13. data/lib/whois/record/parser/whois.crsnic.net.rb +1 -1
  14. data/lib/whois/record/parser/whois.denic.de.rb +1 -1
  15. data/lib/whois/record/parser/whois.dns.hr.rb +2 -2
  16. data/lib/whois/record/parser/whois.domainregistry.ie.rb +77 -21
  17. data/lib/whois/record/parser/whois.domainregistry.my.rb +5 -8
  18. data/lib/whois/record/parser/whois.dreamhost.com.rb +1 -1
  19. data/lib/whois/record/parser/whois.enom.com.rb +124 -0
  20. data/lib/whois/record/parser/whois.fi.rb +1 -1
  21. data/lib/whois/record/parser/whois.iana.org.rb +1 -1
  22. data/lib/whois/record/parser/whois.nc.rb +2 -2
  23. data/lib/whois/record/parser/whois.nic.cc.rb +1 -1
  24. data/lib/whois/record/parser/whois.nic.hu.rb +1 -1
  25. data/lib/whois/record/parser/whois.nic.it.rb +1 -1
  26. data/lib/whois/record/parser/whois.nic.lk.rb +1 -1
  27. data/lib/whois/record/parser/whois.nic.tv.rb +1 -1
  28. data/lib/whois/record/parser/whois.registry.qa.rb +1 -1
  29. data/lib/whois/record/parser/whois.rnids.rs.rb +4 -4
  30. data/lib/whois/record/parser/whois.smallregistry.net.rb +1 -1
  31. data/lib/whois/record/parser/whois.tld.ee.rb +1 -1
  32. data/lib/whois/record/parser/whois.ua.rb +1 -1
  33. data/lib/whois/record/scanners/afilias.rb +60 -0
  34. data/lib/whois/record/scanners/ast.rb +67 -0
  35. data/lib/whois/record/scanners/base.rb +102 -0
  36. data/lib/whois/record/scanners/iana.rb +101 -0
  37. data/lib/whois/record/scanners/verisign.rb +112 -0
  38. data/lib/whois/record/scanners/whois.audns.net.au.rb +39 -0
  39. data/lib/whois/record/scanners/whois.biz.rb +47 -0
  40. data/lib/whois/record/scanners/whois.cctld.by.rb +46 -0
  41. data/lib/whois/record/scanners/whois.centralnic.com.rb +46 -0
  42. data/lib/whois/record/scanners/whois.cira.ca.rb +87 -0
  43. data/lib/whois/record/scanners/whois.cnnic.cn.rb +44 -0
  44. data/lib/whois/record/scanners/whois.denic.de.rb +122 -0
  45. data/lib/whois/record/scanners/whois.dns.hr.rb +39 -0
  46. data/lib/whois/record/scanners/whois.domainregistry.ie.rb +50 -0
  47. data/lib/whois/record/scanners/whois.nc.rb +46 -0
  48. data/lib/whois/record/scanners/whois.nic.hu.rb +178 -0
  49. data/lib/whois/record/scanners/whois.nic.it.rb +104 -0
  50. data/lib/whois/record/scanners/whois.registry.qa.rb +39 -0
  51. data/lib/whois/record/scanners/whois.rnids.rs.rb +75 -0
  52. data/lib/whois/record/scanners/whois.smallregistry.net.rb +61 -0
  53. data/lib/whois/record/scanners/whois.tld.ee.rb +50 -0
  54. data/lib/whois/version.rb +1 -1
  55. data/spec/fixtures/responses/whois.audns.net.au/status_available.expected +33 -0
  56. data/spec/fixtures/responses/whois.audns.net.au/status_registered.expected +53 -0
  57. data/spec/fixtures/responses/whois.cctld.by/status_available.expected +54 -0
  58. data/spec/fixtures/responses/whois.cctld.by/status_available.txt +1 -0
  59. data/spec/fixtures/responses/whois.cctld.by/status_registered.expected +64 -0
  60. data/spec/fixtures/responses/whois.cctld.by/status_registered.txt +11 -0
  61. data/spec/fixtures/responses/whois.cira.ca/{schema-2/property_status_autorenew_grace.expected → property_status_autorenew_grace.expected} +0 -0
  62. data/spec/fixtures/responses/whois.cira.ca/{schema-2/property_status_autorenew_grace.txt → property_status_autorenew_grace.txt} +0 -0
  63. data/spec/fixtures/responses/whois.cira.ca/{schema-2/property_status_available.expected → property_status_available.expected} +0 -0
  64. data/spec/fixtures/responses/whois.cira.ca/{schema-2/property_status_available.txt → property_status_available.txt} +0 -0
  65. data/spec/fixtures/responses/whois.cira.ca/{schema-2/property_status_redemption.expected → property_status_redemption.expected} +0 -0
  66. data/spec/fixtures/responses/whois.cira.ca/{schema-2/property_status_redemption.txt → property_status_redemption.txt} +0 -0
  67. data/spec/fixtures/responses/whois.cira.ca/{schema-2/property_status_registered.expected → property_status_registered.expected} +0 -0
  68. data/spec/fixtures/responses/whois.cira.ca/{schema-2/property_status_registered.txt → property_status_registered.txt} +0 -0
  69. data/spec/fixtures/responses/whois.cira.ca/{schema-2/property_status_tobereleased.expected → property_status_tobereleased.expected} +0 -0
  70. data/spec/fixtures/responses/whois.cira.ca/{schema-2/property_status_tobereleased.txt → property_status_tobereleased.txt} +0 -0
  71. data/spec/fixtures/responses/whois.cira.ca/{schema-2/property_status_unavailable.txt → property_status_unavailable.txt} +0 -0
  72. data/spec/fixtures/responses/whois.cira.ca/status_available.expected +64 -0
  73. data/spec/fixtures/responses/whois.cira.ca/{schema-2/status_available.txt → status_available.txt} +0 -0
  74. data/spec/fixtures/responses/whois.cira.ca/{schema-2/status_invalid.expected → status_invalid.expected} +0 -0
  75. data/spec/fixtures/responses/whois.cira.ca/{schema-2/status_invalid.txt → status_invalid.txt} +0 -0
  76. data/spec/fixtures/responses/whois.cira.ca/status_registered.expected +118 -0
  77. data/spec/fixtures/responses/whois.cira.ca/{schema-2/status_registered.txt → status_registered.txt} +11 -10
  78. data/spec/fixtures/responses/whois.domainregistry.ie/status_available.expected +34 -0
  79. data/spec/fixtures/responses/whois.domainregistry.ie/status_available.txt +2 -4
  80. data/spec/fixtures/responses/whois.domainregistry.ie/status_registered.expected +47 -1
  81. data/spec/fixtures/responses/whois.domainregistry.ie/status_registered.txt +5 -6
  82. data/spec/fixtures/responses/whois.enom.com/property_contacts_almost_empty.expected +31 -0
  83. data/spec/fixtures/responses/whois.enom.com/property_contacts_almost_empty.txt +61 -0
  84. data/spec/fixtures/responses/whois.enom.com/property_contacts_long_address.expected +15 -0
  85. data/spec/fixtures/responses/whois.enom.com/property_contacts_long_address.txt +67 -0
  86. data/spec/fixtures/responses/whois.enom.com/status_registered.expected +97 -0
  87. data/spec/fixtures/responses/whois.enom.com/status_registered.txt +68 -0
  88. data/spec/fixtures/responses/whois.nic.it/status_registered.expected +25 -25
  89. data/spec/whois/record/parser/responses/whois.audns.net.au/status_available_spec.rb +47 -0
  90. data/spec/whois/record/parser/responses/whois.audns.net.au/status_registered_spec.rb +67 -0
  91. data/spec/whois/record/parser/responses/whois.cctld.by/status_available_spec.rb +105 -0
  92. data/spec/whois/record/parser/responses/whois.cctld.by/status_registered_spec.rb +115 -0
  93. data/spec/whois/record/parser/responses/whois.cira.ca/{schema-2/property_status_autorenew_grace_spec.rb → property_status_autorenew_grace_spec.rb} +2 -2
  94. data/spec/whois/record/parser/responses/whois.cira.ca/{schema-2/property_status_available_spec.rb → property_status_available_spec.rb} +2 -2
  95. data/spec/whois/record/parser/responses/whois.cira.ca/{schema-2/property_status_redemption_spec.rb → property_status_redemption_spec.rb} +2 -2
  96. data/spec/whois/record/parser/responses/whois.cira.ca/{schema-2/property_status_registered_spec.rb → property_status_registered_spec.rb} +2 -2
  97. data/spec/whois/record/parser/responses/whois.cira.ca/{schema-2/property_status_tobereleased_spec.rb → property_status_tobereleased_spec.rb} +2 -2
  98. data/spec/whois/record/parser/responses/whois.cira.ca/{schema-2/status_available_spec.rb → status_available_spec.rb} +45 -2
  99. data/spec/whois/record/parser/responses/whois.cira.ca/{schema-2/status_invalid_spec.rb → status_invalid_spec.rb} +2 -2
  100. data/spec/whois/record/parser/responses/whois.cira.ca/status_registered_spec.rb +172 -0
  101. data/spec/whois/record/parser/responses/whois.domainregistry.ie/status_available_spec.rb +48 -0
  102. data/spec/whois/record/parser/responses/whois.domainregistry.ie/status_registered_spec.rb +61 -1
  103. data/spec/whois/record/parser/responses/whois.enom.com/property_contacts_almost_empty_spec.rb +60 -0
  104. data/spec/whois/record/parser/responses/whois.enom.com/property_contacts_long_address_spec.rb +42 -0
  105. data/spec/whois/record/parser/responses/whois.enom.com/status_registered_spec.rb +140 -0
  106. data/spec/whois/record/parser/responses/whois.nic.it/status_registered_spec.rb +25 -25
  107. data/whois.gemspec +8 -7
  108. metadata +101 -61
  109. data/lib/whois/record/parser/scanners/afilias.rb +0 -66
  110. data/lib/whois/record/parser/scanners/ast.rb +0 -69
  111. data/lib/whois/record/parser/scanners/base.rb +0 -85
  112. data/lib/whois/record/parser/scanners/iana.rb +0 -108
  113. data/lib/whois/record/parser/scanners/verisign.rb +0 -122
  114. data/lib/whois/record/parser/scanners/whois.biz.rb +0 -49
  115. data/lib/whois/record/parser/scanners/whois.centralnic.com.rb +0 -52
  116. data/lib/whois/record/parser/scanners/whois.cnnic.cn.rb +0 -46
  117. data/lib/whois/record/parser/scanners/whois.denic.de.rb +0 -124
  118. data/lib/whois/record/parser/scanners/whois.dns.hr.rb +0 -41
  119. data/lib/whois/record/parser/scanners/whois.nc.rb +0 -48
  120. data/lib/whois/record/parser/scanners/whois.nic.hu.rb +0 -180
  121. data/lib/whois/record/parser/scanners/whois.nic.it.rb +0 -111
  122. data/lib/whois/record/parser/scanners/whois.registry.qa.rb +0 -41
  123. data/lib/whois/record/parser/scanners/whois.rnids.rs.rb +0 -78
  124. data/lib/whois/record/parser/scanners/whois.smallregistry.net.rb +0 -62
  125. data/lib/whois/record/parser/scanners/whois.tld.ee.rb +0 -52
  126. data/spec/fixtures/responses/whois.cira.ca/schema-1/status_available.expected +0 -27
  127. data/spec/fixtures/responses/whois.cira.ca/schema-1/status_available.txt +0 -9
  128. data/spec/fixtures/responses/whois.cira.ca/schema-1/status_registered.expected +0 -46
  129. data/spec/fixtures/responses/whois.cira.ca/schema-1/status_registered.txt +0 -47
  130. data/spec/fixtures/responses/whois.cira.ca/schema-2/status_available.expected +0 -34
  131. data/spec/fixtures/responses/whois.cira.ca/schema-2/status_registered.expected +0 -48
  132. data/spec/whois/record/parser/responses/whois.cira.ca/schema-1/status_available_spec.rb +0 -65
  133. data/spec/whois/record/parser/responses/whois.cira.ca/schema-1/status_registered_spec.rb +0 -84
  134. data/spec/whois/record/parser/responses/whois.cira.ca/schema-2/status_registered_spec.rb +0 -89
@@ -0,0 +1,115 @@
1
+ # encoding: utf-8
2
+
3
+ # This file is autogenerated. Do not edit it manually.
4
+ # If you want change the content of this file, edit
5
+ #
6
+ # /spec/fixtures/responses/whois.cctld.by/status_registered.expected
7
+ #
8
+ # and regenerate the tests with the following rake task
9
+ #
10
+ # $ rake spec:generate
11
+ #
12
+
13
+ require 'spec_helper'
14
+ require 'whois/record/parser/whois.cctld.by.rb'
15
+
16
+ describe Whois::Record::Parser::WhoisCctldBy, "status_registered.expected" do
17
+
18
+ before(:each) do
19
+ file = fixture("responses", "whois.cctld.by/status_registered.txt")
20
+ part = Whois::Record::Part.new(:body => File.read(file))
21
+ @parser = klass.new(part)
22
+ end
23
+
24
+ describe "#disclaimer" do
25
+ it do
26
+ lambda { @parser.disclaimer }.should raise_error(Whois::PropertyNotSupported)
27
+ end
28
+ end
29
+ describe "#domain" do
30
+ it do
31
+ @parser.domain.should == "active.by"
32
+ end
33
+ end
34
+ describe "#domain_id" do
35
+ it do
36
+ lambda { @parser.domain_id }.should raise_error(Whois::PropertyNotSupported)
37
+ end
38
+ end
39
+ describe "#referral_whois" do
40
+ it do
41
+ lambda { @parser.referral_whois }.should raise_error(Whois::PropertyNotSupported)
42
+ end
43
+ end
44
+ describe "#referral_url" do
45
+ it do
46
+ lambda { @parser.referral_url }.should raise_error(Whois::PropertyNotSupported)
47
+ end
48
+ end
49
+ describe "#status" do
50
+ it do
51
+ @parser.status.should == :registered
52
+ end
53
+ end
54
+ describe "#available?" do
55
+ it do
56
+ @parser.available?.should == false
57
+ end
58
+ end
59
+ describe "#registered?" do
60
+ it do
61
+ @parser.registered?.should == true
62
+ end
63
+ end
64
+ describe "#created_on" do
65
+ it do
66
+ @parser.created_on.should be_a(Time)
67
+ @parser.created_on.should == Time.parse("2003-02-02 15:50:44 UTC")
68
+ end
69
+ end
70
+ describe "#updated_on" do
71
+ it do
72
+ @parser.updated_on.should be_a(Time)
73
+ @parser.updated_on.should == Time.parse("2010-12-20 08:36:13 UTC")
74
+ end
75
+ end
76
+ describe "#expires_on" do
77
+ it do
78
+ @parser.expires_on.should be_a(Time)
79
+ @parser.expires_on.should == Time.parse("2013-12-21 10:07:40 UTC")
80
+ end
81
+ end
82
+ describe "#registrar" do
83
+ it do
84
+ @parser.registrar.should be_a(Whois::Record::Registrar)
85
+ @parser.registrar.id.should == "Active Technologies LLC"
86
+ @parser.registrar.name.should == "Active Technologies LLC"
87
+ @parser.registrar.organization.should == "Active Technologies LLC"
88
+ end
89
+ end
90
+ describe "#registrant_contacts" do
91
+ it do
92
+ lambda { @parser.registrant_contacts }.should raise_error(Whois::PropertyNotSupported)
93
+ end
94
+ end
95
+ describe "#admin_contacts" do
96
+ it do
97
+ lambda { @parser.admin_contacts }.should raise_error(Whois::PropertyNotSupported)
98
+ end
99
+ end
100
+ describe "#technical_contacts" do
101
+ it do
102
+ lambda { @parser.technical_contacts }.should raise_error(Whois::PropertyNotSupported)
103
+ end
104
+ end
105
+ describe "#nameservers" do
106
+ it do
107
+ @parser.nameservers.should be_a(Array)
108
+ @parser.nameservers.should have(2).items
109
+ @parser.nameservers[0].should be_a(Whois::Record::Nameserver)
110
+ @parser.nameservers[0].name.should == "ns1.activeby.net"
111
+ @parser.nameservers[1].should be_a(Whois::Record::Nameserver)
112
+ @parser.nameservers[1].name.should == "ns2.activeby.net"
113
+ end
114
+ end
115
+ end
@@ -3,7 +3,7 @@
3
3
  # This file is autogenerated. Do not edit it manually.
4
4
  # If you want change the content of this file, edit
5
5
  #
6
- # /spec/fixtures/responses/whois.cira.ca/schema-2/property_status_autorenew_grace.expected
6
+ # /spec/fixtures/responses/whois.cira.ca/property_status_autorenew_grace.expected
7
7
  #
8
8
  # and regenerate the tests with the following rake task
9
9
  #
@@ -16,7 +16,7 @@ require 'whois/record/parser/whois.cira.ca.rb'
16
16
  describe Whois::Record::Parser::WhoisCiraCa, "property_status_autorenew_grace.expected" do
17
17
 
18
18
  before(:each) do
19
- file = fixture("responses", "whois.cira.ca/schema-2/property_status_autorenew_grace.txt")
19
+ file = fixture("responses", "whois.cira.ca/property_status_autorenew_grace.txt")
20
20
  part = Whois::Record::Part.new(:body => File.read(file))
21
21
  @parser = klass.new(part)
22
22
  end
@@ -3,7 +3,7 @@
3
3
  # This file is autogenerated. Do not edit it manually.
4
4
  # If you want change the content of this file, edit
5
5
  #
6
- # /spec/fixtures/responses/whois.cira.ca/schema-2/property_status_available.expected
6
+ # /spec/fixtures/responses/whois.cira.ca/property_status_available.expected
7
7
  #
8
8
  # and regenerate the tests with the following rake task
9
9
  #
@@ -16,7 +16,7 @@ require 'whois/record/parser/whois.cira.ca.rb'
16
16
  describe Whois::Record::Parser::WhoisCiraCa, "property_status_available.expected" do
17
17
 
18
18
  before(:each) do
19
- file = fixture("responses", "whois.cira.ca/schema-2/property_status_available.txt")
19
+ file = fixture("responses", "whois.cira.ca/property_status_available.txt")
20
20
  part = Whois::Record::Part.new(:body => File.read(file))
21
21
  @parser = klass.new(part)
22
22
  end
@@ -3,7 +3,7 @@
3
3
  # This file is autogenerated. Do not edit it manually.
4
4
  # If you want change the content of this file, edit
5
5
  #
6
- # /spec/fixtures/responses/whois.cira.ca/schema-2/property_status_redemption.expected
6
+ # /spec/fixtures/responses/whois.cira.ca/property_status_redemption.expected
7
7
  #
8
8
  # and regenerate the tests with the following rake task
9
9
  #
@@ -16,7 +16,7 @@ require 'whois/record/parser/whois.cira.ca.rb'
16
16
  describe Whois::Record::Parser::WhoisCiraCa, "property_status_redemption.expected" do
17
17
 
18
18
  before(:each) do
19
- file = fixture("responses", "whois.cira.ca/schema-2/property_status_redemption.txt")
19
+ file = fixture("responses", "whois.cira.ca/property_status_redemption.txt")
20
20
  part = Whois::Record::Part.new(:body => File.read(file))
21
21
  @parser = klass.new(part)
22
22
  end
@@ -3,7 +3,7 @@
3
3
  # This file is autogenerated. Do not edit it manually.
4
4
  # If you want change the content of this file, edit
5
5
  #
6
- # /spec/fixtures/responses/whois.cira.ca/schema-2/property_status_registered.expected
6
+ # /spec/fixtures/responses/whois.cira.ca/property_status_registered.expected
7
7
  #
8
8
  # and regenerate the tests with the following rake task
9
9
  #
@@ -16,7 +16,7 @@ require 'whois/record/parser/whois.cira.ca.rb'
16
16
  describe Whois::Record::Parser::WhoisCiraCa, "property_status_registered.expected" do
17
17
 
18
18
  before(:each) do
19
- file = fixture("responses", "whois.cira.ca/schema-2/property_status_registered.txt")
19
+ file = fixture("responses", "whois.cira.ca/property_status_registered.txt")
20
20
  part = Whois::Record::Part.new(:body => File.read(file))
21
21
  @parser = klass.new(part)
22
22
  end
@@ -3,7 +3,7 @@
3
3
  # This file is autogenerated. Do not edit it manually.
4
4
  # If you want change the content of this file, edit
5
5
  #
6
- # /spec/fixtures/responses/whois.cira.ca/schema-2/property_status_tobereleased.expected
6
+ # /spec/fixtures/responses/whois.cira.ca/property_status_tobereleased.expected
7
7
  #
8
8
  # and regenerate the tests with the following rake task
9
9
  #
@@ -16,7 +16,7 @@ require 'whois/record/parser/whois.cira.ca.rb'
16
16
  describe Whois::Record::Parser::WhoisCiraCa, "property_status_tobereleased.expected" do
17
17
 
18
18
  before(:each) do
19
- file = fixture("responses", "whois.cira.ca/schema-2/property_status_tobereleased.txt")
19
+ file = fixture("responses", "whois.cira.ca/property_status_tobereleased.txt")
20
20
  part = Whois::Record::Part.new(:body => File.read(file))
21
21
  @parser = klass.new(part)
22
22
  end
@@ -3,7 +3,7 @@
3
3
  # This file is autogenerated. Do not edit it manually.
4
4
  # If you want change the content of this file, edit
5
5
  #
6
- # /spec/fixtures/responses/whois.cira.ca/schema-2/status_available.expected
6
+ # /spec/fixtures/responses/whois.cira.ca/status_available.expected
7
7
  #
8
8
  # and regenerate the tests with the following rake task
9
9
  #
@@ -16,11 +16,36 @@ require 'whois/record/parser/whois.cira.ca.rb'
16
16
  describe Whois::Record::Parser::WhoisCiraCa, "status_available.expected" do
17
17
 
18
18
  before(:each) do
19
- file = fixture("responses", "whois.cira.ca/schema-2/status_available.txt")
19
+ file = fixture("responses", "whois.cira.ca/status_available.txt")
20
20
  part = Whois::Record::Part.new(:body => File.read(file))
21
21
  @parser = klass.new(part)
22
22
  end
23
23
 
24
+ describe "#disclaimer" do
25
+ it do
26
+ @parser.disclaimer.should == "Use of CIRA's WHOIS service is governed by the Terms of Use in its Legal\nNotice, available at http://www.cira.ca/legal-notice/?lang=en\n\n(c) 2010 Canadian Internet Registration Authority, (http://www.cira.ca/)"
27
+ end
28
+ end
29
+ describe "#domain" do
30
+ it do
31
+ @parser.domain.should == "u34jedzcq.ca"
32
+ end
33
+ end
34
+ describe "#domain_id" do
35
+ it do
36
+ lambda { @parser.domain_id }.should raise_error(Whois::PropertyNotSupported)
37
+ end
38
+ end
39
+ describe "#referral_whois" do
40
+ it do
41
+ lambda { @parser.referral_whois }.should raise_error(Whois::PropertyNotSupported)
42
+ end
43
+ end
44
+ describe "#referral_url" do
45
+ it do
46
+ lambda { @parser.referral_url }.should raise_error(Whois::PropertyNotSupported)
47
+ end
48
+ end
24
49
  describe "#status" do
25
50
  it do
26
51
  @parser.status.should == :available
@@ -56,6 +81,24 @@ describe Whois::Record::Parser::WhoisCiraCa, "status_available.expected" do
56
81
  @parser.registrar.should == nil
57
82
  end
58
83
  end
84
+ describe "#registrant_contacts" do
85
+ it do
86
+ @parser.registrant_contacts.should be_a(Array)
87
+ @parser.registrant_contacts.should == []
88
+ end
89
+ end
90
+ describe "#admin_contacts" do
91
+ it do
92
+ @parser.admin_contacts.should be_a(Array)
93
+ @parser.admin_contacts.should == []
94
+ end
95
+ end
96
+ describe "#technical_contacts" do
97
+ it do
98
+ @parser.technical_contacts.should be_a(Array)
99
+ @parser.technical_contacts.should == []
100
+ end
101
+ end
59
102
  describe "#nameservers" do
60
103
  it do
61
104
  @parser.nameservers.should be_a(Array)
@@ -3,7 +3,7 @@
3
3
  # This file is autogenerated. Do not edit it manually.
4
4
  # If you want change the content of this file, edit
5
5
  #
6
- # /spec/fixtures/responses/whois.cira.ca/schema-2/status_invalid.expected
6
+ # /spec/fixtures/responses/whois.cira.ca/status_invalid.expected
7
7
  #
8
8
  # and regenerate the tests with the following rake task
9
9
  #
@@ -16,7 +16,7 @@ require 'whois/record/parser/whois.cira.ca.rb'
16
16
  describe Whois::Record::Parser::WhoisCiraCa, "status_invalid.expected" do
17
17
 
18
18
  before(:each) do
19
- file = fixture("responses", "whois.cira.ca/schema-2/status_invalid.txt")
19
+ file = fixture("responses", "whois.cira.ca/status_invalid.txt")
20
20
  part = Whois::Record::Part.new(:body => File.read(file))
21
21
  @parser = klass.new(part)
22
22
  end
@@ -0,0 +1,172 @@
1
+ # encoding: utf-8
2
+
3
+ # This file is autogenerated. Do not edit it manually.
4
+ # If you want change the content of this file, edit
5
+ #
6
+ # /spec/fixtures/responses/whois.cira.ca/status_registered.expected
7
+ #
8
+ # and regenerate the tests with the following rake task
9
+ #
10
+ # $ rake spec:generate
11
+ #
12
+
13
+ require 'spec_helper'
14
+ require 'whois/record/parser/whois.cira.ca.rb'
15
+
16
+ describe Whois::Record::Parser::WhoisCiraCa, "status_registered.expected" do
17
+
18
+ before(:each) do
19
+ file = fixture("responses", "whois.cira.ca/status_registered.txt")
20
+ part = Whois::Record::Part.new(:body => File.read(file))
21
+ @parser = klass.new(part)
22
+ end
23
+
24
+ describe "#disclaimer" do
25
+ it do
26
+ @parser.disclaimer.should == "Use of CIRA's WHOIS service is governed by the Terms of Use in its Legal\nNotice, available at http://www.cira.ca/legal-notice/?lang=en\n\n(c) 2010 Canadian Internet Registration Authority, (http://www.cira.ca/)"
27
+ end
28
+ end
29
+ describe "#domain" do
30
+ it do
31
+ @parser.domain.should == "google.ca"
32
+ end
33
+ end
34
+ describe "#domain_id" do
35
+ it do
36
+ lambda { @parser.domain_id }.should raise_error(Whois::PropertyNotSupported)
37
+ end
38
+ end
39
+ describe "#referral_whois" do
40
+ it do
41
+ lambda { @parser.referral_whois }.should raise_error(Whois::PropertyNotSupported)
42
+ end
43
+ end
44
+ describe "#referral_url" do
45
+ it do
46
+ lambda { @parser.referral_url }.should raise_error(Whois::PropertyNotSupported)
47
+ end
48
+ end
49
+ describe "#status" do
50
+ it do
51
+ @parser.status.should == :registered
52
+ end
53
+ end
54
+ describe "#available?" do
55
+ it do
56
+ @parser.available?.should == false
57
+ end
58
+ end
59
+ describe "#registered?" do
60
+ it do
61
+ @parser.registered?.should == true
62
+ end
63
+ end
64
+ describe "#created_on" do
65
+ it do
66
+ @parser.created_on.should be_a(Time)
67
+ @parser.created_on.should == Time.parse("2000-10-03 00:00:00")
68
+ end
69
+ end
70
+ describe "#updated_on" do
71
+ it do
72
+ @parser.updated_on.should be_a(Time)
73
+ @parser.updated_on.should == Time.parse("2012-03-27 00:00:00")
74
+ end
75
+ end
76
+ describe "#expires_on" do
77
+ it do
78
+ @parser.expires_on.should be_a(Time)
79
+ @parser.expires_on.should == Time.parse("2013-04-28 00:00:00")
80
+ end
81
+ end
82
+ describe "#registrar" do
83
+ it do
84
+ @parser.registrar.should be_a(Whois::Record::Registrar)
85
+ @parser.registrar.id.should == "70"
86
+ @parser.registrar.name.should == "Webnames.ca Inc."
87
+ @parser.registrar.organization.should == "Webnames.ca Inc."
88
+ @parser.registrar.url.should == nil
89
+ end
90
+ end
91
+ describe "#registrant_contacts" do
92
+ it do
93
+ @parser.registrant_contacts.should be_a(Array)
94
+ @parser.registrant_contacts.should have(1).items
95
+ @parser.registrant_contacts[0].should be_a(Whois::Record::Contact)
96
+ @parser.registrant_contacts[0].type.should == Whois::Record::Contact::TYPE_REGISTRANT
97
+ @parser.registrant_contacts[0].id.should == nil
98
+ @parser.registrant_contacts[0].name.should == "Google Inc."
99
+ @parser.registrant_contacts[0].organization.should == nil
100
+ @parser.registrant_contacts[0].address.should == nil
101
+ @parser.registrant_contacts[0].city.should == nil
102
+ @parser.registrant_contacts[0].zip.should == nil
103
+ @parser.registrant_contacts[0].state.should == nil
104
+ @parser.registrant_contacts[0].country_code.should == nil
105
+ @parser.registrant_contacts[0].phone.should == nil
106
+ @parser.registrant_contacts[0].fax.should == nil
107
+ @parser.registrant_contacts[0].email.should == nil
108
+ end
109
+ end
110
+ describe "#admin_contacts" do
111
+ it do
112
+ @parser.admin_contacts.should be_a(Array)
113
+ @parser.admin_contacts.should have(1).items
114
+ @parser.admin_contacts[0].should be_a(Whois::Record::Contact)
115
+ @parser.admin_contacts[0].type.should == Whois::Record::Contact::TYPE_ADMIN
116
+ @parser.admin_contacts[0].id.should == nil
117
+ @parser.admin_contacts[0].name.should == "Christina Chiou"
118
+ @parser.admin_contacts[0].organization.should == nil
119
+ @parser.admin_contacts[0].address.should == "130 King St. W., Suite 1800,\nToronto ON M5X1E3 Canada"
120
+ @parser.admin_contacts[0].city.should == nil
121
+ @parser.admin_contacts[0].zip.should == nil
122
+ @parser.admin_contacts[0].state.should == nil
123
+ @parser.admin_contacts[0].country_code.should == nil
124
+ @parser.admin_contacts[0].phone.should == "+1.4168653361x"
125
+ @parser.admin_contacts[0].fax.should == "+1.4169456616"
126
+ @parser.admin_contacts[0].email.should == "dns-admin@google.com"
127
+ end
128
+ end
129
+ describe "#technical_contacts" do
130
+ it do
131
+ @parser.technical_contacts.should be_a(Array)
132
+ @parser.technical_contacts.should have(1).items
133
+ @parser.technical_contacts[0].should be_a(Whois::Record::Contact)
134
+ @parser.technical_contacts[0].type.should == Whois::Record::Contact::TYPE_TECHNICAL
135
+ @parser.technical_contacts[0].id.should == nil
136
+ @parser.technical_contacts[0].name.should == "Matt Serlin"
137
+ @parser.technical_contacts[0].organization.should == nil
138
+ @parser.technical_contacts[0].address.should == "Domain Provisioning,10400 Overland Rd. PMB 155\nBoise ID 83709 United States"
139
+ @parser.technical_contacts[0].city.should == nil
140
+ @parser.technical_contacts[0].zip.should == nil
141
+ @parser.technical_contacts[0].state.should == nil
142
+ @parser.technical_contacts[0].country_code.should == nil
143
+ @parser.technical_contacts[0].phone.should == "+1.2083895740x"
144
+ @parser.technical_contacts[0].fax.should == "+1.2083895771"
145
+ @parser.technical_contacts[0].email.should == "ccops@markmonitor.com"
146
+ end
147
+ end
148
+ describe "#nameservers" do
149
+ it do
150
+ @parser.nameservers.should be_a(Array)
151
+ @parser.nameservers.should have(4).items
152
+ @parser.nameservers[0].should be_a(Whois::Record::Nameserver)
153
+ @parser.nameservers[0].name.should == "ns1.google.com"
154
+ @parser.nameservers[1].should be_a(Whois::Record::Nameserver)
155
+ @parser.nameservers[1].name.should == "ns2.google.com"
156
+ @parser.nameservers[2].should be_a(Whois::Record::Nameserver)
157
+ @parser.nameservers[2].name.should == "ns3.google.com"
158
+ @parser.nameservers[3].should be_a(Whois::Record::Nameserver)
159
+ @parser.nameservers[3].name.should == "ns4.google.com"
160
+ end
161
+ end
162
+ describe "#valid?" do
163
+ it do
164
+ @parser.valid?.should == true
165
+ end
166
+ end
167
+ describe "#invalid?" do
168
+ it do
169
+ @parser.invalid?.should == false
170
+ end
171
+ end
172
+ end
@@ -21,6 +21,31 @@ describe Whois::Record::Parser::WhoisDomainregistryIe, "status_available.expecte
21
21
  @parser = klass.new(part)
22
22
  end
23
23
 
24
+ describe "#disclaimer" do
25
+ it do
26
+ @parser.disclaimer.should == "Rights restricted by copyright; http://iedr.ie/index.php/mnudomregs/mnudnssearch/96\nDo not remove this notice"
27
+ end
28
+ end
29
+ describe "#domain" do
30
+ it do
31
+ @parser.domain.should == nil
32
+ end
33
+ end
34
+ describe "#domain_id" do
35
+ it do
36
+ lambda { @parser.domain_id }.should raise_error(Whois::PropertyNotSupported)
37
+ end
38
+ end
39
+ describe "#referral_whois" do
40
+ it do
41
+ lambda { @parser.referral_whois }.should raise_error(Whois::PropertyNotSupported)
42
+ end
43
+ end
44
+ describe "#referral_url" do
45
+ it do
46
+ lambda { @parser.referral_url }.should raise_error(Whois::PropertyNotSupported)
47
+ end
48
+ end
24
49
  describe "#status" do
25
50
  it do
26
51
  @parser.status.should == :available
@@ -51,6 +76,29 @@ describe Whois::Record::Parser::WhoisDomainregistryIe, "status_available.expecte
51
76
  @parser.expires_on.should == nil
52
77
  end
53
78
  end
79
+ describe "#registrar" do
80
+ it do
81
+ lambda { @parser.registrar }.should raise_error(Whois::PropertyNotSupported)
82
+ end
83
+ end
84
+ describe "#registrant_contacts" do
85
+ it do
86
+ @parser.registrant_contacts.should be_a(Array)
87
+ @parser.registrant_contacts.should == []
88
+ end
89
+ end
90
+ describe "#admin_contacts" do
91
+ it do
92
+ @parser.admin_contacts.should be_a(Array)
93
+ @parser.admin_contacts.should == []
94
+ end
95
+ end
96
+ describe "#technical_contacts" do
97
+ it do
98
+ @parser.technical_contacts.should be_a(Array)
99
+ @parser.technical_contacts.should == []
100
+ end
101
+ end
54
102
  describe "#nameservers" do
55
103
  it do
56
104
  @parser.nameservers.should be_a(Array)
@@ -21,6 +21,31 @@ describe Whois::Record::Parser::WhoisDomainregistryIe, "status_registered.expect
21
21
  @parser = klass.new(part)
22
22
  end
23
23
 
24
+ describe "#disclaimer" do
25
+ it do
26
+ @parser.disclaimer.should == "Rights restricted by copyright; http://iedr.ie/index.php/mnudomregs/mnudnssearch/96\nDo not remove this notice"
27
+ end
28
+ end
29
+ describe "#domain" do
30
+ it do
31
+ @parser.domain.should == "google.ie"
32
+ end
33
+ end
34
+ describe "#domain_id" do
35
+ it do
36
+ lambda { @parser.domain_id }.should raise_error(Whois::PropertyNotSupported)
37
+ end
38
+ end
39
+ describe "#referral_whois" do
40
+ it do
41
+ lambda { @parser.referral_whois }.should raise_error(Whois::PropertyNotSupported)
42
+ end
43
+ end
44
+ describe "#referral_url" do
45
+ it do
46
+ lambda { @parser.referral_url }.should raise_error(Whois::PropertyNotSupported)
47
+ end
48
+ end
24
49
  describe "#status" do
25
50
  it do
26
51
  @parser.status.should == :registered
@@ -49,7 +74,42 @@ describe Whois::Record::Parser::WhoisDomainregistryIe, "status_registered.expect
49
74
  describe "#expires_on" do
50
75
  it do
51
76
  @parser.expires_on.should be_a(Time)
52
- @parser.expires_on.should == Time.parse("2010-03-21")
77
+ @parser.expires_on.should == Time.parse("2013-03-21")
78
+ end
79
+ end
80
+ describe "#registrar" do
81
+ it do
82
+ lambda { @parser.registrar }.should raise_error(Whois::PropertyNotSupported)
83
+ end
84
+ end
85
+ describe "#registrant_contacts" do
86
+ it do
87
+ @parser.registrant_contacts.should be_a(Array)
88
+ @parser.registrant_contacts.should have(1).items
89
+ @parser.registrant_contacts[0].should be_a(Whois::Record::Contact)
90
+ @parser.registrant_contacts[0].type.should == Whois::Record::Contact::TYPE_REGISTRANT
91
+ @parser.registrant_contacts[0].id.should == nil
92
+ @parser.registrant_contacts[0].name.should == "Google, Inc"
93
+ end
94
+ end
95
+ describe "#admin_contacts" do
96
+ it do
97
+ @parser.admin_contacts.should be_a(Array)
98
+ @parser.admin_contacts.should have(1).items
99
+ @parser.admin_contacts[0].should be_a(Whois::Record::Contact)
100
+ @parser.admin_contacts[0].type.should == Whois::Record::Contact::TYPE_ADMIN
101
+ @parser.admin_contacts[0].id.should == "KR59-IEDR"
102
+ @parser.admin_contacts[0].name.should == "Kulpreet Rana"
103
+ end
104
+ end
105
+ describe "#technical_contacts" do
106
+ it do
107
+ @parser.technical_contacts.should be_a(Array)
108
+ @parser.technical_contacts.should have(1).items
109
+ @parser.technical_contacts[0].should be_a(Whois::Record::Contact)
110
+ @parser.technical_contacts[0].type.should == Whois::Record::Contact::TYPE_TECHNICAL
111
+ @parser.technical_contacts[0].id.should == "CCA7-IEDR"
112
+ @parser.technical_contacts[0].name.should == "eMarkmonitor Inc"
53
113
  end
54
114
  end
55
115
  describe "#nameservers" do
@@ -0,0 +1,60 @@
1
+ # encoding: utf-8
2
+
3
+ # This file is autogenerated. Do not edit it manually.
4
+ # If you want change the content of this file, edit
5
+ #
6
+ # /spec/fixtures/responses/whois.enom.com/property_contacts_almost_empty.expected
7
+ #
8
+ # and regenerate the tests with the following rake task
9
+ #
10
+ # $ rake spec:generate
11
+ #
12
+
13
+ require 'spec_helper'
14
+ require 'whois/record/parser/whois.enom.com.rb'
15
+
16
+ describe Whois::Record::Parser::WhoisEnomCom, "property_contacts_almost_empty.expected" do
17
+
18
+ before(:each) do
19
+ file = fixture("responses", "whois.enom.com/property_contacts_almost_empty.txt")
20
+ part = Whois::Record::Part.new(:body => File.read(file))
21
+ @parser = klass.new(part)
22
+ end
23
+
24
+ describe "#registrant_contacts" do
25
+ it do
26
+ @parser.registrant_contacts.should be_a(Array)
27
+ @parser.registrant_contacts.should have(1).items
28
+ @parser.registrant_contacts[0].should be_a(Whois::Record::Contact)
29
+ @parser.registrant_contacts[0].type.should == Whois::Record::Contact::TYPE_REGISTRANT
30
+ @parser.registrant_contacts[0].name.should == "Tony Kerr"
31
+ @parser.registrant_contacts[0].organization.should == ""
32
+ @parser.registrant_contacts[0].address.should == ""
33
+ @parser.registrant_contacts[0].city.should == ""
34
+ @parser.registrant_contacts[0].zip.should == ""
35
+ @parser.registrant_contacts[0].state.should == ""
36
+ @parser.registrant_contacts[0].country_code.should == "US"
37
+ @parser.registrant_contacts[0].phone.should == ""
38
+ @parser.registrant_contacts[0].fax.should == ""
39
+ @parser.registrant_contacts[0].email.should == ""
40
+ end
41
+ end
42
+ describe "#technical_contacts" do
43
+ it do
44
+ @parser.technical_contacts.should be_a(Array)
45
+ @parser.technical_contacts.should have(1).items
46
+ @parser.technical_contacts[0].should be_a(Whois::Record::Contact)
47
+ @parser.technical_contacts[0].type.should == Whois::Record::Contact::TYPE_TECHNICAL
48
+ @parser.technical_contacts[0].name.should == "Tony Kerr"
49
+ @parser.technical_contacts[0].organization.should == ""
50
+ @parser.technical_contacts[0].address.should == ""
51
+ @parser.technical_contacts[0].city.should == ""
52
+ @parser.technical_contacts[0].zip.should == ""
53
+ @parser.technical_contacts[0].state.should == ""
54
+ @parser.technical_contacts[0].country_code.should == "US"
55
+ @parser.technical_contacts[0].phone.should == "+1."
56
+ @parser.technical_contacts[0].fax.should == ""
57
+ @parser.technical_contacts[0].email.should == "tkerr@sportimeny.com"
58
+ end
59
+ end
60
+ end